diff --git a/_layouts/default.html b/_layouts/default.html index cfa25ba..f4fc443 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -6,7 +6,7 @@
{{ content }}
- - diff --git a/dev/serve.py b/dev/serve.py index ac78405..2fc1edc 100755 --- a/dev/serve.py +++ b/dev/serve.py @@ -95,7 +95,6 @@ def html_from_markdown(md, baseurl, dir, name, path): html = html_template.replace('{{ content }}', markdown.markdown(md, extensions=['extra', 'toc'])) - html = html_template.replace('{{ content }}', markdown.markdown(md, extensions=['extra', 'toc'])) soup = BeautifulSoup(markdown.markdown(md, extensions=['extra', 'toc']), 'html5lib') @@ -154,9 +153,8 @@ def html_from_markdown(md, baseurl, dir, name, path): serialized_config = json.dumps(CONFIG) html = html_template.replace('{{ content }}', CONFIG['content']) - html = re.sub(r'' - return html @app.get('{path:path}') @@ -229,7 +227,6 @@ async def serve(path: Optional[str] = None): parser.add_argument('--repo', default='', help='Github repository') parser.add_argument('--branch', default='main', help='Github branch') - args = vars(parser.parse_args()) os.environ['PORT'] = str(args['port']) diff --git a/ghp-lib.js b/ghp-lib.js new file mode 100644 index 0000000..04c538a --- /dev/null +++ b/ghp-lib.js @@ -0,0 +1,1090 @@ +import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js"; +import 'https://cdn.jsdelivr.net/npm/marked-footnote/dist/index.umd.min.js' +import * as yaml from 'https://cdn.jsdelivr.net/npm/yaml@2.3.4/browser/index.min.js' + +function addLink(attrs) { + console.log('addLink', attrs) + let stylesheet = document.createElement('link') + Object.entries(attrs).map(([key, value]) => stylesheet.setAttribute(key, value)) + document.head.appendChild(stylesheet) +} + +function addScript(attrs) { + console.log('addScript', attrs) + let script = document.createElement('script') + Object.entries(attrs).map(([key, value]) => script.setAttribute(key, value)) + document.head.appendChild(script) +} + +const classes = new Set('left right full sticky'.split(' ')) +const components = { + 've-animated-image': { + booleans: 'autoplay', + positional: 'src caption' + }, + 've-audio': { + booleans: 'autoplay muted no-caption sync', + positional: 'src caption' + }, + 've-breadcrumbs': {}, + 've-compare': { + positional: 'src' + }, + 've-entities': { + booleans: 'cards' + }, + 've-footer': { + }, + 've-gallery': { + booleans: 'caption' + }, + 've-header': { + booleans: 'breadcrumbs no-manifest-popover pdf-download-enabled', + positional: 'title background subtitle options position' + }, + 've-iframe': { + booleans: 'allow-full-screen allow-transparency full left right sticky', + positional: 'src caption' + }, + 've-image': { + booleans: 'no-caption grid static repo-is-writable zoom-on-scroll', + positional: 'src caption' + }, + 've-knightlab-timeline': { + booleans: 'has-bookmark' + }, + 've-map': { + booleans: 'cards full left marker prefer-geojson popup-on-hover zoom-on-scroll zoom-on-click', + positional: 'center caption' + }, + 've-media': { + // booleans: 'no-caption static repo-is-writable zoom-on-scroll', + positional: 'src caption' + }, + 've-menu': { + booleans: 'pdf-download-enabled' + }, + 've-mermaid': {}, + 've-meta': {}, + 've-plant-specimen': { + booleans: 'full left right sticky', + positional: 'qid max' + }, + 've-snippet': {}, + 've-video': { + booleans: 'autoplay muted no-caption sync', + positional: 'src caption' + }, + 've-visjs': { + booleans: 'hierarchical' + } +} +let tagMap = {} +Object.entries(components).forEach(([tag, attrs]) => { + let tagObj = { + booleans : new Set((attrs.booleans || '').split(' ').filter(s => s)), + positional: (attrs.positional || '').split(' ').filter(s => s) + } + tagMap[tag] = tagObj + tagMap[tag.slice(3)] = tagObj +}) + +function parseHeadline(s) { + let tokens = [] + s = s.replace(/”/g,'"').replace(/”/g,'"').replace(/’/g,"'") + s?.match(/[^\s"]+|"([^"]*)"/gmi)?.filter(t => t).forEach(token => { + if (tokens.length > 0 && tokens[tokens.length-1].indexOf('=') === tokens[tokens.length-1].length-1) tokens[tokens.length-1] = `${tokens[tokens.length-1]}${token}` + else tokens.push(token) + }) + let parsed = {} + let tokenIdx = 0 + while (tokenIdx < tokens.length) { + let token = tokens[tokenIdx].replace(//g, '_').replace(/<\/em>/g, '_') + if (token.indexOf('=') > 0 && /^[\w-:]+=/.test(token)) { + let idx = token.indexOf('=') + let key = token.slice(0, idx) + let value = token.slice(idx+1) + value = value[0] === '"' && value[value.length-1] === '"' ? value.slice(1, -1) : value + if (key[0] === ':') { // style + key = camelToKebab(key.slice(1)) + if (!parsed.style) parsed.style = {} + parsed.style[key] = value + } else { // kwargs + if (!parsed.kwargs) parsed.kwargs = {} + if (parsed.kwargs[key]) parsed.kwargs[key] += ` ${value}` + else parsed.kwargs[key] = value + } + } + else if (token[0] === '.' || classes.has(token)) { + let className = token.replace(/^\./,'') + if (parsed.class) parsed.class += ` ${className}` + else parsed.class = className + } + else if (token[0] === '"') { + if (!parsed.args) parsed.args = [] + parsed.args.push(token.slice(1,-1)) + } + else if (/#\w+/.test(token)) parsed['id'] = token.slice(1) + else if (/^Q\d+$/.test(token) && !parsed.tag) { // entity identifier + if (!parsed.entities) parsed.entities = [] + parsed.entities.push(token) + } + else if (tokenIdx === 0 && !parsed.tag && tagMap[token.replace(/^\./,'')]) { + let tag = token.replace(/^\./,'') + parsed.tag = tag.indexOf('ve-') === 0 ? tag : `ve-${tag}` + } else if (token === 'script' || token === 'link') parsed.tag = token + else { + if (parsed.tag === 'script' && !parsed.src) parsed.src = token + else if (parsed.tag === 'link' && !parsed.href) parsed.href= token + else { + let tagObj = tagMap[parsed.tag] + if (tagObj?.booleans.has(token)) { + if (!parsed.booleans) parsed.booleans = [] + parsed.booleans.push(token) + } else { + if (!parsed.args) parsed.args = [] + parsed.args.push(token) + } + } + } + tokenIdx++ + } + + if (parsed.tag && parsed.args) { + let tagObj = tagMap[parsed.tag] + let listArgs = [] + parsed.args.forEach((value, idx) => { + if (idx >= tagObj.positional?.length) { + listArgs.push(value) + } else { + let key = tagObj.positional[idx] + value = value[0] === '"' && value[value.length-1] === '"' ? value.slice(1, -1) : value + if (!parsed.kwargs) parsed.kwargs = {} + if (parsed.kwargs[key]) parsed.kwargs[key] += ` ${value}` + else parsed.kwargs[key] = value + } + }) + if (listArgs.length) parsed.args = listArgs + else delete parsed.args + } + return parsed +} + +function parseCodeEl(codeEl) { + let codeElems = codeEl.textContent?.replace(/\s+\|\s+/g,'\n') + .split('\n') + .map(l => l.trim()) + // .map(l => l.replace(//g, '_').replace(/<\/em>/g, '_')) + .filter(x => x) || [] + let parsed = parseHeadline(codeElems?.[0]) || {} + if (parsed.tag === 've-mermaid') { + parsed.raw = codeEl.textContent.split('\n').slice(1).join('\n') + } else if (parsed.tag === 've-media') { + parsed.tag = 've-image' //TODO: implement ve-media conversion + } else if (parsed.tag === 've-vis-network') { + parsed.tag = 've-visjs' + } else if (codeElems.length > 1) { + parsed.args = parsed.args ? [...parsed.args, ...codeElems.slice(1)] : codeElems.slice(1) + } + return parsed +} + +function makeEl(parsed) { + let el = document.createElement(parsed.tag) + if (parsed.id) el.id = parsed.id + if (parsed.class) parsed.class.split(' ').forEach(c => el.classList.add(c)) + if (parsed.style) el.setAttribute('style', Object.entries(parsed.style).map(([k,v]) => `${k}:${v}`).join(';')) + if (parsed.entities) el.setAttribute('entities', parsed.entities.join(' ')) + if (parsed.kwargs) for (const [k,v] of Object.entries(parsed.kwargs)) el.setAttribute(k, v === true ? '' : v) + if (parsed.booleans) parsed.booleans.forEach(b => el.setAttribute(b, '') ) + if (parsed.args) { + let ul = document.createElement('ul') + el.appendChild(ul) + for (const arg of parsed.args) { + let argEl = new DOMParser().parseFromString(marked.parse(arg.replace(/^\s*-\s*/, '')), 'text/html').body.firstChild + let li = document.createElement('li') + li.innerHTML = argEl.innerHTML.indexOf('wc:') === 0 ? argEl.innerHTML.replace(/([^<]+)<\/em>/g, '_$1_') : argEl.innerHTML + ul.appendChild(li) + } + } + if (parsed.raw) el.textContent = parsed.raw + return el +} + +function deleteAllComments(rootEl) { + var iterator = document.createNodeIterator(rootEl, NodeFilter.SHOW_COMMENT, () => { return NodeFilter.FILTER_ACCEPT}, false); + var curNode + while (curNode = iterator.nextNode()) { curNode.remove() } +} + +function isNumeric(arg) { return !isNaN(arg) } +function camelToKebab(input) { return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()} + +function computeDataId(el) { + let dataId = [] + while (el.parentElement) { + let siblings = Array.from(el.parentElement.children).filter(c => c.tagName === el.tagName) + dataId.push(siblings.indexOf(el) + 1) + el = el.parentElement + } + return dataId.reverse().join('.') +} + +// convert juncture tags to web component elements +function convertTags(rootEl) { + // remove "view as" buttons + Array.from(rootEl.querySelectorAll('a > img')) + .filter(img => img.src.indexOf('ve-button.png') > -1 || img.src.indexOf('wb.svg') > -1) + .forEach(viewAsButton => viewAsButton?.parentElement?.parentElement?.remove()) + + Array.from(rootEl.querySelectorAll('p')) + .filter(p => /^\.ve-\w+\S/.test(p.childNodes.item(0)?.nodeValue?.trim() || '')) + .forEach(p => { + let codeElWrapper = document.createElement('div') + let codeEl = document.createElement('code') + codeElWrapper.appendChild(codeEl) + codeEl.setAttribute('class', 'language-juncture2') + let replacementText = p.innerHTML.trim().slice(1) + .replace(/\n\s*-\s+/g, '\n') + .replace(/[^<]*<\/a>/g, '') + .replace(/^ve-media/, 've-image') + codeEl.textContent = replacementText + p.replaceWith(codeElWrapper) + }) + Array.from(rootEl.querySelectorAll('param')) + .filter(param => Array.from(param.attributes).filter(attr => attr.name.indexOf('ve-') === 0).length) + .filter(param => param.getAttribute('ve-config') === null) + .forEach(param => { + let tag = Array.from(param.attributes).find(attr => attr.name.indexOf('ve-') === 0).name + if (tag) { + let tagObj = tagMap[tag] || {} + let parsed = { tag } + Array.from(param.attributes).forEach(attr => { + if (attr.name !== tag) { + if (tagObj.booleans?.has(attr.name)) { + if (!parsed.booleans) parsed.booleans = [] + parsed.booleans.push(attr.name) + } else { + if (!parsed.kwargs) parsed.kwargs = {} + if (parsed.kwargs[attr.name]) parsed.kwargs[attr.name] += ` ${attr.value}` + else parsed.kwargs[attr.name] = attr.value + } + } + }) + if (!isJunctureV1(rootEl)) param.replaceWith(makeEl(parsed)) + } + }) + rootEl.querySelectorAll('code').forEach(codeEl => { + let parsed = parseCodeEl(codeEl) + // console.log(parsed) + if (parsed.tag) { + if (codeEl.parentElement.tagName === 'PRE') { + codeEl = codeEl.parentElement + codeEl.parentElement.removeAttribute('id') + codeEl.parentElement.removeAttribute('data-id') + codeEl.parentElement.removeAttribute('class') + if (codeEl.parentElement.parentElement) codeEl.parentElement.parentElement.className = 'segment' + if (codeEl.parentElement.tagName === 'DIV' && codeEl.parentElement.children.length === 1) { + codeEl.parentElement.replaceWith(codeEl) + } + } + codeEl.replaceWith(makeEl(parsed)) + } else if (parsed.class || parsed.style || parsed.id || parsed.kwargs) { + let codeWrapper = codeEl.parentElement + let target + let priorEl = codeWrapper.previousElementSibling + if (priorEl?.tagName === 'EM' || priorEl?.tagName === 'STRONG') { + target = document.createElement('span') + target.innerHTML = priorEl.innerHTML + priorEl.replaceWith(target) + } else if (parent?.tagName === 'TD') { + target = parent?.parentElement?.parentElement?.parentElement // table + parent?.parentElement?.remove() // row + } else if (parent?.tagName !== 'UL' && (priorEl?.tagName === 'A' || priorEl?.tagName === 'IMG')) { + target = priorEl + } else { + target = priorEl?.children.length === 1 && priorEl.children[0]?.tagName === 'VE-HEADER' + ? codeWrapper.parentElement + : priorEl + } + if (target) { + if (parsed.id) target.id = parsed.id + if (parsed.class) parsed.class.split(' ').forEach(c => target.classList.add(c)) + if (parsed.style) target.setAttribute('style', Object.entries(parsed.style).map(([k,v]) => `${k}:${v}`).join(';')) + if (parsed.entities) target.setAttribute('data-entities', parsed.entities.join(' ')) + if (parsed.kwargs) for (const [k,v] of Object.entries(parsed.kwargs)) target.setAttribute(k, v === true ? '' : v) + } else { + console.log('no target for', parsed) + } + codeWrapper.remove() + } + }) +} + +// Restructure the content to have hierarchical sections and segments +function restructure(rootEl) { + let styleSheet = rootEl.querySelector('style') + deleteAllComments(rootEl) + + // Move child params to be siblings with parent element + rootEl.querySelectorAll('ul, ol').forEach(list => { + let ref = list + list.querySelectorAll('param').forEach(param => { + ref.parentNode.insertBefore(param, ref.nextSibling) + ref = param + }) + }) + + let main = document.createElement('main') + if (styleSheet) main.appendChild(styleSheet.cloneNode(true)) + + main.className = 'page-content markdown-body' + main.setAttribute('aria-label', 'Content') + main.setAttribute('data-theme', 'light') + if (rootEl.style) main.setAttribute('style', rootEl.style.cssText) + let currentSection = main; + let sectionParam + + // Converts empty headings (changed to paragraphs by markdown converter) to headings with the correct level + Array.from(rootEl?.querySelectorAll('p')) + .filter(p => /^[#*]{1,6}$/.test(p.childNodes.item(0)?.nodeValue?.trim() || '')) + .forEach(p => { + let ptext = p.childNodes.item(0).nodeValue?.trim() + let codeEl = p.querySelector('code') + let heading = document.createElement(`h${ptext?.length}`) + p.replaceWith(heading) + if (codeEl) { + let codeWrapper = document.createElement('p') + codeWrapper.appendChild(codeEl) + heading.parentElement?.insertBefore(codeWrapper, heading.nextSibling) + } + }) + + Array.from(rootEl?.querySelectorAll('p, li')) + .filter(p => /==.+=={.+}/.test(p.textContent?.trim() || '')) + .forEach(el => { + let replHtml = [] + let matches = Array.from(el.innerHTML.matchAll(/==(?[^=]+)=={(?[^}]+)}/g)) + matches.forEach((match, idx) => { + if (idx === 0) replHtml.push(el.innerHTML.slice(0, match.index)) + if (match.groups) { + let {text, attrs} = match.groups + if (/\s*Q\d+\s*/.test(attrs)) { + replHtml.push(`${text}`) + } else if (attrs.indexOf('=') > 0) { + let [key, value] = attrs.split('=') + if (value[0] !== '"') attrs = `${key}="${value}"` + replHtml.push(`${text}`) + } + replHtml.push(el.innerHTML.slice(match.index + match[0].length, matches[idx+1]?.index || el.innerHTML.length)) + } + }) + el.innerHTML = replHtml.join('') + }) + + // For compatibility with Juncture V1 + Array.from(rootEl?.querySelectorAll('param')) + .filter(param => Array.from(param.attributes).filter(attr => attr.name.indexOf('ve-') === 0).length === 0) + .forEach(param => { + let priorEl = param.previousElementSibling + param.classList.forEach(c => priorEl?.classList.add(c)) + let idAttr = Array.from(param.attributes).find(attr => attr.name === 'id') + let styleAttr = Array.from(param.attributes).find(attr => attr.name === 'style') + if (idAttr || styleAttr) { + if (idAttr) priorEl?.setAttribute('id', idAttr.value) + if (styleAttr) priorEl?.setAttribute('style', styleAttr.value) + param.remove() + } + }) + + Array.from(rootEl?.children || []).forEach(el => { + if (el.tagName[0] === 'H' && isNumeric(el.tagName.slice(1))) { + let heading = el + let sectionLevel = parseInt(heading.tagName.slice(1)) + if (currentSection) { + (Array.from(currentSection.children)) + .filter(child => !/^H\d/.test(child.tagName)) + .filter(child => !/PARAM/.test(child.tagName)) + .filter(child => !/STYLE/.test(child.tagName)) + .filter(child => !/^VE--/.test(child.tagName)) + .forEach((child, idx) => { + let segId = `${currentSection.getAttribute('data-id') || 0}.${idx+1}` + child.setAttribute('data-id', segId) + child.id = segId + child.classList.add('segment') + }) + } + + currentSection = document.createElement('section') + currentSection.classList.add(`section${sectionLevel}`) + Array.from(heading.classList).forEach(c => currentSection.classList.add(c)) + heading.className = '' + if (heading.id) { + currentSection.id = heading.id + heading.removeAttribute('id') + } + + currentSection.innerHTML += heading.outerHTML + + let headings = [] + for (let lvl = 1; lvl < sectionLevel; lvl++) { + headings = [...headings, ...Array.from(main.querySelectorAll(`H${lvl}`)).filter(h => h.parentElement.tagName === 'SECTION')] + } + + let parent = (sectionLevel === 1 || headings.length === 0) + ? main + : headings.pop()?.parentElement + parent?.appendChild(currentSection) + currentSection.setAttribute('data-id', computeDataId(currentSection)) + + } else { + if (el.tagName !== 'PARAM') { + let segId = `${currentSection.getAttribute('data-id') || 0}.${currentSection.children.length}` + el.setAttribute('data-id', segId) + el.id = segId + el.classList.add('segment') + } + if (el !== sectionParam) { + currentSection.innerHTML += el.outerHTML + } + } + }) + + Array.from(main.querySelectorAll('a')) + .filter(anchorElem => anchorElem.href.indexOf('mailto:') < 0) + .forEach(anchorElem => { + let link + try { + link = new URL(anchorElem.href) + } catch (e) { + console.log(e) + console.log(anchorElem.href) + return + } + let path = link.pathname.split('/').filter(p => p) + if (path.length === 0) return + let qid = /^Q\d+$/.test(path[path.length-1]) ? path[path.length-1] : null + let isEntityPath = path.find(pe => pe[0] === '~') + if (qid || isEntityPath) { + let mdpEntityInfobox = document.createElement('ve-entity-infobox') + mdpEntityInfobox.innerHTML = anchorElem.innerHTML + if (qid) mdpEntityInfobox.setAttribute('qid', qid) + else { + let pathIdx = (window.config?.baseurl && link.pathname.indexOf(window.config?.baseurl) === 0) ? 1 : 0 + mdpEntityInfobox.setAttribute('file', path.slice(pathIdx).map(pe => pe.replace(/~/,'')).filter(pe => pe).join('/')) + } + anchorElem.replaceWith(mdpEntityInfobox) + } + }) + + configCustomClasses(main) + + let header, footer + let article = document.createElement('article') + + if (isJunctureV1(rootEl)) { + article.classList.add('j1') + let veConfig = main.querySelector('param[ve-config]') + header = document.createElement('ve-header') + header.className = 'sticky' + Array.from(veConfig?.attributes || []).forEach(attr => { + if (attr.name === 'banner') header.setAttribute('background', attr.value) + if (attr.name === 'title') header.setAttribute('title', attr.value) + if (attr.name === 'subtitle' || attr.name === 'author') header.setAttribute('subtitle', attr.value) + }) + article.appendChild(header) + veConfig?.remove() + } else { + header = main.querySelector('ve-header') + if (header) { + let toRemove = header + while (toRemove.parentElement.tagName !== 'MAIN') toRemove = toRemove.parentElement + article.appendChild(header) + toRemove.remove() + } + } + + article.appendChild(main) + + footer = main.querySelector('ve-footer') + if (footer) { + // let toRemove = footer + // while (toRemove.parentElement.tagName !== 'MAIN') toRemove = toRemove.parentElement + article.appendChild(footer) + // toRemove.remove() + } + + return article +} + +function configCustomClasses(rootEl) { + let cardCtr = 0 + + rootEl.querySelectorAll('section').forEach(section => { + + if (section.classList.contains('cards') && !section.classList.contains('wrapper')) { + section.classList.remove('cards') + let wrapper = document.createElement('section') + wrapper.className = 'cards wrapper' + Array.from(section.children).slice(1).forEach(card => { + wrapper.appendChild(card) + card.classList.add('card') + let heading = card.querySelector('h1, h2, h3, h4, h5, h6') + if (heading) heading.remove() + let img = card.querySelector('p > img') + if (img) img.parentElement?.replaceWith(img) + let link = card.querySelector('p > a') + if (link) link.parentElement?.replaceWith(link) + card.querySelectorAll('p').forEach(p => { + ++cardCtr + let readMoreWrapper = document.createElement('div') + readMoreWrapper.className = 'read-more' + let input = document.createElement('input') + input.setAttribute('type', 'checkbox') + input.id = `read-more-${cardCtr}` + readMoreWrapper.appendChild(input) + let para = document.createElement('p') + para.innerHTML = p.innerHTML + readMoreWrapper.appendChild(para) + let label = document.createElement('label') + label.setAttribute('for', `read-more-${cardCtr}`) + label.setAttribute('role', 'button') + label.innerHTML = 'More' + readMoreWrapper.appendChild(label) + p.replaceWith(readMoreWrapper) + }) + }) + section.appendChild(wrapper) + } + + if (section.classList.contains('tabs')) { + let tabGroup = document.createElement('sl-tab-group'); + Array.from(section.classList).forEach(cls => tabGroup.classList.add(cls)) + Array.from(section.attributes).forEach(attr => tabGroup.setAttribute(attr.name, attr.value)) + Array.from(section.querySelectorAll(':scope > section')) + .forEach((tabSection, idx) => { + let tab = document.createElement('sl-tab') + tab.setAttribute('slot', 'nav') + tab.setAttribute('panel', `tab${idx+1}`) + tab.innerHTML = tabSection.querySelector('h1, h2, h3, h4, h5, h6')?.innerHTML || '' + tabGroup.appendChild(tab) + }) + Array.from(section.querySelectorAll(':scope > section')) + .forEach((tabSection, idx) => { + let tabPanel = document.createElement('sl-tab-panel') + tabPanel.setAttribute('name', `tab${idx+1}`) + let tabContent = Array.from(tabSection.children).slice(1).map(el => el.outerHTML).join(' ') + tabPanel.innerHTML = tabContent + tabGroup.appendChild(tabPanel) + }) + section.replaceWith(tabGroup) + } + + if ((section.classList.contains('columns') || section.classList.contains('mcol')) && !section.classList.contains('wrapper')) { + let wrapper = document.createElement('section') + wrapper.className = 'columns wrapper' + section.classList.remove('columns') + section.classList.remove('mcol') + Array.from(section.children) + .filter(child => child.tagName === 'SECTION') + .forEach((col, idz) => { + wrapper.appendChild(col) + col.classList.add(`col-${idz+1}`) + }) + section.appendChild(wrapper) + } + }) +} + +function restructureForJ1(article) { + + function serializeProps(props) { + return Object.entries(props).map(([key, value]) => `${key}="${value}"`).join(' ').replace(/“/g, '"').replace(/”/g, '"') + } + + Array.from(article.querySelectorAll('[data-id]')).forEach(seg => { + if (seg.tagName === 'SECTION') return + + if (!seg.innerHTML.trim()) { // remove empty segments + seg.remove() + return + } + + let id = seg.getAttribute('data-id') || '' + let wrapper = document.createElement('div') + wrapper.setAttribute('data-id', id) + wrapper.id = id + wrapper.className = seg.className + seg.removeAttribute('id') + seg.removeAttribute('data-id') + seg.className = '' + wrapper.appendChild(seg.cloneNode(true)) + let viewersDiv = document.createElement('div') + + viewersDiv.setAttribute('data-id', id) + viewersDiv.className = 'viewers' + + let params = [] + let sib = seg.nextSibling + while (sib && sib.tagName === 'PARAM') { + params.push(sib) + sib = sib.nextSibling + } + params.forEach(p => viewersDiv.appendChild(p)) + wrapper.appendChild(viewersDiv) + + seg.replaceWith(wrapper) + }) + + Array.from(article.querySelectorAll('[data-id]')).forEach(seg => { + if (seg.tagName === 'SECTION') return + let id = seg.getAttribute('data-id') || '' + let para = seg.querySelector('p, ol, ul') + let viewersDiv = seg.querySelector('.viewers') + if (!viewersDiv) return + + const params = Array.from(viewersDiv.querySelectorAll(':scope > param')) + .map((param, idx) => ({ ...Object.fromEntries(Array.from(param.attributes).map(a => [a.name, a.value])), ...{idx} })) + let idx = params.length + let parent = viewersDiv.parentElement + while (parent && parent.tagName !== 'ARTICLE') { + Array.from(parent.querySelectorAll(':scope > param')).forEach(param => { + params.push({...Object.fromEntries(Array.from(param.attributes).map(a => [a.name, a.value])), ...{idx} }) + idx++ + }) + parent = parent.parentElement + } + + const veTags = {} + params.forEach(p => { + let tag = Object.keys(p).find(k => k.indexOf('ve-') === 0 && !p[k]) + if (!tag) { + tag = 've-entity' + p[tag] = '' + } else if (tag === 've-d3plus-ring-network') { + tag = 've-visjs' + } + if (!veTags[tag]) veTags[tag] = [] + veTags[tag].push(p) + }) + + let entities = [] + Object.values(veTags['ve-entity'] || []).forEach(veEntity => { + let qid = veEntity.eid || veEntity.qid + let aliases = veEntity.aliases?.split('|').filter(a => a) || [] + let file = veEntity.file ||veEntity.article + if (aliases.length || file) { + if (!window.customEntityData[qid]) window.customEntityData[qid] = {aliases: aliases, file: file} + } + entities.push(qid) + }) + delete veTags['ve-entity'] + + para?.setAttribute('data-entities', entities.join(' ')) + + function propsList(tagProps) { + let ul = document.createElement('ul') + tagProps.forEach(tp => { + let li = document.createElement('li') + li.innerText = serializeProps(tp) + ul.appendChild(li) + }) + return ul + } + + function setElProps(el, props, nameMap) { + Object.entries(props) + .filter(([key, value]) => nameMap[key] !== undefined) + .forEach(([key, value]) => { + el.setAttribute(nameMap[key] || key, value === 'false' ? '' : value === 'true' ? null : value) + }) + } + + function makeViewerEl(tagName, slotName, tagProps) { + let viewerEl = document.createElement(tagName) + viewerEl.setAttribute('slot', slotName) + if (slotName === 've-compare') { + setElProps(viewerEl, tagProps[0], {caption:''}) + viewerEl.appendChild(propsList(tagProps)) + } else if (slotName === 've-iframe') { + setElProps(viewerEl, tagProps[0], {allow:'', allowfullscreen:'', allowtransparency:'', caption:'', frameborder:'', loading:'', name:'', src:''}) + } else if (slotName === 've-image' || slotName === 've-gallery') { + if (tagProps.length === 1) { + setElProps(viewerEl, tagProps[0], {attribution:'', caption:'', data:'', 'data-id':'', description:'', 'fit':'', label:'', license:'', manifest:'', refresh:'', region:'', rotate:'', rotation:'', seq:'', src:'', title:'', url:'', 'zoom-on-scroll':''}) + } else { + setElProps(viewerEl, tagProps[0], {'zoom-on-scroll':''}) + viewerEl.appendChild(propsList(tagProps)) + } + } else if (slotName === 've-knightlab-timeline') { + setElProps(viewerEl, tagProps[0], {caption:'', 'hash-bookmark':'', 'initial-zoom':'', source:'', 'timenav-position':''}) + } else if (slotName === 've-map') { + setElProps(viewerEl, tagProps[0], {basemap:'basemaps', caption:'', center:'', data:'', 'data-id':'', entities:'', 'gesture-handling':'', 'gh-dir':'', marker:'', overlay:'', 'prefer-geojson':'', 'scroll-wheel-zoom':'', title:'', zoom:'', 'zoom-on-click':''}) + viewerEl.appendChild(propsList(tagProps.slice(1))) + } else if (slotName === 've-plant-specimen') { + setElProps(viewerEl, tagProps[0], {caption:'', eid:'', jpid:'', max:'', qid:'', 'taxon-name':'', wdid:''}) + } else if (slotName === 've-video') { + setElProps(viewerEl, tagProps[0], {alt:'', autoplay:'', caption:'', 'data-id':'', end:'', fit:'', id:'', muted:'', 'no-caption':'', poster:'', src:'', start:'', sync:'', vid:''}) + } else if (slotName === 've-visjs') { + setElProps(viewerEl, tagProps[0], {caption:'', edges:'', hierarchical:'', nodes:'', title:'caption', url:''}) + } else if (slotName === 'data') { + viewerEl.appendChild(propsList(tagProps)) + } else { + console.log(`makeViewer: slotName ${slotName} not recognized, props=${Object.keys(tagProps[0] || {})}`) + } + return viewerEl + } + + let j1Viewers = document.createElement('ve-j1-viewers-slots') + j1Viewers.dataset.id = id + viewersDiv.appendChild(j1Viewers) + j1Viewers.setAttribute('viewers', [ + ...Object.keys(veTags).filter(tag => tag !== 've-map-marker' && tag !== 've-map-layer'), + ...(mode === 'dev' ? ['data'] : []) + ].join(' ')) + + Object.entries(veTags).forEach(([tag, tagProps]) => { + if (tag === 've-map-marker' || tag === 've-map-layer') return + tagProps[0].entities = entities.join(' ') + tagProps[0]['data-id'] = j1Viewers.dataset.id + if (tag === 've-map') { + j1Viewers.appendChild(makeViewerEl('ve-map', tag, + [...tagProps, + ...Object.values(veTags['ve-map-marker'] || {}), ...Object.values(veTags['ve-map-layer'] || {}) + ].sort((a,b) => a.idx - b.idx) + )) + } else { + j1Viewers.appendChild(makeViewerEl(tag, tag, tagProps)) + } + }) + j1Viewers.appendChild(makeViewerEl('div', 'data', params)) + + }) + + Array.from(article.querySelectorAll('.segment')).forEach(seg => { + let viewers = seg.children[1] + let parent = seg.parentElement + while (parent && parent.tagName !== 'ARTICLE') { + parent.querySelectorAll(':scope > param').forEach(param => viewers.appendChild(param.cloneNode(true))) + parent = parent.parentElement + } + }) + + let main = article.querySelector('main') + let mainWrapper = document.createElement('main') + mainWrapper.className = 'page-content markdown-body' + let content = document.createElement('div') + content.className = 'content' + content.innerHTML = main.innerHTML + let viewers = document.createElement('div') + viewers.className = 'viewers' + mainWrapper.appendChild(content) + mainWrapper.appendChild(viewers) + main.replaceWith(mainWrapper) + + return article +} + +function setStickyOffsets(root) { + function topIsVisible(el) { + let bcr = el.getBoundingClientRect() + return el.tagName === 'VE-HEADER' || el.tagName === 'VE-BREADCRUMBS' || (bcr.top >= 0 && bcr.top <= window.innerHeight) + } + + let stickyElems = Array.from(root.querySelectorAll('.sticky')) + .filter(stickyEl => topIsVisible(stickyEl)) + .sort((a,b) => { + let aTop = a.getBoundingClientRect().top + let bTop = b.getBoundingClientRect().top + return aTop < bTop ? -1 : 1 + }) + + if (stickyElems.length > 1) { + stickyElems[0].style.zIndex = `${stickyElems.length}` + for (let i = 1; i < stickyElems.length; i++) { + let bcr = stickyElems[i].getBoundingClientRect() + let left = bcr.x + let right = bcr.x + bcr.width + for (let j = i-1; j >= 0; --j) { + let priorSticky = stickyElems[j] + let bcrPrior = priorSticky.getBoundingClientRect() + let leftPrior = bcrPrior.x + let rightPrior = bcrPrior.x + bcrPrior.width + if ((leftPrior <= right) && (rightPrior >= left)) { + let priorTop = parseInt(priorSticky.style.top.replace(/px/,'')) || 0 + if (stickyElems[i].style) { + stickyElems[i].style.top = `${Math.floor(priorTop + bcrPrior.height)}px` + } + break + } + } + } + } +} + +let priorActiveParagraph +let currentActiveParagraph + +function observeVisible(rootEl, setActiveParagraph, offset=0) { + setActiveParagraph = setActiveParagraph || false + let topMargin = offset + Array.from(rootEl.querySelectorAll('VE-HEADER')) + .map(stickyEl => (parseInt(stickyEl.style.top.replace(/px/,'')) || 0) + stickyEl.getBoundingClientRect().height)?.[0] || 0 + + isJunctureV1 = true + + const visible = {} + const observer = new IntersectionObserver((entries, observer) => { + + for (const entry of entries) { + let para = entry.target + let paraId = para.id || para.parentElement?.id || '' + let intersectionRatio = entry.intersectionRatio + if (intersectionRatio > 0) visible[paraId] = {para, intersectionRatio} + else delete visible[paraId] + } + + let sortedVisible = Object.values(visible) + .sort((a,b) => b.intersectionRatio - a.intersectionRatio || a.para.getBoundingClientRect().top - b.para.getBoundingClientRect().top) + + if (setActiveParagraph) { + currentActiveParagraph = sortedVisible[0]?.para + } else { + let found = sortedVisible.find(e => e.para.classList.contains('active')) + if (found) currentActiveParagraph = found.para + } + + if (currentActiveParagraph !== priorActiveParagraph) { + + let priorViewers, currentViewers + if (isJunctureV1) { + priorViewers = priorActiveParagraph?.nextElementSibling + currentViewers = currentActiveParagraph?.nextElementSibling + if (priorViewers) priorViewers.classList.remove('active') + } + + priorActiveParagraph = currentActiveParagraph + if (setActiveParagraph) { + rootEl.querySelectorAll('p.active, ol.active, ul.active').forEach(p => p.classList.remove('active')) + currentActiveParagraph?.classList.add('active') + if (currentViewers) currentViewers.classList.add('active') + } + + setStickyOffsets(rootEl) + } + + }, { root: null, threshold: [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0], rootMargin: `${topMargin ? -topMargin : 0}px 0px 0px 0px`}) + + // target the elements to be observed + rootEl.querySelectorAll('p, .segment > ol, .segment > ul').forEach((paragraph) => observer.observe(paragraph)) +} + +async function getMarkdown(ghSource) { + let [owner, repo, branch, ...path] = ghSource.split('/').filter(pe => pe) + path = path.join('/') + let extension = ghSource.slice(-3) + // console.log(`getMarkdown: ghSource=${ghSource} owner=${owner} repo=${repo} branch=${branch} path=${path} extension=${extension}`) + if (extension === '.md') { + let resp = await getGhFile(owner, repo, branch, path) + return resp.content + } else { + return await Promise.all([ + getGhFile(owner, repo, branch, `${path}.md`), + getGhFile(owner, repo, branch, `${path}/README.md`), + getGhFile(owner, repo, branch, `${path}/index.md`) + ]).then(resp => { + let found = resp.find(r => r?.status === 200) + return found?.content || '' + }) + } +} + +function setMeta() { + let meta + let header + Array.from(document.getElementsByTagName('*')).forEach(el => { + if (!/^\w+-\w+/.test(el.tagName)) return + if (el.tagName.split('-')[1] === 'META') meta = el + else if (el.tagName.split('-')[1] === 'HEADER') header = el + }) + if (!meta) meta = document.querySelector('param[ve-config]') + + let firstHeading = document.querySelector('h1, h2, h3')?.innerHTML.trim() + let firstParagraph = Array.from(document.querySelectorAll('p')) + .find(p => { + let ptext = p.childNodes.item(0).nodeValue?.trim() + return p.childNodes[0].tagName !== 'CODE' && ptext?.length && !/^\.\w+-\w+/.test(ptext) + })?.innerHTML.trim() + + let jldEl = document.querySelector('script[type="application/ld+json"]') + let seo = jldEl ? JSON.parse(jldEl.innerText) : {'@context':'https://schema.org', '@type':'WebSite', description:'', headline:'', name:'', url:''} + seo.url = location.href + + let title = meta?.getAttribute('title') + ? meta.getAttribute('title') + : window.config?.title + ? window.config.title + : header?.getAttribute('label') + ? header.getAttribute('label') + : firstHeading || '' + + let description = meta?.getAttribute('description') + ? meta.getAttribute('description') + : window.config?.description + ? window.config.description + : firstParagraph || '' + + let robots = meta?.getAttribute('robots') + ? meta?.getAttribute('robots') + : window.config?.robots + ? window.config.robots + : '' + + if (title) { + document.title = title + seo.name = title + seo.headline = title + document.querySelector('meta[name="og:title"]')?.setAttribute('content', title) + document.querySelector('meta[property="og:site_name"]')?.setAttribute('content', title) + document.querySelector('meta[property="twitter:title"]')?.setAttribute('content', title) + } + if (description) { + document.querySelector('meta[name="description"]')?.setAttribute('content', description) + document.querySelector('meta[property="og:description"]')?.setAttribute('content', description) + seo.description = description + } + if (robots) { + let robotsMeta = document.createElement('meta') + robotsMeta.setAttribute('name', 'robots') + robotsMeta.setAttribute('content', robots) + document.head.appendChild(robotsMeta) + } + + // if (meta && meta.getAttribute('ve-config') === null) meta.remove() + if (jldEl) jldEl.innerText = JSON.stringify(seo) + + return {meta: {title, description, robots, seo}} +} + +function isJunctureV1(contentEl) { + return contentEl.querySelector('param[ve-config]') ? true : false +} + +// set the configuration +function setConfig() { + window.config = { + ...yaml.parse(window.options || ''), + ...(window.jekyll || {}), + ...(window.config || {}), + ...{ + baseurl: window.jekyll?.site.baseurl || location.hostname.indexOf('github.io') > 0 ? `/${location.pathname.split('/')[1]}/` : '/', + source: { + owner: window.jekyll?.site.github.owner_name, + repository: window.jekyll?.site.github.repository_name, + branch: window.jekyll?.site.github.source.branch, + dir: window.jekyll?.page.dir, + path: window.jekyll?.page.path, + name: window.jekyll?.page.name + } + }, + ...setMeta() + } + let contentEl = document.createElement('main') + contentEl.innerHTML = window.config.content || document.body.innerHTML + window.config.isJunctureV1 = isJunctureV1(contentEl) + console.log(window.config) +} + +function readMoreSetup() { + const ps = document.querySelectorAll('.read-more p') + const observer = new ResizeObserver(entries => { + for (let entry of entries) { + entry.target.classList[entry.target.scrollHeight > (entry.contentRect.height + 10) ? 'add' : 'remove']('truncated') + } + }) + ps.forEach(p => observer.observe(p)) +} + +function setViewersPosition() { + let header = document.querySelector('ve-header') + let viewers = document.querySelector('.viewers') + let top = header.getBoundingClientRect().top + let height = header.getBoundingClientRect().height + let offset = top + height + if (viewers) { + viewers.style.top = `${offset}px` + viewers.style.height = `calc(100dvh - ${offset+2}px)` + } +} + +function elFromHtml(html) { + return new DOMParser().parseFromString(html, 'text/html').querySelector('body') +} + +async function getGhFile(acct, repo, branch, path) { + // console.log(`getFile: acct=${acct} repo=${repo} branch=${branch} path=${path}`) + let url = `https://api.github.com/repos/${acct}/${repo}/contents/${path}?ref=${branch}` + let resp = await fetch(url, {cache: 'no-cache'}) + if (resp.ok) { + let payload = await resp.json() + let content = decodeURIComponent(escape(atob(payload.content))) + return {status: resp.status, content} + } else if (resp.status === 403 || resp.status === 401) { // access problem, possibly api rate limit exceeded + url = `https://raw.githubusercontent.com/${acct}/${repo}/${branch}/${path}` + resp = await fetch(url) + if (resp.ok) { + let content = await resp.text() + return {status: resp.status, content} + } else { + return {status: resp.status, content: null} + } + } else { + return {status: resp.status, content: null} + } +} + +function markdownToHtml(markdown) { + return marked.use(window.markedFootnote()).parse(markdown) +} + +function structureContent(html) { + let contentEl = document.createElement('main') + contentEl.innerHTML = html + convertTags(contentEl) + + let article = restructure(contentEl) + if (isJunctureV1(contentEl)) article = restructureForJ1(article) + return article +} + +function articleFromHtml(html) { + let contentEl = document.createElement('main') + contentEl.innerHTML = html + convertTags(contentEl) + let article = restructure(contentEl) + if (isJunctureV1(contentEl)) article = restructureForJ1(article) + return article +} + +// mount the content +function mount(mountPoint, html) { + html = html || window.config.content || document.body.innerHTML + mountPoint = mountPoint || document.querySelector('body > article, body > main, body > section') + if (!mountPoint) { + mountPoint = document.createElement('article') + document.body.innerHTML = mountPoint.outerHTML + } + + let article = articleFromHtml(html) + + mountPoint.replaceWith(article) + if (window.config.isJunctureV1 && !isMobile) { + document.addEventListener('scroll', () => setViewersPosition()) + setTimeout(() => setViewersPosition(), 100) + } + + observeVisible(article, article.querySelector('ve-video[sync]') ? false : true) + readMoreSetup() + return article +} + +export { addLink, addScript, articleFromHtml, elFromHtml, getGhFile, getMarkdown, markdownToHtml, mount, observeVisible, setConfig, structureContent } \ No newline at end of file diff --git a/ghp.js b/ghp.js index a3c4f94..b449542 100644 --- a/ghp.js +++ b/ghp.js @@ -1,1114 +1,19 @@ -import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js"; -import 'https://cdn.jsdelivr.net/npm/marked-footnote/dist/index.umd.min.js' -import * as yaml from 'https://cdn.jsdelivr.net/npm/yaml@2.3.4/browser/index.min.js' +import { addLink, addScript, getMarkdown, markdownToHtml, mount, setConfig } from './ghp-lib.js' window.customEntityData = {} - +console.log(location) const mode = location.hostname === 'localhost' ? 'local' : import.meta.url.indexOf('https://cdn.jsdelivr.net/npm/juncture-digital') === 0 ? 'prod' : 'dev' - const base = mode === 'prod' ? import.meta.url.replace(/\/js\/ghp\.js$/, '') : import.meta.url.replace(/\/ghp\.js$/, '/wc/dist') console.log(`mode=${mode} base=${base}`) -const isMobile = ('ontouchstart' in document.documentElement && /mobi/i.test(navigator.userAgent) ) - -function addLink(attrs) { - console.log('addLink', attrs) - let stylesheet = document.createElement('link') - Object.entries(attrs).map(([key, value]) => stylesheet.setAttribute(key, value)) - document.head.appendChild(stylesheet) -} - -function addScript(attrs) { - console.log('addScript', attrs) - let script = document.createElement('script') - Object.entries(attrs).map(([key, value]) => script.setAttribute(key, value)) - document.head.appendChild(script) -} - -function docReady(fn) { - if (document.readyState === 'complete' || document.readyState === 'interactive') setTimeout(fn, 1) - else document.addEventListener('DOMContentLoaded', fn) -} - -const classes = new Set('left right full sticky'.split(' ')) -const components = { - 've-animated-image': { - booleans: 'autoplay', - positional: 'src caption' - }, - 've-audio': { - booleans: 'autoplay muted no-caption sync', - positional: 'src caption' - }, - 've-breadcrumbs': {}, - 've-compare': { - positional: 'src' - }, - 've-entities': { - booleans: 'cards' - }, - 've-footer': { - }, - 've-gallery': { - booleans: 'caption' - }, - 've-header': { - booleans: 'breadcrumbs no-manifest-popover pdf-download-enabled', - positional: 'title background subtitle options position' - }, - 've-iframe': { - booleans: 'allow-full-screen allow-transparency full left right sticky', - positional: 'src caption' - }, - 've-image': { - booleans: 'no-caption grid static repo-is-writable zoom-on-scroll', - positional: 'src caption' - }, - 've-knightlab-timeline': { - booleans: 'has-bookmark' - }, - 've-map': { - booleans: 'cards full left marker prefer-geojson popup-on-hover zoom-on-scroll zoom-on-click', - positional: 'center caption' - }, - 've-media': { - // booleans: 'no-caption static repo-is-writable zoom-on-scroll', - positional: 'src caption' - }, - 've-menu': { - booleans: 'pdf-download-enabled' - }, - 've-mermaid': {}, - 've-meta': {}, - 've-plant-specimen': { - booleans: 'full left right sticky', - positional: 'qid max' - }, - 've-snippet': {}, - 've-video': { - booleans: 'autoplay muted no-caption sync', - positional: 'src caption' - }, - 've-visjs': { - booleans: 'hierarchical' - } -} -let tagMap = {} -Object.entries(components).forEach(([tag, attrs]) => { - let tagObj = { - booleans : new Set((attrs.booleans || '').split(' ').filter(s => s)), - positional: (attrs.positional || '').split(' ').filter(s => s) - } - tagMap[tag] = tagObj - tagMap[tag.slice(3)] = tagObj -}) - -function parseHeadline(s) { - let tokens = [] - s = s.replace(/”/g,'"').replace(/”/g,'"').replace(/’/g,"'") - s?.match(/[^\s"]+|"([^"]*)"/gmi)?.filter(t => t).forEach(token => { - if (tokens.length > 0 && tokens[tokens.length-1].indexOf('=') === tokens[tokens.length-1].length-1) tokens[tokens.length-1] = `${tokens[tokens.length-1]}${token}` - else tokens.push(token) - }) - let parsed = {} - let tokenIdx = 0 - while (tokenIdx < tokens.length) { - let token = tokens[tokenIdx].replace(//g, '_').replace(/<\/em>/g, '_') - if (token.indexOf('=') > 0 && /^[\w-:]+=/.test(token)) { - let idx = token.indexOf('=') - let key = token.slice(0, idx) - let value = token.slice(idx+1) - value = value[0] === '"' && value[value.length-1] === '"' ? value.slice(1, -1) : value - if (key[0] === ':') { // style - key = camelToKebab(key.slice(1)) - if (!parsed.style) parsed.style = {} - parsed.style[key] = value - } else { // kwargs - if (!parsed.kwargs) parsed.kwargs = {} - if (parsed.kwargs[key]) parsed.kwargs[key] += ` ${value}` - else parsed.kwargs[key] = value - } - } - else if (token[0] === '.' || classes.has(token)) { - let className = token.replace(/^\./,'') - if (parsed.class) parsed.class += ` ${className}` - else parsed.class = className - } - else if (token[0] === '"') { - if (!parsed.args) parsed.args = [] - parsed.args.push(token.slice(1,-1)) - } - else if (/#\w+/.test(token)) parsed['id'] = token.slice(1) - else if (/^Q\d+$/.test(token) && !parsed.tag) { // entity identifier - if (!parsed.entities) parsed.entities = [] - parsed.entities.push(token) - } - else if (tokenIdx === 0 && !parsed.tag && tagMap[token.replace(/^\./,'')]) { - let tag = token.replace(/^\./,'') - parsed.tag = tag.indexOf('ve-') === 0 ? tag : `ve-${tag}` - } else if (token === 'script' || token === 'link') parsed.tag = token - else { - if (parsed.tag === 'script' && !parsed.src) parsed.src = token - else if (parsed.tag === 'link' && !parsed.href) parsed.href= token - else { - let tagObj = tagMap[parsed.tag] - if (tagObj?.booleans.has(token)) { - if (!parsed.booleans) parsed.booleans = [] - parsed.booleans.push(token) - } else { - if (!parsed.args) parsed.args = [] - parsed.args.push(token) - } - } - } - tokenIdx++ - } - - if (parsed.tag && parsed.args) { - let tagObj = tagMap[parsed.tag] - let listArgs = [] - parsed.args.forEach((value, idx) => { - if (idx >= tagObj.positional?.length) { - listArgs.push(value) - } else { - let key = tagObj.positional[idx] - value = value[0] === '"' && value[value.length-1] === '"' ? value.slice(1, -1) : value - if (!parsed.kwargs) parsed.kwargs = {} - if (parsed.kwargs[key]) parsed.kwargs[key] += ` ${value}` - else parsed.kwargs[key] = value - } - }) - if (listArgs.length) parsed.args = listArgs - else delete parsed.args - } - return parsed -} - -function parseCodeEl(codeEl) { - let codeElems = codeEl.textContent?.replace(/\s+\|\s+/g,'\n') - .split('\n') - .map(l => l.trim()) - // .map(l => l.replace(//g, '_').replace(/<\/em>/g, '_')) - .filter(x => x) || [] - let parsed = parseHeadline(codeElems?.[0]) || {} - if (parsed.tag === 've-mermaid') { - parsed.raw = codeEl.textContent.split('\n').slice(1).join('\n') - } else if (parsed.tag === 've-media') { - parsed.tag = 've-image' //TODO: implement ve-media conversion - } else if (parsed.tag === 've-vis-network') { - parsed.tag = 've-visjs' - } else if (codeElems.length > 1) { - parsed.args = parsed.args ? [...parsed.args, ...codeElems.slice(1)] : codeElems.slice(1) - } - return parsed -} - -function makeEl(parsed) { - let el = document.createElement(parsed.tag) - if (parsed.id) el.id = parsed.id - if (parsed.class) parsed.class.split(' ').forEach(c => el.classList.add(c)) - if (parsed.style) el.setAttribute('style', Object.entries(parsed.style).map(([k,v]) => `${k}:${v}`).join(';')) - if (parsed.entities) el.setAttribute('entities', parsed.entities.join(' ')) - if (parsed.kwargs) for (const [k,v] of Object.entries(parsed.kwargs)) el.setAttribute(k, v === true ? '' : v) - if (parsed.booleans) parsed.booleans.forEach(b => el.setAttribute(b, '') ) - if (parsed.args) { - let ul = document.createElement('ul') - el.appendChild(ul) - for (const arg of parsed.args) { - let argEl = new DOMParser().parseFromString(marked.parse(arg.replace(/^\s*-\s*/, '')), 'text/html').body.firstChild - let li = document.createElement('li') - li.innerHTML = argEl.innerHTML.indexOf('wc:') === 0 ? argEl.innerHTML.replace(/([^<]+)<\/em>/g, '_$1_') : argEl.innerHTML - ul.appendChild(li) - } - } - if (parsed.raw) el.textContent = parsed.raw - return el -} - -function deleteAllComments(rootEl) { - var iterator = document.createNodeIterator(rootEl, NodeFilter.SHOW_COMMENT, () => { return NodeFilter.FILTER_ACCEPT}, false); - var curNode - while (curNode = iterator.nextNode()) { curNode.remove() } -} - -function isNumeric(arg) { return !isNaN(arg) } -function camelToKebab(input) { return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()} - -function computeDataId(el) { - let dataId = [] - while (el.parentElement) { - let siblings = Array.from(el.parentElement.children).filter(c => c.tagName === el.tagName) - dataId.push(siblings.indexOf(el) + 1) - el = el.parentElement - } - return dataId.reverse().join('.') -} - -// convert juncture tags to web component elements -function convertTags(rootEl) { - // remove "view as" buttons - Array.from(rootEl.querySelectorAll('a > img')) - .filter(img => img.src.indexOf('ve-button.png') > -1 || img.src.indexOf('wb.svg') > -1) - .forEach(viewAsButton => viewAsButton?.parentElement?.parentElement?.remove()) - - Array.from(rootEl.querySelectorAll('p')) - .filter(p => /^\.ve-\w+\S/.test(p.childNodes.item(0)?.nodeValue?.trim() || '')) - .forEach(p => { - let codeElWrapper = document.createElement('div') - let codeEl = document.createElement('code') - codeElWrapper.appendChild(codeEl) - codeEl.setAttribute('class', 'language-juncture2') - let replacementText = p.innerHTML.trim().slice(1) - .replace(/\n\s*-\s+/g, '\n') - .replace(/[^<]*<\/a>/g, '') - .replace(/^ve-media/, 've-image') - codeEl.textContent = replacementText - p.replaceWith(codeElWrapper) - }) - Array.from(rootEl.querySelectorAll('param')) - .filter(param => Array.from(param.attributes).filter(attr => attr.name.indexOf('ve-') === 0).length) - .filter(param => param.getAttribute('ve-config') === null) - .forEach(param => { - let tag = Array.from(param.attributes).find(attr => attr.name.indexOf('ve-') === 0).name - if (tag) { - let tagObj = tagMap[tag] || {} - let parsed = { tag } - Array.from(param.attributes).forEach(attr => { - if (attr.name !== tag) { - if (tagObj.booleans?.has(attr.name)) { - if (!parsed.booleans) parsed.booleans = [] - parsed.booleans.push(attr.name) - } else { - if (!parsed.kwargs) parsed.kwargs = {} - if (parsed.kwargs[attr.name]) parsed.kwargs[attr.name] += ` ${attr.value}` - else parsed.kwargs[attr.name] = attr.value - } - } - }) - if (!isJunctureV1(rootEl)) param.replaceWith(makeEl(parsed)) - } - }) - rootEl.querySelectorAll('code').forEach(codeEl => { - let parsed = parseCodeEl(codeEl) - // console.log(parsed) - if (parsed.tag) { - if (codeEl.parentElement.tagName === 'PRE') { - codeEl = codeEl.parentElement - codeEl.parentElement.removeAttribute('id') - codeEl.parentElement.removeAttribute('data-id') - codeEl.parentElement.removeAttribute('class') - if (codeEl.parentElement.parentElement) codeEl.parentElement.parentElement.className = 'segment' - if (codeEl.parentElement.tagName === 'DIV' && codeEl.parentElement.children.length === 1) { - codeEl.parentElement.replaceWith(codeEl) - } - } - codeEl.replaceWith(makeEl(parsed)) - } else if (parsed.class || parsed.style || parsed.id || parsed.kwargs) { - let codeWrapper = codeEl.parentElement - let target - let priorEl = codeWrapper.previousElementSibling - if (priorEl?.tagName === 'EM' || priorEl?.tagName === 'STRONG') { - target = document.createElement('span') - target.innerHTML = priorEl.innerHTML - priorEl.replaceWith(target) - } else if (parent?.tagName === 'TD') { - target = parent?.parentElement?.parentElement?.parentElement // table - parent?.parentElement?.remove() // row - } else if (parent?.tagName !== 'UL' && (priorEl?.tagName === 'A' || priorEl?.tagName === 'IMG')) { - target = priorEl - } else { - target = priorEl?.children.length === 1 && priorEl.children[0]?.tagName === 'VE-HEADER' - ? codeWrapper.parentElement - : priorEl - } - if (target) { - if (parsed.id) target.id = parsed.id - if (parsed.class) parsed.class.split(' ').forEach(c => target.classList.add(c)) - if (parsed.style) target.setAttribute('style', Object.entries(parsed.style).map(([k,v]) => `${k}:${v}`).join(';')) - if (parsed.entities) target.setAttribute('data-entities', parsed.entities.join(' ')) - if (parsed.kwargs) for (const [k,v] of Object.entries(parsed.kwargs)) target.setAttribute(k, v === true ? '' : v) - } else { - console.log('no target for', parsed) - } - codeWrapper.remove() - } - }) -} - -// Restructure the content to have hierarchical sections and segments -function restructure(rootEl) { - let styleSheet = rootEl.querySelector('style') - deleteAllComments(rootEl) - - // Move child params to be siblings with parent element - rootEl.querySelectorAll('ul, ol').forEach(list => { - let ref = list - list.querySelectorAll('param').forEach(param => { - ref.parentNode.insertBefore(param, ref.nextSibling) - ref = param - }) - }) - - let main = document.createElement('main') - if (styleSheet) main.appendChild(styleSheet.cloneNode(true)) - - main.className = 'page-content markdown-body' - main.setAttribute('aria-label', 'Content') - main.setAttribute('data-theme', 'light') - if (rootEl.style) main.setAttribute('style', rootEl.style.cssText) - let currentSection = main; - let sectionParam - - // Converts empty headings (changed to paragraphs by markdown converter) to headings with the correct level - Array.from(rootEl?.querySelectorAll('p')) - .filter(p => /^[#*]{1,6}$/.test(p.childNodes.item(0)?.nodeValue?.trim() || '')) - .forEach(p => { - let ptext = p.childNodes.item(0).nodeValue?.trim() - let codeEl = p.querySelector('code') - let heading = document.createElement(`h${ptext?.length}`) - p.replaceWith(heading) - if (codeEl) { - let codeWrapper = document.createElement('p') - codeWrapper.appendChild(codeEl) - heading.parentElement?.insertBefore(codeWrapper, heading.nextSibling) - } - }) - - Array.from(rootEl?.querySelectorAll('p, li')) - .filter(p => /==.+=={.+}/.test(p.textContent?.trim() || '')) - .forEach(el => { - let replHtml = [] - let matches = Array.from(el.innerHTML.matchAll(/==(?[^=]+)=={(?[^}]+)}/g)) - matches.forEach((match, idx) => { - if (idx === 0) replHtml.push(el.innerHTML.slice(0, match.index)) - if (match.groups) { - let {text, attrs} = match.groups - if (/\s*Q\d+\s*/.test(attrs)) { - replHtml.push(`${text}`) - } else if (attrs.indexOf('=') > 0) { - let [key, value] = attrs.split('=') - if (value[0] !== '"') attrs = `${key}="${value}"` - replHtml.push(`${text}`) - } - replHtml.push(el.innerHTML.slice(match.index + match[0].length, matches[idx+1]?.index || el.innerHTML.length)) - } - }) - el.innerHTML = replHtml.join('') - }) - - // For compatibility with Juncture V1 - Array.from(rootEl?.querySelectorAll('param')) - .filter(param => Array.from(param.attributes).filter(attr => attr.name.indexOf('ve-') === 0).length === 0) - .forEach(param => { - let priorEl = param.previousElementSibling - param.classList.forEach(c => priorEl?.classList.add(c)) - let idAttr = Array.from(param.attributes).find(attr => attr.name === 'id') - let styleAttr = Array.from(param.attributes).find(attr => attr.name === 'style') - if (idAttr || styleAttr) { - if (idAttr) priorEl?.setAttribute('id', idAttr.value) - if (styleAttr) priorEl?.setAttribute('style', styleAttr.value) - param.remove() - } - }) - - Array.from(rootEl?.children || []).forEach(el => { - if (el.tagName[0] === 'H' && isNumeric(el.tagName.slice(1))) { - let heading = el - let sectionLevel = parseInt(heading.tagName.slice(1)) - if (currentSection) { - (Array.from(currentSection.children)) - .filter(child => !/^H\d/.test(child.tagName)) - .filter(child => !/PARAM/.test(child.tagName)) - .filter(child => !/STYLE/.test(child.tagName)) - .filter(child => !/^VE--/.test(child.tagName)) - .forEach((child, idx) => { - let segId = `${currentSection.getAttribute('data-id') || 0}.${idx+1}` - child.setAttribute('data-id', segId) - child.id = segId - child.classList.add('segment') - }) - } - - currentSection = document.createElement('section') - currentSection.classList.add(`section${sectionLevel}`) - Array.from(heading.classList).forEach(c => currentSection.classList.add(c)) - heading.className = '' - if (heading.id) { - currentSection.id = heading.id - heading.removeAttribute('id') - } - - currentSection.innerHTML += heading.outerHTML - - let headings = [] - for (let lvl = 1; lvl < sectionLevel; lvl++) { - headings = [...headings, ...Array.from(main.querySelectorAll(`H${lvl}`)).filter(h => h.parentElement.tagName === 'SECTION')] - } - - let parent = (sectionLevel === 1 || headings.length === 0) - ? main - : headings.pop()?.parentElement - parent?.appendChild(currentSection) - currentSection.setAttribute('data-id', computeDataId(currentSection)) - - } else { - if (el.tagName !== 'PARAM') { - let segId = `${currentSection.getAttribute('data-id') || 0}.${currentSection.children.length}` - el.setAttribute('data-id', segId) - el.id = segId - el.classList.add('segment') - } - if (el !== sectionParam) { - currentSection.innerHTML += el.outerHTML - } - } - }) - - Array.from(main.querySelectorAll('a')) - .filter(anchorElem => anchorElem.href.indexOf('mailto:') < 0) - .forEach(anchorElem => { - let link - try { - link = new URL(anchorElem.href) - } catch (e) { - console.log(e) - console.log(anchorElem.href) - return - } - let path = link.pathname.split('/').filter(p => p) - if (path.length === 0) return - let qid = /^Q\d+$/.test(path[path.length-1]) ? path[path.length-1] : null - let isEntityPath = path.find(pe => pe[0] === '~') - if (qid || isEntityPath) { - let mdpEntityInfobox = document.createElement('ve-entity-infobox') - mdpEntityInfobox.innerHTML = anchorElem.innerHTML - if (qid) mdpEntityInfobox.setAttribute('qid', qid) - else { - let pathIdx = (window.config?.baseurl && link.pathname.indexOf(window.config?.baseurl) === 0) ? 1 : 0 - mdpEntityInfobox.setAttribute('file', path.slice(pathIdx).map(pe => pe.replace(/~/,'')).filter(pe => pe).join('/')) - } - anchorElem.replaceWith(mdpEntityInfobox) - } - }) - - configCustomClasses(main) - - let header, footer - let article = document.createElement('article') - - if (isJunctureV1(rootEl)) { - article.classList.add('j1') - let veConfig = main.querySelector('param[ve-config]') - header = document.createElement('ve-header') - header.className = 'sticky' - Array.from(veConfig?.attributes || []).forEach(attr => { - if (attr.name === 'banner') header.setAttribute('background', attr.value) - if (attr.name === 'title') header.setAttribute('title', attr.value) - if (attr.name === 'subtitle' || attr.name === 'author') header.setAttribute('subtitle', attr.value) - }) - article.appendChild(header) - veConfig?.remove() - } else { - header = main.querySelector('ve-header') - if (header) { - let toRemove = header - while (toRemove.parentElement.tagName !== 'MAIN') toRemove = toRemove.parentElement - article.appendChild(header) - toRemove.remove() - } - } - - article.appendChild(main) - - footer = main.querySelector('ve-footer') - if (footer) { - // let toRemove = footer - // while (toRemove.parentElement.tagName !== 'MAIN') toRemove = toRemove.parentElement - article.appendChild(footer) - // toRemove.remove() - } - - return article -} - -function configCustomClasses(rootEl) { - let cardCtr = 0 - - rootEl.querySelectorAll('section').forEach(section => { - - if (section.classList.contains('cards') && !section.classList.contains('wrapper')) { - section.classList.remove('cards') - let wrapper = document.createElement('section') - wrapper.className = 'cards wrapper' - Array.from(section.children).slice(1).forEach(card => { - wrapper.appendChild(card) - card.classList.add('card') - let heading = card.querySelector('h1, h2, h3, h4, h5, h6') - if (heading) heading.remove() - let img = card.querySelector('p > img') - if (img) img.parentElement?.replaceWith(img) - let link = card.querySelector('p > a') - if (link) link.parentElement?.replaceWith(link) - card.querySelectorAll('p').forEach(p => { - ++cardCtr - let readMoreWrapper = document.createElement('div') - readMoreWrapper.className = 'read-more' - let input = document.createElement('input') - input.setAttribute('type', 'checkbox') - input.id = `read-more-${cardCtr}` - readMoreWrapper.appendChild(input) - let para = document.createElement('p') - para.innerHTML = p.innerHTML - readMoreWrapper.appendChild(para) - let label = document.createElement('label') - label.setAttribute('for', `read-more-${cardCtr}`) - label.setAttribute('role', 'button') - label.innerHTML = 'More' - readMoreWrapper.appendChild(label) - p.replaceWith(readMoreWrapper) - }) - }) - section.appendChild(wrapper) - } - - if (section.classList.contains('tabs')) { - let tabGroup = document.createElement('sl-tab-group'); - Array.from(section.classList).forEach(cls => tabGroup.classList.add(cls)) - Array.from(section.attributes).forEach(attr => tabGroup.setAttribute(attr.name, attr.value)) - Array.from(section.querySelectorAll(':scope > section')) - .forEach((tabSection, idx) => { - let tab = document.createElement('sl-tab') - tab.setAttribute('slot', 'nav') - tab.setAttribute('panel', `tab${idx+1}`) - tab.innerHTML = tabSection.querySelector('h1, h2, h3, h4, h5, h6')?.innerHTML || '' - tabGroup.appendChild(tab) - }) - Array.from(section.querySelectorAll(':scope > section')) - .forEach((tabSection, idx) => { - let tabPanel = document.createElement('sl-tab-panel') - tabPanel.setAttribute('name', `tab${idx+1}`) - let tabContent = Array.from(tabSection.children).slice(1).map(el => el.outerHTML).join(' ') - tabPanel.innerHTML = tabContent - tabGroup.appendChild(tabPanel) - }) - section.replaceWith(tabGroup) - } - - if ((section.classList.contains('columns') || section.classList.contains('mcol')) && !section.classList.contains('wrapper')) { - let wrapper = document.createElement('section') - wrapper.className = 'columns wrapper' - section.classList.remove('columns') - section.classList.remove('mcol') - Array.from(section.children) - .filter(child => child.tagName === 'SECTION') - .forEach((col, idz) => { - wrapper.appendChild(col) - col.classList.add(`col-${idz+1}`) - }) - section.appendChild(wrapper) - } - }) -} - -function restructureForJ1(article) { - - function serializeProps(props) { - return Object.entries(props).map(([key, value]) => `${key}="${value}"`).join(' ').replace(/“/g, '"').replace(/”/g, '"') - } - - Array.from(article.querySelectorAll('[data-id]')).forEach(seg => { - if (seg.tagName === 'SECTION') return - - if (!seg.innerHTML.trim()) { // remove empty segments - seg.remove() - return - } - - let id = seg.getAttribute('data-id') || '' - let wrapper = document.createElement('div') - wrapper.setAttribute('data-id', id) - wrapper.id = id - wrapper.className = seg.className - seg.removeAttribute('id') - seg.removeAttribute('data-id') - seg.className = '' - wrapper.appendChild(seg.cloneNode(true)) - let viewersDiv = document.createElement('div') - - viewersDiv.setAttribute('data-id', id) - viewersDiv.className = 'viewers' - - let params = [] - let sib = seg.nextSibling - while (sib && sib.tagName === 'PARAM') { - params.push(sib) - sib = sib.nextSibling - } - params.forEach(p => viewersDiv.appendChild(p)) - wrapper.appendChild(viewersDiv) - - seg.replaceWith(wrapper) - }) - - Array.from(article.querySelectorAll('[data-id]')).forEach(seg => { - if (seg.tagName === 'SECTION') return - let id = seg.getAttribute('data-id') || '' - let para = seg.querySelector('p, ol, ul') - let viewersDiv = seg.querySelector('.viewers') - if (!viewersDiv) return - - const params = Array.from(viewersDiv.querySelectorAll(':scope > param')) - .map((param, idx) => ({ ...Object.fromEntries(Array.from(param.attributes).map(a => [a.name, a.value])), ...{idx} })) - let idx = params.length - let parent = viewersDiv.parentElement - while (parent && parent.tagName !== 'ARTICLE') { - Array.from(parent.querySelectorAll(':scope > param')).forEach(param => { - params.push({...Object.fromEntries(Array.from(param.attributes).map(a => [a.name, a.value])), ...{idx} }) - idx++ - }) - parent = parent.parentElement - } - - const veTags = {} - params.forEach(p => { - let tag = Object.keys(p).find(k => k.indexOf('ve-') === 0 && !p[k]) - if (!tag) { - tag = 've-entity' - p[tag] = '' - } else if (tag === 've-d3plus-ring-network') { - tag = 've-visjs' - } - if (!veTags[tag]) veTags[tag] = [] - veTags[tag].push(p) - }) - - let entities = [] - Object.values(veTags['ve-entity'] || []).forEach(veEntity => { - let qid = veEntity.eid || veEntity.qid - let aliases = veEntity.aliases?.split('|').filter(a => a) || [] - let file = veEntity.file ||veEntity.article - if (aliases.length || file) { - if (!window.customEntityData[qid]) window.customEntityData[qid] = {aliases: aliases, file: file} - } - entities.push(qid) - }) - delete veTags['ve-entity'] - - para?.setAttribute('data-entities', entities.join(' ')) - - function propsList(tagProps) { - let ul = document.createElement('ul') - tagProps.forEach(tp => { - let li = document.createElement('li') - li.innerText = serializeProps(tp) - ul.appendChild(li) - }) - return ul - } - - function setElProps(el, props, nameMap) { - Object.entries(props) - .filter(([key, value]) => nameMap[key] !== undefined) - .forEach(([key, value]) => { - el.setAttribute(nameMap[key] || key, value === 'false' ? '' : value === 'true' ? null : value) - }) - } - - function makeViewerEl(tagName, slotName, tagProps) { - let viewerEl = document.createElement(tagName) - viewerEl.setAttribute('slot', slotName) - if (slotName === 've-compare') { - setElProps(viewerEl, tagProps[0], {caption:''}) - viewerEl.appendChild(propsList(tagProps)) - } else if (slotName === 've-iframe') { - setElProps(viewerEl, tagProps[0], {allow:'', allowfullscreen:'', allowtransparency:'', caption:'', frameborder:'', loading:'', name:'', src:''}) - } else if (slotName === 've-image' || slotName === 've-gallery') { - if (tagProps.length === 1) { - setElProps(viewerEl, tagProps[0], {attribution:'', caption:'', data:'', 'data-id':'', description:'', 'fit':'', label:'', license:'', manifest:'', refresh:'', region:'', rotate:'', rotation:'', seq:'', src:'', title:'', url:'', 'zoom-on-scroll':''}) - } else { - setElProps(viewerEl, tagProps[0], {'zoom-on-scroll':''}) - viewerEl.appendChild(propsList(tagProps)) - } - } else if (slotName === 've-knightlab-timeline') { - setElProps(viewerEl, tagProps[0], {caption:'', 'hash-bookmark':'', 'initial-zoom':'', source:'', 'timenav-position':''}) - } else if (slotName === 've-map') { - setElProps(viewerEl, tagProps[0], {basemap:'basemaps', caption:'', center:'', data:'', 'data-id':'', entities:'', 'gesture-handling':'', 'gh-dir':'', marker:'', overlay:'', 'prefer-geojson':'', 'scroll-wheel-zoom':'', title:'', zoom:'', 'zoom-on-click':''}) - viewerEl.appendChild(propsList(tagProps.slice(1))) - } else if (slotName === 've-plant-specimen') { - setElProps(viewerEl, tagProps[0], {caption:'', eid:'', jpid:'', max:'', qid:'', 'taxon-name':'', wdid:''}) - } else if (slotName === 've-video') { - setElProps(viewerEl, tagProps[0], {alt:'', autoplay:'', caption:'', 'data-id':'', end:'', fit:'', id:'', muted:'', 'no-caption':'', poster:'', src:'', start:'', sync:'', vid:''}) - } else if (slotName === 've-visjs') { - setElProps(viewerEl, tagProps[0], {caption:'', edges:'', hierarchical:'', nodes:'', title:'caption', url:''}) - } else if (slotName === 'data') { - viewerEl.appendChild(propsList(tagProps)) - } else { - console.log(`makeViewer: slotName ${slotName} not recognized, props=${Object.keys(tagProps[0] || {})}`) - } - return viewerEl - } - - let j1Viewers = document.createElement('ve-j1-viewers-slots') - j1Viewers.dataset.id = id - viewersDiv.appendChild(j1Viewers) - j1Viewers.setAttribute('viewers', [ - ...Object.keys(veTags).filter(tag => tag !== 've-map-marker' && tag !== 've-map-layer'), - ...(mode === 'dev' ? ['data'] : []) - ].join(' ')) - - Object.entries(veTags).forEach(([tag, tagProps]) => { - if (tag === 've-map-marker' || tag === 've-map-layer') return - tagProps[0].entities = entities.join(' ') - tagProps[0]['data-id'] = j1Viewers.dataset.id - if (tag === 've-map') { - j1Viewers.appendChild(makeViewerEl('ve-map', tag, - [...tagProps, - ...Object.values(veTags['ve-map-marker'] || {}), ...Object.values(veTags['ve-map-layer'] || {}) - ].sort((a,b) => a.idx - b.idx) - )) - } else { - j1Viewers.appendChild(makeViewerEl(tag, tag, tagProps)) - } - }) - j1Viewers.appendChild(makeViewerEl('div', 'data', params)) - - }) - - Array.from(article.querySelectorAll('.segment')).forEach(seg => { - let viewers = seg.children[1] - let parent = seg.parentElement - while (parent && parent.tagName !== 'ARTICLE') { - parent.querySelectorAll(':scope > param').forEach(param => viewers.appendChild(param.cloneNode(true))) - parent = parent.parentElement - } - }) - - let main = article.querySelector('main') - let mainWrapper = document.createElement('main') - mainWrapper.className = 'page-content markdown-body' - let content = document.createElement('div') - content.className = 'content' - content.innerHTML = main.innerHTML - let viewers = document.createElement('div') - viewers.className = 'viewers' - mainWrapper.appendChild(content) - mainWrapper.appendChild(viewers) - main.replaceWith(mainWrapper) - - return article -} - -function setStickyOffsets(root) { - function topIsVisible(el) { - let bcr = el.getBoundingClientRect() - return el.tagName === 'VE-HEADER' || el.tagName === 'VE-BREADCRUMBS' || (bcr.top >= 0 && bcr.top <= window.innerHeight) - } - - let stickyElems = Array.from(root.querySelectorAll('.sticky')) - .filter(stickyEl => topIsVisible(stickyEl)) - .sort((a,b) => { - let aTop = a.getBoundingClientRect().top - let bTop = b.getBoundingClientRect().top - return aTop < bTop ? -1 : 1 - }) - - if (stickyElems.length > 1) { - stickyElems[0].style.zIndex = `${stickyElems.length}` - for (let i = 1; i < stickyElems.length; i++) { - let bcr = stickyElems[i].getBoundingClientRect() - let left = bcr.x - let right = bcr.x + bcr.width - for (let j = i-1; j >= 0; --j) { - let priorSticky = stickyElems[j] - let bcrPrior = priorSticky.getBoundingClientRect() - let leftPrior = bcrPrior.x - let rightPrior = bcrPrior.x + bcrPrior.width - if ((leftPrior <= right) && (rightPrior >= left)) { - let priorTop = parseInt(priorSticky.style.top.replace(/px/,'')) || 0 - if (stickyElems[i].style) { - stickyElems[i].style.top = `${Math.floor(priorTop + bcrPrior.height)}px` - } - break - } - } - } - } -} - -let priorActiveParagraph -let currentActiveParagraph - -function observeVisible(rootEl, setActiveParagraph, offset=0) { - setActiveParagraph = setActiveParagraph || false - let topMargin = offset + Array.from(rootEl.querySelectorAll('VE-HEADER')) - .map(stickyEl => (parseInt(stickyEl.style.top.replace(/px/,'')) || 0) + stickyEl.getBoundingClientRect().height)?.[0] || 0 - - isJunctureV1 = true - - const visible = {} - const observer = new IntersectionObserver((entries, observer) => { - - for (const entry of entries) { - let para = entry.target - let paraId = para.id || para.parentElement?.id || '' - let intersectionRatio = entry.intersectionRatio - if (intersectionRatio > 0) visible[paraId] = {para, intersectionRatio} - else delete visible[paraId] - } - - let sortedVisible = Object.values(visible) - .sort((a,b) => b.intersectionRatio - a.intersectionRatio || a.para.getBoundingClientRect().top - b.para.getBoundingClientRect().top) - - if (setActiveParagraph) { - currentActiveParagraph = sortedVisible[0]?.para - } else { - let found = sortedVisible.find(e => e.para.classList.contains('active')) - if (found) currentActiveParagraph = found.para - } - - if (currentActiveParagraph !== priorActiveParagraph) { - - let priorViewers, currentViewers - if (isJunctureV1) { - priorViewers = priorActiveParagraph?.nextElementSibling - currentViewers = currentActiveParagraph?.nextElementSibling - if (priorViewers) priorViewers.classList.remove('active') - } - - priorActiveParagraph = currentActiveParagraph - if (setActiveParagraph) { - rootEl.querySelectorAll('p.active, ol.active, ul.active').forEach(p => p.classList.remove('active')) - currentActiveParagraph?.classList.add('active') - if (currentViewers) currentViewers.classList.add('active') - } - - setStickyOffsets(rootEl) - } - - }, { root: null, threshold: [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0], rootMargin: `${topMargin ? -topMargin : 0}px 0px 0px 0px`}) - - // target the elements to be observed - rootEl.querySelectorAll('p, .segment > ol, .segment > ul').forEach((paragraph) => observer.observe(paragraph)) -} - -async function getMarkdown(ghSource) { - let [owner, repo, branch, ...path] = ghSource.split('/').filter(pe => pe) - path = path.join('/') - let extension = ghSource.slice(-3) - // console.log(`getMarkdown: ghSource=${ghSource} owner=${owner} repo=${repo} branch=${branch} path=${path} extension=${extension}`) - if (extension === '.md') { - let resp = await getGhFile(owner, repo, branch, path) - return resp.content - } else { - return await Promise.all([ - getGhFile(owner, repo, branch, `${path}.md`), - getGhFile(owner, repo, branch, `${path}/README.md`), - getGhFile(owner, repo, branch, `${path}/index.md`) - ]).then(resp => { - let found = resp.find(r => r?.status === 200) - return found?.content || '' - }) - } -} - -function setMeta() { - let meta - let header - Array.from(document.getElementsByTagName('*')).forEach(el => { - if (!/^\w+-\w+/.test(el.tagName)) return - if (el.tagName.split('-')[1] === 'META') meta = el - else if (el.tagName.split('-')[1] === 'HEADER') header = el - }) - if (!meta) meta = document.querySelector('param[ve-config]') - - let firstHeading = document.querySelector('h1, h2, h3')?.innerHTML.trim() - let firstParagraph = Array.from(document.querySelectorAll('p')) - .find(p => { - let ptext = p.childNodes.item(0).nodeValue?.trim() - return p.childNodes[0].tagName !== 'CODE' && ptext?.length && !/^\.\w+-\w+/.test(ptext) - })?.innerHTML.trim() - - let jldEl = document.querySelector('script[type="application/ld+json"]') - let seo = jldEl ? JSON.parse(jldEl.innerText) : {'@context':'https://schema.org', '@type':'WebSite', description:'', headline:'', name:'', url:''} - seo.url = location.href - - let title = meta?.getAttribute('title') - ? meta.getAttribute('title') - : window.config?.title - ? window.config.title - : header?.getAttribute('label') - ? header.getAttribute('label') - : firstHeading || '' - - let description = meta?.getAttribute('description') - ? meta.getAttribute('description') - : window.config?.description - ? window.config.description - : firstParagraph || '' - - let robots = meta?.getAttribute('robots') - ? meta?.getAttribute('robots') - : window.config?.robots - ? window.config.robots - : '' - - if (title) { - document.title = title - seo.name = title - seo.headline = title - document.querySelector('meta[name="og:title"]')?.setAttribute('content', title) - document.querySelector('meta[property="og:site_name"]')?.setAttribute('content', title) - document.querySelector('meta[property="twitter:title"]')?.setAttribute('content', title) - } - if (description) { - document.querySelector('meta[name="description"]')?.setAttribute('content', description) - document.querySelector('meta[property="og:description"]')?.setAttribute('content', description) - seo.description = description - } - if (robots) { - let robotsMeta = document.createElement('meta') - robotsMeta.setAttribute('name', 'robots') - robotsMeta.setAttribute('content', robots) - document.head.appendChild(robotsMeta) - } - - // if (meta && meta.getAttribute('ve-config') === null) meta.remove() - if (jldEl) jldEl.innerText = JSON.stringify(seo) - - return {meta: {title, description, robots, seo}} -} - -function isJunctureV1(contentEl) { - return contentEl.querySelector('param[ve-config]') ? true : false -} - -// set the configuration -function setConfig() { - window.config = { - ...yaml.parse(window.options || ''), - ...(window.jekyll || {}), - ...(window.config || {}), - ...{ - baseurl: window.jekyll?.site.baseurl || location.hostname.indexOf('github.io') > 0 ? `/${location.pathname.split('/')[1]}/` : '/', - source: { - owner: window.jekyll?.site.github.owner_name, - repository: window.jekyll?.site.github.repository_name, - branch: window.jekyll?.site.github.source.branch, - dir: window.jekyll?.page.dir, - path: window.jekyll?.page.path, - name: window.jekyll?.page.name - } - }, - ...setMeta() - } - let contentEl = document.createElement('main') - contentEl.innerHTML = window.config.content || document.body.innerHTML - window.config.isJunctureV1 = isJunctureV1(contentEl) - console.log(window.config) -} - -function readMoreSetup() { - const ps = document.querySelectorAll('.read-more p') - const observer = new ResizeObserver(entries => { - for (let entry of entries) { - entry.target.classList[entry.target.scrollHeight > (entry.contentRect.height + 10) ? 'add' : 'remove']('truncated') - } - }) - ps.forEach(p => observer.observe(p)) -} - -function setViewersPosition() { - let header = document.querySelector('ve-header') - let viewers = document.querySelector('.viewers') - let top = header.getBoundingClientRect().top - let height = header.getBoundingClientRect().height - let offset = top + height - if (viewers) { - viewers.style.top = `${offset}px` - viewers.style.height = `calc(100dvh - ${offset+2}px)` - } -} - -function elFromHtml(html) { - return new DOMParser().parseFromString(html, 'text/html').querySelector('body') -} - -async function getGhFile(acct, repo, branch, path) { - // console.log(`getFile: acct=${acct} repo=${repo} branch=${branch} path=${path}`) - let url = `https://api.github.com/repos/${acct}/${repo}/contents/${path}?ref=${branch}` - let resp = await fetch(url, {cache: 'no-cache'}) - if (resp.ok) { - let payload = await resp.json() - let content = decodeURIComponent(escape(atob(payload.content))) - return {status: resp.status, content} - } else if (resp.status === 403 || resp.status === 401) { // access problem, possibly api rate limit exceeded - url = `https://raw.githubusercontent.com/${acct}/${repo}/${branch}/${path}` - resp = await fetch(url) - if (resp.ok) { - let content = await resp.text() - return {status: resp.status, content} - } else { - return {status: resp.status, content: null} - } - } else { - return {status: resp.status, content: null} - } -} - -function markdownToHtml(markdown) { - return marked.use(window.markedFootnote()).parse(markdown) -} - -function structureContent(html) { - let contentEl = document.createElement('main') - contentEl.innerHTML = html - convertTags(contentEl) - - let article = restructure(contentEl) - if (isJunctureV1(contentEl)) article = restructureForJ1(article) - return article -} - -function articleFromHtml(html) { - let contentEl = document.createElement('main') - contentEl.innerHTML = html - convertTags(contentEl) - let article = restructure(contentEl) - if (isJunctureV1(contentEl)) article = restructureForJ1(article) - return article -} - -// mount the content -function mount(mountPoint, html) { - html = html || window.config.content || document.body.innerHTML - mountPoint = mountPoint || document.querySelector('body > article, body > main, body > section') - if (!mountPoint) { - mountPoint = document.createElement('article') - document.body.innerHTML = mountPoint.outerHTML - } - - let article = articleFromHtml(html) - - mountPoint.replaceWith(article) - if (window.config.isJunctureV1 && !isMobile) { - document.addEventListener('scroll', () => setViewersPosition()) - setTimeout(() => setViewersPosition(), 100) - } - - observeVisible(article, article.querySelector('ve-video[sync]') ? false : true) - readMoreSetup() - return article -} - if (!window.config) setConfig() let scripts = Array.from(document.getElementsByTagName('script')).filter(script => script.src).map(script => script.src) @@ -1129,9 +34,14 @@ if (!hasWcJs) { hasWcJs = true } +function docReady(fn) { + if (document.readyState === 'complete' || document.readyState === 'interactive') setTimeout(fn, 1) + else document.addEventListener('DOMContentLoaded', fn) +} + docReady(function() { // console.log(`docReady mode=${mode} hasGhpJs=${hasGhpJs} hasWcJs=${hasWcJs} hasWcCss=${hasWcCss} isMounted=${isMounted}`) if (hasGhpJs && hasWcJs && hasWcCss && !isMounted) mount() }) -export { articleFromHtml, elFromHtml, getGhFile, getMarkdown, markdownToHtml, mount, observeVisible, structureContent } \ No newline at end of file +export { mount, getMarkdown, markdownToHtml } \ No newline at end of file diff --git a/wc/dist/js/ghp-lib.js b/wc/dist/js/ghp-lib.js new file mode 100644 index 0000000..04c538a --- /dev/null +++ b/wc/dist/js/ghp-lib.js @@ -0,0 +1,1090 @@ +import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js"; +import 'https://cdn.jsdelivr.net/npm/marked-footnote/dist/index.umd.min.js' +import * as yaml from 'https://cdn.jsdelivr.net/npm/yaml@2.3.4/browser/index.min.js' + +function addLink(attrs) { + console.log('addLink', attrs) + let stylesheet = document.createElement('link') + Object.entries(attrs).map(([key, value]) => stylesheet.setAttribute(key, value)) + document.head.appendChild(stylesheet) +} + +function addScript(attrs) { + console.log('addScript', attrs) + let script = document.createElement('script') + Object.entries(attrs).map(([key, value]) => script.setAttribute(key, value)) + document.head.appendChild(script) +} + +const classes = new Set('left right full sticky'.split(' ')) +const components = { + 've-animated-image': { + booleans: 'autoplay', + positional: 'src caption' + }, + 've-audio': { + booleans: 'autoplay muted no-caption sync', + positional: 'src caption' + }, + 've-breadcrumbs': {}, + 've-compare': { + positional: 'src' + }, + 've-entities': { + booleans: 'cards' + }, + 've-footer': { + }, + 've-gallery': { + booleans: 'caption' + }, + 've-header': { + booleans: 'breadcrumbs no-manifest-popover pdf-download-enabled', + positional: 'title background subtitle options position' + }, + 've-iframe': { + booleans: 'allow-full-screen allow-transparency full left right sticky', + positional: 'src caption' + }, + 've-image': { + booleans: 'no-caption grid static repo-is-writable zoom-on-scroll', + positional: 'src caption' + }, + 've-knightlab-timeline': { + booleans: 'has-bookmark' + }, + 've-map': { + booleans: 'cards full left marker prefer-geojson popup-on-hover zoom-on-scroll zoom-on-click', + positional: 'center caption' + }, + 've-media': { + // booleans: 'no-caption static repo-is-writable zoom-on-scroll', + positional: 'src caption' + }, + 've-menu': { + booleans: 'pdf-download-enabled' + }, + 've-mermaid': {}, + 've-meta': {}, + 've-plant-specimen': { + booleans: 'full left right sticky', + positional: 'qid max' + }, + 've-snippet': {}, + 've-video': { + booleans: 'autoplay muted no-caption sync', + positional: 'src caption' + }, + 've-visjs': { + booleans: 'hierarchical' + } +} +let tagMap = {} +Object.entries(components).forEach(([tag, attrs]) => { + let tagObj = { + booleans : new Set((attrs.booleans || '').split(' ').filter(s => s)), + positional: (attrs.positional || '').split(' ').filter(s => s) + } + tagMap[tag] = tagObj + tagMap[tag.slice(3)] = tagObj +}) + +function parseHeadline(s) { + let tokens = [] + s = s.replace(/”/g,'"').replace(/”/g,'"').replace(/’/g,"'") + s?.match(/[^\s"]+|"([^"]*)"/gmi)?.filter(t => t).forEach(token => { + if (tokens.length > 0 && tokens[tokens.length-1].indexOf('=') === tokens[tokens.length-1].length-1) tokens[tokens.length-1] = `${tokens[tokens.length-1]}${token}` + else tokens.push(token) + }) + let parsed = {} + let tokenIdx = 0 + while (tokenIdx < tokens.length) { + let token = tokens[tokenIdx].replace(//g, '_').replace(/<\/em>/g, '_') + if (token.indexOf('=') > 0 && /^[\w-:]+=/.test(token)) { + let idx = token.indexOf('=') + let key = token.slice(0, idx) + let value = token.slice(idx+1) + value = value[0] === '"' && value[value.length-1] === '"' ? value.slice(1, -1) : value + if (key[0] === ':') { // style + key = camelToKebab(key.slice(1)) + if (!parsed.style) parsed.style = {} + parsed.style[key] = value + } else { // kwargs + if (!parsed.kwargs) parsed.kwargs = {} + if (parsed.kwargs[key]) parsed.kwargs[key] += ` ${value}` + else parsed.kwargs[key] = value + } + } + else if (token[0] === '.' || classes.has(token)) { + let className = token.replace(/^\./,'') + if (parsed.class) parsed.class += ` ${className}` + else parsed.class = className + } + else if (token[0] === '"') { + if (!parsed.args) parsed.args = [] + parsed.args.push(token.slice(1,-1)) + } + else if (/#\w+/.test(token)) parsed['id'] = token.slice(1) + else if (/^Q\d+$/.test(token) && !parsed.tag) { // entity identifier + if (!parsed.entities) parsed.entities = [] + parsed.entities.push(token) + } + else if (tokenIdx === 0 && !parsed.tag && tagMap[token.replace(/^\./,'')]) { + let tag = token.replace(/^\./,'') + parsed.tag = tag.indexOf('ve-') === 0 ? tag : `ve-${tag}` + } else if (token === 'script' || token === 'link') parsed.tag = token + else { + if (parsed.tag === 'script' && !parsed.src) parsed.src = token + else if (parsed.tag === 'link' && !parsed.href) parsed.href= token + else { + let tagObj = tagMap[parsed.tag] + if (tagObj?.booleans.has(token)) { + if (!parsed.booleans) parsed.booleans = [] + parsed.booleans.push(token) + } else { + if (!parsed.args) parsed.args = [] + parsed.args.push(token) + } + } + } + tokenIdx++ + } + + if (parsed.tag && parsed.args) { + let tagObj = tagMap[parsed.tag] + let listArgs = [] + parsed.args.forEach((value, idx) => { + if (idx >= tagObj.positional?.length) { + listArgs.push(value) + } else { + let key = tagObj.positional[idx] + value = value[0] === '"' && value[value.length-1] === '"' ? value.slice(1, -1) : value + if (!parsed.kwargs) parsed.kwargs = {} + if (parsed.kwargs[key]) parsed.kwargs[key] += ` ${value}` + else parsed.kwargs[key] = value + } + }) + if (listArgs.length) parsed.args = listArgs + else delete parsed.args + } + return parsed +} + +function parseCodeEl(codeEl) { + let codeElems = codeEl.textContent?.replace(/\s+\|\s+/g,'\n') + .split('\n') + .map(l => l.trim()) + // .map(l => l.replace(//g, '_').replace(/<\/em>/g, '_')) + .filter(x => x) || [] + let parsed = parseHeadline(codeElems?.[0]) || {} + if (parsed.tag === 've-mermaid') { + parsed.raw = codeEl.textContent.split('\n').slice(1).join('\n') + } else if (parsed.tag === 've-media') { + parsed.tag = 've-image' //TODO: implement ve-media conversion + } else if (parsed.tag === 've-vis-network') { + parsed.tag = 've-visjs' + } else if (codeElems.length > 1) { + parsed.args = parsed.args ? [...parsed.args, ...codeElems.slice(1)] : codeElems.slice(1) + } + return parsed +} + +function makeEl(parsed) { + let el = document.createElement(parsed.tag) + if (parsed.id) el.id = parsed.id + if (parsed.class) parsed.class.split(' ').forEach(c => el.classList.add(c)) + if (parsed.style) el.setAttribute('style', Object.entries(parsed.style).map(([k,v]) => `${k}:${v}`).join(';')) + if (parsed.entities) el.setAttribute('entities', parsed.entities.join(' ')) + if (parsed.kwargs) for (const [k,v] of Object.entries(parsed.kwargs)) el.setAttribute(k, v === true ? '' : v) + if (parsed.booleans) parsed.booleans.forEach(b => el.setAttribute(b, '') ) + if (parsed.args) { + let ul = document.createElement('ul') + el.appendChild(ul) + for (const arg of parsed.args) { + let argEl = new DOMParser().parseFromString(marked.parse(arg.replace(/^\s*-\s*/, '')), 'text/html').body.firstChild + let li = document.createElement('li') + li.innerHTML = argEl.innerHTML.indexOf('wc:') === 0 ? argEl.innerHTML.replace(/([^<]+)<\/em>/g, '_$1_') : argEl.innerHTML + ul.appendChild(li) + } + } + if (parsed.raw) el.textContent = parsed.raw + return el +} + +function deleteAllComments(rootEl) { + var iterator = document.createNodeIterator(rootEl, NodeFilter.SHOW_COMMENT, () => { return NodeFilter.FILTER_ACCEPT}, false); + var curNode + while (curNode = iterator.nextNode()) { curNode.remove() } +} + +function isNumeric(arg) { return !isNaN(arg) } +function camelToKebab(input) { return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()} + +function computeDataId(el) { + let dataId = [] + while (el.parentElement) { + let siblings = Array.from(el.parentElement.children).filter(c => c.tagName === el.tagName) + dataId.push(siblings.indexOf(el) + 1) + el = el.parentElement + } + return dataId.reverse().join('.') +} + +// convert juncture tags to web component elements +function convertTags(rootEl) { + // remove "view as" buttons + Array.from(rootEl.querySelectorAll('a > img')) + .filter(img => img.src.indexOf('ve-button.png') > -1 || img.src.indexOf('wb.svg') > -1) + .forEach(viewAsButton => viewAsButton?.parentElement?.parentElement?.remove()) + + Array.from(rootEl.querySelectorAll('p')) + .filter(p => /^\.ve-\w+\S/.test(p.childNodes.item(0)?.nodeValue?.trim() || '')) + .forEach(p => { + let codeElWrapper = document.createElement('div') + let codeEl = document.createElement('code') + codeElWrapper.appendChild(codeEl) + codeEl.setAttribute('class', 'language-juncture2') + let replacementText = p.innerHTML.trim().slice(1) + .replace(/\n\s*-\s+/g, '\n') + .replace(/[^<]*<\/a>/g, '') + .replace(/^ve-media/, 've-image') + codeEl.textContent = replacementText + p.replaceWith(codeElWrapper) + }) + Array.from(rootEl.querySelectorAll('param')) + .filter(param => Array.from(param.attributes).filter(attr => attr.name.indexOf('ve-') === 0).length) + .filter(param => param.getAttribute('ve-config') === null) + .forEach(param => { + let tag = Array.from(param.attributes).find(attr => attr.name.indexOf('ve-') === 0).name + if (tag) { + let tagObj = tagMap[tag] || {} + let parsed = { tag } + Array.from(param.attributes).forEach(attr => { + if (attr.name !== tag) { + if (tagObj.booleans?.has(attr.name)) { + if (!parsed.booleans) parsed.booleans = [] + parsed.booleans.push(attr.name) + } else { + if (!parsed.kwargs) parsed.kwargs = {} + if (parsed.kwargs[attr.name]) parsed.kwargs[attr.name] += ` ${attr.value}` + else parsed.kwargs[attr.name] = attr.value + } + } + }) + if (!isJunctureV1(rootEl)) param.replaceWith(makeEl(parsed)) + } + }) + rootEl.querySelectorAll('code').forEach(codeEl => { + let parsed = parseCodeEl(codeEl) + // console.log(parsed) + if (parsed.tag) { + if (codeEl.parentElement.tagName === 'PRE') { + codeEl = codeEl.parentElement + codeEl.parentElement.removeAttribute('id') + codeEl.parentElement.removeAttribute('data-id') + codeEl.parentElement.removeAttribute('class') + if (codeEl.parentElement.parentElement) codeEl.parentElement.parentElement.className = 'segment' + if (codeEl.parentElement.tagName === 'DIV' && codeEl.parentElement.children.length === 1) { + codeEl.parentElement.replaceWith(codeEl) + } + } + codeEl.replaceWith(makeEl(parsed)) + } else if (parsed.class || parsed.style || parsed.id || parsed.kwargs) { + let codeWrapper = codeEl.parentElement + let target + let priorEl = codeWrapper.previousElementSibling + if (priorEl?.tagName === 'EM' || priorEl?.tagName === 'STRONG') { + target = document.createElement('span') + target.innerHTML = priorEl.innerHTML + priorEl.replaceWith(target) + } else if (parent?.tagName === 'TD') { + target = parent?.parentElement?.parentElement?.parentElement // table + parent?.parentElement?.remove() // row + } else if (parent?.tagName !== 'UL' && (priorEl?.tagName === 'A' || priorEl?.tagName === 'IMG')) { + target = priorEl + } else { + target = priorEl?.children.length === 1 && priorEl.children[0]?.tagName === 'VE-HEADER' + ? codeWrapper.parentElement + : priorEl + } + if (target) { + if (parsed.id) target.id = parsed.id + if (parsed.class) parsed.class.split(' ').forEach(c => target.classList.add(c)) + if (parsed.style) target.setAttribute('style', Object.entries(parsed.style).map(([k,v]) => `${k}:${v}`).join(';')) + if (parsed.entities) target.setAttribute('data-entities', parsed.entities.join(' ')) + if (parsed.kwargs) for (const [k,v] of Object.entries(parsed.kwargs)) target.setAttribute(k, v === true ? '' : v) + } else { + console.log('no target for', parsed) + } + codeWrapper.remove() + } + }) +} + +// Restructure the content to have hierarchical sections and segments +function restructure(rootEl) { + let styleSheet = rootEl.querySelector('style') + deleteAllComments(rootEl) + + // Move child params to be siblings with parent element + rootEl.querySelectorAll('ul, ol').forEach(list => { + let ref = list + list.querySelectorAll('param').forEach(param => { + ref.parentNode.insertBefore(param, ref.nextSibling) + ref = param + }) + }) + + let main = document.createElement('main') + if (styleSheet) main.appendChild(styleSheet.cloneNode(true)) + + main.className = 'page-content markdown-body' + main.setAttribute('aria-label', 'Content') + main.setAttribute('data-theme', 'light') + if (rootEl.style) main.setAttribute('style', rootEl.style.cssText) + let currentSection = main; + let sectionParam + + // Converts empty headings (changed to paragraphs by markdown converter) to headings with the correct level + Array.from(rootEl?.querySelectorAll('p')) + .filter(p => /^[#*]{1,6}$/.test(p.childNodes.item(0)?.nodeValue?.trim() || '')) + .forEach(p => { + let ptext = p.childNodes.item(0).nodeValue?.trim() + let codeEl = p.querySelector('code') + let heading = document.createElement(`h${ptext?.length}`) + p.replaceWith(heading) + if (codeEl) { + let codeWrapper = document.createElement('p') + codeWrapper.appendChild(codeEl) + heading.parentElement?.insertBefore(codeWrapper, heading.nextSibling) + } + }) + + Array.from(rootEl?.querySelectorAll('p, li')) + .filter(p => /==.+=={.+}/.test(p.textContent?.trim() || '')) + .forEach(el => { + let replHtml = [] + let matches = Array.from(el.innerHTML.matchAll(/==(?[^=]+)=={(?[^}]+)}/g)) + matches.forEach((match, idx) => { + if (idx === 0) replHtml.push(el.innerHTML.slice(0, match.index)) + if (match.groups) { + let {text, attrs} = match.groups + if (/\s*Q\d+\s*/.test(attrs)) { + replHtml.push(`${text}`) + } else if (attrs.indexOf('=') > 0) { + let [key, value] = attrs.split('=') + if (value[0] !== '"') attrs = `${key}="${value}"` + replHtml.push(`${text}`) + } + replHtml.push(el.innerHTML.slice(match.index + match[0].length, matches[idx+1]?.index || el.innerHTML.length)) + } + }) + el.innerHTML = replHtml.join('') + }) + + // For compatibility with Juncture V1 + Array.from(rootEl?.querySelectorAll('param')) + .filter(param => Array.from(param.attributes).filter(attr => attr.name.indexOf('ve-') === 0).length === 0) + .forEach(param => { + let priorEl = param.previousElementSibling + param.classList.forEach(c => priorEl?.classList.add(c)) + let idAttr = Array.from(param.attributes).find(attr => attr.name === 'id') + let styleAttr = Array.from(param.attributes).find(attr => attr.name === 'style') + if (idAttr || styleAttr) { + if (idAttr) priorEl?.setAttribute('id', idAttr.value) + if (styleAttr) priorEl?.setAttribute('style', styleAttr.value) + param.remove() + } + }) + + Array.from(rootEl?.children || []).forEach(el => { + if (el.tagName[0] === 'H' && isNumeric(el.tagName.slice(1))) { + let heading = el + let sectionLevel = parseInt(heading.tagName.slice(1)) + if (currentSection) { + (Array.from(currentSection.children)) + .filter(child => !/^H\d/.test(child.tagName)) + .filter(child => !/PARAM/.test(child.tagName)) + .filter(child => !/STYLE/.test(child.tagName)) + .filter(child => !/^VE--/.test(child.tagName)) + .forEach((child, idx) => { + let segId = `${currentSection.getAttribute('data-id') || 0}.${idx+1}` + child.setAttribute('data-id', segId) + child.id = segId + child.classList.add('segment') + }) + } + + currentSection = document.createElement('section') + currentSection.classList.add(`section${sectionLevel}`) + Array.from(heading.classList).forEach(c => currentSection.classList.add(c)) + heading.className = '' + if (heading.id) { + currentSection.id = heading.id + heading.removeAttribute('id') + } + + currentSection.innerHTML += heading.outerHTML + + let headings = [] + for (let lvl = 1; lvl < sectionLevel; lvl++) { + headings = [...headings, ...Array.from(main.querySelectorAll(`H${lvl}`)).filter(h => h.parentElement.tagName === 'SECTION')] + } + + let parent = (sectionLevel === 1 || headings.length === 0) + ? main + : headings.pop()?.parentElement + parent?.appendChild(currentSection) + currentSection.setAttribute('data-id', computeDataId(currentSection)) + + } else { + if (el.tagName !== 'PARAM') { + let segId = `${currentSection.getAttribute('data-id') || 0}.${currentSection.children.length}` + el.setAttribute('data-id', segId) + el.id = segId + el.classList.add('segment') + } + if (el !== sectionParam) { + currentSection.innerHTML += el.outerHTML + } + } + }) + + Array.from(main.querySelectorAll('a')) + .filter(anchorElem => anchorElem.href.indexOf('mailto:') < 0) + .forEach(anchorElem => { + let link + try { + link = new URL(anchorElem.href) + } catch (e) { + console.log(e) + console.log(anchorElem.href) + return + } + let path = link.pathname.split('/').filter(p => p) + if (path.length === 0) return + let qid = /^Q\d+$/.test(path[path.length-1]) ? path[path.length-1] : null + let isEntityPath = path.find(pe => pe[0] === '~') + if (qid || isEntityPath) { + let mdpEntityInfobox = document.createElement('ve-entity-infobox') + mdpEntityInfobox.innerHTML = anchorElem.innerHTML + if (qid) mdpEntityInfobox.setAttribute('qid', qid) + else { + let pathIdx = (window.config?.baseurl && link.pathname.indexOf(window.config?.baseurl) === 0) ? 1 : 0 + mdpEntityInfobox.setAttribute('file', path.slice(pathIdx).map(pe => pe.replace(/~/,'')).filter(pe => pe).join('/')) + } + anchorElem.replaceWith(mdpEntityInfobox) + } + }) + + configCustomClasses(main) + + let header, footer + let article = document.createElement('article') + + if (isJunctureV1(rootEl)) { + article.classList.add('j1') + let veConfig = main.querySelector('param[ve-config]') + header = document.createElement('ve-header') + header.className = 'sticky' + Array.from(veConfig?.attributes || []).forEach(attr => { + if (attr.name === 'banner') header.setAttribute('background', attr.value) + if (attr.name === 'title') header.setAttribute('title', attr.value) + if (attr.name === 'subtitle' || attr.name === 'author') header.setAttribute('subtitle', attr.value) + }) + article.appendChild(header) + veConfig?.remove() + } else { + header = main.querySelector('ve-header') + if (header) { + let toRemove = header + while (toRemove.parentElement.tagName !== 'MAIN') toRemove = toRemove.parentElement + article.appendChild(header) + toRemove.remove() + } + } + + article.appendChild(main) + + footer = main.querySelector('ve-footer') + if (footer) { + // let toRemove = footer + // while (toRemove.parentElement.tagName !== 'MAIN') toRemove = toRemove.parentElement + article.appendChild(footer) + // toRemove.remove() + } + + return article +} + +function configCustomClasses(rootEl) { + let cardCtr = 0 + + rootEl.querySelectorAll('section').forEach(section => { + + if (section.classList.contains('cards') && !section.classList.contains('wrapper')) { + section.classList.remove('cards') + let wrapper = document.createElement('section') + wrapper.className = 'cards wrapper' + Array.from(section.children).slice(1).forEach(card => { + wrapper.appendChild(card) + card.classList.add('card') + let heading = card.querySelector('h1, h2, h3, h4, h5, h6') + if (heading) heading.remove() + let img = card.querySelector('p > img') + if (img) img.parentElement?.replaceWith(img) + let link = card.querySelector('p > a') + if (link) link.parentElement?.replaceWith(link) + card.querySelectorAll('p').forEach(p => { + ++cardCtr + let readMoreWrapper = document.createElement('div') + readMoreWrapper.className = 'read-more' + let input = document.createElement('input') + input.setAttribute('type', 'checkbox') + input.id = `read-more-${cardCtr}` + readMoreWrapper.appendChild(input) + let para = document.createElement('p') + para.innerHTML = p.innerHTML + readMoreWrapper.appendChild(para) + let label = document.createElement('label') + label.setAttribute('for', `read-more-${cardCtr}`) + label.setAttribute('role', 'button') + label.innerHTML = 'More' + readMoreWrapper.appendChild(label) + p.replaceWith(readMoreWrapper) + }) + }) + section.appendChild(wrapper) + } + + if (section.classList.contains('tabs')) { + let tabGroup = document.createElement('sl-tab-group'); + Array.from(section.classList).forEach(cls => tabGroup.classList.add(cls)) + Array.from(section.attributes).forEach(attr => tabGroup.setAttribute(attr.name, attr.value)) + Array.from(section.querySelectorAll(':scope > section')) + .forEach((tabSection, idx) => { + let tab = document.createElement('sl-tab') + tab.setAttribute('slot', 'nav') + tab.setAttribute('panel', `tab${idx+1}`) + tab.innerHTML = tabSection.querySelector('h1, h2, h3, h4, h5, h6')?.innerHTML || '' + tabGroup.appendChild(tab) + }) + Array.from(section.querySelectorAll(':scope > section')) + .forEach((tabSection, idx) => { + let tabPanel = document.createElement('sl-tab-panel') + tabPanel.setAttribute('name', `tab${idx+1}`) + let tabContent = Array.from(tabSection.children).slice(1).map(el => el.outerHTML).join(' ') + tabPanel.innerHTML = tabContent + tabGroup.appendChild(tabPanel) + }) + section.replaceWith(tabGroup) + } + + if ((section.classList.contains('columns') || section.classList.contains('mcol')) && !section.classList.contains('wrapper')) { + let wrapper = document.createElement('section') + wrapper.className = 'columns wrapper' + section.classList.remove('columns') + section.classList.remove('mcol') + Array.from(section.children) + .filter(child => child.tagName === 'SECTION') + .forEach((col, idz) => { + wrapper.appendChild(col) + col.classList.add(`col-${idz+1}`) + }) + section.appendChild(wrapper) + } + }) +} + +function restructureForJ1(article) { + + function serializeProps(props) { + return Object.entries(props).map(([key, value]) => `${key}="${value}"`).join(' ').replace(/“/g, '"').replace(/”/g, '"') + } + + Array.from(article.querySelectorAll('[data-id]')).forEach(seg => { + if (seg.tagName === 'SECTION') return + + if (!seg.innerHTML.trim()) { // remove empty segments + seg.remove() + return + } + + let id = seg.getAttribute('data-id') || '' + let wrapper = document.createElement('div') + wrapper.setAttribute('data-id', id) + wrapper.id = id + wrapper.className = seg.className + seg.removeAttribute('id') + seg.removeAttribute('data-id') + seg.className = '' + wrapper.appendChild(seg.cloneNode(true)) + let viewersDiv = document.createElement('div') + + viewersDiv.setAttribute('data-id', id) + viewersDiv.className = 'viewers' + + let params = [] + let sib = seg.nextSibling + while (sib && sib.tagName === 'PARAM') { + params.push(sib) + sib = sib.nextSibling + } + params.forEach(p => viewersDiv.appendChild(p)) + wrapper.appendChild(viewersDiv) + + seg.replaceWith(wrapper) + }) + + Array.from(article.querySelectorAll('[data-id]')).forEach(seg => { + if (seg.tagName === 'SECTION') return + let id = seg.getAttribute('data-id') || '' + let para = seg.querySelector('p, ol, ul') + let viewersDiv = seg.querySelector('.viewers') + if (!viewersDiv) return + + const params = Array.from(viewersDiv.querySelectorAll(':scope > param')) + .map((param, idx) => ({ ...Object.fromEntries(Array.from(param.attributes).map(a => [a.name, a.value])), ...{idx} })) + let idx = params.length + let parent = viewersDiv.parentElement + while (parent && parent.tagName !== 'ARTICLE') { + Array.from(parent.querySelectorAll(':scope > param')).forEach(param => { + params.push({...Object.fromEntries(Array.from(param.attributes).map(a => [a.name, a.value])), ...{idx} }) + idx++ + }) + parent = parent.parentElement + } + + const veTags = {} + params.forEach(p => { + let tag = Object.keys(p).find(k => k.indexOf('ve-') === 0 && !p[k]) + if (!tag) { + tag = 've-entity' + p[tag] = '' + } else if (tag === 've-d3plus-ring-network') { + tag = 've-visjs' + } + if (!veTags[tag]) veTags[tag] = [] + veTags[tag].push(p) + }) + + let entities = [] + Object.values(veTags['ve-entity'] || []).forEach(veEntity => { + let qid = veEntity.eid || veEntity.qid + let aliases = veEntity.aliases?.split('|').filter(a => a) || [] + let file = veEntity.file ||veEntity.article + if (aliases.length || file) { + if (!window.customEntityData[qid]) window.customEntityData[qid] = {aliases: aliases, file: file} + } + entities.push(qid) + }) + delete veTags['ve-entity'] + + para?.setAttribute('data-entities', entities.join(' ')) + + function propsList(tagProps) { + let ul = document.createElement('ul') + tagProps.forEach(tp => { + let li = document.createElement('li') + li.innerText = serializeProps(tp) + ul.appendChild(li) + }) + return ul + } + + function setElProps(el, props, nameMap) { + Object.entries(props) + .filter(([key, value]) => nameMap[key] !== undefined) + .forEach(([key, value]) => { + el.setAttribute(nameMap[key] || key, value === 'false' ? '' : value === 'true' ? null : value) + }) + } + + function makeViewerEl(tagName, slotName, tagProps) { + let viewerEl = document.createElement(tagName) + viewerEl.setAttribute('slot', slotName) + if (slotName === 've-compare') { + setElProps(viewerEl, tagProps[0], {caption:''}) + viewerEl.appendChild(propsList(tagProps)) + } else if (slotName === 've-iframe') { + setElProps(viewerEl, tagProps[0], {allow:'', allowfullscreen:'', allowtransparency:'', caption:'', frameborder:'', loading:'', name:'', src:''}) + } else if (slotName === 've-image' || slotName === 've-gallery') { + if (tagProps.length === 1) { + setElProps(viewerEl, tagProps[0], {attribution:'', caption:'', data:'', 'data-id':'', description:'', 'fit':'', label:'', license:'', manifest:'', refresh:'', region:'', rotate:'', rotation:'', seq:'', src:'', title:'', url:'', 'zoom-on-scroll':''}) + } else { + setElProps(viewerEl, tagProps[0], {'zoom-on-scroll':''}) + viewerEl.appendChild(propsList(tagProps)) + } + } else if (slotName === 've-knightlab-timeline') { + setElProps(viewerEl, tagProps[0], {caption:'', 'hash-bookmark':'', 'initial-zoom':'', source:'', 'timenav-position':''}) + } else if (slotName === 've-map') { + setElProps(viewerEl, tagProps[0], {basemap:'basemaps', caption:'', center:'', data:'', 'data-id':'', entities:'', 'gesture-handling':'', 'gh-dir':'', marker:'', overlay:'', 'prefer-geojson':'', 'scroll-wheel-zoom':'', title:'', zoom:'', 'zoom-on-click':''}) + viewerEl.appendChild(propsList(tagProps.slice(1))) + } else if (slotName === 've-plant-specimen') { + setElProps(viewerEl, tagProps[0], {caption:'', eid:'', jpid:'', max:'', qid:'', 'taxon-name':'', wdid:''}) + } else if (slotName === 've-video') { + setElProps(viewerEl, tagProps[0], {alt:'', autoplay:'', caption:'', 'data-id':'', end:'', fit:'', id:'', muted:'', 'no-caption':'', poster:'', src:'', start:'', sync:'', vid:''}) + } else if (slotName === 've-visjs') { + setElProps(viewerEl, tagProps[0], {caption:'', edges:'', hierarchical:'', nodes:'', title:'caption', url:''}) + } else if (slotName === 'data') { + viewerEl.appendChild(propsList(tagProps)) + } else { + console.log(`makeViewer: slotName ${slotName} not recognized, props=${Object.keys(tagProps[0] || {})}`) + } + return viewerEl + } + + let j1Viewers = document.createElement('ve-j1-viewers-slots') + j1Viewers.dataset.id = id + viewersDiv.appendChild(j1Viewers) + j1Viewers.setAttribute('viewers', [ + ...Object.keys(veTags).filter(tag => tag !== 've-map-marker' && tag !== 've-map-layer'), + ...(mode === 'dev' ? ['data'] : []) + ].join(' ')) + + Object.entries(veTags).forEach(([tag, tagProps]) => { + if (tag === 've-map-marker' || tag === 've-map-layer') return + tagProps[0].entities = entities.join(' ') + tagProps[0]['data-id'] = j1Viewers.dataset.id + if (tag === 've-map') { + j1Viewers.appendChild(makeViewerEl('ve-map', tag, + [...tagProps, + ...Object.values(veTags['ve-map-marker'] || {}), ...Object.values(veTags['ve-map-layer'] || {}) + ].sort((a,b) => a.idx - b.idx) + )) + } else { + j1Viewers.appendChild(makeViewerEl(tag, tag, tagProps)) + } + }) + j1Viewers.appendChild(makeViewerEl('div', 'data', params)) + + }) + + Array.from(article.querySelectorAll('.segment')).forEach(seg => { + let viewers = seg.children[1] + let parent = seg.parentElement + while (parent && parent.tagName !== 'ARTICLE') { + parent.querySelectorAll(':scope > param').forEach(param => viewers.appendChild(param.cloneNode(true))) + parent = parent.parentElement + } + }) + + let main = article.querySelector('main') + let mainWrapper = document.createElement('main') + mainWrapper.className = 'page-content markdown-body' + let content = document.createElement('div') + content.className = 'content' + content.innerHTML = main.innerHTML + let viewers = document.createElement('div') + viewers.className = 'viewers' + mainWrapper.appendChild(content) + mainWrapper.appendChild(viewers) + main.replaceWith(mainWrapper) + + return article +} + +function setStickyOffsets(root) { + function topIsVisible(el) { + let bcr = el.getBoundingClientRect() + return el.tagName === 'VE-HEADER' || el.tagName === 'VE-BREADCRUMBS' || (bcr.top >= 0 && bcr.top <= window.innerHeight) + } + + let stickyElems = Array.from(root.querySelectorAll('.sticky')) + .filter(stickyEl => topIsVisible(stickyEl)) + .sort((a,b) => { + let aTop = a.getBoundingClientRect().top + let bTop = b.getBoundingClientRect().top + return aTop < bTop ? -1 : 1 + }) + + if (stickyElems.length > 1) { + stickyElems[0].style.zIndex = `${stickyElems.length}` + for (let i = 1; i < stickyElems.length; i++) { + let bcr = stickyElems[i].getBoundingClientRect() + let left = bcr.x + let right = bcr.x + bcr.width + for (let j = i-1; j >= 0; --j) { + let priorSticky = stickyElems[j] + let bcrPrior = priorSticky.getBoundingClientRect() + let leftPrior = bcrPrior.x + let rightPrior = bcrPrior.x + bcrPrior.width + if ((leftPrior <= right) && (rightPrior >= left)) { + let priorTop = parseInt(priorSticky.style.top.replace(/px/,'')) || 0 + if (stickyElems[i].style) { + stickyElems[i].style.top = `${Math.floor(priorTop + bcrPrior.height)}px` + } + break + } + } + } + } +} + +let priorActiveParagraph +let currentActiveParagraph + +function observeVisible(rootEl, setActiveParagraph, offset=0) { + setActiveParagraph = setActiveParagraph || false + let topMargin = offset + Array.from(rootEl.querySelectorAll('VE-HEADER')) + .map(stickyEl => (parseInt(stickyEl.style.top.replace(/px/,'')) || 0) + stickyEl.getBoundingClientRect().height)?.[0] || 0 + + isJunctureV1 = true + + const visible = {} + const observer = new IntersectionObserver((entries, observer) => { + + for (const entry of entries) { + let para = entry.target + let paraId = para.id || para.parentElement?.id || '' + let intersectionRatio = entry.intersectionRatio + if (intersectionRatio > 0) visible[paraId] = {para, intersectionRatio} + else delete visible[paraId] + } + + let sortedVisible = Object.values(visible) + .sort((a,b) => b.intersectionRatio - a.intersectionRatio || a.para.getBoundingClientRect().top - b.para.getBoundingClientRect().top) + + if (setActiveParagraph) { + currentActiveParagraph = sortedVisible[0]?.para + } else { + let found = sortedVisible.find(e => e.para.classList.contains('active')) + if (found) currentActiveParagraph = found.para + } + + if (currentActiveParagraph !== priorActiveParagraph) { + + let priorViewers, currentViewers + if (isJunctureV1) { + priorViewers = priorActiveParagraph?.nextElementSibling + currentViewers = currentActiveParagraph?.nextElementSibling + if (priorViewers) priorViewers.classList.remove('active') + } + + priorActiveParagraph = currentActiveParagraph + if (setActiveParagraph) { + rootEl.querySelectorAll('p.active, ol.active, ul.active').forEach(p => p.classList.remove('active')) + currentActiveParagraph?.classList.add('active') + if (currentViewers) currentViewers.classList.add('active') + } + + setStickyOffsets(rootEl) + } + + }, { root: null, threshold: [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0], rootMargin: `${topMargin ? -topMargin : 0}px 0px 0px 0px`}) + + // target the elements to be observed + rootEl.querySelectorAll('p, .segment > ol, .segment > ul').forEach((paragraph) => observer.observe(paragraph)) +} + +async function getMarkdown(ghSource) { + let [owner, repo, branch, ...path] = ghSource.split('/').filter(pe => pe) + path = path.join('/') + let extension = ghSource.slice(-3) + // console.log(`getMarkdown: ghSource=${ghSource} owner=${owner} repo=${repo} branch=${branch} path=${path} extension=${extension}`) + if (extension === '.md') { + let resp = await getGhFile(owner, repo, branch, path) + return resp.content + } else { + return await Promise.all([ + getGhFile(owner, repo, branch, `${path}.md`), + getGhFile(owner, repo, branch, `${path}/README.md`), + getGhFile(owner, repo, branch, `${path}/index.md`) + ]).then(resp => { + let found = resp.find(r => r?.status === 200) + return found?.content || '' + }) + } +} + +function setMeta() { + let meta + let header + Array.from(document.getElementsByTagName('*')).forEach(el => { + if (!/^\w+-\w+/.test(el.tagName)) return + if (el.tagName.split('-')[1] === 'META') meta = el + else if (el.tagName.split('-')[1] === 'HEADER') header = el + }) + if (!meta) meta = document.querySelector('param[ve-config]') + + let firstHeading = document.querySelector('h1, h2, h3')?.innerHTML.trim() + let firstParagraph = Array.from(document.querySelectorAll('p')) + .find(p => { + let ptext = p.childNodes.item(0).nodeValue?.trim() + return p.childNodes[0].tagName !== 'CODE' && ptext?.length && !/^\.\w+-\w+/.test(ptext) + })?.innerHTML.trim() + + let jldEl = document.querySelector('script[type="application/ld+json"]') + let seo = jldEl ? JSON.parse(jldEl.innerText) : {'@context':'https://schema.org', '@type':'WebSite', description:'', headline:'', name:'', url:''} + seo.url = location.href + + let title = meta?.getAttribute('title') + ? meta.getAttribute('title') + : window.config?.title + ? window.config.title + : header?.getAttribute('label') + ? header.getAttribute('label') + : firstHeading || '' + + let description = meta?.getAttribute('description') + ? meta.getAttribute('description') + : window.config?.description + ? window.config.description + : firstParagraph || '' + + let robots = meta?.getAttribute('robots') + ? meta?.getAttribute('robots') + : window.config?.robots + ? window.config.robots + : '' + + if (title) { + document.title = title + seo.name = title + seo.headline = title + document.querySelector('meta[name="og:title"]')?.setAttribute('content', title) + document.querySelector('meta[property="og:site_name"]')?.setAttribute('content', title) + document.querySelector('meta[property="twitter:title"]')?.setAttribute('content', title) + } + if (description) { + document.querySelector('meta[name="description"]')?.setAttribute('content', description) + document.querySelector('meta[property="og:description"]')?.setAttribute('content', description) + seo.description = description + } + if (robots) { + let robotsMeta = document.createElement('meta') + robotsMeta.setAttribute('name', 'robots') + robotsMeta.setAttribute('content', robots) + document.head.appendChild(robotsMeta) + } + + // if (meta && meta.getAttribute('ve-config') === null) meta.remove() + if (jldEl) jldEl.innerText = JSON.stringify(seo) + + return {meta: {title, description, robots, seo}} +} + +function isJunctureV1(contentEl) { + return contentEl.querySelector('param[ve-config]') ? true : false +} + +// set the configuration +function setConfig() { + window.config = { + ...yaml.parse(window.options || ''), + ...(window.jekyll || {}), + ...(window.config || {}), + ...{ + baseurl: window.jekyll?.site.baseurl || location.hostname.indexOf('github.io') > 0 ? `/${location.pathname.split('/')[1]}/` : '/', + source: { + owner: window.jekyll?.site.github.owner_name, + repository: window.jekyll?.site.github.repository_name, + branch: window.jekyll?.site.github.source.branch, + dir: window.jekyll?.page.dir, + path: window.jekyll?.page.path, + name: window.jekyll?.page.name + } + }, + ...setMeta() + } + let contentEl = document.createElement('main') + contentEl.innerHTML = window.config.content || document.body.innerHTML + window.config.isJunctureV1 = isJunctureV1(contentEl) + console.log(window.config) +} + +function readMoreSetup() { + const ps = document.querySelectorAll('.read-more p') + const observer = new ResizeObserver(entries => { + for (let entry of entries) { + entry.target.classList[entry.target.scrollHeight > (entry.contentRect.height + 10) ? 'add' : 'remove']('truncated') + } + }) + ps.forEach(p => observer.observe(p)) +} + +function setViewersPosition() { + let header = document.querySelector('ve-header') + let viewers = document.querySelector('.viewers') + let top = header.getBoundingClientRect().top + let height = header.getBoundingClientRect().height + let offset = top + height + if (viewers) { + viewers.style.top = `${offset}px` + viewers.style.height = `calc(100dvh - ${offset+2}px)` + } +} + +function elFromHtml(html) { + return new DOMParser().parseFromString(html, 'text/html').querySelector('body') +} + +async function getGhFile(acct, repo, branch, path) { + // console.log(`getFile: acct=${acct} repo=${repo} branch=${branch} path=${path}`) + let url = `https://api.github.com/repos/${acct}/${repo}/contents/${path}?ref=${branch}` + let resp = await fetch(url, {cache: 'no-cache'}) + if (resp.ok) { + let payload = await resp.json() + let content = decodeURIComponent(escape(atob(payload.content))) + return {status: resp.status, content} + } else if (resp.status === 403 || resp.status === 401) { // access problem, possibly api rate limit exceeded + url = `https://raw.githubusercontent.com/${acct}/${repo}/${branch}/${path}` + resp = await fetch(url) + if (resp.ok) { + let content = await resp.text() + return {status: resp.status, content} + } else { + return {status: resp.status, content: null} + } + } else { + return {status: resp.status, content: null} + } +} + +function markdownToHtml(markdown) { + return marked.use(window.markedFootnote()).parse(markdown) +} + +function structureContent(html) { + let contentEl = document.createElement('main') + contentEl.innerHTML = html + convertTags(contentEl) + + let article = restructure(contentEl) + if (isJunctureV1(contentEl)) article = restructureForJ1(article) + return article +} + +function articleFromHtml(html) { + let contentEl = document.createElement('main') + contentEl.innerHTML = html + convertTags(contentEl) + let article = restructure(contentEl) + if (isJunctureV1(contentEl)) article = restructureForJ1(article) + return article +} + +// mount the content +function mount(mountPoint, html) { + html = html || window.config.content || document.body.innerHTML + mountPoint = mountPoint || document.querySelector('body > article, body > main, body > section') + if (!mountPoint) { + mountPoint = document.createElement('article') + document.body.innerHTML = mountPoint.outerHTML + } + + let article = articleFromHtml(html) + + mountPoint.replaceWith(article) + if (window.config.isJunctureV1 && !isMobile) { + document.addEventListener('scroll', () => setViewersPosition()) + setTimeout(() => setViewersPosition(), 100) + } + + observeVisible(article, article.querySelector('ve-video[sync]') ? false : true) + readMoreSetup() + return article +} + +export { addLink, addScript, articleFromHtml, elFromHtml, getGhFile, getMarkdown, markdownToHtml, mount, observeVisible, setConfig, structureContent } \ No newline at end of file diff --git a/wc/dist/js/ghp.js b/wc/dist/js/ghp.js index e6f6965..b449542 100644 --- a/wc/dist/js/ghp.js +++ b/wc/dist/js/ghp.js @@ -1,1139 +1,42 @@ -import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js"; -import 'https://cdn.jsdelivr.net/npm/marked-footnote/dist/index.umd.min.js' -import * as yaml from 'https://cdn.jsdelivr.net/npm/yaml@2.3.4/browser/index.min.js' +import { addLink, addScript, getMarkdown, markdownToHtml, mount, setConfig } from './ghp-lib.js' window.customEntityData = {} - +console.log(location) const mode = location.hostname === 'localhost' ? 'local' - : location.hostname.indexOf('github.io') > 0 && location.pathname.indexOf('/juncture/') === 0 - ? 'dev' - : 'prod' - -const isMobile = ('ontouchstart' in document.documentElement && /mobi/i.test(navigator.userAgent) ) - -function addLink(attrs) { - console.log('addLink', attrs) - let stylesheet = document.createElement('link') - Object.entries(attrs).map(([key, value]) => stylesheet.setAttribute(key, value)) - document.head.appendChild(stylesheet) -} - -function addScript(attrs) { - console.log('addScript', attrs) - let script = document.createElement('script') - Object.entries(attrs).map(([key, value]) => script.setAttribute(key, value)) - document.head.appendChild(script) -} - -function docReady(fn) { - if (document.readyState === 'complete' || document.readyState === 'interactive') setTimeout(fn, 1) - else document.addEventListener('DOMContentLoaded', fn) -} - -const classes = new Set('left right full sticky'.split(' ')) -const components = { - 've-animated-image': { - booleans: 'autoplay', - positional: 'src caption' - }, - 've-audio': { - booleans: 'autoplay muted no-caption sync', - positional: 'src caption' - }, - 've-breadcrumbs': {}, - 've-compare': { - positional: 'src' - }, - 've-entities': { - booleans: 'cards' - }, - 've-footer': { - }, - 've-gallery': { - booleans: 'caption' - }, - 've-header': { - booleans: 'breadcrumbs no-manifest-popover pdf-download-enabled', - positional: 'title background subtitle options position' - }, - 've-iframe': { - booleans: 'allow-full-screen allow-transparency full left right sticky', - positional: 'src caption' - }, - 've-image': { - booleans: 'no-caption grid static repo-is-writable zoom-on-scroll', - positional: 'src caption' - }, - 've-knightlab-timeline': { - booleans: 'has-bookmark' - }, - 've-map': { - booleans: 'cards full left marker prefer-geojson popup-on-hover zoom-on-scroll zoom-on-click', - positional: 'center caption' - }, - 've-media': { - // booleans: 'no-caption static repo-is-writable zoom-on-scroll', - positional: 'src caption' - }, - 've-menu': { - booleans: 'pdf-download-enabled' - }, - 've-mermaid': {}, - 've-meta': {}, - 've-plant-specimen': { - booleans: 'full left right sticky', - positional: 'qid max' - }, - 've-snippet': {}, - 've-video': { - booleans: 'autoplay muted no-caption sync', - positional: 'src caption' - }, - 've-visjs': { - booleans: 'hierarchical' - } -} -let tagMap = {} -Object.entries(components).forEach(([tag, attrs]) => { - let tagObj = { - booleans : new Set((attrs.booleans || '').split(' ').filter(s => s)), - positional: (attrs.positional || '').split(' ').filter(s => s) - } - tagMap[tag] = tagObj - tagMap[tag.slice(3)] = tagObj -}) - -function parseHeadline(s) { - let tokens = [] - s = s.replace(/”/g,'"').replace(/”/g,'"').replace(/’/g,"'") - s?.match(/[^\s"]+|"([^"]*)"/gmi)?.filter(t => t).forEach(token => { - if (tokens.length > 0 && tokens[tokens.length-1].indexOf('=') === tokens[tokens.length-1].length-1) tokens[tokens.length-1] = `${tokens[tokens.length-1]}${token}` - else tokens.push(token) - }) - let parsed = {} - let tokenIdx = 0 - while (tokenIdx < tokens.length) { - let token = tokens[tokenIdx].replace(//g, '_').replace(/<\/em>/g, '_') - if (token.indexOf('=') > 0 && /^[\w-:]+=/.test(token)) { - let idx = token.indexOf('=') - let key = token.slice(0, idx) - let value = token.slice(idx+1) - value = value[0] === '"' && value[value.length-1] === '"' ? value.slice(1, -1) : value - if (key[0] === ':') { // style - key = camelToKebab(key.slice(1)) - if (!parsed.style) parsed.style = {} - parsed.style[key] = value - } else { // kwargs - if (!parsed.kwargs) parsed.kwargs = {} - if (parsed.kwargs[key]) parsed.kwargs[key] += ` ${value}` - else parsed.kwargs[key] = value - } - } - else if (token[0] === '.' || classes.has(token)) { - let className = token.replace(/^\./,'') - if (parsed.class) parsed.class += ` ${className}` - else parsed.class = className - } - else if (token[0] === '"') { - if (!parsed.args) parsed.args = [] - parsed.args.push(token.slice(1,-1)) - } - else if (/#\w+/.test(token)) parsed['id'] = token.slice(1) - else if (/^Q\d+$/.test(token) && !parsed.tag) { // entity identifier - if (!parsed.entities) parsed.entities = [] - parsed.entities.push(token) - } - else if (tokenIdx === 0 && !parsed.tag && tagMap[token.replace(/^\./,'')]) { - let tag = token.replace(/^\./,'') - parsed.tag = tag.indexOf('ve-') === 0 ? tag : `ve-${tag}` - } else if (token === 'script' || token === 'link') parsed.tag = token - else { - if (parsed.tag === 'script' && !parsed.src) parsed.src = token - else if (parsed.tag === 'link' && !parsed.href) parsed.href= token - else { - let tagObj = tagMap[parsed.tag] - if (tagObj?.booleans.has(token)) { - if (!parsed.booleans) parsed.booleans = [] - parsed.booleans.push(token) - } else { - if (!parsed.args) parsed.args = [] - parsed.args.push(token) - } - } - } - tokenIdx++ - } - - if (parsed.tag && parsed.args) { - let tagObj = tagMap[parsed.tag] - let listArgs = [] - parsed.args.forEach((value, idx) => { - if (idx >= tagObj.positional?.length) { - listArgs.push(value) - } else { - let key = tagObj.positional[idx] - value = value[0] === '"' && value[value.length-1] === '"' ? value.slice(1, -1) : value - if (!parsed.kwargs) parsed.kwargs = {} - if (parsed.kwargs[key]) parsed.kwargs[key] += ` ${value}` - else parsed.kwargs[key] = value - } - }) - if (listArgs.length) parsed.args = listArgs - else delete parsed.args - } - return parsed -} - -function parseCodeEl(codeEl) { - let codeElems = codeEl.textContent?.replace(/\s+\|\s+/g,'\n') - .split('\n') - .map(l => l.trim()) - // .map(l => l.replace(//g, '_').replace(/<\/em>/g, '_')) - .filter(x => x) || [] - let parsed = parseHeadline(codeElems?.[0]) || {} - if (parsed.tag === 've-mermaid') { - parsed.raw = codeEl.textContent.split('\n').slice(1).join('\n') - } else if (parsed.tag === 've-media') { - parsed.tag = 've-image' //TODO: implement ve-media conversion - } else if (parsed.tag === 've-vis-network') { - parsed.tag = 've-visjs' - } else if (codeElems.length > 1) { - parsed.args = parsed.args ? [...parsed.args, ...codeElems.slice(1)] : codeElems.slice(1) - } - return parsed -} - -function makeEl(parsed) { - let el = document.createElement(parsed.tag) - if (parsed.id) el.id = parsed.id - if (parsed.class) parsed.class.split(' ').forEach(c => el.classList.add(c)) - if (parsed.style) el.setAttribute('style', Object.entries(parsed.style).map(([k,v]) => `${k}:${v}`).join(';')) - if (parsed.entities) el.setAttribute('entities', parsed.entities.join(' ')) - if (parsed.kwargs) for (const [k,v] of Object.entries(parsed.kwargs)) el.setAttribute(k, v === true ? '' : v) - if (parsed.booleans) parsed.booleans.forEach(b => el.setAttribute(b, '') ) - if (parsed.args) { - let ul = document.createElement('ul') - el.appendChild(ul) - for (const arg of parsed.args) { - let argEl = new DOMParser().parseFromString(marked.parse(arg.replace(/^\s*-\s*/, '')), 'text/html').body.firstChild - let li = document.createElement('li') - li.innerHTML = argEl.innerHTML.indexOf('wc:') === 0 ? argEl.innerHTML.replace(/([^<]+)<\/em>/g, '_$1_') : argEl.innerHTML - ul.appendChild(li) - } - } - if (parsed.raw) el.textContent = parsed.raw - return el -} - -function deleteAllComments(rootEl) { - var iterator = document.createNodeIterator(rootEl, NodeFilter.SHOW_COMMENT, () => { return NodeFilter.FILTER_ACCEPT}, false); - var curNode - while (curNode = iterator.nextNode()) { curNode.remove() } -} - -function isNumeric(arg) { return !isNaN(arg) } -function camelToKebab(input) { return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()} - -function computeDataId(el) { - let dataId = [] - while (el.parentElement) { - let siblings = Array.from(el.parentElement.children).filter(c => c.tagName === el.tagName) - dataId.push(siblings.indexOf(el) + 1) - el = el.parentElement - } - return dataId.reverse().join('.') -} - -// convert juncture tags to web component elements -function convertTags(rootEl) { - // remove "view as" buttons - Array.from(rootEl.querySelectorAll('a > img')) - .filter(img => img.src.indexOf('ve-button.png') > -1 || img.src.indexOf('wb.svg') > -1) - .forEach(viewAsButton => viewAsButton?.parentElement?.parentElement?.remove()) - - Array.from(rootEl.querySelectorAll('p')) - .filter(p => /^\.ve-\w+\S/.test(p.childNodes.item(0)?.nodeValue?.trim() || '')) - .forEach(p => { - let codeElWrapper = document.createElement('div') - let codeEl = document.createElement('code') - codeElWrapper.appendChild(codeEl) - codeEl.setAttribute('class', 'language-juncture2') - let replacementText = p.innerHTML.trim().slice(1) - .replace(/\n\s*-\s+/g, '\n') - .replace(/[^<]*<\/a>/g, '') - .replace(/^ve-media/, 've-image') - codeEl.textContent = replacementText - p.replaceWith(codeElWrapper) - }) - Array.from(rootEl.querySelectorAll('param')) - .filter(param => Array.from(param.attributes).filter(attr => attr.name.indexOf('ve-') === 0).length) - .filter(param => param.getAttribute('ve-config') === null) - .forEach(param => { - let tag = Array.from(param.attributes).find(attr => attr.name.indexOf('ve-') === 0).name - if (tag) { - let tagObj = tagMap[tag] || {} - let parsed = { tag } - Array.from(param.attributes).forEach(attr => { - if (attr.name !== tag) { - if (tagObj.booleans?.has(attr.name)) { - if (!parsed.booleans) parsed.booleans = [] - parsed.booleans.push(attr.name) - } else { - if (!parsed.kwargs) parsed.kwargs = {} - if (parsed.kwargs[attr.name]) parsed.kwargs[attr.name] += ` ${attr.value}` - else parsed.kwargs[attr.name] = attr.value - } - } - }) - if (!isJunctureV1(rootEl)) param.replaceWith(makeEl(parsed)) - } - }) - rootEl.querySelectorAll('code').forEach(codeEl => { - let parsed = parseCodeEl(codeEl) - // console.log(parsed) - if (parsed.tag) { - if (codeEl.parentElement.tagName === 'PRE') { - codeEl = codeEl.parentElement - codeEl.parentElement.removeAttribute('id') - codeEl.parentElement.removeAttribute('data-id') - codeEl.parentElement.removeAttribute('class') - if (codeEl.parentElement.parentElement) codeEl.parentElement.parentElement.className = 'segment' - if (codeEl.parentElement.tagName === 'DIV' && codeEl.parentElement.children.length === 1) { - codeEl.parentElement.replaceWith(codeEl) - } - } - codeEl.replaceWith(makeEl(parsed)) - } else if (parsed.class || parsed.style || parsed.id || parsed.kwargs) { - let codeWrapper = codeEl.parentElement - let target - let priorEl = codeWrapper.previousElementSibling - if (priorEl?.tagName === 'EM' || priorEl?.tagName === 'STRONG') { - target = document.createElement('span') - target.innerHTML = priorEl.innerHTML - priorEl.replaceWith(target) - } else if (parent?.tagName === 'TD') { - target = parent?.parentElement?.parentElement?.parentElement // table - parent?.parentElement?.remove() // row - } else if (parent?.tagName !== 'UL' && (priorEl?.tagName === 'A' || priorEl?.tagName === 'IMG')) { - target = priorEl - } else { - target = priorEl.children.length === 1 && priorEl.children[0]?.tagName === 'VE-HEADER' - ? codeWrapper.parentElement - : priorEl - } - if (target) { - if (parsed.id) target.id = parsed.id - if (parsed.class) parsed.class.split(' ').forEach(c => target.classList.add(c)) - if (parsed.style) target.setAttribute('style', Object.entries(parsed.style).map(([k,v]) => `${k}:${v}`).join(';')) - if (parsed.entities) target.setAttribute('data-entities', parsed.entities.join(' ')) - if (parsed.kwargs) for (const [k,v] of Object.entries(parsed.kwargs)) target.setAttribute(k, v === true ? '' : v) - } else { - console.log('no target for', parsed) - } - codeWrapper.remove() - } - }) -} - -// Restructure the content to have hierarchical sections and segments -function restructure(rootEl) { - let styleSheet = rootEl.querySelector('style') - deleteAllComments(rootEl) - - // Move child params to be siblings with parent element - rootEl.querySelectorAll('ul, ol').forEach(list => { - let ref = list - list.querySelectorAll('param').forEach(param => { - ref.parentNode.insertBefore(param, ref.nextSibling) - ref = param - }) - }) - - let main = document.createElement('main') - if (styleSheet) main.appendChild(styleSheet.cloneNode(true)) - - main.className = 'page-content markdown-body' - main.setAttribute('aria-label', 'Content') - main.setAttribute('data-theme', 'light') - if (rootEl.style) main.setAttribute('style', rootEl.style.cssText) - let currentSection = main; - let sectionParam - - // Converts empty headings (changed to paragraphs by markdown converter) to headings with the correct level - Array.from(rootEl?.querySelectorAll('p')) - .filter(p => /^[#*]{1,6}$/.test(p.childNodes.item(0)?.nodeValue?.trim() || '')) - .forEach(p => { - let ptext = p.childNodes.item(0).nodeValue?.trim() - let codeEl = p.querySelector('code') - let heading = document.createElement(`h${ptext?.length}`) - p.replaceWith(heading) - if (codeEl) { - let codeWrapper = document.createElement('p') - codeWrapper.appendChild(codeEl) - heading.parentElement?.insertBefore(codeWrapper, heading.nextSibling) - } - }) - - Array.from(rootEl?.querySelectorAll('p, li')) - .filter(p => /==.+=={.+}/.test(p.textContent?.trim() || '')) - .forEach(el => { - let replHtml = [] - let matches = Array.from(el.innerHTML.matchAll(/==(?[^=]+)=={(?[^}]+)}/g)) - matches.forEach((match, idx) => { - if (idx === 0) replHtml.push(el.innerHTML.slice(0, match.index)) - if (match.groups) { - let {text, attrs} = match.groups - if (/\s*Q\d+\s*/.test(attrs)) { - replHtml.push(`${text}`) - } else if (attrs.indexOf('=') > 0) { - let [key, value] = attrs.split('=') - if (value[0] !== '"') attrs = `${key}="${value}"` - replHtml.push(`${text}`) - } - replHtml.push(el.innerHTML.slice(match.index + match[0].length, matches[idx+1]?.index || el.innerHTML.length)) - } - }) - el.innerHTML = replHtml.join('') - }) - - // For compatibility with Juncture V1 - Array.from(rootEl?.querySelectorAll('param')) - .filter(param => Array.from(param.attributes).filter(attr => attr.name.indexOf('ve-') === 0).length === 0) - .forEach(param => { - let priorEl = param.previousElementSibling - param.classList.forEach(c => priorEl?.classList.add(c)) - let idAttr = Array.from(param.attributes).find(attr => attr.name === 'id') - let styleAttr = Array.from(param.attributes).find(attr => attr.name === 'style') - if (idAttr || styleAttr) { - if (idAttr) priorEl?.setAttribute('id', idAttr.value) - if (styleAttr) priorEl?.setAttribute('style', styleAttr.value) - param.remove() - } - }) - - Array.from(rootEl?.children || []).forEach(el => { - if (el.tagName[0] === 'H' && isNumeric(el.tagName.slice(1))) { - let heading = el - let sectionLevel = parseInt(heading.tagName.slice(1)) - if (currentSection) { - (Array.from(currentSection.children)) - .filter(child => !/^H\d/.test(child.tagName)) - .filter(child => !/PARAM/.test(child.tagName)) - .filter(child => !/STYLE/.test(child.tagName)) - .filter(child => !/^VE--/.test(child.tagName)) - .forEach((child, idx) => { - let segId = `${currentSection.getAttribute('data-id') || 0}.${idx+1}` - child.setAttribute('data-id', segId) - child.id = segId - child.classList.add('segment') - }) - } - - currentSection = document.createElement('section') - currentSection.classList.add(`section${sectionLevel}`) - Array.from(heading.classList).forEach(c => currentSection.classList.add(c)) - heading.className = '' - if (heading.id) { - currentSection.id = heading.id - heading.removeAttribute('id') - } - - currentSection.innerHTML += heading.outerHTML - - let headings = [] - for (let lvl = 1; lvl < sectionLevel; lvl++) { - headings = [...headings, ...Array.from(main.querySelectorAll(`H${lvl}`)).filter(h => h.parentElement.tagName === 'SECTION')] - } - - let parent = (sectionLevel === 1 || headings.length === 0) - ? main - : headings.pop()?.parentElement - parent?.appendChild(currentSection) - currentSection.setAttribute('data-id', computeDataId(currentSection)) - - } else { - if (el.tagName !== 'PARAM') { - let segId = `${currentSection.getAttribute('data-id') || 0}.${currentSection.children.length}` - el.setAttribute('data-id', segId) - el.id = segId - el.classList.add('segment') - } - if (el !== sectionParam) { - currentSection.innerHTML += el.outerHTML - } - } - }) - - Array.from(main.querySelectorAll('a')) - .filter(anchorElem => anchorElem.href.indexOf('mailto:') < 0) - .forEach(anchorElem => { - let link - try { - link = new URL(anchorElem.href) - } catch (e) { - console.log(e) - console.log(anchorElem.href) - return - } - let path = link.pathname.split('/').filter(p => p) - if (path.length === 0) return - let qid = /^Q\d+$/.test(path[path.length-1]) ? path[path.length-1] : null - let isEntityPath = path.find(pe => pe[0] === '~') - if (qid || isEntityPath) { - let mdpEntityInfobox = document.createElement('ve-entity-infobox') - mdpEntityInfobox.innerHTML = anchorElem.innerHTML - if (qid) mdpEntityInfobox.setAttribute('qid', qid) - else { - let pathIdx = (window.config?.baseurl && link.pathname.indexOf(window.config?.baseurl) === 0) ? 1 : 0 - mdpEntityInfobox.setAttribute('file', path.slice(pathIdx).map(pe => pe.replace(/~/,'')).filter(pe => pe).join('/')) - } - anchorElem.replaceWith(mdpEntityInfobox) - } - }) - - configCustomClasses(main) - - let header, footer - let article = document.createElement('article') - - if (isJunctureV1(rootEl)) { - article.classList.add('j1') - let veConfig = main.querySelector('param[ve-config]') - header = document.createElement('ve-header') - header.className = 'sticky' - Array.from(veConfig?.attributes || []).forEach(attr => { - if (attr.name === 'banner') header.setAttribute('background', attr.value) - if (attr.name === 'title') header.setAttribute('title', attr.value) - if (attr.name === 'subtitle' || attr.name === 'author') header.setAttribute('subtitle', attr.value) - }) - article.appendChild(header) - veConfig?.remove() - } else { - header = main.querySelector('ve-header') - if (header) { - let toRemove = header - while (toRemove.parentElement.tagName !== 'MAIN') toRemove = toRemove.parentElement - article.appendChild(header) - toRemove.remove() - } - } - - article.appendChild(main) - - footer = main.querySelector('ve-footer') - if (footer) { - // let toRemove = footer - // while (toRemove.parentElement.tagName !== 'MAIN') toRemove = toRemove.parentElement - article.appendChild(footer) - // toRemove.remove() - } - - return article -} - -function configCustomClasses(rootEl) { - let cardCtr = 0 - - rootEl.querySelectorAll('section').forEach(section => { - - if (section.classList.contains('cards') && !section.classList.contains('wrapper')) { - section.classList.remove('cards') - let wrapper = document.createElement('section') - wrapper.className = 'cards wrapper' - Array.from(section.children).slice(1).forEach(card => { - wrapper.appendChild(card) - card.classList.add('card') - let heading = card.querySelector('h1, h2, h3, h4, h5, h6') - if (heading) heading.remove() - let img = card.querySelector('p > img') - if (img) img.parentElement?.replaceWith(img) - let link = card.querySelector('p > a') - if (link) link.parentElement?.replaceWith(link) - card.querySelectorAll('p').forEach(p => { - ++cardCtr - let readMoreWrapper = document.createElement('div') - readMoreWrapper.className = 'read-more' - let input = document.createElement('input') - input.setAttribute('type', 'checkbox') - input.id = `read-more-${cardCtr}` - readMoreWrapper.appendChild(input) - let para = document.createElement('p') - para.innerHTML = p.innerHTML - readMoreWrapper.appendChild(para) - let label = document.createElement('label') - label.setAttribute('for', `read-more-${cardCtr}`) - label.setAttribute('role', 'button') - label.innerHTML = 'More' - readMoreWrapper.appendChild(label) - p.replaceWith(readMoreWrapper) - }) - }) - section.appendChild(wrapper) - } - - if (section.classList.contains('tabs')) { - let tabGroup = document.createElement('sl-tab-group'); - Array.from(section.classList).forEach(cls => tabGroup.classList.add(cls)) - Array.from(section.attributes).forEach(attr => tabGroup.setAttribute(attr.name, attr.value)) - Array.from(section.querySelectorAll(':scope > section')) - .forEach((tabSection, idx) => { - let tab = document.createElement('sl-tab') - tab.setAttribute('slot', 'nav') - tab.setAttribute('panel', `tab${idx+1}`) - tab.innerHTML = tabSection.querySelector('h1, h2, h3, h4, h5, h6')?.innerHTML || '' - tabGroup.appendChild(tab) - }) - Array.from(section.querySelectorAll(':scope > section')) - .forEach((tabSection, idx) => { - let tabPanel = document.createElement('sl-tab-panel') - tabPanel.setAttribute('name', `tab${idx+1}`) - let tabContent = Array.from(tabSection.children).slice(1).map(el => el.outerHTML).join(' ') - tabPanel.innerHTML = tabContent - tabGroup.appendChild(tabPanel) - }) - section.replaceWith(tabGroup) - } - - if ((section.classList.contains('columns') || section.classList.contains('mcol')) && !section.classList.contains('wrapper')) { - let wrapper = document.createElement('section') - wrapper.className = 'columns wrapper' - section.classList.remove('columns') - section.classList.remove('mcol') - Array.from(section.children) - .filter(child => child.tagName === 'SECTION') - .forEach((col, idz) => { - wrapper.appendChild(col) - col.classList.add(`col-${idz+1}`) - }) - section.appendChild(wrapper) - } - }) -} - -function restructureForJ1(article) { - - function serializeProps(props) { - return Object.entries(props).map(([key, value]) => `${key}="${value}"`).join(' ').replace(/“/g, '"').replace(/”/g, '"') - } - - Array.from(article.querySelectorAll('[data-id]')).forEach(seg => { - if (seg.tagName === 'SECTION') return - - if (!seg.innerHTML.trim()) { // remove empty segments - seg.remove() - return - } - - let id = seg.getAttribute('data-id') || '' - let wrapper = document.createElement('div') - wrapper.setAttribute('data-id', id) - wrapper.id = id - wrapper.className = seg.className - seg.removeAttribute('id') - seg.removeAttribute('data-id') - seg.className = '' - wrapper.appendChild(seg.cloneNode(true)) - let viewersDiv = document.createElement('div') - - viewersDiv.setAttribute('data-id', id) - viewersDiv.className = 'viewers' - - let params = [] - let sib = seg.nextSibling - while (sib && sib.tagName === 'PARAM') { - params.push(sib) - sib = sib.nextSibling - } - params.forEach(p => viewersDiv.appendChild(p)) - wrapper.appendChild(viewersDiv) - - seg.replaceWith(wrapper) - }) - - Array.from(article.querySelectorAll('[data-id]')).forEach(seg => { - if (seg.tagName === 'SECTION') return - let id = seg.getAttribute('data-id') || '' - let para = seg.querySelector('p, ol, ul') - let viewersDiv = seg.querySelector('.viewers') - if (!viewersDiv) return - - const params = Array.from(viewersDiv.querySelectorAll(':scope > param')) - .map((param, idx) => ({ ...Object.fromEntries(Array.from(param.attributes).map(a => [a.name, a.value])), ...{idx} })) - let idx = params.length - let parent = viewersDiv.parentElement - while (parent && parent.tagName !== 'ARTICLE') { - Array.from(parent.querySelectorAll(':scope > param')).forEach(param => { - params.push({...Object.fromEntries(Array.from(param.attributes).map(a => [a.name, a.value])), ...{idx} }) - idx++ - }) - parent = parent.parentElement - } - - const veTags = {} - params.forEach(p => { - let tag = Object.keys(p).find(k => k.indexOf('ve-') === 0 && !p[k]) - if (!tag) { - tag = 've-entity' - p[tag] = '' - } else if (tag === 've-d3plus-ring-network') { - tag = 've-visjs' - } - if (!veTags[tag]) veTags[tag] = [] - veTags[tag].push(p) - }) - - let entities = [] - Object.values(veTags['ve-entity'] || []).forEach(veEntity => { - let qid = veEntity.eid || veEntity.qid - let aliases = veEntity.aliases?.split('|').filter(a => a) || [] - let file = veEntity.file ||veEntity.article - if (aliases.length || file) { - if (!window.customEntityData[qid]) window.customEntityData[qid] = {aliases: aliases, file: file} - } - entities.push(qid) - }) - delete veTags['ve-entity'] + : import.meta.url.indexOf('https://cdn.jsdelivr.net/npm/juncture-digital') === 0 + ? 'prod' + : 'dev' - para?.setAttribute('data-entities', entities.join(' ')) +const base = mode === 'prod' + ? import.meta.url.replace(/\/js\/ghp\.js$/, '') + : import.meta.url.replace(/\/ghp\.js$/, '/wc/dist') - function propsList(tagProps) { - let ul = document.createElement('ul') - tagProps.forEach(tp => { - let li = document.createElement('li') - li.innerText = serializeProps(tp) - ul.appendChild(li) - }) - return ul - } - - function setElProps(el, props, nameMap) { - Object.entries(props) - .filter(([key, value]) => nameMap[key] !== undefined) - .forEach(([key, value]) => { - el.setAttribute(nameMap[key] || key, value === 'false' ? '' : value === 'true' ? null : value) - }) - } - - function makeViewerEl(tagName, slotName, tagProps) { - let viewerEl = document.createElement(tagName) - viewerEl.setAttribute('slot', slotName) - if (slotName === 've-compare') { - setElProps(viewerEl, tagProps[0], {caption:''}) - viewerEl.appendChild(propsList(tagProps)) - } else if (slotName === 've-iframe') { - setElProps(viewerEl, tagProps[0], {allow:'', allowfullscreen:'', allowtransparency:'', caption:'', frameborder:'', loading:'', name:'', src:''}) - } else if (slotName === 've-image' || slotName === 've-gallery') { - if (tagProps.length === 1) { - setElProps(viewerEl, tagProps[0], {attribution:'', caption:'', data:'', 'data-id':'', description:'', 'fit':'', label:'', license:'', manifest:'', refresh:'', region:'', rotate:'', rotation:'', seq:'', src:'', title:'', url:'', 'zoom-on-scroll':''}) - } else { - setElProps(viewerEl, tagProps[0], {'zoom-on-scroll':''}) - viewerEl.appendChild(propsList(tagProps)) - } - } else if (slotName === 've-knightlab-timeline') { - setElProps(viewerEl, tagProps[0], {caption:'', 'hash-bookmark':'', 'initial-zoom':'', source:'', 'timenav-position':''}) - } else if (slotName === 've-map') { - setElProps(viewerEl, tagProps[0], {basemap:'basemaps', caption:'', center:'', data:'', 'data-id':'', entities:'', 'gesture-handling':'', 'gh-dir':'', marker:'', overlay:'', 'prefer-geojson':'', 'scroll-wheel-zoom':'', title:'', zoom:'', 'zoom-on-click':''}) - viewerEl.appendChild(propsList(tagProps.slice(1))) - } else if (slotName === 've-plant-specimen') { - setElProps(viewerEl, tagProps[0], {caption:'', eid:'', jpid:'', max:'', qid:'', 'taxon-name':'', wdid:''}) - } else if (slotName === 've-video') { - setElProps(viewerEl, tagProps[0], {alt:'', autoplay:'', caption:'', 'data-id':'', end:'', fit:'', id:'', muted:'', 'no-caption':'', poster:'', src:'', start:'', sync:'', vid:''}) - } else if (slotName === 've-visjs') { - setElProps(viewerEl, tagProps[0], {caption:'', edges:'', hierarchical:'', nodes:'', title:'caption', url:''}) - } else if (slotName === 'data') { - viewerEl.appendChild(propsList(tagProps)) - } else { - console.log(`makeViewer: slotName ${slotName} not recognized, props=${Object.keys(tagProps[0] || {})}`) - } - return viewerEl - } - - let j1Viewers = document.createElement('ve-j1-viewers-slots') - j1Viewers.dataset.id = id - viewersDiv.appendChild(j1Viewers) - j1Viewers.setAttribute('viewers', [ - ...Object.keys(veTags).filter(tag => tag !== 've-map-marker' && tag !== 've-map-layer'), - ...(mode === 'dev' ? ['data'] : []) - ].join(' ')) - - Object.entries(veTags).forEach(([tag, tagProps]) => { - if (tag === 've-map-marker' || tag === 've-map-layer') return - tagProps[0].entities = entities.join(' ') - tagProps[0]['data-id'] = j1Viewers.dataset.id - if (tag === 've-map') { - j1Viewers.appendChild(makeViewerEl('ve-map', tag, - [...tagProps, - ...Object.values(veTags['ve-map-marker'] || {}), ...Object.values(veTags['ve-map-layer'] || {}) - ].sort((a,b) => a.idx - b.idx) - )) - } else { - j1Viewers.appendChild(makeViewerEl(tag, tag, tagProps)) - } - }) - j1Viewers.appendChild(makeViewerEl('div', 'data', params)) - - }) - - Array.from(article.querySelectorAll('.segment')).forEach(seg => { - let viewers = seg.children[1] - let parent = seg.parentElement - while (parent && parent.tagName !== 'ARTICLE') { - parent.querySelectorAll(':scope > param').forEach(param => viewers.appendChild(param.cloneNode(true))) - parent = parent.parentElement - } - }) - - let main = article.querySelector('main') - let mainWrapper = document.createElement('main') - mainWrapper.className = 'page-content markdown-body' - let content = document.createElement('div') - content.className = 'content' - content.innerHTML = main.innerHTML - let viewers = document.createElement('div') - viewers.className = 'viewers' - mainWrapper.appendChild(content) - mainWrapper.appendChild(viewers) - main.replaceWith(mainWrapper) - - return article -} - -function setStickyOffsets(root) { - function topIsVisible(el) { - let bcr = el.getBoundingClientRect() - return el.tagName === 'VE-HEADER' || el.tagName === 'VE-BREADCRUMBS' || (bcr.top >= 0 && bcr.top <= window.innerHeight) - } - - let stickyElems = Array.from(root.querySelectorAll('.sticky')) - .filter(stickyEl => topIsVisible(stickyEl)) - .sort((a,b) => { - let aTop = a.getBoundingClientRect().top - let bTop = b.getBoundingClientRect().top - return aTop < bTop ? -1 : 1 - }) - - if (stickyElems.length > 1) { - stickyElems[0].style.zIndex = `${stickyElems.length}` - for (let i = 1; i < stickyElems.length; i++) { - let bcr = stickyElems[i].getBoundingClientRect() - let left = bcr.x - let right = bcr.x + bcr.width - for (let j = i-1; j >= 0; --j) { - let priorSticky = stickyElems[j] - let bcrPrior = priorSticky.getBoundingClientRect() - let leftPrior = bcrPrior.x - let rightPrior = bcrPrior.x + bcrPrior.width - if ((leftPrior <= right) && (rightPrior >= left)) { - let priorTop = parseInt(priorSticky.style.top.replace(/px/,'')) || 0 - if (stickyElems[i].style) { - stickyElems[i].style.top = `${Math.floor(priorTop + bcrPrior.height)}px` - } - break - } - } - } - } -} - -let priorActiveParagraph -let currentActiveParagraph - -function observeVisible(rootEl, setActiveParagraph, offset=0) { - setActiveParagraph = setActiveParagraph || false - let topMargin = offset + Array.from(rootEl.querySelectorAll('VE-HEADER')) - .map(stickyEl => (parseInt(stickyEl.style.top.replace(/px/,'')) || 0) + stickyEl.getBoundingClientRect().height)?.[0] || 0 - - isJunctureV1 = true - - const visible = {} - const observer = new IntersectionObserver((entries, observer) => { +console.log(`mode=${mode} base=${base}`) - for (const entry of entries) { - let para = entry.target - let paraId = para.id || para.parentElement?.id || '' - let intersectionRatio = entry.intersectionRatio - if (intersectionRatio > 0) visible[paraId] = {para, intersectionRatio} - else delete visible[paraId] - } - - let sortedVisible = Object.values(visible) - .sort((a,b) => b.intersectionRatio - a.intersectionRatio || a.para.getBoundingClientRect().top - b.para.getBoundingClientRect().top) - - if (setActiveParagraph) { - currentActiveParagraph = sortedVisible[0]?.para - } else { - let found = sortedVisible.find(e => e.para.classList.contains('active')) - if (found) currentActiveParagraph = found.para - } - - if (currentActiveParagraph !== priorActiveParagraph) { - - let priorViewers, currentViewers - if (isJunctureV1) { - priorViewers = priorActiveParagraph?.nextElementSibling - currentViewers = currentActiveParagraph?.nextElementSibling - if (priorViewers) priorViewers.classList.remove('active') - } - - priorActiveParagraph = currentActiveParagraph - if (setActiveParagraph) { - rootEl.querySelectorAll('p.active, ol.active, ul.active').forEach(p => p.classList.remove('active')) - currentActiveParagraph?.classList.add('active') - if (currentViewers) currentViewers.classList.add('active') - } - - setStickyOffsets(rootEl) - } - - }, { root: null, threshold: [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0], rootMargin: `${topMargin ? -topMargin : 0}px 0px 0px 0px`}) - - // target the elements to be observed - rootEl.querySelectorAll('p, .segment > ol, .segment > ul').forEach((paragraph) => observer.observe(paragraph)) -} - -async function getMarkdown(ghSource) { - let [owner, repo, branch, ...path] = ghSource.split('/').filter(pe => pe) - path = path.join('/') - let extension = ghSource.slice(-3) - // console.log(`getMarkdown: ghSource=${ghSource} owner=${owner} repo=${repo} branch=${branch} path=${path} extension=${extension}`) - if (extension === '.md') { - let resp = await getGhFile(owner, repo, branch, path) - return resp.content - } else { - return await Promise.all([ - getGhFile(owner, repo, branch, `${path}.md`), - getGhFile(owner, repo, branch, `${path}/README.md`), - getGhFile(owner, repo, branch, `${path}/index.md`) - ]).then(resp => { - let found = resp.find(r => r?.status === 200) - return found?.content || '' - }) - } -} - -function setMeta() { - let meta - let header - Array.from(document.getElementsByTagName('*')).forEach(el => { - if (!/^\w+-\w+/.test(el.tagName)) return - if (el.tagName.split('-')[1] === 'META') meta = el - else if (el.tagName.split('-')[1] === 'HEADER') header = el - }) - if (!meta) meta = document.querySelector('param[ve-config]') - - let firstHeading = document.querySelector('h1, h2, h3')?.innerHTML.trim() - let firstParagraph = Array.from(document.querySelectorAll('p')) - .find(p => { - let ptext = p.childNodes.item(0).nodeValue?.trim() - return p.childNodes[0].tagName !== 'CODE' && ptext?.length && !/^\.\w+-\w+/.test(ptext) - })?.innerHTML.trim() - - let jldEl = document.querySelector('script[type="application/ld+json"]') - let seo = jldEl ? JSON.parse(jldEl.innerText) : {'@context':'https://schema.org', '@type':'WebSite', description:'', headline:'', name:'', url:''} - seo.url = location.href - - let title = meta?.getAttribute('title') - ? meta.getAttribute('title') - : window.config?.title - ? window.config.title - : header?.getAttribute('label') - ? header.getAttribute('label') - : firstHeading || '' - - let description = meta?.getAttribute('description') - ? meta.getAttribute('description') - : window.config?.description - ? window.config.description - : firstParagraph || '' - - let robots = meta?.getAttribute('robots') - ? meta?.getAttribute('robots') - : window.config?.robots - ? window.config.robots - : '' - - if (title) { - document.title = title - seo.name = title - seo.headline = title - document.querySelector('meta[name="og:title"]')?.setAttribute('content', title) - document.querySelector('meta[property="og:site_name"]')?.setAttribute('content', title) - document.querySelector('meta[property="twitter:title"]')?.setAttribute('content', title) - } - if (description) { - document.querySelector('meta[name="description"]')?.setAttribute('content', description) - document.querySelector('meta[property="og:description"]')?.setAttribute('content', description) - seo.description = description - } - if (robots) { - let robotsMeta = document.createElement('meta') - robotsMeta.setAttribute('name', 'robots') - robotsMeta.setAttribute('content', robots) - document.head.appendChild(robotsMeta) - } - - // if (meta && meta.getAttribute('ve-config') === null) meta.remove() - if (jldEl) jldEl.innerText = JSON.stringify(seo) - - return {meta: {title, description, robots, seo}} -} - -function isJunctureV1(contentEl) { - return contentEl.querySelector('param[ve-config]') ? true : false -} - -// set the configuration -function setConfig() { - window.config = { - ...yaml.parse(window.options || ''), - ...(window.jekyll || {}), - ...(window.config || {}), - ...{ - baseurl: window.jekyll?.site.baseurl || location.hostname.indexOf('github.io') > 0 ? `/${location.pathname.split('/')[1]}/` : '/', - source: { - owner: window.jekyll?.site.github.owner_name, - repository: window.jekyll?.site.github.repository_name, - branch: window.jekyll?.site.github.source.branch, - dir: window.jekyll?.page.dir, - path: window.jekyll?.page.path, - name: window.jekyll?.page.name - } - }, - ...setMeta() - } - let contentEl = document.createElement('main') - contentEl.innerHTML = window.config.content || document.body.innerHTML - window.config.isJunctureV1 = isJunctureV1(contentEl) - console.log(window.config) -} - -function readMoreSetup() { - const ps = document.querySelectorAll('.read-more p') - const observer = new ResizeObserver(entries => { - for (let entry of entries) { - entry.target.classList[entry.target.scrollHeight > (entry.contentRect.height + 10) ? 'add' : 'remove']('truncated') - } - }) - ps.forEach(p => observer.observe(p)) -} - -function setViewersPosition() { - let header = document.querySelector('ve-header') - let viewers = document.querySelector('.viewers') - let top = header.getBoundingClientRect().top - let height = header.getBoundingClientRect().height - let offset = top + height - if (viewers) { - viewers.style.top = `${offset}px` - viewers.style.height = `calc(100dvh - ${offset+2}px)` - } -} - -function elFromHtml(html) { - return new DOMParser().parseFromString(html, 'text/html').querySelector('body') -} - -async function getGhFile(acct, repo, branch, path) { - // console.log(`getFile: acct=${acct} repo=${repo} branch=${branch} path=${path}`) - let url = `https://api.github.com/repos/${acct}/${repo}/contents/${path}?ref=${branch}` - let resp = await fetch(url, {cache: 'no-cache'}) - if (resp.ok) { - let payload = await resp.json() - let content = decodeURIComponent(escape(atob(payload.content))) - return {status: resp.status, content} - } else if (resp.status === 403 || resp.status === 401) { // access problem, possibly api rate limit exceeded - url = `https://raw.githubusercontent.com/${acct}/${repo}/${branch}/${path}` - resp = await fetch(url) - if (resp.ok) { - let content = await resp.text() - return {status: resp.status, content} - } else { - return {status: resp.status, content: null} - } - } else { - return {status: resp.status, content: null} - } -} - -function markdownToHtml(markdown) { - return marked.use(window.markedFootnote()).parse(markdown) -} - -function structureContent(html) { - let contentEl = document.createElement('main') - contentEl.innerHTML = html - convertTags(contentEl) - - let article = restructure(contentEl) - if (isJunctureV1(contentEl)) article = restructureForJ1(article) - return article -} - -function articleFromHtml(html) { - let contentEl = document.createElement('main') - contentEl.innerHTML = html - convertTags(contentEl) - let article = restructure(contentEl) - if (isJunctureV1(contentEl)) article = restructureForJ1(article) - return article -} - -// mount the content -function mount(mountPoint, html) { - html = html || window.config.content || document.body.innerHTML - mountPoint = mountPoint || document.querySelector('body > article, body > main, body > section') - if (!mountPoint) { - mountPoint = document.createElement('article') - document.body.innerHTML = mountPoint.outerHTML - } - - let article = articleFromHtml(html) - - mountPoint.replaceWith(article) - if (window.config.isJunctureV1 && !isMobile) { - document.addEventListener('scroll', () => setViewersPosition()) - setTimeout(() => setViewersPosition(), 100) - } - - observeVisible(article, article.querySelector('ve-video[sync]') ? false : true) - readMoreSetup() - return article -} - if (!window.config) setConfig() let scripts = Array.from(document.getElementsByTagName('script')).filter(script => script.src).map(script => script.src) let stylesheets = Array.from(document.getElementsByTagName('link')).filter(link => link.type == 'text/css'&& link.href).map(link => link.href) let hasGhpJs = scripts.find(src => src.indexOf('ghp.js') > 0) !== undefined -let hasWcJs = scripts.find(src => src === 'http://localhost:5173/main.ts' || src === 'https://cdn.jsdelivr.net/npm/juncture-digital/js/index.js' || src.indexOf('wc/dist/js/index.js') > 0) !== undefined -let hasWcCss = stylesheets.find(href => href === 'http://localhost:8080/wc/src/index.css' || href === 'https://cdn.jsdelivr.net/npm/juncture-digital/css/index.css' || href.indexOf('wc/dist/css/index.css') > 0) !== undefined +let hasWcJs = scripts.find(src => src === 'http://localhost:5173/main.ts' || src === `${base}/js/index.js`) !== undefined +let hasWcCss = stylesheets.find(href => href === `${base}/css/index.css`) !== undefined let isMounted = document.querySelector('body > article') !== null if (!hasWcCss) { - addLink({rel: 'stylesheet', type: 'text/css', - href: mode === 'local' - ? 'http://localhost:8080/wc/src/index.css' - : mode === 'prod' - // ? 'https://cdn.jsdelivr.net/npm/juncture-digital/css/index.css' - ? 'https://rdsnyder.github.io/juncture/wc/dist/css/index.css' - : `${window.config.baseurl}wc/dist/css/index.css` - }) + addLink({rel: 'stylesheet', type: 'text/css', href: `${base}/css/index.css`}) hasWcCss = true } if (!hasWcJs) { - addScript({type: 'module', - src: mode === 'local' - ? 'http://localhost:5173/main.ts' - : mode === 'prod' - // ? 'https://cdn.jsdelivr.net/npm/juncture-digital/js/index.js' - ? 'https://rdsnyder.github.io/juncture/wc/dist/js/index.js' - : `${window.config.baseurl}wc/dist/js/index.js` - }) - hasGhpJs = true + addScript({type: 'module', src: mode === 'local' ? 'http://localhost:5173/main.ts' : `${base}/js/index.js`}) + hasWcJs = true +} + +function docReady(fn) { + if (document.readyState === 'complete' || document.readyState === 'interactive') setTimeout(fn, 1) + else document.addEventListener('DOMContentLoaded', fn) } docReady(function() { @@ -1141,4 +44,4 @@ docReady(function() { if (hasGhpJs && hasWcJs && hasWcCss && !isMounted) mount() }) -export { articleFromHtml, elFromHtml, getGhFile, getMarkdown, markdownToHtml, mount, observeVisible, structureContent } \ No newline at end of file +export { mount, getMarkdown, markdownToHtml } \ No newline at end of file diff --git a/wc/dist/js/index.js b/wc/dist/js/index.js index 367b01c..8059824 100644 --- a/wc/dist/js/index.js +++ b/wc/dist/js/index.js @@ -1,4 +1,4 @@ -var V3=Object.defineProperty;var G3=(F,W,q)=>W in F?V3(F,W,{enumerable:!0,configurable:!0,writable:!0,value:q}):F[W]=q;var Sv=(F,W,q)=>(G3(F,typeof W!="symbol"?W+"":W,q),q),W3=(F,W,q)=>{if(!W.has(F))throw TypeError("Cannot "+q)};var uI=(F,W,q)=>{if(W.has(F))throw TypeError("Cannot add the same private member more than once");W instanceof WeakSet?W.add(F):W.set(F,q)};var NC=(F,W,q)=>(W3(F,W,"access private method"),q);import{marked as marked$1}from"https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js";import"https://cdn.jsdelivr.net/npm/marked-footnote/dist/index.umd.min.js";import*as yaml from"https://cdn.jsdelivr.net/npm/yaml@2.3.4/browser/index.min.js";(function(){const W=document.createElement("link").relList;if(W&&W.supports&&W.supports("modulepreload"))return;for(const X of document.querySelectorAll('link[rel="modulepreload"]'))K(X);new MutationObserver(X=>{for(const tt of X)if(tt.type==="childList")for(const rt of tt.addedNodes)rt.tagName==="LINK"&&rt.rel==="modulepreload"&&K(rt)}).observe(document,{childList:!0,subtree:!0});function q(X){const tt={};return X.integrity&&(tt.integrity=X.integrity),X.referrerPolicy&&(tt.referrerPolicy=X.referrerPolicy),X.crossOrigin==="use-credentials"?tt.credentials="include":X.crossOrigin==="anonymous"?tt.credentials="omit":tt.credentials="same-origin",tt}function K(X){if(X.ep)return;X.ep=!0;const tt=q(X);fetch(X.href,tt)}})();const index$1="",scriptRel="modulepreload",assetsURL=function(F){return"https://cdn.jsdelivr.net/npm/juncture-digital/"+F},seen={},__vitePreload=function(W,q,K){if(!q||q.length===0)return W();const X=document.getElementsByTagName("link");return Promise.all(q.map(tt=>{if(tt=assetsURL(tt),tt in seen)return;seen[tt]=!0;const rt=tt.endsWith(".css"),ot=rt?'[rel="stylesheet"]':"";if(!!K)for(let uo=X.length-1;uo>=0;uo--){const po=X[uo];if(po.href===tt&&(!rt||po.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${tt}"]${ot}`))return;const yn=document.createElement("link");if(yn.rel=rt?"stylesheet":scriptRel,rt||(yn.as="script",yn.crossOrigin=""),yn.href=tt,document.head.appendChild(yn),rt)return new Promise((uo,po)=>{yn.addEventListener("load",uo),yn.addEventListener("error",()=>po(new Error(`Unable to preload CSS for ${tt}`)))})})).then(()=>W()).catch(tt=>{const rt=new Event("vite:preloadError",{cancelable:!0});if(rt.payload=tt,window.dispatchEvent(rt),!rt.defaultPrevented)throw tt})};function makeMap(F,W){const q=Object.create(null),K=F.split(",");for(let X=0;X!!q[X.toLowerCase()]:X=>!!q[X]}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,onRE=/^on[^a-z]/,isOn=F=>onRE.test(F),isModelListener=F=>F.startsWith("onUpdate:"),extend$8=Object.assign,remove$1=(F,W)=>{const q=F.indexOf(W);q>-1&&F.splice(q,1)},hasOwnProperty$f=Object.prototype.hasOwnProperty,hasOwn$l=(F,W)=>hasOwnProperty$f.call(F,W),isArray$j=Array.isArray,isMap=F=>toTypeString(F)==="[object Map]",isSet=F=>toTypeString(F)==="[object Set]",isFunction$2=F=>typeof F=="function",isString$3=F=>typeof F=="string",isSymbol$8=F=>typeof F=="symbol",isObject$p=F=>F!==null&&typeof F=="object",isPromise=F=>isObject$p(F)&&isFunction$2(F.then)&&isFunction$2(F.catch),objectToString$4=Object.prototype.toString,toTypeString=F=>objectToString$4.call(F),toRawType=F=>toTypeString(F).slice(8,-1),isPlainObject$1=F=>toTypeString(F)==="[object Object]",isIntegerKey=F=>isString$3(F)&&F!=="NaN"&&F[0]!=="-"&&""+parseInt(F,10)===F,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=F=>{const W=Object.create(null);return q=>W[q]||(W[q]=F(q))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(F=>F.replace(camelizeRE,(W,q)=>q?q.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(F=>F.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(F=>F.charAt(0).toUpperCase()+F.slice(1)),toHandlerKey=cacheStringFunction(F=>F?`on${capitalize(F)}`:""),hasChanged=(F,W)=>!Object.is(F,W),invokeArrayFns=(F,W)=>{for(let q=0;q{Object.defineProperty(F,W,{configurable:!0,enumerable:!1,value:q})},looseToNumber=F=>{const W=parseFloat(F);return isNaN(W)?F:W},toNumber=F=>{const W=isString$3(F)?Number(F):NaN;return isNaN(W)?F:W};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function normalizeStyle(F){if(isArray$j(F)){const W={};for(let q=0;q{if(q){const K=q.split(propertyDelimiterRE);K.length>1&&(W[K[0].trim()]=K[1].trim())}}),W}function normalizeClass(F){let W="";if(isString$3(F))W=F;else if(isArray$j(F))for(let q=0;qisString$3(F)?F:F==null?"":isArray$j(F)||isObject$p(F)&&(F.toString===objectToString$4||!isFunction$2(F.toString))?JSON.stringify(F,replacer,2):String(F),replacer=(F,W)=>W&&W.__v_isRef?replacer(F,W.value):isMap(W)?{[`Map(${W.size})`]:[...W.entries()].reduce((q,[K,X])=>(q[`${K} =>`]=X,q),{})}:isSet(W)?{[`Set(${W.size})`]:[...W.values()]}:isObject$p(W)&&!isArray$j(W)&&!isPlainObject$1(W)?String(W):W;let activeEffectScope;class EffectScope{constructor(W=!1){this.detached=W,this._active=!0,this.effects=[],this.cleanups=[],this.parent=activeEffectScope,!W&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}run(W){if(this._active){const q=activeEffectScope;try{return activeEffectScope=this,W()}finally{activeEffectScope=q}}}on(){activeEffectScope=this}off(){activeEffectScope=this.parent}stop(W){if(this._active){let q,K;for(q=0,K=this.effects.length;q{const W=new Set(F);return W.w=0,W.n=0,W},wasTracked=F=>(F.w&trackOpBit)>0,newTracked=F=>(F.n&trackOpBit)>0,initDepMarkers=({deps:F})=>{if(F.length)for(let W=0;W{const{deps:W}=F;if(W.length){let q=0;for(let K=0;K{(uo==="length"||uo>=ut)&&ot.push(yn)})}else switch(q!==void 0&&ot.push(rt.get(q)),W){case"add":isArray$j(F)?isIntegerKey(q)&&ot.push(rt.get("length")):(ot.push(rt.get(ITERATE_KEY)),isMap(F)&&ot.push(rt.get(MAP_KEY_ITERATE_KEY)));break;case"delete":isArray$j(F)||(ot.push(rt.get(ITERATE_KEY)),isMap(F)&&ot.push(rt.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(F)&&ot.push(rt.get(ITERATE_KEY));break}if(ot.length===1)ot[0]&&triggerEffects(ot[0]);else{const ut=[];for(const yn of ot)yn&&ut.push(...yn);triggerEffects(createDep(ut))}}function triggerEffects(F,W){const q=isArray$j(F)?F:[...F];for(const K of q)K.computed&&triggerEffect(K);for(const K of q)K.computed||triggerEffect(K)}function triggerEffect(F,W){(F!==activeEffect||F.allowRecurse)&&(F.scheduler?F.scheduler():F.run())}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(F=>F!=="arguments"&&F!=="caller").map(F=>Symbol[F]).filter(isSymbol$8)),get$1$3=createGetter(),shallowGet=createGetter(!1,!0),readonlyGet=createGetter(!0),arrayInstrumentations=createArrayInstrumentations();function createArrayInstrumentations(){const F={};return["includes","indexOf","lastIndexOf"].forEach(W=>{F[W]=function(...q){const K=toRaw(this);for(let tt=0,rt=this.length;tt{F[W]=function(...q){pauseTracking();const K=toRaw(this)[W].apply(this,q);return resetTracking(),K}}),F}function hasOwnProperty$e(F){const W=toRaw(this);return track(W,"has",F),W.hasOwnProperty(F)}function createGetter(F=!1,W=!1){return function(K,X,tt){if(X==="__v_isReactive")return!F;if(X==="__v_isReadonly")return F;if(X==="__v_isShallow")return W;if(X==="__v_raw"&&tt===(F?W?shallowReadonlyMap:readonlyMap:W?shallowReactiveMap:reactiveMap).get(K))return K;const rt=isArray$j(K);if(!F){if(rt&&hasOwn$l(arrayInstrumentations,X))return Reflect.get(arrayInstrumentations,X,tt);if(X==="hasOwnProperty")return hasOwnProperty$e}const ot=Reflect.get(K,X,tt);return(isSymbol$8(X)?builtInSymbols.has(X):isNonTrackableKeys(X))||(F||track(K,"get",X),W)?ot:isRef(ot)?rt&&isIntegerKey(X)?ot:ot.value:isObject$p(ot)?F?readonly(ot):reactive(ot):ot}}const set$1$4=createSetter(),shallowSet=createSetter(!0);function createSetter(F=!1){return function(q,K,X,tt){let rt=q[K];if(isReadonly(rt)&&isRef(rt)&&!isRef(X))return!1;if(!F&&(!isShallow(X)&&!isReadonly(X)&&(rt=toRaw(rt),X=toRaw(X)),!isArray$j(q)&&isRef(rt)&&!isRef(X)))return rt.value=X,!0;const ot=isArray$j(q)&&isIntegerKey(K)?Number(K)F,getProto=F=>Reflect.getPrototypeOf(F);function get$c(F,W,q=!1,K=!1){F=F.__v_raw;const X=toRaw(F),tt=toRaw(W);q||(W!==tt&&track(X,"get",W),track(X,"get",tt));const{has:rt}=getProto(X),ot=K?toShallow:q?toReadonly:toReactive;if(rt.call(X,W))return ot(F.get(W));if(rt.call(X,tt))return ot(F.get(tt));F!==X&&F.get(W)}function has$3(F,W=!1){const q=this.__v_raw,K=toRaw(q),X=toRaw(F);return W||(F!==X&&track(K,"has",F),track(K,"has",X)),F===X?q.has(F):q.has(F)||q.has(X)}function size$2(F,W=!1){return F=F.__v_raw,!W&&track(toRaw(F),"iterate",ITERATE_KEY),Reflect.get(F,"size",F)}function add$2(F){F=toRaw(F);const W=toRaw(this);return getProto(W).has.call(W,F)||(W.add(F),trigger(W,"add",F,F)),this}function set$b(F,W){W=toRaw(W);const q=toRaw(this),{has:K,get:X}=getProto(q);let tt=K.call(q,F);tt||(F=toRaw(F),tt=K.call(q,F));const rt=X.call(q,F);return q.set(F,W),tt?hasChanged(W,rt)&&trigger(q,"set",F,W):trigger(q,"add",F,W),this}function deleteEntry(F){const W=toRaw(this),{has:q,get:K}=getProto(W);let X=q.call(W,F);X||(F=toRaw(F),X=q.call(W,F)),K&&K.call(W,F);const tt=W.delete(F);return X&&trigger(W,"delete",F,void 0),tt}function clear$2(){const F=toRaw(this),W=F.size!==0,q=F.clear();return W&&trigger(F,"clear",void 0,void 0),q}function createForEach(F,W){return function(K,X){const tt=this,rt=tt.__v_raw,ot=toRaw(rt),ut=W?toShallow:F?toReadonly:toReactive;return!F&&track(ot,"iterate",ITERATE_KEY),rt.forEach((yn,uo)=>K.call(X,ut(yn),ut(uo),tt))}}function createIterableMethod(F,W,q){return function(...K){const X=this.__v_raw,tt=toRaw(X),rt=isMap(tt),ot=F==="entries"||F===Symbol.iterator&&rt,ut=F==="keys"&&rt,yn=X[F](...K),uo=q?toShallow:W?toReadonly:toReactive;return!W&&track(tt,"iterate",ut?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:po,done:mo}=yn.next();return mo?{value:po,done:mo}:{value:ot?[uo(po[0]),uo(po[1])]:uo(po),done:mo}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(F){return function(...W){return F==="delete"?!1:this}}function createInstrumentations(){const F={get(tt){return get$c(this,tt)},get size(){return size$2(this)},has:has$3,add:add$2,set:set$b,delete:deleteEntry,clear:clear$2,forEach:createForEach(!1,!1)},W={get(tt){return get$c(this,tt,!1,!0)},get size(){return size$2(this)},has:has$3,add:add$2,set:set$b,delete:deleteEntry,clear:clear$2,forEach:createForEach(!1,!0)},q={get(tt){return get$c(this,tt,!0)},get size(){return size$2(this,!0)},has(tt){return has$3.call(this,tt,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},K={get(tt){return get$c(this,tt,!0,!0)},get size(){return size$2(this,!0)},has(tt){return has$3.call(this,tt,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(tt=>{F[tt]=createIterableMethod(tt,!1,!1),q[tt]=createIterableMethod(tt,!0,!1),W[tt]=createIterableMethod(tt,!1,!0),K[tt]=createIterableMethod(tt,!0,!0)}),[F,q,W,K]}const[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(F,W){const q=W?F?shallowReadonlyInstrumentations:shallowInstrumentations:F?readonlyInstrumentations:mutableInstrumentations;return(K,X,tt)=>X==="__v_isReactive"?!F:X==="__v_isReadonly"?F:X==="__v_raw"?K:Reflect.get(hasOwn$l(q,X)&&X in K?q:K,X,tt)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(F){switch(F){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(F){return F.__v_skip||!Object.isExtensible(F)?0:targetTypeMap(toRawType(F))}function reactive(F){return isReadonly(F)?F:createReactiveObject(F,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(F){return createReactiveObject(F,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(F){return createReactiveObject(F,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function createReactiveObject(F,W,q,K,X){if(!isObject$p(F)||F.__v_raw&&!(W&&F.__v_isReactive))return F;const tt=X.get(F);if(tt)return tt;const rt=getTargetType(F);if(rt===0)return F;const ot=new Proxy(F,rt===2?K:q);return X.set(F,ot),ot}function isReactive(F){return isReadonly(F)?isReactive(F.__v_raw):!!(F&&F.__v_isReactive)}function isReadonly(F){return!!(F&&F.__v_isReadonly)}function isShallow(F){return!!(F&&F.__v_isShallow)}function isProxy(F){return isReactive(F)||isReadonly(F)}function toRaw(F){const W=F&&F.__v_raw;return W?toRaw(W):F}function markRaw(F){return def(F,"__v_skip",!0),F}const toReactive=F=>isObject$p(F)?reactive(F):F,toReadonly=F=>isObject$p(F)?readonly(F):F;function trackRefValue(F){shouldTrack&&activeEffect&&(F=toRaw(F),trackEffects(F.dep||(F.dep=createDep())))}function triggerRefValue(F,W){F=toRaw(F);const q=F.dep;q&&triggerEffects(q)}function isRef(F){return!!(F&&F.__v_isRef===!0)}function ref(F){return createRef(F,!1)}function createRef(F,W){return isRef(F)?F:new RefImpl(F,W)}class RefImpl{constructor(W,q){this.__v_isShallow=q,this.dep=void 0,this.__v_isRef=!0,this._rawValue=q?W:toRaw(W),this._value=q?W:toReactive(W)}get value(){return trackRefValue(this),this._value}set value(W){const q=this.__v_isShallow||isShallow(W)||isReadonly(W);W=q?W:toRaw(W),hasChanged(W,this._rawValue)&&(this._rawValue=W,this._value=q?W:toReactive(W),triggerRefValue(this))}}function unref(F){return isRef(F)?F.value:F}const shallowUnwrapHandlers={get:(F,W,q)=>unref(Reflect.get(F,W,q)),set:(F,W,q,K)=>{const X=F[W];return isRef(X)&&!isRef(q)?(X.value=q,!0):Reflect.set(F,W,q,K)}};function proxyRefs(F){return isReactive(F)?F:new Proxy(F,shallowUnwrapHandlers)}class ComputedRefImpl{constructor(W,q,K,X){this._setter=q,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new ReactiveEffect(W,()=>{this._dirty||(this._dirty=!0,triggerRefValue(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!X,this.__v_isReadonly=K}get value(){const W=toRaw(this);return trackRefValue(W),(W._dirty||!W._cacheable)&&(W._dirty=!1,W._value=W.effect.run()),W._value}set value(W){this._setter(W)}}function computed$1(F,W,q=!1){let K,X;const tt=isFunction$2(F);return tt?(K=F,X=NOOP):(K=F.get,X=F.set),new ComputedRefImpl(K,X,tt||!X,q)}function warn$1(F,...W){}function callWithErrorHandling(F,W,q,K){let X;try{X=K?F(...K):F()}catch(tt){handleError$1(tt,W,q)}return X}function callWithAsyncErrorHandling(F,W,q,K){if(isFunction$2(F)){const tt=callWithErrorHandling(F,W,q,K);return tt&&isPromise(tt)&&tt.catch(rt=>{handleError$1(rt,W,q)}),tt}const X=[];for(let tt=0;tt>>1;getId(queue$3[K])flushIndex&&queue$3.splice(W,1)}function queuePostFlushCb(F){isArray$j(F)?pendingPostFlushCbs.push(...F):(!activePostFlushCbs||!activePostFlushCbs.includes(F,F.allowRecurse?postFlushIndex+1:postFlushIndex))&&pendingPostFlushCbs.push(F),queueFlush()}function flushPreFlushCbs(F,W=isFlushing?flushIndex+1:0){for(;WgetId(q)-getId(K)),postFlushIndex=0;postFlushIndexF.id==null?1/0:F.id,comparator=(F,W)=>{const q=getId(F)-getId(W);if(q===0){if(F.pre&&!W.pre)return-1;if(W.pre&&!F.pre)return 1}return q};function flushJobs(F){isFlushPending=!1,isFlushing=!0,queue$3.sort(comparator);const W=NOOP;try{for(flushIndex=0;flushIndexisString$3(wo)?wo.trim():wo)),po&&(X=q.map(looseToNumber))}let ot,ut=K[ot=toHandlerKey(W)]||K[ot=toHandlerKey(camelize(W))];!ut&&tt&&(ut=K[ot=toHandlerKey(hyphenate(W))]),ut&&callWithAsyncErrorHandling(ut,F,6,X);const yn=K[ot+"Once"];if(yn){if(!F.emitted)F.emitted={};else if(F.emitted[ot])return;F.emitted[ot]=!0,callWithAsyncErrorHandling(yn,F,6,X)}}function normalizeEmitsOptions(F,W,q=!1){const K=W.emitsCache,X=K.get(F);if(X!==void 0)return X;const tt=F.emits;let rt={},ot=!1;if(!isFunction$2(F)){const ut=yn=>{const uo=normalizeEmitsOptions(yn,W,!0);uo&&(ot=!0,extend$8(rt,uo))};!q&&W.mixins.length&&W.mixins.forEach(ut),F.extends&&ut(F.extends),F.mixins&&F.mixins.forEach(ut)}return!tt&&!ot?(isObject$p(F)&&K.set(F,null),null):(isArray$j(tt)?tt.forEach(ut=>rt[ut]=null):extend$8(rt,tt),isObject$p(F)&&K.set(F,rt),rt)}function isEmitListener(F,W){return!F||!isOn(W)?!1:(W=W.slice(2).replace(/Once$/,""),hasOwn$l(F,W[0].toLowerCase()+W.slice(1))||hasOwn$l(F,hyphenate(W))||hasOwn$l(F,W))}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(F){const W=currentRenderingInstance;return currentRenderingInstance=F,currentScopeId=F&&F.type.__scopeId||null,W}function pushScopeId(F){currentScopeId=F}function popScopeId(){currentScopeId=null}function withCtx(F,W=currentRenderingInstance,q){if(!W||F._n)return F;const K=(...X)=>{K._d&&setBlockTracking(-1);const tt=setCurrentRenderingInstance(W);let rt;try{rt=F(...X)}finally{setCurrentRenderingInstance(tt),K._d&&setBlockTracking(1)}return rt};return K._n=!0,K._c=!0,K._d=!0,K}function markAttrsAccessed(){}function renderComponentRoot(F){const{type:W,vnode:q,proxy:K,withProxy:X,props:tt,propsOptions:[rt],slots:ot,attrs:ut,emit:yn,render:uo,renderCache:po,data:mo,setupState:wo,ctx:lf,inheritAttrs:yf}=F;let cf,vf;const _f=setCurrentRenderingInstance(F);try{if(q.shapeFlag&4){const wf=X||K;cf=normalizeVNode(uo.call(wf,wf,po,tt,wo,mo,lf)),vf=ut}else{const wf=W;cf=normalizeVNode(wf.length>1?wf(tt,{attrs:ut,slots:ot,emit:yn}):wf(tt,null)),vf=W.props?ut:getFunctionalFallthrough(ut)}}catch(wf){blockStack.length=0,handleError$1(wf,F,1),cf=createVNode(Comment)}let $f=cf;if(vf&&yf!==!1){const wf=Object.keys(vf),{shapeFlag:Pf}=$f;wf.length&&Pf&7&&(rt&&wf.some(isModelListener)&&(vf=filterModelListeners(vf,rt)),$f=cloneVNode($f,vf))}return q.dirs&&($f=cloneVNode($f),$f.dirs=$f.dirs?$f.dirs.concat(q.dirs):q.dirs),q.transition&&($f.transition=q.transition),cf=$f,setCurrentRenderingInstance(_f),cf}const getFunctionalFallthrough=F=>{let W;for(const q in F)(q==="class"||q==="style"||isOn(q))&&((W||(W={}))[q]=F[q]);return W},filterModelListeners=(F,W)=>{const q={};for(const K in F)(!isModelListener(K)||!(K.slice(9)in W))&&(q[K]=F[K]);return q};function shouldUpdateComponent(F,W,q){const{props:K,children:X,component:tt}=F,{props:rt,children:ot,patchFlag:ut}=W,yn=tt.emitsOptions;if(W.dirs||W.transition)return!0;if(q&&ut>=0){if(ut&1024)return!0;if(ut&16)return K?hasPropsChanged(K,rt,yn):!!rt;if(ut&8){const uo=W.dynamicProps;for(let po=0;poF.__isSuspense;function queueEffectWithSuspense(F,W){W&&W.pendingBranch?isArray$j(F)?W.effects.push(...F):W.effects.push(F):queuePostFlushCb(F)}const INITIAL_WATCHER_VALUE={};function watch$1(F,W,q){return doWatch(F,W,q)}function doWatch(F,W,{immediate:q,deep:K,flush:X,onTrack:tt,onTrigger:rt}=EMPTY_OBJ){var ot;const ut=getCurrentScope()===((ot=currentInstance)==null?void 0:ot.scope)?currentInstance:null;let yn,uo=!1,po=!1;if(isRef(F)?(yn=()=>F.value,uo=isShallow(F)):isReactive(F)?(yn=()=>F,K=!0):isArray$j(F)?(po=!0,uo=F.some(wf=>isReactive(wf)||isShallow(wf)),yn=()=>F.map(wf=>{if(isRef(wf))return wf.value;if(isReactive(wf))return traverse(wf);if(isFunction$2(wf))return callWithErrorHandling(wf,ut,2)})):isFunction$2(F)?W?yn=()=>callWithErrorHandling(F,ut,2):yn=()=>{if(!(ut&&ut.isUnmounted))return mo&&mo(),callWithAsyncErrorHandling(F,ut,3,[wo])}:yn=NOOP,W&&K){const wf=yn;yn=()=>traverse(wf())}let mo,wo=wf=>{mo=_f.onStop=()=>{callWithErrorHandling(wf,ut,4)}},lf;if(isInSSRComponentSetup)if(wo=NOOP,W?q&&callWithAsyncErrorHandling(W,ut,3,[yn(),po?[]:void 0,wo]):yn(),X==="sync"){const wf=useSSRContext();lf=wf.__watcherHandles||(wf.__watcherHandles=[])}else return NOOP;let yf=po?new Array(F.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const cf=()=>{if(_f.active)if(W){const wf=_f.run();(K||uo||(po?wf.some((Pf,Cf)=>hasChanged(Pf,yf[Cf])):hasChanged(wf,yf)))&&(mo&&mo(),callWithAsyncErrorHandling(W,ut,3,[wf,yf===INITIAL_WATCHER_VALUE?void 0:po&&yf[0]===INITIAL_WATCHER_VALUE?[]:yf,wo]),yf=wf)}else _f.run()};cf.allowRecurse=!!W;let vf;X==="sync"?vf=cf:X==="post"?vf=()=>queuePostRenderEffect(cf,ut&&ut.suspense):(cf.pre=!0,ut&&(cf.id=ut.uid),vf=()=>queueJob(cf));const _f=new ReactiveEffect(yn,vf);W?q?cf():yf=_f.run():X==="post"?queuePostRenderEffect(_f.run.bind(_f),ut&&ut.suspense):_f.run();const $f=()=>{_f.stop(),ut&&ut.scope&&remove$1(ut.scope.effects,_f)};return lf&&lf.push($f),$f}function instanceWatch(F,W,q){const K=this.proxy,X=isString$3(F)?F.includes(".")?createPathGetter(K,F):()=>K[F]:F.bind(K,K);let tt;isFunction$2(W)?tt=W:(tt=W.handler,q=W);const rt=currentInstance;setCurrentInstance(this);const ot=doWatch(X,tt.bind(K),q);return rt?setCurrentInstance(rt):unsetCurrentInstance(),ot}function createPathGetter(F,W){const q=W.split(".");return()=>{let K=F;for(let X=0;X{traverse(q,W)});else if(isPlainObject$1(F))for(const q in F)traverse(F[q],W);return F}function invokeDirectiveHook(F,W,q,K){const X=F.dirs,tt=W&&W.dirs;for(let rt=0;rtextend$8({name:F.name},W,{setup:F}))():F}const isAsyncWrapper=F=>!!F.type.__asyncLoader,isKeepAlive=F=>F.type.__isKeepAlive;function onActivated(F,W){registerKeepAliveHook(F,"a",W)}function onDeactivated(F,W){registerKeepAliveHook(F,"da",W)}function registerKeepAliveHook(F,W,q=currentInstance){const K=F.__wdc||(F.__wdc=()=>{let X=q;for(;X;){if(X.isDeactivated)return;X=X.parent}return F()});if(injectHook(W,K,q),q){let X=q.parent;for(;X&&X.parent;)isKeepAlive(X.parent.vnode)&&injectToKeepAliveRoot(K,W,q,X),X=X.parent}}function injectToKeepAliveRoot(F,W,q,K){const X=injectHook(W,F,K,!0);onUnmounted(()=>{remove$1(K[W],X)},q)}function injectHook(F,W,q=currentInstance,K=!1){if(q){const X=q[F]||(q[F]=[]),tt=W.__weh||(W.__weh=(...rt)=>{if(q.isUnmounted)return;pauseTracking(),setCurrentInstance(q);const ot=callWithAsyncErrorHandling(W,q,F,rt);return unsetCurrentInstance(),resetTracking(),ot});return K?X.unshift(tt):X.push(tt),tt}}const createHook=F=>(W,q=currentInstance)=>(!isInSSRComponentSetup||F==="sp")&&injectHook(F,(...K)=>W(...K),q),onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(F,W=currentInstance){injectHook("ec",F,W)}const NULL_DYNAMIC_COMPONENT=Symbol.for("v-ndc");function renderList(F,W,q,K){let X;const tt=q&&q[K];if(isArray$j(F)||isString$3(F)){X=new Array(F.length);for(let rt=0,ot=F.length;rtW(rt,ot,void 0,tt&&tt[ot]));else{const rt=Object.keys(F);X=new Array(rt.length);for(let ot=0,ut=rt.length;otisVNode(W)?!(W.type===Comment||W.type===Fragment&&!ensureValidVNode(W.children)):!0)?F:null}const getPublicInstance=F=>F?isStatefulComponent(F)?getExposeProxy(F)||F.proxy:getPublicInstance(F.parent):null,publicPropertiesMap=extend$8(Object.create(null),{$:F=>F,$el:F=>F.vnode.el,$data:F=>F.data,$props:F=>F.props,$attrs:F=>F.attrs,$slots:F=>F.slots,$refs:F=>F.refs,$parent:F=>getPublicInstance(F.parent),$root:F=>getPublicInstance(F.root),$emit:F=>F.emit,$options:F=>resolveMergedOptions(F),$forceUpdate:F=>F.f||(F.f=()=>queueJob(F.update)),$nextTick:F=>F.n||(F.n=nextTick.bind(F.proxy)),$watch:F=>instanceWatch.bind(F)}),hasSetupBinding=(F,W)=>F!==EMPTY_OBJ&&!F.__isScriptSetup&&hasOwn$l(F,W),PublicInstanceProxyHandlers={get({_:F},W){const{ctx:q,setupState:K,data:X,props:tt,accessCache:rt,type:ot,appContext:ut}=F;let yn;if(W[0]!=="$"){const wo=rt[W];if(wo!==void 0)switch(wo){case 1:return K[W];case 2:return X[W];case 4:return q[W];case 3:return tt[W]}else{if(hasSetupBinding(K,W))return rt[W]=1,K[W];if(X!==EMPTY_OBJ&&hasOwn$l(X,W))return rt[W]=2,X[W];if((yn=F.propsOptions[0])&&hasOwn$l(yn,W))return rt[W]=3,tt[W];if(q!==EMPTY_OBJ&&hasOwn$l(q,W))return rt[W]=4,q[W];shouldCacheAccess&&(rt[W]=0)}}const uo=publicPropertiesMap[W];let po,mo;if(uo)return W==="$attrs"&&track(F,"get",W),uo(F);if((po=ot.__cssModules)&&(po=po[W]))return po;if(q!==EMPTY_OBJ&&hasOwn$l(q,W))return rt[W]=4,q[W];if(mo=ut.config.globalProperties,hasOwn$l(mo,W))return mo[W]},set({_:F},W,q){const{data:K,setupState:X,ctx:tt}=F;return hasSetupBinding(X,W)?(X[W]=q,!0):K!==EMPTY_OBJ&&hasOwn$l(K,W)?(K[W]=q,!0):hasOwn$l(F.props,W)||W[0]==="$"&&W.slice(1)in F?!1:(tt[W]=q,!0)},has({_:{data:F,setupState:W,accessCache:q,ctx:K,appContext:X,propsOptions:tt}},rt){let ot;return!!q[rt]||F!==EMPTY_OBJ&&hasOwn$l(F,rt)||hasSetupBinding(W,rt)||(ot=tt[0])&&hasOwn$l(ot,rt)||hasOwn$l(K,rt)||hasOwn$l(publicPropertiesMap,rt)||hasOwn$l(X.config.globalProperties,rt)},defineProperty(F,W,q){return q.get!=null?F._.accessCache[W]=0:hasOwn$l(q,"value")&&this.set(F,W,q.value,null),Reflect.defineProperty(F,W,q)}};function normalizePropsOrEmits(F){return isArray$j(F)?F.reduce((W,q)=>(W[q]=null,W),{}):F}let shouldCacheAccess=!0;function applyOptions(F){const W=resolveMergedOptions(F),q=F.proxy,K=F.ctx;shouldCacheAccess=!1,W.beforeCreate&&callHook(W.beforeCreate,F,"bc");const{data:X,computed:tt,methods:rt,watch:ot,provide:ut,inject:yn,created:uo,beforeMount:po,mounted:mo,beforeUpdate:wo,updated:lf,activated:yf,deactivated:cf,beforeDestroy:vf,beforeUnmount:_f,destroyed:$f,unmounted:wf,render:Pf,renderTracked:Cf,renderTriggered:Af,errorCaptured:Bf,serverPrefetch:Hf,expose:Df,inheritAttrs:Lf,components:kf,directives:Nf,filters:Yf}=W;if(yn&&resolveInjections(yn,K,null),rt)for(const ip in rt){const ap=rt[ip];isFunction$2(ap)&&(K[ip]=ap.bind(q))}if(X){const ip=X.call(q,q);isObject$p(ip)&&(F.data=reactive(ip))}if(shouldCacheAccess=!0,tt)for(const ip in tt){const ap=tt[ip],yp=isFunction$2(ap)?ap.bind(q,q):isFunction$2(ap.get)?ap.get.bind(q,q):NOOP,vp=!isFunction$2(ap)&&isFunction$2(ap.set)?ap.set.bind(q):NOOP,Np=computed({get:yp,set:vp});Object.defineProperty(K,ip,{enumerable:!0,configurable:!0,get:()=>Np.value,set:jp=>Np.value=jp})}if(ot)for(const ip in ot)createWatcher(ot[ip],K,q,ip);if(ut){const ip=isFunction$2(ut)?ut.call(q):ut;Reflect.ownKeys(ip).forEach(ap=>{provide(ap,ip[ap])})}uo&&callHook(uo,F,"c");function rp(ip,ap){isArray$j(ap)?ap.forEach(yp=>ip(yp.bind(q))):ap&&ip(ap.bind(q))}if(rp(onBeforeMount,po),rp(onMounted,mo),rp(onBeforeUpdate,wo),rp(onUpdated,lf),rp(onActivated,yf),rp(onDeactivated,cf),rp(onErrorCaptured,Bf),rp(onRenderTracked,Cf),rp(onRenderTriggered,Af),rp(onBeforeUnmount,_f),rp(onUnmounted,wf),rp(onServerPrefetch,Hf),isArray$j(Df))if(Df.length){const ip=F.exposed||(F.exposed={});Df.forEach(ap=>{Object.defineProperty(ip,ap,{get:()=>q[ap],set:yp=>q[ap]=yp})})}else F.exposed||(F.exposed={});Pf&&F.render===NOOP&&(F.render=Pf),Lf!=null&&(F.inheritAttrs=Lf),kf&&(F.components=kf),Nf&&(F.directives=Nf)}function resolveInjections(F,W,q=NOOP){isArray$j(F)&&(F=normalizeInject(F));for(const K in F){const X=F[K];let tt;isObject$p(X)?"default"in X?tt=inject(X.from||K,X.default,!0):tt=inject(X.from||K):tt=inject(X),isRef(tt)?Object.defineProperty(W,K,{enumerable:!0,configurable:!0,get:()=>tt.value,set:rt=>tt.value=rt}):W[K]=tt}}function callHook(F,W,q){callWithAsyncErrorHandling(isArray$j(F)?F.map(K=>K.bind(W.proxy)):F.bind(W.proxy),W,q)}function createWatcher(F,W,q,K){const X=K.includes(".")?createPathGetter(q,K):()=>q[K];if(isString$3(F)){const tt=W[F];isFunction$2(tt)&&watch$1(X,tt)}else if(isFunction$2(F))watch$1(X,F.bind(q));else if(isObject$p(F))if(isArray$j(F))F.forEach(tt=>createWatcher(tt,W,q,K));else{const tt=isFunction$2(F.handler)?F.handler.bind(q):W[F.handler];isFunction$2(tt)&&watch$1(X,tt,F)}}function resolveMergedOptions(F){const W=F.type,{mixins:q,extends:K}=W,{mixins:X,optionsCache:tt,config:{optionMergeStrategies:rt}}=F.appContext,ot=tt.get(W);let ut;return ot?ut=ot:!X.length&&!q&&!K?ut=W:(ut={},X.length&&X.forEach(yn=>mergeOptions$2(ut,yn,rt,!0)),mergeOptions$2(ut,W,rt)),isObject$p(W)&&tt.set(W,ut),ut}function mergeOptions$2(F,W,q,K=!1){const{mixins:X,extends:tt}=W;tt&&mergeOptions$2(F,tt,q,!0),X&&X.forEach(rt=>mergeOptions$2(F,rt,q,!0));for(const rt in W)if(!(K&&rt==="expose")){const ot=internalOptionMergeStrats[rt]||q&&q[rt];F[rt]=ot?ot(F[rt],W[rt]):W[rt]}return F}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(F,W){return W?F?function(){return extend$8(isFunction$2(F)?F.call(this,this):F,isFunction$2(W)?W.call(this,this):W)}:W:F}function mergeInject(F,W){return mergeObjectOptions(normalizeInject(F),normalizeInject(W))}function normalizeInject(F){if(isArray$j(F)){const W={};for(let q=0;q1)return q&&isFunction$2(W)?W.call(K&&K.proxy):W}}function initProps(F,W,q,K=!1){const X={},tt={};def(tt,InternalObjectKey,1),F.propsDefaults=Object.create(null),setFullProps(F,W,X,tt);for(const rt in F.propsOptions[0])rt in X||(X[rt]=void 0);q?F.props=K?X:shallowReactive(X):F.type.props?F.props=X:F.props=tt,F.attrs=tt}function updateProps(F,W,q,K){const{props:X,attrs:tt,vnode:{patchFlag:rt}}=F,ot=toRaw(X),[ut]=F.propsOptions;let yn=!1;if((K||rt>0)&&!(rt&16)){if(rt&8){const uo=F.vnode.dynamicProps;for(let po=0;po{ut=!0;const[mo,wo]=normalizePropsOptions(po,W,!0);extend$8(rt,mo),wo&&ot.push(...wo)};!q&&W.mixins.length&&W.mixins.forEach(uo),F.extends&&uo(F.extends),F.mixins&&F.mixins.forEach(uo)}if(!tt&&!ut)return isObject$p(F)&&K.set(F,EMPTY_ARR),EMPTY_ARR;if(isArray$j(tt))for(let uo=0;uo-1,wo[1]=yf<0||lf-1||hasOwn$l(wo,"default"))&&ot.push(po)}}}const yn=[rt,ot];return isObject$p(F)&&K.set(F,yn),yn}function validatePropName(F){return F[0]!=="$"}function getType$1(F){const W=F&&F.toString().match(/^\s*(function|class) (\w+)/);return W?W[2]:F===null?"null":""}function isSameType(F,W){return getType$1(F)===getType$1(W)}function getTypeIndex(F,W){return isArray$j(W)?W.findIndex(q=>isSameType(q,F)):isFunction$2(W)&&isSameType(W,F)?0:-1}const isInternalKey=F=>F[0]==="_"||F==="$stable",normalizeSlotValue=F=>isArray$j(F)?F.map(normalizeVNode):[normalizeVNode(F)],normalizeSlot=(F,W,q)=>{if(W._n)return W;const K=withCtx((...X)=>normalizeSlotValue(W(...X)),q);return K._c=!1,K},normalizeObjectSlots=(F,W,q)=>{const K=F._ctx;for(const X in F){if(isInternalKey(X))continue;const tt=F[X];if(isFunction$2(tt))W[X]=normalizeSlot(X,tt,K);else if(tt!=null){const rt=normalizeSlotValue(tt);W[X]=()=>rt}}},normalizeVNodeSlots=(F,W)=>{const q=normalizeSlotValue(W);F.slots.default=()=>q},initSlots=(F,W)=>{if(F.vnode.shapeFlag&32){const q=W._;q?(F.slots=toRaw(W),def(W,"_",q)):normalizeObjectSlots(W,F.slots={})}else F.slots={},W&&normalizeVNodeSlots(F,W);def(F.slots,InternalObjectKey,1)},updateSlots=(F,W,q)=>{const{vnode:K,slots:X}=F;let tt=!0,rt=EMPTY_OBJ;if(K.shapeFlag&32){const ot=W._;ot?q&&ot===1?tt=!1:(extend$8(X,W),!q&&ot===1&&delete X._):(tt=!W.$stable,normalizeObjectSlots(W,X)),rt=W}else W&&(normalizeVNodeSlots(F,W),rt={default:1});if(tt)for(const ot in X)!isInternalKey(ot)&&!(ot in rt)&&delete X[ot]};function setRef(F,W,q,K,X=!1){if(isArray$j(F)){F.forEach((mo,wo)=>setRef(mo,W&&(isArray$j(W)?W[wo]:W),q,K,X));return}if(isAsyncWrapper(K)&&!X)return;const tt=K.shapeFlag&4?getExposeProxy(K.component)||K.component.proxy:K.el,rt=X?null:tt,{i:ot,r:ut}=F,yn=W&&W.r,uo=ot.refs===EMPTY_OBJ?ot.refs={}:ot.refs,po=ot.setupState;if(yn!=null&&yn!==ut&&(isString$3(yn)?(uo[yn]=null,hasOwn$l(po,yn)&&(po[yn]=null)):isRef(yn)&&(yn.value=null)),isFunction$2(ut))callWithErrorHandling(ut,ot,12,[rt,uo]);else{const mo=isString$3(ut),wo=isRef(ut);if(mo||wo){const lf=()=>{if(F.f){const yf=mo?hasOwn$l(po,ut)?po[ut]:uo[ut]:ut.value;X?isArray$j(yf)&&remove$1(yf,tt):isArray$j(yf)?yf.includes(tt)||yf.push(tt):mo?(uo[ut]=[tt],hasOwn$l(po,ut)&&(po[ut]=uo[ut])):(ut.value=[tt],F.k&&(uo[F.k]=ut.value))}else mo?(uo[ut]=rt,hasOwn$l(po,ut)&&(po[ut]=rt)):wo&&(ut.value=rt,F.k&&(uo[F.k]=rt))};rt?(lf.id=-1,queuePostRenderEffect(lf,q)):lf()}}}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(F){return baseCreateRenderer(F)}function baseCreateRenderer(F,W){const q=getGlobalThis();q.__VUE__=!0;const{insert:K,remove:X,patchProp:tt,createElement:rt,createText:ot,createComment:ut,setText:yn,setElementText:uo,parentNode:po,nextSibling:mo,setScopeId:wo=NOOP,insertStaticContent:lf}=F,yf=(lp,Of,qf,cp=null,hp=null,$p=null,Vp=!1,bp=null,Ep=!!Of.dynamicChildren)=>{if(lp===Of)return;lp&&!isSameVNodeType(lp,Of)&&(cp=vg(lp),jp(lp,hp,$p,!0),lp=null),Of.patchFlag===-2&&(Ep=!1,Of.dynamicChildren=null);const{type:_p,ref:Mp,shapeFlag:Yp}=Of;switch(_p){case Text$1:cf(lp,Of,qf,cp);break;case Comment:vf(lp,Of,qf,cp);break;case Static:lp==null&&_f(Of,qf,cp,Vp);break;case Fragment:kf(lp,Of,qf,cp,hp,$p,Vp,bp,Ep);break;default:Yp&1?Pf(lp,Of,qf,cp,hp,$p,Vp,bp,Ep):Yp&6?Nf(lp,Of,qf,cp,hp,$p,Vp,bp,Ep):(Yp&64||Yp&128)&&_p.process(lp,Of,qf,cp,hp,$p,Vp,bp,Ep,Lp)}Mp!=null&&hp&&setRef(Mp,lp&&lp.ref,$p,Of||lp,!Of)},cf=(lp,Of,qf,cp)=>{if(lp==null)K(Of.el=ot(Of.children),qf,cp);else{const hp=Of.el=lp.el;Of.children!==lp.children&&yn(hp,Of.children)}},vf=(lp,Of,qf,cp)=>{lp==null?K(Of.el=ut(Of.children||""),qf,cp):Of.el=lp.el},_f=(lp,Of,qf,cp)=>{[lp.el,lp.anchor]=lf(lp.children,Of,qf,cp,lp.el,lp.anchor)},$f=({el:lp,anchor:Of},qf,cp)=>{let hp;for(;lp&&lp!==Of;)hp=mo(lp),K(lp,qf,cp),lp=hp;K(Of,qf,cp)},wf=({el:lp,anchor:Of})=>{let qf;for(;lp&&lp!==Of;)qf=mo(lp),X(lp),lp=qf;X(Of)},Pf=(lp,Of,qf,cp,hp,$p,Vp,bp,Ep)=>{Vp=Vp||Of.type==="svg",lp==null?Cf(Of,qf,cp,hp,$p,Vp,bp,Ep):Hf(lp,Of,hp,$p,Vp,bp,Ep)},Cf=(lp,Of,qf,cp,hp,$p,Vp,bp)=>{let Ep,_p;const{type:Mp,props:Yp,shapeFlag:ug,transition:hg,dirs:xg}=lp;if(Ep=lp.el=rt(lp.type,$p,Yp&&Yp.is,Yp),ug&8?uo(Ep,lp.children):ug&16&&Bf(lp.children,Ep,null,cp,hp,$p&&Mp!=="foreignObject",Vp,bp),xg&&invokeDirectiveHook(lp,null,cp,"created"),Af(Ep,lp,lp.scopeId,Vp,cp),Yp){for(const Dg in Yp)Dg!=="value"&&!isReservedProp(Dg)&&tt(Ep,Dg,null,Yp[Dg],$p,lp.children,cp,hp,og);"value"in Yp&&tt(Ep,"value",null,Yp.value),(_p=Yp.onVnodeBeforeMount)&&invokeVNodeHook(_p,cp,lp)}xg&&invokeDirectiveHook(lp,null,cp,"beforeMount");const kg=(!hp||hp&&!hp.pendingBranch)&&hg&&!hg.persisted;kg&&hg.beforeEnter(Ep),K(Ep,Of,qf),((_p=Yp&&Yp.onVnodeMounted)||kg||xg)&&queuePostRenderEffect(()=>{_p&&invokeVNodeHook(_p,cp,lp),kg&&hg.enter(Ep),xg&&invokeDirectiveHook(lp,null,cp,"mounted")},hp)},Af=(lp,Of,qf,cp,hp)=>{if(qf&&wo(lp,qf),cp)for(let $p=0;$p{for(let _p=Ep;_p{const bp=Of.el=lp.el;let{patchFlag:Ep,dynamicChildren:_p,dirs:Mp}=Of;Ep|=lp.patchFlag&16;const Yp=lp.props||EMPTY_OBJ,ug=Of.props||EMPTY_OBJ;let hg;qf&&toggleRecurse(qf,!1),(hg=ug.onVnodeBeforeUpdate)&&invokeVNodeHook(hg,qf,Of,lp),Mp&&invokeDirectiveHook(Of,lp,qf,"beforeUpdate"),qf&&toggleRecurse(qf,!0);const xg=hp&&Of.type!=="foreignObject";if(_p?Df(lp.dynamicChildren,_p,bp,qf,cp,xg,$p):Vp||ap(lp,Of,bp,null,qf,cp,xg,$p,!1),Ep>0){if(Ep&16)Lf(bp,Of,Yp,ug,qf,cp,hp);else if(Ep&2&&Yp.class!==ug.class&&tt(bp,"class",null,ug.class,hp),Ep&4&&tt(bp,"style",Yp.style,ug.style,hp),Ep&8){const kg=Of.dynamicProps;for(let Dg=0;Dg{hg&&invokeVNodeHook(hg,qf,Of,lp),Mp&&invokeDirectiveHook(Of,lp,qf,"updated")},cp)},Df=(lp,Of,qf,cp,hp,$p,Vp)=>{for(let bp=0;bp{if(qf!==cp){if(qf!==EMPTY_OBJ)for(const bp in qf)!isReservedProp(bp)&&!(bp in cp)&&tt(lp,bp,qf[bp],null,Vp,Of.children,hp,$p,og);for(const bp in cp){if(isReservedProp(bp))continue;const Ep=cp[bp],_p=qf[bp];Ep!==_p&&bp!=="value"&&tt(lp,bp,_p,Ep,Vp,Of.children,hp,$p,og)}"value"in cp&&tt(lp,"value",qf.value,cp.value)}},kf=(lp,Of,qf,cp,hp,$p,Vp,bp,Ep)=>{const _p=Of.el=lp?lp.el:ot(""),Mp=Of.anchor=lp?lp.anchor:ot("");let{patchFlag:Yp,dynamicChildren:ug,slotScopeIds:hg}=Of;hg&&(bp=bp?bp.concat(hg):hg),lp==null?(K(_p,qf,cp),K(Mp,qf,cp),Bf(Of.children,qf,Mp,hp,$p,Vp,bp,Ep)):Yp>0&&Yp&64&&ug&&lp.dynamicChildren?(Df(lp.dynamicChildren,ug,qf,hp,$p,Vp,bp),(Of.key!=null||hp&&Of===hp.subTree)&&traverseStaticChildren(lp,Of,!0)):ap(lp,Of,qf,Mp,hp,$p,Vp,bp,Ep)},Nf=(lp,Of,qf,cp,hp,$p,Vp,bp,Ep)=>{Of.slotScopeIds=bp,lp==null?Of.shapeFlag&512?hp.ctx.activate(Of,qf,cp,Vp,Ep):Yf(Of,qf,cp,hp,$p,Vp,Ep):Gf(lp,Of,Ep)},Yf=(lp,Of,qf,cp,hp,$p,Vp)=>{const bp=lp.component=createComponentInstance(lp,cp,hp);if(isKeepAlive(lp)&&(bp.ctx.renderer=Lp),setupComponent(bp),bp.asyncDep){if(hp&&hp.registerDep(bp,rp),!lp.el){const Ep=bp.subTree=createVNode(Comment);vf(null,Ep,Of,qf)}return}rp(bp,lp,Of,qf,hp,$p,Vp)},Gf=(lp,Of,qf)=>{const cp=Of.component=lp.component;if(shouldUpdateComponent(lp,Of,qf))if(cp.asyncDep&&!cp.asyncResolved){ip(cp,Of,qf);return}else cp.next=Of,invalidateJob(cp.update),cp.update();else Of.el=lp.el,cp.vnode=Of},rp=(lp,Of,qf,cp,hp,$p,Vp)=>{const bp=()=>{if(lp.isMounted){let{next:Mp,bu:Yp,u:ug,parent:hg,vnode:xg}=lp,kg=Mp,Dg;toggleRecurse(lp,!1),Mp?(Mp.el=xg.el,ip(lp,Mp,Vp)):Mp=xg,Yp&&invokeArrayFns(Yp),(Dg=Mp.props&&Mp.props.onVnodeBeforeUpdate)&&invokeVNodeHook(Dg,hg,Mp,xg),toggleRecurse(lp,!0);const lm=renderComponentRoot(lp),Bp=lp.subTree;lp.subTree=lm,yf(Bp,lm,po(Bp.el),vg(Bp),lp,hp,$p),Mp.el=lm.el,kg===null&&updateHOCHostEl(lp,lm.el),ug&&queuePostRenderEffect(ug,hp),(Dg=Mp.props&&Mp.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(Dg,hg,Mp,xg),hp)}else{let Mp;const{el:Yp,props:ug}=Of,{bm:hg,m:xg,parent:kg}=lp,Dg=isAsyncWrapper(Of);if(toggleRecurse(lp,!1),hg&&invokeArrayFns(hg),!Dg&&(Mp=ug&&ug.onVnodeBeforeMount)&&invokeVNodeHook(Mp,kg,Of),toggleRecurse(lp,!0),Yp&&kp){const lm=()=>{lp.subTree=renderComponentRoot(lp),kp(Yp,lp.subTree,lp,hp,null)};Dg?Of.type.__asyncLoader().then(()=>!lp.isUnmounted&&lm()):lm()}else{const lm=lp.subTree=renderComponentRoot(lp);yf(null,lm,qf,cp,lp,hp,$p),Of.el=lm.el}if(xg&&queuePostRenderEffect(xg,hp),!Dg&&(Mp=ug&&ug.onVnodeMounted)){const lm=Of;queuePostRenderEffect(()=>invokeVNodeHook(Mp,kg,lm),hp)}(Of.shapeFlag&256||kg&&isAsyncWrapper(kg.vnode)&&kg.vnode.shapeFlag&256)&&lp.a&&queuePostRenderEffect(lp.a,hp),lp.isMounted=!0,Of=qf=cp=null}},Ep=lp.effect=new ReactiveEffect(bp,()=>queueJob(_p),lp.scope),_p=lp.update=()=>Ep.run();_p.id=lp.uid,toggleRecurse(lp,!0),_p()},ip=(lp,Of,qf)=>{Of.component=lp;const cp=lp.vnode.props;lp.vnode=Of,lp.next=null,updateProps(lp,Of.props,cp,qf),updateSlots(lp,Of.children,qf),pauseTracking(),flushPreFlushCbs(),resetTracking()},ap=(lp,Of,qf,cp,hp,$p,Vp,bp,Ep=!1)=>{const _p=lp&&lp.children,Mp=lp?lp.shapeFlag:0,Yp=Of.children,{patchFlag:ug,shapeFlag:hg}=Of;if(ug>0){if(ug&128){vp(_p,Yp,qf,cp,hp,$p,Vp,bp,Ep);return}else if(ug&256){yp(_p,Yp,qf,cp,hp,$p,Vp,bp,Ep);return}}hg&8?(Mp&16&&og(_p,hp,$p),Yp!==_p&&uo(qf,Yp)):Mp&16?hg&16?vp(_p,Yp,qf,cp,hp,$p,Vp,bp,Ep):og(_p,hp,$p,!0):(Mp&8&&uo(qf,""),hg&16&&Bf(Yp,qf,cp,hp,$p,Vp,bp,Ep))},yp=(lp,Of,qf,cp,hp,$p,Vp,bp,Ep)=>{lp=lp||EMPTY_ARR,Of=Of||EMPTY_ARR;const _p=lp.length,Mp=Of.length,Yp=Math.min(_p,Mp);let ug;for(ug=0;ugMp?og(lp,hp,$p,!0,!1,Yp):Bf(Of,qf,cp,hp,$p,Vp,bp,Ep,Yp)},vp=(lp,Of,qf,cp,hp,$p,Vp,bp,Ep)=>{let _p=0;const Mp=Of.length;let Yp=lp.length-1,ug=Mp-1;for(;_p<=Yp&&_p<=ug;){const hg=lp[_p],xg=Of[_p]=Ep?cloneIfMounted(Of[_p]):normalizeVNode(Of[_p]);if(isSameVNodeType(hg,xg))yf(hg,xg,qf,null,hp,$p,Vp,bp,Ep);else break;_p++}for(;_p<=Yp&&_p<=ug;){const hg=lp[Yp],xg=Of[ug]=Ep?cloneIfMounted(Of[ug]):normalizeVNode(Of[ug]);if(isSameVNodeType(hg,xg))yf(hg,xg,qf,null,hp,$p,Vp,bp,Ep);else break;Yp--,ug--}if(_p>Yp){if(_p<=ug){const hg=ug+1,xg=hgug)for(;_p<=Yp;)jp(lp[_p],hp,$p,!0),_p++;else{const hg=_p,xg=_p,kg=new Map;for(_p=xg;_p<=ug;_p++){const Kf=Of[_p]=Ep?cloneIfMounted(Of[_p]):normalizeVNode(Of[_p]);Kf.key!=null&&kg.set(Kf.key,_p)}let Dg,lm=0;const Bp=ug-xg+1;let Rp=!1,Fp=0;const Op=new Array(Bp);for(_p=0;_p=Bp){jp(Kf,hp,$p,!0);continue}let Xf;if(Kf.key!=null)Xf=kg.get(Kf.key);else for(Dg=xg;Dg<=ug;Dg++)if(Op[Dg-xg]===0&&isSameVNodeType(Kf,Of[Dg])){Xf=Dg;break}Xf===void 0?jp(Kf,hp,$p,!0):(Op[Xf-xg]=_p+1,Xf>=Fp?Fp=Xf:Rp=!0,yf(Kf,Of[Xf],qf,null,hp,$p,Vp,bp,Ep),lm++)}const Kp=Rp?getSequence(Op):EMPTY_ARR;for(Dg=Kp.length-1,_p=Bp-1;_p>=0;_p--){const Kf=xg+_p,Xf=Of[Kf],gp=Kf+1{const{el:$p,type:Vp,transition:bp,children:Ep,shapeFlag:_p}=lp;if(_p&6){Np(lp.component.subTree,Of,qf,cp);return}if(_p&128){lp.suspense.move(Of,qf,cp);return}if(_p&64){Vp.move(lp,Of,qf,Lp);return}if(Vp===Fragment){K($p,Of,qf);for(let Yp=0;Ypbp.enter($p),hp);else{const{leave:Yp,delayLeave:ug,afterLeave:hg}=bp,xg=()=>K($p,Of,qf),kg=()=>{Yp($p,()=>{xg(),hg&&hg()})};ug?ug($p,xg,kg):kg()}else K($p,Of,qf)},jp=(lp,Of,qf,cp=!1,hp=!1)=>{const{type:$p,props:Vp,ref:bp,children:Ep,dynamicChildren:_p,shapeFlag:Mp,patchFlag:Yp,dirs:ug}=lp;if(bp!=null&&setRef(bp,null,qf,lp,!0),Mp&256){Of.ctx.deactivate(lp);return}const hg=Mp&1&&ug,xg=!isAsyncWrapper(lp);let kg;if(xg&&(kg=Vp&&Vp.onVnodeBeforeUnmount)&&invokeVNodeHook(kg,Of,lp),Mp&6)ng(lp.component,qf,cp);else{if(Mp&128){lp.suspense.unmount(qf,cp);return}hg&&invokeDirectiveHook(lp,null,Of,"beforeUnmount"),Mp&64?lp.type.remove(lp,Of,qf,hp,Lp,cp):_p&&($p!==Fragment||Yp>0&&Yp&64)?og(_p,Of,qf,!1,!0):($p===Fragment&&Yp&384||!hp&&Mp&16)&&og(Ep,Of,qf),cp&&Ip(lp)}(xg&&(kg=Vp&&Vp.onVnodeUnmounted)||hg)&&queuePostRenderEffect(()=>{kg&&invokeVNodeHook(kg,Of,lp),hg&&invokeDirectiveHook(lp,null,Of,"unmounted")},qf)},Ip=lp=>{const{type:Of,el:qf,anchor:cp,transition:hp}=lp;if(Of===Fragment){Jp(qf,cp);return}if(Of===Static){wf(lp);return}const $p=()=>{X(qf),hp&&!hp.persisted&&hp.afterLeave&&hp.afterLeave()};if(lp.shapeFlag&1&&hp&&!hp.persisted){const{leave:Vp,delayLeave:bp}=hp,Ep=()=>Vp(qf,$p);bp?bp(lp.el,$p,Ep):Ep()}else $p()},Jp=(lp,Of)=>{let qf;for(;lp!==Of;)qf=mo(lp),X(lp),lp=qf;X(Of)},ng=(lp,Of,qf)=>{const{bum:cp,scope:hp,update:$p,subTree:Vp,um:bp}=lp;cp&&invokeArrayFns(cp),hp.stop(),$p&&($p.active=!1,jp(Vp,lp,Of,qf)),bp&&queuePostRenderEffect(bp,Of),queuePostRenderEffect(()=>{lp.isUnmounted=!0},Of),Of&&Of.pendingBranch&&!Of.isUnmounted&&lp.asyncDep&&!lp.asyncResolved&&lp.suspenseId===Of.pendingId&&(Of.deps--,Of.deps===0&&Of.resolve())},og=(lp,Of,qf,cp=!1,hp=!1,$p=0)=>{for(let Vp=$p;Vplp.shapeFlag&6?vg(lp.component.subTree):lp.shapeFlag&128?lp.suspense.next():mo(lp.anchor||lp.el),Dp=(lp,Of,qf)=>{lp==null?Of._vnode&&jp(Of._vnode,null,null,!0):yf(Of._vnode||null,lp,Of,null,null,null,qf),flushPreFlushCbs(),flushPostFlushCbs(),Of._vnode=lp},Lp={p:yf,um:jp,m:Np,r:Ip,mt:Yf,mc:Bf,pc:ap,pbc:Df,n:vg,o:F};let xp,kp;return W&&([xp,kp]=W(Lp)),{render:Dp,hydrate:xp,createApp:createAppAPI(Dp,xp)}}function toggleRecurse({effect:F,update:W},q){F.allowRecurse=W.allowRecurse=q}function traverseStaticChildren(F,W,q=!1){const K=F.children,X=W.children;if(isArray$j(K)&&isArray$j(X))for(let tt=0;tt>1,F[q[ot]]0&&(W[K]=q[tt-1]),q[tt]=K)}}for(tt=q.length,rt=q[tt-1];tt-- >0;)q[tt]=rt,rt=W[rt];return q}const isTeleport=F=>F.__isTeleport,Fragment=Symbol.for("v-fgt"),Text$1=Symbol.for("v-txt"),Comment=Symbol.for("v-cmt"),Static=Symbol.for("v-stc"),blockStack=[];let currentBlock=null;function openBlock(F=!1){blockStack.push(currentBlock=F?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(F){isBlockTreeEnabled+=F}function setupBlock(F){return F.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(F),F}function createElementBlock(F,W,q,K,X,tt){return setupBlock(createBaseVNode(F,W,q,K,X,tt,!0))}function createBlock(F,W,q,K,X){return setupBlock(createVNode(F,W,q,K,X,!0))}function isVNode(F){return F?F.__v_isVNode===!0:!1}function isSameVNodeType(F,W){return F.type===W.type&&F.key===W.key}const InternalObjectKey="__vInternal",normalizeKey=({key:F})=>F??null,normalizeRef=({ref:F,ref_key:W,ref_for:q})=>(typeof F=="number"&&(F=""+F),F!=null?isString$3(F)||isRef(F)||isFunction$2(F)?{i:currentRenderingInstance,r:F,k:W,f:!!q}:F:null);function createBaseVNode(F,W=null,q=null,K=0,X=null,tt=F===Fragment?0:1,rt=!1,ot=!1){const ut={__v_isVNode:!0,__v_skip:!0,type:F,props:W,key:W&&normalizeKey(W),ref:W&&normalizeRef(W),scopeId:currentScopeId,slotScopeIds:null,children:q,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:tt,patchFlag:K,dynamicProps:X,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return ot?(normalizeChildren(ut,q),tt&128&&F.normalize(ut)):q&&(ut.shapeFlag|=isString$3(q)?8:16),isBlockTreeEnabled>0&&!rt&¤tBlock&&(ut.patchFlag>0||tt&6)&&ut.patchFlag!==32&¤tBlock.push(ut),ut}const createVNode=_createVNode;function _createVNode(F,W=null,q=null,K=0,X=null,tt=!1){if((!F||F===NULL_DYNAMIC_COMPONENT)&&(F=Comment),isVNode(F)){const ot=cloneVNode(F,W,!0);return q&&normalizeChildren(ot,q),isBlockTreeEnabled>0&&!tt&¤tBlock&&(ot.shapeFlag&6?currentBlock[currentBlock.indexOf(F)]=ot:currentBlock.push(ot)),ot.patchFlag|=-2,ot}if(isClassComponent(F)&&(F=F.__vccOpts),W){W=guardReactiveProps(W);let{class:ot,style:ut}=W;ot&&!isString$3(ot)&&(W.class=normalizeClass(ot)),isObject$p(ut)&&(isProxy(ut)&&!isArray$j(ut)&&(ut=extend$8({},ut)),W.style=normalizeStyle(ut))}const rt=isString$3(F)?1:isSuspense(F)?128:isTeleport(F)?64:isObject$p(F)?4:isFunction$2(F)?2:0;return createBaseVNode(F,W,q,K,X,rt,tt,!0)}function guardReactiveProps(F){return F?isProxy(F)||InternalObjectKey in F?extend$8({},F):F:null}function cloneVNode(F,W,q=!1){const{props:K,ref:X,patchFlag:tt,children:rt}=F,ot=W?mergeProps(K||{},W):K;return{__v_isVNode:!0,__v_skip:!0,type:F.type,props:ot,key:ot&&normalizeKey(ot),ref:W&&W.ref?q&&X?isArray$j(X)?X.concat(normalizeRef(W)):[X,normalizeRef(W)]:normalizeRef(W):X,scopeId:F.scopeId,slotScopeIds:F.slotScopeIds,children:rt,target:F.target,targetAnchor:F.targetAnchor,staticCount:F.staticCount,shapeFlag:F.shapeFlag,patchFlag:W&&F.type!==Fragment?tt===-1?16:tt|16:tt,dynamicProps:F.dynamicProps,dynamicChildren:F.dynamicChildren,appContext:F.appContext,dirs:F.dirs,transition:F.transition,component:F.component,suspense:F.suspense,ssContent:F.ssContent&&cloneVNode(F.ssContent),ssFallback:F.ssFallback&&cloneVNode(F.ssFallback),el:F.el,anchor:F.anchor,ctx:F.ctx,ce:F.ce}}function createTextVNode(F=" ",W=0){return createVNode(Text$1,null,F,W)}function createStaticVNode(F,W){const q=createVNode(Static,null,F);return q.staticCount=W,q}function createCommentVNode(F="",W=!1){return W?(openBlock(),createBlock(Comment,null,F)):createVNode(Comment,null,F)}function normalizeVNode(F){return F==null||typeof F=="boolean"?createVNode(Comment):isArray$j(F)?createVNode(Fragment,null,F.slice()):typeof F=="object"?cloneIfMounted(F):createVNode(Text$1,null,String(F))}function cloneIfMounted(F){return F.el===null&&F.patchFlag!==-1||F.memo?F:cloneVNode(F)}function normalizeChildren(F,W){let q=0;const{shapeFlag:K}=F;if(W==null)W=null;else if(isArray$j(W))q=16;else if(typeof W=="object")if(K&65){const X=W.default;X&&(X._c&&(X._d=!1),normalizeChildren(F,X()),X._c&&(X._d=!0));return}else{q=32;const X=W._;!X&&!(InternalObjectKey in W)?W._ctx=currentRenderingInstance:X===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?W._=1:(W._=2,F.patchFlag|=1024))}else isFunction$2(W)?(W={default:W,_ctx:currentRenderingInstance},q=32):(W=String(W),K&64?(q=16,W=[createTextVNode(W)]):q=8);F.children=W,F.shapeFlag|=q}function mergeProps(...F){const W={};for(let q=0;qcurrentInstance=F),internalSetCurrentInstance=F=>{globalCurrentInstanceSetters.length>1?globalCurrentInstanceSetters.forEach(W=>W(F)):globalCurrentInstanceSetters[0](F)};const setCurrentInstance=F=>{internalSetCurrentInstance(F),F.scope.on()},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(F){return F.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(F,W=!1){isInSSRComponentSetup=W;const{props:q,children:K}=F.vnode,X=isStatefulComponent(F);initProps(F,q,X,W),initSlots(F,K);const tt=X?setupStatefulComponent(F,W):void 0;return isInSSRComponentSetup=!1,tt}function setupStatefulComponent(F,W){const q=F.type;F.accessCache=Object.create(null),F.proxy=markRaw(new Proxy(F.ctx,PublicInstanceProxyHandlers));const{setup:K}=q;if(K){const X=F.setupContext=K.length>1?createSetupContext(F):null;setCurrentInstance(F),pauseTracking();const tt=callWithErrorHandling(K,F,0,[F.props,X]);if(resetTracking(),unsetCurrentInstance(),isPromise(tt)){if(tt.then(unsetCurrentInstance,unsetCurrentInstance),W)return tt.then(rt=>{handleSetupResult(F,rt,W)}).catch(rt=>{handleError$1(rt,F,0)});F.asyncDep=tt}else handleSetupResult(F,tt,W)}else finishComponentSetup(F,W)}function handleSetupResult(F,W,q){isFunction$2(W)?F.type.__ssrInlineRender?F.ssrRender=W:F.render=W:isObject$p(W)&&(F.setupState=proxyRefs(W)),finishComponentSetup(F,q)}let compile$1;function finishComponentSetup(F,W,q){const K=F.type;if(!F.render){if(!W&&compile$1&&!K.render){const X=K.template||resolveMergedOptions(F).template;if(X){const{isCustomElement:tt,compilerOptions:rt}=F.appContext.config,{delimiters:ot,compilerOptions:ut}=K,yn=extend$8(extend$8({isCustomElement:tt,delimiters:ot},rt),ut);K.render=compile$1(X,yn)}}F.render=K.render||NOOP}setCurrentInstance(F),pauseTracking(),applyOptions(F),resetTracking(),unsetCurrentInstance()}function getAttrsProxy(F){return F.attrsProxy||(F.attrsProxy=new Proxy(F.attrs,{get(W,q){return track(F,"get","$attrs"),W[q]}}))}function createSetupContext(F){const W=q=>{F.exposed=q||{}};return{get attrs(){return getAttrsProxy(F)},slots:F.slots,emit:F.emit,expose:W}}function getExposeProxy(F){if(F.exposed)return F.exposeProxy||(F.exposeProxy=new Proxy(proxyRefs(markRaw(F.exposed)),{get(W,q){if(q in W)return W[q];if(q in publicPropertiesMap)return publicPropertiesMap[q](F)},has(W,q){return q in W||q in publicPropertiesMap}}))}function isClassComponent(F){return isFunction$2(F)&&"__vccOpts"in F}const computed=(F,W)=>computed$1(F,W,isInSSRComponentSetup),ssrContextKey=Symbol.for("v-scx"),useSSRContext=()=>inject(ssrContextKey),version$4="3.3.4",svgNS="http://www.w3.org/2000/svg",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(F,W,q)=>{W.insertBefore(F,q||null)},remove:F=>{const W=F.parentNode;W&&W.removeChild(F)},createElement:(F,W,q,K)=>{const X=W?doc.createElementNS(svgNS,F):doc.createElement(F,q?{is:q}:void 0);return F==="select"&&K&&K.multiple!=null&&X.setAttribute("multiple",K.multiple),X},createText:F=>doc.createTextNode(F),createComment:F=>doc.createComment(F),setText:(F,W)=>{F.nodeValue=W},setElementText:(F,W)=>{F.textContent=W},parentNode:F=>F.parentNode,nextSibling:F=>F.nextSibling,querySelector:F=>doc.querySelector(F),setScopeId(F,W){F.setAttribute(W,"")},insertStaticContent(F,W,q,K,X,tt){const rt=q?q.previousSibling:W.lastChild;if(X&&(X===tt||X.nextSibling))for(;W.insertBefore(X.cloneNode(!0),q),!(X===tt||!(X=X.nextSibling)););else{templateContainer.innerHTML=K?`${F}`:F;const ot=templateContainer.content;if(K){const ut=ot.firstChild;for(;ut.firstChild;)ot.appendChild(ut.firstChild);ot.removeChild(ut)}W.insertBefore(ot,q)}return[rt?rt.nextSibling:W.firstChild,q?q.previousSibling:W.lastChild]}};function patchClass(F,W,q){const K=F._vtc;K&&(W=(W?[W,...K]:[...K]).join(" ")),W==null?F.removeAttribute("class"):q?F.setAttribute("class",W):F.className=W}function patchStyle(F,W,q){const K=F.style,X=isString$3(q);if(q&&!X){if(W&&!isString$3(W))for(const tt in W)q[tt]==null&&setStyle(K,tt,"");for(const tt in q)setStyle(K,tt,q[tt])}else{const tt=K.display;X?W!==q&&(K.cssText=q):W&&F.removeAttribute("style"),"_vod"in F&&(K.display=tt)}}const importantRE=/\s*!important$/;function setStyle(F,W,q){if(isArray$j(q))q.forEach(K=>setStyle(F,W,K));else if(q==null&&(q=""),W.startsWith("--"))F.setProperty(W,q);else{const K=autoPrefix(F,W);importantRE.test(q)?F.setProperty(hyphenate(K),q.replace(importantRE,""),"important"):F[K]=q}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(F,W){const q=prefixCache[W];if(q)return q;let K=camelize(W);if(K!=="filter"&&K in F)return prefixCache[W]=K;K=capitalize(K);for(let X=0;XcachedNow||(p$2.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(F,W){const q=K=>{if(!K._vts)K._vts=Date.now();else if(K._vts<=q.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(K,q.value),W,5,[K])};return q.value=F,q.attached=getNow(),q}function patchStopImmediatePropagation(F,W){if(isArray$j(W)){const q=F.stopImmediatePropagation;return F.stopImmediatePropagation=()=>{q.call(F),F._stopped=!0},W.map(K=>X=>!X._stopped&&K&&K(X))}else return W}const nativeOnRE=/^on[a-z]/,patchProp=(F,W,q,K,X=!1,tt,rt,ot,ut)=>{W==="class"?patchClass(F,K,X):W==="style"?patchStyle(F,q,K):isOn(W)?isModelListener(W)||patchEvent(F,W,q,K,rt):(W[0]==="."?(W=W.slice(1),!0):W[0]==="^"?(W=W.slice(1),!1):shouldSetAsProp(F,W,K,X))?patchDOMProp(F,W,K,tt,rt,ot,ut):(W==="true-value"?F._trueValue=K:W==="false-value"&&(F._falseValue=K),patchAttr(F,W,K,X))};function shouldSetAsProp(F,W,q,K){return K?!!(W==="innerHTML"||W==="textContent"||W in F&&nativeOnRE.test(W)&&isFunction$2(q)):W==="spellcheck"||W==="draggable"||W==="translate"||W==="form"||W==="list"&&F.tagName==="INPUT"||W==="type"&&F.tagName==="TEXTAREA"||nativeOnRE.test(W)&&isString$3(q)?!1:W in F}function defineCustomElement(F,W){const q=defineComponent(F);class K extends VueElement{constructor(tt){super(q,tt,W)}}return K.def=q,K}const BaseClass=typeof HTMLElement<"u"?HTMLElement:class{};class VueElement extends BaseClass{constructor(W,q={},K){super(),this._def=W,this._props=q,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&K?K(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,nextTick(()=>{this._connected||(render$2(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let K=0;K{for(const X of K)this._setAttr(X.attributeName)}).observe(this,{attributes:!0});const W=(K,X=!1)=>{const{props:tt,styles:rt}=K;let ot;if(tt&&!isArray$j(tt))for(const ut in tt){const yn=tt[ut];(yn===Number||yn&&yn.type===Number)&&(ut in this._props&&(this._props[ut]=toNumber(this._props[ut])),(ot||(ot=Object.create(null)))[camelize(ut)]=!0)}this._numberProps=ot,X&&this._resolveProps(K),this._applyStyles(rt),this._update()},q=this._def.__asyncLoader;q?q().then(K=>W(K,!0)):W(this._def)}_resolveProps(W){const{props:q}=W,K=isArray$j(q)?q:Object.keys(q||{});for(const X of Object.keys(this))X[0]!=="_"&&K.includes(X)&&this._setProp(X,this[X],!0,!1);for(const X of K.map(camelize))Object.defineProperty(this,X,{get(){return this._getProp(X)},set(tt){this._setProp(X,tt)}})}_setAttr(W){let q=this.getAttribute(W);const K=camelize(W);this._numberProps&&this._numberProps[K]&&(q=toNumber(q)),this._setProp(K,q,!1)}_getProp(W){return this._props[W]}_setProp(W,q,K=!0,X=!0){q!==this._props[W]&&(this._props[W]=q,X&&this._instance&&this._update(),K&&(q===!0?this.setAttribute(hyphenate(W),""):typeof q=="string"||typeof q=="number"?this.setAttribute(hyphenate(W),q+""):q||this.removeAttribute(hyphenate(W))))}_update(){render$2(this._createVNode(),this.shadowRoot)}_createVNode(){const W=createVNode(this._def,extend$8({},this._props));return this._instance||(W.ce=q=>{this._instance=q,q.isCE=!0;const K=(tt,rt)=>{this.dispatchEvent(new CustomEvent(tt,{detail:rt}))};q.emit=(tt,...rt)=>{K(tt,rt),hyphenate(tt)!==tt&&K(hyphenate(tt),rt)};let X=this;for(;X=X&&(X.parentNode||X.host);)if(X instanceof VueElement){q.parent=X._instance,q.provides=X._instance.provides;break}}),W}_applyStyles(W){W&&W.forEach(q=>{const K=document.createElement("style");K.textContent=q,this.shadowRoot.appendChild(K)})}}const rendererOptions=extend$8({patchProp},nodeOps);let renderer$1;function ensureRenderer(){return renderer$1||(renderer$1=createRenderer(rendererOptions))}const render$2=(...F)=>{ensureRenderer().render(...F)};var basePath="";function setBasePath(F){basePath=F}function getBasePath(F=""){if(!basePath){const W=[...document.getElementsByTagName("script")],q=W.find(K=>K.hasAttribute("data-shoelace"));if(q)setBasePath(q.getAttribute("data-shoelace"));else{const K=W.find(tt=>/shoelace(\.min)?\.js($|\?)/.test(tt.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(tt.src));let X="";K&&(X=K.getAttribute("src")),setBasePath(X.split("/").slice(0,-1).join("/"))}}return basePath.replace(/\/$/,"")+(F?`/${F.replace(/^\//,"")}`:"")}var library={name:"default",resolver:F=>getBasePath(`assets/icons/${F}.svg`)},library_default_default=library,icons={caret:` +var V3=Object.defineProperty;var G3=(F,W,q)=>W in F?V3(F,W,{enumerable:!0,configurable:!0,writable:!0,value:q}):F[W]=q;var Sv=(F,W,q)=>(G3(F,typeof W!="symbol"?W+"":W,q),q),W3=(F,W,q)=>{if(!W.has(F))throw TypeError("Cannot "+q)};var uI=(F,W,q)=>{if(W.has(F))throw TypeError("Cannot add the same private member more than once");W instanceof WeakSet?W.add(F):W.set(F,q)};var NC=(F,W,q)=>(W3(F,W,"access private method"),q);import{marked as marked$1}from"https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js";import"https://cdn.jsdelivr.net/npm/marked-footnote/dist/index.umd.min.js";import"https://cdn.jsdelivr.net/npm/yaml@2.3.4/browser/index.min.js";(function(){const W=document.createElement("link").relList;if(W&&W.supports&&W.supports("modulepreload"))return;for(const X of document.querySelectorAll('link[rel="modulepreload"]'))K(X);new MutationObserver(X=>{for(const tt of X)if(tt.type==="childList")for(const rt of tt.addedNodes)rt.tagName==="LINK"&&rt.rel==="modulepreload"&&K(rt)}).observe(document,{childList:!0,subtree:!0});function q(X){const tt={};return X.integrity&&(tt.integrity=X.integrity),X.referrerPolicy&&(tt.referrerPolicy=X.referrerPolicy),X.crossOrigin==="use-credentials"?tt.credentials="include":X.crossOrigin==="anonymous"?tt.credentials="omit":tt.credentials="same-origin",tt}function K(X){if(X.ep)return;X.ep=!0;const tt=q(X);fetch(X.href,tt)}})();const index$1="",scriptRel="modulepreload",assetsURL=function(F){return"https://cdn.jsdelivr.net/npm/juncture-digital/"+F},seen={},__vitePreload=function(W,q,K){if(!q||q.length===0)return W();const X=document.getElementsByTagName("link");return Promise.all(q.map(tt=>{if(tt=assetsURL(tt),tt in seen)return;seen[tt]=!0;const rt=tt.endsWith(".css"),ot=rt?'[rel="stylesheet"]':"";if(!!K)for(let uo=X.length-1;uo>=0;uo--){const po=X[uo];if(po.href===tt&&(!rt||po.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${tt}"]${ot}`))return;const yn=document.createElement("link");if(yn.rel=rt?"stylesheet":scriptRel,rt||(yn.as="script",yn.crossOrigin=""),yn.href=tt,document.head.appendChild(yn),rt)return new Promise((uo,po)=>{yn.addEventListener("load",uo),yn.addEventListener("error",()=>po(new Error(`Unable to preload CSS for ${tt}`)))})})).then(()=>W()).catch(tt=>{const rt=new Event("vite:preloadError",{cancelable:!0});if(rt.payload=tt,window.dispatchEvent(rt),!rt.defaultPrevented)throw tt})};function makeMap(F,W){const q=Object.create(null),K=F.split(",");for(let X=0;X!!q[X.toLowerCase()]:X=>!!q[X]}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,onRE=/^on[^a-z]/,isOn=F=>onRE.test(F),isModelListener=F=>F.startsWith("onUpdate:"),extend$8=Object.assign,remove$1=(F,W)=>{const q=F.indexOf(W);q>-1&&F.splice(q,1)},hasOwnProperty$f=Object.prototype.hasOwnProperty,hasOwn$l=(F,W)=>hasOwnProperty$f.call(F,W),isArray$j=Array.isArray,isMap=F=>toTypeString(F)==="[object Map]",isSet=F=>toTypeString(F)==="[object Set]",isFunction$2=F=>typeof F=="function",isString$3=F=>typeof F=="string",isSymbol$8=F=>typeof F=="symbol",isObject$p=F=>F!==null&&typeof F=="object",isPromise=F=>isObject$p(F)&&isFunction$2(F.then)&&isFunction$2(F.catch),objectToString$4=Object.prototype.toString,toTypeString=F=>objectToString$4.call(F),toRawType=F=>toTypeString(F).slice(8,-1),isPlainObject$1=F=>toTypeString(F)==="[object Object]",isIntegerKey=F=>isString$3(F)&&F!=="NaN"&&F[0]!=="-"&&""+parseInt(F,10)===F,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=F=>{const W=Object.create(null);return q=>W[q]||(W[q]=F(q))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(F=>F.replace(camelizeRE,(W,q)=>q?q.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(F=>F.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(F=>F.charAt(0).toUpperCase()+F.slice(1)),toHandlerKey=cacheStringFunction(F=>F?`on${capitalize(F)}`:""),hasChanged=(F,W)=>!Object.is(F,W),invokeArrayFns=(F,W)=>{for(let q=0;q{Object.defineProperty(F,W,{configurable:!0,enumerable:!1,value:q})},looseToNumber=F=>{const W=parseFloat(F);return isNaN(W)?F:W},toNumber=F=>{const W=isString$3(F)?Number(F):NaN;return isNaN(W)?F:W};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function normalizeStyle(F){if(isArray$j(F)){const W={};for(let q=0;q{if(q){const K=q.split(propertyDelimiterRE);K.length>1&&(W[K[0].trim()]=K[1].trim())}}),W}function normalizeClass(F){let W="";if(isString$3(F))W=F;else if(isArray$j(F))for(let q=0;qisString$3(F)?F:F==null?"":isArray$j(F)||isObject$p(F)&&(F.toString===objectToString$4||!isFunction$2(F.toString))?JSON.stringify(F,replacer,2):String(F),replacer=(F,W)=>W&&W.__v_isRef?replacer(F,W.value):isMap(W)?{[`Map(${W.size})`]:[...W.entries()].reduce((q,[K,X])=>(q[`${K} =>`]=X,q),{})}:isSet(W)?{[`Set(${W.size})`]:[...W.values()]}:isObject$p(W)&&!isArray$j(W)&&!isPlainObject$1(W)?String(W):W;let activeEffectScope;class EffectScope{constructor(W=!1){this.detached=W,this._active=!0,this.effects=[],this.cleanups=[],this.parent=activeEffectScope,!W&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}run(W){if(this._active){const q=activeEffectScope;try{return activeEffectScope=this,W()}finally{activeEffectScope=q}}}on(){activeEffectScope=this}off(){activeEffectScope=this.parent}stop(W){if(this._active){let q,K;for(q=0,K=this.effects.length;q{const W=new Set(F);return W.w=0,W.n=0,W},wasTracked=F=>(F.w&trackOpBit)>0,newTracked=F=>(F.n&trackOpBit)>0,initDepMarkers=({deps:F})=>{if(F.length)for(let W=0;W{const{deps:W}=F;if(W.length){let q=0;for(let K=0;K{(uo==="length"||uo>=ut)&&ot.push(yn)})}else switch(q!==void 0&&ot.push(rt.get(q)),W){case"add":isArray$j(F)?isIntegerKey(q)&&ot.push(rt.get("length")):(ot.push(rt.get(ITERATE_KEY)),isMap(F)&&ot.push(rt.get(MAP_KEY_ITERATE_KEY)));break;case"delete":isArray$j(F)||(ot.push(rt.get(ITERATE_KEY)),isMap(F)&&ot.push(rt.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(F)&&ot.push(rt.get(ITERATE_KEY));break}if(ot.length===1)ot[0]&&triggerEffects(ot[0]);else{const ut=[];for(const yn of ot)yn&&ut.push(...yn);triggerEffects(createDep(ut))}}function triggerEffects(F,W){const q=isArray$j(F)?F:[...F];for(const K of q)K.computed&&triggerEffect(K);for(const K of q)K.computed||triggerEffect(K)}function triggerEffect(F,W){(F!==activeEffect||F.allowRecurse)&&(F.scheduler?F.scheduler():F.run())}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(F=>F!=="arguments"&&F!=="caller").map(F=>Symbol[F]).filter(isSymbol$8)),get$1$3=createGetter(),shallowGet=createGetter(!1,!0),readonlyGet=createGetter(!0),arrayInstrumentations=createArrayInstrumentations();function createArrayInstrumentations(){const F={};return["includes","indexOf","lastIndexOf"].forEach(W=>{F[W]=function(...q){const K=toRaw(this);for(let tt=0,rt=this.length;tt{F[W]=function(...q){pauseTracking();const K=toRaw(this)[W].apply(this,q);return resetTracking(),K}}),F}function hasOwnProperty$e(F){const W=toRaw(this);return track(W,"has",F),W.hasOwnProperty(F)}function createGetter(F=!1,W=!1){return function(K,X,tt){if(X==="__v_isReactive")return!F;if(X==="__v_isReadonly")return F;if(X==="__v_isShallow")return W;if(X==="__v_raw"&&tt===(F?W?shallowReadonlyMap:readonlyMap:W?shallowReactiveMap:reactiveMap).get(K))return K;const rt=isArray$j(K);if(!F){if(rt&&hasOwn$l(arrayInstrumentations,X))return Reflect.get(arrayInstrumentations,X,tt);if(X==="hasOwnProperty")return hasOwnProperty$e}const ot=Reflect.get(K,X,tt);return(isSymbol$8(X)?builtInSymbols.has(X):isNonTrackableKeys(X))||(F||track(K,"get",X),W)?ot:isRef(ot)?rt&&isIntegerKey(X)?ot:ot.value:isObject$p(ot)?F?readonly(ot):reactive(ot):ot}}const set$1$4=createSetter(),shallowSet=createSetter(!0);function createSetter(F=!1){return function(q,K,X,tt){let rt=q[K];if(isReadonly(rt)&&isRef(rt)&&!isRef(X))return!1;if(!F&&(!isShallow(X)&&!isReadonly(X)&&(rt=toRaw(rt),X=toRaw(X)),!isArray$j(q)&&isRef(rt)&&!isRef(X)))return rt.value=X,!0;const ot=isArray$j(q)&&isIntegerKey(K)?Number(K)F,getProto=F=>Reflect.getPrototypeOf(F);function get$c(F,W,q=!1,K=!1){F=F.__v_raw;const X=toRaw(F),tt=toRaw(W);q||(W!==tt&&track(X,"get",W),track(X,"get",tt));const{has:rt}=getProto(X),ot=K?toShallow:q?toReadonly:toReactive;if(rt.call(X,W))return ot(F.get(W));if(rt.call(X,tt))return ot(F.get(tt));F!==X&&F.get(W)}function has$3(F,W=!1){const q=this.__v_raw,K=toRaw(q),X=toRaw(F);return W||(F!==X&&track(K,"has",F),track(K,"has",X)),F===X?q.has(F):q.has(F)||q.has(X)}function size$2(F,W=!1){return F=F.__v_raw,!W&&track(toRaw(F),"iterate",ITERATE_KEY),Reflect.get(F,"size",F)}function add$2(F){F=toRaw(F);const W=toRaw(this);return getProto(W).has.call(W,F)||(W.add(F),trigger(W,"add",F,F)),this}function set$b(F,W){W=toRaw(W);const q=toRaw(this),{has:K,get:X}=getProto(q);let tt=K.call(q,F);tt||(F=toRaw(F),tt=K.call(q,F));const rt=X.call(q,F);return q.set(F,W),tt?hasChanged(W,rt)&&trigger(q,"set",F,W):trigger(q,"add",F,W),this}function deleteEntry(F){const W=toRaw(this),{has:q,get:K}=getProto(W);let X=q.call(W,F);X||(F=toRaw(F),X=q.call(W,F)),K&&K.call(W,F);const tt=W.delete(F);return X&&trigger(W,"delete",F,void 0),tt}function clear$2(){const F=toRaw(this),W=F.size!==0,q=F.clear();return W&&trigger(F,"clear",void 0,void 0),q}function createForEach(F,W){return function(K,X){const tt=this,rt=tt.__v_raw,ot=toRaw(rt),ut=W?toShallow:F?toReadonly:toReactive;return!F&&track(ot,"iterate",ITERATE_KEY),rt.forEach((yn,uo)=>K.call(X,ut(yn),ut(uo),tt))}}function createIterableMethod(F,W,q){return function(...K){const X=this.__v_raw,tt=toRaw(X),rt=isMap(tt),ot=F==="entries"||F===Symbol.iterator&&rt,ut=F==="keys"&&rt,yn=X[F](...K),uo=q?toShallow:W?toReadonly:toReactive;return!W&&track(tt,"iterate",ut?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:po,done:mo}=yn.next();return mo?{value:po,done:mo}:{value:ot?[uo(po[0]),uo(po[1])]:uo(po),done:mo}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(F){return function(...W){return F==="delete"?!1:this}}function createInstrumentations(){const F={get(tt){return get$c(this,tt)},get size(){return size$2(this)},has:has$3,add:add$2,set:set$b,delete:deleteEntry,clear:clear$2,forEach:createForEach(!1,!1)},W={get(tt){return get$c(this,tt,!1,!0)},get size(){return size$2(this)},has:has$3,add:add$2,set:set$b,delete:deleteEntry,clear:clear$2,forEach:createForEach(!1,!0)},q={get(tt){return get$c(this,tt,!0)},get size(){return size$2(this,!0)},has(tt){return has$3.call(this,tt,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},K={get(tt){return get$c(this,tt,!0,!0)},get size(){return size$2(this,!0)},has(tt){return has$3.call(this,tt,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(tt=>{F[tt]=createIterableMethod(tt,!1,!1),q[tt]=createIterableMethod(tt,!0,!1),W[tt]=createIterableMethod(tt,!1,!0),K[tt]=createIterableMethod(tt,!0,!0)}),[F,q,W,K]}const[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(F,W){const q=W?F?shallowReadonlyInstrumentations:shallowInstrumentations:F?readonlyInstrumentations:mutableInstrumentations;return(K,X,tt)=>X==="__v_isReactive"?!F:X==="__v_isReadonly"?F:X==="__v_raw"?K:Reflect.get(hasOwn$l(q,X)&&X in K?q:K,X,tt)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(F){switch(F){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(F){return F.__v_skip||!Object.isExtensible(F)?0:targetTypeMap(toRawType(F))}function reactive(F){return isReadonly(F)?F:createReactiveObject(F,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(F){return createReactiveObject(F,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(F){return createReactiveObject(F,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function createReactiveObject(F,W,q,K,X){if(!isObject$p(F)||F.__v_raw&&!(W&&F.__v_isReactive))return F;const tt=X.get(F);if(tt)return tt;const rt=getTargetType(F);if(rt===0)return F;const ot=new Proxy(F,rt===2?K:q);return X.set(F,ot),ot}function isReactive(F){return isReadonly(F)?isReactive(F.__v_raw):!!(F&&F.__v_isReactive)}function isReadonly(F){return!!(F&&F.__v_isReadonly)}function isShallow(F){return!!(F&&F.__v_isShallow)}function isProxy(F){return isReactive(F)||isReadonly(F)}function toRaw(F){const W=F&&F.__v_raw;return W?toRaw(W):F}function markRaw(F){return def(F,"__v_skip",!0),F}const toReactive=F=>isObject$p(F)?reactive(F):F,toReadonly=F=>isObject$p(F)?readonly(F):F;function trackRefValue(F){shouldTrack&&activeEffect&&(F=toRaw(F),trackEffects(F.dep||(F.dep=createDep())))}function triggerRefValue(F,W){F=toRaw(F);const q=F.dep;q&&triggerEffects(q)}function isRef(F){return!!(F&&F.__v_isRef===!0)}function ref(F){return createRef(F,!1)}function createRef(F,W){return isRef(F)?F:new RefImpl(F,W)}class RefImpl{constructor(W,q){this.__v_isShallow=q,this.dep=void 0,this.__v_isRef=!0,this._rawValue=q?W:toRaw(W),this._value=q?W:toReactive(W)}get value(){return trackRefValue(this),this._value}set value(W){const q=this.__v_isShallow||isShallow(W)||isReadonly(W);W=q?W:toRaw(W),hasChanged(W,this._rawValue)&&(this._rawValue=W,this._value=q?W:toReactive(W),triggerRefValue(this))}}function unref(F){return isRef(F)?F.value:F}const shallowUnwrapHandlers={get:(F,W,q)=>unref(Reflect.get(F,W,q)),set:(F,W,q,K)=>{const X=F[W];return isRef(X)&&!isRef(q)?(X.value=q,!0):Reflect.set(F,W,q,K)}};function proxyRefs(F){return isReactive(F)?F:new Proxy(F,shallowUnwrapHandlers)}class ComputedRefImpl{constructor(W,q,K,X){this._setter=q,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new ReactiveEffect(W,()=>{this._dirty||(this._dirty=!0,triggerRefValue(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!X,this.__v_isReadonly=K}get value(){const W=toRaw(this);return trackRefValue(W),(W._dirty||!W._cacheable)&&(W._dirty=!1,W._value=W.effect.run()),W._value}set value(W){this._setter(W)}}function computed$1(F,W,q=!1){let K,X;const tt=isFunction$2(F);return tt?(K=F,X=NOOP):(K=F.get,X=F.set),new ComputedRefImpl(K,X,tt||!X,q)}function warn$1(F,...W){}function callWithErrorHandling(F,W,q,K){let X;try{X=K?F(...K):F()}catch(tt){handleError$1(tt,W,q)}return X}function callWithAsyncErrorHandling(F,W,q,K){if(isFunction$2(F)){const tt=callWithErrorHandling(F,W,q,K);return tt&&isPromise(tt)&&tt.catch(rt=>{handleError$1(rt,W,q)}),tt}const X=[];for(let tt=0;tt>>1;getId(queue$3[K])flushIndex&&queue$3.splice(W,1)}function queuePostFlushCb(F){isArray$j(F)?pendingPostFlushCbs.push(...F):(!activePostFlushCbs||!activePostFlushCbs.includes(F,F.allowRecurse?postFlushIndex+1:postFlushIndex))&&pendingPostFlushCbs.push(F),queueFlush()}function flushPreFlushCbs(F,W=isFlushing?flushIndex+1:0){for(;WgetId(q)-getId(K)),postFlushIndex=0;postFlushIndexF.id==null?1/0:F.id,comparator=(F,W)=>{const q=getId(F)-getId(W);if(q===0){if(F.pre&&!W.pre)return-1;if(W.pre&&!F.pre)return 1}return q};function flushJobs(F){isFlushPending=!1,isFlushing=!0,queue$3.sort(comparator);const W=NOOP;try{for(flushIndex=0;flushIndexisString$3(wo)?wo.trim():wo)),po&&(X=q.map(looseToNumber))}let ot,ut=K[ot=toHandlerKey(W)]||K[ot=toHandlerKey(camelize(W))];!ut&&tt&&(ut=K[ot=toHandlerKey(hyphenate(W))]),ut&&callWithAsyncErrorHandling(ut,F,6,X);const yn=K[ot+"Once"];if(yn){if(!F.emitted)F.emitted={};else if(F.emitted[ot])return;F.emitted[ot]=!0,callWithAsyncErrorHandling(yn,F,6,X)}}function normalizeEmitsOptions(F,W,q=!1){const K=W.emitsCache,X=K.get(F);if(X!==void 0)return X;const tt=F.emits;let rt={},ot=!1;if(!isFunction$2(F)){const ut=yn=>{const uo=normalizeEmitsOptions(yn,W,!0);uo&&(ot=!0,extend$8(rt,uo))};!q&&W.mixins.length&&W.mixins.forEach(ut),F.extends&&ut(F.extends),F.mixins&&F.mixins.forEach(ut)}return!tt&&!ot?(isObject$p(F)&&K.set(F,null),null):(isArray$j(tt)?tt.forEach(ut=>rt[ut]=null):extend$8(rt,tt),isObject$p(F)&&K.set(F,rt),rt)}function isEmitListener(F,W){return!F||!isOn(W)?!1:(W=W.slice(2).replace(/Once$/,""),hasOwn$l(F,W[0].toLowerCase()+W.slice(1))||hasOwn$l(F,hyphenate(W))||hasOwn$l(F,W))}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(F){const W=currentRenderingInstance;return currentRenderingInstance=F,currentScopeId=F&&F.type.__scopeId||null,W}function pushScopeId(F){currentScopeId=F}function popScopeId(){currentScopeId=null}function withCtx(F,W=currentRenderingInstance,q){if(!W||F._n)return F;const K=(...X)=>{K._d&&setBlockTracking(-1);const tt=setCurrentRenderingInstance(W);let rt;try{rt=F(...X)}finally{setCurrentRenderingInstance(tt),K._d&&setBlockTracking(1)}return rt};return K._n=!0,K._c=!0,K._d=!0,K}function markAttrsAccessed(){}function renderComponentRoot(F){const{type:W,vnode:q,proxy:K,withProxy:X,props:tt,propsOptions:[rt],slots:ot,attrs:ut,emit:yn,render:uo,renderCache:po,data:mo,setupState:wo,ctx:lf,inheritAttrs:yf}=F;let cf,vf;const _f=setCurrentRenderingInstance(F);try{if(q.shapeFlag&4){const xf=X||K;cf=normalizeVNode(uo.call(xf,xf,po,tt,wo,mo,lf)),vf=ut}else{const xf=W;cf=normalizeVNode(xf.length>1?xf(tt,{attrs:ut,slots:ot,emit:yn}):xf(tt,null)),vf=W.props?ut:getFunctionalFallthrough(ut)}}catch(xf){blockStack.length=0,handleError$1(xf,F,1),cf=createVNode(Comment)}let $f=cf;if(vf&&yf!==!1){const xf=Object.keys(vf),{shapeFlag:Af}=$f;xf.length&&Af&7&&(rt&&xf.some(isModelListener)&&(vf=filterModelListeners(vf,rt)),$f=cloneVNode($f,vf))}return q.dirs&&($f=cloneVNode($f),$f.dirs=$f.dirs?$f.dirs.concat(q.dirs):q.dirs),q.transition&&($f.transition=q.transition),cf=$f,setCurrentRenderingInstance(_f),cf}const getFunctionalFallthrough=F=>{let W;for(const q in F)(q==="class"||q==="style"||isOn(q))&&((W||(W={}))[q]=F[q]);return W},filterModelListeners=(F,W)=>{const q={};for(const K in F)(!isModelListener(K)||!(K.slice(9)in W))&&(q[K]=F[K]);return q};function shouldUpdateComponent(F,W,q){const{props:K,children:X,component:tt}=F,{props:rt,children:ot,patchFlag:ut}=W,yn=tt.emitsOptions;if(W.dirs||W.transition)return!0;if(q&&ut>=0){if(ut&1024)return!0;if(ut&16)return K?hasPropsChanged(K,rt,yn):!!rt;if(ut&8){const uo=W.dynamicProps;for(let po=0;poF.__isSuspense;function queueEffectWithSuspense(F,W){W&&W.pendingBranch?isArray$j(F)?W.effects.push(...F):W.effects.push(F):queuePostFlushCb(F)}const INITIAL_WATCHER_VALUE={};function watch$1(F,W,q){return doWatch(F,W,q)}function doWatch(F,W,{immediate:q,deep:K,flush:X,onTrack:tt,onTrigger:rt}=EMPTY_OBJ){var ot;const ut=getCurrentScope()===((ot=currentInstance)==null?void 0:ot.scope)?currentInstance:null;let yn,uo=!1,po=!1;if(isRef(F)?(yn=()=>F.value,uo=isShallow(F)):isReactive(F)?(yn=()=>F,K=!0):isArray$j(F)?(po=!0,uo=F.some(xf=>isReactive(xf)||isShallow(xf)),yn=()=>F.map(xf=>{if(isRef(xf))return xf.value;if(isReactive(xf))return traverse(xf);if(isFunction$2(xf))return callWithErrorHandling(xf,ut,2)})):isFunction$2(F)?W?yn=()=>callWithErrorHandling(F,ut,2):yn=()=>{if(!(ut&&ut.isUnmounted))return mo&&mo(),callWithAsyncErrorHandling(F,ut,3,[wo])}:yn=NOOP,W&&K){const xf=yn;yn=()=>traverse(xf())}let mo,wo=xf=>{mo=_f.onStop=()=>{callWithErrorHandling(xf,ut,4)}},lf;if(isInSSRComponentSetup)if(wo=NOOP,W?q&&callWithAsyncErrorHandling(W,ut,3,[yn(),po?[]:void 0,wo]):yn(),X==="sync"){const xf=useSSRContext();lf=xf.__watcherHandles||(xf.__watcherHandles=[])}else return NOOP;let yf=po?new Array(F.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const cf=()=>{if(_f.active)if(W){const xf=_f.run();(K||uo||(po?xf.some((Af,Cf)=>hasChanged(Af,yf[Cf])):hasChanged(xf,yf)))&&(mo&&mo(),callWithAsyncErrorHandling(W,ut,3,[xf,yf===INITIAL_WATCHER_VALUE?void 0:po&&yf[0]===INITIAL_WATCHER_VALUE?[]:yf,wo]),yf=xf)}else _f.run()};cf.allowRecurse=!!W;let vf;X==="sync"?vf=cf:X==="post"?vf=()=>queuePostRenderEffect(cf,ut&&ut.suspense):(cf.pre=!0,ut&&(cf.id=ut.uid),vf=()=>queueJob(cf));const _f=new ReactiveEffect(yn,vf);W?q?cf():yf=_f.run():X==="post"?queuePostRenderEffect(_f.run.bind(_f),ut&&ut.suspense):_f.run();const $f=()=>{_f.stop(),ut&&ut.scope&&remove$1(ut.scope.effects,_f)};return lf&&lf.push($f),$f}function instanceWatch(F,W,q){const K=this.proxy,X=isString$3(F)?F.includes(".")?createPathGetter(K,F):()=>K[F]:F.bind(K,K);let tt;isFunction$2(W)?tt=W:(tt=W.handler,q=W);const rt=currentInstance;setCurrentInstance(this);const ot=doWatch(X,tt.bind(K),q);return rt?setCurrentInstance(rt):unsetCurrentInstance(),ot}function createPathGetter(F,W){const q=W.split(".");return()=>{let K=F;for(let X=0;X{traverse(q,W)});else if(isPlainObject$1(F))for(const q in F)traverse(F[q],W);return F}function invokeDirectiveHook(F,W,q,K){const X=F.dirs,tt=W&&W.dirs;for(let rt=0;rtextend$8({name:F.name},W,{setup:F}))():F}const isAsyncWrapper=F=>!!F.type.__asyncLoader,isKeepAlive=F=>F.type.__isKeepAlive;function onActivated(F,W){registerKeepAliveHook(F,"a",W)}function onDeactivated(F,W){registerKeepAliveHook(F,"da",W)}function registerKeepAliveHook(F,W,q=currentInstance){const K=F.__wdc||(F.__wdc=()=>{let X=q;for(;X;){if(X.isDeactivated)return;X=X.parent}return F()});if(injectHook(W,K,q),q){let X=q.parent;for(;X&&X.parent;)isKeepAlive(X.parent.vnode)&&injectToKeepAliveRoot(K,W,q,X),X=X.parent}}function injectToKeepAliveRoot(F,W,q,K){const X=injectHook(W,F,K,!0);onUnmounted(()=>{remove$1(K[W],X)},q)}function injectHook(F,W,q=currentInstance,K=!1){if(q){const X=q[F]||(q[F]=[]),tt=W.__weh||(W.__weh=(...rt)=>{if(q.isUnmounted)return;pauseTracking(),setCurrentInstance(q);const ot=callWithAsyncErrorHandling(W,q,F,rt);return unsetCurrentInstance(),resetTracking(),ot});return K?X.unshift(tt):X.push(tt),tt}}const createHook=F=>(W,q=currentInstance)=>(!isInSSRComponentSetup||F==="sp")&&injectHook(F,(...K)=>W(...K),q),onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(F,W=currentInstance){injectHook("ec",F,W)}const NULL_DYNAMIC_COMPONENT=Symbol.for("v-ndc");function renderList(F,W,q,K){let X;const tt=q&&q[K];if(isArray$j(F)||isString$3(F)){X=new Array(F.length);for(let rt=0,ot=F.length;rtW(rt,ot,void 0,tt&&tt[ot]));else{const rt=Object.keys(F);X=new Array(rt.length);for(let ot=0,ut=rt.length;otisVNode(W)?!(W.type===Comment||W.type===Fragment&&!ensureValidVNode(W.children)):!0)?F:null}const getPublicInstance=F=>F?isStatefulComponent(F)?getExposeProxy(F)||F.proxy:getPublicInstance(F.parent):null,publicPropertiesMap=extend$8(Object.create(null),{$:F=>F,$el:F=>F.vnode.el,$data:F=>F.data,$props:F=>F.props,$attrs:F=>F.attrs,$slots:F=>F.slots,$refs:F=>F.refs,$parent:F=>getPublicInstance(F.parent),$root:F=>getPublicInstance(F.root),$emit:F=>F.emit,$options:F=>resolveMergedOptions(F),$forceUpdate:F=>F.f||(F.f=()=>queueJob(F.update)),$nextTick:F=>F.n||(F.n=nextTick.bind(F.proxy)),$watch:F=>instanceWatch.bind(F)}),hasSetupBinding=(F,W)=>F!==EMPTY_OBJ&&!F.__isScriptSetup&&hasOwn$l(F,W),PublicInstanceProxyHandlers={get({_:F},W){const{ctx:q,setupState:K,data:X,props:tt,accessCache:rt,type:ot,appContext:ut}=F;let yn;if(W[0]!=="$"){const wo=rt[W];if(wo!==void 0)switch(wo){case 1:return K[W];case 2:return X[W];case 4:return q[W];case 3:return tt[W]}else{if(hasSetupBinding(K,W))return rt[W]=1,K[W];if(X!==EMPTY_OBJ&&hasOwn$l(X,W))return rt[W]=2,X[W];if((yn=F.propsOptions[0])&&hasOwn$l(yn,W))return rt[W]=3,tt[W];if(q!==EMPTY_OBJ&&hasOwn$l(q,W))return rt[W]=4,q[W];shouldCacheAccess&&(rt[W]=0)}}const uo=publicPropertiesMap[W];let po,mo;if(uo)return W==="$attrs"&&track(F,"get",W),uo(F);if((po=ot.__cssModules)&&(po=po[W]))return po;if(q!==EMPTY_OBJ&&hasOwn$l(q,W))return rt[W]=4,q[W];if(mo=ut.config.globalProperties,hasOwn$l(mo,W))return mo[W]},set({_:F},W,q){const{data:K,setupState:X,ctx:tt}=F;return hasSetupBinding(X,W)?(X[W]=q,!0):K!==EMPTY_OBJ&&hasOwn$l(K,W)?(K[W]=q,!0):hasOwn$l(F.props,W)||W[0]==="$"&&W.slice(1)in F?!1:(tt[W]=q,!0)},has({_:{data:F,setupState:W,accessCache:q,ctx:K,appContext:X,propsOptions:tt}},rt){let ot;return!!q[rt]||F!==EMPTY_OBJ&&hasOwn$l(F,rt)||hasSetupBinding(W,rt)||(ot=tt[0])&&hasOwn$l(ot,rt)||hasOwn$l(K,rt)||hasOwn$l(publicPropertiesMap,rt)||hasOwn$l(X.config.globalProperties,rt)},defineProperty(F,W,q){return q.get!=null?F._.accessCache[W]=0:hasOwn$l(q,"value")&&this.set(F,W,q.value,null),Reflect.defineProperty(F,W,q)}};function normalizePropsOrEmits(F){return isArray$j(F)?F.reduce((W,q)=>(W[q]=null,W),{}):F}let shouldCacheAccess=!0;function applyOptions(F){const W=resolveMergedOptions(F),q=F.proxy,K=F.ctx;shouldCacheAccess=!1,W.beforeCreate&&callHook(W.beforeCreate,F,"bc");const{data:X,computed:tt,methods:rt,watch:ot,provide:ut,inject:yn,created:uo,beforeMount:po,mounted:mo,beforeUpdate:wo,updated:lf,activated:yf,deactivated:cf,beforeDestroy:vf,beforeUnmount:_f,destroyed:$f,unmounted:xf,render:Af,renderTracked:Cf,renderTriggered:Pf,errorCaptured:Bf,serverPrefetch:Hf,expose:Df,inheritAttrs:Lf,components:kf,directives:Nf,filters:Yf}=W;if(yn&&resolveInjections(yn,K,null),rt)for(const ip in rt){const ap=rt[ip];isFunction$2(ap)&&(K[ip]=ap.bind(q))}if(X){const ip=X.call(q,q);isObject$p(ip)&&(F.data=reactive(ip))}if(shouldCacheAccess=!0,tt)for(const ip in tt){const ap=tt[ip],yp=isFunction$2(ap)?ap.bind(q,q):isFunction$2(ap.get)?ap.get.bind(q,q):NOOP,vp=!isFunction$2(ap)&&isFunction$2(ap.set)?ap.set.bind(q):NOOP,Np=computed({get:yp,set:vp});Object.defineProperty(K,ip,{enumerable:!0,configurable:!0,get:()=>Np.value,set:jp=>Np.value=jp})}if(ot)for(const ip in ot)createWatcher(ot[ip],K,q,ip);if(ut){const ip=isFunction$2(ut)?ut.call(q):ut;Reflect.ownKeys(ip).forEach(ap=>{provide(ap,ip[ap])})}uo&&callHook(uo,F,"c");function rp(ip,ap){isArray$j(ap)?ap.forEach(yp=>ip(yp.bind(q))):ap&&ip(ap.bind(q))}if(rp(onBeforeMount,po),rp(onMounted,mo),rp(onBeforeUpdate,wo),rp(onUpdated,lf),rp(onActivated,yf),rp(onDeactivated,cf),rp(onErrorCaptured,Bf),rp(onRenderTracked,Cf),rp(onRenderTriggered,Pf),rp(onBeforeUnmount,_f),rp(onUnmounted,xf),rp(onServerPrefetch,Hf),isArray$j(Df))if(Df.length){const ip=F.exposed||(F.exposed={});Df.forEach(ap=>{Object.defineProperty(ip,ap,{get:()=>q[ap],set:yp=>q[ap]=yp})})}else F.exposed||(F.exposed={});Af&&F.render===NOOP&&(F.render=Af),Lf!=null&&(F.inheritAttrs=Lf),kf&&(F.components=kf),Nf&&(F.directives=Nf)}function resolveInjections(F,W,q=NOOP){isArray$j(F)&&(F=normalizeInject(F));for(const K in F){const X=F[K];let tt;isObject$p(X)?"default"in X?tt=inject(X.from||K,X.default,!0):tt=inject(X.from||K):tt=inject(X),isRef(tt)?Object.defineProperty(W,K,{enumerable:!0,configurable:!0,get:()=>tt.value,set:rt=>tt.value=rt}):W[K]=tt}}function callHook(F,W,q){callWithAsyncErrorHandling(isArray$j(F)?F.map(K=>K.bind(W.proxy)):F.bind(W.proxy),W,q)}function createWatcher(F,W,q,K){const X=K.includes(".")?createPathGetter(q,K):()=>q[K];if(isString$3(F)){const tt=W[F];isFunction$2(tt)&&watch$1(X,tt)}else if(isFunction$2(F))watch$1(X,F.bind(q));else if(isObject$p(F))if(isArray$j(F))F.forEach(tt=>createWatcher(tt,W,q,K));else{const tt=isFunction$2(F.handler)?F.handler.bind(q):W[F.handler];isFunction$2(tt)&&watch$1(X,tt,F)}}function resolveMergedOptions(F){const W=F.type,{mixins:q,extends:K}=W,{mixins:X,optionsCache:tt,config:{optionMergeStrategies:rt}}=F.appContext,ot=tt.get(W);let ut;return ot?ut=ot:!X.length&&!q&&!K?ut=W:(ut={},X.length&&X.forEach(yn=>mergeOptions$2(ut,yn,rt,!0)),mergeOptions$2(ut,W,rt)),isObject$p(W)&&tt.set(W,ut),ut}function mergeOptions$2(F,W,q,K=!1){const{mixins:X,extends:tt}=W;tt&&mergeOptions$2(F,tt,q,!0),X&&X.forEach(rt=>mergeOptions$2(F,rt,q,!0));for(const rt in W)if(!(K&&rt==="expose")){const ot=internalOptionMergeStrats[rt]||q&&q[rt];F[rt]=ot?ot(F[rt],W[rt]):W[rt]}return F}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(F,W){return W?F?function(){return extend$8(isFunction$2(F)?F.call(this,this):F,isFunction$2(W)?W.call(this,this):W)}:W:F}function mergeInject(F,W){return mergeObjectOptions(normalizeInject(F),normalizeInject(W))}function normalizeInject(F){if(isArray$j(F)){const W={};for(let q=0;q1)return q&&isFunction$2(W)?W.call(K&&K.proxy):W}}function initProps(F,W,q,K=!1){const X={},tt={};def(tt,InternalObjectKey,1),F.propsDefaults=Object.create(null),setFullProps(F,W,X,tt);for(const rt in F.propsOptions[0])rt in X||(X[rt]=void 0);q?F.props=K?X:shallowReactive(X):F.type.props?F.props=X:F.props=tt,F.attrs=tt}function updateProps(F,W,q,K){const{props:X,attrs:tt,vnode:{patchFlag:rt}}=F,ot=toRaw(X),[ut]=F.propsOptions;let yn=!1;if((K||rt>0)&&!(rt&16)){if(rt&8){const uo=F.vnode.dynamicProps;for(let po=0;po{ut=!0;const[mo,wo]=normalizePropsOptions(po,W,!0);extend$8(rt,mo),wo&&ot.push(...wo)};!q&&W.mixins.length&&W.mixins.forEach(uo),F.extends&&uo(F.extends),F.mixins&&F.mixins.forEach(uo)}if(!tt&&!ut)return isObject$p(F)&&K.set(F,EMPTY_ARR),EMPTY_ARR;if(isArray$j(tt))for(let uo=0;uo-1,wo[1]=yf<0||lf-1||hasOwn$l(wo,"default"))&&ot.push(po)}}}const yn=[rt,ot];return isObject$p(F)&&K.set(F,yn),yn}function validatePropName(F){return F[0]!=="$"}function getType$1(F){const W=F&&F.toString().match(/^\s*(function|class) (\w+)/);return W?W[2]:F===null?"null":""}function isSameType(F,W){return getType$1(F)===getType$1(W)}function getTypeIndex(F,W){return isArray$j(W)?W.findIndex(q=>isSameType(q,F)):isFunction$2(W)&&isSameType(W,F)?0:-1}const isInternalKey=F=>F[0]==="_"||F==="$stable",normalizeSlotValue=F=>isArray$j(F)?F.map(normalizeVNode):[normalizeVNode(F)],normalizeSlot=(F,W,q)=>{if(W._n)return W;const K=withCtx((...X)=>normalizeSlotValue(W(...X)),q);return K._c=!1,K},normalizeObjectSlots=(F,W,q)=>{const K=F._ctx;for(const X in F){if(isInternalKey(X))continue;const tt=F[X];if(isFunction$2(tt))W[X]=normalizeSlot(X,tt,K);else if(tt!=null){const rt=normalizeSlotValue(tt);W[X]=()=>rt}}},normalizeVNodeSlots=(F,W)=>{const q=normalizeSlotValue(W);F.slots.default=()=>q},initSlots=(F,W)=>{if(F.vnode.shapeFlag&32){const q=W._;q?(F.slots=toRaw(W),def(W,"_",q)):normalizeObjectSlots(W,F.slots={})}else F.slots={},W&&normalizeVNodeSlots(F,W);def(F.slots,InternalObjectKey,1)},updateSlots=(F,W,q)=>{const{vnode:K,slots:X}=F;let tt=!0,rt=EMPTY_OBJ;if(K.shapeFlag&32){const ot=W._;ot?q&&ot===1?tt=!1:(extend$8(X,W),!q&&ot===1&&delete X._):(tt=!W.$stable,normalizeObjectSlots(W,X)),rt=W}else W&&(normalizeVNodeSlots(F,W),rt={default:1});if(tt)for(const ot in X)!isInternalKey(ot)&&!(ot in rt)&&delete X[ot]};function setRef(F,W,q,K,X=!1){if(isArray$j(F)){F.forEach((mo,wo)=>setRef(mo,W&&(isArray$j(W)?W[wo]:W),q,K,X));return}if(isAsyncWrapper(K)&&!X)return;const tt=K.shapeFlag&4?getExposeProxy(K.component)||K.component.proxy:K.el,rt=X?null:tt,{i:ot,r:ut}=F,yn=W&&W.r,uo=ot.refs===EMPTY_OBJ?ot.refs={}:ot.refs,po=ot.setupState;if(yn!=null&&yn!==ut&&(isString$3(yn)?(uo[yn]=null,hasOwn$l(po,yn)&&(po[yn]=null)):isRef(yn)&&(yn.value=null)),isFunction$2(ut))callWithErrorHandling(ut,ot,12,[rt,uo]);else{const mo=isString$3(ut),wo=isRef(ut);if(mo||wo){const lf=()=>{if(F.f){const yf=mo?hasOwn$l(po,ut)?po[ut]:uo[ut]:ut.value;X?isArray$j(yf)&&remove$1(yf,tt):isArray$j(yf)?yf.includes(tt)||yf.push(tt):mo?(uo[ut]=[tt],hasOwn$l(po,ut)&&(po[ut]=uo[ut])):(ut.value=[tt],F.k&&(uo[F.k]=ut.value))}else mo?(uo[ut]=rt,hasOwn$l(po,ut)&&(po[ut]=rt)):wo&&(ut.value=rt,F.k&&(uo[F.k]=rt))};rt?(lf.id=-1,queuePostRenderEffect(lf,q)):lf()}}}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(F){return baseCreateRenderer(F)}function baseCreateRenderer(F,W){const q=getGlobalThis();q.__VUE__=!0;const{insert:K,remove:X,patchProp:tt,createElement:rt,createText:ot,createComment:ut,setText:yn,setElementText:uo,parentNode:po,nextSibling:mo,setScopeId:wo=NOOP,insertStaticContent:lf}=F,yf=(lp,Of,qf,cp=null,hp=null,$p=null,Vp=!1,bp=null,Ep=!!Of.dynamicChildren)=>{if(lp===Of)return;lp&&!isSameVNodeType(lp,Of)&&(cp=vg(lp),jp(lp,hp,$p,!0),lp=null),Of.patchFlag===-2&&(Ep=!1,Of.dynamicChildren=null);const{type:_p,ref:Mp,shapeFlag:Yp}=Of;switch(_p){case Text$1:cf(lp,Of,qf,cp);break;case Comment:vf(lp,Of,qf,cp);break;case Static:lp==null&&_f(Of,qf,cp,Vp);break;case Fragment:kf(lp,Of,qf,cp,hp,$p,Vp,bp,Ep);break;default:Yp&1?Af(lp,Of,qf,cp,hp,$p,Vp,bp,Ep):Yp&6?Nf(lp,Of,qf,cp,hp,$p,Vp,bp,Ep):(Yp&64||Yp&128)&&_p.process(lp,Of,qf,cp,hp,$p,Vp,bp,Ep,Lp)}Mp!=null&&hp&&setRef(Mp,lp&&lp.ref,$p,Of||lp,!Of)},cf=(lp,Of,qf,cp)=>{if(lp==null)K(Of.el=ot(Of.children),qf,cp);else{const hp=Of.el=lp.el;Of.children!==lp.children&&yn(hp,Of.children)}},vf=(lp,Of,qf,cp)=>{lp==null?K(Of.el=ut(Of.children||""),qf,cp):Of.el=lp.el},_f=(lp,Of,qf,cp)=>{[lp.el,lp.anchor]=lf(lp.children,Of,qf,cp,lp.el,lp.anchor)},$f=({el:lp,anchor:Of},qf,cp)=>{let hp;for(;lp&&lp!==Of;)hp=mo(lp),K(lp,qf,cp),lp=hp;K(Of,qf,cp)},xf=({el:lp,anchor:Of})=>{let qf;for(;lp&&lp!==Of;)qf=mo(lp),X(lp),lp=qf;X(Of)},Af=(lp,Of,qf,cp,hp,$p,Vp,bp,Ep)=>{Vp=Vp||Of.type==="svg",lp==null?Cf(Of,qf,cp,hp,$p,Vp,bp,Ep):Hf(lp,Of,hp,$p,Vp,bp,Ep)},Cf=(lp,Of,qf,cp,hp,$p,Vp,bp)=>{let Ep,_p;const{type:Mp,props:Yp,shapeFlag:ug,transition:hg,dirs:xg}=lp;if(Ep=lp.el=rt(lp.type,$p,Yp&&Yp.is,Yp),ug&8?uo(Ep,lp.children):ug&16&&Bf(lp.children,Ep,null,cp,hp,$p&&Mp!=="foreignObject",Vp,bp),xg&&invokeDirectiveHook(lp,null,cp,"created"),Pf(Ep,lp,lp.scopeId,Vp,cp),Yp){for(const Dg in Yp)Dg!=="value"&&!isReservedProp(Dg)&&tt(Ep,Dg,null,Yp[Dg],$p,lp.children,cp,hp,og);"value"in Yp&&tt(Ep,"value",null,Yp.value),(_p=Yp.onVnodeBeforeMount)&&invokeVNodeHook(_p,cp,lp)}xg&&invokeDirectiveHook(lp,null,cp,"beforeMount");const kg=(!hp||hp&&!hp.pendingBranch)&&hg&&!hg.persisted;kg&&hg.beforeEnter(Ep),K(Ep,Of,qf),((_p=Yp&&Yp.onVnodeMounted)||kg||xg)&&queuePostRenderEffect(()=>{_p&&invokeVNodeHook(_p,cp,lp),kg&&hg.enter(Ep),xg&&invokeDirectiveHook(lp,null,cp,"mounted")},hp)},Pf=(lp,Of,qf,cp,hp)=>{if(qf&&wo(lp,qf),cp)for(let $p=0;$p{for(let _p=Ep;_p{const bp=Of.el=lp.el;let{patchFlag:Ep,dynamicChildren:_p,dirs:Mp}=Of;Ep|=lp.patchFlag&16;const Yp=lp.props||EMPTY_OBJ,ug=Of.props||EMPTY_OBJ;let hg;qf&&toggleRecurse(qf,!1),(hg=ug.onVnodeBeforeUpdate)&&invokeVNodeHook(hg,qf,Of,lp),Mp&&invokeDirectiveHook(Of,lp,qf,"beforeUpdate"),qf&&toggleRecurse(qf,!0);const xg=hp&&Of.type!=="foreignObject";if(_p?Df(lp.dynamicChildren,_p,bp,qf,cp,xg,$p):Vp||ap(lp,Of,bp,null,qf,cp,xg,$p,!1),Ep>0){if(Ep&16)Lf(bp,Of,Yp,ug,qf,cp,hp);else if(Ep&2&&Yp.class!==ug.class&&tt(bp,"class",null,ug.class,hp),Ep&4&&tt(bp,"style",Yp.style,ug.style,hp),Ep&8){const kg=Of.dynamicProps;for(let Dg=0;Dg{hg&&invokeVNodeHook(hg,qf,Of,lp),Mp&&invokeDirectiveHook(Of,lp,qf,"updated")},cp)},Df=(lp,Of,qf,cp,hp,$p,Vp)=>{for(let bp=0;bp{if(qf!==cp){if(qf!==EMPTY_OBJ)for(const bp in qf)!isReservedProp(bp)&&!(bp in cp)&&tt(lp,bp,qf[bp],null,Vp,Of.children,hp,$p,og);for(const bp in cp){if(isReservedProp(bp))continue;const Ep=cp[bp],_p=qf[bp];Ep!==_p&&bp!=="value"&&tt(lp,bp,_p,Ep,Vp,Of.children,hp,$p,og)}"value"in cp&&tt(lp,"value",qf.value,cp.value)}},kf=(lp,Of,qf,cp,hp,$p,Vp,bp,Ep)=>{const _p=Of.el=lp?lp.el:ot(""),Mp=Of.anchor=lp?lp.anchor:ot("");let{patchFlag:Yp,dynamicChildren:ug,slotScopeIds:hg}=Of;hg&&(bp=bp?bp.concat(hg):hg),lp==null?(K(_p,qf,cp),K(Mp,qf,cp),Bf(Of.children,qf,Mp,hp,$p,Vp,bp,Ep)):Yp>0&&Yp&64&&ug&&lp.dynamicChildren?(Df(lp.dynamicChildren,ug,qf,hp,$p,Vp,bp),(Of.key!=null||hp&&Of===hp.subTree)&&traverseStaticChildren(lp,Of,!0)):ap(lp,Of,qf,Mp,hp,$p,Vp,bp,Ep)},Nf=(lp,Of,qf,cp,hp,$p,Vp,bp,Ep)=>{Of.slotScopeIds=bp,lp==null?Of.shapeFlag&512?hp.ctx.activate(Of,qf,cp,Vp,Ep):Yf(Of,qf,cp,hp,$p,Vp,Ep):Gf(lp,Of,Ep)},Yf=(lp,Of,qf,cp,hp,$p,Vp)=>{const bp=lp.component=createComponentInstance(lp,cp,hp);if(isKeepAlive(lp)&&(bp.ctx.renderer=Lp),setupComponent(bp),bp.asyncDep){if(hp&&hp.registerDep(bp,rp),!lp.el){const Ep=bp.subTree=createVNode(Comment);vf(null,Ep,Of,qf)}return}rp(bp,lp,Of,qf,hp,$p,Vp)},Gf=(lp,Of,qf)=>{const cp=Of.component=lp.component;if(shouldUpdateComponent(lp,Of,qf))if(cp.asyncDep&&!cp.asyncResolved){ip(cp,Of,qf);return}else cp.next=Of,invalidateJob(cp.update),cp.update();else Of.el=lp.el,cp.vnode=Of},rp=(lp,Of,qf,cp,hp,$p,Vp)=>{const bp=()=>{if(lp.isMounted){let{next:Mp,bu:Yp,u:ug,parent:hg,vnode:xg}=lp,kg=Mp,Dg;toggleRecurse(lp,!1),Mp?(Mp.el=xg.el,ip(lp,Mp,Vp)):Mp=xg,Yp&&invokeArrayFns(Yp),(Dg=Mp.props&&Mp.props.onVnodeBeforeUpdate)&&invokeVNodeHook(Dg,hg,Mp,xg),toggleRecurse(lp,!0);const lm=renderComponentRoot(lp),Bp=lp.subTree;lp.subTree=lm,yf(Bp,lm,po(Bp.el),vg(Bp),lp,hp,$p),Mp.el=lm.el,kg===null&&updateHOCHostEl(lp,lm.el),ug&&queuePostRenderEffect(ug,hp),(Dg=Mp.props&&Mp.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(Dg,hg,Mp,xg),hp)}else{let Mp;const{el:Yp,props:ug}=Of,{bm:hg,m:xg,parent:kg}=lp,Dg=isAsyncWrapper(Of);if(toggleRecurse(lp,!1),hg&&invokeArrayFns(hg),!Dg&&(Mp=ug&&ug.onVnodeBeforeMount)&&invokeVNodeHook(Mp,kg,Of),toggleRecurse(lp,!0),Yp&&kp){const lm=()=>{lp.subTree=renderComponentRoot(lp),kp(Yp,lp.subTree,lp,hp,null)};Dg?Of.type.__asyncLoader().then(()=>!lp.isUnmounted&&lm()):lm()}else{const lm=lp.subTree=renderComponentRoot(lp);yf(null,lm,qf,cp,lp,hp,$p),Of.el=lm.el}if(xg&&queuePostRenderEffect(xg,hp),!Dg&&(Mp=ug&&ug.onVnodeMounted)){const lm=Of;queuePostRenderEffect(()=>invokeVNodeHook(Mp,kg,lm),hp)}(Of.shapeFlag&256||kg&&isAsyncWrapper(kg.vnode)&&kg.vnode.shapeFlag&256)&&lp.a&&queuePostRenderEffect(lp.a,hp),lp.isMounted=!0,Of=qf=cp=null}},Ep=lp.effect=new ReactiveEffect(bp,()=>queueJob(_p),lp.scope),_p=lp.update=()=>Ep.run();_p.id=lp.uid,toggleRecurse(lp,!0),_p()},ip=(lp,Of,qf)=>{Of.component=lp;const cp=lp.vnode.props;lp.vnode=Of,lp.next=null,updateProps(lp,Of.props,cp,qf),updateSlots(lp,Of.children,qf),pauseTracking(),flushPreFlushCbs(),resetTracking()},ap=(lp,Of,qf,cp,hp,$p,Vp,bp,Ep=!1)=>{const _p=lp&&lp.children,Mp=lp?lp.shapeFlag:0,Yp=Of.children,{patchFlag:ug,shapeFlag:hg}=Of;if(ug>0){if(ug&128){vp(_p,Yp,qf,cp,hp,$p,Vp,bp,Ep);return}else if(ug&256){yp(_p,Yp,qf,cp,hp,$p,Vp,bp,Ep);return}}hg&8?(Mp&16&&og(_p,hp,$p),Yp!==_p&&uo(qf,Yp)):Mp&16?hg&16?vp(_p,Yp,qf,cp,hp,$p,Vp,bp,Ep):og(_p,hp,$p,!0):(Mp&8&&uo(qf,""),hg&16&&Bf(Yp,qf,cp,hp,$p,Vp,bp,Ep))},yp=(lp,Of,qf,cp,hp,$p,Vp,bp,Ep)=>{lp=lp||EMPTY_ARR,Of=Of||EMPTY_ARR;const _p=lp.length,Mp=Of.length,Yp=Math.min(_p,Mp);let ug;for(ug=0;ugMp?og(lp,hp,$p,!0,!1,Yp):Bf(Of,qf,cp,hp,$p,Vp,bp,Ep,Yp)},vp=(lp,Of,qf,cp,hp,$p,Vp,bp,Ep)=>{let _p=0;const Mp=Of.length;let Yp=lp.length-1,ug=Mp-1;for(;_p<=Yp&&_p<=ug;){const hg=lp[_p],xg=Of[_p]=Ep?cloneIfMounted(Of[_p]):normalizeVNode(Of[_p]);if(isSameVNodeType(hg,xg))yf(hg,xg,qf,null,hp,$p,Vp,bp,Ep);else break;_p++}for(;_p<=Yp&&_p<=ug;){const hg=lp[Yp],xg=Of[ug]=Ep?cloneIfMounted(Of[ug]):normalizeVNode(Of[ug]);if(isSameVNodeType(hg,xg))yf(hg,xg,qf,null,hp,$p,Vp,bp,Ep);else break;Yp--,ug--}if(_p>Yp){if(_p<=ug){const hg=ug+1,xg=hgug)for(;_p<=Yp;)jp(lp[_p],hp,$p,!0),_p++;else{const hg=_p,xg=_p,kg=new Map;for(_p=xg;_p<=ug;_p++){const Kf=Of[_p]=Ep?cloneIfMounted(Of[_p]):normalizeVNode(Of[_p]);Kf.key!=null&&kg.set(Kf.key,_p)}let Dg,lm=0;const Bp=ug-xg+1;let Rp=!1,Fp=0;const Op=new Array(Bp);for(_p=0;_p=Bp){jp(Kf,hp,$p,!0);continue}let Xf;if(Kf.key!=null)Xf=kg.get(Kf.key);else for(Dg=xg;Dg<=ug;Dg++)if(Op[Dg-xg]===0&&isSameVNodeType(Kf,Of[Dg])){Xf=Dg;break}Xf===void 0?jp(Kf,hp,$p,!0):(Op[Xf-xg]=_p+1,Xf>=Fp?Fp=Xf:Rp=!0,yf(Kf,Of[Xf],qf,null,hp,$p,Vp,bp,Ep),lm++)}const Kp=Rp?getSequence(Op):EMPTY_ARR;for(Dg=Kp.length-1,_p=Bp-1;_p>=0;_p--){const Kf=xg+_p,Xf=Of[Kf],gp=Kf+1{const{el:$p,type:Vp,transition:bp,children:Ep,shapeFlag:_p}=lp;if(_p&6){Np(lp.component.subTree,Of,qf,cp);return}if(_p&128){lp.suspense.move(Of,qf,cp);return}if(_p&64){Vp.move(lp,Of,qf,Lp);return}if(Vp===Fragment){K($p,Of,qf);for(let Yp=0;Ypbp.enter($p),hp);else{const{leave:Yp,delayLeave:ug,afterLeave:hg}=bp,xg=()=>K($p,Of,qf),kg=()=>{Yp($p,()=>{xg(),hg&&hg()})};ug?ug($p,xg,kg):kg()}else K($p,Of,qf)},jp=(lp,Of,qf,cp=!1,hp=!1)=>{const{type:$p,props:Vp,ref:bp,children:Ep,dynamicChildren:_p,shapeFlag:Mp,patchFlag:Yp,dirs:ug}=lp;if(bp!=null&&setRef(bp,null,qf,lp,!0),Mp&256){Of.ctx.deactivate(lp);return}const hg=Mp&1&&ug,xg=!isAsyncWrapper(lp);let kg;if(xg&&(kg=Vp&&Vp.onVnodeBeforeUnmount)&&invokeVNodeHook(kg,Of,lp),Mp&6)ng(lp.component,qf,cp);else{if(Mp&128){lp.suspense.unmount(qf,cp);return}hg&&invokeDirectiveHook(lp,null,Of,"beforeUnmount"),Mp&64?lp.type.remove(lp,Of,qf,hp,Lp,cp):_p&&($p!==Fragment||Yp>0&&Yp&64)?og(_p,Of,qf,!1,!0):($p===Fragment&&Yp&384||!hp&&Mp&16)&&og(Ep,Of,qf),cp&&Ip(lp)}(xg&&(kg=Vp&&Vp.onVnodeUnmounted)||hg)&&queuePostRenderEffect(()=>{kg&&invokeVNodeHook(kg,Of,lp),hg&&invokeDirectiveHook(lp,null,Of,"unmounted")},qf)},Ip=lp=>{const{type:Of,el:qf,anchor:cp,transition:hp}=lp;if(Of===Fragment){Jp(qf,cp);return}if(Of===Static){xf(lp);return}const $p=()=>{X(qf),hp&&!hp.persisted&&hp.afterLeave&&hp.afterLeave()};if(lp.shapeFlag&1&&hp&&!hp.persisted){const{leave:Vp,delayLeave:bp}=hp,Ep=()=>Vp(qf,$p);bp?bp(lp.el,$p,Ep):Ep()}else $p()},Jp=(lp,Of)=>{let qf;for(;lp!==Of;)qf=mo(lp),X(lp),lp=qf;X(Of)},ng=(lp,Of,qf)=>{const{bum:cp,scope:hp,update:$p,subTree:Vp,um:bp}=lp;cp&&invokeArrayFns(cp),hp.stop(),$p&&($p.active=!1,jp(Vp,lp,Of,qf)),bp&&queuePostRenderEffect(bp,Of),queuePostRenderEffect(()=>{lp.isUnmounted=!0},Of),Of&&Of.pendingBranch&&!Of.isUnmounted&&lp.asyncDep&&!lp.asyncResolved&&lp.suspenseId===Of.pendingId&&(Of.deps--,Of.deps===0&&Of.resolve())},og=(lp,Of,qf,cp=!1,hp=!1,$p=0)=>{for(let Vp=$p;Vplp.shapeFlag&6?vg(lp.component.subTree):lp.shapeFlag&128?lp.suspense.next():mo(lp.anchor||lp.el),Dp=(lp,Of,qf)=>{lp==null?Of._vnode&&jp(Of._vnode,null,null,!0):yf(Of._vnode||null,lp,Of,null,null,null,qf),flushPreFlushCbs(),flushPostFlushCbs(),Of._vnode=lp},Lp={p:yf,um:jp,m:Np,r:Ip,mt:Yf,mc:Bf,pc:ap,pbc:Df,n:vg,o:F};let xp,kp;return W&&([xp,kp]=W(Lp)),{render:Dp,hydrate:xp,createApp:createAppAPI(Dp,xp)}}function toggleRecurse({effect:F,update:W},q){F.allowRecurse=W.allowRecurse=q}function traverseStaticChildren(F,W,q=!1){const K=F.children,X=W.children;if(isArray$j(K)&&isArray$j(X))for(let tt=0;tt>1,F[q[ot]]0&&(W[K]=q[tt-1]),q[tt]=K)}}for(tt=q.length,rt=q[tt-1];tt-- >0;)q[tt]=rt,rt=W[rt];return q}const isTeleport=F=>F.__isTeleport,Fragment=Symbol.for("v-fgt"),Text$1=Symbol.for("v-txt"),Comment=Symbol.for("v-cmt"),Static=Symbol.for("v-stc"),blockStack=[];let currentBlock=null;function openBlock(F=!1){blockStack.push(currentBlock=F?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(F){isBlockTreeEnabled+=F}function setupBlock(F){return F.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(F),F}function createElementBlock(F,W,q,K,X,tt){return setupBlock(createBaseVNode(F,W,q,K,X,tt,!0))}function createBlock(F,W,q,K,X){return setupBlock(createVNode(F,W,q,K,X,!0))}function isVNode(F){return F?F.__v_isVNode===!0:!1}function isSameVNodeType(F,W){return F.type===W.type&&F.key===W.key}const InternalObjectKey="__vInternal",normalizeKey=({key:F})=>F??null,normalizeRef=({ref:F,ref_key:W,ref_for:q})=>(typeof F=="number"&&(F=""+F),F!=null?isString$3(F)||isRef(F)||isFunction$2(F)?{i:currentRenderingInstance,r:F,k:W,f:!!q}:F:null);function createBaseVNode(F,W=null,q=null,K=0,X=null,tt=F===Fragment?0:1,rt=!1,ot=!1){const ut={__v_isVNode:!0,__v_skip:!0,type:F,props:W,key:W&&normalizeKey(W),ref:W&&normalizeRef(W),scopeId:currentScopeId,slotScopeIds:null,children:q,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:tt,patchFlag:K,dynamicProps:X,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return ot?(normalizeChildren(ut,q),tt&128&&F.normalize(ut)):q&&(ut.shapeFlag|=isString$3(q)?8:16),isBlockTreeEnabled>0&&!rt&¤tBlock&&(ut.patchFlag>0||tt&6)&&ut.patchFlag!==32&¤tBlock.push(ut),ut}const createVNode=_createVNode;function _createVNode(F,W=null,q=null,K=0,X=null,tt=!1){if((!F||F===NULL_DYNAMIC_COMPONENT)&&(F=Comment),isVNode(F)){const ot=cloneVNode(F,W,!0);return q&&normalizeChildren(ot,q),isBlockTreeEnabled>0&&!tt&¤tBlock&&(ot.shapeFlag&6?currentBlock[currentBlock.indexOf(F)]=ot:currentBlock.push(ot)),ot.patchFlag|=-2,ot}if(isClassComponent(F)&&(F=F.__vccOpts),W){W=guardReactiveProps(W);let{class:ot,style:ut}=W;ot&&!isString$3(ot)&&(W.class=normalizeClass(ot)),isObject$p(ut)&&(isProxy(ut)&&!isArray$j(ut)&&(ut=extend$8({},ut)),W.style=normalizeStyle(ut))}const rt=isString$3(F)?1:isSuspense(F)?128:isTeleport(F)?64:isObject$p(F)?4:isFunction$2(F)?2:0;return createBaseVNode(F,W,q,K,X,rt,tt,!0)}function guardReactiveProps(F){return F?isProxy(F)||InternalObjectKey in F?extend$8({},F):F:null}function cloneVNode(F,W,q=!1){const{props:K,ref:X,patchFlag:tt,children:rt}=F,ot=W?mergeProps(K||{},W):K;return{__v_isVNode:!0,__v_skip:!0,type:F.type,props:ot,key:ot&&normalizeKey(ot),ref:W&&W.ref?q&&X?isArray$j(X)?X.concat(normalizeRef(W)):[X,normalizeRef(W)]:normalizeRef(W):X,scopeId:F.scopeId,slotScopeIds:F.slotScopeIds,children:rt,target:F.target,targetAnchor:F.targetAnchor,staticCount:F.staticCount,shapeFlag:F.shapeFlag,patchFlag:W&&F.type!==Fragment?tt===-1?16:tt|16:tt,dynamicProps:F.dynamicProps,dynamicChildren:F.dynamicChildren,appContext:F.appContext,dirs:F.dirs,transition:F.transition,component:F.component,suspense:F.suspense,ssContent:F.ssContent&&cloneVNode(F.ssContent),ssFallback:F.ssFallback&&cloneVNode(F.ssFallback),el:F.el,anchor:F.anchor,ctx:F.ctx,ce:F.ce}}function createTextVNode(F=" ",W=0){return createVNode(Text$1,null,F,W)}function createStaticVNode(F,W){const q=createVNode(Static,null,F);return q.staticCount=W,q}function createCommentVNode(F="",W=!1){return W?(openBlock(),createBlock(Comment,null,F)):createVNode(Comment,null,F)}function normalizeVNode(F){return F==null||typeof F=="boolean"?createVNode(Comment):isArray$j(F)?createVNode(Fragment,null,F.slice()):typeof F=="object"?cloneIfMounted(F):createVNode(Text$1,null,String(F))}function cloneIfMounted(F){return F.el===null&&F.patchFlag!==-1||F.memo?F:cloneVNode(F)}function normalizeChildren(F,W){let q=0;const{shapeFlag:K}=F;if(W==null)W=null;else if(isArray$j(W))q=16;else if(typeof W=="object")if(K&65){const X=W.default;X&&(X._c&&(X._d=!1),normalizeChildren(F,X()),X._c&&(X._d=!0));return}else{q=32;const X=W._;!X&&!(InternalObjectKey in W)?W._ctx=currentRenderingInstance:X===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?W._=1:(W._=2,F.patchFlag|=1024))}else isFunction$2(W)?(W={default:W,_ctx:currentRenderingInstance},q=32):(W=String(W),K&64?(q=16,W=[createTextVNode(W)]):q=8);F.children=W,F.shapeFlag|=q}function mergeProps(...F){const W={};for(let q=0;qcurrentInstance=F),internalSetCurrentInstance=F=>{globalCurrentInstanceSetters.length>1?globalCurrentInstanceSetters.forEach(W=>W(F)):globalCurrentInstanceSetters[0](F)};const setCurrentInstance=F=>{internalSetCurrentInstance(F),F.scope.on()},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(F){return F.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(F,W=!1){isInSSRComponentSetup=W;const{props:q,children:K}=F.vnode,X=isStatefulComponent(F);initProps(F,q,X,W),initSlots(F,K);const tt=X?setupStatefulComponent(F,W):void 0;return isInSSRComponentSetup=!1,tt}function setupStatefulComponent(F,W){const q=F.type;F.accessCache=Object.create(null),F.proxy=markRaw(new Proxy(F.ctx,PublicInstanceProxyHandlers));const{setup:K}=q;if(K){const X=F.setupContext=K.length>1?createSetupContext(F):null;setCurrentInstance(F),pauseTracking();const tt=callWithErrorHandling(K,F,0,[F.props,X]);if(resetTracking(),unsetCurrentInstance(),isPromise(tt)){if(tt.then(unsetCurrentInstance,unsetCurrentInstance),W)return tt.then(rt=>{handleSetupResult(F,rt,W)}).catch(rt=>{handleError$1(rt,F,0)});F.asyncDep=tt}else handleSetupResult(F,tt,W)}else finishComponentSetup(F,W)}function handleSetupResult(F,W,q){isFunction$2(W)?F.type.__ssrInlineRender?F.ssrRender=W:F.render=W:isObject$p(W)&&(F.setupState=proxyRefs(W)),finishComponentSetup(F,q)}let compile$1;function finishComponentSetup(F,W,q){const K=F.type;if(!F.render){if(!W&&compile$1&&!K.render){const X=K.template||resolveMergedOptions(F).template;if(X){const{isCustomElement:tt,compilerOptions:rt}=F.appContext.config,{delimiters:ot,compilerOptions:ut}=K,yn=extend$8(extend$8({isCustomElement:tt,delimiters:ot},rt),ut);K.render=compile$1(X,yn)}}F.render=K.render||NOOP}setCurrentInstance(F),pauseTracking(),applyOptions(F),resetTracking(),unsetCurrentInstance()}function getAttrsProxy(F){return F.attrsProxy||(F.attrsProxy=new Proxy(F.attrs,{get(W,q){return track(F,"get","$attrs"),W[q]}}))}function createSetupContext(F){const W=q=>{F.exposed=q||{}};return{get attrs(){return getAttrsProxy(F)},slots:F.slots,emit:F.emit,expose:W}}function getExposeProxy(F){if(F.exposed)return F.exposeProxy||(F.exposeProxy=new Proxy(proxyRefs(markRaw(F.exposed)),{get(W,q){if(q in W)return W[q];if(q in publicPropertiesMap)return publicPropertiesMap[q](F)},has(W,q){return q in W||q in publicPropertiesMap}}))}function isClassComponent(F){return isFunction$2(F)&&"__vccOpts"in F}const computed=(F,W)=>computed$1(F,W,isInSSRComponentSetup),ssrContextKey=Symbol.for("v-scx"),useSSRContext=()=>inject(ssrContextKey),version$4="3.3.4",svgNS="http://www.w3.org/2000/svg",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(F,W,q)=>{W.insertBefore(F,q||null)},remove:F=>{const W=F.parentNode;W&&W.removeChild(F)},createElement:(F,W,q,K)=>{const X=W?doc.createElementNS(svgNS,F):doc.createElement(F,q?{is:q}:void 0);return F==="select"&&K&&K.multiple!=null&&X.setAttribute("multiple",K.multiple),X},createText:F=>doc.createTextNode(F),createComment:F=>doc.createComment(F),setText:(F,W)=>{F.nodeValue=W},setElementText:(F,W)=>{F.textContent=W},parentNode:F=>F.parentNode,nextSibling:F=>F.nextSibling,querySelector:F=>doc.querySelector(F),setScopeId(F,W){F.setAttribute(W,"")},insertStaticContent(F,W,q,K,X,tt){const rt=q?q.previousSibling:W.lastChild;if(X&&(X===tt||X.nextSibling))for(;W.insertBefore(X.cloneNode(!0),q),!(X===tt||!(X=X.nextSibling)););else{templateContainer.innerHTML=K?`${F}`:F;const ot=templateContainer.content;if(K){const ut=ot.firstChild;for(;ut.firstChild;)ot.appendChild(ut.firstChild);ot.removeChild(ut)}W.insertBefore(ot,q)}return[rt?rt.nextSibling:W.firstChild,q?q.previousSibling:W.lastChild]}};function patchClass(F,W,q){const K=F._vtc;K&&(W=(W?[W,...K]:[...K]).join(" ")),W==null?F.removeAttribute("class"):q?F.setAttribute("class",W):F.className=W}function patchStyle(F,W,q){const K=F.style,X=isString$3(q);if(q&&!X){if(W&&!isString$3(W))for(const tt in W)q[tt]==null&&setStyle(K,tt,"");for(const tt in q)setStyle(K,tt,q[tt])}else{const tt=K.display;X?W!==q&&(K.cssText=q):W&&F.removeAttribute("style"),"_vod"in F&&(K.display=tt)}}const importantRE=/\s*!important$/;function setStyle(F,W,q){if(isArray$j(q))q.forEach(K=>setStyle(F,W,K));else if(q==null&&(q=""),W.startsWith("--"))F.setProperty(W,q);else{const K=autoPrefix(F,W);importantRE.test(q)?F.setProperty(hyphenate(K),q.replace(importantRE,""),"important"):F[K]=q}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(F,W){const q=prefixCache[W];if(q)return q;let K=camelize(W);if(K!=="filter"&&K in F)return prefixCache[W]=K;K=capitalize(K);for(let X=0;XcachedNow||(p$2.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(F,W){const q=K=>{if(!K._vts)K._vts=Date.now();else if(K._vts<=q.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(K,q.value),W,5,[K])};return q.value=F,q.attached=getNow(),q}function patchStopImmediatePropagation(F,W){if(isArray$j(W)){const q=F.stopImmediatePropagation;return F.stopImmediatePropagation=()=>{q.call(F),F._stopped=!0},W.map(K=>X=>!X._stopped&&K&&K(X))}else return W}const nativeOnRE=/^on[a-z]/,patchProp=(F,W,q,K,X=!1,tt,rt,ot,ut)=>{W==="class"?patchClass(F,K,X):W==="style"?patchStyle(F,q,K):isOn(W)?isModelListener(W)||patchEvent(F,W,q,K,rt):(W[0]==="."?(W=W.slice(1),!0):W[0]==="^"?(W=W.slice(1),!1):shouldSetAsProp(F,W,K,X))?patchDOMProp(F,W,K,tt,rt,ot,ut):(W==="true-value"?F._trueValue=K:W==="false-value"&&(F._falseValue=K),patchAttr(F,W,K,X))};function shouldSetAsProp(F,W,q,K){return K?!!(W==="innerHTML"||W==="textContent"||W in F&&nativeOnRE.test(W)&&isFunction$2(q)):W==="spellcheck"||W==="draggable"||W==="translate"||W==="form"||W==="list"&&F.tagName==="INPUT"||W==="type"&&F.tagName==="TEXTAREA"||nativeOnRE.test(W)&&isString$3(q)?!1:W in F}function defineCustomElement(F,W){const q=defineComponent(F);class K extends VueElement{constructor(tt){super(q,tt,W)}}return K.def=q,K}const BaseClass=typeof HTMLElement<"u"?HTMLElement:class{};class VueElement extends BaseClass{constructor(W,q={},K){super(),this._def=W,this._props=q,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&K?K(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,nextTick(()=>{this._connected||(render$2(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let K=0;K{for(const X of K)this._setAttr(X.attributeName)}).observe(this,{attributes:!0});const W=(K,X=!1)=>{const{props:tt,styles:rt}=K;let ot;if(tt&&!isArray$j(tt))for(const ut in tt){const yn=tt[ut];(yn===Number||yn&&yn.type===Number)&&(ut in this._props&&(this._props[ut]=toNumber(this._props[ut])),(ot||(ot=Object.create(null)))[camelize(ut)]=!0)}this._numberProps=ot,X&&this._resolveProps(K),this._applyStyles(rt),this._update()},q=this._def.__asyncLoader;q?q().then(K=>W(K,!0)):W(this._def)}_resolveProps(W){const{props:q}=W,K=isArray$j(q)?q:Object.keys(q||{});for(const X of Object.keys(this))X[0]!=="_"&&K.includes(X)&&this._setProp(X,this[X],!0,!1);for(const X of K.map(camelize))Object.defineProperty(this,X,{get(){return this._getProp(X)},set(tt){this._setProp(X,tt)}})}_setAttr(W){let q=this.getAttribute(W);const K=camelize(W);this._numberProps&&this._numberProps[K]&&(q=toNumber(q)),this._setProp(K,q,!1)}_getProp(W){return this._props[W]}_setProp(W,q,K=!0,X=!0){q!==this._props[W]&&(this._props[W]=q,X&&this._instance&&this._update(),K&&(q===!0?this.setAttribute(hyphenate(W),""):typeof q=="string"||typeof q=="number"?this.setAttribute(hyphenate(W),q+""):q||this.removeAttribute(hyphenate(W))))}_update(){render$2(this._createVNode(),this.shadowRoot)}_createVNode(){const W=createVNode(this._def,extend$8({},this._props));return this._instance||(W.ce=q=>{this._instance=q,q.isCE=!0;const K=(tt,rt)=>{this.dispatchEvent(new CustomEvent(tt,{detail:rt}))};q.emit=(tt,...rt)=>{K(tt,rt),hyphenate(tt)!==tt&&K(hyphenate(tt),rt)};let X=this;for(;X=X&&(X.parentNode||X.host);)if(X instanceof VueElement){q.parent=X._instance,q.provides=X._instance.provides;break}}),W}_applyStyles(W){W&&W.forEach(q=>{const K=document.createElement("style");K.textContent=q,this.shadowRoot.appendChild(K)})}}const rendererOptions=extend$8({patchProp},nodeOps);let renderer$1;function ensureRenderer(){return renderer$1||(renderer$1=createRenderer(rendererOptions))}const render$2=(...F)=>{ensureRenderer().render(...F)};var basePath="";function setBasePath(F){basePath=F}function getBasePath(F=""){if(!basePath){const W=[...document.getElementsByTagName("script")],q=W.find(K=>K.hasAttribute("data-shoelace"));if(q)setBasePath(q.getAttribute("data-shoelace"));else{const K=W.find(tt=>/shoelace(\.min)?\.js($|\?)/.test(tt.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(tt.src));let X="";K&&(X=K.getAttribute("src")),setBasePath(X.split("/").slice(0,-1).join("/"))}}return basePath.replace(/\/$/,"")+(F?`/${F.replace(/^\//,"")}`:"")}var library={name:"default",resolver:F=>getBasePath(`assets/icons/${F}.svg`)},library_default_default=library,icons={caret:` @@ -1643,7 +1643,7 @@ var V3=Object.defineProperty;var G3=(F,W,q)=>W in F?V3(F,W,{enumerable:!0,config var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0) ); } -`;const min$8=Math.min,max$9=Math.max,round$5=Math.round,floor$4=Math.floor,createCoords=F=>({x:F,y:F}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(F,W,q){return max$9(F,min$8(W,q))}function evaluate$1(F,W){return typeof F=="function"?F(W):F}function getSide(F){return F.split("-")[0]}function getAlignment(F){return F.split("-")[1]}function getOppositeAxis(F){return F==="x"?"y":"x"}function getAxisLength(F){return F==="y"?"height":"width"}function getSideAxis(F){return["top","bottom"].includes(getSide(F))?"y":"x"}function getAlignmentAxis(F){return getOppositeAxis(getSideAxis(F))}function getAlignmentSides(F,W,q){q===void 0&&(q=!1);const K=getAlignment(F),X=getAlignmentAxis(F),tt=getAxisLength(X);let rt=X==="x"?K===(q?"end":"start")?"right":"left":K==="start"?"bottom":"top";return W.reference[tt]>W.floating[tt]&&(rt=getOppositePlacement$1(rt)),[rt,getOppositePlacement$1(rt)]}function getExpandedPlacements(F){const W=getOppositePlacement$1(F);return[getOppositeAlignmentPlacement(F),W,getOppositeAlignmentPlacement(W)]}function getOppositeAlignmentPlacement(F){return F.replace(/start|end/g,W=>oppositeAlignmentMap[W])}function getSideList(F,W,q){const K=["left","right"],X=["right","left"],tt=["top","bottom"],rt=["bottom","top"];switch(F){case"top":case"bottom":return q?W?X:K:W?K:X;case"left":case"right":return W?tt:rt;default:return[]}}function getOppositeAxisPlacements(F,W,q,K){const X=getAlignment(F);let tt=getSideList(getSide(F),q==="start",K);return X&&(tt=tt.map(rt=>rt+"-"+X),W&&(tt=tt.concat(tt.map(getOppositeAlignmentPlacement)))),tt}function getOppositePlacement$1(F){return F.replace(/left|right|bottom|top/g,W=>oppositeSideMap[W])}function expandPaddingObject(F){return{top:0,right:0,bottom:0,left:0,...F}}function getPaddingObject(F){return typeof F!="number"?expandPaddingObject(F):{top:F,right:F,bottom:F,left:F}}function rectToClientRect$1(F){return{...F,top:F.y,left:F.x,right:F.x+F.width,bottom:F.y+F.height}}function computeCoordsFromPlacement(F,W,q){let{reference:K,floating:X}=F;const tt=getSideAxis(W),rt=getAlignmentAxis(W),ot=getAxisLength(rt),ut=getSide(W),yn=tt==="y",uo=K.x+K.width/2-X.width/2,po=K.y+K.height/2-X.height/2,mo=K[ot]/2-X[ot]/2;let wo;switch(ut){case"top":wo={x:uo,y:K.y-X.height};break;case"bottom":wo={x:uo,y:K.y+K.height};break;case"right":wo={x:K.x+K.width,y:po};break;case"left":wo={x:K.x-X.width,y:po};break;default:wo={x:K.x,y:K.y}}switch(getAlignment(W)){case"start":wo[rt]-=mo*(q&&yn?-1:1);break;case"end":wo[rt]+=mo*(q&&yn?-1:1);break}return wo}const computePosition$1=async(F,W,q)=>{const{placement:K="bottom",strategy:X="absolute",middleware:tt=[],platform:rt}=q,ot=tt.filter(Boolean),ut=await(rt.isRTL==null?void 0:rt.isRTL(W));let yn=await rt.getElementRects({reference:F,floating:W,strategy:X}),{x:uo,y:po}=computeCoordsFromPlacement(yn,K,ut),mo=K,wo={},lf=0;for(let yf=0;yf({name:"arrow",options:F,async fn(W){const{x:q,y:K,placement:X,rects:tt,platform:rt,elements:ot,middlewareData:ut}=W,{element:yn,padding:uo=0}=evaluate$1(F,W)||{};if(yn==null)return{};const po=getPaddingObject(uo),mo={x:q,y:K},wo=getAlignmentAxis(X),lf=getAxisLength(wo),yf=await rt.getDimensions(yn),cf=wo==="y",vf=cf?"top":"left",_f=cf?"bottom":"right",$f=cf?"clientHeight":"clientWidth",wf=tt.reference[lf]+tt.reference[wo]-mo[wo]-tt.floating[lf],Pf=mo[wo]-tt.reference[wo],Cf=await(rt.getOffsetParent==null?void 0:rt.getOffsetParent(yn));let Af=Cf?Cf[$f]:0;(!Af||!await(rt.isElement==null?void 0:rt.isElement(Cf)))&&(Af=ot.floating[$f]||tt.floating[lf]);const Bf=wf/2-Pf/2,Hf=Af/2-yf[lf]/2-1,Df=min$8(po[vf],Hf),Lf=min$8(po[_f],Hf),kf=Df,Nf=Af-yf[lf]-Lf,Yf=Af/2-yf[lf]/2+Bf,Gf=clamp$1(kf,Yf,Nf),rp=!ut.arrow&&getAlignment(X)!=null&&Yf!==Gf&&tt.reference[lf]/2-(Yfkf<=0)){var Hf,Df;const kf=(((Hf=tt.flip)==null?void 0:Hf.index)||0)+1,Nf=Pf[kf];if(Nf)return{data:{index:kf,overflows:Bf},reset:{placement:Nf}};let Yf=(Df=Bf.filter(Gf=>Gf.overflows[0]<=0).sort((Gf,rp)=>Gf.overflows[1]-rp.overflows[1])[0])==null?void 0:Df.placement;if(!Yf)switch(wo){case"bestFit":{var Lf;const Gf=(Lf=Bf.map(rp=>[rp.placement,rp.overflows.filter(ip=>ip>0).reduce((ip,ap)=>ip+ap,0)]).sort((rp,ip)=>rp[1]-ip[1])[0])==null?void 0:Lf[0];Gf&&(Yf=Gf);break}case"initialPlacement":Yf=ot;break}if(X!==Yf)return{reset:{placement:Yf}}}return{}}}};async function convertValueToCoords(F,W){const{placement:q,platform:K,elements:X}=F,tt=await(K.isRTL==null?void 0:K.isRTL(X.floating)),rt=getSide(q),ot=getAlignment(q),ut=getSideAxis(q)==="y",yn=["left","top"].includes(rt)?-1:1,uo=tt&&ut?-1:1,po=evaluate$1(W,F);let{mainAxis:mo,crossAxis:wo,alignmentAxis:lf}=typeof po=="number"?{mainAxis:po,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...po};return ot&&typeof lf=="number"&&(wo=ot==="end"?lf*-1:lf),ut?{x:wo*uo,y:mo*yn}:{x:mo*yn,y:wo*uo}}const offset$3=function(F){return F===void 0&&(F=0),{name:"offset",options:F,async fn(W){var q,K;const{x:X,y:tt,placement:rt,middlewareData:ot}=W,ut=await convertValueToCoords(W,F);return rt===((q=ot.offset)==null?void 0:q.placement)&&(K=ot.arrow)!=null&&K.alignmentOffset?{}:{x:X+ut.x,y:tt+ut.y,data:{...ut,placement:rt}}}}},shift$1=function(F){return F===void 0&&(F={}),{name:"shift",options:F,async fn(W){const{x:q,y:K,placement:X}=W,{mainAxis:tt=!0,crossAxis:rt=!1,limiter:ot={fn:cf=>{let{x:vf,y:_f}=cf;return{x:vf,y:_f}}},...ut}=evaluate$1(F,W),yn={x:q,y:K},uo=await detectOverflow$1(W,ut),po=getSideAxis(getSide(X)),mo=getOppositeAxis(po);let wo=yn[mo],lf=yn[po];if(tt){const cf=mo==="y"?"top":"left",vf=mo==="y"?"bottom":"right",_f=wo+uo[cf],$f=wo-uo[vf];wo=clamp$1(_f,wo,$f)}if(rt){const cf=po==="y"?"top":"left",vf=po==="y"?"bottom":"right",_f=lf+uo[cf],$f=lf-uo[vf];lf=clamp$1(_f,lf,$f)}const yf=ot.fn({...W,[mo]:wo,[po]:lf});return{...yf,data:{x:yf.x-q,y:yf.y-K}}}}},size$1=function(F){return F===void 0&&(F={}),{name:"size",options:F,async fn(W){const{placement:q,rects:K,platform:X,elements:tt}=W,{apply:rt=()=>{},...ot}=evaluate$1(F,W),ut=await detectOverflow$1(W,ot),yn=getSide(q),uo=getAlignment(q),po=getSideAxis(q)==="y",{width:mo,height:wo}=K.floating;let lf,yf;yn==="top"||yn==="bottom"?(lf=yn,yf=uo===(await(X.isRTL==null?void 0:X.isRTL(tt.floating))?"start":"end")?"left":"right"):(yf=yn,lf=uo==="end"?"top":"bottom");const cf=wo-ut[lf],vf=mo-ut[yf],_f=!W.middlewareData.shift;let $f=cf,wf=vf;if(po){const Cf=mo-ut.left-ut.right;wf=uo||_f?min$8(vf,Cf):Cf}else{const Cf=wo-ut.top-ut.bottom;$f=uo||_f?min$8(cf,Cf):Cf}if(_f&&!uo){const Cf=max$9(ut.left,0),Af=max$9(ut.right,0),Bf=max$9(ut.top,0),Hf=max$9(ut.bottom,0);po?wf=mo-2*(Cf!==0||Af!==0?Cf+Af:max$9(ut.left,ut.right)):$f=wo-2*(Bf!==0||Hf!==0?Bf+Hf:max$9(ut.top,ut.bottom))}await rt({...W,availableWidth:wf,availableHeight:$f});const Pf=await X.getDimensions(tt.floating);return mo!==Pf.width||wo!==Pf.height?{reset:{rects:!0}}:{}}}};function getNodeName$1(F){return isNode(F)?(F.nodeName||"").toLowerCase():"#document"}function getWindow$1(F){var W;return(F==null||(W=F.ownerDocument)==null?void 0:W.defaultView)||window}function getDocumentElement$1(F){var W;return(W=(isNode(F)?F.ownerDocument:F.document)||window.document)==null?void 0:W.documentElement}function isNode(F){return F instanceof Node||F instanceof getWindow$1(F).Node}function isElement$1(F){return F instanceof Element||F instanceof getWindow$1(F).Element}function isHTMLElement$1(F){return F instanceof HTMLElement||F instanceof getWindow$1(F).HTMLElement}function isShadowRoot$1(F){return typeof ShadowRoot>"u"?!1:F instanceof ShadowRoot||F instanceof getWindow$1(F).ShadowRoot}function isOverflowElement(F){const{overflow:W,overflowX:q,overflowY:K,display:X}=getComputedStyle$2(F);return/auto|scroll|overlay|hidden|clip/.test(W+K+q)&&!["inline","contents"].includes(X)}function isTableElement$1(F){return["table","td","th"].includes(getNodeName$1(F))}function isContainingBlock(F){const W=isWebKit(),q=getComputedStyle$2(F);return q.transform!=="none"||q.perspective!=="none"||(q.containerType?q.containerType!=="normal":!1)||!W&&(q.backdropFilter?q.backdropFilter!=="none":!1)||!W&&(q.filter?q.filter!=="none":!1)||["transform","perspective","filter"].some(K=>(q.willChange||"").includes(K))||["paint","layout","strict","content"].some(K=>(q.contain||"").includes(K))}function getContainingBlock$1(F){let W=getParentNode$1(F);for(;isHTMLElement$1(W)&&!isLastTraversableNode(W);){if(isContainingBlock(W))return W;W=getParentNode$1(W)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(F){return["html","body","#document"].includes(getNodeName$1(F))}function getComputedStyle$2(F){return getWindow$1(F).getComputedStyle(F)}function getNodeScroll$1(F){return isElement$1(F)?{scrollLeft:F.scrollLeft,scrollTop:F.scrollTop}:{scrollLeft:F.pageXOffset,scrollTop:F.pageYOffset}}function getParentNode$1(F){if(getNodeName$1(F)==="html")return F;const W=F.assignedSlot||F.parentNode||isShadowRoot$1(F)&&F.host||getDocumentElement$1(F);return isShadowRoot$1(W)?W.host:W}function getNearestOverflowAncestor(F){const W=getParentNode$1(F);return isLastTraversableNode(W)?F.ownerDocument?F.ownerDocument.body:F.body:isHTMLElement$1(W)&&isOverflowElement(W)?W:getNearestOverflowAncestor(W)}function getOverflowAncestors(F,W,q){var K;W===void 0&&(W=[]),q===void 0&&(q=!0);const X=getNearestOverflowAncestor(F),tt=X===((K=F.ownerDocument)==null?void 0:K.body),rt=getWindow$1(X);return tt?W.concat(rt,rt.visualViewport||[],isOverflowElement(X)?X:[],rt.frameElement&&q?getOverflowAncestors(rt.frameElement):[]):W.concat(X,getOverflowAncestors(X,[],q))}function getCssDimensions(F){const W=getComputedStyle$2(F);let q=parseFloat(W.width)||0,K=parseFloat(W.height)||0;const X=isHTMLElement$1(F),tt=X?F.offsetWidth:q,rt=X?F.offsetHeight:K,ot=round$5(q)!==tt||round$5(K)!==rt;return ot&&(q=tt,K=rt),{width:q,height:K,$:ot}}function unwrapElement(F){return isElement$1(F)?F:F.contextElement}function getScale$3(F){const W=unwrapElement(F);if(!isHTMLElement$1(W))return createCoords(1);const q=W.getBoundingClientRect(),{width:K,height:X,$:tt}=getCssDimensions(W);let rt=(tt?round$5(q.width):q.width)/K,ot=(tt?round$5(q.height):q.height)/X;return(!rt||!Number.isFinite(rt))&&(rt=1),(!ot||!Number.isFinite(ot))&&(ot=1),{x:rt,y:ot}}const noOffsets=createCoords(0);function getVisualOffsets(F){const W=getWindow$1(F);return!isWebKit()||!W.visualViewport?noOffsets:{x:W.visualViewport.offsetLeft,y:W.visualViewport.offsetTop}}function shouldAddVisualOffsets(F,W,q){return W===void 0&&(W=!1),!q||W&&q!==getWindow$1(F)?!1:W}function getBoundingClientRect$1(F,W,q,K){W===void 0&&(W=!1),q===void 0&&(q=!1);const X=F.getBoundingClientRect(),tt=unwrapElement(F);let rt=createCoords(1);W&&(K?isElement$1(K)&&(rt=getScale$3(K)):rt=getScale$3(F));const ot=shouldAddVisualOffsets(tt,q,K)?getVisualOffsets(tt):createCoords(0);let ut=(X.left+ot.x)/rt.x,yn=(X.top+ot.y)/rt.y,uo=X.width/rt.x,po=X.height/rt.y;if(tt){const mo=getWindow$1(tt),wo=K&&isElement$1(K)?getWindow$1(K):K;let lf=mo.frameElement;for(;lf&&K&&wo!==mo;){const yf=getScale$3(lf),cf=lf.getBoundingClientRect(),vf=getComputedStyle$2(lf),_f=cf.left+(lf.clientLeft+parseFloat(vf.paddingLeft))*yf.x,$f=cf.top+(lf.clientTop+parseFloat(vf.paddingTop))*yf.y;ut*=yf.x,yn*=yf.y,uo*=yf.x,po*=yf.y,ut+=_f,yn+=$f,lf=getWindow$1(lf).frameElement}}return rectToClientRect$1({width:uo,height:po,x:ut,y:yn})}const topLayerSelectors=[":popover-open",":modal"];function topLayer(F){let W=!1,q=0,K=0;function X(tt){try{W=W||F.matches(tt)}catch{}}if(topLayerSelectors.forEach(tt=>{X(tt)}),W){const tt=getContainingBlock$1(F);if(tt){const rt=tt.getBoundingClientRect();q=rt.x,K=rt.y}}return[W,q,K]}function convertOffsetParentRelativeRectToViewportRelativeRect(F){let{elements:W,rect:q,offsetParent:K,strategy:X}=F;const tt=getDocumentElement$1(K),[rt]=W?topLayer(W.floating):[!1];if(K===tt||rt)return q;let ot={scrollLeft:0,scrollTop:0},ut=createCoords(1);const yn=createCoords(0),uo=isHTMLElement$1(K);if((uo||!uo&&X!=="fixed")&&((getNodeName$1(K)!=="body"||isOverflowElement(tt))&&(ot=getNodeScroll$1(K)),isHTMLElement$1(K))){const po=getBoundingClientRect$1(K);ut=getScale$3(K),yn.x=po.x+K.clientLeft,yn.y=po.y+K.clientTop}return{width:q.width*ut.x,height:q.height*ut.y,x:q.x*ut.x-ot.scrollLeft*ut.x+yn.x,y:q.y*ut.y-ot.scrollTop*ut.y+yn.y}}function getClientRects(F){return Array.from(F.getClientRects())}function getWindowScrollBarX$1(F){return getBoundingClientRect$1(getDocumentElement$1(F)).left+getNodeScroll$1(F).scrollLeft}function getDocumentRect$1(F){const W=getDocumentElement$1(F),q=getNodeScroll$1(F),K=F.ownerDocument.body,X=max$9(W.scrollWidth,W.clientWidth,K.scrollWidth,K.clientWidth),tt=max$9(W.scrollHeight,W.clientHeight,K.scrollHeight,K.clientHeight);let rt=-q.scrollLeft+getWindowScrollBarX$1(F);const ot=-q.scrollTop;return getComputedStyle$2(K).direction==="rtl"&&(rt+=max$9(W.clientWidth,K.clientWidth)-X),{width:X,height:tt,x:rt,y:ot}}function getViewportRect$1(F,W){const q=getWindow$1(F),K=getDocumentElement$1(F),X=q.visualViewport;let tt=K.clientWidth,rt=K.clientHeight,ot=0,ut=0;if(X){tt=X.width,rt=X.height;const yn=isWebKit();(!yn||yn&&W==="fixed")&&(ot=X.offsetLeft,ut=X.offsetTop)}return{width:tt,height:rt,x:ot,y:ut}}function getInnerBoundingClientRect$1(F,W){const q=getBoundingClientRect$1(F,!0,W==="fixed"),K=q.top+F.clientTop,X=q.left+F.clientLeft,tt=isHTMLElement$1(F)?getScale$3(F):createCoords(1),rt=F.clientWidth*tt.x,ot=F.clientHeight*tt.y,ut=X*tt.x,yn=K*tt.y;return{width:rt,height:ot,x:ut,y:yn}}function getClientRectFromClippingAncestor(F,W,q){let K;if(W==="viewport")K=getViewportRect$1(F,q);else if(W==="document")K=getDocumentRect$1(getDocumentElement$1(F));else if(isElement$1(W))K=getInnerBoundingClientRect$1(W,q);else{const X=getVisualOffsets(F);K={...W,x:W.x-X.x,y:W.y-X.y}}return rectToClientRect$1(K)}function hasFixedPositionAncestor(F,W){const q=getParentNode$1(F);return q===W||!isElement$1(q)||isLastTraversableNode(q)?!1:getComputedStyle$2(q).position==="fixed"||hasFixedPositionAncestor(q,W)}function getClippingElementAncestors(F,W){const q=W.get(F);if(q)return q;let K=getOverflowAncestors(F,[],!1).filter(ot=>isElement$1(ot)&&getNodeName$1(ot)!=="body"),X=null;const tt=getComputedStyle$2(F).position==="fixed";let rt=tt?getParentNode$1(F):F;for(;isElement$1(rt)&&!isLastTraversableNode(rt);){const ot=getComputedStyle$2(rt),ut=isContainingBlock(rt);!ut&&ot.position==="fixed"&&(X=null),(tt?!ut&&!X:!ut&&ot.position==="static"&&!!X&&["absolute","fixed"].includes(X.position)||isOverflowElement(rt)&&!ut&&hasFixedPositionAncestor(F,rt))?K=K.filter(uo=>uo!==rt):X=ot,rt=getParentNode$1(rt)}return W.set(F,K),K}function getClippingRect$1(F){let{element:W,boundary:q,rootBoundary:K,strategy:X}=F;const rt=[...q==="clippingAncestors"?getClippingElementAncestors(W,this._c):[].concat(q),K],ot=rt[0],ut=rt.reduce((yn,uo)=>{const po=getClientRectFromClippingAncestor(W,uo,X);return yn.top=max$9(po.top,yn.top),yn.right=min$8(po.right,yn.right),yn.bottom=min$8(po.bottom,yn.bottom),yn.left=max$9(po.left,yn.left),yn},getClientRectFromClippingAncestor(W,ot,X));return{width:ut.right-ut.left,height:ut.bottom-ut.top,x:ut.left,y:ut.top}}function getDimensions(F){const{width:W,height:q}=getCssDimensions(F);return{width:W,height:q}}function getRectRelativeToOffsetParent(F,W,q,K){const X=isHTMLElement$1(W),tt=getDocumentElement$1(W),rt=q==="fixed",ot=getBoundingClientRect$1(F,!0,rt,W);let ut={scrollLeft:0,scrollTop:0};const yn=createCoords(0);if(X||!X&&!rt)if((getNodeName$1(W)!=="body"||isOverflowElement(tt))&&(ut=getNodeScroll$1(W)),X){const yf=getBoundingClientRect$1(W,!0,rt,W);yn.x=yf.x+W.clientLeft,yn.y=yf.y+W.clientTop}else tt&&(yn.x=getWindowScrollBarX$1(tt));let uo=ot.left+ut.scrollLeft-yn.x,po=ot.top+ut.scrollTop-yn.y;const[mo,wo,lf]=topLayer(K);return mo&&(uo+=wo,po+=lf,X&&(uo+=W.clientLeft,po+=W.clientTop)),{x:uo,y:po,width:ot.width,height:ot.height}}function getTrueOffsetParent$1(F,W){return!isHTMLElement$1(F)||getComputedStyle$2(F).position==="fixed"?null:W?W(F):F.offsetParent}function getOffsetParent$1(F,W){const q=getWindow$1(F);if(!isHTMLElement$1(F))return q;let K=getTrueOffsetParent$1(F,W);for(;K&&isTableElement$1(K)&&getComputedStyle$2(K).position==="static";)K=getTrueOffsetParent$1(K,W);return K&&(getNodeName$1(K)==="html"||getNodeName$1(K)==="body"&&getComputedStyle$2(K).position==="static"&&!isContainingBlock(K))?q:K||getContainingBlock$1(F)||q}const getElementRects=async function(F){const W=this.getOffsetParent||getOffsetParent$1,q=this.getDimensions;return{reference:getRectRelativeToOffsetParent(F.reference,await W(F.floating),F.strategy,F.floating),floating:{x:0,y:0,...await q(F.floating)}}};function isRTL(F){return getComputedStyle$2(F).direction==="rtl"}const platform$1={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement$1,getClippingRect:getClippingRect$1,getOffsetParent:getOffsetParent$1,getElementRects,getClientRects,getDimensions,getScale:getScale$3,isElement:isElement$1,isRTL};function observeMove(F,W){let q=null,K;const X=getDocumentElement$1(F);function tt(){var ot;clearTimeout(K),(ot=q)==null||ot.disconnect(),q=null}function rt(ot,ut){ot===void 0&&(ot=!1),ut===void 0&&(ut=1),tt();const{left:yn,top:uo,width:po,height:mo}=F.getBoundingClientRect();if(ot||W(),!po||!mo)return;const wo=floor$4(uo),lf=floor$4(X.clientWidth-(yn+po)),yf=floor$4(X.clientHeight-(uo+mo)),cf=floor$4(yn),_f={rootMargin:-wo+"px "+-lf+"px "+-yf+"px "+-cf+"px",threshold:max$9(0,min$8(1,ut))||1};let $f=!0;function wf(Pf){const Cf=Pf[0].intersectionRatio;if(Cf!==ut){if(!$f)return rt();Cf?rt(!1,Cf):K=setTimeout(()=>{rt(!1,1e-7)},100)}$f=!1}try{q=new IntersectionObserver(wf,{..._f,root:X.ownerDocument})}catch{q=new IntersectionObserver(wf,_f)}q.observe(F)}return rt(!0),tt}function autoUpdate(F,W,q,K){K===void 0&&(K={});const{ancestorScroll:X=!0,ancestorResize:tt=!0,elementResize:rt=typeof ResizeObserver=="function",layoutShift:ot=typeof IntersectionObserver=="function",animationFrame:ut=!1}=K,yn=unwrapElement(F),uo=X||tt?[...yn?getOverflowAncestors(yn):[],...getOverflowAncestors(W)]:[];uo.forEach(vf=>{X&&vf.addEventListener("scroll",q,{passive:!0}),tt&&vf.addEventListener("resize",q)});const po=yn&&ot?observeMove(yn,q):null;let mo=-1,wo=null;rt&&(wo=new ResizeObserver(vf=>{let[_f]=vf;_f&&_f.target===yn&&wo&&(wo.unobserve(W),cancelAnimationFrame(mo),mo=requestAnimationFrame(()=>{var $f;($f=wo)==null||$f.observe(W)})),q()}),yn&&!ut&&wo.observe(yn),wo.observe(W));let lf,yf=ut?getBoundingClientRect$1(F):null;ut&&cf();function cf(){const vf=getBoundingClientRect$1(F);yf&&(vf.x!==yf.x||vf.y!==yf.y||vf.width!==yf.width||vf.height!==yf.height)&&q(),yf=vf,lf=requestAnimationFrame(cf)}return q(),()=>{var vf;uo.forEach(_f=>{X&&_f.removeEventListener("scroll",q),tt&&_f.removeEventListener("resize",q)}),po==null||po(),(vf=wo)==null||vf.disconnect(),wo=null,ut&&cancelAnimationFrame(lf)}}const shift=shift$1,flip$2=flip$3,size=size$1,arrow$2=arrow$3,computePosition=(F,W,q)=>{const K=new Map,X={platform:platform$1,...q},tt={...X.platform,_c:K};return computePosition$1(F,W,{...X,platform:tt})};function t(F){return r$1(F)}function o$3(F){return F.assignedSlot?F.assignedSlot:F.parentNode instanceof ShadowRoot?F.parentNode.host:F.parentNode}function r$1(F){for(let W=F;W;W=o$3(W))if(W instanceof Element&&getComputedStyle(W).display==="none")return null;for(let W=o$3(F);W;W=o$3(W)){if(!(W instanceof Element))continue;const q=getComputedStyle(W);if(q.display!=="contents"&&(q.position!=="static"||q.filter!=="none"||W.tagName==="BODY"))return W}return null}function isVirtualElement(F){return F!==null&&typeof F=="object"&&"getBoundingClientRect"in F}var SlPopup=class extends ShoelaceElement{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const F=this.anchorEl.getBoundingClientRect(),W=this.popup.getBoundingClientRect(),q=this.placement.includes("top")||this.placement.includes("bottom");let K=0,X=0,tt=0,rt=0,ot=0,ut=0,yn=0,uo=0;q?F.top{this.reposition()}))}async stop(){return new Promise(F=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>F())):F()})}reposition(){if(!this.active||!this.anchorEl)return;const F=[offset$3({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?F.push(size({apply:({rects:q})=>{const K=this.sync==="width"||this.sync==="both",X=this.sync==="height"||this.sync==="both";this.popup.style.width=K?`${q.reference.width}px`:"",this.popup.style.height=X?`${q.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&F.push(flip$2({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&F.push(shift({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?F.push(size({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:q,availableHeight:K})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${K}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${q}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&F.push(arrow$2({element:this.arrowEl,padding:this.arrowPadding}));const W=this.strategy==="absolute"?q=>platform$1.getOffsetParent(q,t):platform$1.getOffsetParent;computePosition(this.anchorEl,this.popup,{placement:this.placement,middleware:F,strategy:this.strategy,platform:__spreadProps(__spreadValues({},platform$1),{getOffsetParent:W})}).then(({x:q,y:K,middlewareData:X,placement:tt})=>{const rt=getComputedStyle(this).direction==="rtl",ot={top:"bottom",right:"left",bottom:"top",left:"right"}[tt.split("-")[0]];if(this.setAttribute("data-current-placement",tt),Object.assign(this.popup.style,{left:`${q}px`,top:`${K}px`}),this.arrow){const ut=X.arrow.x,yn=X.arrow.y;let uo="",po="",mo="",wo="";if(this.arrowPlacement==="start"){const lf=typeof ut=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";uo=typeof yn=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",po=rt?lf:"",wo=rt?"":lf}else if(this.arrowPlacement==="end"){const lf=typeof ut=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";po=rt?"":lf,wo=rt?lf:"",mo=typeof yn=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(wo=typeof ut=="number"?"calc(50% - var(--arrow-size-diagonal))":"",uo=typeof yn=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(wo=typeof ut=="number"?`${ut}px`:"",uo=typeof yn=="number"?`${yn}px`:"");Object.assign(this.arrowEl.style,{top:uo,right:po,bottom:mo,left:wo,[ot]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge()),this.emit("sl-reposition")}render(){return x` +`;const min$8=Math.min,max$9=Math.max,round$5=Math.round,floor$4=Math.floor,createCoords=F=>({x:F,y:F}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(F,W,q){return max$9(F,min$8(W,q))}function evaluate$1(F,W){return typeof F=="function"?F(W):F}function getSide(F){return F.split("-")[0]}function getAlignment(F){return F.split("-")[1]}function getOppositeAxis(F){return F==="x"?"y":"x"}function getAxisLength(F){return F==="y"?"height":"width"}function getSideAxis(F){return["top","bottom"].includes(getSide(F))?"y":"x"}function getAlignmentAxis(F){return getOppositeAxis(getSideAxis(F))}function getAlignmentSides(F,W,q){q===void 0&&(q=!1);const K=getAlignment(F),X=getAlignmentAxis(F),tt=getAxisLength(X);let rt=X==="x"?K===(q?"end":"start")?"right":"left":K==="start"?"bottom":"top";return W.reference[tt]>W.floating[tt]&&(rt=getOppositePlacement$1(rt)),[rt,getOppositePlacement$1(rt)]}function getExpandedPlacements(F){const W=getOppositePlacement$1(F);return[getOppositeAlignmentPlacement(F),W,getOppositeAlignmentPlacement(W)]}function getOppositeAlignmentPlacement(F){return F.replace(/start|end/g,W=>oppositeAlignmentMap[W])}function getSideList(F,W,q){const K=["left","right"],X=["right","left"],tt=["top","bottom"],rt=["bottom","top"];switch(F){case"top":case"bottom":return q?W?X:K:W?K:X;case"left":case"right":return W?tt:rt;default:return[]}}function getOppositeAxisPlacements(F,W,q,K){const X=getAlignment(F);let tt=getSideList(getSide(F),q==="start",K);return X&&(tt=tt.map(rt=>rt+"-"+X),W&&(tt=tt.concat(tt.map(getOppositeAlignmentPlacement)))),tt}function getOppositePlacement$1(F){return F.replace(/left|right|bottom|top/g,W=>oppositeSideMap[W])}function expandPaddingObject(F){return{top:0,right:0,bottom:0,left:0,...F}}function getPaddingObject(F){return typeof F!="number"?expandPaddingObject(F):{top:F,right:F,bottom:F,left:F}}function rectToClientRect$1(F){return{...F,top:F.y,left:F.x,right:F.x+F.width,bottom:F.y+F.height}}function computeCoordsFromPlacement(F,W,q){let{reference:K,floating:X}=F;const tt=getSideAxis(W),rt=getAlignmentAxis(W),ot=getAxisLength(rt),ut=getSide(W),yn=tt==="y",uo=K.x+K.width/2-X.width/2,po=K.y+K.height/2-X.height/2,mo=K[ot]/2-X[ot]/2;let wo;switch(ut){case"top":wo={x:uo,y:K.y-X.height};break;case"bottom":wo={x:uo,y:K.y+K.height};break;case"right":wo={x:K.x+K.width,y:po};break;case"left":wo={x:K.x-X.width,y:po};break;default:wo={x:K.x,y:K.y}}switch(getAlignment(W)){case"start":wo[rt]-=mo*(q&&yn?-1:1);break;case"end":wo[rt]+=mo*(q&&yn?-1:1);break}return wo}const computePosition$1=async(F,W,q)=>{const{placement:K="bottom",strategy:X="absolute",middleware:tt=[],platform:rt}=q,ot=tt.filter(Boolean),ut=await(rt.isRTL==null?void 0:rt.isRTL(W));let yn=await rt.getElementRects({reference:F,floating:W,strategy:X}),{x:uo,y:po}=computeCoordsFromPlacement(yn,K,ut),mo=K,wo={},lf=0;for(let yf=0;yf({name:"arrow",options:F,async fn(W){const{x:q,y:K,placement:X,rects:tt,platform:rt,elements:ot,middlewareData:ut}=W,{element:yn,padding:uo=0}=evaluate$1(F,W)||{};if(yn==null)return{};const po=getPaddingObject(uo),mo={x:q,y:K},wo=getAlignmentAxis(X),lf=getAxisLength(wo),yf=await rt.getDimensions(yn),cf=wo==="y",vf=cf?"top":"left",_f=cf?"bottom":"right",$f=cf?"clientHeight":"clientWidth",xf=tt.reference[lf]+tt.reference[wo]-mo[wo]-tt.floating[lf],Af=mo[wo]-tt.reference[wo],Cf=await(rt.getOffsetParent==null?void 0:rt.getOffsetParent(yn));let Pf=Cf?Cf[$f]:0;(!Pf||!await(rt.isElement==null?void 0:rt.isElement(Cf)))&&(Pf=ot.floating[$f]||tt.floating[lf]);const Bf=xf/2-Af/2,Hf=Pf/2-yf[lf]/2-1,Df=min$8(po[vf],Hf),Lf=min$8(po[_f],Hf),kf=Df,Nf=Pf-yf[lf]-Lf,Yf=Pf/2-yf[lf]/2+Bf,Gf=clamp$1(kf,Yf,Nf),rp=!ut.arrow&&getAlignment(X)!=null&&Yf!==Gf&&tt.reference[lf]/2-(Yfkf<=0)){var Hf,Df;const kf=(((Hf=tt.flip)==null?void 0:Hf.index)||0)+1,Nf=Af[kf];if(Nf)return{data:{index:kf,overflows:Bf},reset:{placement:Nf}};let Yf=(Df=Bf.filter(Gf=>Gf.overflows[0]<=0).sort((Gf,rp)=>Gf.overflows[1]-rp.overflows[1])[0])==null?void 0:Df.placement;if(!Yf)switch(wo){case"bestFit":{var Lf;const Gf=(Lf=Bf.map(rp=>[rp.placement,rp.overflows.filter(ip=>ip>0).reduce((ip,ap)=>ip+ap,0)]).sort((rp,ip)=>rp[1]-ip[1])[0])==null?void 0:Lf[0];Gf&&(Yf=Gf);break}case"initialPlacement":Yf=ot;break}if(X!==Yf)return{reset:{placement:Yf}}}return{}}}};async function convertValueToCoords(F,W){const{placement:q,platform:K,elements:X}=F,tt=await(K.isRTL==null?void 0:K.isRTL(X.floating)),rt=getSide(q),ot=getAlignment(q),ut=getSideAxis(q)==="y",yn=["left","top"].includes(rt)?-1:1,uo=tt&&ut?-1:1,po=evaluate$1(W,F);let{mainAxis:mo,crossAxis:wo,alignmentAxis:lf}=typeof po=="number"?{mainAxis:po,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...po};return ot&&typeof lf=="number"&&(wo=ot==="end"?lf*-1:lf),ut?{x:wo*uo,y:mo*yn}:{x:mo*yn,y:wo*uo}}const offset$3=function(F){return F===void 0&&(F=0),{name:"offset",options:F,async fn(W){var q,K;const{x:X,y:tt,placement:rt,middlewareData:ot}=W,ut=await convertValueToCoords(W,F);return rt===((q=ot.offset)==null?void 0:q.placement)&&(K=ot.arrow)!=null&&K.alignmentOffset?{}:{x:X+ut.x,y:tt+ut.y,data:{...ut,placement:rt}}}}},shift$1=function(F){return F===void 0&&(F={}),{name:"shift",options:F,async fn(W){const{x:q,y:K,placement:X}=W,{mainAxis:tt=!0,crossAxis:rt=!1,limiter:ot={fn:cf=>{let{x:vf,y:_f}=cf;return{x:vf,y:_f}}},...ut}=evaluate$1(F,W),yn={x:q,y:K},uo=await detectOverflow$1(W,ut),po=getSideAxis(getSide(X)),mo=getOppositeAxis(po);let wo=yn[mo],lf=yn[po];if(tt){const cf=mo==="y"?"top":"left",vf=mo==="y"?"bottom":"right",_f=wo+uo[cf],$f=wo-uo[vf];wo=clamp$1(_f,wo,$f)}if(rt){const cf=po==="y"?"top":"left",vf=po==="y"?"bottom":"right",_f=lf+uo[cf],$f=lf-uo[vf];lf=clamp$1(_f,lf,$f)}const yf=ot.fn({...W,[mo]:wo,[po]:lf});return{...yf,data:{x:yf.x-q,y:yf.y-K}}}}},size$1=function(F){return F===void 0&&(F={}),{name:"size",options:F,async fn(W){const{placement:q,rects:K,platform:X,elements:tt}=W,{apply:rt=()=>{},...ot}=evaluate$1(F,W),ut=await detectOverflow$1(W,ot),yn=getSide(q),uo=getAlignment(q),po=getSideAxis(q)==="y",{width:mo,height:wo}=K.floating;let lf,yf;yn==="top"||yn==="bottom"?(lf=yn,yf=uo===(await(X.isRTL==null?void 0:X.isRTL(tt.floating))?"start":"end")?"left":"right"):(yf=yn,lf=uo==="end"?"top":"bottom");const cf=wo-ut[lf],vf=mo-ut[yf],_f=!W.middlewareData.shift;let $f=cf,xf=vf;if(po){const Cf=mo-ut.left-ut.right;xf=uo||_f?min$8(vf,Cf):Cf}else{const Cf=wo-ut.top-ut.bottom;$f=uo||_f?min$8(cf,Cf):Cf}if(_f&&!uo){const Cf=max$9(ut.left,0),Pf=max$9(ut.right,0),Bf=max$9(ut.top,0),Hf=max$9(ut.bottom,0);po?xf=mo-2*(Cf!==0||Pf!==0?Cf+Pf:max$9(ut.left,ut.right)):$f=wo-2*(Bf!==0||Hf!==0?Bf+Hf:max$9(ut.top,ut.bottom))}await rt({...W,availableWidth:xf,availableHeight:$f});const Af=await X.getDimensions(tt.floating);return mo!==Af.width||wo!==Af.height?{reset:{rects:!0}}:{}}}};function getNodeName$1(F){return isNode(F)?(F.nodeName||"").toLowerCase():"#document"}function getWindow$1(F){var W;return(F==null||(W=F.ownerDocument)==null?void 0:W.defaultView)||window}function getDocumentElement$1(F){var W;return(W=(isNode(F)?F.ownerDocument:F.document)||window.document)==null?void 0:W.documentElement}function isNode(F){return F instanceof Node||F instanceof getWindow$1(F).Node}function isElement$1(F){return F instanceof Element||F instanceof getWindow$1(F).Element}function isHTMLElement$1(F){return F instanceof HTMLElement||F instanceof getWindow$1(F).HTMLElement}function isShadowRoot$1(F){return typeof ShadowRoot>"u"?!1:F instanceof ShadowRoot||F instanceof getWindow$1(F).ShadowRoot}function isOverflowElement(F){const{overflow:W,overflowX:q,overflowY:K,display:X}=getComputedStyle$2(F);return/auto|scroll|overlay|hidden|clip/.test(W+K+q)&&!["inline","contents"].includes(X)}function isTableElement$1(F){return["table","td","th"].includes(getNodeName$1(F))}function isContainingBlock(F){const W=isWebKit(),q=getComputedStyle$2(F);return q.transform!=="none"||q.perspective!=="none"||(q.containerType?q.containerType!=="normal":!1)||!W&&(q.backdropFilter?q.backdropFilter!=="none":!1)||!W&&(q.filter?q.filter!=="none":!1)||["transform","perspective","filter"].some(K=>(q.willChange||"").includes(K))||["paint","layout","strict","content"].some(K=>(q.contain||"").includes(K))}function getContainingBlock$1(F){let W=getParentNode$1(F);for(;isHTMLElement$1(W)&&!isLastTraversableNode(W);){if(isContainingBlock(W))return W;W=getParentNode$1(W)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(F){return["html","body","#document"].includes(getNodeName$1(F))}function getComputedStyle$2(F){return getWindow$1(F).getComputedStyle(F)}function getNodeScroll$1(F){return isElement$1(F)?{scrollLeft:F.scrollLeft,scrollTop:F.scrollTop}:{scrollLeft:F.pageXOffset,scrollTop:F.pageYOffset}}function getParentNode$1(F){if(getNodeName$1(F)==="html")return F;const W=F.assignedSlot||F.parentNode||isShadowRoot$1(F)&&F.host||getDocumentElement$1(F);return isShadowRoot$1(W)?W.host:W}function getNearestOverflowAncestor(F){const W=getParentNode$1(F);return isLastTraversableNode(W)?F.ownerDocument?F.ownerDocument.body:F.body:isHTMLElement$1(W)&&isOverflowElement(W)?W:getNearestOverflowAncestor(W)}function getOverflowAncestors(F,W,q){var K;W===void 0&&(W=[]),q===void 0&&(q=!0);const X=getNearestOverflowAncestor(F),tt=X===((K=F.ownerDocument)==null?void 0:K.body),rt=getWindow$1(X);return tt?W.concat(rt,rt.visualViewport||[],isOverflowElement(X)?X:[],rt.frameElement&&q?getOverflowAncestors(rt.frameElement):[]):W.concat(X,getOverflowAncestors(X,[],q))}function getCssDimensions(F){const W=getComputedStyle$2(F);let q=parseFloat(W.width)||0,K=parseFloat(W.height)||0;const X=isHTMLElement$1(F),tt=X?F.offsetWidth:q,rt=X?F.offsetHeight:K,ot=round$5(q)!==tt||round$5(K)!==rt;return ot&&(q=tt,K=rt),{width:q,height:K,$:ot}}function unwrapElement(F){return isElement$1(F)?F:F.contextElement}function getScale$3(F){const W=unwrapElement(F);if(!isHTMLElement$1(W))return createCoords(1);const q=W.getBoundingClientRect(),{width:K,height:X,$:tt}=getCssDimensions(W);let rt=(tt?round$5(q.width):q.width)/K,ot=(tt?round$5(q.height):q.height)/X;return(!rt||!Number.isFinite(rt))&&(rt=1),(!ot||!Number.isFinite(ot))&&(ot=1),{x:rt,y:ot}}const noOffsets=createCoords(0);function getVisualOffsets(F){const W=getWindow$1(F);return!isWebKit()||!W.visualViewport?noOffsets:{x:W.visualViewport.offsetLeft,y:W.visualViewport.offsetTop}}function shouldAddVisualOffsets(F,W,q){return W===void 0&&(W=!1),!q||W&&q!==getWindow$1(F)?!1:W}function getBoundingClientRect$1(F,W,q,K){W===void 0&&(W=!1),q===void 0&&(q=!1);const X=F.getBoundingClientRect(),tt=unwrapElement(F);let rt=createCoords(1);W&&(K?isElement$1(K)&&(rt=getScale$3(K)):rt=getScale$3(F));const ot=shouldAddVisualOffsets(tt,q,K)?getVisualOffsets(tt):createCoords(0);let ut=(X.left+ot.x)/rt.x,yn=(X.top+ot.y)/rt.y,uo=X.width/rt.x,po=X.height/rt.y;if(tt){const mo=getWindow$1(tt),wo=K&&isElement$1(K)?getWindow$1(K):K;let lf=mo.frameElement;for(;lf&&K&&wo!==mo;){const yf=getScale$3(lf),cf=lf.getBoundingClientRect(),vf=getComputedStyle$2(lf),_f=cf.left+(lf.clientLeft+parseFloat(vf.paddingLeft))*yf.x,$f=cf.top+(lf.clientTop+parseFloat(vf.paddingTop))*yf.y;ut*=yf.x,yn*=yf.y,uo*=yf.x,po*=yf.y,ut+=_f,yn+=$f,lf=getWindow$1(lf).frameElement}}return rectToClientRect$1({width:uo,height:po,x:ut,y:yn})}const topLayerSelectors=[":popover-open",":modal"];function topLayer(F){let W=!1,q=0,K=0;function X(tt){try{W=W||F.matches(tt)}catch{}}if(topLayerSelectors.forEach(tt=>{X(tt)}),W){const tt=getContainingBlock$1(F);if(tt){const rt=tt.getBoundingClientRect();q=rt.x,K=rt.y}}return[W,q,K]}function convertOffsetParentRelativeRectToViewportRelativeRect(F){let{elements:W,rect:q,offsetParent:K,strategy:X}=F;const tt=getDocumentElement$1(K),[rt]=W?topLayer(W.floating):[!1];if(K===tt||rt)return q;let ot={scrollLeft:0,scrollTop:0},ut=createCoords(1);const yn=createCoords(0),uo=isHTMLElement$1(K);if((uo||!uo&&X!=="fixed")&&((getNodeName$1(K)!=="body"||isOverflowElement(tt))&&(ot=getNodeScroll$1(K)),isHTMLElement$1(K))){const po=getBoundingClientRect$1(K);ut=getScale$3(K),yn.x=po.x+K.clientLeft,yn.y=po.y+K.clientTop}return{width:q.width*ut.x,height:q.height*ut.y,x:q.x*ut.x-ot.scrollLeft*ut.x+yn.x,y:q.y*ut.y-ot.scrollTop*ut.y+yn.y}}function getClientRects(F){return Array.from(F.getClientRects())}function getWindowScrollBarX$1(F){return getBoundingClientRect$1(getDocumentElement$1(F)).left+getNodeScroll$1(F).scrollLeft}function getDocumentRect$1(F){const W=getDocumentElement$1(F),q=getNodeScroll$1(F),K=F.ownerDocument.body,X=max$9(W.scrollWidth,W.clientWidth,K.scrollWidth,K.clientWidth),tt=max$9(W.scrollHeight,W.clientHeight,K.scrollHeight,K.clientHeight);let rt=-q.scrollLeft+getWindowScrollBarX$1(F);const ot=-q.scrollTop;return getComputedStyle$2(K).direction==="rtl"&&(rt+=max$9(W.clientWidth,K.clientWidth)-X),{width:X,height:tt,x:rt,y:ot}}function getViewportRect$1(F,W){const q=getWindow$1(F),K=getDocumentElement$1(F),X=q.visualViewport;let tt=K.clientWidth,rt=K.clientHeight,ot=0,ut=0;if(X){tt=X.width,rt=X.height;const yn=isWebKit();(!yn||yn&&W==="fixed")&&(ot=X.offsetLeft,ut=X.offsetTop)}return{width:tt,height:rt,x:ot,y:ut}}function getInnerBoundingClientRect$1(F,W){const q=getBoundingClientRect$1(F,!0,W==="fixed"),K=q.top+F.clientTop,X=q.left+F.clientLeft,tt=isHTMLElement$1(F)?getScale$3(F):createCoords(1),rt=F.clientWidth*tt.x,ot=F.clientHeight*tt.y,ut=X*tt.x,yn=K*tt.y;return{width:rt,height:ot,x:ut,y:yn}}function getClientRectFromClippingAncestor(F,W,q){let K;if(W==="viewport")K=getViewportRect$1(F,q);else if(W==="document")K=getDocumentRect$1(getDocumentElement$1(F));else if(isElement$1(W))K=getInnerBoundingClientRect$1(W,q);else{const X=getVisualOffsets(F);K={...W,x:W.x-X.x,y:W.y-X.y}}return rectToClientRect$1(K)}function hasFixedPositionAncestor(F,W){const q=getParentNode$1(F);return q===W||!isElement$1(q)||isLastTraversableNode(q)?!1:getComputedStyle$2(q).position==="fixed"||hasFixedPositionAncestor(q,W)}function getClippingElementAncestors(F,W){const q=W.get(F);if(q)return q;let K=getOverflowAncestors(F,[],!1).filter(ot=>isElement$1(ot)&&getNodeName$1(ot)!=="body"),X=null;const tt=getComputedStyle$2(F).position==="fixed";let rt=tt?getParentNode$1(F):F;for(;isElement$1(rt)&&!isLastTraversableNode(rt);){const ot=getComputedStyle$2(rt),ut=isContainingBlock(rt);!ut&&ot.position==="fixed"&&(X=null),(tt?!ut&&!X:!ut&&ot.position==="static"&&!!X&&["absolute","fixed"].includes(X.position)||isOverflowElement(rt)&&!ut&&hasFixedPositionAncestor(F,rt))?K=K.filter(uo=>uo!==rt):X=ot,rt=getParentNode$1(rt)}return W.set(F,K),K}function getClippingRect$1(F){let{element:W,boundary:q,rootBoundary:K,strategy:X}=F;const rt=[...q==="clippingAncestors"?getClippingElementAncestors(W,this._c):[].concat(q),K],ot=rt[0],ut=rt.reduce((yn,uo)=>{const po=getClientRectFromClippingAncestor(W,uo,X);return yn.top=max$9(po.top,yn.top),yn.right=min$8(po.right,yn.right),yn.bottom=min$8(po.bottom,yn.bottom),yn.left=max$9(po.left,yn.left),yn},getClientRectFromClippingAncestor(W,ot,X));return{width:ut.right-ut.left,height:ut.bottom-ut.top,x:ut.left,y:ut.top}}function getDimensions(F){const{width:W,height:q}=getCssDimensions(F);return{width:W,height:q}}function getRectRelativeToOffsetParent(F,W,q,K){const X=isHTMLElement$1(W),tt=getDocumentElement$1(W),rt=q==="fixed",ot=getBoundingClientRect$1(F,!0,rt,W);let ut={scrollLeft:0,scrollTop:0};const yn=createCoords(0);if(X||!X&&!rt)if((getNodeName$1(W)!=="body"||isOverflowElement(tt))&&(ut=getNodeScroll$1(W)),X){const yf=getBoundingClientRect$1(W,!0,rt,W);yn.x=yf.x+W.clientLeft,yn.y=yf.y+W.clientTop}else tt&&(yn.x=getWindowScrollBarX$1(tt));let uo=ot.left+ut.scrollLeft-yn.x,po=ot.top+ut.scrollTop-yn.y;const[mo,wo,lf]=topLayer(K);return mo&&(uo+=wo,po+=lf,X&&(uo+=W.clientLeft,po+=W.clientTop)),{x:uo,y:po,width:ot.width,height:ot.height}}function getTrueOffsetParent$1(F,W){return!isHTMLElement$1(F)||getComputedStyle$2(F).position==="fixed"?null:W?W(F):F.offsetParent}function getOffsetParent$1(F,W){const q=getWindow$1(F);if(!isHTMLElement$1(F))return q;let K=getTrueOffsetParent$1(F,W);for(;K&&isTableElement$1(K)&&getComputedStyle$2(K).position==="static";)K=getTrueOffsetParent$1(K,W);return K&&(getNodeName$1(K)==="html"||getNodeName$1(K)==="body"&&getComputedStyle$2(K).position==="static"&&!isContainingBlock(K))?q:K||getContainingBlock$1(F)||q}const getElementRects=async function(F){const W=this.getOffsetParent||getOffsetParent$1,q=this.getDimensions;return{reference:getRectRelativeToOffsetParent(F.reference,await W(F.floating),F.strategy,F.floating),floating:{x:0,y:0,...await q(F.floating)}}};function isRTL(F){return getComputedStyle$2(F).direction==="rtl"}const platform$1={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement$1,getClippingRect:getClippingRect$1,getOffsetParent:getOffsetParent$1,getElementRects,getClientRects,getDimensions,getScale:getScale$3,isElement:isElement$1,isRTL};function observeMove(F,W){let q=null,K;const X=getDocumentElement$1(F);function tt(){var ot;clearTimeout(K),(ot=q)==null||ot.disconnect(),q=null}function rt(ot,ut){ot===void 0&&(ot=!1),ut===void 0&&(ut=1),tt();const{left:yn,top:uo,width:po,height:mo}=F.getBoundingClientRect();if(ot||W(),!po||!mo)return;const wo=floor$4(uo),lf=floor$4(X.clientWidth-(yn+po)),yf=floor$4(X.clientHeight-(uo+mo)),cf=floor$4(yn),_f={rootMargin:-wo+"px "+-lf+"px "+-yf+"px "+-cf+"px",threshold:max$9(0,min$8(1,ut))||1};let $f=!0;function xf(Af){const Cf=Af[0].intersectionRatio;if(Cf!==ut){if(!$f)return rt();Cf?rt(!1,Cf):K=setTimeout(()=>{rt(!1,1e-7)},100)}$f=!1}try{q=new IntersectionObserver(xf,{..._f,root:X.ownerDocument})}catch{q=new IntersectionObserver(xf,_f)}q.observe(F)}return rt(!0),tt}function autoUpdate(F,W,q,K){K===void 0&&(K={});const{ancestorScroll:X=!0,ancestorResize:tt=!0,elementResize:rt=typeof ResizeObserver=="function",layoutShift:ot=typeof IntersectionObserver=="function",animationFrame:ut=!1}=K,yn=unwrapElement(F),uo=X||tt?[...yn?getOverflowAncestors(yn):[],...getOverflowAncestors(W)]:[];uo.forEach(vf=>{X&&vf.addEventListener("scroll",q,{passive:!0}),tt&&vf.addEventListener("resize",q)});const po=yn&&ot?observeMove(yn,q):null;let mo=-1,wo=null;rt&&(wo=new ResizeObserver(vf=>{let[_f]=vf;_f&&_f.target===yn&&wo&&(wo.unobserve(W),cancelAnimationFrame(mo),mo=requestAnimationFrame(()=>{var $f;($f=wo)==null||$f.observe(W)})),q()}),yn&&!ut&&wo.observe(yn),wo.observe(W));let lf,yf=ut?getBoundingClientRect$1(F):null;ut&&cf();function cf(){const vf=getBoundingClientRect$1(F);yf&&(vf.x!==yf.x||vf.y!==yf.y||vf.width!==yf.width||vf.height!==yf.height)&&q(),yf=vf,lf=requestAnimationFrame(cf)}return q(),()=>{var vf;uo.forEach(_f=>{X&&_f.removeEventListener("scroll",q),tt&&_f.removeEventListener("resize",q)}),po==null||po(),(vf=wo)==null||vf.disconnect(),wo=null,ut&&cancelAnimationFrame(lf)}}const shift=shift$1,flip$2=flip$3,size=size$1,arrow$2=arrow$3,computePosition=(F,W,q)=>{const K=new Map,X={platform:platform$1,...q},tt={...X.platform,_c:K};return computePosition$1(F,W,{...X,platform:tt})};function t(F){return r$1(F)}function o$3(F){return F.assignedSlot?F.assignedSlot:F.parentNode instanceof ShadowRoot?F.parentNode.host:F.parentNode}function r$1(F){for(let W=F;W;W=o$3(W))if(W instanceof Element&&getComputedStyle(W).display==="none")return null;for(let W=o$3(F);W;W=o$3(W)){if(!(W instanceof Element))continue;const q=getComputedStyle(W);if(q.display!=="contents"&&(q.position!=="static"||q.filter!=="none"||W.tagName==="BODY"))return W}return null}function isVirtualElement(F){return F!==null&&typeof F=="object"&&"getBoundingClientRect"in F}var SlPopup=class extends ShoelaceElement{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const F=this.anchorEl.getBoundingClientRect(),W=this.popup.getBoundingClientRect(),q=this.placement.includes("top")||this.placement.includes("bottom");let K=0,X=0,tt=0,rt=0,ot=0,ut=0,yn=0,uo=0;q?F.top{this.reposition()}))}async stop(){return new Promise(F=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>F())):F()})}reposition(){if(!this.active||!this.anchorEl)return;const F=[offset$3({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?F.push(size({apply:({rects:q})=>{const K=this.sync==="width"||this.sync==="both",X=this.sync==="height"||this.sync==="both";this.popup.style.width=K?`${q.reference.width}px`:"",this.popup.style.height=X?`${q.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&F.push(flip$2({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&F.push(shift({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?F.push(size({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:q,availableHeight:K})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${K}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${q}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&F.push(arrow$2({element:this.arrowEl,padding:this.arrowPadding}));const W=this.strategy==="absolute"?q=>platform$1.getOffsetParent(q,t):platform$1.getOffsetParent;computePosition(this.anchorEl,this.popup,{placement:this.placement,middleware:F,strategy:this.strategy,platform:__spreadProps(__spreadValues({},platform$1),{getOffsetParent:W})}).then(({x:q,y:K,middlewareData:X,placement:tt})=>{const rt=getComputedStyle(this).direction==="rtl",ot={top:"bottom",right:"left",bottom:"top",left:"right"}[tt.split("-")[0]];if(this.setAttribute("data-current-placement",tt),Object.assign(this.popup.style,{left:`${q}px`,top:`${K}px`}),this.arrow){const ut=X.arrow.x,yn=X.arrow.y;let uo="",po="",mo="",wo="";if(this.arrowPlacement==="start"){const lf=typeof ut=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";uo=typeof yn=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",po=rt?lf:"",wo=rt?"":lf}else if(this.arrowPlacement==="end"){const lf=typeof ut=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";po=rt?"":lf,wo=rt?lf:"",mo=typeof yn=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(wo=typeof ut=="number"?"calc(50% - var(--arrow-size-diagonal))":"",uo=typeof yn=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(wo=typeof ut=="number"?`${ut}px`:"",uo=typeof yn=="number"?`${yn}px`:"");Object.assign(this.arrowEl.style,{top:uo,right:po,bottom:mo,left:wo,[ot]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge()),this.emit("sl-reposition")}render(){return x` W in F?V3(F,W,{enumerable:!0,config * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2014-2023 * @license MIT - */(function(F){(function(){var W="input is invalid type",q="finalize already called",K=typeof window=="object",X=K?window:{};X.JS_MD5_NO_WINDOW&&(K=!1);var tt=!K&&typeof self=="object",rt=!X.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;rt?X=commonjsGlobal$3:tt&&(X=self);var ot=!X.JS_MD5_NO_COMMON_JS&&!0&&F.exports,ut=!X.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",yn="0123456789abcdef".split(""),uo=[128,32768,8388608,-2147483648],po=[0,8,16,24],mo=["hex","array","digest","buffer","arrayBuffer","base64"],wo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),lf=[],yf;if(ut){var cf=new ArrayBuffer(68);yf=new Uint8Array(cf),lf=new Uint32Array(cf)}var vf=Array.isArray;(X.JS_MD5_NO_NODE_JS||!vf)&&(vf=function(kf){return Object.prototype.toString.call(kf)==="[object Array]"});var _f=ArrayBuffer.isView;ut&&(X.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!_f)&&(_f=function(kf){return typeof kf=="object"&&kf.buffer&&kf.buffer.constructor===ArrayBuffer});var $f=function(kf){var Nf=typeof kf;if(Nf==="string")return[kf,!0];if(Nf!=="object"||kf===null)throw new Error(W);if(ut&&kf.constructor===ArrayBuffer)return[new Uint8Array(kf),!1];if(!vf(kf)&&!_f(kf))throw new Error(W);return[kf,!1]},wf=function(kf){return function(Nf){return new Hf(!0).update(Nf)[kf]()}},Pf=function(){var kf=wf("hex");rt&&(kf=Cf(kf)),kf.create=function(){return new Hf},kf.update=function(Gf){return kf.create().update(Gf)};for(var Nf=0;Nf>>6,vp[ip++]=128|Gf&63):Gf<55296||Gf>=57344?(vp[ip++]=224|Gf>>>12,vp[ip++]=128|Gf>>>6&63,vp[ip++]=128|Gf&63):(Gf=65536+((Gf&1023)<<10|kf.charCodeAt(++rp)&1023),vp[ip++]=240|Gf>>>18,vp[ip++]=128|Gf>>>12&63,vp[ip++]=128|Gf>>>6&63,vp[ip++]=128|Gf&63);else for(ip=this.start;rp>>2]|=Gf<>>2]|=(192|Gf>>>6)<>>2]|=(128|Gf&63)<=57344?(yp[ip>>>2]|=(224|Gf>>>12)<>>2]|=(128|Gf>>>6&63)<>>2]|=(128|Gf&63)<>>2]|=(240|Gf>>>18)<>>2]|=(128|Gf>>>12&63)<>>2]|=(128|Gf>>>6&63)<>>2]|=(128|Gf&63)<>>2]|=kf[rp]<=64?(this.start=ip-64,this.hash(),this.hashed=!0):this.start=ip}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},Hf.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var kf=this.blocks,Nf=this.lastByteIndex;kf[Nf>>>2]|=uo[Nf&3],Nf>=56&&(this.hashed||this.hash(),kf[0]=kf[16],kf[16]=kf[1]=kf[2]=kf[3]=kf[4]=kf[5]=kf[6]=kf[7]=kf[8]=kf[9]=kf[10]=kf[11]=kf[12]=kf[13]=kf[14]=kf[15]=0),kf[14]=this.bytes<<3,kf[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Hf.prototype.hash=function(){var kf,Nf,Yf,Gf,rp,ip,ap=this.blocks;this.first?(kf=ap[0]-680876937,kf=(kf<<7|kf>>>25)-271733879<<0,Gf=(-1732584194^kf&2004318071)+ap[1]-117830708,Gf=(Gf<<12|Gf>>>20)+kf<<0,Yf=(-271733879^Gf&(kf^-271733879))+ap[2]-1126478375,Yf=(Yf<<17|Yf>>>15)+Gf<<0,Nf=(kf^Yf&(Gf^kf))+ap[3]-1316259209,Nf=(Nf<<22|Nf>>>10)+Yf<<0):(kf=this.h0,Nf=this.h1,Yf=this.h2,Gf=this.h3,kf+=(Gf^Nf&(Yf^Gf))+ap[0]-680876936,kf=(kf<<7|kf>>>25)+Nf<<0,Gf+=(Yf^kf&(Nf^Yf))+ap[1]-389564586,Gf=(Gf<<12|Gf>>>20)+kf<<0,Yf+=(Nf^Gf&(kf^Nf))+ap[2]+606105819,Yf=(Yf<<17|Yf>>>15)+Gf<<0,Nf+=(kf^Yf&(Gf^kf))+ap[3]-1044525330,Nf=(Nf<<22|Nf>>>10)+Yf<<0),kf+=(Gf^Nf&(Yf^Gf))+ap[4]-176418897,kf=(kf<<7|kf>>>25)+Nf<<0,Gf+=(Yf^kf&(Nf^Yf))+ap[5]+1200080426,Gf=(Gf<<12|Gf>>>20)+kf<<0,Yf+=(Nf^Gf&(kf^Nf))+ap[6]-1473231341,Yf=(Yf<<17|Yf>>>15)+Gf<<0,Nf+=(kf^Yf&(Gf^kf))+ap[7]-45705983,Nf=(Nf<<22|Nf>>>10)+Yf<<0,kf+=(Gf^Nf&(Yf^Gf))+ap[8]+1770035416,kf=(kf<<7|kf>>>25)+Nf<<0,Gf+=(Yf^kf&(Nf^Yf))+ap[9]-1958414417,Gf=(Gf<<12|Gf>>>20)+kf<<0,Yf+=(Nf^Gf&(kf^Nf))+ap[10]-42063,Yf=(Yf<<17|Yf>>>15)+Gf<<0,Nf+=(kf^Yf&(Gf^kf))+ap[11]-1990404162,Nf=(Nf<<22|Nf>>>10)+Yf<<0,kf+=(Gf^Nf&(Yf^Gf))+ap[12]+1804603682,kf=(kf<<7|kf>>>25)+Nf<<0,Gf+=(Yf^kf&(Nf^Yf))+ap[13]-40341101,Gf=(Gf<<12|Gf>>>20)+kf<<0,Yf+=(Nf^Gf&(kf^Nf))+ap[14]-1502002290,Yf=(Yf<<17|Yf>>>15)+Gf<<0,Nf+=(kf^Yf&(Gf^kf))+ap[15]+1236535329,Nf=(Nf<<22|Nf>>>10)+Yf<<0,kf+=(Yf^Gf&(Nf^Yf))+ap[1]-165796510,kf=(kf<<5|kf>>>27)+Nf<<0,Gf+=(Nf^Yf&(kf^Nf))+ap[6]-1069501632,Gf=(Gf<<9|Gf>>>23)+kf<<0,Yf+=(kf^Nf&(Gf^kf))+ap[11]+643717713,Yf=(Yf<<14|Yf>>>18)+Gf<<0,Nf+=(Gf^kf&(Yf^Gf))+ap[0]-373897302,Nf=(Nf<<20|Nf>>>12)+Yf<<0,kf+=(Yf^Gf&(Nf^Yf))+ap[5]-701558691,kf=(kf<<5|kf>>>27)+Nf<<0,Gf+=(Nf^Yf&(kf^Nf))+ap[10]+38016083,Gf=(Gf<<9|Gf>>>23)+kf<<0,Yf+=(kf^Nf&(Gf^kf))+ap[15]-660478335,Yf=(Yf<<14|Yf>>>18)+Gf<<0,Nf+=(Gf^kf&(Yf^Gf))+ap[4]-405537848,Nf=(Nf<<20|Nf>>>12)+Yf<<0,kf+=(Yf^Gf&(Nf^Yf))+ap[9]+568446438,kf=(kf<<5|kf>>>27)+Nf<<0,Gf+=(Nf^Yf&(kf^Nf))+ap[14]-1019803690,Gf=(Gf<<9|Gf>>>23)+kf<<0,Yf+=(kf^Nf&(Gf^kf))+ap[3]-187363961,Yf=(Yf<<14|Yf>>>18)+Gf<<0,Nf+=(Gf^kf&(Yf^Gf))+ap[8]+1163531501,Nf=(Nf<<20|Nf>>>12)+Yf<<0,kf+=(Yf^Gf&(Nf^Yf))+ap[13]-1444681467,kf=(kf<<5|kf>>>27)+Nf<<0,Gf+=(Nf^Yf&(kf^Nf))+ap[2]-51403784,Gf=(Gf<<9|Gf>>>23)+kf<<0,Yf+=(kf^Nf&(Gf^kf))+ap[7]+1735328473,Yf=(Yf<<14|Yf>>>18)+Gf<<0,Nf+=(Gf^kf&(Yf^Gf))+ap[12]-1926607734,Nf=(Nf<<20|Nf>>>12)+Yf<<0,rp=Nf^Yf,kf+=(rp^Gf)+ap[5]-378558,kf=(kf<<4|kf>>>28)+Nf<<0,Gf+=(rp^kf)+ap[8]-2022574463,Gf=(Gf<<11|Gf>>>21)+kf<<0,ip=Gf^kf,Yf+=(ip^Nf)+ap[11]+1839030562,Yf=(Yf<<16|Yf>>>16)+Gf<<0,Nf+=(ip^Yf)+ap[14]-35309556,Nf=(Nf<<23|Nf>>>9)+Yf<<0,rp=Nf^Yf,kf+=(rp^Gf)+ap[1]-1530992060,kf=(kf<<4|kf>>>28)+Nf<<0,Gf+=(rp^kf)+ap[4]+1272893353,Gf=(Gf<<11|Gf>>>21)+kf<<0,ip=Gf^kf,Yf+=(ip^Nf)+ap[7]-155497632,Yf=(Yf<<16|Yf>>>16)+Gf<<0,Nf+=(ip^Yf)+ap[10]-1094730640,Nf=(Nf<<23|Nf>>>9)+Yf<<0,rp=Nf^Yf,kf+=(rp^Gf)+ap[13]+681279174,kf=(kf<<4|kf>>>28)+Nf<<0,Gf+=(rp^kf)+ap[0]-358537222,Gf=(Gf<<11|Gf>>>21)+kf<<0,ip=Gf^kf,Yf+=(ip^Nf)+ap[3]-722521979,Yf=(Yf<<16|Yf>>>16)+Gf<<0,Nf+=(ip^Yf)+ap[6]+76029189,Nf=(Nf<<23|Nf>>>9)+Yf<<0,rp=Nf^Yf,kf+=(rp^Gf)+ap[9]-640364487,kf=(kf<<4|kf>>>28)+Nf<<0,Gf+=(rp^kf)+ap[12]-421815835,Gf=(Gf<<11|Gf>>>21)+kf<<0,ip=Gf^kf,Yf+=(ip^Nf)+ap[15]+530742520,Yf=(Yf<<16|Yf>>>16)+Gf<<0,Nf+=(ip^Yf)+ap[2]-995338651,Nf=(Nf<<23|Nf>>>9)+Yf<<0,kf+=(Yf^(Nf|~Gf))+ap[0]-198630844,kf=(kf<<6|kf>>>26)+Nf<<0,Gf+=(Nf^(kf|~Yf))+ap[7]+1126891415,Gf=(Gf<<10|Gf>>>22)+kf<<0,Yf+=(kf^(Gf|~Nf))+ap[14]-1416354905,Yf=(Yf<<15|Yf>>>17)+Gf<<0,Nf+=(Gf^(Yf|~kf))+ap[5]-57434055,Nf=(Nf<<21|Nf>>>11)+Yf<<0,kf+=(Yf^(Nf|~Gf))+ap[12]+1700485571,kf=(kf<<6|kf>>>26)+Nf<<0,Gf+=(Nf^(kf|~Yf))+ap[3]-1894986606,Gf=(Gf<<10|Gf>>>22)+kf<<0,Yf+=(kf^(Gf|~Nf))+ap[10]-1051523,Yf=(Yf<<15|Yf>>>17)+Gf<<0,Nf+=(Gf^(Yf|~kf))+ap[1]-2054922799,Nf=(Nf<<21|Nf>>>11)+Yf<<0,kf+=(Yf^(Nf|~Gf))+ap[8]+1873313359,kf=(kf<<6|kf>>>26)+Nf<<0,Gf+=(Nf^(kf|~Yf))+ap[15]-30611744,Gf=(Gf<<10|Gf>>>22)+kf<<0,Yf+=(kf^(Gf|~Nf))+ap[6]-1560198380,Yf=(Yf<<15|Yf>>>17)+Gf<<0,Nf+=(Gf^(Yf|~kf))+ap[13]+1309151649,Nf=(Nf<<21|Nf>>>11)+Yf<<0,kf+=(Yf^(Nf|~Gf))+ap[4]-145523070,kf=(kf<<6|kf>>>26)+Nf<<0,Gf+=(Nf^(kf|~Yf))+ap[11]-1120210379,Gf=(Gf<<10|Gf>>>22)+kf<<0,Yf+=(kf^(Gf|~Nf))+ap[2]+718787259,Yf=(Yf<<15|Yf>>>17)+Gf<<0,Nf+=(Gf^(Yf|~kf))+ap[9]-343485551,Nf=(Nf<<21|Nf>>>11)+Yf<<0,this.first?(this.h0=kf+1732584193<<0,this.h1=Nf-271733879<<0,this.h2=Yf-1732584194<<0,this.h3=Gf+271733878<<0,this.first=!1):(this.h0=this.h0+kf<<0,this.h1=this.h1+Nf<<0,this.h2=this.h2+Yf<<0,this.h3=this.h3+Gf<<0)},Hf.prototype.hex=function(){this.finalize();var kf=this.h0,Nf=this.h1,Yf=this.h2,Gf=this.h3;return yn[kf>>>4&15]+yn[kf&15]+yn[kf>>>12&15]+yn[kf>>>8&15]+yn[kf>>>20&15]+yn[kf>>>16&15]+yn[kf>>>28&15]+yn[kf>>>24&15]+yn[Nf>>>4&15]+yn[Nf&15]+yn[Nf>>>12&15]+yn[Nf>>>8&15]+yn[Nf>>>20&15]+yn[Nf>>>16&15]+yn[Nf>>>28&15]+yn[Nf>>>24&15]+yn[Yf>>>4&15]+yn[Yf&15]+yn[Yf>>>12&15]+yn[Yf>>>8&15]+yn[Yf>>>20&15]+yn[Yf>>>16&15]+yn[Yf>>>28&15]+yn[Yf>>>24&15]+yn[Gf>>>4&15]+yn[Gf&15]+yn[Gf>>>12&15]+yn[Gf>>>8&15]+yn[Gf>>>20&15]+yn[Gf>>>16&15]+yn[Gf>>>28&15]+yn[Gf>>>24&15]},Hf.prototype.toString=Hf.prototype.hex,Hf.prototype.digest=function(){this.finalize();var kf=this.h0,Nf=this.h1,Yf=this.h2,Gf=this.h3;return[kf&255,kf>>>8&255,kf>>>16&255,kf>>>24&255,Nf&255,Nf>>>8&255,Nf>>>16&255,Nf>>>24&255,Yf&255,Yf>>>8&255,Yf>>>16&255,Yf>>>24&255,Gf&255,Gf>>>8&255,Gf>>>16&255,Gf>>>24&255]},Hf.prototype.array=Hf.prototype.digest,Hf.prototype.arrayBuffer=function(){this.finalize();var kf=new ArrayBuffer(16),Nf=new Uint32Array(kf);return Nf[0]=this.h0,Nf[1]=this.h1,Nf[2]=this.h2,Nf[3]=this.h3,kf},Hf.prototype.buffer=Hf.prototype.arrayBuffer,Hf.prototype.base64=function(){for(var kf,Nf,Yf,Gf="",rp=this.array(),ip=0;ip<15;)kf=rp[ip++],Nf=rp[ip++],Yf=rp[ip++],Gf+=wo[kf>>>2]+wo[(kf<<4|Nf>>>4)&63]+wo[(Nf<<2|Yf>>>6)&63]+wo[Yf&63];return kf=rp[ip],Gf+=wo[kf>>>2]+wo[kf<<4&63]+"==",Gf};function Df(kf,Nf){var Yf,Gf=$f(kf);if(kf=Gf[0],Gf[1]){var rp=[],ip=kf.length,ap=0,yp;for(Yf=0;Yf>>6,rp[ap++]=128|yp&63):yp<55296||yp>=57344?(rp[ap++]=224|yp>>>12,rp[ap++]=128|yp>>>6&63,rp[ap++]=128|yp&63):(yp=65536+((yp&1023)<<10|kf.charCodeAt(++Yf)&1023),rp[ap++]=240|yp>>>18,rp[ap++]=128|yp>>>12&63,rp[ap++]=128|yp>>>6&63,rp[ap++]=128|yp&63);kf=rp}kf.length>64&&(kf=new Hf(!0).update(kf).array());var vp=[],Np=[];for(Yf=0;Yf<64;++Yf){var jp=kf[Yf]||0;vp[Yf]=92^jp,Np[Yf]=54^jp}Hf.call(this,Nf),this.update(Np),this.oKeyPad=vp,this.inner=!0,this.sharedMemory=Nf}Df.prototype=new Hf,Df.prototype.finalize=function(){if(Hf.prototype.finalize.call(this),this.inner){this.inner=!1;var kf=this.array();Hf.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(kf),Hf.prototype.finalize.call(this)}};var Lf=Pf();Lf.md5=Lf,Lf.md5.hmac=Bf(),ot?F.exports=Lf:X.md5=Lf})()})(md5);var md5Exports=md5.exports;/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function isNothing$1(F){return typeof F>"u"||F===null}function isObject$o(F){return typeof F=="object"&&F!==null}function toArray$6(F){return Array.isArray(F)?F:isNothing$1(F)?[]:[F]}function extend$7(F,W){var q,K,X,tt;if(W)for(tt=Object.keys(W),q=0,K=tt.length;q>>6,vp[ip++]=128|Gf&63):Gf<55296||Gf>=57344?(vp[ip++]=224|Gf>>>12,vp[ip++]=128|Gf>>>6&63,vp[ip++]=128|Gf&63):(Gf=65536+((Gf&1023)<<10|kf.charCodeAt(++rp)&1023),vp[ip++]=240|Gf>>>18,vp[ip++]=128|Gf>>>12&63,vp[ip++]=128|Gf>>>6&63,vp[ip++]=128|Gf&63);else for(ip=this.start;rp>>2]|=Gf<>>2]|=(192|Gf>>>6)<>>2]|=(128|Gf&63)<=57344?(yp[ip>>>2]|=(224|Gf>>>12)<>>2]|=(128|Gf>>>6&63)<>>2]|=(128|Gf&63)<>>2]|=(240|Gf>>>18)<>>2]|=(128|Gf>>>12&63)<>>2]|=(128|Gf>>>6&63)<>>2]|=(128|Gf&63)<>>2]|=kf[rp]<=64?(this.start=ip-64,this.hash(),this.hashed=!0):this.start=ip}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},Hf.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var kf=this.blocks,Nf=this.lastByteIndex;kf[Nf>>>2]|=uo[Nf&3],Nf>=56&&(this.hashed||this.hash(),kf[0]=kf[16],kf[16]=kf[1]=kf[2]=kf[3]=kf[4]=kf[5]=kf[6]=kf[7]=kf[8]=kf[9]=kf[10]=kf[11]=kf[12]=kf[13]=kf[14]=kf[15]=0),kf[14]=this.bytes<<3,kf[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Hf.prototype.hash=function(){var kf,Nf,Yf,Gf,rp,ip,ap=this.blocks;this.first?(kf=ap[0]-680876937,kf=(kf<<7|kf>>>25)-271733879<<0,Gf=(-1732584194^kf&2004318071)+ap[1]-117830708,Gf=(Gf<<12|Gf>>>20)+kf<<0,Yf=(-271733879^Gf&(kf^-271733879))+ap[2]-1126478375,Yf=(Yf<<17|Yf>>>15)+Gf<<0,Nf=(kf^Yf&(Gf^kf))+ap[3]-1316259209,Nf=(Nf<<22|Nf>>>10)+Yf<<0):(kf=this.h0,Nf=this.h1,Yf=this.h2,Gf=this.h3,kf+=(Gf^Nf&(Yf^Gf))+ap[0]-680876936,kf=(kf<<7|kf>>>25)+Nf<<0,Gf+=(Yf^kf&(Nf^Yf))+ap[1]-389564586,Gf=(Gf<<12|Gf>>>20)+kf<<0,Yf+=(Nf^Gf&(kf^Nf))+ap[2]+606105819,Yf=(Yf<<17|Yf>>>15)+Gf<<0,Nf+=(kf^Yf&(Gf^kf))+ap[3]-1044525330,Nf=(Nf<<22|Nf>>>10)+Yf<<0),kf+=(Gf^Nf&(Yf^Gf))+ap[4]-176418897,kf=(kf<<7|kf>>>25)+Nf<<0,Gf+=(Yf^kf&(Nf^Yf))+ap[5]+1200080426,Gf=(Gf<<12|Gf>>>20)+kf<<0,Yf+=(Nf^Gf&(kf^Nf))+ap[6]-1473231341,Yf=(Yf<<17|Yf>>>15)+Gf<<0,Nf+=(kf^Yf&(Gf^kf))+ap[7]-45705983,Nf=(Nf<<22|Nf>>>10)+Yf<<0,kf+=(Gf^Nf&(Yf^Gf))+ap[8]+1770035416,kf=(kf<<7|kf>>>25)+Nf<<0,Gf+=(Yf^kf&(Nf^Yf))+ap[9]-1958414417,Gf=(Gf<<12|Gf>>>20)+kf<<0,Yf+=(Nf^Gf&(kf^Nf))+ap[10]-42063,Yf=(Yf<<17|Yf>>>15)+Gf<<0,Nf+=(kf^Yf&(Gf^kf))+ap[11]-1990404162,Nf=(Nf<<22|Nf>>>10)+Yf<<0,kf+=(Gf^Nf&(Yf^Gf))+ap[12]+1804603682,kf=(kf<<7|kf>>>25)+Nf<<0,Gf+=(Yf^kf&(Nf^Yf))+ap[13]-40341101,Gf=(Gf<<12|Gf>>>20)+kf<<0,Yf+=(Nf^Gf&(kf^Nf))+ap[14]-1502002290,Yf=(Yf<<17|Yf>>>15)+Gf<<0,Nf+=(kf^Yf&(Gf^kf))+ap[15]+1236535329,Nf=(Nf<<22|Nf>>>10)+Yf<<0,kf+=(Yf^Gf&(Nf^Yf))+ap[1]-165796510,kf=(kf<<5|kf>>>27)+Nf<<0,Gf+=(Nf^Yf&(kf^Nf))+ap[6]-1069501632,Gf=(Gf<<9|Gf>>>23)+kf<<0,Yf+=(kf^Nf&(Gf^kf))+ap[11]+643717713,Yf=(Yf<<14|Yf>>>18)+Gf<<0,Nf+=(Gf^kf&(Yf^Gf))+ap[0]-373897302,Nf=(Nf<<20|Nf>>>12)+Yf<<0,kf+=(Yf^Gf&(Nf^Yf))+ap[5]-701558691,kf=(kf<<5|kf>>>27)+Nf<<0,Gf+=(Nf^Yf&(kf^Nf))+ap[10]+38016083,Gf=(Gf<<9|Gf>>>23)+kf<<0,Yf+=(kf^Nf&(Gf^kf))+ap[15]-660478335,Yf=(Yf<<14|Yf>>>18)+Gf<<0,Nf+=(Gf^kf&(Yf^Gf))+ap[4]-405537848,Nf=(Nf<<20|Nf>>>12)+Yf<<0,kf+=(Yf^Gf&(Nf^Yf))+ap[9]+568446438,kf=(kf<<5|kf>>>27)+Nf<<0,Gf+=(Nf^Yf&(kf^Nf))+ap[14]-1019803690,Gf=(Gf<<9|Gf>>>23)+kf<<0,Yf+=(kf^Nf&(Gf^kf))+ap[3]-187363961,Yf=(Yf<<14|Yf>>>18)+Gf<<0,Nf+=(Gf^kf&(Yf^Gf))+ap[8]+1163531501,Nf=(Nf<<20|Nf>>>12)+Yf<<0,kf+=(Yf^Gf&(Nf^Yf))+ap[13]-1444681467,kf=(kf<<5|kf>>>27)+Nf<<0,Gf+=(Nf^Yf&(kf^Nf))+ap[2]-51403784,Gf=(Gf<<9|Gf>>>23)+kf<<0,Yf+=(kf^Nf&(Gf^kf))+ap[7]+1735328473,Yf=(Yf<<14|Yf>>>18)+Gf<<0,Nf+=(Gf^kf&(Yf^Gf))+ap[12]-1926607734,Nf=(Nf<<20|Nf>>>12)+Yf<<0,rp=Nf^Yf,kf+=(rp^Gf)+ap[5]-378558,kf=(kf<<4|kf>>>28)+Nf<<0,Gf+=(rp^kf)+ap[8]-2022574463,Gf=(Gf<<11|Gf>>>21)+kf<<0,ip=Gf^kf,Yf+=(ip^Nf)+ap[11]+1839030562,Yf=(Yf<<16|Yf>>>16)+Gf<<0,Nf+=(ip^Yf)+ap[14]-35309556,Nf=(Nf<<23|Nf>>>9)+Yf<<0,rp=Nf^Yf,kf+=(rp^Gf)+ap[1]-1530992060,kf=(kf<<4|kf>>>28)+Nf<<0,Gf+=(rp^kf)+ap[4]+1272893353,Gf=(Gf<<11|Gf>>>21)+kf<<0,ip=Gf^kf,Yf+=(ip^Nf)+ap[7]-155497632,Yf=(Yf<<16|Yf>>>16)+Gf<<0,Nf+=(ip^Yf)+ap[10]-1094730640,Nf=(Nf<<23|Nf>>>9)+Yf<<0,rp=Nf^Yf,kf+=(rp^Gf)+ap[13]+681279174,kf=(kf<<4|kf>>>28)+Nf<<0,Gf+=(rp^kf)+ap[0]-358537222,Gf=(Gf<<11|Gf>>>21)+kf<<0,ip=Gf^kf,Yf+=(ip^Nf)+ap[3]-722521979,Yf=(Yf<<16|Yf>>>16)+Gf<<0,Nf+=(ip^Yf)+ap[6]+76029189,Nf=(Nf<<23|Nf>>>9)+Yf<<0,rp=Nf^Yf,kf+=(rp^Gf)+ap[9]-640364487,kf=(kf<<4|kf>>>28)+Nf<<0,Gf+=(rp^kf)+ap[12]-421815835,Gf=(Gf<<11|Gf>>>21)+kf<<0,ip=Gf^kf,Yf+=(ip^Nf)+ap[15]+530742520,Yf=(Yf<<16|Yf>>>16)+Gf<<0,Nf+=(ip^Yf)+ap[2]-995338651,Nf=(Nf<<23|Nf>>>9)+Yf<<0,kf+=(Yf^(Nf|~Gf))+ap[0]-198630844,kf=(kf<<6|kf>>>26)+Nf<<0,Gf+=(Nf^(kf|~Yf))+ap[7]+1126891415,Gf=(Gf<<10|Gf>>>22)+kf<<0,Yf+=(kf^(Gf|~Nf))+ap[14]-1416354905,Yf=(Yf<<15|Yf>>>17)+Gf<<0,Nf+=(Gf^(Yf|~kf))+ap[5]-57434055,Nf=(Nf<<21|Nf>>>11)+Yf<<0,kf+=(Yf^(Nf|~Gf))+ap[12]+1700485571,kf=(kf<<6|kf>>>26)+Nf<<0,Gf+=(Nf^(kf|~Yf))+ap[3]-1894986606,Gf=(Gf<<10|Gf>>>22)+kf<<0,Yf+=(kf^(Gf|~Nf))+ap[10]-1051523,Yf=(Yf<<15|Yf>>>17)+Gf<<0,Nf+=(Gf^(Yf|~kf))+ap[1]-2054922799,Nf=(Nf<<21|Nf>>>11)+Yf<<0,kf+=(Yf^(Nf|~Gf))+ap[8]+1873313359,kf=(kf<<6|kf>>>26)+Nf<<0,Gf+=(Nf^(kf|~Yf))+ap[15]-30611744,Gf=(Gf<<10|Gf>>>22)+kf<<0,Yf+=(kf^(Gf|~Nf))+ap[6]-1560198380,Yf=(Yf<<15|Yf>>>17)+Gf<<0,Nf+=(Gf^(Yf|~kf))+ap[13]+1309151649,Nf=(Nf<<21|Nf>>>11)+Yf<<0,kf+=(Yf^(Nf|~Gf))+ap[4]-145523070,kf=(kf<<6|kf>>>26)+Nf<<0,Gf+=(Nf^(kf|~Yf))+ap[11]-1120210379,Gf=(Gf<<10|Gf>>>22)+kf<<0,Yf+=(kf^(Gf|~Nf))+ap[2]+718787259,Yf=(Yf<<15|Yf>>>17)+Gf<<0,Nf+=(Gf^(Yf|~kf))+ap[9]-343485551,Nf=(Nf<<21|Nf>>>11)+Yf<<0,this.first?(this.h0=kf+1732584193<<0,this.h1=Nf-271733879<<0,this.h2=Yf-1732584194<<0,this.h3=Gf+271733878<<0,this.first=!1):(this.h0=this.h0+kf<<0,this.h1=this.h1+Nf<<0,this.h2=this.h2+Yf<<0,this.h3=this.h3+Gf<<0)},Hf.prototype.hex=function(){this.finalize();var kf=this.h0,Nf=this.h1,Yf=this.h2,Gf=this.h3;return yn[kf>>>4&15]+yn[kf&15]+yn[kf>>>12&15]+yn[kf>>>8&15]+yn[kf>>>20&15]+yn[kf>>>16&15]+yn[kf>>>28&15]+yn[kf>>>24&15]+yn[Nf>>>4&15]+yn[Nf&15]+yn[Nf>>>12&15]+yn[Nf>>>8&15]+yn[Nf>>>20&15]+yn[Nf>>>16&15]+yn[Nf>>>28&15]+yn[Nf>>>24&15]+yn[Yf>>>4&15]+yn[Yf&15]+yn[Yf>>>12&15]+yn[Yf>>>8&15]+yn[Yf>>>20&15]+yn[Yf>>>16&15]+yn[Yf>>>28&15]+yn[Yf>>>24&15]+yn[Gf>>>4&15]+yn[Gf&15]+yn[Gf>>>12&15]+yn[Gf>>>8&15]+yn[Gf>>>20&15]+yn[Gf>>>16&15]+yn[Gf>>>28&15]+yn[Gf>>>24&15]},Hf.prototype.toString=Hf.prototype.hex,Hf.prototype.digest=function(){this.finalize();var kf=this.h0,Nf=this.h1,Yf=this.h2,Gf=this.h3;return[kf&255,kf>>>8&255,kf>>>16&255,kf>>>24&255,Nf&255,Nf>>>8&255,Nf>>>16&255,Nf>>>24&255,Yf&255,Yf>>>8&255,Yf>>>16&255,Yf>>>24&255,Gf&255,Gf>>>8&255,Gf>>>16&255,Gf>>>24&255]},Hf.prototype.array=Hf.prototype.digest,Hf.prototype.arrayBuffer=function(){this.finalize();var kf=new ArrayBuffer(16),Nf=new Uint32Array(kf);return Nf[0]=this.h0,Nf[1]=this.h1,Nf[2]=this.h2,Nf[3]=this.h3,kf},Hf.prototype.buffer=Hf.prototype.arrayBuffer,Hf.prototype.base64=function(){for(var kf,Nf,Yf,Gf="",rp=this.array(),ip=0;ip<15;)kf=rp[ip++],Nf=rp[ip++],Yf=rp[ip++],Gf+=wo[kf>>>2]+wo[(kf<<4|Nf>>>4)&63]+wo[(Nf<<2|Yf>>>6)&63]+wo[Yf&63];return kf=rp[ip],Gf+=wo[kf>>>2]+wo[kf<<4&63]+"==",Gf};function Df(kf,Nf){var Yf,Gf=$f(kf);if(kf=Gf[0],Gf[1]){var rp=[],ip=kf.length,ap=0,yp;for(Yf=0;Yf>>6,rp[ap++]=128|yp&63):yp<55296||yp>=57344?(rp[ap++]=224|yp>>>12,rp[ap++]=128|yp>>>6&63,rp[ap++]=128|yp&63):(yp=65536+((yp&1023)<<10|kf.charCodeAt(++Yf)&1023),rp[ap++]=240|yp>>>18,rp[ap++]=128|yp>>>12&63,rp[ap++]=128|yp>>>6&63,rp[ap++]=128|yp&63);kf=rp}kf.length>64&&(kf=new Hf(!0).update(kf).array());var vp=[],Np=[];for(Yf=0;Yf<64;++Yf){var jp=kf[Yf]||0;vp[Yf]=92^jp,Np[Yf]=54^jp}Hf.call(this,Nf),this.update(Np),this.oKeyPad=vp,this.inner=!0,this.sharedMemory=Nf}Df.prototype=new Hf,Df.prototype.finalize=function(){if(Hf.prototype.finalize.call(this),this.inner){this.inner=!1;var kf=this.array();Hf.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(kf),Hf.prototype.finalize.call(this)}};var Lf=Af();Lf.md5=Lf,Lf.md5.hmac=Bf(),ot?F.exports=Lf:X.md5=Lf})()})(md5);var md5Exports=md5.exports;/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function isNothing$1(F){return typeof F>"u"||F===null}function isObject$o(F){return typeof F=="object"&&F!==null}function toArray$6(F){return Array.isArray(F)?F:isNothing$1(F)?[]:[F]}function extend$7(F,W){var q,K,X,tt;if(W)for(tt=Object.keys(W),q=0,K=tt.length;qot&&(tt=" ... ",W=K-ot+tt.length),q-K>ot&&(rt=" ...",q=K+ot-rt.length),{str:tt+F.slice(W,q).replace(/\t/g,"→")+rt,pos:K-W+tt.length}}function padStart$1(F,W){return common$3.repeat(" ",W-F.length)+F}function makeSnippet$1(F,W){if(W=Object.create(W||null),!F.buffer)return null;W.maxLength||(W.maxLength=79),typeof W.indent!="number"&&(W.indent=1),typeof W.linesBefore!="number"&&(W.linesBefore=3),typeof W.linesAfter!="number"&&(W.linesAfter=2);for(var q=/\r?\n|\r|\0/g,K=[0],X=[],tt,rt=-1;tt=q.exec(F.buffer);)X.push(tt.index),K.push(tt.index+tt[0].length),F.position<=tt.index&&rt<0&&(rt=K.length-2);rt<0&&(rt=K.length-1);var ot="",ut,yn,uo=Math.min(F.line+W.linesAfter,X.length).toString().length,po=W.maxLength-(W.indent+uo+3);for(ut=1;ut<=W.linesBefore&&!(rt-ut<0);ut++)yn=getLine$1(F.buffer,K[rt-ut],X[rt-ut],F.position-(K[rt]-K[rt-ut]),po),ot=common$3.repeat(" ",W.indent)+padStart$1((F.line-ut+1).toString(),uo)+" | "+yn.str+` `+ot;for(yn=getLine$1(F.buffer,K[rt],X[rt],F.position,po),ot+=common$3.repeat(" ",W.indent)+padStart$1((F.line+1).toString(),uo)+" | "+yn.str+` @@ -2983,7 +2983,7 @@ var V3=Object.defineProperty;var G3=(F,W,q)=>W in F?V3(F,W,{enumerable:!0,config * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2014-2024 * @license MIT - */(function(F){(function(){var W="input is invalid type",q=typeof window=="object",K=q?window:{};K.JS_SHA256_NO_WINDOW&&(q=!1);var X=!q&&typeof self=="object",tt=!K.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;tt?K=commonjsGlobal$3:X&&(K=self);var rt=!K.JS_SHA256_NO_COMMON_JS&&!0&&F.exports,ot=!K.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",ut="0123456789abcdef".split(""),yn=[-2147483648,8388608,32768,128],uo=[24,16,8,0],po=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],mo=["hex","array","digest","arrayBuffer"],wo=[];(K.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(Cf){return Object.prototype.toString.call(Cf)==="[object Array]"}),ot&&(K.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(Cf){return typeof Cf=="object"&&Cf.buffer&&Cf.buffer.constructor===ArrayBuffer});var lf=function(Cf,Af){return function(Bf){return new $f(Af,!0).update(Bf)[Cf]()}},yf=function(Cf){var Af=lf("hex",Cf);tt&&(Af=cf(Af,Cf)),Af.create=function(){return new $f(Cf)},Af.update=function(Df){return Af.create().update(Df)};for(var Bf=0;Bf>>2]|=Cf[Df]<>>2]|=Hf<>>2]|=(192|Hf>>>6)<>>2]|=(128|Hf&63)<=57344?(Nf[Lf>>>2]|=(224|Hf>>>12)<>>2]|=(128|Hf>>>6&63)<>>2]|=(128|Hf&63)<>>2]|=(240|Hf>>>18)<>>2]|=(128|Hf>>>12&63)<>>2]|=(128|Hf>>>6&63)<>>2]|=(128|Hf&63)<=64?(this.block=Nf[16],this.start=Lf-64,this.hash(),this.hashed=!0):this.start=Lf}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},$f.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var Cf=this.blocks,Af=this.lastByteIndex;Cf[16]=this.block,Cf[Af>>>2]|=yn[Af&3],this.block=Cf[16],Af>=56&&(this.hashed||this.hash(),Cf[0]=this.block,Cf[16]=Cf[1]=Cf[2]=Cf[3]=Cf[4]=Cf[5]=Cf[6]=Cf[7]=Cf[8]=Cf[9]=Cf[10]=Cf[11]=Cf[12]=Cf[13]=Cf[14]=Cf[15]=0),Cf[14]=this.hBytes<<3|this.bytes>>>29,Cf[15]=this.bytes<<3,this.hash()}},$f.prototype.hash=function(){var Cf=this.h0,Af=this.h1,Bf=this.h2,Hf=this.h3,Df=this.h4,Lf=this.h5,kf=this.h6,Nf=this.h7,Yf=this.blocks,Gf,rp,ip,ap,yp,vp,Np,jp,Ip,Jp,ng;for(Gf=16;Gf<64;++Gf)yp=Yf[Gf-15],rp=(yp>>>7|yp<<25)^(yp>>>18|yp<<14)^yp>>>3,yp=Yf[Gf-2],ip=(yp>>>17|yp<<15)^(yp>>>19|yp<<13)^yp>>>10,Yf[Gf]=Yf[Gf-16]+rp+Yf[Gf-7]+ip<<0;for(ng=Af&Bf,Gf=0;Gf<64;Gf+=4)this.first?(this.is224?(jp=300032,yp=Yf[0]-1413257819,Nf=yp-150054599<<0,Hf=yp+24177077<<0):(jp=704751109,yp=Yf[0]-210244248,Nf=yp-1521486534<<0,Hf=yp+143694565<<0),this.first=!1):(rp=(Cf>>>2|Cf<<30)^(Cf>>>13|Cf<<19)^(Cf>>>22|Cf<<10),ip=(Df>>>6|Df<<26)^(Df>>>11|Df<<21)^(Df>>>25|Df<<7),jp=Cf&Af,ap=jp^Cf&Bf^ng,Np=Df&Lf^~Df&kf,yp=Nf+ip+Np+po[Gf]+Yf[Gf],vp=rp+ap,Nf=Hf+yp<<0,Hf=yp+vp<<0),rp=(Hf>>>2|Hf<<30)^(Hf>>>13|Hf<<19)^(Hf>>>22|Hf<<10),ip=(Nf>>>6|Nf<<26)^(Nf>>>11|Nf<<21)^(Nf>>>25|Nf<<7),Ip=Hf&Cf,ap=Ip^Hf&Af^jp,Np=Nf&Df^~Nf&Lf,yp=kf+ip+Np+po[Gf+1]+Yf[Gf+1],vp=rp+ap,kf=Bf+yp<<0,Bf=yp+vp<<0,rp=(Bf>>>2|Bf<<30)^(Bf>>>13|Bf<<19)^(Bf>>>22|Bf<<10),ip=(kf>>>6|kf<<26)^(kf>>>11|kf<<21)^(kf>>>25|kf<<7),Jp=Bf&Hf,ap=Jp^Bf&Cf^Ip,Np=kf&Nf^~kf&Df,yp=Lf+ip+Np+po[Gf+2]+Yf[Gf+2],vp=rp+ap,Lf=Af+yp<<0,Af=yp+vp<<0,rp=(Af>>>2|Af<<30)^(Af>>>13|Af<<19)^(Af>>>22|Af<<10),ip=(Lf>>>6|Lf<<26)^(Lf>>>11|Lf<<21)^(Lf>>>25|Lf<<7),ng=Af&Bf,ap=ng^Af&Hf^Jp,Np=Lf&kf^~Lf&Nf,yp=Df+ip+Np+po[Gf+3]+Yf[Gf+3],vp=rp+ap,Df=Cf+yp<<0,Cf=yp+vp<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+Cf<<0,this.h1=this.h1+Af<<0,this.h2=this.h2+Bf<<0,this.h3=this.h3+Hf<<0,this.h4=this.h4+Df<<0,this.h5=this.h5+Lf<<0,this.h6=this.h6+kf<<0,this.h7=this.h7+Nf<<0},$f.prototype.hex=function(){this.finalize();var Cf=this.h0,Af=this.h1,Bf=this.h2,Hf=this.h3,Df=this.h4,Lf=this.h5,kf=this.h6,Nf=this.h7,Yf=ut[Cf>>>28&15]+ut[Cf>>>24&15]+ut[Cf>>>20&15]+ut[Cf>>>16&15]+ut[Cf>>>12&15]+ut[Cf>>>8&15]+ut[Cf>>>4&15]+ut[Cf&15]+ut[Af>>>28&15]+ut[Af>>>24&15]+ut[Af>>>20&15]+ut[Af>>>16&15]+ut[Af>>>12&15]+ut[Af>>>8&15]+ut[Af>>>4&15]+ut[Af&15]+ut[Bf>>>28&15]+ut[Bf>>>24&15]+ut[Bf>>>20&15]+ut[Bf>>>16&15]+ut[Bf>>>12&15]+ut[Bf>>>8&15]+ut[Bf>>>4&15]+ut[Bf&15]+ut[Hf>>>28&15]+ut[Hf>>>24&15]+ut[Hf>>>20&15]+ut[Hf>>>16&15]+ut[Hf>>>12&15]+ut[Hf>>>8&15]+ut[Hf>>>4&15]+ut[Hf&15]+ut[Df>>>28&15]+ut[Df>>>24&15]+ut[Df>>>20&15]+ut[Df>>>16&15]+ut[Df>>>12&15]+ut[Df>>>8&15]+ut[Df>>>4&15]+ut[Df&15]+ut[Lf>>>28&15]+ut[Lf>>>24&15]+ut[Lf>>>20&15]+ut[Lf>>>16&15]+ut[Lf>>>12&15]+ut[Lf>>>8&15]+ut[Lf>>>4&15]+ut[Lf&15]+ut[kf>>>28&15]+ut[kf>>>24&15]+ut[kf>>>20&15]+ut[kf>>>16&15]+ut[kf>>>12&15]+ut[kf>>>8&15]+ut[kf>>>4&15]+ut[kf&15];return this.is224||(Yf+=ut[Nf>>>28&15]+ut[Nf>>>24&15]+ut[Nf>>>20&15]+ut[Nf>>>16&15]+ut[Nf>>>12&15]+ut[Nf>>>8&15]+ut[Nf>>>4&15]+ut[Nf&15]),Yf},$f.prototype.toString=$f.prototype.hex,$f.prototype.digest=function(){this.finalize();var Cf=this.h0,Af=this.h1,Bf=this.h2,Hf=this.h3,Df=this.h4,Lf=this.h5,kf=this.h6,Nf=this.h7,Yf=[Cf>>>24&255,Cf>>>16&255,Cf>>>8&255,Cf&255,Af>>>24&255,Af>>>16&255,Af>>>8&255,Af&255,Bf>>>24&255,Bf>>>16&255,Bf>>>8&255,Bf&255,Hf>>>24&255,Hf>>>16&255,Hf>>>8&255,Hf&255,Df>>>24&255,Df>>>16&255,Df>>>8&255,Df&255,Lf>>>24&255,Lf>>>16&255,Lf>>>8&255,Lf&255,kf>>>24&255,kf>>>16&255,kf>>>8&255,kf&255];return this.is224||Yf.push(Nf>>>24&255,Nf>>>16&255,Nf>>>8&255,Nf&255),Yf},$f.prototype.array=$f.prototype.digest,$f.prototype.arrayBuffer=function(){this.finalize();var Cf=new ArrayBuffer(this.is224?28:32),Af=new DataView(Cf);return Af.setUint32(0,this.h0),Af.setUint32(4,this.h1),Af.setUint32(8,this.h2),Af.setUint32(12,this.h3),Af.setUint32(16,this.h4),Af.setUint32(20,this.h5),Af.setUint32(24,this.h6),this.is224||Af.setUint32(28,this.h7),Cf};function wf(Cf,Af,Bf){var Hf,Df=typeof Cf;if(Df==="string"){var Lf=[],kf=Cf.length,Nf=0,Yf;for(Hf=0;Hf>>6,Lf[Nf++]=128|Yf&63):Yf<55296||Yf>=57344?(Lf[Nf++]=224|Yf>>>12,Lf[Nf++]=128|Yf>>>6&63,Lf[Nf++]=128|Yf&63):(Yf=65536+((Yf&1023)<<10|Cf.charCodeAt(++Hf)&1023),Lf[Nf++]=240|Yf>>>18,Lf[Nf++]=128|Yf>>>12&63,Lf[Nf++]=128|Yf>>>6&63,Lf[Nf++]=128|Yf&63);Cf=Lf}else if(Df==="object"){if(Cf===null)throw new Error(W);if(ot&&Cf.constructor===ArrayBuffer)Cf=new Uint8Array(Cf);else if(!Array.isArray(Cf)&&(!ot||!ArrayBuffer.isView(Cf)))throw new Error(W)}else throw new Error(W);Cf.length>64&&(Cf=new $f(Af,!0).update(Cf).array());var Gf=[],rp=[];for(Hf=0;Hf<64;++Hf){var ip=Cf[Hf]||0;Gf[Hf]=92^ip,rp[Hf]=54^ip}$f.call(this,Af,Bf),this.update(rp),this.oKeyPad=Gf,this.inner=!0,this.sharedMemory=Bf}wf.prototype=new $f,wf.prototype.finalize=function(){if($f.prototype.finalize.call(this),this.inner){this.inner=!1;var Cf=this.array();$f.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(Cf),$f.prototype.finalize.call(this)}};var Pf=yf();Pf.sha256=Pf,Pf.sha224=yf(!0),Pf.sha256.hmac=_f(),Pf.sha224.hmac=_f(!0),rt?F.exports=Pf:(K.sha256=Pf.sha256,K.sha224=Pf.sha224)})()})(sha256$1);var sha256Exports=sha256$1.exports;const window$1=globalThis.window;let options=load$2(window$1.options);var _P;const iiifServer=((_P=options==null?void 0:options.defaults)==null?void 0:_P.iiifServer)||"iiif.mdpress.io";function sha256(F){return sha256Exports.sha256(F)}function isQid(F){return/^Q\d+$/.test(F)}function kebabToCamel(F){return F.replace(/-([a-z])/g,function(W){return W[1].toUpperCase()})}function Md5(F){return md5Exports.md5(F)}function isMobile$1(){return"ontouchstart"in document.documentElement&&/mobi/i.test(navigator.userAgent)}window$1.entityData={};window$1.pendingEntityData=new Set;window$1.customEntityAliases={};async function getEntityData(F,W="en"){W=W||"en";let q=new Set(F.filter(X=>window$1.entityData[X]));new Set(F.filter(X=>window$1.pendingEntityData.has(X)));let K=F.filter(X=>!q.has(X));if(K.length>0){Array.from(K).forEach(ot=>window$1.pendingEntityData.add(ot));let tt=` + */(function(F){(function(){var W="input is invalid type",q=typeof window=="object",K=q?window:{};K.JS_SHA256_NO_WINDOW&&(q=!1);var X=!q&&typeof self=="object",tt=!K.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;tt?K=commonjsGlobal$3:X&&(K=self);var rt=!K.JS_SHA256_NO_COMMON_JS&&!0&&F.exports,ot=!K.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",ut="0123456789abcdef".split(""),yn=[-2147483648,8388608,32768,128],uo=[24,16,8,0],po=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],mo=["hex","array","digest","arrayBuffer"],wo=[];(K.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(Cf){return Object.prototype.toString.call(Cf)==="[object Array]"}),ot&&(K.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(Cf){return typeof Cf=="object"&&Cf.buffer&&Cf.buffer.constructor===ArrayBuffer});var lf=function(Cf,Pf){return function(Bf){return new $f(Pf,!0).update(Bf)[Cf]()}},yf=function(Cf){var Pf=lf("hex",Cf);tt&&(Pf=cf(Pf,Cf)),Pf.create=function(){return new $f(Cf)},Pf.update=function(Df){return Pf.create().update(Df)};for(var Bf=0;Bf>>2]|=Cf[Df]<>>2]|=Hf<>>2]|=(192|Hf>>>6)<>>2]|=(128|Hf&63)<=57344?(Nf[Lf>>>2]|=(224|Hf>>>12)<>>2]|=(128|Hf>>>6&63)<>>2]|=(128|Hf&63)<>>2]|=(240|Hf>>>18)<>>2]|=(128|Hf>>>12&63)<>>2]|=(128|Hf>>>6&63)<>>2]|=(128|Hf&63)<=64?(this.block=Nf[16],this.start=Lf-64,this.hash(),this.hashed=!0):this.start=Lf}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},$f.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var Cf=this.blocks,Pf=this.lastByteIndex;Cf[16]=this.block,Cf[Pf>>>2]|=yn[Pf&3],this.block=Cf[16],Pf>=56&&(this.hashed||this.hash(),Cf[0]=this.block,Cf[16]=Cf[1]=Cf[2]=Cf[3]=Cf[4]=Cf[5]=Cf[6]=Cf[7]=Cf[8]=Cf[9]=Cf[10]=Cf[11]=Cf[12]=Cf[13]=Cf[14]=Cf[15]=0),Cf[14]=this.hBytes<<3|this.bytes>>>29,Cf[15]=this.bytes<<3,this.hash()}},$f.prototype.hash=function(){var Cf=this.h0,Pf=this.h1,Bf=this.h2,Hf=this.h3,Df=this.h4,Lf=this.h5,kf=this.h6,Nf=this.h7,Yf=this.blocks,Gf,rp,ip,ap,yp,vp,Np,jp,Ip,Jp,ng;for(Gf=16;Gf<64;++Gf)yp=Yf[Gf-15],rp=(yp>>>7|yp<<25)^(yp>>>18|yp<<14)^yp>>>3,yp=Yf[Gf-2],ip=(yp>>>17|yp<<15)^(yp>>>19|yp<<13)^yp>>>10,Yf[Gf]=Yf[Gf-16]+rp+Yf[Gf-7]+ip<<0;for(ng=Pf&Bf,Gf=0;Gf<64;Gf+=4)this.first?(this.is224?(jp=300032,yp=Yf[0]-1413257819,Nf=yp-150054599<<0,Hf=yp+24177077<<0):(jp=704751109,yp=Yf[0]-210244248,Nf=yp-1521486534<<0,Hf=yp+143694565<<0),this.first=!1):(rp=(Cf>>>2|Cf<<30)^(Cf>>>13|Cf<<19)^(Cf>>>22|Cf<<10),ip=(Df>>>6|Df<<26)^(Df>>>11|Df<<21)^(Df>>>25|Df<<7),jp=Cf&Pf,ap=jp^Cf&Bf^ng,Np=Df&Lf^~Df&kf,yp=Nf+ip+Np+po[Gf]+Yf[Gf],vp=rp+ap,Nf=Hf+yp<<0,Hf=yp+vp<<0),rp=(Hf>>>2|Hf<<30)^(Hf>>>13|Hf<<19)^(Hf>>>22|Hf<<10),ip=(Nf>>>6|Nf<<26)^(Nf>>>11|Nf<<21)^(Nf>>>25|Nf<<7),Ip=Hf&Cf,ap=Ip^Hf&Pf^jp,Np=Nf&Df^~Nf&Lf,yp=kf+ip+Np+po[Gf+1]+Yf[Gf+1],vp=rp+ap,kf=Bf+yp<<0,Bf=yp+vp<<0,rp=(Bf>>>2|Bf<<30)^(Bf>>>13|Bf<<19)^(Bf>>>22|Bf<<10),ip=(kf>>>6|kf<<26)^(kf>>>11|kf<<21)^(kf>>>25|kf<<7),Jp=Bf&Hf,ap=Jp^Bf&Cf^Ip,Np=kf&Nf^~kf&Df,yp=Lf+ip+Np+po[Gf+2]+Yf[Gf+2],vp=rp+ap,Lf=Pf+yp<<0,Pf=yp+vp<<0,rp=(Pf>>>2|Pf<<30)^(Pf>>>13|Pf<<19)^(Pf>>>22|Pf<<10),ip=(Lf>>>6|Lf<<26)^(Lf>>>11|Lf<<21)^(Lf>>>25|Lf<<7),ng=Pf&Bf,ap=ng^Pf&Hf^Jp,Np=Lf&kf^~Lf&Nf,yp=Df+ip+Np+po[Gf+3]+Yf[Gf+3],vp=rp+ap,Df=Cf+yp<<0,Cf=yp+vp<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+Cf<<0,this.h1=this.h1+Pf<<0,this.h2=this.h2+Bf<<0,this.h3=this.h3+Hf<<0,this.h4=this.h4+Df<<0,this.h5=this.h5+Lf<<0,this.h6=this.h6+kf<<0,this.h7=this.h7+Nf<<0},$f.prototype.hex=function(){this.finalize();var Cf=this.h0,Pf=this.h1,Bf=this.h2,Hf=this.h3,Df=this.h4,Lf=this.h5,kf=this.h6,Nf=this.h7,Yf=ut[Cf>>>28&15]+ut[Cf>>>24&15]+ut[Cf>>>20&15]+ut[Cf>>>16&15]+ut[Cf>>>12&15]+ut[Cf>>>8&15]+ut[Cf>>>4&15]+ut[Cf&15]+ut[Pf>>>28&15]+ut[Pf>>>24&15]+ut[Pf>>>20&15]+ut[Pf>>>16&15]+ut[Pf>>>12&15]+ut[Pf>>>8&15]+ut[Pf>>>4&15]+ut[Pf&15]+ut[Bf>>>28&15]+ut[Bf>>>24&15]+ut[Bf>>>20&15]+ut[Bf>>>16&15]+ut[Bf>>>12&15]+ut[Bf>>>8&15]+ut[Bf>>>4&15]+ut[Bf&15]+ut[Hf>>>28&15]+ut[Hf>>>24&15]+ut[Hf>>>20&15]+ut[Hf>>>16&15]+ut[Hf>>>12&15]+ut[Hf>>>8&15]+ut[Hf>>>4&15]+ut[Hf&15]+ut[Df>>>28&15]+ut[Df>>>24&15]+ut[Df>>>20&15]+ut[Df>>>16&15]+ut[Df>>>12&15]+ut[Df>>>8&15]+ut[Df>>>4&15]+ut[Df&15]+ut[Lf>>>28&15]+ut[Lf>>>24&15]+ut[Lf>>>20&15]+ut[Lf>>>16&15]+ut[Lf>>>12&15]+ut[Lf>>>8&15]+ut[Lf>>>4&15]+ut[Lf&15]+ut[kf>>>28&15]+ut[kf>>>24&15]+ut[kf>>>20&15]+ut[kf>>>16&15]+ut[kf>>>12&15]+ut[kf>>>8&15]+ut[kf>>>4&15]+ut[kf&15];return this.is224||(Yf+=ut[Nf>>>28&15]+ut[Nf>>>24&15]+ut[Nf>>>20&15]+ut[Nf>>>16&15]+ut[Nf>>>12&15]+ut[Nf>>>8&15]+ut[Nf>>>4&15]+ut[Nf&15]),Yf},$f.prototype.toString=$f.prototype.hex,$f.prototype.digest=function(){this.finalize();var Cf=this.h0,Pf=this.h1,Bf=this.h2,Hf=this.h3,Df=this.h4,Lf=this.h5,kf=this.h6,Nf=this.h7,Yf=[Cf>>>24&255,Cf>>>16&255,Cf>>>8&255,Cf&255,Pf>>>24&255,Pf>>>16&255,Pf>>>8&255,Pf&255,Bf>>>24&255,Bf>>>16&255,Bf>>>8&255,Bf&255,Hf>>>24&255,Hf>>>16&255,Hf>>>8&255,Hf&255,Df>>>24&255,Df>>>16&255,Df>>>8&255,Df&255,Lf>>>24&255,Lf>>>16&255,Lf>>>8&255,Lf&255,kf>>>24&255,kf>>>16&255,kf>>>8&255,kf&255];return this.is224||Yf.push(Nf>>>24&255,Nf>>>16&255,Nf>>>8&255,Nf&255),Yf},$f.prototype.array=$f.prototype.digest,$f.prototype.arrayBuffer=function(){this.finalize();var Cf=new ArrayBuffer(this.is224?28:32),Pf=new DataView(Cf);return Pf.setUint32(0,this.h0),Pf.setUint32(4,this.h1),Pf.setUint32(8,this.h2),Pf.setUint32(12,this.h3),Pf.setUint32(16,this.h4),Pf.setUint32(20,this.h5),Pf.setUint32(24,this.h6),this.is224||Pf.setUint32(28,this.h7),Cf};function xf(Cf,Pf,Bf){var Hf,Df=typeof Cf;if(Df==="string"){var Lf=[],kf=Cf.length,Nf=0,Yf;for(Hf=0;Hf>>6,Lf[Nf++]=128|Yf&63):Yf<55296||Yf>=57344?(Lf[Nf++]=224|Yf>>>12,Lf[Nf++]=128|Yf>>>6&63,Lf[Nf++]=128|Yf&63):(Yf=65536+((Yf&1023)<<10|Cf.charCodeAt(++Hf)&1023),Lf[Nf++]=240|Yf>>>18,Lf[Nf++]=128|Yf>>>12&63,Lf[Nf++]=128|Yf>>>6&63,Lf[Nf++]=128|Yf&63);Cf=Lf}else if(Df==="object"){if(Cf===null)throw new Error(W);if(ot&&Cf.constructor===ArrayBuffer)Cf=new Uint8Array(Cf);else if(!Array.isArray(Cf)&&(!ot||!ArrayBuffer.isView(Cf)))throw new Error(W)}else throw new Error(W);Cf.length>64&&(Cf=new $f(Pf,!0).update(Cf).array());var Gf=[],rp=[];for(Hf=0;Hf<64;++Hf){var ip=Cf[Hf]||0;Gf[Hf]=92^ip,rp[Hf]=54^ip}$f.call(this,Pf,Bf),this.update(rp),this.oKeyPad=Gf,this.inner=!0,this.sharedMemory=Bf}xf.prototype=new $f,xf.prototype.finalize=function(){if($f.prototype.finalize.call(this),this.inner){this.inner=!1;var Cf=this.array();$f.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(Cf),$f.prototype.finalize.call(this)}};var Af=yf();Af.sha256=Af,Af.sha224=yf(!0),Af.sha256.hmac=_f(),Af.sha224.hmac=_f(!0),rt?F.exports=Af:(K.sha256=Af.sha256,K.sha224=Af.sha224)})()})(sha256$1);var sha256Exports=sha256$1.exports;const window$1=globalThis.window;let options=load$2(window$1.options);var _P;const iiifServer=((_P=options==null?void 0:options.defaults)==null?void 0:_P.iiifServer)||"iiif.mdpress.io";function sha256(F){return sha256Exports.sha256(F)}function isQid(F){return/^Q\d+$/.test(F)}function kebabToCamel(F){return F.replace(/-([a-z])/g,function(W){return W[1].toUpperCase()})}function Md5(F){return md5Exports.md5(F)}function isMobile(){return"ontouchstart"in document.documentElement&&/mobi/i.test(navigator.userAgent)}window$1.entityData={};window$1.pendingEntityData=new Set;window$1.customEntityAliases={};async function getEntityData(F,W="en"){W=W||"en";let q=new Set(F.filter(X=>window$1.entityData[X]));new Set(F.filter(X=>window$1.pendingEntityData.has(X)));let K=F.filter(X=>!q.has(X));if(K.length>0){Array.from(K).forEach(ot=>window$1.pendingEntityData.add(ot));let tt=` SELECT ?item ?label ?description ?alias ?image ?logoImage ?coords ?pageBanner ?whosOnFirst ?wikipedia WHERE { VALUES (?item) { ${K.map(ot=>`()`).join(" ")} } ?item rdfs:label ?label . @@ -2997,15 +2997,15 @@ var V3=Object.defineProperty;var G3=(F,W,q)=>W in F?V3(F,W,{enumerable:!0,config OPTIONAL { ?item wdt:P6766 ?whosOnFirst . } OPTIONAL { ?wikipedia schema:about ?item; schema:isPartOf . } }`,rt=await fetch("https://query.wikidata.org/sparql",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/sparql-results+json"},body:`query=${encodeURIComponent(tt)}`});if(rt.ok)return(await rt.json()).results.bindings.forEach(async ut=>{let yn=ut.item.value.split("/").pop(),uo=window$1.entityData[yn];uo?ut.alias&&uo.aliases.push(ut.alias.value):(uo={id:yn,label:ut.label.value},ut.description&&(uo.description=ut.description.value),ut.alias&&(uo.aliases=[ut.alias.value],window$1.customEntityAliases[yn]&&(uo.aliases=[...window$1.customEntityAliases[yn],...uo.aliases])),ut.coords&&(uo.coords=ut.coords.value.slice(6,-1).split(" ").reverse().join(",")),ut.wikipedia&&(uo.wikipedia=ut.wikipedia.value),ut.pageBanner&&(uo.pageBanner=ut.pageBanner.value),ut.image&&(uo.image=ut.image.value,uo.thumbnail=mwImage(ut.image.value,300)),ut.logoImage&&(uo.logoImage=ut.logoImage.value,uo.thumbnail||(uo.thumbnail=mwImage(ut.logoImage.value,300))),ut.whosOnFirst&&(uo.geojson=whosOnFirstUrl(ut.whosOnFirst.value)),window$1.entityData[yn]=uo)}),Array.from(K).forEach(ut=>window$1.pendingEntityData.delete(ut)),Object.fromEntries(F.filter(ut=>window$1.entityData[ut]).map(ut=>[ut,window$1.entityData[ut]]))}return Object.fromEntries(F.filter(X=>window$1.entityData[X]).map(X=>[X,window$1.entityData[X]]))}function mwImage(F,W=0){F=(Array.isArray(F)?F[0]:F).replace(/Special:FilePath\//,"File:").split("File:").pop(),F=decodeURIComponent(F).replace(/ /g,"_");const q=md5Exports.md5(F),K=F.split(".").pop();let X=`https://upload.wikimedia.org/wikipedia/commons${W?"/thumb":""}`;return X+=`/${q.slice(0,1)}/${q.slice(0,2)}/${F}`,W>0&&(X+=`/${W}px-${F}`,K==="svg"?X+=".png":(K==="tif"||K==="tiff")&&(X+=".jpg")),X}function whosOnFirstUrl(F){let W=[];for(let q=0;q{let{x:X,y:tt,w:rt,h:ot}=W,{width:ut,height:yn}=q,uo=new Image;uo.crossOrigin="anonymous",X=X?X/100:0,tt=tt?tt/100:0,rt=rt?rt/100:0,ot=ot?ot/100:0,uo.onload=()=>{let po=uo.width,mo=uo.height,wo=rt>0?po*rt:po-po*X,lf=ot>0?mo*ot:mo-mo*tt,yf=wo/lf;yf>1?yn=ut/yf:ut=yn*yf;const cf=document.createElement("canvas"),vf=cf.getContext("2d");cf.width=ut,cf.height=yn,X=X*po,tt=tt*mo,vf==null||vf.drawImage(uo,X,tt,wo,lf,0,0,ut,yn);let _f=cf.toDataURL();K(_f)},uo.src=F})}async function getEntity(F,W="en"){return(await getEntityData([F],W))[F]}function _findItems(F,W,q=[]){if(q=q||[],W.items)for(let K=0;KX[rt]&&X[rt]!==ot)?q.push(X):_findItems(F,X,q)}return q}function findItem(F,W,q=1){const K=_findItems(F,W);return K.length>=q?K[q-1]:null}function getItemInfo(F,W=1){return findItem({type:"Annotation",motivation:"painting"},F,W).body}function parseImageOptions(F){let W=(F==null?void 0:F.split("/"))||[],q="full",K="full",X="0",tt="default",rt="jpg",ot=0;return{region:W.length>ot&&W[ot]?W[ot]:q,size:W.length>ot+1&&W[ot+1]?W[ot+1]:K,rotation:W.length>ot+2&&W[ot+2]?W[ot+2]:X,quality:W.length>ot+3&&W[ot+3]?W[ot+3]:tt,format:W.length>ot+4&&W[ot+4]?W[ot+4]:rt}}const _manifestCache={};async function loadManifests(F,W=!1){let q=F.map(X=>X.indexOf("http")===0?X:`https://${iiifServer}/${X}/manifest.json`),K=q.filter(X=>!_manifestCache[X]);if(K.length>0){let X=K.map(ot=>(W&&["localhost",iiifServer].includes(new URL(ot).hostname)&&(ot+="?refresh"),fetch(ot).catch(ut=>{console.error(ut)}))),tt=await Promise.all(X),rt=await Promise.all(tt.map(ot=>ot==null?void 0:ot.json()));if(X=rt.filter(ot=>ot&&ot["@context"]).filter(ot=>!Array.isArray(ot["@context"])&&parseFloat(ot["@context"].split("/").slice(-2,-1).pop())<3).map(ot=>fetch(`https://${iiifServer}/prezi2to3/`,{method:"POST",body:JSON.stringify(ot)})),X.length>0){tt=await Promise.all(X);let ot=await Promise.all(tt.map(ut=>ut.json()));for(let ut=0;ut(po.id||po["@id"])===yn);uo&&(rt[ut]=uo)}}return rt.forEach((ot,ut)=>_manifestCache[K[ut]]=ot),q.map(ot=>_manifestCache[ot])}else return q.map(X=>_manifestCache[X])}async function getManifest(F,W=!1){let q=F.indexOf("http")===0?F:`https://${iiifServer}/${F}/manifest.json`;return(await loadManifests([q],W))[0]}const _hoisted_1$u=["src","play","alt"],_sfc_main$x=defineComponent({__name:"AnimatedImage.ce",props:{autoplay:{type:Boolean,default:!1},caption:{type:String},height:{type:String},src:{type:String,required:!0},width:{type:String}},setup(F){const W=F,q=ref(null),K=ref(null),X=ref(0),tt=ref(0),rt=ref();onMounted(()=>{var yn;rt.value=W.src.indexOf("wc:")===0?ut(W.src.slice(3)):W.src,W.width&&(X.value=Number(W.width)),W.height&&(tt.value=Number(W.height)),!W.width&&!W.height&&(X.value=((yn=q.value)==null?void 0:yn.clientWidth)||0),(!W.width||!W.height)&&ot(rt.value).then(uo=>{X.value?tt.value=Math.round(X.value/uo.aspect_ratio):X.value=uo.width,tt.value?X.value=Math.round(tt.value*uo.aspect_ratio):tt.value=uo.height})});async function ot(yn){return new Promise((uo,po)=>{let mo=new Image;mo.onload=()=>{uo({width:mo.width,height:mo.height,aspect_ratio:Number((mo.width/mo.height).toFixed(4))})},mo.onerror=()=>po(),mo.src=yn})}function ut(yn){yn=decodeURIComponent(yn).replace(/ /g,"_");const uo=Md5(yn);let po="https://upload.wikimedia.org/wikipedia/commons";return po+=`/${uo.slice(0,1)}/${uo.slice(0,2)}/${yn}`,po}return(yn,uo)=>(openBlock(),createElementBlock("div",{ref_key:"main",ref:q,class:"main"},[createBaseVNode("sl-animated-image",{src:rt.value,play:W.autoplay,alt:F.caption,style:normalizeStyle({width:`${X.value}px`,height:`${tt.value}px`})},null,12,_hoisted_1$u),F.caption?(openBlock(),createElementBlock("div",{key:0,ref_key:"captionEl",ref:K,class:"caption"},toDisplayString(F.caption),513)):createCommentVNode("",!0)],512))}}),_style_0$u=`*{box-sizing:border-box}.main{display:flex;flex-direction:column;width:100%;height:100%}.caption{padding:.3em;width:100%;font-size:1em;font-weight:500;text-align:left;margin-bottom:.3em;line-height:1.3} -`,_export_sfc=(F,W)=>{const q=F.__vccOpts||F;for(const[K,X]of W)q[K]=X;return q},AnimatedImage=_export_sfc(_sfc_main$x,[["styles",[_style_0$u]]]),_sfc_main$w=defineComponent({__name:"Annotate.ce",setup(F){return onMounted(()=>{let W=Array.from(document.querySelectorAll("script")).find(q=>q.src.includes("hypothes.is"));W||(W=document.createElement("script"),W.src="https://hypothes.is/embed.js",W.async=!0,document.body.appendChild(W))}),(W,q)=>null}});window.customEntityData={};const mode=location.hostname==="localhost"?"local":location.hostname.indexOf("github.io")>0&&location.pathname.indexOf("/juncture/")===0?"dev":"prod",isMobile="ontouchstart"in document.documentElement&&/mobi/i.test(navigator.userAgent);function addLink(F){console.log("addLink",F);let W=document.createElement("link");Object.entries(F).map(([q,K])=>W.setAttribute(q,K)),document.head.appendChild(W)}function addScript(F){console.log("addScript",F);let W=document.createElement("script");Object.entries(F).map(([q,K])=>W.setAttribute(q,K)),document.head.appendChild(W)}function docReady(F){document.readyState==="complete"||document.readyState==="interactive"?setTimeout(F,1):document.addEventListener("DOMContentLoaded",F)}const classes=new Set("left right full sticky".split(" ")),components={"ve-animated-image":{booleans:"autoplay",positional:"src caption"},"ve-audio":{booleans:"autoplay muted no-caption sync",positional:"src caption"},"ve-breadcrumbs":{},"ve-compare":{positional:"src"},"ve-entities":{booleans:"cards"},"ve-footer":{},"ve-gallery":{booleans:"caption"},"ve-header":{booleans:"breadcrumbs no-manifest-popover pdf-download-enabled",positional:"title background subtitle options position"},"ve-iframe":{booleans:"allow-full-screen allow-transparency full left right sticky",positional:"src caption"},"ve-image":{booleans:"no-caption grid static repo-is-writable zoom-on-scroll",positional:"src caption"},"ve-knightlab-timeline":{booleans:"has-bookmark"},"ve-map":{booleans:"cards full left marker prefer-geojson popup-on-hover zoom-on-scroll zoom-on-click",positional:"center caption"},"ve-media":{positional:"src caption"},"ve-menu":{booleans:"pdf-download-enabled"},"ve-mermaid":{},"ve-meta":{},"ve-plant-specimen":{booleans:"full left right sticky",positional:"qid max"},"ve-snippet":{},"ve-video":{booleans:"autoplay muted no-caption sync",positional:"src caption"},"ve-visjs":{booleans:"hierarchical"}};let tagMap={};Object.entries(components).forEach(([F,W])=>{let q={booleans:new Set((W.booleans||"").split(" ").filter(K=>K)),positional:(W.positional||"").split(" ").filter(K=>K)};tagMap[F]=q,tagMap[F.slice(3)]=q});function parseHeadline(F){var X;let W=[];F=F.replace(/”/g,'"').replace(/”/g,'"').replace(/’/g,"'"),(X=F==null?void 0:F.match(/[^\s"]+|"([^"]*)"/gmi))==null||X.filter(tt=>tt).forEach(tt=>{W.length>0&&W[W.length-1].indexOf("=")===W[W.length-1].length-1?W[W.length-1]=`${W[W.length-1]}${tt}`:W.push(tt)});let q={},K=0;for(;K/g,"_").replace(/<\/em>/g,"_");if(tt.indexOf("=")>0&&/^[\w-:]+=/.test(tt)){let rt=tt.indexOf("="),ot=tt.slice(0,rt),ut=tt.slice(rt+1);ut=ut[0]==='"'&&ut[ut.length-1]==='"'?ut.slice(1,-1):ut,ot[0]===":"?(ot=camelToKebab(ot.slice(1)),q.style||(q.style={}),q.style[ot]=ut):(q.kwargs||(q.kwargs={}),q.kwargs[ot]?q.kwargs[ot]+=` ${ut}`:q.kwargs[ot]=ut)}else if(tt[0]==="."||classes.has(tt)){let rt=tt.replace(/^\./,"");q.class?q.class+=` ${rt}`:q.class=rt}else if(tt[0]==='"')q.args||(q.args=[]),q.args.push(tt.slice(1,-1));else if(/#\w+/.test(tt))q.id=tt.slice(1);else if(/^Q\d+$/.test(tt)&&!q.tag)q.entities||(q.entities=[]),q.entities.push(tt);else if(K===0&&!q.tag&&tagMap[tt.replace(/^\./,"")]){let rt=tt.replace(/^\./,"");q.tag=rt.indexOf("ve-")===0?rt:`ve-${rt}`}else if(tt==="script"||tt==="link")q.tag=tt;else if(q.tag==="script"&&!q.src)q.src=tt;else if(q.tag==="link"&&!q.href)q.href=tt;else{let rt=tagMap[q.tag];rt!=null&&rt.booleans.has(tt)?(q.booleans||(q.booleans=[]),q.booleans.push(tt)):(q.args||(q.args=[]),q.args.push(tt))}K++}if(q.tag&&q.args){let tt=tagMap[q.tag],rt=[];q.args.forEach((ot,ut)=>{var yn;if(ut>=((yn=tt.positional)==null?void 0:yn.length))rt.push(ot);else{let uo=tt.positional[ut];ot=ot[0]==='"'&&ot[ot.length-1]==='"'?ot.slice(1,-1):ot,q.kwargs||(q.kwargs={}),q.kwargs[uo]?q.kwargs[uo]+=` ${ot}`:q.kwargs[uo]=ot}}),rt.length?q.args=rt:delete q.args}return q}function parseCodeEl(F){var K;let W=((K=F.textContent)==null?void 0:K.replace(/\s+\|\s+/g,` +`,_export_sfc=(F,W)=>{const q=F.__vccOpts||F;for(const[K,X]of W)q[K]=X;return q},AnimatedImage=_export_sfc(_sfc_main$x,[["styles",[_style_0$u]]]),_sfc_main$w=defineComponent({__name:"Annotate.ce",setup(F){return onMounted(()=>{let W=Array.from(document.querySelectorAll("script")).find(q=>q.src.includes("hypothes.is"));W||(W=document.createElement("script"),W.src="https://hypothes.is/embed.js",W.async=!0,document.body.appendChild(W))}),(W,q)=>null}}),classes=new Set("left right full sticky".split(" ")),components={"ve-animated-image":{booleans:"autoplay",positional:"src caption"},"ve-audio":{booleans:"autoplay muted no-caption sync",positional:"src caption"},"ve-breadcrumbs":{},"ve-compare":{positional:"src"},"ve-entities":{booleans:"cards"},"ve-footer":{},"ve-gallery":{booleans:"caption"},"ve-header":{booleans:"breadcrumbs no-manifest-popover pdf-download-enabled",positional:"title background subtitle options position"},"ve-iframe":{booleans:"allow-full-screen allow-transparency full left right sticky",positional:"src caption"},"ve-image":{booleans:"no-caption grid static repo-is-writable zoom-on-scroll",positional:"src caption"},"ve-knightlab-timeline":{booleans:"has-bookmark"},"ve-map":{booleans:"cards full left marker prefer-geojson popup-on-hover zoom-on-scroll zoom-on-click",positional:"center caption"},"ve-media":{positional:"src caption"},"ve-menu":{booleans:"pdf-download-enabled"},"ve-mermaid":{},"ve-meta":{},"ve-plant-specimen":{booleans:"full left right sticky",positional:"qid max"},"ve-snippet":{},"ve-video":{booleans:"autoplay muted no-caption sync",positional:"src caption"},"ve-visjs":{booleans:"hierarchical"}};let tagMap={};Object.entries(components).forEach(([F,W])=>{let q={booleans:new Set((W.booleans||"").split(" ").filter(K=>K)),positional:(W.positional||"").split(" ").filter(K=>K)};tagMap[F]=q,tagMap[F.slice(3)]=q});function parseHeadline(F){var X;let W=[];F=F.replace(/”/g,'"').replace(/”/g,'"').replace(/’/g,"'"),(X=F==null?void 0:F.match(/[^\s"]+|"([^"]*)"/gmi))==null||X.filter(tt=>tt).forEach(tt=>{W.length>0&&W[W.length-1].indexOf("=")===W[W.length-1].length-1?W[W.length-1]=`${W[W.length-1]}${tt}`:W.push(tt)});let q={},K=0;for(;K/g,"_").replace(/<\/em>/g,"_");if(tt.indexOf("=")>0&&/^[\w-:]+=/.test(tt)){let rt=tt.indexOf("="),ot=tt.slice(0,rt),ut=tt.slice(rt+1);ut=ut[0]==='"'&&ut[ut.length-1]==='"'?ut.slice(1,-1):ut,ot[0]===":"?(ot=camelToKebab(ot.slice(1)),q.style||(q.style={}),q.style[ot]=ut):(q.kwargs||(q.kwargs={}),q.kwargs[ot]?q.kwargs[ot]+=` ${ut}`:q.kwargs[ot]=ut)}else if(tt[0]==="."||classes.has(tt)){let rt=tt.replace(/^\./,"");q.class?q.class+=` ${rt}`:q.class=rt}else if(tt[0]==='"')q.args||(q.args=[]),q.args.push(tt.slice(1,-1));else if(/#\w+/.test(tt))q.id=tt.slice(1);else if(/^Q\d+$/.test(tt)&&!q.tag)q.entities||(q.entities=[]),q.entities.push(tt);else if(K===0&&!q.tag&&tagMap[tt.replace(/^\./,"")]){let rt=tt.replace(/^\./,"");q.tag=rt.indexOf("ve-")===0?rt:`ve-${rt}`}else if(tt==="script"||tt==="link")q.tag=tt;else if(q.tag==="script"&&!q.src)q.src=tt;else if(q.tag==="link"&&!q.href)q.href=tt;else{let rt=tagMap[q.tag];rt!=null&&rt.booleans.has(tt)?(q.booleans||(q.booleans=[]),q.booleans.push(tt)):(q.args||(q.args=[]),q.args.push(tt))}K++}if(q.tag&&q.args){let tt=tagMap[q.tag],rt=[];q.args.forEach((ot,ut)=>{var yn;if(ut>=((yn=tt.positional)==null?void 0:yn.length))rt.push(ot);else{let uo=tt.positional[ut];ot=ot[0]==='"'&&ot[ot.length-1]==='"'?ot.slice(1,-1):ot,q.kwargs||(q.kwargs={}),q.kwargs[uo]?q.kwargs[uo]+=` ${ot}`:q.kwargs[uo]=ot}}),rt.length?q.args=rt:delete q.args}return q}function parseCodeEl(F){var K;let W=((K=F.textContent)==null?void 0:K.replace(/\s+\|\s+/g,` `).split(` `).map(X=>X.trim()).filter(X=>X))||[],q=parseHeadline(W==null?void 0:W[0])||{};return q.tag==="ve-mermaid"?q.raw=F.textContent.split(` `).slice(1).join(` `):q.tag==="ve-media"?q.tag="ve-image":q.tag==="ve-vis-network"?q.tag="ve-visjs":W.length>1&&(q.args=q.args?[...q.args,...W.slice(1)]:W.slice(1)),q}function makeEl(F){let W=document.createElement(F.tag);if(F.id&&(W.id=F.id),F.class&&F.class.split(" ").forEach(q=>W.classList.add(q)),F.style&&W.setAttribute("style",Object.entries(F.style).map(([q,K])=>`${q}:${K}`).join(";")),F.entities&&W.setAttribute("entities",F.entities.join(" ")),F.kwargs)for(const[q,K]of Object.entries(F.kwargs))W.setAttribute(q,K===!0?"":K);if(F.booleans&&F.booleans.forEach(q=>W.setAttribute(q,"")),F.args){let q=document.createElement("ul");W.appendChild(q);for(const K of F.args){let X=new DOMParser().parseFromString(marked$1.parse(K.replace(/^\s*-\s*/,"")),"text/html").body.firstChild,tt=document.createElement("li");tt.innerHTML=X.innerHTML.indexOf("wc:")===0?X.innerHTML.replace(/([^<]+)<\/em>/g,"_$1_"):X.innerHTML,q.appendChild(tt)}}return F.raw&&(W.textContent=F.raw),W}function deleteAllComments(F){for(var W=document.createNodeIterator(F,NodeFilter.SHOW_COMMENT,()=>NodeFilter.FILTER_ACCEPT,!1),q;q=W.nextNode();)q.remove()}function isNumeric(F){return!isNaN(F)}function camelToKebab(F){return F.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function computeDataId(F){let W=[];for(;F.parentElement;){let q=Array.from(F.parentElement.children).filter(K=>K.tagName===F.tagName);W.push(q.indexOf(F)+1),F=F.parentElement}return W.reverse().join(".")}function convertTags(F){Array.from(F.querySelectorAll("a > img")).filter(W=>W.src.indexOf("ve-button.png")>-1||W.src.indexOf("wb.svg")>-1).forEach(W=>{var q,K;return(K=(q=W==null?void 0:W.parentElement)==null?void 0:q.parentElement)==null?void 0:K.remove()}),Array.from(F.querySelectorAll("p")).filter(W=>{var q,K;return/^\.ve-\w+\S/.test(((K=(q=W.childNodes.item(0))==null?void 0:q.nodeValue)==null?void 0:K.trim())||"")}).forEach(W=>{let q=document.createElement("div"),K=document.createElement("code");q.appendChild(K),K.setAttribute("class","language-juncture2");let X=W.innerHTML.trim().slice(1).replace(/\n\s*-\s+/g,` -`).replace(/[^<]*<\/a>/g,"").replace(/^ve-media/,"ve-image");K.textContent=X,W.replaceWith(q)}),Array.from(F.querySelectorAll("param")).filter(W=>Array.from(W.attributes).filter(q=>q.name.indexOf("ve-")===0).length).filter(W=>W.getAttribute("ve-config")===null).forEach(W=>{let q=Array.from(W.attributes).find(K=>K.name.indexOf("ve-")===0).name;if(q){let K=tagMap[q]||{},X={tag:q};Array.from(W.attributes).forEach(tt=>{var rt;tt.name!==q&&((rt=K.booleans)!=null&&rt.has(tt.name)?(X.booleans||(X.booleans=[]),X.booleans.push(tt.name)):(X.kwargs||(X.kwargs={}),X.kwargs[tt.name]?X.kwargs[tt.name]+=` ${tt.value}`:X.kwargs[tt.name]=tt.value))}),isJunctureV1(F)||W.replaceWith(makeEl(X))}}),F.querySelectorAll("code").forEach(W=>{var K,X,tt,rt;let q=parseCodeEl(W);if(q.tag)W.parentElement.tagName==="PRE"&&(W=W.parentElement,W.parentElement.removeAttribute("id"),W.parentElement.removeAttribute("data-id"),W.parentElement.removeAttribute("class"),W.parentElement.parentElement&&(W.parentElement.parentElement.className="segment"),W.parentElement.tagName==="DIV"&&W.parentElement.children.length===1&&W.parentElement.replaceWith(W)),W.replaceWith(makeEl(q));else if(q.class||q.style||q.id||q.kwargs){let ot=W.parentElement,ut,yn=ot.previousElementSibling;if((yn==null?void 0:yn.tagName)==="EM"||(yn==null?void 0:yn.tagName)==="STRONG"?(ut=document.createElement("span"),ut.innerHTML=yn.innerHTML,yn.replaceWith(ut)):(parent==null?void 0:parent.tagName)==="TD"?(ut=(X=(K=parent==null?void 0:parent.parentElement)==null?void 0:K.parentElement)==null?void 0:X.parentElement,(tt=parent==null?void 0:parent.parentElement)==null||tt.remove()):(parent==null?void 0:parent.tagName)!=="UL"&&((yn==null?void 0:yn.tagName)==="A"||(yn==null?void 0:yn.tagName)==="IMG")?ut=yn:ut=yn.children.length===1&&((rt=yn.children[0])==null?void 0:rt.tagName)==="VE-HEADER"?ot.parentElement:yn,ut){if(q.id&&(ut.id=q.id),q.class&&q.class.split(" ").forEach(uo=>ut.classList.add(uo)),q.style&&ut.setAttribute("style",Object.entries(q.style).map(([uo,po])=>`${uo}:${po}`).join(";")),q.entities&&ut.setAttribute("data-entities",q.entities.join(" ")),q.kwargs)for(const[uo,po]of Object.entries(q.kwargs))ut.setAttribute(uo,po===!0?"":po)}else console.log("no target for",q);ot.remove()}})}function restructure(F){let W=F.querySelector("style");deleteAllComments(F),F.querySelectorAll("ul, ol").forEach(ut=>{let yn=ut;ut.querySelectorAll("param").forEach(uo=>{yn.parentNode.insertBefore(uo,yn.nextSibling),yn=uo})});let q=document.createElement("main");W&&q.appendChild(W.cloneNode(!0)),q.className="page-content markdown-body",q.setAttribute("aria-label","Content"),q.setAttribute("data-theme","light"),F.style&&q.setAttribute("style",F.style.cssText);let K=q,X;Array.from(F==null?void 0:F.querySelectorAll("p")).filter(ut=>{var yn,uo;return/^[#*]{1,6}$/.test(((uo=(yn=ut.childNodes.item(0))==null?void 0:yn.nodeValue)==null?void 0:uo.trim())||"")}).forEach(ut=>{var mo,wo;let yn=(mo=ut.childNodes.item(0).nodeValue)==null?void 0:mo.trim(),uo=ut.querySelector("code"),po=document.createElement(`h${yn==null?void 0:yn.length}`);if(ut.replaceWith(po),uo){let lf=document.createElement("p");lf.appendChild(uo),(wo=po.parentElement)==null||wo.insertBefore(lf,po.nextSibling)}}),Array.from(F==null?void 0:F.querySelectorAll("p, li")).filter(ut=>{var yn;return/==.+=={.+}/.test(((yn=ut.textContent)==null?void 0:yn.trim())||"")}).forEach(ut=>{let yn=[],uo=Array.from(ut.innerHTML.matchAll(/==(?[^=]+)=={(?[^}]+)}/g));uo.forEach((po,mo)=>{var wo;if(mo===0&&yn.push(ut.innerHTML.slice(0,po.index)),po.groups){let{text:lf,attrs:yf}=po.groups;if(/\s*Q\d+\s*/.test(yf))yn.push(`${lf}`);else if(yf.indexOf("=")>0){let[cf,vf]=yf.split("=");vf[0]!=='"'&&(yf=`${cf}="${vf}"`),yn.push(`${lf}`)}yn.push(ut.innerHTML.slice(po.index+po[0].length,((wo=uo[mo+1])==null?void 0:wo.index)||ut.innerHTML.length))}}),ut.innerHTML=yn.join("")}),Array.from(F==null?void 0:F.querySelectorAll("param")).filter(ut=>Array.from(ut.attributes).filter(yn=>yn.name.indexOf("ve-")===0).length===0).forEach(ut=>{let yn=ut.previousElementSibling;ut.classList.forEach(mo=>yn==null?void 0:yn.classList.add(mo));let uo=Array.from(ut.attributes).find(mo=>mo.name==="id"),po=Array.from(ut.attributes).find(mo=>mo.name==="style");(uo||po)&&(uo&&(yn==null||yn.setAttribute("id",uo.value)),po&&(yn==null||yn.setAttribute("style",po.value)),ut.remove())}),Array.from((F==null?void 0:F.children)||[]).forEach(ut=>{var yn;if(ut.tagName[0]==="H"&&isNumeric(ut.tagName.slice(1))){let uo=ut,po=parseInt(uo.tagName.slice(1));K&&Array.from(K.children).filter(lf=>!/^H\d/.test(lf.tagName)).filter(lf=>!/PARAM/.test(lf.tagName)).filter(lf=>!/STYLE/.test(lf.tagName)).filter(lf=>!/^VE--/.test(lf.tagName)).forEach((lf,yf)=>{let cf=`${K.getAttribute("data-id")||0}.${yf+1}`;lf.setAttribute("data-id",cf),lf.id=cf,lf.classList.add("segment")}),K=document.createElement("section"),K.classList.add(`section${po}`),Array.from(uo.classList).forEach(lf=>K.classList.add(lf)),uo.className="",uo.id&&(K.id=uo.id,uo.removeAttribute("id")),K.innerHTML+=uo.outerHTML;let mo=[];for(let lf=1;lfyf.parentElement.tagName==="SECTION")];let wo=po===1||mo.length===0?q:(yn=mo.pop())==null?void 0:yn.parentElement;wo==null||wo.appendChild(K),K.setAttribute("data-id",computeDataId(K))}else{if(ut.tagName!=="PARAM"){let uo=`${K.getAttribute("data-id")||0}.${K.children.length}`;ut.setAttribute("data-id",uo),ut.id=uo,ut.classList.add("segment")}ut!==X&&(K.innerHTML+=ut.outerHTML)}}),Array.from(q.querySelectorAll("a")).filter(ut=>ut.href.indexOf("mailto:")<0).forEach(ut=>{var wo,lf;let yn;try{yn=new URL(ut.href)}catch(yf){console.log(yf),console.log(ut.href);return}let uo=yn.pathname.split("/").filter(yf=>yf);if(uo.length===0)return;let po=/^Q\d+$/.test(uo[uo.length-1])?uo[uo.length-1]:null,mo=uo.find(yf=>yf[0]==="~");if(po||mo){let yf=document.createElement("ve-entity-infobox");if(yf.innerHTML=ut.innerHTML,po)yf.setAttribute("qid",po);else{let cf=(wo=window.config)!=null&&wo.baseurl&&yn.pathname.indexOf((lf=window.config)==null?void 0:lf.baseurl)===0?1:0;yf.setAttribute("file",uo.slice(cf).map(vf=>vf.replace(/~/,"")).filter(vf=>vf).join("/"))}ut.replaceWith(yf)}}),configCustomClasses(q);let tt,rt,ot=document.createElement("article");if(isJunctureV1(F)){ot.classList.add("j1");let ut=q.querySelector("param[ve-config]");tt=document.createElement("ve-header"),tt.className="sticky",Array.from((ut==null?void 0:ut.attributes)||[]).forEach(yn=>{yn.name==="banner"&&tt.setAttribute("background",yn.value),yn.name==="title"&&tt.setAttribute("title",yn.value),(yn.name==="subtitle"||yn.name==="author")&&tt.setAttribute("subtitle",yn.value)}),ot.appendChild(tt),ut==null||ut.remove()}else if(tt=q.querySelector("ve-header"),tt){let ut=tt;for(;ut.parentElement.tagName!=="MAIN";)ut=ut.parentElement;ot.appendChild(tt),ut.remove()}return ot.appendChild(q),rt=q.querySelector("ve-footer"),rt&&ot.appendChild(rt),ot}function configCustomClasses(F){let W=0;F.querySelectorAll("section").forEach(q=>{if(q.classList.contains("cards")&&!q.classList.contains("wrapper")){q.classList.remove("cards");let K=document.createElement("section");K.className="cards wrapper",Array.from(q.children).slice(1).forEach(X=>{var ut,yn;K.appendChild(X),X.classList.add("card");let tt=X.querySelector("h1, h2, h3, h4, h5, h6");tt&&tt.remove();let rt=X.querySelector("p > img");rt&&((ut=rt.parentElement)==null||ut.replaceWith(rt));let ot=X.querySelector("p > a");ot&&((yn=ot.parentElement)==null||yn.replaceWith(ot)),X.querySelectorAll("p").forEach(uo=>{++W;let po=document.createElement("div");po.className="read-more";let mo=document.createElement("input");mo.setAttribute("type","checkbox"),mo.id=`read-more-${W}`,po.appendChild(mo);let wo=document.createElement("p");wo.innerHTML=uo.innerHTML,po.appendChild(wo);let lf=document.createElement("label");lf.setAttribute("for",`read-more-${W}`),lf.setAttribute("role","button"),lf.innerHTML="More",po.appendChild(lf),uo.replaceWith(po)})}),q.appendChild(K)}if(q.classList.contains("tabs")){let K=document.createElement("sl-tab-group");Array.from(q.classList).forEach(X=>K.classList.add(X)),Array.from(q.attributes).forEach(X=>K.setAttribute(X.name,X.value)),Array.from(q.querySelectorAll(":scope > section")).forEach((X,tt)=>{var ot;let rt=document.createElement("sl-tab");rt.setAttribute("slot","nav"),rt.setAttribute("panel",`tab${tt+1}`),rt.innerHTML=((ot=X.querySelector("h1, h2, h3, h4, h5, h6"))==null?void 0:ot.innerHTML)||"",K.appendChild(rt)}),Array.from(q.querySelectorAll(":scope > section")).forEach((X,tt)=>{let rt=document.createElement("sl-tab-panel");rt.setAttribute("name",`tab${tt+1}`);let ot=Array.from(X.children).slice(1).map(ut=>ut.outerHTML).join(" ");rt.innerHTML=ot,K.appendChild(rt)}),q.replaceWith(K)}if((q.classList.contains("columns")||q.classList.contains("mcol"))&&!q.classList.contains("wrapper")){let K=document.createElement("section");K.className="columns wrapper",q.classList.remove("columns"),q.classList.remove("mcol"),Array.from(q.children).filter(X=>X.tagName==="SECTION").forEach((X,tt)=>{K.appendChild(X),X.classList.add(`col-${tt+1}`)}),q.appendChild(K)}})}function restructureForJ1(F){function W(rt){return Object.entries(rt).map(([ot,ut])=>`${ot}="${ut}"`).join(" ").replace(/“/g,""").replace(/”/g,""")}Array.from(F.querySelectorAll("[data-id]")).forEach(rt=>{if(rt.tagName==="SECTION")return;if(!rt.innerHTML.trim()){rt.remove();return}let ot=rt.getAttribute("data-id")||"",ut=document.createElement("div");ut.setAttribute("data-id",ot),ut.id=ot,ut.className=rt.className,rt.removeAttribute("id"),rt.removeAttribute("data-id"),rt.className="",ut.appendChild(rt.cloneNode(!0));let yn=document.createElement("div");yn.setAttribute("data-id",ot),yn.className="viewers";let uo=[],po=rt.nextSibling;for(;po&&po.tagName==="PARAM";)uo.push(po),po=po.nextSibling;uo.forEach(mo=>yn.appendChild(mo)),ut.appendChild(yn),rt.replaceWith(ut)}),Array.from(F.querySelectorAll("[data-id]")).forEach(rt=>{if(rt.tagName==="SECTION")return;let ot=rt.getAttribute("data-id")||"",ut=rt.querySelector("p, ol, ul"),yn=rt.querySelector(".viewers");if(!yn)return;const uo=Array.from(yn.querySelectorAll(":scope > param")).map(($f,wf)=>({...Object.fromEntries(Array.from($f.attributes).map(Pf=>[Pf.name,Pf.value])),idx:wf}));let po=uo.length,mo=yn.parentElement;for(;mo&&mo.tagName!=="ARTICLE";)Array.from(mo.querySelectorAll(":scope > param")).forEach($f=>{uo.push({...Object.fromEntries(Array.from($f.attributes).map(wf=>[wf.name,wf.value])),idx:po}),po++}),mo=mo.parentElement;const wo={};uo.forEach($f=>{let wf=Object.keys($f).find(Pf=>Pf.indexOf("ve-")===0&&!$f[Pf]);wf?wf==="ve-d3plus-ring-network"&&(wf="ve-visjs"):(wf="ve-entity",$f[wf]=""),wo[wf]||(wo[wf]=[]),wo[wf].push($f)});let lf=[];Object.values(wo["ve-entity"]||[]).forEach($f=>{var Af;let wf=$f.eid||$f.qid,Pf=((Af=$f.aliases)==null?void 0:Af.split("|").filter(Bf=>Bf))||[],Cf=$f.file||$f.article;(Pf.length||Cf)&&(window.customEntityData[wf]||(window.customEntityData[wf]={aliases:Pf,file:Cf})),lf.push(wf)}),delete wo["ve-entity"],ut==null||ut.setAttribute("data-entities",lf.join(" "));function yf($f){let wf=document.createElement("ul");return $f.forEach(Pf=>{let Cf=document.createElement("li");Cf.innerText=W(Pf),wf.appendChild(Cf)}),wf}function cf($f,wf,Pf){Object.entries(wf).filter(([Cf,Af])=>Pf[Cf]!==void 0).forEach(([Cf,Af])=>{$f.setAttribute(Pf[Cf]||Cf,Af==="false"?"":Af==="true"?null:Af)})}function vf($f,wf,Pf){let Cf=document.createElement($f);return Cf.setAttribute("slot",wf),wf==="ve-compare"?(cf(Cf,Pf[0],{caption:""}),Cf.appendChild(yf(Pf))):wf==="ve-iframe"?cf(Cf,Pf[0],{allow:"",allowfullscreen:"",allowtransparency:"",caption:"",frameborder:"",loading:"",name:"",src:""}):wf==="ve-image"||wf==="ve-gallery"?Pf.length===1?cf(Cf,Pf[0],{attribution:"",caption:"",data:"","data-id":"",description:"",fit:"",label:"",license:"",manifest:"",refresh:"",region:"",rotate:"",rotation:"",seq:"",src:"",title:"",url:"","zoom-on-scroll":""}):(cf(Cf,Pf[0],{"zoom-on-scroll":""}),Cf.appendChild(yf(Pf))):wf==="ve-knightlab-timeline"?cf(Cf,Pf[0],{caption:"","hash-bookmark":"","initial-zoom":"",source:"","timenav-position":""}):wf==="ve-map"?(cf(Cf,Pf[0],{basemap:"basemaps",caption:"",center:"",data:"","data-id":"",entities:"","gesture-handling":"","gh-dir":"",marker:"",overlay:"","prefer-geojson":"","scroll-wheel-zoom":"",title:"",zoom:"","zoom-on-click":""}),Cf.appendChild(yf(Pf.slice(1)))):wf==="ve-plant-specimen"?cf(Cf,Pf[0],{caption:"",eid:"",jpid:"",max:"",qid:"","taxon-name":"",wdid:""}):wf==="ve-video"?cf(Cf,Pf[0],{alt:"",autoplay:"",caption:"","data-id":"",end:"",fit:"",id:"",muted:"","no-caption":"",poster:"",src:"",start:"",sync:"",vid:""}):wf==="ve-visjs"?cf(Cf,Pf[0],{caption:"",edges:"",hierarchical:"",nodes:"",title:"caption",url:""}):wf==="data"?Cf.appendChild(yf(Pf)):console.log(`makeViewer: slotName ${wf} not recognized, props=${Object.keys(Pf[0]||{})}`),Cf}let _f=document.createElement("ve-j1-viewers-slots");_f.dataset.id=ot,yn.appendChild(_f),_f.setAttribute("viewers",[...Object.keys(wo).filter($f=>$f!=="ve-map-marker"&&$f!=="ve-map-layer"),...mode==="dev"?["data"]:[]].join(" ")),Object.entries(wo).forEach(([$f,wf])=>{$f==="ve-map-marker"||$f==="ve-map-layer"||(wf[0].entities=lf.join(" "),wf[0]["data-id"]=_f.dataset.id,$f==="ve-map"?_f.appendChild(vf("ve-map",$f,[...wf,...Object.values(wo["ve-map-marker"]||{}),...Object.values(wo["ve-map-layer"]||{})].sort((Pf,Cf)=>Pf.idx-Cf.idx))):_f.appendChild(vf($f,$f,wf)))}),_f.appendChild(vf("div","data",uo))}),Array.from(F.querySelectorAll(".segment")).forEach(rt=>{let ot=rt.children[1],ut=rt.parentElement;for(;ut&&ut.tagName!=="ARTICLE";)ut.querySelectorAll(":scope > param").forEach(yn=>ot.appendChild(yn.cloneNode(!0))),ut=ut.parentElement});let q=F.querySelector("main"),K=document.createElement("main");K.className="page-content markdown-body";let X=document.createElement("div");X.className="content",X.innerHTML=q.innerHTML;let tt=document.createElement("div");return tt.className="viewers",K.appendChild(X),K.appendChild(tt),q.replaceWith(K),F}function setStickyOffsets(F){function W(K){let X=K.getBoundingClientRect();return K.tagName==="VE-HEADER"||K.tagName==="VE-BREADCRUMBS"||X.top>=0&&X.top<=window.innerHeight}let q=Array.from(F.querySelectorAll(".sticky")).filter(K=>W(K)).sort((K,X)=>{let tt=K.getBoundingClientRect().top,rt=X.getBoundingClientRect().top;return tt1){q[0].style.zIndex=`${q.length}`;for(let K=1;K=0;--ot){let ut=q[ot],yn=ut.getBoundingClientRect(),uo=yn.x,po=yn.x+yn.width;if(uo<=rt&&po>=tt){let mo=parseInt(ut.style.top.replace(/px/,""))||0;q[K].style&&(q[K].style.top=`${Math.floor(mo+yn.height)}px`);break}}}}}let priorActiveParagraph,currentActiveParagraph;function observeVisible(F,W,q=0){var rt;W=W||!1;let K=q+((rt=Array.from(F.querySelectorAll("VE-HEADER")).map(ot=>(parseInt(ot.style.top.replace(/px/,""))||0)+ot.getBoundingClientRect().height))==null?void 0:rt[0])||0;isJunctureV1=!0;const X={},tt=new IntersectionObserver((ot,ut)=>{var uo,po;for(const mo of ot){let wo=mo.target,lf=wo.id||((uo=wo.parentElement)==null?void 0:uo.id)||"",yf=mo.intersectionRatio;yf>0?X[lf]={para:wo,intersectionRatio:yf}:delete X[lf]}let yn=Object.values(X).sort((mo,wo)=>wo.intersectionRatio-mo.intersectionRatio||mo.para.getBoundingClientRect().top-wo.para.getBoundingClientRect().top);if(W)currentActiveParagraph=(po=yn[0])==null?void 0:po.para;else{let mo=yn.find(wo=>wo.para.classList.contains("active"));mo&&(currentActiveParagraph=mo.para)}if(currentActiveParagraph!==priorActiveParagraph){let mo,wo;isJunctureV1&&(mo=priorActiveParagraph==null?void 0:priorActiveParagraph.nextElementSibling,wo=currentActiveParagraph==null?void 0:currentActiveParagraph.nextElementSibling,mo&&mo.classList.remove("active")),priorActiveParagraph=currentActiveParagraph,W&&(F.querySelectorAll("p.active, ol.active, ul.active").forEach(lf=>lf.classList.remove("active")),currentActiveParagraph==null||currentActiveParagraph.classList.add("active"),wo&&wo.classList.add("active")),setStickyOffsets(F)}},{root:null,threshold:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],rootMargin:`${K?-K:0}px 0px 0px 0px`});F.querySelectorAll("p, .segment > ol, .segment > ul").forEach(ot=>tt.observe(ot))}function setMeta(){var yn,uo,po,mo,wo,lf,yf,cf,vf,_f;let F,W;Array.from(document.getElementsByTagName("*")).forEach($f=>{/^\w+-\w+/.test($f.tagName)&&($f.tagName.split("-")[1]==="META"?F=$f:$f.tagName.split("-")[1]==="HEADER"&&(W=$f))}),F||(F=document.querySelector("param[ve-config]"));let q=(yn=document.querySelector("h1, h2, h3"))==null?void 0:yn.innerHTML.trim(),K=(uo=Array.from(document.querySelectorAll("p")).find($f=>{var Pf;let wf=(Pf=$f.childNodes.item(0).nodeValue)==null?void 0:Pf.trim();return $f.childNodes[0].tagName!=="CODE"&&(wf==null?void 0:wf.length)&&!/^\.\w+-\w+/.test(wf)}))==null?void 0:uo.innerHTML.trim(),X=document.querySelector('script[type="application/ld+json"]'),tt=X?JSON.parse(X.innerText):{"@context":"https://schema.org","@type":"WebSite",description:"",headline:"",name:"",url:""};tt.url=location.href;let rt=F!=null&&F.getAttribute("title")?F.getAttribute("title"):(po=window.config)!=null&&po.title?window.config.title:W!=null&&W.getAttribute("label")?W.getAttribute("label"):q||"",ot=F!=null&&F.getAttribute("description")?F.getAttribute("description"):(mo=window.config)!=null&&mo.description?window.config.description:K||"",ut=F!=null&&F.getAttribute("robots")?F==null?void 0:F.getAttribute("robots"):(wo=window.config)!=null&&wo.robots?window.config.robots:"";if(rt&&(document.title=rt,tt.name=rt,tt.headline=rt,(lf=document.querySelector('meta[name="og:title"]'))==null||lf.setAttribute("content",rt),(yf=document.querySelector('meta[property="og:site_name"]'))==null||yf.setAttribute("content",rt),(cf=document.querySelector('meta[property="twitter:title"]'))==null||cf.setAttribute("content",rt)),ot&&((vf=document.querySelector('meta[name="description"]'))==null||vf.setAttribute("content",ot),(_f=document.querySelector('meta[property="og:description"]'))==null||_f.setAttribute("content",ot),tt.description=ot),ut){let $f=document.createElement("meta");$f.setAttribute("name","robots"),$f.setAttribute("content",ut),document.head.appendChild($f)}return X&&(X.innerText=JSON.stringify(tt)),{meta:{title:rt,description:ot,robots:ut,seo:tt}}}function isJunctureV1(F){return!!F.querySelector("param[ve-config]")}function setConfig$2(){var W,q,K,X,tt,rt,ot;window.config={...yaml.parse(window.options||""),...window.jekyll||{},...window.config||{},baseurl:(W=window.jekyll)!=null&&W.site.baseurl||location.hostname.indexOf("github.io")>0?`/${location.pathname.split("/")[1]}/`:"/",source:{owner:(q=window.jekyll)==null?void 0:q.site.github.owner_name,repository:(K=window.jekyll)==null?void 0:K.site.github.repository_name,branch:(X=window.jekyll)==null?void 0:X.site.github.source.branch,dir:(tt=window.jekyll)==null?void 0:tt.page.dir,path:(rt=window.jekyll)==null?void 0:rt.page.path,name:(ot=window.jekyll)==null?void 0:ot.page.name},...setMeta()};let F=document.createElement("main");F.innerHTML=window.config.content||document.body.innerHTML,window.config.isJunctureV1=isJunctureV1(F),console.log(window.config)}function readMoreSetup(){const F=document.querySelectorAll(".read-more p"),W=new ResizeObserver(q=>{for(let K of q)K.target.classList[K.target.scrollHeight>K.contentRect.height+10?"add":"remove"]("truncated")});F.forEach(q=>W.observe(q))}function setViewersPosition(){let F=document.querySelector("ve-header"),W=document.querySelector(".viewers"),q=F.getBoundingClientRect().top,K=F.getBoundingClientRect().height,X=q+K;W&&(W.style.top=`${X}px`,W.style.height=`calc(100dvh - ${X+2}px)`)}function elFromHtml(F){return new DOMParser().parseFromString(F,"text/html").querySelector("body")}function markdownToHtml(F){return marked$1.use(window.markedFootnote()).parse(F)}function structureContent(F){let W=document.createElement("main");W.innerHTML=F,convertTags(W);let q=restructure(W);return isJunctureV1(W)&&(q=restructureForJ1(q)),q}function articleFromHtml(F){let W=document.createElement("main");W.innerHTML=F,convertTags(W);let q=restructure(W);return isJunctureV1(W)&&(q=restructureForJ1(q)),q}function mount(F,W){W=W||window.config.content||document.body.innerHTML,F=F||document.querySelector("body > article, body > main, body > section"),F||(F=document.createElement("article"),document.body.innerHTML=F.outerHTML);let q=articleFromHtml(W);return F.replaceWith(q),window.config.isJunctureV1&&!isMobile&&(document.addEventListener("scroll",()=>setViewersPosition()),setTimeout(()=>setViewersPosition(),100)),observeVisible(q,!q.querySelector("ve-video[sync]")),readMoreSetup(),q}window.config||setConfig$2();let scripts=Array.from(document.getElementsByTagName("script")).filter(F=>F.src).map(F=>F.src),stylesheets=Array.from(document.getElementsByTagName("link")).filter(F=>F.type=="text/css"&&F.href).map(F=>F.href),hasGhpJs=scripts.find(F=>F.indexOf("ghp.js")>0)!==void 0,hasWcJs=scripts.find(F=>F==="http://localhost:5173/main.ts"||F==="https://cdn.jsdelivr.net/npm/juncture-digital/js/index.js"||F.indexOf("wc/dist/js/index.js")>0)!==void 0,hasWcCss=stylesheets.find(F=>F==="http://localhost:8080/wc/src/index.css"||F==="https://cdn.jsdelivr.net/npm/juncture-digital/css/index.css"||F.indexOf("wc/dist/css/index.css")>0)!==void 0,isMounted=document.querySelector("body > article")!==null;hasWcCss||(addLink({rel:"stylesheet",type:"text/css",href:mode==="local"?"http://localhost:8080/wc/src/index.css":mode==="prod"?"https://rdsnyder.github.io/juncture/wc/dist/css/index.css":`${window.config.baseurl}wc/dist/css/index.css`}),hasWcCss=!0);hasWcJs||(addScript({type:"module",src:mode==="local"?"http://localhost:5173/main.ts":mode==="prod"?"https://rdsnyder.github.io/juncture/wc/dist/js/index.js":`${window.config.baseurl}wc/dist/js/index.js`}),hasGhpJs=!0);docReady(function(){hasGhpJs&&hasWcJs&&hasWcCss&&!isMounted&&mount()});const _hoisted_1$t=["innerHTML"],_sfc_main$v=defineComponent({__name:"Article.ce",props:{base:{type:String},branch:{type:String,default:"main"},owner:{type:String},path:{type:String,default:"README.md"},repo:{type:String},repoIsWritable:{type:Boolean,default:!1}},setup(F){const W=F,q=ref(null),K=computed(()=>{var ut,yn;return(yn=(ut=q.value)==null?void 0:ut.getRootNode())==null?void 0:yn.host});watch$1(K,ut=>{ut.parentElement.addEventListener("scroll",()=>ot())}),watch$1(q,()=>{setTimeout(()=>ot(),200)});const X=ref(),tt=computed(()=>"article markdown-body");watch$1(X,()=>{nextTick(()=>{observeVisible(q.value,!0,612)})});const rt=ref(W.repoIsWritable);watch$1(W,()=>{rt.value=W.repoIsWritable});function ot(){var uo,po;let ut=(uo=q.value)==null?void 0:uo.querySelector("ve-header"),yn=(po=q.value)==null?void 0:po.querySelector(".viewers.active");if(ut&&yn){let mo=ut.getBoundingClientRect().top,wo=ut.getBoundingClientRect().height,lf=mo+wo;yn.style.top=`${lf}px`,yn.style.height=`calc(100dvh - ${lf+32}px)`}}return onMounted(async()=>{let ut=new DOMParser().parseFromString(K.value.textContent,"text/html").body;ut.querySelectorAll("ve-image, ve-map, ve-gallery").forEach(yn=>{yn.setAttribute("base",W.base),rt&&yn.setAttribute("repo-is-writable","")}),X.value=ut.innerHTML}),(ut,yn)=>(openBlock(),createElementBlock("article",{ref_key:"article",ref:q,innerHTML:X.value,class:normalizeClass(tt.value),style:{width:"100%"}},null,10,_hoisted_1$t))}}),_style_0$t=`@import"https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900";.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;color:#1f2328;background-color:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:" ";display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,");mask-image:url("data:image/svg+xml,")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none!important}.markdown-body a{background-color:transparent;color:#0969da;text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:600}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:600;padding-bottom:.3em;font-size:2em;border-bottom:1px solid hsla(210,18%,87%,1)}.markdown-body mark{background-color:#fff8c5;color:#1f2328}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-.25em}.markdown-body sup{top:-.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box;background-color:#fff}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em 40px}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid hsla(210,18%,87%,1);height:.25em;padding:0;margin:24px 0;background-color:#d0d7de;border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;-moz-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;-moz-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::-moz-placeholder{color:#6e7781;opacity:1}.markdown-body ::placeholder{color:#6e7781;opacity:1}.markdown-body hr:before{display:table;content:""}.markdown-body hr:after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:-moz-max-content;width:max-content;max-width:100%;overflow:auto}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body details:not([open])>*:not(summary){display:none!important}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid #0969da;outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid #0969da;outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;line-height:10px;color:#1f2328;vertical-align:middle;background-color:#f6f8fa;border:solid 1px rgba(175,184,193,.2);border-bottom-color:#afb8c133;border-radius:6px;box-shadow:inset 0 -1px #afb8c133}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.markdown-body h2{font-weight:600;padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid hsla(210,18%,87%,1)}.markdown-body h3{font-weight:600;font-size:1.25em}.markdown-body h4{font-weight:600;font-size:1em}.markdown-body h5{font-weight:600;font-size:.875em}.markdown-body h6{font-weight:600;font-size:.85em;color:#656d76}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:#656d76;border-left:.25em solid #d0d7de}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible!important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.markdown-body .mr-2{margin-right:8px!important}.markdown-body:before{display:table;content:""}.markdown-body:after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0!important}.markdown-body>*:last-child{margin-bottom:0!important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:#d1242f}.markdown-body .anchor{float:left;padding-right:4px;margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:16px}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:#1f2328;vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body table th{font-weight:600}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid #d0d7de}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:#fff;border-top:1px solid hsla(210,18%,87%,1)}.markdown-body table tr:nth-child(2n){background-color:#f6f8fa}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid #d0d7de}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:#1f2328}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:#afb8c133;border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;color:#1f2328;background-color:#f6f8fa;border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px 8px 9px;text-align:right;background:#ffffff;border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:600;background:#f6f8fa;border-top:0}.markdown-body [data-footnote-ref]:before{content:"["}.markdown-body [data-footnote-ref]:after{content:"]"}.markdown-body .footnotes{font-size:12px;color:#656d76;border-top:1px solid #d0d7de}.markdown-body .footnotes ol{padding-left:16px}.markdown-body .footnotes ol ul{display:inline-block;padding-left:16px;margin-top:16px}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target:before{position:absolute;top:-8px;right:-8px;bottom:-8px;left:-24px;pointer-events:none;content:"";border:2px solid #0969da;border-radius:6px}.markdown-body .footnotes li:target{color:#1f2328}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body .pl-c{color:#57606a}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:#0550ae}.markdown-body .pl-e,.markdown-body .pl-en{color:#6639ba}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:#24292f}.markdown-body .pl-ent{color:#116329}.markdown-body .pl-k{color:#cf222e}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:#0a3069}.markdown-body .pl-v,.markdown-body .pl-smw{color:#953800}.markdown-body .pl-bu{color:#82071e}.markdown-body .pl-ii{color:#f6f8fa;background-color:#82071e}.markdown-body .pl-c2{color:#f6f8fa;background-color:#cf222e}.markdown-body .pl-sr .pl-cce{font-weight:700;color:#116329}.markdown-body .pl-ml{color:#3b2300}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:700;color:#0550ae}.markdown-body .pl-mi{font-style:italic;color:#24292f}.markdown-body .pl-mb{font-weight:700;color:#24292f}.markdown-body .pl-md{color:#82071e;background-color:#ffebe9}.markdown-body .pl-mi1{color:#116329;background-color:#dafbe1}.markdown-body .pl-mc{color:#953800;background-color:#ffd8b5}.markdown-body .pl-mi2{color:#eaeef2;background-color:#0550ae}.markdown-body .pl-mdr{font-weight:700;color:#8250df}.markdown-body .pl-ba{color:#57606a}.markdown-body .pl-sg{color:#8c959f}.markdown-body .pl-corl{text-decoration:underline;color:#0a3069}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;font-size:1em;font-style:normal!important;font-weight:400;line-height:1;vertical-align:-.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:400}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:4px}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body .contains-task-list:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list{position:relative}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:8px 16px;margin-bottom:16px;color:inherit;border-left:.25em solid #d0d7de}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:500;align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:#0969da}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:#0969da}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:#8250df}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:#8250df}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:#9a6700}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:#9a6700}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:#1f883d}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:#1a7f37}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:#cf222e}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:#d1242f}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));grid-auto-rows:1fr;row-gap:2em;-moz-column-gap:3em;column-gap:3em}.cards.wrapper{margin-top:0}.cards.wrapper>section{padding:0}.card{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto auto 1fr 0px;padding:0}.card p{border:none}.card>img{grid-area:1 / 1 / 2 / 2;width:100%;height:300px;-o-object-fit:cover;object-fit:cover}.card>a{grid-area:2 / 1 / 3 / 2;font-weight:700;font-size:1.5em;line-height:1.2;padding:1.3rem .5rem .2rem;text-decoration:none;color:#0164b9}.card>a:hover{text-decoration:underline}.card>ul{grid-area:3 / 1 / 4 / 2;list-style:none;padding:.4rem .5rem;margin:0;font-size:1rem;font-weight:400;max-height:260px;overflow-y:scroll}.clamp5{-webkit-line-clamp:5}.read-more input{opacity:0;position:absolute;pointer-events:none}.read-more input:focus~label{outline:-webkit-focus-ring-color auto 5px}.read-more input:checked+p{-webkit-line-clamp:unset}.read-more input:checked~label,.read-more p:not(.truncated)~label{display:none}.read-more>p{grid-area:4 / 1 / 5 / 2;align-self:flex-start;min-height:100px;line-height:1.4;font-size:.9em;padding:.5rem .5rem 0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;margin:0 0 .2rem;-webkit-line-clamp:8}.read-more label{margin-left:.5rem;border-radius:4px;padding:.2em .6em;border:1px solid #555;background-color:#777;color:#fff;font-size:.7em}.read-more label:hover{background-color:#555}@media only screen and (max-width: 768px){.cards{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));-moz-column-gap:1em;column-gap:1em;row-gap:1/5em}.card{font-size:1em;line-height:1.2;border:1px solid #eee;border-radius:.5em}.card>img{height:150px}.card>a{font-size:1.2em;padding:.8rem .5rem .2rem}}:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}*,*:before,*:after{box-sizing:border-box}*{margin:0}@keyframes fadeInAnimation{0%{opacity:0}to{opacity:1}}article{font-family:Roboto,sans-serif;animation:fadeInAnimation ease .3s;animation-iteration-count:1;animation-fill-mode:forwards;width:min(1200px,100% - 4rem);margin-inline:auto;background-color:#fff}article .markdown-body h1,article .markdown-body h2{border-bottom:none;padding-bottom:0}article .markdown-body li>p{margin:0}article .markdown-body{font-size:1.2em;line-height:1.5;margin-top:1em}article .markdown-body pre code{white-space:pre-wrap}@media only screen and (max-width: 768px){article{font-size:1em;width:calc(100% - 2em)}ve-header{width:100%}}section{position:relative;clear:both;margin-block-start:0;margin-block-end:0;background-color:inherit}.flow-root section{display:flow-root}.flow-root section h1,.flow-root section h2,.flow-root section h3,.flow-root section h4,.flow-root section h5,.flow-root section h6{margin-top:12px;margin-bottom:12px}ve-snippet,ve-footer ul,ve-header ul,ve-image ul,ve-map ul,ve-menu ul,ve-navbar ul,ve-snippet pre{display:none}ve-image,ve-map{margin-bottom:2em}ve-image img{max-width:100%;height:auto}ve-entity-infobox{position:relative;border-bottom:1px solid #ccc}ve-header{z-index:10;margin-bottom:1em}.columns{display:grid;gap:1em;grid-template-columns:repeat(auto-fit,minmax(275px,1fr))}.sticky{position:sticky;top:0;background-color:inherit;z-index:1}.hide{display:none}ve-footer.sticky{bottom:0}@media (min-width: 600px){.left{float:left;padding-right:1em}.right{float:right;padding-left:1em}.left,.right{width:50%;margin-bottom:1em}}p audio{width:250px;height:24px;vertical-align:middle}.showactive{padding-bottom:80dvh}.showactive .active{background-color:#fff;box-shadow:#00000026 1.95px 1.95px 2.6px}section#references{margin-top:2em}section#references h1{font-size:1.5em}section#references P{font-size:1em;margin-bottom:.7em}a.flyto,mark.flyto,a.play,mark.play,a.qid,mark.qid,a.zoom,mark.zoom,ve-entity-infobox{cursor:pointer;background:unset;border-bottom:1px solid #ccc;color:#444}a.flyto:hover,mark.flyto:hover,a.play:hover,mark.play:hover,a.qid:hover,mark.qid:hover,a.zoom:hover mark.zoom:hover,ve-entity-infobox:hover{border-bottom:2px solid #444;background:#eee}a.flyto:after,mark.flyto:after,a.play:after,mark.play:after,a.qid:after,mark.qid:after,a.zoom:after,mark.zoom:after,ve-entity-infobox:after{font-size:50%;line-height:0;position:relative;vertical-align:baseline;top:-.5em;padding-left:2px;padding-right:4px}a.flyto:after,mark.flyto:after{content:"✈";font-size:120%;top:0}a.play:after,mark.play:after{content:"▶"}a.zoom:after,mark.zoom:after{content:"🔎"}p span.headline{font-weight:500}.resume>section:first-of-type{display:grid;gap:1em;grid-template-columns:repeat(auto-fit,minmax(275px,1fr))}.resume>section:first-of-type>section:nth-of-type(2){display:flex;margin-left:auto;gap:1em}.resume>section:first-of-type>section:nth-of-type(2) li{list-style:none;display:flex;align-items:center;gap:.5em}.resume>section:first-of-type>section:nth-of-type(2) li img{height:24px;width:24px}.resume>section:first-of-type>section:nth-of-type(2)>p>img{max-width:120px;height:auto;border-radius:50%;box-shadow:#0000003d 0 3px 8px}article.j1{width:100%;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;grid-template-areas:"header" "main" "footer"}article.j1>*{width:100%}.j1 ve-header{grid-area:header;position:sticky;top:-300px;z-index:10;margin-bottom:0}.j1 main{grid-area:main;display:grid;grid-template-columns:1fr 0;grid-template-areas:"content viewers";background-color:#f8f8f8!important;font-size:1.3em!important;line-height:1.6!important}.j1 .content{grid-area:content;margin:.5em}.j1 .viewers{grid-area:viewers}.j1 footer{grid-area:footer}.j1 .segment{display:flex;flex-direction:column;gap:.5em;margin:1em 0}.j1 .segment>ve-j1-viewers{width:100%;align-self:center}.j1 .segment>p{margin:0;padding:0;border-radius:8px;border:1px solid #f8f8f8}.j1 .sticky{position:sticky;top:0}.j1 .footnote div,.j1 .footnotes div{white-space:unset}.j1 .footnote li>p,.j1 .footnotes li>p{margin:0;background-color:inherit;border-color:inherit;box-shadow:none}.j1 .content>section:first-of-type>h1,.j1 .content>section:first-of-type>h2,.j1 .content>section:first-of-type>h3{margin-top:0}@media (min-width: 800px){.j1 main{grid-template-columns:1fr 1fr;padding-left:1em}.j1 .content{padding-right:1em}.j1 p.active,.j1 ol.active,.j1 ul.active{background-color:#fff;box-shadow:0 0 3px 1px #00000040;border-color:#9e9e9e}.j1 .segment{margin:0}.j1 .segment>p{padding:.5em}.j1 .segment>ve-j1-viewers{display:none}.j1 .viewers{grid-area:viewers;display:block;height:calc(100dvh - 100px);margin-top:0}.j1 .viewers{visibility:hidden;position:fixed;top:100px;right:1em;height:calc(-100px + 100dvh);width:calc(50% - 1em);z-index:unset}.j1 .viewers.active{display:block;visibility:visible;z-index:5}.j1 main{display:block;width:50%}.j1 .content{margin:0 0 80dvh}}@media print{ve-footer{display:none}.pagebreak{-moz-column-break-before:always;break-before:always}.keep-together,.section2,.section3{-moz-column-break-inside:avoid;break-inside:avoid}article{font-size:1rem;padding-bottom:4em!important}.j1 main{width:100%}.j1 .viewers{visibility:visible;position:unset}.j1 .segment{flex-direction:row;margin-bottom:2em}.j1 .segment>*{flex:1}.j1 p.active{background-color:inherit;box-shadow:unset;border:1px solid #f8f8f8}.segment,ve-compare,ve-iframe,ve-image,ve-knightlab-timeline ve-map,ve-plant-specimen ve-video,ve-visjs{page-break-before:auto;page-break-after:auto;page-break-inside:avoid}}.markdown-body .footnotes,.footnote,.footnotes{font-size:.8em;overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}:host{display:block;height:100%}table[id]{display:none} -`,Article=_export_sfc(_sfc_main$v,[["styles",[_style_0$t]]]);class EventBus{constructor(){this.events={}}on(W,q){this.events[W]=this.events[W]||[],this.events[W].push(q)}off(W,q){if(this.events[W]){for(let K=0;K{var Df,Lf;return(Lf=(Df=q.value)==null?void 0:Df.getRootNode())==null?void 0:Lf.host}),X=ref(null);watch$1(X,async Df=>{!tt.value&&W.src&&(tt.value=await getManifest(W.src)),uo=Df,uo.addEventListener("play",()=>{wo.value||(wo.value=!0,W.start&&Hf(W.start,W.end))}),vf()});const tt=ref(null),rt=computed(()=>tt.value?getItemInfo(tt.value):null),ot=computed(()=>{var Df;return(Df=rt.value)==null?void 0:Df.id}),ut=computed(()=>{var Df;return(Df=rt.value)==null?void 0:Df.format}),yn=computed(()=>{var Df;return((Df=K.value)==null?void 0:Df.style.display)==="inline-block"});watch$1(yn,Df=>{K.value.style.width=Df?"250px":"100%"}),watch$1(X,Df=>{Df&&yn.value&&(Df.style.height="24px",Df.style.verticalAlign="middle")});let uo;const po=ref(!1),mo=ref(!1),wo=ref(!1);watch$1(K,async()=>{!tt.value&&W.src&&(tt.value=await getManifest(W.src)),yf(),EventBus$1.on("seekto",Df=>Hf(Df.start,Df.end)),W.sync?lf():W.autoplay&&W.start&&Hf(W.start,W.end)});function lf(){let Df=Array.from(document.querySelectorAll("p[data-head]")).map(Lf=>{let[kf,...Nf]=Lf.dataset.head.split(/\s+/),Yf=document.createElement("a");if(Yf.classList.add("play"),Yf.href="javascript:;",Yf.textContent=kf,Yf.addEventListener("click",()=>{Hf(Lf.dataset.head)}),Lf.insertBefore(document.createElement("br"),Lf.firstChild),Nf.length>0){let Gf=document.createElement("span");Gf.classList.add("headline"),Gf.textContent=Nf.join(" "),Lf.insertBefore(Gf,Lf.firstChild)}return Lf.insertBefore(Yf,Lf.firstChild),{start:Cf(Lf.dataset.head.split(/\s+/)[0]),id:Lf.id}});EventBus$1.on("audio-at-time",Lf=>{let kf=Lf.time,Nf=Df.find(Yf=>{var Gf;return Yf.start<=kf&&(((Gf=Df[Df.indexOf(Yf)+1])==null?void 0:Gf.start)||1/0)>kf});if(Nf&&uo&&mo.value){let Yf=document.getElementById(Nf.id);Yf&&Yf.scrollIntoView({behavior:"smooth",block:"center"})}})}function yf(){var Lf;let Df=(Lf=K.value)==null?void 0:Lf.parentElement;for(;Df;)Array.from(Df.querySelectorAll("a")).forEach(async kf=>{var rp;let Yf=new URL(kf.href).pathname.split("/").filter(ip=>ip).map(ip=>ip.toLowerCase()).map(ip=>ip==="playat"?"play":ip),Gf=Yf.indexOf("play");if(Gf>=0){let ip=Yf[Gf+1],ap=Yf.slice(Gf+2).filter(Ip=>Ip==="click"||Ip==="mouseover")[0]||"click",yp=Yf.slice(Gf+2).filter(Ip=>Ip!=="click"&&Ip!=="mouseover")[0],vp,Np,jp=kf.parentElement;for(;jp&&!Np;)Np=jp.dataset.id,jp=jp.parentElement;if(Np){let Ip=(rp=K.value)==null?void 0:rp.dataset.id;if(Ip&&Ip!==Np)return}if(yp&&(vp=document.getElementById(yp),!vp)||(vp=cf(kf,"ve-audio"),vp!==K.value))return;kf.classList.add("play"),kf.href="javascript:;",kf.setAttribute("data-play",ip),kf.addEventListener(ap,Ip=>{var og;let[Jp,ng]=((og=Ip.target.getAttribute("data-play"))==null?void 0:og.split(/\s+/))||[];Jp&&Hf(Jp,ng)})}}),Df=Df.parentElement}function cf(Df,Lf){let kf,Nf=Df.parentElement;for(;Nf&&!kf;)kf=Nf.querySelector(Lf),Nf=Nf.parentElement;return kf}async function vf(){Pf().then(Df=>EventBus$1.emit("audio-at-time",{time:Math.round(Df)})),setInterval(async()=>{po.value=await $f(),mo.value=await _f(),mo.value&&Pf().then(Df=>EventBus$1.emit("audio-at-time",{time:Math.round(Df)}))},1e3)}async function _f(){return!(uo.ended||uo.paused)}async function $f(){return await W.muted}function wf(Df){uo.muted=Df}async function Pf(){return uo.currentTime}function Cf(Df){var Lf=Df.split(":").slice(0,3).map(Yf=>parseInt(Yf,10));let kf=0,Nf=1;for(;Lf.length>0;){let Yf=Lf.pop()||0;kf+=Nf*Yf,Nf*=60}return kf}let Af=null,Bf=!1;function Hf(Df,Lf=""){let kf=Cf(Df),Nf=Lf?Cf(Lf)+1:-1;Af&&(clearTimeout(Af),Af=null);let Yf=po.value;setTimeout(()=>{uo.play(),uo.currentTime=kf,Nf>=kf&&(Af=setTimeout(()=>{Af=null,uo.pause(),!Yf&&Bf&&wf(!1)},Nf===kf?200:(Nf-kf)*1e3))},200)}return(Df,Lf)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:q},[tt.value?(openBlock(),createElementBlock("audio",{key:0,ref_key:"html5Player",ref:X,id:"html5-player",controls:"",autoplay:W.autoplay},[createBaseVNode("source",{src:ot.value,type:ut.value},null,8,_hoisted_2$o)],8,_hoisted_1$s)):createCommentVNode("",!0),F.caption?(openBlock(),createElementBlock("div",_hoisted_3$l,toDisplayString(F.caption),1)):createCommentVNode("",!0)],512))}}),_style_0$s=`*{box-sizing:border-box}:host{display:block;width:100%}audio{width:100%}.caption{text-align:start;padding:6px 12px;font-size:1em;line-height:1.1;border:1px solid #ddd} +`).replace(/[^<]*<\/a>/g,"").replace(/^ve-media/,"ve-image");K.textContent=X,W.replaceWith(q)}),Array.from(F.querySelectorAll("param")).filter(W=>Array.from(W.attributes).filter(q=>q.name.indexOf("ve-")===0).length).filter(W=>W.getAttribute("ve-config")===null).forEach(W=>{let q=Array.from(W.attributes).find(K=>K.name.indexOf("ve-")===0).name;if(q){let K=tagMap[q]||{},X={tag:q};Array.from(W.attributes).forEach(tt=>{var rt;tt.name!==q&&((rt=K.booleans)!=null&&rt.has(tt.name)?(X.booleans||(X.booleans=[]),X.booleans.push(tt.name)):(X.kwargs||(X.kwargs={}),X.kwargs[tt.name]?X.kwargs[tt.name]+=` ${tt.value}`:X.kwargs[tt.name]=tt.value))}),isJunctureV1(F)||W.replaceWith(makeEl(X))}}),F.querySelectorAll("code").forEach(W=>{var K,X,tt,rt;let q=parseCodeEl(W);if(q.tag)W.parentElement.tagName==="PRE"&&(W=W.parentElement,W.parentElement.removeAttribute("id"),W.parentElement.removeAttribute("data-id"),W.parentElement.removeAttribute("class"),W.parentElement.parentElement&&(W.parentElement.parentElement.className="segment"),W.parentElement.tagName==="DIV"&&W.parentElement.children.length===1&&W.parentElement.replaceWith(W)),W.replaceWith(makeEl(q));else if(q.class||q.style||q.id||q.kwargs){let ot=W.parentElement,ut,yn=ot.previousElementSibling;if((yn==null?void 0:yn.tagName)==="EM"||(yn==null?void 0:yn.tagName)==="STRONG"?(ut=document.createElement("span"),ut.innerHTML=yn.innerHTML,yn.replaceWith(ut)):(parent==null?void 0:parent.tagName)==="TD"?(ut=(X=(K=parent==null?void 0:parent.parentElement)==null?void 0:K.parentElement)==null?void 0:X.parentElement,(tt=parent==null?void 0:parent.parentElement)==null||tt.remove()):(parent==null?void 0:parent.tagName)!=="UL"&&((yn==null?void 0:yn.tagName)==="A"||(yn==null?void 0:yn.tagName)==="IMG")?ut=yn:ut=(yn==null?void 0:yn.children.length)===1&&((rt=yn.children[0])==null?void 0:rt.tagName)==="VE-HEADER"?ot.parentElement:yn,ut){if(q.id&&(ut.id=q.id),q.class&&q.class.split(" ").forEach(uo=>ut.classList.add(uo)),q.style&&ut.setAttribute("style",Object.entries(q.style).map(([uo,po])=>`${uo}:${po}`).join(";")),q.entities&&ut.setAttribute("data-entities",q.entities.join(" ")),q.kwargs)for(const[uo,po]of Object.entries(q.kwargs))ut.setAttribute(uo,po===!0?"":po)}else console.log("no target for",q);ot.remove()}})}function restructure(F){let W=F.querySelector("style");deleteAllComments(F),F.querySelectorAll("ul, ol").forEach(ut=>{let yn=ut;ut.querySelectorAll("param").forEach(uo=>{yn.parentNode.insertBefore(uo,yn.nextSibling),yn=uo})});let q=document.createElement("main");W&&q.appendChild(W.cloneNode(!0)),q.className="page-content markdown-body",q.setAttribute("aria-label","Content"),q.setAttribute("data-theme","light"),F.style&&q.setAttribute("style",F.style.cssText);let K=q,X;Array.from(F==null?void 0:F.querySelectorAll("p")).filter(ut=>{var yn,uo;return/^[#*]{1,6}$/.test(((uo=(yn=ut.childNodes.item(0))==null?void 0:yn.nodeValue)==null?void 0:uo.trim())||"")}).forEach(ut=>{var mo,wo;let yn=(mo=ut.childNodes.item(0).nodeValue)==null?void 0:mo.trim(),uo=ut.querySelector("code"),po=document.createElement(`h${yn==null?void 0:yn.length}`);if(ut.replaceWith(po),uo){let lf=document.createElement("p");lf.appendChild(uo),(wo=po.parentElement)==null||wo.insertBefore(lf,po.nextSibling)}}),Array.from(F==null?void 0:F.querySelectorAll("p, li")).filter(ut=>{var yn;return/==.+=={.+}/.test(((yn=ut.textContent)==null?void 0:yn.trim())||"")}).forEach(ut=>{let yn=[],uo=Array.from(ut.innerHTML.matchAll(/==(?[^=]+)=={(?[^}]+)}/g));uo.forEach((po,mo)=>{var wo;if(mo===0&&yn.push(ut.innerHTML.slice(0,po.index)),po.groups){let{text:lf,attrs:yf}=po.groups;if(/\s*Q\d+\s*/.test(yf))yn.push(`${lf}`);else if(yf.indexOf("=")>0){let[cf,vf]=yf.split("=");vf[0]!=='"'&&(yf=`${cf}="${vf}"`),yn.push(`${lf}`)}yn.push(ut.innerHTML.slice(po.index+po[0].length,((wo=uo[mo+1])==null?void 0:wo.index)||ut.innerHTML.length))}}),ut.innerHTML=yn.join("")}),Array.from(F==null?void 0:F.querySelectorAll("param")).filter(ut=>Array.from(ut.attributes).filter(yn=>yn.name.indexOf("ve-")===0).length===0).forEach(ut=>{let yn=ut.previousElementSibling;ut.classList.forEach(mo=>yn==null?void 0:yn.classList.add(mo));let uo=Array.from(ut.attributes).find(mo=>mo.name==="id"),po=Array.from(ut.attributes).find(mo=>mo.name==="style");(uo||po)&&(uo&&(yn==null||yn.setAttribute("id",uo.value)),po&&(yn==null||yn.setAttribute("style",po.value)),ut.remove())}),Array.from((F==null?void 0:F.children)||[]).forEach(ut=>{var yn;if(ut.tagName[0]==="H"&&isNumeric(ut.tagName.slice(1))){let uo=ut,po=parseInt(uo.tagName.slice(1));K&&Array.from(K.children).filter(lf=>!/^H\d/.test(lf.tagName)).filter(lf=>!/PARAM/.test(lf.tagName)).filter(lf=>!/STYLE/.test(lf.tagName)).filter(lf=>!/^VE--/.test(lf.tagName)).forEach((lf,yf)=>{let cf=`${K.getAttribute("data-id")||0}.${yf+1}`;lf.setAttribute("data-id",cf),lf.id=cf,lf.classList.add("segment")}),K=document.createElement("section"),K.classList.add(`section${po}`),Array.from(uo.classList).forEach(lf=>K.classList.add(lf)),uo.className="",uo.id&&(K.id=uo.id,uo.removeAttribute("id")),K.innerHTML+=uo.outerHTML;let mo=[];for(let lf=1;lfyf.parentElement.tagName==="SECTION")];let wo=po===1||mo.length===0?q:(yn=mo.pop())==null?void 0:yn.parentElement;wo==null||wo.appendChild(K),K.setAttribute("data-id",computeDataId(K))}else{if(ut.tagName!=="PARAM"){let uo=`${K.getAttribute("data-id")||0}.${K.children.length}`;ut.setAttribute("data-id",uo),ut.id=uo,ut.classList.add("segment")}ut!==X&&(K.innerHTML+=ut.outerHTML)}}),Array.from(q.querySelectorAll("a")).filter(ut=>ut.href.indexOf("mailto:")<0).forEach(ut=>{var wo,lf;let yn;try{yn=new URL(ut.href)}catch(yf){console.log(yf),console.log(ut.href);return}let uo=yn.pathname.split("/").filter(yf=>yf);if(uo.length===0)return;let po=/^Q\d+$/.test(uo[uo.length-1])?uo[uo.length-1]:null,mo=uo.find(yf=>yf[0]==="~");if(po||mo){let yf=document.createElement("ve-entity-infobox");if(yf.innerHTML=ut.innerHTML,po)yf.setAttribute("qid",po);else{let cf=(wo=window.config)!=null&&wo.baseurl&&yn.pathname.indexOf((lf=window.config)==null?void 0:lf.baseurl)===0?1:0;yf.setAttribute("file",uo.slice(cf).map(vf=>vf.replace(/~/,"")).filter(vf=>vf).join("/"))}ut.replaceWith(yf)}}),configCustomClasses(q);let tt,rt,ot=document.createElement("article");if(isJunctureV1(F)){ot.classList.add("j1");let ut=q.querySelector("param[ve-config]");tt=document.createElement("ve-header"),tt.className="sticky",Array.from((ut==null?void 0:ut.attributes)||[]).forEach(yn=>{yn.name==="banner"&&tt.setAttribute("background",yn.value),yn.name==="title"&&tt.setAttribute("title",yn.value),(yn.name==="subtitle"||yn.name==="author")&&tt.setAttribute("subtitle",yn.value)}),ot.appendChild(tt),ut==null||ut.remove()}else if(tt=q.querySelector("ve-header"),tt){let ut=tt;for(;ut.parentElement.tagName!=="MAIN";)ut=ut.parentElement;ot.appendChild(tt),ut.remove()}return ot.appendChild(q),rt=q.querySelector("ve-footer"),rt&&ot.appendChild(rt),ot}function configCustomClasses(F){let W=0;F.querySelectorAll("section").forEach(q=>{if(q.classList.contains("cards")&&!q.classList.contains("wrapper")){q.classList.remove("cards");let K=document.createElement("section");K.className="cards wrapper",Array.from(q.children).slice(1).forEach(X=>{var ut,yn;K.appendChild(X),X.classList.add("card");let tt=X.querySelector("h1, h2, h3, h4, h5, h6");tt&&tt.remove();let rt=X.querySelector("p > img");rt&&((ut=rt.parentElement)==null||ut.replaceWith(rt));let ot=X.querySelector("p > a");ot&&((yn=ot.parentElement)==null||yn.replaceWith(ot)),X.querySelectorAll("p").forEach(uo=>{++W;let po=document.createElement("div");po.className="read-more";let mo=document.createElement("input");mo.setAttribute("type","checkbox"),mo.id=`read-more-${W}`,po.appendChild(mo);let wo=document.createElement("p");wo.innerHTML=uo.innerHTML,po.appendChild(wo);let lf=document.createElement("label");lf.setAttribute("for",`read-more-${W}`),lf.setAttribute("role","button"),lf.innerHTML="More",po.appendChild(lf),uo.replaceWith(po)})}),q.appendChild(K)}if(q.classList.contains("tabs")){let K=document.createElement("sl-tab-group");Array.from(q.classList).forEach(X=>K.classList.add(X)),Array.from(q.attributes).forEach(X=>K.setAttribute(X.name,X.value)),Array.from(q.querySelectorAll(":scope > section")).forEach((X,tt)=>{var ot;let rt=document.createElement("sl-tab");rt.setAttribute("slot","nav"),rt.setAttribute("panel",`tab${tt+1}`),rt.innerHTML=((ot=X.querySelector("h1, h2, h3, h4, h5, h6"))==null?void 0:ot.innerHTML)||"",K.appendChild(rt)}),Array.from(q.querySelectorAll(":scope > section")).forEach((X,tt)=>{let rt=document.createElement("sl-tab-panel");rt.setAttribute("name",`tab${tt+1}`);let ot=Array.from(X.children).slice(1).map(ut=>ut.outerHTML).join(" ");rt.innerHTML=ot,K.appendChild(rt)}),q.replaceWith(K)}if((q.classList.contains("columns")||q.classList.contains("mcol"))&&!q.classList.contains("wrapper")){let K=document.createElement("section");K.className="columns wrapper",q.classList.remove("columns"),q.classList.remove("mcol"),Array.from(q.children).filter(X=>X.tagName==="SECTION").forEach((X,tt)=>{K.appendChild(X),X.classList.add(`col-${tt+1}`)}),q.appendChild(K)}})}function restructureForJ1(F){function W(rt){return Object.entries(rt).map(([ot,ut])=>`${ot}="${ut}"`).join(" ").replace(/“/g,""").replace(/”/g,""")}Array.from(F.querySelectorAll("[data-id]")).forEach(rt=>{if(rt.tagName==="SECTION")return;if(!rt.innerHTML.trim()){rt.remove();return}let ot=rt.getAttribute("data-id")||"",ut=document.createElement("div");ut.setAttribute("data-id",ot),ut.id=ot,ut.className=rt.className,rt.removeAttribute("id"),rt.removeAttribute("data-id"),rt.className="",ut.appendChild(rt.cloneNode(!0));let yn=document.createElement("div");yn.setAttribute("data-id",ot),yn.className="viewers";let uo=[],po=rt.nextSibling;for(;po&&po.tagName==="PARAM";)uo.push(po),po=po.nextSibling;uo.forEach(mo=>yn.appendChild(mo)),ut.appendChild(yn),rt.replaceWith(ut)}),Array.from(F.querySelectorAll("[data-id]")).forEach(rt=>{if(rt.tagName==="SECTION")return;let ot=rt.getAttribute("data-id")||"",ut=rt.querySelector("p, ol, ul"),yn=rt.querySelector(".viewers");if(!yn)return;const uo=Array.from(yn.querySelectorAll(":scope > param")).map(($f,xf)=>({...Object.fromEntries(Array.from($f.attributes).map(Af=>[Af.name,Af.value])),idx:xf}));let po=uo.length,mo=yn.parentElement;for(;mo&&mo.tagName!=="ARTICLE";)Array.from(mo.querySelectorAll(":scope > param")).forEach($f=>{uo.push({...Object.fromEntries(Array.from($f.attributes).map(xf=>[xf.name,xf.value])),idx:po}),po++}),mo=mo.parentElement;const wo={};uo.forEach($f=>{let xf=Object.keys($f).find(Af=>Af.indexOf("ve-")===0&&!$f[Af]);xf?xf==="ve-d3plus-ring-network"&&(xf="ve-visjs"):(xf="ve-entity",$f[xf]=""),wo[xf]||(wo[xf]=[]),wo[xf].push($f)});let lf=[];Object.values(wo["ve-entity"]||[]).forEach($f=>{var Pf;let xf=$f.eid||$f.qid,Af=((Pf=$f.aliases)==null?void 0:Pf.split("|").filter(Bf=>Bf))||[],Cf=$f.file||$f.article;(Af.length||Cf)&&(window.customEntityData[xf]||(window.customEntityData[xf]={aliases:Af,file:Cf})),lf.push(xf)}),delete wo["ve-entity"],ut==null||ut.setAttribute("data-entities",lf.join(" "));function yf($f){let xf=document.createElement("ul");return $f.forEach(Af=>{let Cf=document.createElement("li");Cf.innerText=W(Af),xf.appendChild(Cf)}),xf}function cf($f,xf,Af){Object.entries(xf).filter(([Cf,Pf])=>Af[Cf]!==void 0).forEach(([Cf,Pf])=>{$f.setAttribute(Af[Cf]||Cf,Pf==="false"?"":Pf==="true"?null:Pf)})}function vf($f,xf,Af){let Cf=document.createElement($f);return Cf.setAttribute("slot",xf),xf==="ve-compare"?(cf(Cf,Af[0],{caption:""}),Cf.appendChild(yf(Af))):xf==="ve-iframe"?cf(Cf,Af[0],{allow:"",allowfullscreen:"",allowtransparency:"",caption:"",frameborder:"",loading:"",name:"",src:""}):xf==="ve-image"||xf==="ve-gallery"?Af.length===1?cf(Cf,Af[0],{attribution:"",caption:"",data:"","data-id":"",description:"",fit:"",label:"",license:"",manifest:"",refresh:"",region:"",rotate:"",rotation:"",seq:"",src:"",title:"",url:"","zoom-on-scroll":""}):(cf(Cf,Af[0],{"zoom-on-scroll":""}),Cf.appendChild(yf(Af))):xf==="ve-knightlab-timeline"?cf(Cf,Af[0],{caption:"","hash-bookmark":"","initial-zoom":"",source:"","timenav-position":""}):xf==="ve-map"?(cf(Cf,Af[0],{basemap:"basemaps",caption:"",center:"",data:"","data-id":"",entities:"","gesture-handling":"","gh-dir":"",marker:"",overlay:"","prefer-geojson":"","scroll-wheel-zoom":"",title:"",zoom:"","zoom-on-click":""}),Cf.appendChild(yf(Af.slice(1)))):xf==="ve-plant-specimen"?cf(Cf,Af[0],{caption:"",eid:"",jpid:"",max:"",qid:"","taxon-name":"",wdid:""}):xf==="ve-video"?cf(Cf,Af[0],{alt:"",autoplay:"",caption:"","data-id":"",end:"",fit:"",id:"",muted:"","no-caption":"",poster:"",src:"",start:"",sync:"",vid:""}):xf==="ve-visjs"?cf(Cf,Af[0],{caption:"",edges:"",hierarchical:"",nodes:"",title:"caption",url:""}):xf==="data"?Cf.appendChild(yf(Af)):console.log(`makeViewer: slotName ${xf} not recognized, props=${Object.keys(Af[0]||{})}`),Cf}let _f=document.createElement("ve-j1-viewers-slots");_f.dataset.id=ot,yn.appendChild(_f),_f.setAttribute("viewers",[...Object.keys(wo).filter($f=>$f!=="ve-map-marker"&&$f!=="ve-map-layer"),...mode==="dev"?["data"]:[]].join(" ")),Object.entries(wo).forEach(([$f,xf])=>{$f==="ve-map-marker"||$f==="ve-map-layer"||(xf[0].entities=lf.join(" "),xf[0]["data-id"]=_f.dataset.id,$f==="ve-map"?_f.appendChild(vf("ve-map",$f,[...xf,...Object.values(wo["ve-map-marker"]||{}),...Object.values(wo["ve-map-layer"]||{})].sort((Af,Cf)=>Af.idx-Cf.idx))):_f.appendChild(vf($f,$f,xf)))}),_f.appendChild(vf("div","data",uo))}),Array.from(F.querySelectorAll(".segment")).forEach(rt=>{let ot=rt.children[1],ut=rt.parentElement;for(;ut&&ut.tagName!=="ARTICLE";)ut.querySelectorAll(":scope > param").forEach(yn=>ot.appendChild(yn.cloneNode(!0))),ut=ut.parentElement});let q=F.querySelector("main"),K=document.createElement("main");K.className="page-content markdown-body";let X=document.createElement("div");X.className="content",X.innerHTML=q.innerHTML;let tt=document.createElement("div");return tt.className="viewers",K.appendChild(X),K.appendChild(tt),q.replaceWith(K),F}function setStickyOffsets(F){function W(K){let X=K.getBoundingClientRect();return K.tagName==="VE-HEADER"||K.tagName==="VE-BREADCRUMBS"||X.top>=0&&X.top<=window.innerHeight}let q=Array.from(F.querySelectorAll(".sticky")).filter(K=>W(K)).sort((K,X)=>{let tt=K.getBoundingClientRect().top,rt=X.getBoundingClientRect().top;return tt1){q[0].style.zIndex=`${q.length}`;for(let K=1;K=0;--ot){let ut=q[ot],yn=ut.getBoundingClientRect(),uo=yn.x,po=yn.x+yn.width;if(uo<=rt&&po>=tt){let mo=parseInt(ut.style.top.replace(/px/,""))||0;q[K].style&&(q[K].style.top=`${Math.floor(mo+yn.height)}px`);break}}}}}let priorActiveParagraph,currentActiveParagraph;function observeVisible(F,W,q=0){var rt;W=W||!1;let K=q+((rt=Array.from(F.querySelectorAll("VE-HEADER")).map(ot=>(parseInt(ot.style.top.replace(/px/,""))||0)+ot.getBoundingClientRect().height))==null?void 0:rt[0])||0;isJunctureV1=!0;const X={},tt=new IntersectionObserver((ot,ut)=>{var uo,po;for(const mo of ot){let wo=mo.target,lf=wo.id||((uo=wo.parentElement)==null?void 0:uo.id)||"",yf=mo.intersectionRatio;yf>0?X[lf]={para:wo,intersectionRatio:yf}:delete X[lf]}let yn=Object.values(X).sort((mo,wo)=>wo.intersectionRatio-mo.intersectionRatio||mo.para.getBoundingClientRect().top-wo.para.getBoundingClientRect().top);if(W)currentActiveParagraph=(po=yn[0])==null?void 0:po.para;else{let mo=yn.find(wo=>wo.para.classList.contains("active"));mo&&(currentActiveParagraph=mo.para)}if(currentActiveParagraph!==priorActiveParagraph){let mo,wo;isJunctureV1&&(mo=priorActiveParagraph==null?void 0:priorActiveParagraph.nextElementSibling,wo=currentActiveParagraph==null?void 0:currentActiveParagraph.nextElementSibling,mo&&mo.classList.remove("active")),priorActiveParagraph=currentActiveParagraph,W&&(F.querySelectorAll("p.active, ol.active, ul.active").forEach(lf=>lf.classList.remove("active")),currentActiveParagraph==null||currentActiveParagraph.classList.add("active"),wo&&wo.classList.add("active")),setStickyOffsets(F)}},{root:null,threshold:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],rootMargin:`${K?-K:0}px 0px 0px 0px`});F.querySelectorAll("p, .segment > ol, .segment > ul").forEach(ot=>tt.observe(ot))}function isJunctureV1(F){return!!F.querySelector("param[ve-config]")}function elFromHtml(F){return new DOMParser().parseFromString(F,"text/html").querySelector("body")}function markdownToHtml(F){return marked$1.use(window.markedFootnote()).parse(F)}function structureContent(F){let W=document.createElement("main");W.innerHTML=F,convertTags(W);let q=restructure(W);return isJunctureV1(W)&&(q=restructureForJ1(q)),q}const _hoisted_1$t=["innerHTML"],_sfc_main$v=defineComponent({__name:"Article.ce",props:{base:{type:String},branch:{type:String,default:"main"},owner:{type:String},path:{type:String,default:"README.md"},repo:{type:String},repoIsWritable:{type:Boolean,default:!1}},setup(F){const W=F,q=ref(null),K=computed(()=>{var ut,yn;return(yn=(ut=q.value)==null?void 0:ut.getRootNode())==null?void 0:yn.host});watch$1(K,ut=>{ut.parentElement.addEventListener("scroll",()=>ot())}),watch$1(q,()=>{setTimeout(()=>ot(),200)});const X=ref(),tt=computed(()=>"article markdown-body");watch$1(X,()=>{nextTick(()=>{observeVisible(q.value,!0,612)})});const rt=ref(W.repoIsWritable);watch$1(W,()=>{rt.value=W.repoIsWritable});function ot(){var uo,po;let ut=(uo=q.value)==null?void 0:uo.querySelector("ve-header"),yn=(po=q.value)==null?void 0:po.querySelector(".viewers.active");if(ut&&yn){let mo=ut.getBoundingClientRect().top,wo=ut.getBoundingClientRect().height,lf=mo+wo;yn.style.top=`${lf}px`,yn.style.height=`calc(100dvh - ${lf+32}px)`}}return onMounted(async()=>{let ut=new DOMParser().parseFromString(K.value.textContent,"text/html").body;ut.querySelectorAll("ve-image, ve-map, ve-gallery").forEach(yn=>{yn.setAttribute("base",W.base),rt&&yn.setAttribute("repo-is-writable","")}),X.value=ut.innerHTML}),(ut,yn)=>(openBlock(),createElementBlock("article",{ref_key:"article",ref:q,innerHTML:X.value,class:normalizeClass(tt.value),style:{width:"100%"}},null,10,_hoisted_1$t))}}),_style_0$t=`@import"https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900";.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;color:#1f2328;background-color:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:" ";display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,");mask-image:url("data:image/svg+xml,")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none!important}.markdown-body a{background-color:transparent;color:#0969da;text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:600}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:600;padding-bottom:.3em;font-size:2em;border-bottom:1px solid hsla(210,18%,87%,1)}.markdown-body mark{background-color:#fff8c5;color:#1f2328}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-.25em}.markdown-body sup{top:-.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box;background-color:#fff}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em 40px}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid hsla(210,18%,87%,1);height:.25em;padding:0;margin:24px 0;background-color:#d0d7de;border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;-moz-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;-moz-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::-moz-placeholder{color:#6e7781;opacity:1}.markdown-body ::placeholder{color:#6e7781;opacity:1}.markdown-body hr:before{display:table;content:""}.markdown-body hr:after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:-moz-max-content;width:max-content;max-width:100%;overflow:auto}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body details:not([open])>*:not(summary){display:none!important}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid #0969da;outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid #0969da;outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;line-height:10px;color:#1f2328;vertical-align:middle;background-color:#f6f8fa;border:solid 1px rgba(175,184,193,.2);border-bottom-color:#afb8c133;border-radius:6px;box-shadow:inset 0 -1px #afb8c133}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.markdown-body h2{font-weight:600;padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid hsla(210,18%,87%,1)}.markdown-body h3{font-weight:600;font-size:1.25em}.markdown-body h4{font-weight:600;font-size:1em}.markdown-body h5{font-weight:600;font-size:.875em}.markdown-body h6{font-weight:600;font-size:.85em;color:#656d76}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:#656d76;border-left:.25em solid #d0d7de}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible!important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.markdown-body .mr-2{margin-right:8px!important}.markdown-body:before{display:table;content:""}.markdown-body:after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0!important}.markdown-body>*:last-child{margin-bottom:0!important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:#d1242f}.markdown-body .anchor{float:left;padding-right:4px;margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:16px}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:#1f2328;vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body table th{font-weight:600}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid #d0d7de}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:#fff;border-top:1px solid hsla(210,18%,87%,1)}.markdown-body table tr:nth-child(2n){background-color:#f6f8fa}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid #d0d7de}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:#1f2328}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:#afb8c133;border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;color:#1f2328;background-color:#f6f8fa;border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px 8px 9px;text-align:right;background:#ffffff;border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:600;background:#f6f8fa;border-top:0}.markdown-body [data-footnote-ref]:before{content:"["}.markdown-body [data-footnote-ref]:after{content:"]"}.markdown-body .footnotes{font-size:12px;color:#656d76;border-top:1px solid #d0d7de}.markdown-body .footnotes ol{padding-left:16px}.markdown-body .footnotes ol ul{display:inline-block;padding-left:16px;margin-top:16px}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target:before{position:absolute;top:-8px;right:-8px;bottom:-8px;left:-24px;pointer-events:none;content:"";border:2px solid #0969da;border-radius:6px}.markdown-body .footnotes li:target{color:#1f2328}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body .pl-c{color:#57606a}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:#0550ae}.markdown-body .pl-e,.markdown-body .pl-en{color:#6639ba}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:#24292f}.markdown-body .pl-ent{color:#116329}.markdown-body .pl-k{color:#cf222e}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:#0a3069}.markdown-body .pl-v,.markdown-body .pl-smw{color:#953800}.markdown-body .pl-bu{color:#82071e}.markdown-body .pl-ii{color:#f6f8fa;background-color:#82071e}.markdown-body .pl-c2{color:#f6f8fa;background-color:#cf222e}.markdown-body .pl-sr .pl-cce{font-weight:700;color:#116329}.markdown-body .pl-ml{color:#3b2300}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:700;color:#0550ae}.markdown-body .pl-mi{font-style:italic;color:#24292f}.markdown-body .pl-mb{font-weight:700;color:#24292f}.markdown-body .pl-md{color:#82071e;background-color:#ffebe9}.markdown-body .pl-mi1{color:#116329;background-color:#dafbe1}.markdown-body .pl-mc{color:#953800;background-color:#ffd8b5}.markdown-body .pl-mi2{color:#eaeef2;background-color:#0550ae}.markdown-body .pl-mdr{font-weight:700;color:#8250df}.markdown-body .pl-ba{color:#57606a}.markdown-body .pl-sg{color:#8c959f}.markdown-body .pl-corl{text-decoration:underline;color:#0a3069}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;font-size:1em;font-style:normal!important;font-weight:400;line-height:1;vertical-align:-.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:400}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:4px}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body .contains-task-list:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list{position:relative}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:8px 16px;margin-bottom:16px;color:inherit;border-left:.25em solid #d0d7de}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:500;align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:#0969da}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:#0969da}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:#8250df}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:#8250df}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:#9a6700}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:#9a6700}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:#1f883d}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:#1a7f37}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:#cf222e}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:#d1242f}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));grid-auto-rows:1fr;row-gap:2em;-moz-column-gap:3em;column-gap:3em}.cards.wrapper{margin-top:0}.cards.wrapper>section{padding:0}.card{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto auto 1fr 0px;padding:0}.card p{border:none}.card>img{grid-area:1 / 1 / 2 / 2;width:100%;height:300px;-o-object-fit:cover;object-fit:cover}.card>a{grid-area:2 / 1 / 3 / 2;font-weight:700;font-size:1.5em;line-height:1.2;padding:1.3rem .5rem .2rem;text-decoration:none;color:#0164b9}.card>a:hover{text-decoration:underline}.card>ul{grid-area:3 / 1 / 4 / 2;list-style:none;padding:.4rem .5rem;margin:0;font-size:1rem;font-weight:400;max-height:260px;overflow-y:scroll}.clamp5{-webkit-line-clamp:5}.read-more input{opacity:0;position:absolute;pointer-events:none}.read-more input:focus~label{outline:-webkit-focus-ring-color auto 5px}.read-more input:checked+p{-webkit-line-clamp:unset}.read-more input:checked~label,.read-more p:not(.truncated)~label{display:none}.read-more>p{grid-area:4 / 1 / 5 / 2;align-self:flex-start;min-height:100px;line-height:1.4;font-size:.9em;padding:.5rem .5rem 0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;margin:0 0 .2rem;-webkit-line-clamp:8}.read-more label{margin-left:.5rem;border-radius:4px;padding:.2em .6em;border:1px solid #555;background-color:#777;color:#fff;font-size:.7em}.read-more label:hover{background-color:#555}@media only screen and (max-width: 768px){.cards{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));-moz-column-gap:1em;column-gap:1em;row-gap:1/5em}.card{font-size:1em;line-height:1.2;border:1px solid #eee;border-radius:.5em}.card>img{height:150px}.card>a{font-size:1.2em;padding:.8rem .5rem .2rem}}:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}*,*:before,*:after{box-sizing:border-box}*{margin:0}@keyframes fadeInAnimation{0%{opacity:0}to{opacity:1}}article{font-family:Roboto,sans-serif;animation:fadeInAnimation ease .3s;animation-iteration-count:1;animation-fill-mode:forwards;width:min(1200px,100% - 4rem);margin-inline:auto;background-color:#fff}article .markdown-body h1,article .markdown-body h2{border-bottom:none;padding-bottom:0}article .markdown-body li>p{margin:0}article .markdown-body{font-size:1.2em;line-height:1.5;margin-top:1em}article .markdown-body pre code{white-space:pre-wrap}@media only screen and (max-width: 768px){article{font-size:1em;width:calc(100% - 2em)}ve-header{width:100%}}section{position:relative;clear:both;margin-block-start:0;margin-block-end:0;background-color:inherit}.flow-root section{display:flow-root}.flow-root section h1,.flow-root section h2,.flow-root section h3,.flow-root section h4,.flow-root section h5,.flow-root section h6{margin-top:12px;margin-bottom:12px}ve-snippet,ve-footer ul,ve-header ul,ve-image ul,ve-map ul,ve-menu ul,ve-navbar ul,ve-snippet pre{display:none}ve-image,ve-map{margin-bottom:2em}ve-image img{max-width:100%;height:auto}ve-entity-infobox{position:relative;border-bottom:1px solid #ccc}ve-header{z-index:10;margin-bottom:1em}.columns{display:grid;gap:1em;grid-template-columns:repeat(auto-fit,minmax(275px,1fr))}.sticky{position:sticky;top:0;background-color:inherit;z-index:1}.hide{display:none}ve-footer.sticky{bottom:0}@media (min-width: 600px){.left{float:left;padding-right:1em}.right{float:right;padding-left:1em}.left,.right{width:50%;margin-bottom:1em}}p audio{width:250px;height:24px;vertical-align:middle}.showactive{padding-bottom:80dvh}.showactive .active{background-color:#fff;box-shadow:#00000026 1.95px 1.95px 2.6px}section#references{margin-top:2em}section#references h1{font-size:1.5em}section#references P{font-size:1em;margin-bottom:.7em}a.flyto,mark.flyto,a.play,mark.play,a.qid,mark.qid,a.zoom,mark.zoom,ve-entity-infobox{cursor:pointer;background:unset;border-bottom:1px solid #ccc;color:#444}a.flyto:hover,mark.flyto:hover,a.play:hover,mark.play:hover,a.qid:hover,mark.qid:hover,a.zoom:hover mark.zoom:hover,ve-entity-infobox:hover{border-bottom:2px solid #444;background:#eee}a.flyto:after,mark.flyto:after,a.play:after,mark.play:after,a.qid:after,mark.qid:after,a.zoom:after,mark.zoom:after,ve-entity-infobox:after{font-size:50%;line-height:0;position:relative;vertical-align:baseline;top:-.5em;padding-left:2px;padding-right:4px}a.flyto:after,mark.flyto:after{content:"✈";font-size:120%;top:0}a.play:after,mark.play:after{content:"▶"}a.zoom:after,mark.zoom:after{content:"🔎"}p span.headline{font-weight:500}.resume>section:first-of-type{display:grid;gap:1em;grid-template-columns:repeat(auto-fit,minmax(275px,1fr))}.resume>section:first-of-type>section:nth-of-type(2){display:flex;margin-left:auto;gap:1em}.resume>section:first-of-type>section:nth-of-type(2) li{list-style:none;display:flex;align-items:center;gap:.5em}.resume>section:first-of-type>section:nth-of-type(2) li img{height:24px;width:24px}.resume>section:first-of-type>section:nth-of-type(2)>p>img{max-width:120px;height:auto;border-radius:50%;box-shadow:#0000003d 0 3px 8px}article.j1{width:100%;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;grid-template-areas:"header" "main" "footer"}article.j1>*{width:100%}.j1 ve-header{grid-area:header;position:sticky;top:-300px;z-index:10;margin-bottom:0}.j1 main{grid-area:main;display:grid;grid-template-columns:1fr 0;grid-template-areas:"content viewers";background-color:#f8f8f8!important;font-size:1.3em!important;line-height:1.6!important}.j1 .content{grid-area:content;margin:.5em}.j1 .viewers{grid-area:viewers}.j1 footer{grid-area:footer}.j1 .segment{display:flex;flex-direction:column;gap:.5em;margin:1em 0}.j1 .segment>ve-j1-viewers{width:100%;align-self:center}.j1 .segment>p{margin:0;padding:0;border-radius:8px;border:1px solid #f8f8f8}.j1 .sticky{position:sticky;top:0}.j1 .footnote div,.j1 .footnotes div{white-space:unset}.j1 .footnote li>p,.j1 .footnotes li>p{margin:0;background-color:inherit;border-color:inherit;box-shadow:none}.j1 .content>section:first-of-type>h1,.j1 .content>section:first-of-type>h2,.j1 .content>section:first-of-type>h3{margin-top:0}@media (min-width: 800px){.j1 main{grid-template-columns:1fr 1fr;padding-left:1em}.j1 .content{padding-right:1em}.j1 p.active,.j1 ol.active,.j1 ul.active{background-color:#fff;box-shadow:0 0 3px 1px #00000040;border-color:#9e9e9e}.j1 .segment{margin:0}.j1 .segment>p{padding:.5em}.j1 .segment>ve-j1-viewers{display:none}.j1 .viewers{grid-area:viewers;display:block;height:calc(100dvh - 100px);margin-top:0}.j1 .viewers{visibility:hidden;position:fixed;top:100px;right:1em;height:calc(-100px + 100dvh);width:calc(50% - 1em);z-index:unset}.j1 .viewers.active{display:block;visibility:visible;z-index:5}.j1 main{display:block;width:50%}.j1 .content{margin:0 0 80dvh}}@media print{ve-footer{display:none}.pagebreak{-moz-column-break-before:always;break-before:always}.keep-together,.section2,.section3{-moz-column-break-inside:avoid;break-inside:avoid}article{font-size:1rem;padding-bottom:4em!important}.j1 main{width:100%}.j1 .viewers{visibility:visible;position:unset}.j1 .segment{flex-direction:row;margin-bottom:2em}.j1 .segment>*{flex:1}.j1 p.active{background-color:inherit;box-shadow:unset;border:1px solid #f8f8f8}.segment,ve-compare,ve-iframe,ve-image,ve-knightlab-timeline ve-map,ve-plant-specimen ve-video,ve-visjs{page-break-before:auto;page-break-after:auto;page-break-inside:avoid}}.markdown-body .footnotes,.footnote,.footnotes{font-size:.8em;overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}:host{display:block;height:100%}table[id]{display:none} +`,Article=_export_sfc(_sfc_main$v,[["styles",[_style_0$t]]]);class EventBus{constructor(){this.events={}}on(W,q){this.events[W]=this.events[W]||[],this.events[W].push(q)}off(W,q){if(this.events[W]){for(let K=0;K{var Df,Lf;return(Lf=(Df=q.value)==null?void 0:Df.getRootNode())==null?void 0:Lf.host}),X=ref(null);watch$1(X,async Df=>{!tt.value&&W.src&&(tt.value=await getManifest(W.src)),uo=Df,uo.addEventListener("play",()=>{wo.value||(wo.value=!0,W.start&&Hf(W.start,W.end))}),vf()});const tt=ref(null),rt=computed(()=>tt.value?getItemInfo(tt.value):null),ot=computed(()=>{var Df;return(Df=rt.value)==null?void 0:Df.id}),ut=computed(()=>{var Df;return(Df=rt.value)==null?void 0:Df.format}),yn=computed(()=>{var Df;return((Df=K.value)==null?void 0:Df.style.display)==="inline-block"});watch$1(yn,Df=>{K.value.style.width=Df?"250px":"100%"}),watch$1(X,Df=>{Df&&yn.value&&(Df.style.height="24px",Df.style.verticalAlign="middle")});let uo;const po=ref(!1),mo=ref(!1),wo=ref(!1);watch$1(K,async()=>{!tt.value&&W.src&&(tt.value=await getManifest(W.src)),yf(),EventBus$1.on("seekto",Df=>Hf(Df.start,Df.end)),W.sync?lf():W.autoplay&&W.start&&Hf(W.start,W.end)});function lf(){let Df=Array.from(document.querySelectorAll("p[data-head]")).map(Lf=>{let[kf,...Nf]=Lf.dataset.head.split(/\s+/),Yf=document.createElement("a");if(Yf.classList.add("play"),Yf.href="javascript:;",Yf.textContent=kf,Yf.addEventListener("click",()=>{Hf(Lf.dataset.head)}),Lf.insertBefore(document.createElement("br"),Lf.firstChild),Nf.length>0){let Gf=document.createElement("span");Gf.classList.add("headline"),Gf.textContent=Nf.join(" "),Lf.insertBefore(Gf,Lf.firstChild)}return Lf.insertBefore(Yf,Lf.firstChild),{start:Cf(Lf.dataset.head.split(/\s+/)[0]),id:Lf.id}});EventBus$1.on("audio-at-time",Lf=>{let kf=Lf.time,Nf=Df.find(Yf=>{var Gf;return Yf.start<=kf&&(((Gf=Df[Df.indexOf(Yf)+1])==null?void 0:Gf.start)||1/0)>kf});if(Nf&&uo&&mo.value){let Yf=document.getElementById(Nf.id);Yf&&Yf.scrollIntoView({behavior:"smooth",block:"center"})}})}function yf(){var Lf;let Df=(Lf=K.value)==null?void 0:Lf.parentElement;for(;Df;)Array.from(Df.querySelectorAll("a")).forEach(async kf=>{var rp;let Yf=new URL(kf.href).pathname.split("/").filter(ip=>ip).map(ip=>ip.toLowerCase()).map(ip=>ip==="playat"?"play":ip),Gf=Yf.indexOf("play");if(Gf>=0){let ip=Yf[Gf+1],ap=Yf.slice(Gf+2).filter(Ip=>Ip==="click"||Ip==="mouseover")[0]||"click",yp=Yf.slice(Gf+2).filter(Ip=>Ip!=="click"&&Ip!=="mouseover")[0],vp,Np,jp=kf.parentElement;for(;jp&&!Np;)Np=jp.dataset.id,jp=jp.parentElement;if(Np){let Ip=(rp=K.value)==null?void 0:rp.dataset.id;if(Ip&&Ip!==Np)return}if(yp&&(vp=document.getElementById(yp),!vp)||(vp=cf(kf,"ve-audio"),vp!==K.value))return;kf.classList.add("play"),kf.href="javascript:;",kf.setAttribute("data-play",ip),kf.addEventListener(ap,Ip=>{var og;let[Jp,ng]=((og=Ip.target.getAttribute("data-play"))==null?void 0:og.split(/\s+/))||[];Jp&&Hf(Jp,ng)})}}),Df=Df.parentElement}function cf(Df,Lf){let kf,Nf=Df.parentElement;for(;Nf&&!kf;)kf=Nf.querySelector(Lf),Nf=Nf.parentElement;return kf}async function vf(){Af().then(Df=>EventBus$1.emit("audio-at-time",{time:Math.round(Df)})),setInterval(async()=>{po.value=await $f(),mo.value=await _f(),mo.value&&Af().then(Df=>EventBus$1.emit("audio-at-time",{time:Math.round(Df)}))},1e3)}async function _f(){return!(uo.ended||uo.paused)}async function $f(){return await W.muted}function xf(Df){uo.muted=Df}async function Af(){return uo.currentTime}function Cf(Df){var Lf=Df.split(":").slice(0,3).map(Yf=>parseInt(Yf,10));let kf=0,Nf=1;for(;Lf.length>0;){let Yf=Lf.pop()||0;kf+=Nf*Yf,Nf*=60}return kf}let Pf=null,Bf=!1;function Hf(Df,Lf=""){let kf=Cf(Df),Nf=Lf?Cf(Lf)+1:-1;Pf&&(clearTimeout(Pf),Pf=null);let Yf=po.value;setTimeout(()=>{uo.play(),uo.currentTime=kf,Nf>=kf&&(Pf=setTimeout(()=>{Pf=null,uo.pause(),!Yf&&Bf&&xf(!1)},Nf===kf?200:(Nf-kf)*1e3))},200)}return(Df,Lf)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:q},[tt.value?(openBlock(),createElementBlock("audio",{key:0,ref_key:"html5Player",ref:X,id:"html5-player",controls:"",autoplay:W.autoplay},[createBaseVNode("source",{src:ot.value,type:ut.value},null,8,_hoisted_2$o)],8,_hoisted_1$s)):createCommentVNode("",!0),F.caption?(openBlock(),createElementBlock("div",_hoisted_3$l,toDisplayString(F.caption),1)):createCommentVNode("",!0)],512))}}),_style_0$s=`*{box-sizing:border-box}:host{display:block;width:100%}audio{width:100%}.caption{text-align:start;padding:6px 12px;font-size:1em;line-height:1.1;border:1px solid #ddd} `,Audio=_export_sfc(_sfc_main$u,[["styles",[_style_0$s]]]),_hoisted_1$r=["href"],_hoisted_2$n={key:1},_hoisted_3$k={key:2},_sfc_main$t=defineComponent({__name:"Breadcrumbs.ce",setup(F){const W=ref(null),q=computed(()=>{var X;return(X=W==null?void 0:W.value)==null?void 0:X.parentNode});watch$1(q,X=>{X.children[1].classList.remove("sticky")});const K=ref();return onMounted(()=>{var rt;let X=location.pathname,tt=((rt=window.config)==null?void 0:rt.baseurl)||"";K.value=[...X.split("/").filter(ot=>ot).slice(tt==null?void 0:tt.split("/").filter(ot=>ot).length).map((ot,ut,yn)=>({name:ot,path:tt+"/"+yn.slice(0,ut+1).join("/")}))]}),(X,tt)=>{var rt;return openBlock(),createElementBlock("div",{class:"main",ref_key:"root",ref:W},[(rt=K.value)!=null&&rt.length?(openBlock(!0),createElementBlock(Fragment,{key:0},renderList(K.value,(ot,ut)=>(openBlock(),createElementBlock(Fragment,{key:ot.path},[ut ")):createCommentVNode("",!0)],64))),128)):createCommentVNode("",!0)],512)}}}),_style_0$r=`.main{display:flex;align-items:center;gap:1rem;width:100%;flex-wrap:wrap;line-height:1.5;padding:.5rem 0;background-color:inherit}a{color:#0645ad}a:hover{text-decoration:underline}span{color:gray;font-weight:500} -`,Breadcrumbs=_export_sfc(_sfc_main$t,[["styles",[_style_0$r]]]),_hoisted_1$q=["slot","src","alt"],_sfc_main$s=defineComponent({__name:"Compare.ce",props:{caption:{type:String},height:{type:Number},width:{type:Number}},setup(F){const W=F,q=ref(null),K=computed(()=>{var Cf,Af;return(Af=(Cf=q.value)==null?void 0:Cf.getRootNode())==null?void 0:Af.host}),X=ref(null),tt=ref(null),rt=ref(null);watch$1(W,()=>{_f()}),watch$1(tt,Cf=>{Cf&&new ResizeObserver(()=>{lf.value||(lf.value=Cf==null?void 0:Cf.clientWidth),yf.value||(yf.value=(Cf==null?void 0:Cf.clientHeight)||lf.value)}).observe(Cf),wo()}),watch$1(rt,Cf=>{Cf&&new ResizeObserver(()=>{}).observe(Cf)});const ot=ref([]);watch$1(ot,async Cf=>{ut.value=await Promise.all(Cf.map(Af=>Af.src||Af.manifest?getManifest(Af.src||Af.manifest):fetch(`https://${iiifServer}/manifest/`,{method:"POST",body:JSON.stringify(Af)}).then(Bf=>Bf.json()))).then(Af=>Af.flat())});const ut=ref([]),yn=computed(()=>{if(!ut.value.length)return{width:0,height:0};let Cf=ut.value[0]&&$f({type:"Annotation",motivation:"painting"},ut.value[0],ot.value[0].seq||1).body;return{width:Cf.width,height:Cf.height}}),uo=computed(()=>{var Cf,Af;return Number(((((Cf=yn.value)==null?void 0:Cf.width)||1)/(((Af=yn.value)==null?void 0:Af.height)||1)).toFixed(4))});watch$1(uo,Cf=>{});const po=computed(()=>ut.value.length&&yf.value&&lf.value?Pf():[]),mo=computed(()=>W.caption||ot.value.filter(Cf=>Cf.caption).map(Cf=>Cf.caption).join(" "));function wo(){_f();function Cf(Bf){var kf;let Hf=[];Bf=Bf.replace(/”/g,'"').replace(/”/g,'"'),(kf=Bf==null?void 0:Bf.match(/[^\s"]+|"([^"]*)"/gmi))==null||kf.filter(Nf=>Nf).forEach(Nf=>{Hf.length>0&&Hf[Hf.length-1].indexOf("=")===Hf[Hf.length-1].length-1?Hf[Hf.length-1]=`${Hf[Hf.length-1]}${Nf}`:Hf.push(Nf)});let Df={},Lf=["src","caption","options","fit","rotate","seq"];return Hf.filter(Nf=>Nf!=="image").forEach((Nf,Yf)=>{if(Nf.indexOf("=")>0){let Gf=Nf.indexOf("="),rp=Nf.slice(0,Gf),ip=Nf.slice(Gf+1);Df[rp]=ip[0]==='"'?ip.slice(1,-1):ip}else Df[Lf[Yf]]=Nf[0]==='"'?Nf.slice(1,-1):Nf}),Df}function Af(){ot.value=Array.from(K.value.querySelectorAll("li")).map(Bf=>Cf(Bf.textContent||"")).filter(Bf=>Bf.src||Bf.manifest||Bf.url)}new MutationObserver(Bf=>{for(let Hf of Bf)Hf.type==="childList"&&Array.from(Hf.target.classList).indexOf("hydrated")>=0&&Af()}).observe(K.value,{childList:!0,subtree:!0,characterData:!0}),Af()}const lf=ref(0),yf=ref(0);function cf(Cf,Af="en"){return typeof Cf=="object"?Cf[Af]||Cf.none||Cf[Object.keys(Cf).sort()[0]]:Cf}function vf(Cf,Af="en"){return Cf?cf(Cf.label,Af):null}function _f(){var Cf;W.width?(lf.value=W.width,K.value.style.width=`${lf.value}px`):lf.value=((Cf=X.value)==null?void 0:Cf.clientWidth)||0,W.height&&(K.value.style.height=`${W.height}px`)}function $f(Cf,Af,Bf=1){const Hf=wf(Cf,Af);return Hf.length>=Bf?Hf[Bf-1]:null}function wf(Cf,Af,Bf=[]){if(Bf=Bf||[],Af.items)for(let Hf=0;HfDf[kf]&&Df[kf]!==Nf)?Bf.push(Df):wf(Cf,Df,Bf)}return Bf}function Pf(){let Cf=lf.value,Af=yf.value,Bf=lf.value/yf.value;return ot.value.map((Hf,Df)=>{let Lf=$f({type:"Annotation",motivation:"painting"},ut.value[Df],ot.value[Df].seq||1).body,kf,Nf,Yf,Gf;Hf.region&&([kf,Nf,Yf,Gf]=Hf.region.split(":").pop().split(",").map(Lp=>parseFloat(Lp)),Hf.region.split(":")[0]==="pct"&&(kf=Math.round(kf*Lf.width/100),Nf=Math.round(Nf*Lf.height/100),Yf=Math.round(Yf*Lf.width/100),Gf=Math.round(Gf*Lf.height/100)));const rp=Yf||Lf.width,ip=Gf||Lf.height,ap=Number((rp/ip).toFixed(4));let yp=rp,vp=ip;ap>Bf?(yp=Math.round(ip*Bf),vp=Math.round(yp/Bf)):(vp=Math.round(rp/Bf),yp=Math.round(vp*Bf));let Np=Lf.service[0].id||Lf.service[0]["@id"];const jp=(kf||0)+Math.abs(Math.round((yp-rp)*.5)),Ip=(Nf||0)+Math.abs(Math.round((vp-ip)*.5));let Jp=`${jp},${Ip},${yp},${vp}`,ng=Cf/yp,og=ng>1?`^pct:${Math.round(ng*100)}`:`${Cf},${Af}`;return`${Np}/${Jp}/${og}/${Hf.mirror?"!":""}${Hf.rotation||0}/${Hf.quality||"default"}.${Hf.format||"jpg"}`})}return(Cf,Af)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:q,class:"compare",style:{width:"100%"}},[createBaseVNode("div",{ref_key:"wrapper",ref:X,class:"wrapper"},[createBaseVNode("sl-image-comparer",{ref_key:"compare",ref:tt,position:"50"},[(openBlock(!0),createElementBlock(Fragment,null,renderList(po.value,(Bf,Hf)=>(openBlock(),createElementBlock("img",{key:`img-${Hf}`,slot:Hf===0?"before":"after",src:Bf,alt:vf(ut.value[Hf])},null,8,_hoisted_1$q))),128))],512),createBaseVNode("div",{ref_key:"captionEl",ref:rt,class:"caption"},toDisplayString(mo.value),513)],512)],512))}}),_style_0$q=`*,*:before,*:after{box-sizing:border-box}.wrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%}sl-image-comparer{width:100%;flex:1}.caption{background-color:#fff;margin-top:-.5em;padding:.3em;width:100%;font-size:1em;font-weight:400;text-align:center;margin-bottom:.3em;line-height:1.3} +`,Breadcrumbs=_export_sfc(_sfc_main$t,[["styles",[_style_0$r]]]),_hoisted_1$q=["slot","src","alt"],_sfc_main$s=defineComponent({__name:"Compare.ce",props:{caption:{type:String},height:{type:Number},width:{type:Number}},setup(F){const W=F,q=ref(null),K=computed(()=>{var Cf,Pf;return(Pf=(Cf=q.value)==null?void 0:Cf.getRootNode())==null?void 0:Pf.host}),X=ref(null),tt=ref(null),rt=ref(null);watch$1(W,()=>{_f()}),watch$1(tt,Cf=>{Cf&&new ResizeObserver(()=>{lf.value||(lf.value=Cf==null?void 0:Cf.clientWidth),yf.value||(yf.value=(Cf==null?void 0:Cf.clientHeight)||lf.value)}).observe(Cf),wo()}),watch$1(rt,Cf=>{Cf&&new ResizeObserver(()=>{}).observe(Cf)});const ot=ref([]);watch$1(ot,async Cf=>{ut.value=await Promise.all(Cf.map(Pf=>Pf.src||Pf.manifest?getManifest(Pf.src||Pf.manifest):fetch(`https://${iiifServer}/manifest/`,{method:"POST",body:JSON.stringify(Pf)}).then(Bf=>Bf.json()))).then(Pf=>Pf.flat())});const ut=ref([]),yn=computed(()=>{if(!ut.value.length)return{width:0,height:0};let Cf=ut.value[0]&&$f({type:"Annotation",motivation:"painting"},ut.value[0],ot.value[0].seq||1).body;return{width:Cf.width,height:Cf.height}}),uo=computed(()=>{var Cf,Pf;return Number(((((Cf=yn.value)==null?void 0:Cf.width)||1)/(((Pf=yn.value)==null?void 0:Pf.height)||1)).toFixed(4))});watch$1(uo,Cf=>{});const po=computed(()=>ut.value.length&&yf.value&&lf.value?Af():[]),mo=computed(()=>W.caption||ot.value.filter(Cf=>Cf.caption).map(Cf=>Cf.caption).join(" "));function wo(){_f();function Cf(Bf){var kf;let Hf=[];Bf=Bf.replace(/”/g,'"').replace(/”/g,'"'),(kf=Bf==null?void 0:Bf.match(/[^\s"]+|"([^"]*)"/gmi))==null||kf.filter(Nf=>Nf).forEach(Nf=>{Hf.length>0&&Hf[Hf.length-1].indexOf("=")===Hf[Hf.length-1].length-1?Hf[Hf.length-1]=`${Hf[Hf.length-1]}${Nf}`:Hf.push(Nf)});let Df={},Lf=["src","caption","options","fit","rotate","seq"];return Hf.filter(Nf=>Nf!=="image").forEach((Nf,Yf)=>{if(Nf.indexOf("=")>0){let Gf=Nf.indexOf("="),rp=Nf.slice(0,Gf),ip=Nf.slice(Gf+1);Df[rp]=ip[0]==='"'?ip.slice(1,-1):ip}else Df[Lf[Yf]]=Nf[0]==='"'?Nf.slice(1,-1):Nf}),Df}function Pf(){ot.value=Array.from(K.value.querySelectorAll("li")).map(Bf=>Cf(Bf.textContent||"")).filter(Bf=>Bf.src||Bf.manifest||Bf.url)}new MutationObserver(Bf=>{for(let Hf of Bf)Hf.type==="childList"&&Array.from(Hf.target.classList).indexOf("hydrated")>=0&&Pf()}).observe(K.value,{childList:!0,subtree:!0,characterData:!0}),Pf()}const lf=ref(0),yf=ref(0);function cf(Cf,Pf="en"){return typeof Cf=="object"?Cf[Pf]||Cf.none||Cf[Object.keys(Cf).sort()[0]]:Cf}function vf(Cf,Pf="en"){return Cf?cf(Cf.label,Pf):null}function _f(){var Cf;W.width?(lf.value=W.width,K.value.style.width=`${lf.value}px`):lf.value=((Cf=X.value)==null?void 0:Cf.clientWidth)||0,W.height&&(K.value.style.height=`${W.height}px`)}function $f(Cf,Pf,Bf=1){const Hf=xf(Cf,Pf);return Hf.length>=Bf?Hf[Bf-1]:null}function xf(Cf,Pf,Bf=[]){if(Bf=Bf||[],Pf.items)for(let Hf=0;HfDf[kf]&&Df[kf]!==Nf)?Bf.push(Df):xf(Cf,Df,Bf)}return Bf}function Af(){let Cf=lf.value,Pf=yf.value,Bf=lf.value/yf.value;return ot.value.map((Hf,Df)=>{let Lf=$f({type:"Annotation",motivation:"painting"},ut.value[Df],ot.value[Df].seq||1).body,kf,Nf,Yf,Gf;Hf.region&&([kf,Nf,Yf,Gf]=Hf.region.split(":").pop().split(",").map(Lp=>parseFloat(Lp)),Hf.region.split(":")[0]==="pct"&&(kf=Math.round(kf*Lf.width/100),Nf=Math.round(Nf*Lf.height/100),Yf=Math.round(Yf*Lf.width/100),Gf=Math.round(Gf*Lf.height/100)));const rp=Yf||Lf.width,ip=Gf||Lf.height,ap=Number((rp/ip).toFixed(4));let yp=rp,vp=ip;ap>Bf?(yp=Math.round(ip*Bf),vp=Math.round(yp/Bf)):(vp=Math.round(rp/Bf),yp=Math.round(vp*Bf));let Np=Lf.service[0].id||Lf.service[0]["@id"];const jp=(kf||0)+Math.abs(Math.round((yp-rp)*.5)),Ip=(Nf||0)+Math.abs(Math.round((vp-ip)*.5));let Jp=`${jp},${Ip},${yp},${vp}`,ng=Cf/yp,og=ng>1?`^pct:${Math.round(ng*100)}`:`${Cf},${Pf}`;return`${Np}/${Jp}/${og}/${Hf.mirror?"!":""}${Hf.rotation||0}/${Hf.quality||"default"}.${Hf.format||"jpg"}`})}return(Cf,Pf)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:q,class:"compare",style:{width:"100%"}},[createBaseVNode("div",{ref_key:"wrapper",ref:X,class:"wrapper"},[createBaseVNode("sl-image-comparer",{ref_key:"compare",ref:tt,position:"50"},[(openBlock(!0),createElementBlock(Fragment,null,renderList(po.value,(Bf,Hf)=>(openBlock(),createElementBlock("img",{key:`img-${Hf}`,slot:Hf===0?"before":"after",src:Bf,alt:vf(ut.value[Hf])},null,8,_hoisted_1$q))),128))],512),createBaseVNode("div",{ref_key:"captionEl",ref:rt,class:"caption"},toDisplayString(mo.value),513)],512)],512))}}),_style_0$q=`*,*:before,*:after{box-sizing:border-box}.wrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%}sl-image-comparer{width:100%;flex:1}.caption{background-color:#fff;margin-top:-.5em;padding:.3em;width:100%;font-size:1em;font-weight:400;text-align:center;margin-bottom:.3em;line-height:1.3} `,Compare=_export_sfc(_sfc_main$s,[["styles",[_style_0$q]]]);let GithubClient$1=class{constructor(W=""){this._shas={},this.authToken=W||window.localStorage.getItem("gh-auth-token")||window.localStorage.getItem("gh-unscoped-token")||""}b64EncodeUnicode(W){return btoa(encodeURIComponent(W).replace(/%([0-9A-F]{2})/g,function(q,K){return String.fromCharCode(parseInt(K,16))}))}b64DecodeUnicode(W){return decodeURIComponent(Array.prototype.map.call(atob(W),function(q){return"%"+("00"+q.charCodeAt(0).toString(16)).slice(-2)}).join(""))}user(){return fetch("https://api.github.com/user",{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}}).then(W=>W.json())}async isCollaborator(W,q,K){let X=`https://api.github.com/repos/${W}/${q}/collaborators/${K}`,tt=await fetch(X,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}});return tt.ok&&tt.status===204}organizations(){return fetch("https://api.github.com/user/orgs",{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}}).then(W=>W.json())}repos(W="",q=""){let K=W?`users/${W}`:q?`orgs/${q}`:"user";return fetch(`https://api.github.com/${K}/repos?per_page=100`,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}}).then(X=>X.json())}async userCanUpdateRepo(W,q){return console.log(`GithubClient.userCanUpdateRepo: acct=${W} repo=${q}`),this.user().then(K=>K.login).then(K=>q?this.isCollaborator(W,q,K):!1)}async createRepository({org:W=null,name:q="",description:K="",auto_init:X=!0}){let tt=W?`https://api.github.com/orgs/${W}/repos`:"https://api.github.com/user/repos",rt=await fetch(tt,{method:"POST",body:JSON.stringify({name:q,description:K,auto_init:X}),headers:{Authorization:`Token ${this.authToken}`}});return{status:rt.status,statusText:rt.statusText}}branches(W,q){return fetch(`https://api.github.com/repos/${W}/${q}/branches`,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}}).then(K=>K.json())}async getFile(W,q,K,X){let tt,rt=`https://api.github.com/repos/${W}/${q}/contents/${K}`;X&&(rt+=`?ref=${X}`);let ot=await fetch(rt,{cache:"no-cache",headers:{Authorization:`Token ${this.authToken}`}}).catch(ut=>{console.error(ut)});return ot.ok&&(ot=await ot.json(),tt=decodeURIComponent(escape(atob(ot.content)))),Promise.resolve({content:tt,sha:ot.sha})}async getSha(W,q,K,X){let tt=`https://api.github.com/repos/${W}/${q}/contents/${K}`;X&&(tt+=`?ref=${X}`);let rt=await fetch(tt,{headers:{Authorization:`Token ${this.authToken}`}});return rt.ok&&(rt=await rt.json()),rt.sha}async putFile(W,q,K,X,tt,rt=!1,ot="",ut=!1){let yn=`https://api.github.com/repos/${W}/${q}/contents/${K}`,uo=`${W}/${q}/${tt}/${K}`;ot=ot||this._shas[uo]||await this.getSha(W,q,K,tt),console.log(`putFile: acct=${W} repo=${q} path=${K} ref=${tt} sha=${ot} isBinaryString=${rt}`);let po=!!ot;if(console.log(`putFile: exists=${po}`),!po||ut){let mo={message:"API commit",content:rt?btoa(X):this.b64EncodeUnicode(X)};tt&&(mo.branch=tt),ot&&(mo.sha=ot);let wo=await fetch(yn,{method:"PUT",body:JSON.stringify(mo),headers:{Authorization:`Token ${this.authToken}`}});return wo.ok&&(ot=(await wo.json()).content.sha,this._shas[uo]=ot),{status:wo.status,statusText:wo.statusText,sha:ot}}else return{status:409,statusText:"File exists",sha:ot}}async deleteFile(W,q,K,X,tt=""){tt=tt||await this.getSha(W,q,K,X);let rt=`https://api.github.com/repos/${W}/${q}/contents/${K}`,ut=await fetch(rt,{method:"DELETE",body:JSON.stringify({message:"API commit",sha:tt}),headers:{Authorization:`Token ${this.authToken}`}});return ut=await ut.json(),console.log(ut),{status:ut.status,statusText:ut.statusText}}async defaultBranch(W,q){let K=null,X=`https://api.github.com/repos/${W}/${q}`,tt=await fetch(X,{headers:{Authorization:`Token ${this.authToken}`}});return tt.ok&&(tt=await tt.json(),K=tt.default_branch),K}async dirlist(W,q,K,X){var yn;K=K||"",X=X||await this.defaultBranch(W,q);let tt=[],rt=`https://api.github.com/repos/${W}/${q}/git/trees/${X}`,ot={Authorization:`Token ${this.authToken}`,Accept:"application/vnd.github.v3+json","If-None-Match":""},ut=K.split("/").filter(uo=>uo);for(let uo=0;uolf.path===ut[uo]):null;if(rt=wo?wo.url:null,!rt)break}if(rt){let uo=await fetch(rt,{headers:ot});tt=((uo.ok?await uo.json():{}).tree||[]).map(mo=>({name:mo.path,sha:mo.sha,type:mo.type==="tree"?"dir":"file"}))}return tt}async fullPath(W,q,K,X,tt=!1){let rt=K.split("/").filter(uo=>uo),ot=rt[rt.length-1],ut=await this.dirlist(W,q,rt.join("/"),X);if(ut.length===0&&(rt.pop(),ut=await this.dirlist(W,q,rt.join("/"),X)),!tt){let uo=[ot,`${ot}.md`,"README.md"];for(let po=0;pomo.type==="file"&&mo.name===uo[po])){rt.push(uo[po]);break}}return rt.join("/")}};var drawer_styles_default=i$a` ${component_styles_default} @@ -3362,9 +3362,9 @@ var V3=Object.defineProperty;var G3=(F,W,q)=>W in F?V3(F,W,{enumerable:!0,config > `:""} - `}};SlTag.styles=tag_styles_default;SlTag.dependencies={"sl-icon-button":SlIconButton};__decorateClass([n$4({reflect:!0})],SlTag.prototype,"variant",2);__decorateClass([n$4({reflect:!0})],SlTag.prototype,"size",2);__decorateClass([n$4({type:Boolean,reflect:!0})],SlTag.prototype,"pill",2);__decorateClass([n$4({type:Boolean})],SlTag.prototype,"removable",2);SlTag.define("sl-tag");const _hoisted_1$p={class:"content-path",style:{position:"relative"}},_hoisted_2$m={class:"workspace"},_hoisted_3$j=["content","disabled"],_hoisted_4$i=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512"},[createBaseVNode("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"})],-1),_hoisted_5$f=[_hoisted_4$i],_hoisted_6$e={class:"ws-path"},_hoisted_7$b={class:"breadcrumbs"},_hoisted_8$a=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M0 96C0 60.7 28.7 32 64 32H196.1c19.1 0 37.4 7.6 50.9 21.1L289.9 96H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16H286.6c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7H64z"})],-1),_hoisted_9$a=["innerHTML","onClick"],_hoisted_10$a=["onClick"],_hoisted_11$a=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512"},[createBaseVNode("path",{d:"M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"})],-1),_hoisted_12$9={slot:"suffix"},_hoisted_13$8=createBaseVNode("svg",{slot:"trigger",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},[createBaseVNode("path",{d:"M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"})],-1),_hoisted_14$7=["onClick"],_hoisted_15$6=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M170.5 51.6L151.5 80h145l-19-28.4c-1.5-2.2-4-3.6-6.7-3.6H177.1c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80H368h48 8c13.3 0 24 10.7 24 24s-10.7 24-24 24h-8V432c0 44.2-35.8 80-80 80H112c-44.2 0-80-35.8-80-80V128H24c-13.3 0-24-10.7-24-24S10.7 80 24 80h8H80 93.8l36.7-55.1C140.9 9.4 158.4 0 177.1 0h93.7c18.7 0 36.2 9.4 46.6 24.9zM80 128V432c0 17.7 14.3 32 32 32H336c17.7 0 32-14.3 32-32V128H80zm80 64V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16z"})],-1),_hoisted_16$6=["innerHTML","onClick"],_hoisted_17$6=["onClick"],_hoisted_18$6=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M0 96C0 60.7 28.7 32 64 32H196.1c19.1 0 37.4 7.6 50.9 21.1L289.9 96H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16H286.6c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7H64z"})],-1),_hoisted_19$5=["content"],_hoisted_20$5=["size","name"],_hoisted_21$5=createBaseVNode("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"})],-1),_hoisted_22$4=[_hoisted_21$5],_hoisted_23$4={noHeader:"",label:"Workspace",placement:"bottom",contained:"",class:"workspace-selector",style:{"--size":"100%"}},_hoisted_24$4={style:{display:"flex",height:"100%","align-items":"center"}},_hoisted_25$4={key:0,class:"github-select"},_hoisted_26$4={key:1,width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},_hoisted_27$4=createBaseVNode("path",{d:"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"},null,-1),_hoisted_28$4=[_hoisted_27$4],_hoisted_29$3={style:{"margin-left":"12px"}},_hoisted_30$3=["disabled"],_hoisted_31$3={key:0},_hoisted_32$3={key:0,slot:"trigger",class:"path-elem"},_hoisted_33$3={key:1,slot:"trigger",pill:"",size:"medium",class:"folder"},_hoisted_34$3=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512"},[createBaseVNode("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"})],-1),_hoisted_35$3=["checked","onClick","innerHTML"],_hoisted_36$3={key:0,class:"path-elem"},_hoisted_37$3={key:1,pill:"",size:"medium",class:"folder"},_hoisted_38$3=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512"},[createBaseVNode("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"})],-1),_hoisted_39$3=["disabled"],_hoisted_40$3={key:0},_hoisted_41$3={key:0,slot:"trigger",class:"path-elem"},_hoisted_42$3={key:1,slot:"trigger",pill:"",size:"medium"},_hoisted_43$3=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M32 32H480c17.7 0 32 14.3 32 32V96c0 17.7-14.3 32-32 32H32C14.3 128 0 113.7 0 96V64C0 46.3 14.3 32 32 32zm0 128H480V416c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V160zm128 80c0 8.8 7.2 16 16 16H336c8.8 0 16-7.2 16-16s-7.2-16-16-16H176c-8.8 0-16 7.2-16 16z"})],-1),_hoisted_44$3=["checked","onClick","innerHTML"],_hoisted_45$3=createBaseVNode("sl-divider",null,null,-1),_hoisted_46$3=createBaseVNode("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"})],-1),_hoisted_47$2={key:0,class:"path-elem"},_hoisted_48$1={key:1,pill:"",size:"medium"},_hoisted_49$1=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M32 32H480c17.7 0 32 14.3 32 32V96c0 17.7-14.3 32-32 32H32C14.3 128 0 113.7 0 96V64C0 46.3 14.3 32 32 32zm0 128H480V416c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V160zm128 80c0 8.8 7.2 16 16 16H336c8.8 0 16-7.2 16-16s-7.2-16-16-16H176c-8.8 0-16 7.2-16 16z"})],-1),_hoisted_50$1=["disabled"],_hoisted_51$1={key:0},_hoisted_52$1={key:0,slot:"trigger",class:"path-elem"},_hoisted_53$1={key:1,slot:"trigger",pill:"",size:"medium"},_hoisted_54$1=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M246.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 109.3 192 320c0 17.7 14.3 32 32 32s32-14.3 32-32l0-210.7 73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-64z"})],-1),_hoisted_55=["checked","onClick","innerHTML"],_hoisted_56={key:0,class:"path-elem"},_hoisted_57={key:1,pill:"",size:"medium"},_hoisted_58=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M246.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 109.3 192 320c0 17.7 14.3 32 32 32s32-14.3 32-32l0-210.7 73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-64z"})],-1),_hoisted_59={key:0},_hoisted_60={key:1,class:"dirs"},_hoisted_61=["onClick"],_hoisted_62={key:0,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_63=createBaseVNode("path",{d:"M0 96C0 60.7 28.7 32 64 32H196.1c19.1 0 37.4 7.6 50.9 21.1L289.9 96H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16H286.6c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7H64z"},null,-1),_hoisted_64=[_hoisted_63],_hoisted_65={key:1,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},_hoisted_66=createBaseVNode("path",{d:"M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z"},null,-1),_hoisted_67=[_hoisted_66],_hoisted_68=["content"],_hoisted_69=createBaseVNode("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"})],-1),_hoisted_70=[_hoisted_69],_hoisted_71=createBaseVNode("sl-input",{autocomplete:"off",required:"",id:"add-repo-input",placeholder:"Enter name",pattern:"^[A-z0-9\\-_]+$"},null,-1),_hoisted_72=createBaseVNode("br",null,null,-1),_hoisted_73=createBaseVNode("sl-button",{type:"submit",variant:"primary"},"Add",-1),_hoisted_74=createBaseVNode("sl-input",{autocomplete:"off",required:"",id:"add-file-input",placeholder:"Enter file path",pattern:"^\\/?([A-z0-9-_+]+\\/)*([A-z0-9\\-]+(\\.(css|md|json|geojson|yaml|yml))?)$"},null,-1),_hoisted_75=createBaseVNode("br",null,null,-1),_hoisted_76=createBaseVNode("sl-button",{type:"reset",variant:"default"},"Reset",-1),_hoisted_77=createBaseVNode("sl-button",{type:"submit",variant:"primary"},"Add",-1),_hoisted_78={id:"delete-file-dialog",label:"Confirm file delete"},_hoisted_79=["innerHTML"],_sfc_main$r=defineComponent({__name:"ContentSelector.ce",props:{contentPath:{type:String},sticky:{type:Boolean,default:!1},mode:{type:String,default:"media"},compact:{type:Boolean}},emits:["accessChanged","addMediaResource","contentPathChanged"],setup(F,{expose:W,emit:q}){const K=F;W({getDirList:yp,getFile:Np,putFile:jp,repositoryIsWriteable:vp});const X=new Set(["config.yaml","CNAME","index.html","404.html",".nojekyll"]),tt=ref("");watch$1(tt,()=>{q("contentPathChanged",tt.value)});const rt=ref(null),ot=computed(()=>{var bp;return(bp=rt==null?void 0:rt.value)==null?void 0:bp.parentNode});let ut,yn="",uo=!0;const po=ref();watch$1(po,()=>{po.value&&lp()});const mo=ref(isMobile$1()),wo=ref(""),lf=ref(),yf=ref(!1),cf=ref(!1);watch$1(wo,()=>{yf.value=window.localStorage.getItem("gh-auth-token")!==null,lf.value=new GithubClient$1(wo.value||"")}),watch$1(yf,()=>{yf||(yn="",cf.value=!1)}),watch$1(cf,()=>{q("accessChanged",{acct:_f.value,repo:wf.value,canUpdate:cf.value})}),watch$1(lf,async()=>{Lf(),yf.value&&(vf.value=await Gf(),yn=await lf.value.user().then(bp=>bp.login),await lf.value.repos(yn).then(bp=>{bp.find(Ep=>Ep.name==="essays")||lf.value.createRepository({name:"essays",description:"Juncture visual essays"}),bp.find(Ep=>Ep.name==="media")||lf.value.createRepository({name:"media",description:"Juncture media"})}),_f.value&&wf.value&&yn&&lf.value.isCollaborator(_f.value,wf.value,yn).then(bp=>cf.value=bp))});const vf=ref([]),_f=ref("");watch$1(vf,()=>{_f.value=_f.value||(vf.value.length>0?vf.value[0].login:null)}),watch$1(_f,(bp,Ep)=>{Ep&&(wf.value=""),rp().then(_p=>$f.value=_p)});const $f=ref([]),wf=ref("");watch$1($f,()=>{if(!wf.value&&$f.value.length>0)if($f.value.length===1)wf.value=$f.value[0].name;else{let bp=K.mode==="media"?"media":"essays";wf.value=$f.value.find(Ep=>Ep.name===bp)?bp:$f.value[0].name}});const Pf=ref([]),Cf=ref("");watch$1(wf,(bp,Ep)=>{Ep&&(Bf.value=[]),ap().then(_p=>kf()),Cf.value="",wf.value&&(yf.value&&_f.value&&lf.value.user().then(_p=>_p.login).then(_p=>wf.value?lf.value.isCollaborator(_f.value,wf.value,_p):!1).then(_p=>cf.value=_p),ip().then(_p=>Pf.value=_p))});let Af;watch$1(Pf,async()=>{!Af&&_f.value&&wf.value&&(Af=await lf.value.defaultBranch(_f.value,wf.value)),Af&&(Cf.value=Af)}),watch$1(Cf,()=>{Cf.value&&Bf.value&&Hf&&ap().then(bp=>kf())});const Bf=ref([]);watch$1(Bf,()=>{Cf.value&&ap().then(bp=>kf())});let Hf=!0;const Df=ref([]);watch$1(Df,()=>{Hf=Bf.value.length===0||Df.value.length>0}),onMounted(()=>{var bp;Yf(),window.addEventListener("storage",()=>Yf()),ut=(bp=ot==null?void 0:ot.value)==null?void 0:bp.querySelector(".workspace-selector")});function Lf(bp=""){var Ep;if(bp=bp||K.contentPath||"",bp){let[_p,Mp]=((Ep=bp.split(":").pop())==null?void 0:Ep.split("?"))||[],Yp=Mp?Object.fromEntries(Mp.split("&").map(hg=>hg.split("="))):{},ug=_p.split("/").filter(hg=>hg);ug.length>0&&(_f.value=ug[0]),ug.length>1&&(wf.value=ug[1]),ug.length>2&&(Bf.value=ug.slice(2)),Yp.ref&&(Cf.value=Yp.ref||"main")}}function kf(){if(_f.value&&wf.value){let bp=`gh:${_f.value}/${wf.value}`;Bf.value.length>0&&(bp+=`/${Bf.value.join("/")}`),Cf.value&&Cf.value!==Af&&(bp+=`?ref=${Cf.value}`),tt.value=bp}}async function Nf(){let Ep=await fetch("https://api.juncture-digital.org/gh-token");if(Ep.ok){let _p=await Ep.text();window.localStorage.setItem("gh-unscoped-token",_p)}}async function Yf(){window.localStorage.getItem("gh-unscoped-token")||await Nf(),wo.value=window.localStorage.getItem("gh-auth-token")||window.localStorage.getItem("gh-unscoped-token"),yf.value=window.localStorage.getItem("gh-auth-token")!==null}async function Gf(){return await Promise.all([lf.value.user(),lf.value.organizations()]).then(bp=>bp.flat())}async function rp(){return lf.value.repos(_f.value)}async function ip(){return lf.value.branches(_f.value,wf.value)}async function ap(){Df.value=[];let bp=await lf.value.dirlist(_f.value,wf.value,Bf.value.join("/"),Cf.value),Ep=bp.filter(Mp=>Mp.type==="dir"),_p=bp.filter(Mp=>Mp.type==="file"&&!X.has(Mp.name));uo&&_p.find(Mp=>Mp.name==="README.md")&&Ep.length===0&&(Bf.value.length===0||Bf.value[Bf.value.length-1]!=="README.md")&&(Bf.value=[...Bf.value,"README.md"]),Df.value=[...Ep,..._p]}function yp(){return Df.value}function vp(){return cf.value}async function Np(bp){var xg;let[Ep,_p]=((xg=bp.split(":").pop())==null?void 0:xg.split("?"))||[],Mp=_p?Object.fromEntries(_p.split("&").map(kg=>kg.split("="))):{},Yp=Ep.split("/").filter(kg=>kg),[ug,hg]=Yp.slice(0,2);return Ep=Yp.slice(2).filter(kg=>kg).join("/"),lf.value.getFile(ug,hg,Ep,Mp.ref||Cf.value)}async function jp(bp,Ep){var Dg;let[_p,Mp]=((Dg=bp.split(":").pop())==null?void 0:Dg.split("?"))||[],Yp=Mp?Object.fromEntries(Mp.split("&").map(lm=>lm.split("="))):{},ug=_p.split("/").filter(lm=>lm),[hg,xg]=ug.slice(0,2);_p=ug.slice(2).filter(lm=>lm).join("/");let kg=Yp.ref||Cf.value;return lf.value.putFile(hg,xg,_p,Ep,kg)}function Ip(bp){_f.value=bp.login}function Jp(bp){wf.value=bp.name}function ng(bp){Cf.value=bp.name}function og(bp){ut.hide(),uo=!0;let Ep=[...Bf.value];Hf||(Ep=Ep.slice(0,-1)),(Ep.length===0||Ep[Ep.length-1]!==bp.name)&&(Ep=[...Ep,bp.name]),Bf.value=Ep}function vg(bp){ut.hide(),uo=!1,Bf.value=bp===0?[]:Bf.value.slice(0,bp)}function Dp(bp){K.mode==="essays"?xp():$p(bp)}function Lp(bp){return bp.toLowerCase().split("-").map(function(Ep){return Ep.charAt(0).toUpperCase()+Ep.slice(1)}).join(" ")}function xp(){var _p,Mp;let bp=(_p=ot.value)==null?void 0:_p.querySelector("#add-file-form");bp.onclick||(bp.onclick=function(){},bp.addEventListener("submit",async Yp=>{var Dg;Yp.preventDefault();let ug=(Dg=ot.value)==null?void 0:Dg.querySelector("#add-file-input"),hg=[...Bf.value,...ug.value.split("/").filter(lm=>lm)],xg=hg[hg.length-1];hg[hg.length-1].indexOf(".")>0?hg[hg.length-1]=hg[hg.length-1].replace(/readme\.md/,"README.md"):hg.push("README.md");let kg=hg.join("/");xg=Lp(xg),await lf.value.putFile(_f.value,wf.value,kg,`# ${xg} + `}};SlTag.styles=tag_styles_default;SlTag.dependencies={"sl-icon-button":SlIconButton};__decorateClass([n$4({reflect:!0})],SlTag.prototype,"variant",2);__decorateClass([n$4({reflect:!0})],SlTag.prototype,"size",2);__decorateClass([n$4({type:Boolean,reflect:!0})],SlTag.prototype,"pill",2);__decorateClass([n$4({type:Boolean})],SlTag.prototype,"removable",2);SlTag.define("sl-tag");const _hoisted_1$p={class:"content-path",style:{position:"relative"}},_hoisted_2$m={class:"workspace"},_hoisted_3$j=["content","disabled"],_hoisted_4$i=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512"},[createBaseVNode("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"})],-1),_hoisted_5$f=[_hoisted_4$i],_hoisted_6$e={class:"ws-path"},_hoisted_7$b={class:"breadcrumbs"},_hoisted_8$a=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M0 96C0 60.7 28.7 32 64 32H196.1c19.1 0 37.4 7.6 50.9 21.1L289.9 96H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16H286.6c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7H64z"})],-1),_hoisted_9$a=["innerHTML","onClick"],_hoisted_10$a=["onClick"],_hoisted_11$a=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512"},[createBaseVNode("path",{d:"M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"})],-1),_hoisted_12$9={slot:"suffix"},_hoisted_13$8=createBaseVNode("svg",{slot:"trigger",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},[createBaseVNode("path",{d:"M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"})],-1),_hoisted_14$7=["onClick"],_hoisted_15$6=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M170.5 51.6L151.5 80h145l-19-28.4c-1.5-2.2-4-3.6-6.7-3.6H177.1c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80H368h48 8c13.3 0 24 10.7 24 24s-10.7 24-24 24h-8V432c0 44.2-35.8 80-80 80H112c-44.2 0-80-35.8-80-80V128H24c-13.3 0-24-10.7-24-24S10.7 80 24 80h8H80 93.8l36.7-55.1C140.9 9.4 158.4 0 177.1 0h93.7c18.7 0 36.2 9.4 46.6 24.9zM80 128V432c0 17.7 14.3 32 32 32H336c17.7 0 32-14.3 32-32V128H80zm80 64V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16z"})],-1),_hoisted_16$6=["innerHTML","onClick"],_hoisted_17$6=["onClick"],_hoisted_18$6=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M0 96C0 60.7 28.7 32 64 32H196.1c19.1 0 37.4 7.6 50.9 21.1L289.9 96H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16H286.6c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7H64z"})],-1),_hoisted_19$5=["content"],_hoisted_20$5=["size","name"],_hoisted_21$5=createBaseVNode("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"})],-1),_hoisted_22$4=[_hoisted_21$5],_hoisted_23$4={noHeader:"",label:"Workspace",placement:"bottom",contained:"",class:"workspace-selector",style:{"--size":"100%"}},_hoisted_24$4={style:{display:"flex",height:"100%","align-items":"center"}},_hoisted_25$4={key:0,class:"github-select"},_hoisted_26$4={key:1,width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},_hoisted_27$4=createBaseVNode("path",{d:"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"},null,-1),_hoisted_28$4=[_hoisted_27$4],_hoisted_29$3={style:{"margin-left":"12px"}},_hoisted_30$3=["disabled"],_hoisted_31$3={key:0},_hoisted_32$3={key:0,slot:"trigger",class:"path-elem"},_hoisted_33$3={key:1,slot:"trigger",pill:"",size:"medium",class:"folder"},_hoisted_34$3=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512"},[createBaseVNode("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"})],-1),_hoisted_35$3=["checked","onClick","innerHTML"],_hoisted_36$3={key:0,class:"path-elem"},_hoisted_37$3={key:1,pill:"",size:"medium",class:"folder"},_hoisted_38$3=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512"},[createBaseVNode("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"})],-1),_hoisted_39$3=["disabled"],_hoisted_40$3={key:0},_hoisted_41$3={key:0,slot:"trigger",class:"path-elem"},_hoisted_42$3={key:1,slot:"trigger",pill:"",size:"medium"},_hoisted_43$3=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M32 32H480c17.7 0 32 14.3 32 32V96c0 17.7-14.3 32-32 32H32C14.3 128 0 113.7 0 96V64C0 46.3 14.3 32 32 32zm0 128H480V416c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V160zm128 80c0 8.8 7.2 16 16 16H336c8.8 0 16-7.2 16-16s-7.2-16-16-16H176c-8.8 0-16 7.2-16 16z"})],-1),_hoisted_44$3=["checked","onClick","innerHTML"],_hoisted_45$3=createBaseVNode("sl-divider",null,null,-1),_hoisted_46$3=createBaseVNode("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"})],-1),_hoisted_47$2={key:0,class:"path-elem"},_hoisted_48$1={key:1,pill:"",size:"medium"},_hoisted_49$1=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M32 32H480c17.7 0 32 14.3 32 32V96c0 17.7-14.3 32-32 32H32C14.3 128 0 113.7 0 96V64C0 46.3 14.3 32 32 32zm0 128H480V416c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V160zm128 80c0 8.8 7.2 16 16 16H336c8.8 0 16-7.2 16-16s-7.2-16-16-16H176c-8.8 0-16 7.2-16 16z"})],-1),_hoisted_50$1=["disabled"],_hoisted_51$1={key:0},_hoisted_52$1={key:0,slot:"trigger",class:"path-elem"},_hoisted_53$1={key:1,slot:"trigger",pill:"",size:"medium"},_hoisted_54$1=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M246.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 109.3 192 320c0 17.7 14.3 32 32 32s32-14.3 32-32l0-210.7 73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-64z"})],-1),_hoisted_55=["checked","onClick","innerHTML"],_hoisted_56={key:0,class:"path-elem"},_hoisted_57={key:1,pill:"",size:"medium"},_hoisted_58=createBaseVNode("svg",{slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M246.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 109.3 192 320c0 17.7 14.3 32 32 32s32-14.3 32-32l0-210.7 73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-64z"})],-1),_hoisted_59={key:0},_hoisted_60={key:1,class:"dirs"},_hoisted_61=["onClick"],_hoisted_62={key:0,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_63=createBaseVNode("path",{d:"M0 96C0 60.7 28.7 32 64 32H196.1c19.1 0 37.4 7.6 50.9 21.1L289.9 96H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16H286.6c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7H64z"},null,-1),_hoisted_64=[_hoisted_63],_hoisted_65={key:1,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},_hoisted_66=createBaseVNode("path",{d:"M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z"},null,-1),_hoisted_67=[_hoisted_66],_hoisted_68=["content"],_hoisted_69=createBaseVNode("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"})],-1),_hoisted_70=[_hoisted_69],_hoisted_71=createBaseVNode("sl-input",{autocomplete:"off",required:"",id:"add-repo-input",placeholder:"Enter name",pattern:"^[A-z0-9\\-_]+$"},null,-1),_hoisted_72=createBaseVNode("br",null,null,-1),_hoisted_73=createBaseVNode("sl-button",{type:"submit",variant:"primary"},"Add",-1),_hoisted_74=createBaseVNode("sl-input",{autocomplete:"off",required:"",id:"add-file-input",placeholder:"Enter file path",pattern:"^\\/?([A-z0-9-_+]+\\/)*([A-z0-9\\-]+(\\.(css|md|json|geojson|yaml|yml))?)$"},null,-1),_hoisted_75=createBaseVNode("br",null,null,-1),_hoisted_76=createBaseVNode("sl-button",{type:"reset",variant:"default"},"Reset",-1),_hoisted_77=createBaseVNode("sl-button",{type:"submit",variant:"primary"},"Add",-1),_hoisted_78={id:"delete-file-dialog",label:"Confirm file delete"},_hoisted_79=["innerHTML"],_sfc_main$r=defineComponent({__name:"ContentSelector.ce",props:{contentPath:{type:String},sticky:{type:Boolean,default:!1},mode:{type:String,default:"media"},compact:{type:Boolean}},emits:["accessChanged","addMediaResource","contentPathChanged"],setup(F,{expose:W,emit:q}){const K=F;W({getDirList:yp,getFile:Np,putFile:jp,repositoryIsWriteable:vp});const X=new Set(["config.yaml","CNAME","index.html","404.html",".nojekyll"]),tt=ref("");watch$1(tt,()=>{q("contentPathChanged",tt.value)});const rt=ref(null),ot=computed(()=>{var bp;return(bp=rt==null?void 0:rt.value)==null?void 0:bp.parentNode});let ut,yn="",uo=!0;const po=ref();watch$1(po,()=>{po.value&&lp()});const mo=ref(isMobile()),wo=ref(""),lf=ref(),yf=ref(!1),cf=ref(!1);watch$1(wo,()=>{yf.value=window.localStorage.getItem("gh-auth-token")!==null,lf.value=new GithubClient$1(wo.value||"")}),watch$1(yf,()=>{yf||(yn="",cf.value=!1)}),watch$1(cf,()=>{q("accessChanged",{acct:_f.value,repo:xf.value,canUpdate:cf.value})}),watch$1(lf,async()=>{Lf(),yf.value&&(vf.value=await Gf(),yn=await lf.value.user().then(bp=>bp.login),await lf.value.repos(yn).then(bp=>{bp.find(Ep=>Ep.name==="essays")||lf.value.createRepository({name:"essays",description:"Juncture visual essays"}),bp.find(Ep=>Ep.name==="media")||lf.value.createRepository({name:"media",description:"Juncture media"})}),_f.value&&xf.value&&yn&&lf.value.isCollaborator(_f.value,xf.value,yn).then(bp=>cf.value=bp))});const vf=ref([]),_f=ref("");watch$1(vf,()=>{_f.value=_f.value||(vf.value.length>0?vf.value[0].login:null)}),watch$1(_f,(bp,Ep)=>{Ep&&(xf.value=""),rp().then(_p=>$f.value=_p)});const $f=ref([]),xf=ref("");watch$1($f,()=>{if(!xf.value&&$f.value.length>0)if($f.value.length===1)xf.value=$f.value[0].name;else{let bp=K.mode==="media"?"media":"essays";xf.value=$f.value.find(Ep=>Ep.name===bp)?bp:$f.value[0].name}});const Af=ref([]),Cf=ref("");watch$1(xf,(bp,Ep)=>{Ep&&(Bf.value=[]),ap().then(_p=>kf()),Cf.value="",xf.value&&(yf.value&&_f.value&&lf.value.user().then(_p=>_p.login).then(_p=>xf.value?lf.value.isCollaborator(_f.value,xf.value,_p):!1).then(_p=>cf.value=_p),ip().then(_p=>Af.value=_p))});let Pf;watch$1(Af,async()=>{!Pf&&_f.value&&xf.value&&(Pf=await lf.value.defaultBranch(_f.value,xf.value)),Pf&&(Cf.value=Pf)}),watch$1(Cf,()=>{Cf.value&&Bf.value&&Hf&&ap().then(bp=>kf())});const Bf=ref([]);watch$1(Bf,()=>{Cf.value&&ap().then(bp=>kf())});let Hf=!0;const Df=ref([]);watch$1(Df,()=>{Hf=Bf.value.length===0||Df.value.length>0}),onMounted(()=>{var bp;Yf(),window.addEventListener("storage",()=>Yf()),ut=(bp=ot==null?void 0:ot.value)==null?void 0:bp.querySelector(".workspace-selector")});function Lf(bp=""){var Ep;if(bp=bp||K.contentPath||"",bp){let[_p,Mp]=((Ep=bp.split(":").pop())==null?void 0:Ep.split("?"))||[],Yp=Mp?Object.fromEntries(Mp.split("&").map(hg=>hg.split("="))):{},ug=_p.split("/").filter(hg=>hg);ug.length>0&&(_f.value=ug[0]),ug.length>1&&(xf.value=ug[1]),ug.length>2&&(Bf.value=ug.slice(2)),Yp.ref&&(Cf.value=Yp.ref||"main")}}function kf(){if(_f.value&&xf.value){let bp=`gh:${_f.value}/${xf.value}`;Bf.value.length>0&&(bp+=`/${Bf.value.join("/")}`),Cf.value&&Cf.value!==Pf&&(bp+=`?ref=${Cf.value}`),tt.value=bp}}async function Nf(){let Ep=await fetch("https://api.juncture-digital.org/gh-token");if(Ep.ok){let _p=await Ep.text();window.localStorage.setItem("gh-unscoped-token",_p)}}async function Yf(){window.localStorage.getItem("gh-unscoped-token")||await Nf(),wo.value=window.localStorage.getItem("gh-auth-token")||window.localStorage.getItem("gh-unscoped-token"),yf.value=window.localStorage.getItem("gh-auth-token")!==null}async function Gf(){return await Promise.all([lf.value.user(),lf.value.organizations()]).then(bp=>bp.flat())}async function rp(){return lf.value.repos(_f.value)}async function ip(){return lf.value.branches(_f.value,xf.value)}async function ap(){Df.value=[];let bp=await lf.value.dirlist(_f.value,xf.value,Bf.value.join("/"),Cf.value),Ep=bp.filter(Mp=>Mp.type==="dir"),_p=bp.filter(Mp=>Mp.type==="file"&&!X.has(Mp.name));uo&&_p.find(Mp=>Mp.name==="README.md")&&Ep.length===0&&(Bf.value.length===0||Bf.value[Bf.value.length-1]!=="README.md")&&(Bf.value=[...Bf.value,"README.md"]),Df.value=[...Ep,..._p]}function yp(){return Df.value}function vp(){return cf.value}async function Np(bp){var xg;let[Ep,_p]=((xg=bp.split(":").pop())==null?void 0:xg.split("?"))||[],Mp=_p?Object.fromEntries(_p.split("&").map(kg=>kg.split("="))):{},Yp=Ep.split("/").filter(kg=>kg),[ug,hg]=Yp.slice(0,2);return Ep=Yp.slice(2).filter(kg=>kg).join("/"),lf.value.getFile(ug,hg,Ep,Mp.ref||Cf.value)}async function jp(bp,Ep){var Dg;let[_p,Mp]=((Dg=bp.split(":").pop())==null?void 0:Dg.split("?"))||[],Yp=Mp?Object.fromEntries(Mp.split("&").map(lm=>lm.split("="))):{},ug=_p.split("/").filter(lm=>lm),[hg,xg]=ug.slice(0,2);_p=ug.slice(2).filter(lm=>lm).join("/");let kg=Yp.ref||Cf.value;return lf.value.putFile(hg,xg,_p,Ep,kg)}function Ip(bp){_f.value=bp.login}function Jp(bp){xf.value=bp.name}function ng(bp){Cf.value=bp.name}function og(bp){ut.hide(),uo=!0;let Ep=[...Bf.value];Hf||(Ep=Ep.slice(0,-1)),(Ep.length===0||Ep[Ep.length-1]!==bp.name)&&(Ep=[...Ep,bp.name]),Bf.value=Ep}function vg(bp){ut.hide(),uo=!1,Bf.value=bp===0?[]:Bf.value.slice(0,bp)}function Dp(bp){K.mode==="essays"?xp():$p(bp)}function Lp(bp){return bp.toLowerCase().split("-").map(function(Ep){return Ep.charAt(0).toUpperCase()+Ep.slice(1)}).join(" ")}function xp(){var _p,Mp;let bp=(_p=ot.value)==null?void 0:_p.querySelector("#add-file-form");bp.onclick||(bp.onclick=function(){},bp.addEventListener("submit",async Yp=>{var Dg;Yp.preventDefault();let ug=(Dg=ot.value)==null?void 0:Dg.querySelector("#add-file-input"),hg=[...Bf.value,...ug.value.split("/").filter(lm=>lm)],xg=hg[hg.length-1];hg[hg.length-1].indexOf(".")>0?hg[hg.length-1]=hg[hg.length-1].replace(/readme\.md/,"README.md"):hg.push("README.md");let kg=hg.join("/");xg=Lp(xg),await lf.value.putFile(_f.value,xf.value,kg,`# ${xg} -`,Cf.value),Bf.value=hg,kp()}));let Ep=(Mp=ot.value)==null?void 0:Mp.querySelector("#add-file-dialog");Ep.addEventListener("sl-after-show",()=>{var Yp;((Yp=ot.value)==null?void 0:Yp.querySelector("#add-file-input")).focus()}),Ep.show()}function kp(){var bp,Ep;((bp=ot.value)==null?void 0:bp.querySelector("#add-file-input")).value="",((Ep=ot.value)==null?void 0:Ep.querySelector("#add-file-dialog")).hide()}function lp(){var Ep;((Ep=ot.value)==null?void 0:Ep.querySelector("#delete-file-dialog")).show()}function Of(){var Ep;((Ep=ot.value)==null?void 0:Ep.querySelector("#delete-file-dialog")).hide()}async function qf(){var _p,Mp;let bp=(_p=ot.value)==null?void 0:_p.querySelector("#add-repo-form");bp.onclick||(bp.onclick=function(){},bp.addEventListener("submit",async Yp=>{var kg;Yp.preventDefault();let hg=((kg=ot.value)==null?void 0:kg.querySelector("#add-repo-input")).value;(await lf.value.createRepository({name:hg,org:yn===_f.value?null:_f.value})).status===201&&rp().then(Dg=>{wf.value=hg,$f.value=Dg}),cp()}));let Ep=(Mp=ot.value)==null?void 0:Mp.querySelector("#add-repo-dialog");Ep.addEventListener("sl-after-show",()=>{var Yp;((Yp=ot.value)==null?void 0:Yp.querySelector("#add-repo-input")).focus()}),Ep.show()}function cp(){var Ep,_p;((Ep=ot.value)==null?void 0:Ep.querySelector("#add-repo-dialog")).hide(),((_p=ot.value)==null?void 0:_p.querySelector("#add-repo-input")).value=""}async function hp(){let bp=Bf.value.join("/");await lf.value.deleteFile(_f.value,wf.value,bp,Cf.value),await ap(),vg(Bf.value.length-(Df.value.length===0?2:1)),po.value=null,Of()}function $p(bp){q("addMediaResource",bp)}function Vp(){ut.open?ut.hide():ut.show()}return(bp,Ep)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:rt},[createBaseVNode("section",_hoisted_1$p,[createBaseVNode("div",_hoisted_2$m,[createBaseVNode("sl-tooltip",{content:`${_f.value}: ${wf.value} (${Cf.value})`,disabled:mo.value,placement:"bottom"},[createBaseVNode("sl-button",{pill:"",size:"medium",onClick:Vp},_hoisted_5$f)],8,_hoisted_3$j),createBaseVNode("div",_hoisted_6$e,[createBaseVNode("div",_hoisted_7$b,[createBaseVNode("sl-breadcrumb",null,[createBaseVNode("sl-breadcrumb-item",null,[createBaseVNode("sl-button",{pill:"",size:"medium",onClick:Ep[0]||(Ep[0]=_p=>vg(0))},[createTextVNode("/ "),_hoisted_8$a])]),(openBlock(!0),createElementBlock(Fragment,null,renderList(Bf.value,(_p,Mp)=>(openBlock(),createElementBlock("sl-breadcrumb-item",{key:`bci-${Mp}`},[Mp===Bf.value.length-1?(openBlock(),createElementBlock(Fragment,{key:0},[F.compact?(openBlock(),createElementBlock("span",{key:0,class:"path-elem",innerHTML:_p,onClick:Yp=>vg(Mp+1)},null,8,_hoisted_9$a)):(openBlock(),createElementBlock("sl-button",{key:1,pill:"",size:"medium",onClick:Yp=>vg(Mp+1)},[createTextVNode(toDisplayString(_p)+" ",1),_hoisted_11$a],8,_hoisted_10$a)),createBaseVNode("sl-dropdown",_hoisted_12$9,[_hoisted_13$8,createBaseVNode("sl-menu",null,[createBaseVNode("sl-menu-item",{onClick:()=>po.value=_p},[createTextVNode("Delete file "),_hoisted_15$6],8,_hoisted_14$7)])])],64)):(openBlock(),createElementBlock(Fragment,{key:1},[F.compact?(openBlock(),createElementBlock("span",{key:0,class:"path-elem",innerHTML:_p,onClick:Yp=>vg(Mp+1)},null,8,_hoisted_16$6)):(openBlock(),createElementBlock("sl-button",{key:1,pill:"",size:"medium",onClick:Yp=>vg(Mp+1)},[createTextVNode(toDisplayString(_p)+" ",1),_hoisted_18$6],8,_hoisted_17$6))],64))]))),128))]),yf.value&&F.mode==="media"?(openBlock(),createElementBlock("sl-tooltip",{key:0,content:`Add ${K.mode==="media"?"resource":"file"}`,placement:"bottom"},[createBaseVNode("sl-button",{variant:"default",size:F.mode==="media"?"medium":"small",class:"add-item",name:`Add ${F.mode==="media"?"resource":"file"}`,circle:"",onClick:Dp},_hoisted_22$4,8,_hoisted_20$5)],8,_hoisted_19$5)):createCommentVNode("",!0)]),createBaseVNode("sl-drawer",_hoisted_23$4,[createBaseVNode("div",_hoisted_24$4,[F.compact?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_25$4,"Select GitHub Repository")),F.compact?createCommentVNode("",!0):(openBlock(),createElementBlock("svg",_hoisted_26$4,_hoisted_28$4)),createBaseVNode("sl-breadcrumb",_hoisted_29$3,[createBaseVNode("sl-breadcrumb-item",null,[createBaseVNode("sl-tooltip",{content:"Github Account",hoist:"",disabled:mo.value,placement:"left"},[vf.value.length>1?(openBlock(),createElementBlock("sl-dropdown",_hoisted_31$3,[F.compact?(openBlock(),createElementBlock("span",_hoisted_32$3,toDisplayString(_f.value),1)):(openBlock(),createElementBlock("sl-button",_hoisted_33$3,[createTextVNode(toDisplayString(_f.value)+" ",1),_hoisted_34$3])),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(vf.value,(_p,Mp)=>(openBlock(),createElementBlock("sl-menu-item",{key:`acct-${Mp}`,checked:_p.login===_f.value,onClick:Yp=>Ip(_p),type:"checkbox",innerHTML:_p.login},null,8,_hoisted_35$3))),128))])])):(openBlock(),createElementBlock(Fragment,{key:1},[F.compact?(openBlock(),createElementBlock("span",_hoisted_36$3,toDisplayString(Cf.value),1)):(openBlock(),createElementBlock("sl-button",_hoisted_37$3,[createTextVNode(toDisplayString(_f.value)+" ",1),_hoisted_38$3]))],64))],8,_hoisted_30$3)]),createBaseVNode("sl-breadcrumb-item",null,[createBaseVNode("sl-tooltip",{content:"Github Repository",hoist:"",disabled:mo.value,placement:"left"},[$f.value.length>1?(openBlock(),createElementBlock("sl-dropdown",_hoisted_40$3,[F.compact?(openBlock(),createElementBlock("span",_hoisted_41$3,toDisplayString(wf.value),1)):(openBlock(),createElementBlock("sl-button",_hoisted_42$3,[createTextVNode(toDisplayString(wf.value)+" ",1),_hoisted_43$3])),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList($f.value,(_p,Mp)=>(openBlock(),createElementBlock("sl-menu-item",{key:`repo-${Mp}`,checked:_p.name===wf.value,onClick:Yp=>Jp(_p),type:"checkbox",innerHTML:_p.name},null,8,_hoisted_44$3))),128)),_hoisted_45$3,createBaseVNode("sl-menu-item",{class:"add-repo",onClick:qf},[_hoisted_46$3,createTextVNode(" New repository ")])])])):(openBlock(),createElementBlock(Fragment,{key:1},[F.compact?(openBlock(),createElementBlock("span",_hoisted_47$2,toDisplayString(wf.value),1)):(openBlock(),createElementBlock("sl-button",_hoisted_48$1,[createTextVNode(toDisplayString(wf.value)+" ",1),_hoisted_49$1]))],64))],8,_hoisted_39$3)]),createBaseVNode("sl-breadcrumb-item",null,[createBaseVNode("sl-tooltip",{content:"Github Branch",hoist:"",disabled:mo.value,placement:"left"},[Pf.value.length>1?(openBlock(),createElementBlock("sl-dropdown",_hoisted_51$1,[F.compact?(openBlock(),createElementBlock("span",_hoisted_52$1,toDisplayString(Cf.value),1)):(openBlock(),createElementBlock("sl-button",_hoisted_53$1,[createTextVNode(toDisplayString(Cf.value)+" ",1),_hoisted_54$1])),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Pf.value,(_p,Mp)=>(openBlock(),createElementBlock("sl-menu-item",{key:`branch-${Mp}`,checked:_p.name===Cf.value,onClick:Yp=>ng(_p),type:"checkbox",innerHTML:_p.name},null,8,_hoisted_55))),128))])])):(openBlock(),createElementBlock(Fragment,{key:1},[F.compact?(openBlock(),createElementBlock("span",_hoisted_56,toDisplayString(Cf.value),1)):(openBlock(),createElementBlock("sl-button",_hoisted_57,[createTextVNode(toDisplayString(Cf.value)+" ",1),_hoisted_58]))],64))],8,_hoisted_50$1)])])])])])]),Df.value.filter(_p=>K.mode==="essays"||_p.type==="dir").length>0?(openBlock(),createElementBlock("sl-divider",_hoisted_59)):createCommentVNode("",!0),Df.value.length>0?(openBlock(),createElementBlock("div",_hoisted_60,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Df.value.filter(_p=>K.mode==="essays"||_p.type==="dir"),(_p,Mp)=>(openBlock(),createElementBlock("sl-button",{key:`child-${Mp}`,onClick:Yp=>og(_p),pill:"",size:"small",class:normalizeClass(_p.type)},[_p.type==="dir"?(openBlock(),createElementBlock("svg",_hoisted_62,_hoisted_64)):(openBlock(),createElementBlock("svg",_hoisted_65,_hoisted_67)),createTextVNode(" "+toDisplayString(_p.name),1)],10,_hoisted_61))),128)),Bf.value&&(Bf.value.length===0||Bf.value[Bf.value.length-1].split(".").pop()!=="md")&&K.mode==="essays"?(openBlock(),createElementBlock("sl-tooltip",{key:0,content:`Add ${F.mode==="media"?"resource":"file"}`,placement:"bottom"},[createBaseVNode("sl-button",{variant:"default",size:"small",class:"add-item",name:"`Add file",circle:"",onClick:Dp},_hoisted_70)],8,_hoisted_68)):createCommentVNode("",!0)])):createCommentVNode("",!0)]),createBaseVNode("sl-dialog",{id:"add-repo-dialog",label:"Add Repository"},[createBaseVNode("form",{id:"add-repo-form",class:"input-validation-pattern"},[_hoisted_71,_hoisted_72,createBaseVNode("sl-button",{onClick:cp},"Cancel"),_hoisted_73])]),createBaseVNode("sl-dialog",{id:"add-file-dialog",label:"Add File"},[createBaseVNode("form",{id:"add-file-form",class:"input-validation-pattern"},[_hoisted_74,_hoisted_75,createBaseVNode("sl-button",{onClick:kp},"Cancel"),_hoisted_76,_hoisted_77])]),createBaseVNode("sl-dialog",_hoisted_78,[createBaseVNode("div",null,[createTextVNode("Delete file "),createBaseVNode("span",{innerHTML:po.value},null,8,_hoisted_79),createTextVNode("?")]),createBaseVNode("sl-button",{slot:"footer",onClick:Of},"Cancel"),createBaseVNode("sl-button",{slot:"footer",variant:"primary",onClick:hp},"Confirm")])],512))}}),_style_0$p=`*{box-sizing:border-box}:host{display:block;width:100%;border:1px solid #444;padding:6px;z-index:9;background-color:#fff}span.path-elem{font-family:Archivo Narrow,Roboto,sans-serif;font-size:1.2rem}.workspace{display:flex;align-items:center}.workspace-selector{display:flex;gap:12px}.workspace-selector div{display:inline-flex;position:relative;padding-left:6px;font-size:1rem}.selectors{display:flex;gap:6px}.ws-path{position:relative;display:flex;align-items:center;width:100%;height:100%;margin:3px}.workspace-selector>sl-icon{vertical-align:middle;padding-right:6px}sl-drawer::part(base),sl-drawer::part(panel),sl-drawer::part(body){padding:0;overflow:visible}.github-select{font-weight:700;font-size:1.2em;color:#5a162e}sl-divider{margin:6px}.values{display:flex;flex-direction:column;gap:1rem}.values>div{display:flex;align-items:center;gap:1rem}.label{font-weight:700}.value{display:inline-block}sl-breadcrumb-item::part(label){font-size:1rem;color:var(--sl-color-primary-600)}.dir-items li{cursor:pointer}.dir-items{height:40vh;overflow-y:scroll}.dir-items li:hover{color:var(--sl-color-primary-600)}sl-icon-button::part(base){padding:0}.content-path{display:flex;flex-direction:column}sl-icon-button{align-self:start;margin-top:6px}sl-menu::part(base){max-height:300px;overflow-y:scroll}.dirs{display:flex;flex-wrap:wrap;gap:6px}.dirs sl-button::part(base){border-radius:12px;font-weight:500;font-family:Archivo Narrow,Roboto,sans-serif;font-size:1rem}sl-button.dir::part(base){background-color:#eee}sl-button.add-item::part(base){background-color:#eee;color:#000}.delete{margin-left:18px}sl-icon-button.delete::part(base){color:red}.add-repo{background-color:#ddd}sl-menu{text-align:left}sl-breadcrumb{display:inline-block}.breadcrumbs{display:flex;align-items:center;gap:12px;padding-left:12px}.dirs svg,svg[slot=trigger]{fill:#999} +`,Cf.value),Bf.value=hg,kp()}));let Ep=(Mp=ot.value)==null?void 0:Mp.querySelector("#add-file-dialog");Ep.addEventListener("sl-after-show",()=>{var Yp;((Yp=ot.value)==null?void 0:Yp.querySelector("#add-file-input")).focus()}),Ep.show()}function kp(){var bp,Ep;((bp=ot.value)==null?void 0:bp.querySelector("#add-file-input")).value="",((Ep=ot.value)==null?void 0:Ep.querySelector("#add-file-dialog")).hide()}function lp(){var Ep;((Ep=ot.value)==null?void 0:Ep.querySelector("#delete-file-dialog")).show()}function Of(){var Ep;((Ep=ot.value)==null?void 0:Ep.querySelector("#delete-file-dialog")).hide()}async function qf(){var _p,Mp;let bp=(_p=ot.value)==null?void 0:_p.querySelector("#add-repo-form");bp.onclick||(bp.onclick=function(){},bp.addEventListener("submit",async Yp=>{var kg;Yp.preventDefault();let hg=((kg=ot.value)==null?void 0:kg.querySelector("#add-repo-input")).value;(await lf.value.createRepository({name:hg,org:yn===_f.value?null:_f.value})).status===201&&rp().then(Dg=>{xf.value=hg,$f.value=Dg}),cp()}));let Ep=(Mp=ot.value)==null?void 0:Mp.querySelector("#add-repo-dialog");Ep.addEventListener("sl-after-show",()=>{var Yp;((Yp=ot.value)==null?void 0:Yp.querySelector("#add-repo-input")).focus()}),Ep.show()}function cp(){var Ep,_p;((Ep=ot.value)==null?void 0:Ep.querySelector("#add-repo-dialog")).hide(),((_p=ot.value)==null?void 0:_p.querySelector("#add-repo-input")).value=""}async function hp(){let bp=Bf.value.join("/");await lf.value.deleteFile(_f.value,xf.value,bp,Cf.value),await ap(),vg(Bf.value.length-(Df.value.length===0?2:1)),po.value=null,Of()}function $p(bp){q("addMediaResource",bp)}function Vp(){ut.open?ut.hide():ut.show()}return(bp,Ep)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:rt},[createBaseVNode("section",_hoisted_1$p,[createBaseVNode("div",_hoisted_2$m,[createBaseVNode("sl-tooltip",{content:`${_f.value}: ${xf.value} (${Cf.value})`,disabled:mo.value,placement:"bottom"},[createBaseVNode("sl-button",{pill:"",size:"medium",onClick:Vp},_hoisted_5$f)],8,_hoisted_3$j),createBaseVNode("div",_hoisted_6$e,[createBaseVNode("div",_hoisted_7$b,[createBaseVNode("sl-breadcrumb",null,[createBaseVNode("sl-breadcrumb-item",null,[createBaseVNode("sl-button",{pill:"",size:"medium",onClick:Ep[0]||(Ep[0]=_p=>vg(0))},[createTextVNode("/ "),_hoisted_8$a])]),(openBlock(!0),createElementBlock(Fragment,null,renderList(Bf.value,(_p,Mp)=>(openBlock(),createElementBlock("sl-breadcrumb-item",{key:`bci-${Mp}`},[Mp===Bf.value.length-1?(openBlock(),createElementBlock(Fragment,{key:0},[F.compact?(openBlock(),createElementBlock("span",{key:0,class:"path-elem",innerHTML:_p,onClick:Yp=>vg(Mp+1)},null,8,_hoisted_9$a)):(openBlock(),createElementBlock("sl-button",{key:1,pill:"",size:"medium",onClick:Yp=>vg(Mp+1)},[createTextVNode(toDisplayString(_p)+" ",1),_hoisted_11$a],8,_hoisted_10$a)),createBaseVNode("sl-dropdown",_hoisted_12$9,[_hoisted_13$8,createBaseVNode("sl-menu",null,[createBaseVNode("sl-menu-item",{onClick:()=>po.value=_p},[createTextVNode("Delete file "),_hoisted_15$6],8,_hoisted_14$7)])])],64)):(openBlock(),createElementBlock(Fragment,{key:1},[F.compact?(openBlock(),createElementBlock("span",{key:0,class:"path-elem",innerHTML:_p,onClick:Yp=>vg(Mp+1)},null,8,_hoisted_16$6)):(openBlock(),createElementBlock("sl-button",{key:1,pill:"",size:"medium",onClick:Yp=>vg(Mp+1)},[createTextVNode(toDisplayString(_p)+" ",1),_hoisted_18$6],8,_hoisted_17$6))],64))]))),128))]),yf.value&&F.mode==="media"?(openBlock(),createElementBlock("sl-tooltip",{key:0,content:`Add ${K.mode==="media"?"resource":"file"}`,placement:"bottom"},[createBaseVNode("sl-button",{variant:"default",size:F.mode==="media"?"medium":"small",class:"add-item",name:`Add ${F.mode==="media"?"resource":"file"}`,circle:"",onClick:Dp},_hoisted_22$4,8,_hoisted_20$5)],8,_hoisted_19$5)):createCommentVNode("",!0)]),createBaseVNode("sl-drawer",_hoisted_23$4,[createBaseVNode("div",_hoisted_24$4,[F.compact?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_25$4,"Select GitHub Repository")),F.compact?createCommentVNode("",!0):(openBlock(),createElementBlock("svg",_hoisted_26$4,_hoisted_28$4)),createBaseVNode("sl-breadcrumb",_hoisted_29$3,[createBaseVNode("sl-breadcrumb-item",null,[createBaseVNode("sl-tooltip",{content:"Github Account",hoist:"",disabled:mo.value,placement:"left"},[vf.value.length>1?(openBlock(),createElementBlock("sl-dropdown",_hoisted_31$3,[F.compact?(openBlock(),createElementBlock("span",_hoisted_32$3,toDisplayString(_f.value),1)):(openBlock(),createElementBlock("sl-button",_hoisted_33$3,[createTextVNode(toDisplayString(_f.value)+" ",1),_hoisted_34$3])),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(vf.value,(_p,Mp)=>(openBlock(),createElementBlock("sl-menu-item",{key:`acct-${Mp}`,checked:_p.login===_f.value,onClick:Yp=>Ip(_p),type:"checkbox",innerHTML:_p.login},null,8,_hoisted_35$3))),128))])])):(openBlock(),createElementBlock(Fragment,{key:1},[F.compact?(openBlock(),createElementBlock("span",_hoisted_36$3,toDisplayString(Cf.value),1)):(openBlock(),createElementBlock("sl-button",_hoisted_37$3,[createTextVNode(toDisplayString(_f.value)+" ",1),_hoisted_38$3]))],64))],8,_hoisted_30$3)]),createBaseVNode("sl-breadcrumb-item",null,[createBaseVNode("sl-tooltip",{content:"Github Repository",hoist:"",disabled:mo.value,placement:"left"},[$f.value.length>1?(openBlock(),createElementBlock("sl-dropdown",_hoisted_40$3,[F.compact?(openBlock(),createElementBlock("span",_hoisted_41$3,toDisplayString(xf.value),1)):(openBlock(),createElementBlock("sl-button",_hoisted_42$3,[createTextVNode(toDisplayString(xf.value)+" ",1),_hoisted_43$3])),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList($f.value,(_p,Mp)=>(openBlock(),createElementBlock("sl-menu-item",{key:`repo-${Mp}`,checked:_p.name===xf.value,onClick:Yp=>Jp(_p),type:"checkbox",innerHTML:_p.name},null,8,_hoisted_44$3))),128)),_hoisted_45$3,createBaseVNode("sl-menu-item",{class:"add-repo",onClick:qf},[_hoisted_46$3,createTextVNode(" New repository ")])])])):(openBlock(),createElementBlock(Fragment,{key:1},[F.compact?(openBlock(),createElementBlock("span",_hoisted_47$2,toDisplayString(xf.value),1)):(openBlock(),createElementBlock("sl-button",_hoisted_48$1,[createTextVNode(toDisplayString(xf.value)+" ",1),_hoisted_49$1]))],64))],8,_hoisted_39$3)]),createBaseVNode("sl-breadcrumb-item",null,[createBaseVNode("sl-tooltip",{content:"Github Branch",hoist:"",disabled:mo.value,placement:"left"},[Af.value.length>1?(openBlock(),createElementBlock("sl-dropdown",_hoisted_51$1,[F.compact?(openBlock(),createElementBlock("span",_hoisted_52$1,toDisplayString(Cf.value),1)):(openBlock(),createElementBlock("sl-button",_hoisted_53$1,[createTextVNode(toDisplayString(Cf.value)+" ",1),_hoisted_54$1])),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Af.value,(_p,Mp)=>(openBlock(),createElementBlock("sl-menu-item",{key:`branch-${Mp}`,checked:_p.name===Cf.value,onClick:Yp=>ng(_p),type:"checkbox",innerHTML:_p.name},null,8,_hoisted_55))),128))])])):(openBlock(),createElementBlock(Fragment,{key:1},[F.compact?(openBlock(),createElementBlock("span",_hoisted_56,toDisplayString(Cf.value),1)):(openBlock(),createElementBlock("sl-button",_hoisted_57,[createTextVNode(toDisplayString(Cf.value)+" ",1),_hoisted_58]))],64))],8,_hoisted_50$1)])])])])])]),Df.value.filter(_p=>K.mode==="essays"||_p.type==="dir").length>0?(openBlock(),createElementBlock("sl-divider",_hoisted_59)):createCommentVNode("",!0),Df.value.length>0?(openBlock(),createElementBlock("div",_hoisted_60,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Df.value.filter(_p=>K.mode==="essays"||_p.type==="dir"),(_p,Mp)=>(openBlock(),createElementBlock("sl-button",{key:`child-${Mp}`,onClick:Yp=>og(_p),pill:"",size:"small",class:normalizeClass(_p.type)},[_p.type==="dir"?(openBlock(),createElementBlock("svg",_hoisted_62,_hoisted_64)):(openBlock(),createElementBlock("svg",_hoisted_65,_hoisted_67)),createTextVNode(" "+toDisplayString(_p.name),1)],10,_hoisted_61))),128)),Bf.value&&(Bf.value.length===0||Bf.value[Bf.value.length-1].split(".").pop()!=="md")&&K.mode==="essays"?(openBlock(),createElementBlock("sl-tooltip",{key:0,content:`Add ${F.mode==="media"?"resource":"file"}`,placement:"bottom"},[createBaseVNode("sl-button",{variant:"default",size:"small",class:"add-item",name:"`Add file",circle:"",onClick:Dp},_hoisted_70)],8,_hoisted_68)):createCommentVNode("",!0)])):createCommentVNode("",!0)]),createBaseVNode("sl-dialog",{id:"add-repo-dialog",label:"Add Repository"},[createBaseVNode("form",{id:"add-repo-form",class:"input-validation-pattern"},[_hoisted_71,_hoisted_72,createBaseVNode("sl-button",{onClick:cp},"Cancel"),_hoisted_73])]),createBaseVNode("sl-dialog",{id:"add-file-dialog",label:"Add File"},[createBaseVNode("form",{id:"add-file-form",class:"input-validation-pattern"},[_hoisted_74,_hoisted_75,createBaseVNode("sl-button",{onClick:kp},"Cancel"),_hoisted_76,_hoisted_77])]),createBaseVNode("sl-dialog",_hoisted_78,[createBaseVNode("div",null,[createTextVNode("Delete file "),createBaseVNode("span",{innerHTML:po.value},null,8,_hoisted_79),createTextVNode("?")]),createBaseVNode("sl-button",{slot:"footer",onClick:Of},"Cancel"),createBaseVNode("sl-button",{slot:"footer",variant:"primary",onClick:hp},"Confirm")])],512))}}),_style_0$p=`*{box-sizing:border-box}:host{display:block;width:100%;border:1px solid #444;padding:6px;z-index:9;background-color:#fff}span.path-elem{font-family:Archivo Narrow,Roboto,sans-serif;font-size:1.2rem}.workspace{display:flex;align-items:center}.workspace-selector{display:flex;gap:12px}.workspace-selector div{display:inline-flex;position:relative;padding-left:6px;font-size:1rem}.selectors{display:flex;gap:6px}.ws-path{position:relative;display:flex;align-items:center;width:100%;height:100%;margin:3px}.workspace-selector>sl-icon{vertical-align:middle;padding-right:6px}sl-drawer::part(base),sl-drawer::part(panel),sl-drawer::part(body){padding:0;overflow:visible}.github-select{font-weight:700;font-size:1.2em;color:#5a162e}sl-divider{margin:6px}.values{display:flex;flex-direction:column;gap:1rem}.values>div{display:flex;align-items:center;gap:1rem}.label{font-weight:700}.value{display:inline-block}sl-breadcrumb-item::part(label){font-size:1rem;color:var(--sl-color-primary-600)}.dir-items li{cursor:pointer}.dir-items{height:40vh;overflow-y:scroll}.dir-items li:hover{color:var(--sl-color-primary-600)}sl-icon-button::part(base){padding:0}.content-path{display:flex;flex-direction:column}sl-icon-button{align-self:start;margin-top:6px}sl-menu::part(base){max-height:300px;overflow-y:scroll}.dirs{display:flex;flex-wrap:wrap;gap:6px}.dirs sl-button::part(base){border-radius:12px;font-weight:500;font-family:Archivo Narrow,Roboto,sans-serif;font-size:1rem}sl-button.dir::part(base){background-color:#eee}sl-button.add-item::part(base){background-color:#eee;color:#000}.delete{margin-left:18px}sl-icon-button.delete::part(base){color:red}.add-repo{background-color:#ddd}sl-menu{text-align:left}sl-breadcrumb{display:inline-block}.breadcrumbs{display:flex;align-items:center;gap:12px;padding-left:12px}.dirs svg,svg[slot=trigger]{fill:#999} `,ContentSelector=_export_sfc(_sfc_main$r,[["styles",[_style_0$p]]]),_hoisted_1$o=["innerHTML"],_hoisted_2$l={class:"entities"},_hoisted_3$i=["qid"],_hoisted_4$h=["qid","text"],_sfc_main$q=defineComponent({__name:"Entities.ce",props:{cards:{type:Boolean,default:!1},class:{type:String}},setup(F){const W=ref(0),q=ref(null),K=computed(()=>{var ut;let ot=q.value?document.getElementById(q.value):null;return ot!=null&&ot.dataset.entities?(ut=ot==null?void 0:ot.dataset.entities)==null?void 0:ut.split(/\s+/):[]});watch$1(K,async ot=>{ot.length>0?X.value=await getEntityData(ot):X.value={}});const X=ref({});onMounted(()=>{EventBus$1.on("video-at-time",ut=>{W.value=ut.time});let ot=Array.from(document.querySelectorAll("p[data-head]")).map(ut=>({start:tt(ut.dataset.head.split(/\s+/)[0]),id:ut.id}));EventBus$1.on("video-at-time",ut=>{var uo;let yn=ut.time;q.value=(uo=ot.find(po=>{var mo;return po.start<=yn&&(((mo=ot[ot.indexOf(po)+1])==null?void 0:mo.start)||1/0)>yn}))==null?void 0:uo.id})});function tt(ot){var ut=ot.split(":").slice(0,3).map(po=>parseInt(po,10));let yn=0,uo=1;for(;ut.length>0;){let po=ut.pop()||0;yn+=uo*po,uo*=60}return yn}function rt(ot){let ut=Math.floor(ot/3600),yn=Math.floor((ot-ut*3600)/60),uo=ot-ut*3600-yn*60;return ut.toString().padStart(2,"0")+":"+yn.toString().padStart(2,"0")+":"+uo.toString().padStart(2,"0")}return(ot,ut)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",{innerHTML:rt(W.value)},null,8,_hoisted_1$o),createBaseVNode("div",_hoisted_2$l,[F.cards?(openBlock(!0),createElementBlock(Fragment,{key:0},renderList(X.value,(yn,uo,po)=>(openBlock(),createElementBlock("ve-entity-card",{key:`entity-card-${po}`,qid:uo},null,8,_hoisted_3$i))),128)):(openBlock(!0),createElementBlock(Fragment,{key:1},renderList(X.value,(yn,uo,po)=>(openBlock(),createElementBlock("ve-entity-infobox",{key:`entity-infobox-${po}`,qid:uo,text:yn.label},toDisplayString(X.value[uo].label)+" ("+toDisplayString(uo)+")",9,_hoisted_4$h))),128))])],64))}}),_style_0$o=`.entities{display:flex;flex-wrap:wrap;gap:.5em}ve-entity-infobox{border:1px solid #ccc;border-radius:12px;padding:6px} `,Entities=_export_sfc(_sfc_main$q,[["styles",[_style_0$o]]]);function _getDefaults(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!1,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!1,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let _defaults=_getDefaults();function changeDefaults(F){_defaults=F}const escapeTest=/[&<>"']/,escapeReplace=new RegExp(escapeTest.source,"g"),escapeTestNoEncode=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode=new RegExp(escapeTestNoEncode.source,"g"),escapeReplacements={"&":"&","<":"<",">":">",'"':""","'":"'"},getEscapeReplacement=F=>escapeReplacements[F];function escape$1(F,W){if(W){if(escapeTest.test(F))return F.replace(escapeReplace,getEscapeReplacement)}else if(escapeTestNoEncode.test(F))return F.replace(escapeReplaceNoEncode,getEscapeReplacement);return F}const unescapeTest=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function unescape$1(F){return F.replace(unescapeTest,(W,q)=>(q=q.toLowerCase(),q==="colon"?":":q.charAt(0)==="#"?q.charAt(1)==="x"?String.fromCharCode(parseInt(q.substring(2),16)):String.fromCharCode(+q.substring(1)):""))}const caret$1=/(^|[^\[])\^/g;function edit(F,W){F=typeof F=="string"?F:F.source,W=W||"";const q={replace:(K,X)=>(X=typeof X=="object"&&"source"in X?X.source:X,X=X.replace(caret$1,"$1"),F=F.replace(K,X),q),getRegex:()=>new RegExp(F,W)};return q}const nonWordAndColonTest=/[^\w:]/g,originIndependentUrl=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function cleanUrl(F,W,q){if(F){let K;try{K=decodeURIComponent(unescape$1(q)).replace(nonWordAndColonTest,"").toLowerCase()}catch{return null}if(K.indexOf("javascript:")===0||K.indexOf("vbscript:")===0||K.indexOf("data:")===0)return null}W&&!originIndependentUrl.test(q)&&(q=resolveUrl(W,q));try{q=encodeURI(q).replace(/%25/g,"%")}catch{return null}return q}const baseUrls={},justDomain=/^[^:]+:\/*[^/]*$/,protocol=/^([^:]+:)[\s\S]*$/,domain=/^([^:]+:\/*[^/]*)[\s\S]*$/;function resolveUrl(F,W){baseUrls[" "+F]||(justDomain.test(F)?baseUrls[" "+F]=F+"/":baseUrls[" "+F]=rtrim$2(F,"/",!0)),F=baseUrls[" "+F];const q=F.indexOf(":")===-1;return W.substring(0,2)==="//"?q?W:F.replace(protocol,"$1")+W:W.charAt(0)==="/"?q?W:F.replace(domain,"$1")+W:F+W}const noopTest={exec:()=>null};function splitCells(F,W){const q=F.replace(/\|/g,(tt,rt,ot)=>{let ut=!1,yn=rt;for(;--yn>=0&&ot[yn]==="\\";)ut=!ut;return ut?"|":" |"}),K=q.split(/ \|/);let X=0;if(K[0].trim()||K.shift(),K.length>0&&!K[K.length-1].trim()&&K.pop(),W)if(K.length>W)K.splice(W);else for(;K.length{const tt=X.match(/^\s+/);if(tt===null)return X;const[rt]=tt;return rt.length>=K.length?X.slice(K.length):X}).join(` @@ -3372,11 +3372,11 @@ var V3=Object.defineProperty;var G3=(F,W,q)=>W in F?V3(F,W,{enumerable:!0,config `)}}}fences(W){const q=this.rules.block.fences.exec(W);if(q){const K=q[0],X=indentCodeCompensation(K,q[3]||"");return{type:"code",raw:K,lang:q[2]?q[2].trim().replace(this.rules.inline._escapes,"$1"):q[2],text:X}}}heading(W){const q=this.rules.block.heading.exec(W);if(q){let K=q[2].trim();if(/#$/.test(K)){const X=rtrim$2(K,"#");(this.options.pedantic||!X||/ $/.test(X))&&(K=X.trim())}return{type:"heading",raw:q[0],depth:q[1].length,text:K,tokens:this.lexer.inline(K)}}}hr(W){const q=this.rules.block.hr.exec(W);if(q)return{type:"hr",raw:q[0]}}blockquote(W){const q=this.rules.block.blockquote.exec(W);if(q){const K=q[0].replace(/^ *>[ \t]?/gm,""),X=this.lexer.state.top;this.lexer.state.top=!0;const tt=this.lexer.blockTokens(K);return this.lexer.state.top=X,{type:"blockquote",raw:q[0],tokens:tt,text:K}}}list(W){let q=this.rules.block.list.exec(W);if(q){let K=q[1].trim();const X=K.length>1,tt={type:"list",raw:"",ordered:X,start:X?+K.slice(0,-1):"",loose:!1,items:[]};K=X?`\\d{1,9}\\${K.slice(-1)}`:`\\${K}`,this.options.pedantic&&(K=X?K:"[*+-]");const rt=new RegExp(`^( {0,3}${K})((?:[ ][^\\n]*)?(?:\\n|$))`);let ot="",ut="",yn=!1;for(;W;){let uo=!1;if(!(q=rt.exec(W))||this.rules.block.hr.test(W))break;ot=q[0],W=W.substring(ot.length);let po=q[2].split(` `,1)[0].replace(/^\t+/,vf=>" ".repeat(3*vf.length)),mo=W.split(` `,1)[0],wo=0;this.options.pedantic?(wo=2,ut=po.trimLeft()):(wo=q[2].search(/[^ ]/),wo=wo>4?1:wo,ut=po.slice(wo),wo+=q[1].length);let lf=!1;if(!po&&/^ *$/.test(mo)&&(ot+=mo+` -`,W=W.substring(mo.length+1),uo=!0),!uo){const vf=new RegExp(`^ {0,${Math.min(3,wo-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),_f=new RegExp(`^ {0,${Math.min(3,wo-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),$f=new RegExp(`^ {0,${Math.min(3,wo-1)}}(?:\`\`\`|~~~)`),wf=new RegExp(`^ {0,${Math.min(3,wo-1)}}#`);for(;W;){const Pf=W.split(` -`,1)[0];if(mo=Pf,this.options.pedantic&&(mo=mo.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),$f.test(mo)||wf.test(mo)||vf.test(mo)||_f.test(W))break;if(mo.search(/[^ ]/)>=wo||!mo.trim())ut+=` -`+mo.slice(wo);else{if(lf||po.search(/[^ ]/)>=4||$f.test(po)||wf.test(po)||_f.test(po))break;ut+=` -`+mo}!lf&&!mo.trim()&&(lf=!0),ot+=Pf+` -`,W=W.substring(Pf.length+1),po=mo.slice(wo)}}tt.loose||(yn?tt.loose=!0:/\n *\n *$/.test(ot)&&(yn=!0));let yf=null,cf;this.options.gfm&&(yf=/^\[[ xX]\] /.exec(ut),yf&&(cf=yf[0]!=="[ ] ",ut=ut.replace(/^\[[ xX]\] +/,""))),tt.items.push({type:"list_item",raw:ot,task:!!yf,checked:cf,loose:!1,text:ut,tokens:[]}),tt.raw+=ot}tt.items[tt.items.length-1].raw=ot.trimRight(),tt.items[tt.items.length-1].text=ut.trimRight(),tt.raw=tt.raw.trimRight();for(let uo=0;uowo.type==="space"),mo=po.length>0&&po.some(wo=>/\n.*\n/.test(wo.raw));tt.loose=mo}if(tt.loose)for(let uo=0;uo$/,"$1").replace(this.rules.inline._escapes,"$1"):"",tt=q[3]?q[3].substring(1,q[3].length-1).replace(this.rules.inline._escapes,"$1"):q[3];return{type:"def",tag:K,raw:q[0],href:X,title:tt}}}table(W){const q=this.rules.block.table.exec(W);if(q){const K={type:"table",raw:q[0],header:splitCells(q[1]).map(X=>({text:X,tokens:[]})),align:q[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:q[3]&&q[3].trim()?q[3].replace(/\n[ \t]*$/,"").split(` +`,W=W.substring(mo.length+1),uo=!0),!uo){const vf=new RegExp(`^ {0,${Math.min(3,wo-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),_f=new RegExp(`^ {0,${Math.min(3,wo-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),$f=new RegExp(`^ {0,${Math.min(3,wo-1)}}(?:\`\`\`|~~~)`),xf=new RegExp(`^ {0,${Math.min(3,wo-1)}}#`);for(;W;){const Af=W.split(` +`,1)[0];if(mo=Af,this.options.pedantic&&(mo=mo.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),$f.test(mo)||xf.test(mo)||vf.test(mo)||_f.test(W))break;if(mo.search(/[^ ]/)>=wo||!mo.trim())ut+=` +`+mo.slice(wo);else{if(lf||po.search(/[^ ]/)>=4||$f.test(po)||xf.test(po)||_f.test(po))break;ut+=` +`+mo}!lf&&!mo.trim()&&(lf=!0),ot+=Af+` +`,W=W.substring(Af.length+1),po=mo.slice(wo)}}tt.loose||(yn?tt.loose=!0:/\n *\n *$/.test(ot)&&(yn=!0));let yf=null,cf;this.options.gfm&&(yf=/^\[[ xX]\] /.exec(ut),yf&&(cf=yf[0]!=="[ ] ",ut=ut.replace(/^\[[ xX]\] +/,""))),tt.items.push({type:"list_item",raw:ot,task:!!yf,checked:cf,loose:!1,text:ut,tokens:[]}),tt.raw+=ot}tt.items[tt.items.length-1].raw=ot.trimRight(),tt.items[tt.items.length-1].text=ut.trimRight(),tt.raw=tt.raw.trimRight();for(let uo=0;uowo.type==="space"),mo=po.length>0&&po.some(wo=>/\n.*\n/.test(wo.raw));tt.loose=mo}if(tt.loose)for(let uo=0;uo$/,"$1").replace(this.rules.inline._escapes,"$1"):"",tt=q[3]?q[3].substring(1,q[3].length-1).replace(this.rules.inline._escapes,"$1"):q[3];return{type:"def",tag:K,raw:q[0],href:X,title:tt}}}table(W){const q=this.rules.block.table.exec(W);if(q){const K={type:"table",raw:q[0],header:splitCells(q[1]).map(X=>({text:X,tokens:[]})),align:q[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:q[3]&&q[3].trim()?q[3].replace(/\n[ \t]*$/,"").split(` `):[]};if(K.header.length===K.align.length){let X=K.align.length,tt,rt,ot,ut;for(tt=0;tt({text:yn,tokens:[]}));for(X=K.header.length,rt=0;rt/i.test(q[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(q[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(q[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:q[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(q[0]):escape$1(q[0]):q[0]}}link(W){const q=this.rules.inline.link.exec(W);if(q){const K=q[2].trim();if(!this.options.pedantic&&/^$/.test(K))return;const rt=rtrim$2(K.slice(0,-1),"\\");if((K.length-rt.length)%2===0)return}else{const rt=findClosingBracket(q[2],"()");if(rt>-1){const ut=(q[0].indexOf("!")===0?5:4)+q[1].length+rt;q[2]=q[2].substring(0,rt),q[0]=q[0].substring(0,ut).trim(),q[3]=""}}let X=q[2],tt="";if(this.options.pedantic){const rt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(X);rt&&(X=rt[1],tt=rt[3])}else tt=q[3]?q[3].slice(1,-1):"";return X=X.trim(),/^$/.test(K)?X=X.slice(1):X=X.slice(1,-1)),outputLink(q,{href:X&&X.replace(this.rules.inline._escapes,"$1"),title:tt&&tt.replace(this.rules.inline._escapes,"$1")},q[0],this.lexer)}}reflink(W,q){let K;if((K=this.rules.inline.reflink.exec(W))||(K=this.rules.inline.nolink.exec(W))){let X=(K[2]||K[1]).replace(/\s+/g," ");if(X=q[X.toLowerCase()],!X){const tt=K[0].charAt(0);return{type:"text",raw:tt,text:tt}}return outputLink(K,X,K[0],this.lexer)}}emStrong(W,q,K=""){let X=this.rules.inline.emStrong.lDelim.exec(W);if(!X||X[3]&&K.match(/[\p{L}\p{N}]/u))return;if(!(X[1]||X[2]||"")||!K||this.rules.inline.punctuation.exec(K)){const rt=[...X[0]].length-1;let ot,ut,yn=rt,uo=0;const po=X[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(po.lastIndex=0,q=q.slice(-1*W.length+rt);(X=po.exec(q))!=null;){if(ot=X[1]||X[2]||X[3]||X[4]||X[5]||X[6],!ot)continue;if(ut=[...ot].length,X[3]||X[4]){yn+=ut;continue}else if((X[5]||X[6])&&rt%3&&!((rt+ut)%3)){uo+=ut;continue}if(yn-=ut,yn>0)continue;ut=Math.min(ut,ut+yn+uo);const mo=[...W].slice(0,rt+X.index+ut+1).join("");if(Math.min(rt,ut)%2){const lf=mo.slice(1,-1);return{type:"em",raw:mo,text:lf,tokens:this.lexer.inlineTokens(lf)}}const wo=mo.slice(2,-2);return{type:"strong",raw:mo,text:wo,tokens:this.lexer.inlineTokens(wo)}}}}codespan(W){const q=this.rules.inline.code.exec(W);if(q){let K=q[2].replace(/\n/g," ");const X=/[^ ]/.test(K),tt=/^ /.test(K)&&/ $/.test(K);return X&&tt&&(K=K.substring(1,K.length-1)),K=escape$1(K,!0),{type:"codespan",raw:q[0],text:K}}}br(W){const q=this.rules.inline.br.exec(W);if(q)return{type:"br",raw:q[0]}}del(W){const q=this.rules.inline.del.exec(W);if(q)return{type:"del",raw:q[0],text:q[2],tokens:this.lexer.inlineTokens(q[2])}}autolink(W,q){const K=this.rules.inline.autolink.exec(W);if(K){let X,tt;return K[2]==="@"?(X=escape$1(this.options.mangle?q(K[1]):K[1]),tt="mailto:"+X):(X=escape$1(K[1]),tt=X),{type:"link",raw:K[0],text:X,href:tt,tokens:[{type:"text",raw:X,text:X}]}}}url(W,q){let K;if(K=this.rules.inline.url.exec(W)){let X,tt;if(K[2]==="@")X=escape$1(this.options.mangle?q(K[0]):K[0]),tt="mailto:"+X;else{let rt;do rt=K[0],K[0]=this.rules.inline._backpedal.exec(K[0])[0];while(rt!==K[0]);X=escape$1(K[0]),K[1]==="www."?tt="http://"+K[0]:tt=K[0]}return{type:"link",raw:K[0],text:X,href:tt,tokens:[{type:"text",raw:X,text:X}]}}}inlineText(W,q){const K=this.rules.inline.text.exec(W);if(K){let X;return this.lexer.state.inRawBlock?X=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(K[0]):escape$1(K[0]):K[0]:X=escape$1(this.options.smartypants?q(K[0]):K[0]),{type:"text",raw:K[0],text:X}}}}const block$1={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:noopTest,lheading:/^((?:(?!^bull ).|\n(?!\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};block$1._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;block$1._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;block$1.def=edit(block$1.def).replace("label",block$1._label).replace("title",block$1._title).getRegex();block$1.bullet=/(?:[*+-]|\d{1,9}[.)])/;block$1.listItemStart=edit(/^( *)(bull) */).replace("bull",block$1.bullet).getRegex();block$1.list=edit(block$1.list).replace(/bull/g,block$1.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+block$1.def.source+")").getRegex();block$1._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";block$1._comment=/|$)/;block$1.html=edit(block$1.html,"i").replace("comment",block$1._comment).replace("tag",block$1._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();block$1.lheading=edit(block$1.lheading).replace(/bull/g,block$1.bullet).getRegex();block$1.paragraph=edit(block$1._paragraph).replace("hr",block$1.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block$1._tag).getRegex();block$1.blockquote=edit(block$1.blockquote).replace("paragraph",block$1.paragraph).getRegex();block$1.normal={...block$1};block$1.gfm={...block$1.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};block$1.gfm.table=edit(block$1.gfm.table).replace("hr",block$1.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block$1._tag).getRegex();block$1.gfm.paragraph=edit(block$1._paragraph).replace("hr",block$1.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",block$1.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block$1._tag).getRegex();block$1.pedantic={...block$1.normal,html:edit(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",block$1._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:noopTest,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:edit(block$1.normal._paragraph).replace("hr",block$1.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",block$1.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const inline={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:noopTest,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:noopTest,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~";inline.punctuation=edit(inline.punctuation,"u").replace(/punctuation/g,inline._punctuation).getRegex();inline.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;inline.anyPunctuation=/\\[punct]/g;inline._escapes=/\\([punct])/g;inline._comment=edit(block$1._comment).replace("(?:-->|$)","-->").getRegex();inline.emStrong.lDelim=edit(inline.emStrong.lDelim,"u").replace(/punct/g,inline._punctuation).getRegex();inline.emStrong.rDelimAst=edit(inline.emStrong.rDelimAst,"gu").replace(/punct/g,inline._punctuation).getRegex();inline.emStrong.rDelimUnd=edit(inline.emStrong.rDelimUnd,"gu").replace(/punct/g,inline._punctuation).getRegex();inline.anyPunctuation=edit(inline.anyPunctuation,"gu").replace(/punct/g,inline._punctuation).getRegex();inline._escapes=edit(inline._escapes,"gu").replace(/punct/g,inline._punctuation).getRegex();inline._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;inline._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;inline.autolink=edit(inline.autolink).replace("scheme",inline._scheme).replace("email",inline._email).getRegex();inline._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;inline.tag=edit(inline.tag).replace("comment",inline._comment).replace("attribute",inline._attribute).getRegex();inline._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;inline._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;inline._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;inline.link=edit(inline.link).replace("label",inline._label).replace("href",inline._href).replace("title",inline._title).getRegex();inline.reflink=edit(inline.reflink).replace("label",inline._label).replace("ref",block$1._label).getRegex();inline.nolink=edit(inline.nolink).replace("ref",block$1._label).getRegex();inline.reflinkSearch=edit(inline.reflinkSearch,"g").replace("reflink",inline.reflink).replace("nolink",inline.nolink).getRegex();inline.normal={...inline};inline.pedantic={...inline.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:edit(/^!?\[(label)\]\((.*?)\)/).replace("label",inline._label).getRegex(),reflink:edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",inline._label).getRegex()};inline.gfm={...inline.normal,escape:edit(inline.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5?"x"+F.charCodeAt(q).toString(16):F.charCodeAt(q).toString();W+="&#"+K+";"}return W}class _Lexer{constructor(W){Sv(this,"tokens");Sv(this,"options");Sv(this,"state");Sv(this,"tokenizer");Sv(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=W||_defaults,this.options.tokenizer=this.options.tokenizer||new _Tokenizer,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const q={block:block$1.normal,inline:inline.normal};this.options.pedantic?(q.block=block$1.pedantic,q.inline=inline.pedantic):this.options.gfm&&(q.block=block$1.gfm,this.options.breaks?q.inline=inline.breaks:q.inline=inline.gfm),this.tokenizer.rules=q}static get rules(){return{block:block$1,inline}}static lex(W,q){return new _Lexer(q).lex(W)}static lexInline(W,q){return new _Lexer(q).inlineTokens(W)}lex(W){W=W.replace(/\r\n|\r/g,` @@ -3411,7 +3411,7 @@ ${W} `}tablecell(W,q){const K=q.header?"th":"td";return(q.align?`<${K} align="${q.align}">`:`<${K}>`)+W+` `}strong(W){return`${W}`}em(W){return`${W}`}codespan(W){return`${W}`}br(){return this.options.xhtml?"
":"
"}del(W){return`${W}`}link(W,q,K){const X=cleanUrl(this.options.sanitize,this.options.baseUrl,W);if(X===null)return K;W=X;let tt='",tt}image(W,q,K){const X=cleanUrl(this.options.sanitize,this.options.baseUrl,W);if(X===null)return K;W=X;let tt=`${K}":">",tt}text(W){return W}}class _TextRenderer{strong(W){return W}em(W){return W}codespan(W){return W}del(W){return W}html(W){return W}text(W){return W}link(W,q,K){return""+K}image(W,q,K){return""+K}br(){return""}}class _Slugger{constructor(){Sv(this,"seen");this.seen={}}serialize(W){return W.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(W,q){let K=W,X=0;if(this.seen.hasOwnProperty(K)){X=this.seen[W];do X++,K=W+"-"+X;while(this.seen.hasOwnProperty(K))}return q||(this.seen[W]=X,this.seen[K]=0),K}slug(W,q={}){const K=this.serialize(W);return this.getNextSafeSlug(K,q.dryrun)}}class _Parser{constructor(W){Sv(this,"options");Sv(this,"renderer");Sv(this,"textRenderer");Sv(this,"slugger");this.options=W||_defaults,this.options.renderer=this.options.renderer||new _Renderer,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new _TextRenderer,this.slugger=new _Slugger}static parse(W,q){return new _Parser(q).parse(W)}static parseInline(W,q){return new _Parser(q).parseInline(W)}parse(W,q=!0){let K="";for(let X=0;X0&&mo.tokens[0].type==="paragraph"?(mo.tokens[0].text=cf+" "+mo.tokens[0].text,mo.tokens[0].tokens&&mo.tokens[0].tokens.length>0&&mo.tokens[0].tokens[0].type==="text"&&(mo.tokens[0].tokens[0].text=cf+" "+mo.tokens[0].tokens[0].text)):mo.tokens.unshift({type:"text",text:cf}):yf+=cf}yf+=this.parse(mo.tokens,yn),uo+=this.renderer.listitem(yf,lf,!!wo)}K+=this.renderer.list(uo,ot,ut);continue}case"html":{const rt=tt;K+=this.renderer.html(rt.text,rt.block);continue}case"paragraph":{const rt=tt;K+=this.renderer.paragraph(this.parseInline(rt.tokens));continue}case"text":{let rt=tt,ot=rt.tokens?this.parseInline(rt.tokens):rt.text;for(;X+1{K=K.concat(this.walkTokens(ot[ut],q))}):ot.tokens&&(K=K.concat(this.walkTokens(ot.tokens,q)))}}return K}use(...W){const q=this.defaults.extensions||{renderers:{},childTokens:{}};return W.forEach(K=>{const X={...K};if(X.async=this.defaults.async||X.async||!1,K.extensions&&(K.extensions.forEach(tt=>{if(!tt.name)throw new Error("extension name required");if("renderer"in tt){const rt=q.renderers[tt.name];rt?q.renderers[tt.name]=function(...ot){let ut=tt.renderer.apply(this,ot);return ut===!1&&(ut=rt.apply(this,ot)),ut}:q.renderers[tt.name]=tt.renderer}if("tokenizer"in tt){if(!tt.level||tt.level!=="block"&&tt.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const rt=q[tt.level];rt?rt.unshift(tt.tokenizer):q[tt.level]=[tt.tokenizer],tt.start&&(tt.level==="block"?q.startBlock?q.startBlock.push(tt.start):q.startBlock=[tt.start]:tt.level==="inline"&&(q.startInline?q.startInline.push(tt.start):q.startInline=[tt.start]))}"childTokens"in tt&&tt.childTokens&&(q.childTokens[tt.name]=tt.childTokens)}),X.extensions=q),K.renderer){const tt=this.defaults.renderer||new _Renderer(this.defaults);for(const rt in K.renderer){const ot=K.renderer[rt],ut=rt,yn=tt[ut];tt[ut]=(...uo)=>{let po=ot.apply(tt,uo);return po===!1&&(po=yn.apply(tt,uo)),po||""}}X.renderer=tt}if(K.tokenizer){const tt=this.defaults.tokenizer||new _Tokenizer(this.defaults);for(const rt in K.tokenizer){const ot=K.tokenizer[rt],ut=rt,yn=tt[ut];tt[ut]=(...uo)=>{let po=ot.apply(tt,uo);return po===!1&&(po=yn.apply(tt,uo)),po}}X.tokenizer=tt}if(K.hooks){const tt=this.defaults.hooks||new _Hooks;for(const rt in K.hooks){const ot=K.hooks[rt],ut=rt,yn=tt[ut];_Hooks.passThroughHooks.has(rt)?tt[ut]=uo=>{if(this.defaults.async)return Promise.resolve(ot.call(tt,uo)).then(mo=>yn.call(tt,mo));const po=ot.call(tt,uo);return yn.call(tt,po)}:tt[ut]=(...uo)=>{let po=ot.apply(tt,uo);return po===!1&&(po=yn.apply(tt,uo)),po}}X.hooks=tt}if(K.walkTokens){const tt=this.defaults.walkTokens,rt=K.walkTokens;X.walkTokens=function(ot){let ut=[];return ut.push(rt.call(this,ot)),tt&&(ut=ut.concat(tt.call(this,ot))),ut}}this.defaults={...this.defaults,...X}}),this}setOptions(W){return this.defaults={...this.defaults,...W},this}}CT=new WeakSet,hI=function(W,q){return(K,X,tt)=>{typeof X=="function"&&(tt=X,X=null);const rt={...X},ot={...this.defaults,...rt};this.defaults.async===!0&&rt.async===!1&&(ot.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),ot.async=!0);const ut=NC(this,DC,wP).call(this,!!ot.silent,!!ot.async,tt);if(typeof K>"u"||K===null)return ut(new Error("marked(): input parameter is undefined or null"));if(typeof K!="string")return ut(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(K)+", string expected"));if(checkDeprecations(ot,tt),ot.hooks&&(ot.hooks.options=ot),tt){const yn=tt,uo=ot.highlight;let po;try{ot.hooks&&(K=ot.hooks.preprocess(K)),po=W(K,ot)}catch(lf){return ut(lf)}const mo=lf=>{let yf;if(!lf)try{ot.walkTokens&&this.walkTokens(po,ot.walkTokens),yf=q(po,ot),ot.hooks&&(yf=ot.hooks.postprocess(yf))}catch(cf){lf=cf}return ot.highlight=uo,lf?ut(lf):yn(null,yf)};if(!uo||uo.length<3||(delete ot.highlight,!po.length))return mo();let wo=0;this.walkTokens(po,lf=>{lf.type==="code"&&(wo++,setTimeout(()=>{uo(lf.text,lf.lang,(yf,cf)=>{if(yf)return mo(yf);cf!=null&&cf!==lf.text&&(lf.text=cf,lf.escaped=!0),wo--,wo===0&&mo()})},0))}),wo===0&&mo();return}if(ot.async)return Promise.resolve(ot.hooks?ot.hooks.preprocess(K):K).then(yn=>W(yn,ot)).then(yn=>ot.walkTokens?Promise.all(this.walkTokens(yn,ot.walkTokens)).then(()=>yn):yn).then(yn=>q(yn,ot)).then(yn=>ot.hooks?ot.hooks.postprocess(yn):yn).catch(ut);try{ot.hooks&&(K=ot.hooks.preprocess(K));const yn=W(K,ot);ot.walkTokens&&this.walkTokens(yn,ot.walkTokens);let uo=q(yn,ot);return ot.hooks&&(uo=ot.hooks.postprocess(uo)),uo}catch(yn){return ut(yn)}}},DC=new WeakSet,wP=function(W,q,K){return X=>{if(X.message+=` -Please report this to https://github.com/markedjs/marked.`,W){const tt="

An error occurred:

"+escape$1(X.message+"",!0)+"
";if(q)return Promise.resolve(tt);if(K){K(null,tt);return}return tt}if(q)return Promise.reject(X);if(K){K(X);return}throw X}};const markedInstance=new Marked;function marked(F,W,q){return markedInstance.parse(F,W,q)}marked.options=marked.setOptions=function(F){return markedInstance.setOptions(F),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.getDefaults=_getDefaults;marked.defaults=_defaults;marked.use=function(...F){return markedInstance.use(...F),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.walkTokens=function(F,W){return markedInstance.walkTokens(F,W)};marked.parseInline=markedInstance.parseInline;marked.Parser=_Parser;marked.parser=_Parser.parse;marked.Renderer=_Renderer;marked.TextRenderer=_TextRenderer;marked.Lexer=_Lexer;marked.lexer=_Lexer.lex;marked.Tokenizer=_Tokenizer;marked.Slugger=_Slugger;marked.Hooks=_Hooks;marked.parse=marked;marked.options;marked.setOptions;marked.use;marked.walkTokens;marked.parseInline;_Parser.parse;_Lexer.lex;const _hoisted_1$n={class:"card",hoist:""},_hoisted_2$k=["src","alt"],_hoisted_3$h={class:"content"},_hoisted_4$g=["innerHTML"],_hoisted_5$e=["innerHTML"],_hoisted_6$d=["innerHTML"],_hoisted_7$a={slot:"footer"},_hoisted_8$9=["href"],_sfc_main$p=defineComponent({__name:"EntityCard.ce",props:{file:{type:String},language:{type:String,default:"en"},qid:{type:String}},setup(F){const W=F;watch$1(W,()=>{W.qid&&(q.value=W.qid),W.file&&(K.value=W.file)});const q=ref(W.qid);watch$1(q,()=>{ot()});const K=ref(W.file);watch$1(K,()=>{ot()});const X=ref();watch$1(X,po=>{po.summaryText||ut()});const tt=computed(()=>{var po;return(po=window.config)==null?void 0:po.source}),rt=ref();onMounted(()=>{ot()});async function ot(){var po;if(K.value){let mo=(po=tt.value)!=null&&po.owner?`https://raw.githubusercontent.com/${tt.value.owner}/${tt.value.repository}/${tt.value.branch}/`:"/",wo,lf,yf=K.value.split(".").pop();yf==="md"?wo=await fetch(`${mo}${K.value}`):yf==="yaml"?lf=await fetch(`${mo}${K.value}`):[wo,lf]=await Promise.all([fetch(`${mo}${K.value}.md`),fetch(`${mo}${K.value}.yaml`)]);let cf=lf!=null&&lf.ok?uo(await lf.text()):{};wo!=null&&wo.ok&&(cf={...cf,...yn(await wo.text())}),cf.id&&(cf={...await getEntity(cf.id),...cf}),X.value=cf}else q.value&&(X.value=await getEntity(q.value))}function ut(){if(X.value.wikipedia){let po=X.value.wikipedia.replace(/\/w\//,"/wiki").split("/wiki/").pop();fetch(`https://${W.language}.wikipedia.org/api/rest_v1/page/summary/${po}`).then(mo=>mo.json()).then(mo=>{rt.value=mo.extract_html||mo.extract,q.value&&(window.entityData[q.value].summaryText=mo.extract_html||mo.extract)})}}function yn(po){var _f,$f,wf;let mo=(_f=new DOMParser().parseFromString(marked.parse(po),"text/html"))==null?void 0:_f.firstChild,wo=($f=mo==null?void 0:mo.querySelector("h1,h2,h3,h4,h5,h6"))==null?void 0:$f.textContent,lf=(wf=mo==null?void 0:mo.querySelector("img"))==null?void 0:wf.src,yf,cf=[];mo.querySelectorAll("p").forEach(Pf=>{var Cf,Af;/^Q\d+$/.test(((Cf=Pf.textContent)==null?void 0:Cf.trim())||"")?yf=(Af=Pf.textContent)==null?void 0:Af.trim():cf.push(Pf.textContent||"")});let vf={};return wo&&(vf.label=wo),yf&&(vf.id=yf),cf.length&&(vf.description=cf.join(` +Please report this to https://github.com/markedjs/marked.`,W){const tt="

An error occurred:

"+escape$1(X.message+"",!0)+"
";if(q)return Promise.resolve(tt);if(K){K(null,tt);return}return tt}if(q)return Promise.reject(X);if(K){K(X);return}throw X}};const markedInstance=new Marked;function marked(F,W,q){return markedInstance.parse(F,W,q)}marked.options=marked.setOptions=function(F){return markedInstance.setOptions(F),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.getDefaults=_getDefaults;marked.defaults=_defaults;marked.use=function(...F){return markedInstance.use(...F),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.walkTokens=function(F,W){return markedInstance.walkTokens(F,W)};marked.parseInline=markedInstance.parseInline;marked.Parser=_Parser;marked.parser=_Parser.parse;marked.Renderer=_Renderer;marked.TextRenderer=_TextRenderer;marked.Lexer=_Lexer;marked.lexer=_Lexer.lex;marked.Tokenizer=_Tokenizer;marked.Slugger=_Slugger;marked.Hooks=_Hooks;marked.parse=marked;marked.options;marked.setOptions;marked.use;marked.walkTokens;marked.parseInline;_Parser.parse;_Lexer.lex;const _hoisted_1$n={class:"card",hoist:""},_hoisted_2$k=["src","alt"],_hoisted_3$h={class:"content"},_hoisted_4$g=["innerHTML"],_hoisted_5$e=["innerHTML"],_hoisted_6$d=["innerHTML"],_hoisted_7$a={slot:"footer"},_hoisted_8$9=["href"],_sfc_main$p=defineComponent({__name:"EntityCard.ce",props:{file:{type:String},language:{type:String,default:"en"},qid:{type:String}},setup(F){const W=F;watch$1(W,()=>{W.qid&&(q.value=W.qid),W.file&&(K.value=W.file)});const q=ref(W.qid);watch$1(q,()=>{ot()});const K=ref(W.file);watch$1(K,()=>{ot()});const X=ref();watch$1(X,po=>{po.summaryText||ut()});const tt=computed(()=>{var po;return(po=window.config)==null?void 0:po.source}),rt=ref();onMounted(()=>{ot()});async function ot(){var po;if(K.value){let mo=(po=tt.value)!=null&&po.owner?`https://raw.githubusercontent.com/${tt.value.owner}/${tt.value.repository}/${tt.value.branch}/`:"/",wo,lf,yf=K.value.split(".").pop();yf==="md"?wo=await fetch(`${mo}${K.value}`):yf==="yaml"?lf=await fetch(`${mo}${K.value}`):[wo,lf]=await Promise.all([fetch(`${mo}${K.value}.md`),fetch(`${mo}${K.value}.yaml`)]);let cf=lf!=null&&lf.ok?uo(await lf.text()):{};wo!=null&&wo.ok&&(cf={...cf,...yn(await wo.text())}),cf.id&&(cf={...await getEntity(cf.id),...cf}),X.value=cf}else q.value&&(X.value=await getEntity(q.value))}function ut(){if(X.value.wikipedia){let po=X.value.wikipedia.replace(/\/w\//,"/wiki").split("/wiki/").pop();fetch(`https://${W.language}.wikipedia.org/api/rest_v1/page/summary/${po}`).then(mo=>mo.json()).then(mo=>{rt.value=mo.extract_html||mo.extract,q.value&&(window.entityData[q.value].summaryText=mo.extract_html||mo.extract)})}}function yn(po){var _f,$f,xf;let mo=(_f=new DOMParser().parseFromString(marked.parse(po),"text/html"))==null?void 0:_f.firstChild,wo=($f=mo==null?void 0:mo.querySelector("h1,h2,h3,h4,h5,h6"))==null?void 0:$f.textContent,lf=(xf=mo==null?void 0:mo.querySelector("img"))==null?void 0:xf.src,yf,cf=[];mo.querySelectorAll("p").forEach(Af=>{var Cf,Pf;/^Q\d+$/.test(((Cf=Af.textContent)==null?void 0:Cf.trim())||"")?yf=(Pf=Af.textContent)==null?void 0:Pf.trim():cf.push(Af.textContent||"")});let vf={};return wo&&(vf.label=wo),yf&&(vf.id=yf),cf.length&&(vf.description=cf.join(` `)),lf&&(vf.thumbnail=lf),vf}function uo(po){return load$2(po)}return(po,mo)=>{var wo,lf,yf,cf,vf,_f;return openBlock(),createElementBlock("sl-card",_hoisted_1$n,[(wo=X.value)!=null&&wo.thumbnail?(openBlock(),createElementBlock("img",{key:0,slot:"image",src:(lf=X.value)==null?void 0:lf.thumbnail,alt:(yf=X.value)==null?void 0:yf.label},null,8,_hoisted_2$k)):createCommentVNode("",!0),createBaseVNode("div",_hoisted_3$h,[(cf=X.value)!=null&&cf.label?(openBlock(),createElementBlock("h2",{key:0,innerHTML:X.value.label},null,8,_hoisted_4$g)):createCommentVNode("",!0),(vf=X.value)!=null&&vf.description?(openBlock(),createElementBlock("p",{key:1,class:"description",innerHTML:X.value.description},null,8,_hoisted_5$e)):createCommentVNode("",!0),rt.value?(openBlock(),createElementBlock("p",{key:2,class:"description",innerHTML:rt.value},null,8,_hoisted_6$d)):createCommentVNode("",!0)]),createBaseVNode("div",_hoisted_7$a,[!K.value&&q.value&&((_f=X.value)!=null&&_f.wikipedia)?(openBlock(),createElementBlock("a",{key:0,href:X.value.wikipedia,target:"_blank"},"Wikipedia",8,_hoisted_8$9)):createCommentVNode("",!0)])])}}}),_style_0$n=`.card{display:flex;flex-direction:column;min-width:200px;max-width:300px;max-height:800px;background-color:#fff;margin:1em;box-shadow:#32325d40 0 6px 12px -2px,#0000004d 0 3px 7px -3px;border:1px solid #ccc;border-radius:3px}img{max-height:375px;-o-object-fit:cover;object-fit:cover}.content{display:flex;flex-direction:column;flex:1;gap:.5em;padding:.5em;overflow-y:scroll}h2{margin:0}.description{margin:0;padding:0;font-style:italic;font-size:.9em}.card [slot=footer]{display:flex;justify-content:space-between;align-items:center;padding:.5em} `,EntityCard=_export_sfc(_sfc_main$p,[["styles",[_style_0$n]]]),_hoisted_1$m=["innerHTML"],_hoisted_2$j=["qid","file","language"],_sfc_main$o=defineComponent({__name:"EntityInfobox.ce",props:{file:{type:String},language:{type:String,default:"en"},qid:{type:String},text:{type:String}},setup(F){const W=F,q=ref(null),K=computed(()=>{var ut,yn;return(yn=(ut=q.value)==null?void 0:ut.getRootNode())==null?void 0:yn.host}),X=computed(()=>{var ut;return(ut=q==null?void 0:q.value)==null?void 0:ut.parentNode}),tt=ref(),rt=ref(),ot=ref(W.text);return watch$1(W,ut=>{tt.value=ut.qid,ot.value=ut.text}),onMounted(()=>{var ut,yn;ot.value=W.text||((ut=K.value)==null?void 0:ut.textContent),((yn=X.value)==null?void 0:yn.querySelector("sl-dropdown")).addEventListener("sl-show",uo=>{W.qid&&(tt.value=W.qid),W.file&&(rt.value=W.file)})}),(ut,yn)=>(openBlock(),createElementBlock("sl-dropdown",{ref_key:"root",ref:q,distance:"12",placement:"top",hoist:""},[createBaseVNode("div",{slot:"trigger",innerHTML:ot.value},null,8,_hoisted_1$m),tt.value||rt.value?(openBlock(),createElementBlock("ve-entity-card",{key:0,qid:tt.value,file:rt.value,language:W.language},null,8,_hoisted_2$j)):createCommentVNode("",!0)],512))}}),_style_0$m=`:host{cursor:pointer}sl-dropdown svg{width:1.2em;height:1.2em;cursor:pointer} `,EntityInfobox=_export_sfc(_sfc_main$o,[["styles",[_style_0$m]]]);/* @@ -3426,14 +3426,14 @@ Please report this to https://github.com/markedjs/marked.`,W){const tt="

An er * @author: HtmlStream * @license: Htmlstream Libraries (https://preline.co/docs/license.html) * Copyright 2023 Htmlstream - */class HSOverlay extends Component$1{constructor(q){super("[data-hs-overlay]");Sv(this,"root");this.root=q,this.openNextOverlay=!1}init(){this.root.addEventListener("click",q=>{const X=q.target.closest(this.selector),tt=q.target.closest("[data-hs-overlay-close]"),rt=q.target.getAttribute("aria-overlay")==="true";if(tt)return this.close(tt.closest(".hs-overlay.open"));if(X)return this.toggle(this.root.querySelector(X.getAttribute("data-hs-overlay")));rt&&this._onBackdropClick(q.target)}),this.root.addEventListener("keydown",q=>{if(q.keyCode===27){const K=this.root.querySelector(".hs-overlay.open");if(!K)return;setTimeout(()=>{K.getAttribute("data-hs-overlay-keyboard")!=="false"&&this.close(K)})}})}toggle(q){q&&(q.classList.contains("hidden")?this.open(q):this.close(q))}open(q){if(!q)return;const K=this.root.querySelector(".hs-overlay.open"),X=this.getClassProperty(q,"--body-scroll","false")!=="true";if(K)return this.openNextOverlay=!0,this.close(K).then(()=>{this.open(q),this.openNextOverlay=!1});X&&(this.root.style.overflow="hidden"),this._buildBackdrop(q),this._checkTimer(q),this._autoHide(q),q.classList.remove("hidden"),q.setAttribute("aria-overlay","true"),q.setAttribute("tabindex","-1"),setTimeout(()=>{q.classList.contains("hidden")||(q.classList.add("open"),this._fireEvent("open",q),this._dispatch("open.hs.overlay",q,q),this._focusInput(q))},50)}close(q){return new Promise(K=>{q&&(q.classList.remove("open"),q.removeAttribute("aria-overlay"),q.removeAttribute("tabindex","-1"),this.afterTransition(q,()=>{q.classList.contains("open")||(q.classList.add("hidden"),this._destroyBackdrop(),this._fireEvent("close",q),this._dispatch("close.hs.overlay",q,q),this.root.style.overflow="",K(q))}))})}_autoHide(q){const K=parseInt(this.getClassProperty(q,"--auto-hide","0"));K&&(q.autoHide=setTimeout(()=>{this.close(q)},K))}_checkTimer(q){q.autoHide&&(clearTimeout(q.autoHide),delete q.autoHide)}_onBackdropClick(q){this.getClassProperty(q,"--overlay-backdrop","true")!=="static"&&this.close(q)}_buildBackdrop(q){const K=q.getAttribute("data-hs-overlay-backdrop-container")||!1;let X=document.createElement("div"),tt="transition duration fixed inset-0 z-50 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 hs-overlay-backdrop";for(const ut of q.classList.values())ut.startsWith("hs-overlay-backdrop-open:")&&(tt+=` ${ut}`);const rt=this.getClassProperty(q,"--overlay-backdrop","true")!=="static";this.getClassProperty(q,"--overlay-backdrop","true")!=="false"&&(K&&(X=this.root.querySelector(K).cloneNode(!0),X.classList.remove("hidden"),tt=X.classList,X.classList=""),rt&&X.addEventListener("click",()=>this.close(q),!0),X.setAttribute("data-hs-overlay-backdrop-template",""),this.root.appendChild(X),setTimeout(()=>{X.classList=tt}))}_destroyBackdrop(){const q=this.root.querySelector("[data-hs-overlay-backdrop-template]");q&&(this.openNextOverlay&&(q.style.transitionDuration=`${parseFloat(window.getComputedStyle(q).transitionDuration.replace(/[^\d.-]/g,""))*1.8}s`),q.classList.add("opacity-0"),this.afterTransition(q,()=>{q.remove()}))}_focusInput(q){const K=q.querySelector("[autofocus]");K&&K.focus()}}const _hoisted_1$l=["innerHTML"],_hoisted_2$i={class:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto min-h-[calc(100%-3.5rem)] flex items-center"},_hoisted_3$g={class:"flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"},_hoisted_4$f={class:"p-4 overflow-y-auto flex items-center gap-4"},_hoisted_5$d=createBaseVNode("sl-spinner",{style:{"font-size":"3rem","--indicator-color":"deeppink","--track-color":"pink"}},null,-1),_hoisted_6$c=["innerHTML"],_sfc_main$n=defineComponent({__name:"Footer.ce",setup(F){const W=ref([]),q=ref(null),K=computed(()=>{var wo,lf;return(lf=(wo=q.value)==null?void 0:wo.getRootNode())==null?void 0:lf.host}),X=ref(null),tt=computed(()=>X==null?void 0:X.value),rt=computed(()=>new HSOverlay(tt.value)),ot=ref(null),ut=computed(()=>ot==null?void 0:ot.value),yn=ref("Generating PDF...");watch$1(ut,wo=>{rt.value.init(),wo.addEventListener("open.hs.overlay",lf=>uo.value=!0),wo.addEventListener("close.hs.overlay",lf=>uo.value=!1)});const uo=ref(!1);watch$1(uo,wo=>{wo?rt.value.open(ut.value):rt.value.close(ut.value)}),watch$1(K,()=>{po()});function po(){function wo(){return Array.from(K.value.querySelectorAll("li")).map(lf=>{let yf=document.createElement("li");yf.innerHTML=marked.parse(lf.textContent||"");let cf=yf.querySelector("code");if(cf){let vf=cf.previousElementSibling,_f=vf||yf,$f=mo(cf.innerHTML);$f.id&&(_f.id=$f.id),$f.class&&$f.class.split(" ").forEach(wf=>_f.classList.add(wf)),$f.style&&_f.setAttribute("style",$f.style),cf.remove()}return yf})}W.value=wo(),new MutationObserver(lf=>{for(let yf of lf)yf.type==="childList"&&(W.value=wo())}).observe(K.value,{childList:!0,subtree:!0})}function mo(wo){var vf;let lf=[];wo=wo.replace(/”/g,'"').replace(/”/g,'"').replace(/’/g,"'"),(vf=wo==null?void 0:wo.match(/[^\s"]+|"([^"]*)"/gmi))==null||vf.filter(_f=>_f).forEach(_f=>{lf.length>0&&lf[lf.length-1].indexOf("=")===lf[lf.length-1].length-1?lf[lf.length-1]=`${lf[lf.length-1]}${_f}`:lf.push(_f)});let yf={},cf=0;for(;cf0){let[$f,wf]=_f.split("=");wf=wf[0]==='"'&&wf[wf.length-1]==='"'?wf.slice(1,-1):wf,yf[$f]?yf[$f]+=` ${wf}`:yf[$f]=wf}else if(_f[0]==="."){let $f="class",wf=_f.slice(1);wf=wf[0]==='"'&&wf[wf.length-1]==='"'?wf.slice(1,-1):wf,yf[$f]?yf[$f]+=` ${wf}`:yf[$f]=wf}else if(_f[0]===":"){let $f="style",wf;_f.length===1&&cf<_f.length&&lf[cf+1][0]==='"'?(wf=lf[cf+1].slice(1,-1),cf++):wf=_f.slice(1),yf[$f]?yf[$f]+=` ${wf}`:yf[$f]=wf}else if(_f[0]==='"'){let $f="args",wf=_f.slice(1,-1);yf[$f]?yf[$f].push(wf):yf[$f]=[wf]}else _f[0]==="#"?yf.id=_f.slice(1):yf[_f]=!0;cf++}return yf}return(wo,lf)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("ul",{ref_key:"footer",ref:q,id:"footer",class:"flex bg-slate-100 p-2 gap-3 mt-8 items-center w-full h-8"},[(openBlock(!0),createElementBlock(Fragment,null,renderList(W.value,(yf,cf)=>(openBlock(),createElementBlock("li",{key:`li-${cf}`,innerHTML:yf.innerHTML,class:normalizeClass(yf.className),style:normalizeStyle(yf.getAttribute("style")||"")},null,14,_hoisted_1$l))),128))],512),createBaseVNode("div",{ref_key:"overlayRef",ref:X},[createBaseVNode("div",{ref_key:"modalRef",ref:ot,id:"hs-basic-modal",class:"hs-overlay hidden w-full h-full fixed top-0 start-0 z-[80] overflow-x-hidden overflow-y-auto pointer-events-none"},[createBaseVNode("div",_hoisted_2$i,[createBaseVNode("div",_hoisted_3$g,[createBaseVNode("div",_hoisted_4$f,[_hoisted_5$d,createBaseVNode("p",{innerHTML:yn.value},null,8,_hoisted_6$c)])])])],512)],512)],64))}}),_style_0$l=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.\\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.\\!relative{position:relative!important}.relative{position:relative}.sticky{position:sticky}.-inset-1{top:-.25rem;right:-.25rem;bottom:-.25rem;left:-.25rem}.inset-0{top:0;right:0;bottom:0;left:0}.end-1{inset-inline-end:.25rem}.right-\\[10px\\]{right:10px}.start-0{inset-inline-start:0px}.top-0{top:0}.top-\\[12px\\]{top:12px}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.z-\\[80\\]{z-index:80}.float-right{float:right}.float-left{float:left}.float-none{float:none}.clear-left{clear:left}.clear-right{clear:right}.clear-both{clear:both}.clear-none{clear:none}.m-1{margin:.25rem}.m-3{margin:.75rem}.me-1{margin-inline-end:.25rem}.ml-1{margin-left:.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-none{overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.\\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\\!table{display:table!important}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.\\!grid{display:grid!important}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.h-1{height:.25rem}.h-40{height:10rem}.h-8{height:2rem}.h-80{height:20rem}.h-auto{height:auto}.h-full{height:100%}.min-h-\\[calc\\(100\\%-3\\.5rem\\)\\]{min-height:calc(100% - 3.5rem)}.w-1{width:.25rem}.w-\\[a-z0-9-\\]{width:a-z0-9-}.w-full{width:100%}.max-w-\\[24px\\]{max-width:24px}.max-w-xs{max-width:20rem}.flex-shrink,.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.caption-top{caption-side:top}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.\\!transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform,.transform-cpu{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}.cursor-pointer{cursor:pointer}.touch-auto{touch-action:auto}.touch-none{touch-action:none}.touch-pan-x{--tw-pan-x: pan-x;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-left{--tw-pan-x: pan-left;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-right{--tw-pan-x: pan-right;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-up{--tw-pan-y: pan-up;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-down{--tw-pan-y: pan-down;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pinch-zoom{--tw-pinch-zoom: pinch-zoom;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-manipulation{touch-action:manipulation}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize-none{resize:none}.resize-y{resize:vertical}.resize-x{resize:horizontal}.resize{resize:both}.snap-none{scroll-snap-type:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-both{scroll-snap-type:both var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.snap-proximity{--tw-scroll-snap-strictness: proximity}.snap-start{scroll-snap-align:start}.snap-end{scroll-snap-align:end}.snap-center{scroll-snap-align:center}.snap-align-none{scroll-snap-align:none}.snap-normal{scroll-snap-stop:normal}.snap-always{scroll-snap-stop:always}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.columns-1{-moz-columns:1;columns:1}.break-before-auto{-moz-column-break-before:auto;break-before:auto}.break-before-avoid{-moz-column-break-before:avoid;break-before:avoid}.break-before-all{-moz-column-break-before:all;break-before:all}.break-before-avoid-page{-moz-column-break-before:avoid;break-before:avoid-page}.break-before-page{-moz-column-break-before:page;break-before:page}.break-before-left{-moz-column-break-before:left;break-before:left}.break-before-right{-moz-column-break-before:right;break-before:right}.break-before-column{-moz-column-break-before:column;break-before:column}.break-inside-auto{-moz-column-break-inside:auto;break-inside:auto}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-inside-avoid-page{break-inside:avoid-page}.break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.break-after-auto{-moz-column-break-after:auto;break-after:auto}.break-after-avoid{-moz-column-break-after:avoid;break-after:avoid}.break-after-all{-moz-column-break-after:all;break-after:all}.break-after-avoid-page{-moz-column-break-after:avoid;break-after:avoid-page}.break-after-page{-moz-column-break-after:page;break-after:page}.break-after-left{-moz-column-break-after:left;break-after:left}.break-after-right{-moz-column-break-after:right;break-after:right}.break-after-column{-moz-column-break-after:column;break-after:column}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row-dense{grid-auto-flow:row dense}.grid-flow-col-dense{grid-auto-flow:column dense}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.flex-nowrap{flex-wrap:nowrap}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-content-end{place-content:end}.place-content-between{place-content:space-between}.place-content-around{place-content:space-around}.place-content-evenly{place-content:space-evenly}.place-content-baseline{place-content:baseline}.place-content-stretch{place-content:stretch}.place-items-start{place-items:start}.place-items-end{place-items:end}.place-items-center{place-items:center}.place-items-baseline{place-items:baseline}.place-items-stretch{place-items:stretch}.content-normal{align-content:normal}.content-center{align-content:center}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-evenly{align-content:space-evenly}.content-baseline{align-content:baseline}.content-stretch{align-content:stretch}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-normal{justify-content:normal}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-stretch{justify-content:stretch}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.divide-dashed>:not([hidden])~:not([hidden]){border-style:dashed}.divide-dotted>:not([hidden])~:not([hidden]){border-style:dotted}.divide-double>:not([hidden])~:not([hidden]){border-style:double}.divide-none>:not([hidden])~:not([hidden]){border-style:none}.place-self-auto{place-self:auto}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.place-self-stretch{place-self:stretch}.self-auto{align-self:auto}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.self-baseline{align-self:baseline}.justify-self-auto{justify-self:auto}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.justify-self-stretch{justify-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-x-clip{overflow-x:clip}.overflow-y-clip{overflow-y:clip}.overflow-x-visible{overflow-x:visible}.overflow-y-visible{overflow-y:visible}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.overscroll-auto{overscroll-behavior:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.overscroll-y-auto{overscroll-behavior-y:auto}.overscroll-y-contain{overscroll-behavior-y:contain}.overscroll-y-none{overscroll-behavior-y:none}.overscroll-x-auto{overscroll-behavior-x:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-x-none{overscroll-behavior-x:none}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.hyphens-none{-webkit-hyphens:none;hyphens:none}.hyphens-manual{-webkit-hyphens:manual;hyphens:manual}.hyphens-auto{-webkit-hyphens:auto;hyphens:auto}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.whitespace-break-spaces{white-space:break-spaces}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-e{border-inline-end-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-double{border-style:double}.border-hidden{border-style:hidden}.border-none{border-style:none}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-\\[rgb\\(255\\,0\\,0\\)\\]{--tw-bg-opacity: 1;background-color:rgb(255 0 0 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-content{background-clip:content-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-origin-border{background-origin:border-box}.bg-origin-padding{background-origin:padding-box}.bg-origin-content{background-origin:content-box}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.object-none{-o-object-fit:none;object-fit:none}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-14{padding:3.5rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-8{padding:2rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pe-1{padding-inline-end:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-top{vertical-align:text-top}.align-text-bottom{vertical-align:text-bottom}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.\\!ordinal{--tw-ordinal: ordinal !important;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero: slashed-zero;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure: lining-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure: oldstyle-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing: proportional-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction: diagonal-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction: stacked-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.text-\\[\\#336699\\]\\/\\[\\.35\\]{color:#33669959}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.bg-blend-normal{background-blend-mode:normal}.bg-blend-multiply{background-blend-mode:multiply}.bg-blend-screen{background-blend-mode:screen}.bg-blend-overlay{background-blend-mode:overlay}.bg-blend-darken{background-blend-mode:darken}.bg-blend-lighten{background-blend-mode:lighten}.bg-blend-color-dodge{background-blend-mode:color-dodge}.bg-blend-color-burn{background-blend-mode:color-burn}.bg-blend-hard-light{background-blend-mode:hard-light}.bg-blend-soft-light{background-blend-mode:soft-light}.bg-blend-difference{background-blend-mode:difference}.bg-blend-exclusion{background-blend-mode:exclusion}.bg-blend-hue{background-blend-mode:hue}.bg-blend-saturation{background-blend-mode:saturation}.bg-blend-color{background-blend-mode:color}.bg-blend-luminosity{background-blend-mode:luminosity}.mix-blend-normal{mix-blend-mode:normal}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-screen{mix-blend-mode:screen}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-darken{mix-blend-mode:darken}.mix-blend-lighten{mix-blend-mode:lighten}.mix-blend-color-dodge{mix-blend-mode:color-dodge}.mix-blend-color-burn{mix-blend-mode:color-burn}.mix-blend-hard-light{mix-blend-mode:hard-light}.mix-blend-soft-light{mix-blend-mode:soft-light}.mix-blend-difference{mix-blend-mode:difference}.mix-blend-exclusion{mix-blend-mode:exclusion}.mix-blend-hue{mix-blend-mode:hue}.mix-blend-saturation{mix-blend-mode:saturation}.mix-blend-color{mix-blend-mode:color}.mix-blend-luminosity{mix-blend-mode:luminosity}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-dashed{outline-style:dashed}.outline-dotted{outline-style:dotted}.outline-double{outline-style:double}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!invert{--tw-invert: invert(100%) !important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter-none{filter:none}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-grayscale{--tw-backdrop-grayscale: grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-invert{--tw-backdrop-invert: invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-sepia{--tw-backdrop-sepia: sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter-none{-webkit-backdrop-filter:none;backdrop-filter:none}.\\!transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.content-\\[\\'this-is-also-valid\\]-weirdly-enough\\'\\]{--tw-content: "this-is-also-valid]-weirdly-enough";content:var(--tw-content)}.\\[--placement\\:bottom\\]{--placement: bottom}.\\[--placement\\:top\\]{--placement: top}.\\[--trigger\\:click\\]{--trigger: click}.\\[-\\:\\=\\]{-: =}.\\[a-zA-Z0-9\\:\\\\\\\\-\\\\\\\\\\._\\$\\]{a-z-a--z0-9:\\\\-\\\\. $}.\\[a-zA-Z0-9\\:_-\\]{a-z-a--z0-9:-}.\\[a-zA-Z\\:_\\]{a-z-a--z:}.\\[a\\:a\\]{a:a}.\\[vite\\:css\\]{vite:css}.\\[vite\\:html\\]{vite:html}html{padding:1rem;font-family:sans-serif}ve-header ul,ve-menu ul{display:none}@media (min-width: 640px){.sm\\:container{width:100%}@media (min-width: 640px){.sm\\:container{max-width:640px}}@media (min-width: 768px){.sm\\:container{max-width:768px}}@media (min-width: 1024px){.sm\\:container{max-width:1024px}}@media (min-width: 1280px){.sm\\:container{max-width:1280px}}@media (min-width: 1536px){.sm\\:container{max-width:1536px}}}.hover\\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\\:font-bold:hover{font-weight:700}.before\\:hover\\:text-center:hover:before{content:var(--tw-content);text-align:center}.hover\\:before\\:text-center:hover:before{content:var(--tw-content);text-align:center}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\\:hover\\:text-center:hover:focus{text-align:center}.hover\\:focus\\:text-center:focus:hover{text-align:center}.hs-tooltip.show .hs-tooltip-shown\\:visible{visibility:visible}.hs-tooltip.show .hs-tooltip-shown\\:opacity-100{opacity:1}.open.hs-overlay-open\\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\\:opacity-100{opacity:1}.open.hs-overlay-open\\:duration-500{transition-duration:.5s}.open .hs-overlay-open\\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\\:opacity-100{opacity:1}.open .hs-overlay-open\\:duration-500{transition-duration:.5s}:is(.dark .dark\\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\\:shadow-slate-700\\/\\[\\.7\\]){--tw-shadow-color: rgb(51 65 85 / .7);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\\:focus\\:ring-offset-gray-800:focus){--tw-ring-offset-color: #1f2937}@media (min-width: 640px){.sm\\:mx-auto{margin-left:auto;margin-right:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:underline{text-decoration-line:underline}}@media (min-width: 768px){.md\\:p-5{padding:1.25rem}}@media (min-width: 1024px){:is(.dark .dark\\:lg\\:hover\\:\\[paint-order\\:markers\\]:hover){paint-order:markers}}img,svg{height:36px}.push{margin-left:auto}@media only screen and (max-width: 768px){#footer{font-size:.8em}li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:#00000080;z-index:2;cursor:pointer} -`,Footer=_export_sfc(_sfc_main$n,[["styles",[_style_0$l]]]),_hoisted_1$k=["id"],_hoisted_2$h=["src","onClick","onDragstart"],_hoisted_3$f=["innerHTML"],_hoisted_4$e=["src"],_hoisted_5$c={slot:"footer",class:"footer"},_hoisted_6$b=["manifest"],_hoisted_7$9={class:"controls push"},_hoisted_8$8={key:0,class:"toolbar"},_hoisted_9$9=createBaseVNode("svg",{class:"push edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M441 58.9L453.1 71c9.4 9.4 9.4 24.6 0 33.9L424 134.1 377.9 88 407 58.9c9.4-9.4 24.6-9.4 33.9 0zM209.8 256.2L344 121.9 390.1 168 255.8 302.2c-2.9 2.9-6.5 5-10.4 6.1l-58.5 16.7 16.7-58.5c1.1-3.9 3.2-7.5 6.1-10.4zM373.1 25L175.8 222.2c-8.7 8.7-15 19.4-18.3 31.1l-28.6 100c-2.4 8.4-.1 17.4 6.1 23.6s15.2 8.5 23.6 6.1l100-28.6c11.8-3.4 22.5-9.7 31.1-18.3L487 138.9c28.1-28.1 28.1-73.7 0-101.8L474.9 25C446.8-3.1 401.2-3.1 373.1 25zM88 64C39.4 64 0 103.4 0 152V424c0 48.6 39.4 88 88 88H360c48.6 0 88-39.4 88-88V312c0-13.3-10.7-24-24-24s-24 10.7-24 24V424c0 22.1-17.9 40-40 40H88c-22.1 0-40-17.9-40-40V152c0-22.1 17.9-40 40-40H200c13.3 0 24-10.7 24-24s-10.7-24-24-24H88z"})],-1),_hoisted_10$9=createBaseVNode("svg",{class:"delete",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M170.5 51.6L151.5 80h145l-19-28.4c-1.5-2.2-4-3.6-6.7-3.6H177.1c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80H368h48 8c13.3 0 24 10.7 24 24s-10.7 24-24 24h-8V432c0 44.2-35.8 80-80 80H112c-44.2 0-80-35.8-80-80V128H24c-13.3 0-24-10.7-24-24S10.7 80 24 80h8H80 93.8l36.7-55.1C140.9 9.4 158.4 0 177.1 0h93.7c18.7 0 36.2 9.4 46.6 24.9zM80 128V432c0 17.7 14.3 32 32 32H336c17.7 0 32-14.3 32-32V128H80zm80 64V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16z"})],-1),_hoisted_11$9=[_hoisted_9$9,_hoisted_10$9],_sfc_main$m=defineComponent({__name:"Gallery.ce",props:{active:{type:Boolean},base:{type:String},caption:{type:Boolean,default:!1},class:{type:String},data:{type:String},dialogWidth:{type:String,default:"100vw"},ghDir:{type:String},height:{type:Number},repoIsWritable:{type:Boolean,default:!1},slot:{type:String}},setup(F){const W=F,q=ref(null),K=computed(()=>{var kf,Nf;return(Nf=(kf=q.value)==null?void 0:kf.getRootNode())==null?void 0:Nf.host});watch$1(K,()=>{Cf()});const X=computed(()=>{var kf;return(kf=q==null?void 0:q.value)==null?void 0:kf.parentNode}),tt=self.window,rt=ref(tt.config||{}),ot=ref(null);watch$1(ot,async()=>{var kf,Nf,Yf,Gf,rp,ip;(kf=rt.value)!=null&&kf.github&&((Nf=ot.value)!=null&&Nf.token)&&(ut.value=await Hf((Gf=(Yf=rt.value)==null?void 0:Yf.source)==null?void 0:Gf.owner,(ip=(rp=rt.value)==null?void 0:rp.source)==null?void 0:ip.repository,ot.value.username,ot.value.token))});const ut=ref(!1),yn=computed(()=>{var kf;if((kf=rt.value.source)!=null&&kf.owner)return rt.value.source;if(W.base){let[Nf,Yf,Gf,...rp]=W.base.split("/");return{owner:Nf,repository:Yf,branch:Gf,dir:rp?`/${rp.join("/")}/`:"/"}}return null}),uo=ref([]);watch$1(uo,async kf=>{mo.value=await loadManifests(kf)});function po(kf){var Nf;return Object.fromEntries((Nf=kf.metadata)==null?void 0:Nf.map(Yf=>[(Yf.label.en||Yf.label.none||Object.keys(Yf.label)[0])[0],(Yf.value.en||Yf.value.none||Object.keys(Yf.value)[0])[0]]))}const mo=ref([]);watch$1(mo,kf=>{wo.value=kf.map(Nf=>{var vp;let Yf=po(Nf),Gf=[Yf.camera,Yf.exposure,Yf.mode].filter(Np=>Np).join(", "),rp=findItem({type:"Annotation",motivation:"painting"},Nf,1).body,ip=((vp=Nf.metadata)==null?void 0:vp.filter(Np=>(Np.label.en||Np.label.none)[0]==="orientation").map(Np=>(Np.value.en||Np.value.none)[0])[0])||1;ip=Array.isArray(ip)?ip[0]:ip;let ap=ip===1||ip===3?rp.width:rp.height,yp=ip===1||ip===3?rp.height:rp.width;return{id:Nf.id,label:Nf.label?Nf.label.en||Nf.label.none||Object.values(Nf.label)[0]:null,summary:Nf.summary?Nf.summary.en||Nf.summary.none||Object.values(Nf.summary)[0]:null,width:ap,height:yp,format:rp.format,orientation:ip,aspect_ratio:Number((ap/yp).toFixed(4)),thumbnail:Nf.thumbnail[0].id,photoDetails:Gf}})});const wo=ref([]);watch$1(wo,kf=>{Af()});const lf=ref(null);watch$1(lf,()=>{$f.value=lf.value!==null});const yf=ref(0),cf=ref([]);let vf,_f;const $f=ref(!1);watch$1($f,()=>{_f.open=$f.value});function wf(kf){var vp,Np,jp;if(kf.indexOf("http")===0)return kf;let Nf,Yf;kf.indexOf(":")>0?[Nf,Yf]=kf.split(":"):Yf=kf;let Gf=Yf.split("/"),rp=Gf[Gf.length-1],ip=rp.lastIndexOf("."),ap=rp.slice(0,ip),yp=rp.slice(ip+1);return Gf[Gf.length-1]=`${encodeURIComponent(ap)}.${yp}`,kf=Gf.join("/"),kf=Nf?`${Nf}:${Gf.join("/")}`:`gh:${(vp=yn.value)==null?void 0:vp.owner}/${(Np=yn.value)==null?void 0:Np.repository}${(jp=yn.value)==null?void 0:jp.dir}/${Gf.join("/")}`,`https://iiif.mdpress.io/${kf}/manifest.json`}function Pf(kf){var rp;let Nf=[];kf=kf.replace(/”/g,'"').replace(/”/g,'"'),(rp=kf==null?void 0:kf.match(/[^\s"]+|"([^"]*)"/gmi))==null||rp.filter(ip=>ip).forEach(ip=>{Nf.length>0&&Nf[Nf.length-1].indexOf("=")===Nf[Nf.length-1].length-1?Nf[Nf.length-1]=`${Nf[Nf.length-1]}${ip}`:Nf.push(ip)});let Yf={},Gf=["src","caption","options","fit","rotate","seq"];return Nf.filter(ip=>ip!=="image").forEach((ip,ap)=>{if(ip.indexOf("=")>0){let yp=ip.indexOf("="),vp=ip.slice(0,yp),Np=ip.slice(yp+1);Yf[vp]=Np[0]==='"'?Np.slice(1,-1):Np}else Yf[Gf[ap]]=ip[0]==='"'?ip.slice(1,-1):ip}),Yf}function Cf(){if(W.data){let kf=document.getElementById(W.data);uo.value=Array.from(kf.querySelectorAll("li")).map(Nf=>Nf.textContent).map(Nf=>wf(Nf))}else if(W.ghDir){let kf=W.ghDir[0]==="/"?W.ghDir.slice(1):W.ghDir;fetch(`https://iiif.mdpress.io/gh-dir/${kf}?filter=images`).then(Nf=>Nf.json()).then(Nf=>{uo.value=Nf.map(Yf=>wf(`gh:${W.ghDir}/${Yf.name}`))})}else{let kf=function(){uo.value=Array.from(Nf.querySelectorAll("li")).map(Yf=>Yf.innerText).map(Yf=>Pf(Yf)).map(Yf=>wf(Yf.src))},Nf=K.value;kf(),new MutationObserver(Yf=>{for(let Gf of Yf)Gf.type==="childList"&&kf()}).observe(Nf,{childList:!0,subtree:!0})}}function Af(){if(wo.value.length===0)return;let kf=W.caption?32:0,Nf=wo.value.length;const Yf=yf.value<=640?2:yf.value<=960?3:yf.value<=1280?4:yf.value<=1920?5:6;let Gf=[],rp=isMobile$1()?8:16,ip=[],ap=0,yp=0,vp=0;wo.value.forEach((Np,jp)=>{if(vp+=Np.aspect_ratio,ip.push(Np),vp>=Yf||jp+1===Nf){vp=Math.max(vp,Yf);const Jp=(yf.value-rp*(ip.length-1))/vp;ip.forEach(ng=>{const og=Jp*ng.aspect_ratio;Gf.push({width:`${Math.round(og)}px`,height:`${Math.round(Jp+kf)}px`,transform:`translate3d(${Math.round(ap)}px, ${Math.round(yp)}px, 0)`}),ap+=og+rp}),ip=[],vp=0,yp+=Jp+rp+kf,ap=0}}),q.value&&(q.value.style.height=`${yp-rp}px`),cf.value=Gf}function Bf(kf){lf.value=mo.value[kf]}onMounted(()=>{var kf;ot.value=localStorage.getItem("auth-user")&&JSON.parse(localStorage.getItem("auth-user")||"{}"),_f=(kf=X.value)==null?void 0:kf.querySelector(".dialog"),_f.addEventListener("sl-hide",Nf=>$f.value=!1)}),watch$1(q,()=>{var kf;q.value&&(yf.value=((kf=q.value)==null?void 0:kf.clientWidth)||0,new ResizeObserver(()=>{var Yf,Gf,rp;(Yf=q.value)!=null&&Yf.clientWidth&&((Gf=q.value)==null?void 0:Gf.clientWidth)!==yf.value&&(yf.value=(rp=q.value)==null?void 0:rp.clientWidth,clearTimeout(vf),vf=setTimeout(Af,10))}).observe(q.value))});async function Hf(kf,Nf,Yf,Gf){let rp=`https://api.github.com/repos/${kf}/${Nf}/collaborators/${Yf}`,ip=await fetch(rp,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${Gf}`}});return ip.ok&&ip.status===204}function Df(kf){navigator.clipboard&&navigator.clipboard.writeText(kf)}function Lf(kf,Nf){var Yf;(Yf=Nf.dataTransfer)==null||Yf.setData("text/plain",mo.value[kf].id)}return(kf,Nf)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",{ref_key:"root",ref:q,id:"gallery"},[cf.value.length>0?(openBlock(!0),createElementBlock(Fragment,{key:0},renderList(wo.value,(Yf,Gf)=>(openBlock(),createElementBlock("div",{class:"gallery-item",id:Yf.id,style:normalizeStyle(cf.value[Gf])},[createBaseVNode("img",{class:"image fade-in",onload:"this.style.opacity = 1",src:wo.value[Gf].thumbnail,onClick:rp=>Bf(Gf),onDragstart:rp=>Lf(Gf,rp),draggable:""},null,40,_hoisted_2$h),F.caption?(openBlock(),createElementBlock("div",{key:0,style:{height:"32px",display:"flex","align-items":"center","margin-left":"0.25em"},innerHTML:wo.value[Gf].label},null,8,_hoisted_3$f)):createCommentVNode("",!0)],12,_hoisted_1$k))),256)):createCommentVNode("",!0)],512),createBaseVNode("sl-dialog",{class:"dialog","no-header":"",style:normalizeStyle({"--width":F.dialogWidth,"--body-spacing":0,"--footer-spacing":"0.5em"})},[lf.value?(openBlock(),createElementBlock("ve-image",{key:0,"no-caption":"",src:lf.value.id,fit:"contain"},null,8,_hoisted_4$e)):createCommentVNode("",!0),createBaseVNode("div",_hoisted_5$c,[createBaseVNode("ve-caption",{manifest:lf.value},null,8,_hoisted_6$b),createBaseVNode("div",_hoisted_7$9,[ut.value?(openBlock(),createElementBlock("div",_hoisted_8$8,_hoisted_11$9)):createCommentVNode("",!0),createBaseVNode("img",{src:"https://v3.juncture-digital.org/images/iiif.png",class:"iiif",alt:"IIIF manifest icon",onClick:Nf[0]||(Nf[0]=Yf=>Df(lf.value.id))}),createBaseVNode("sl-button",{variant:"primary",onClick:Nf[1]||(Nf[1]=Yf=>lf.value=null)},"Close")])])],4)],64))}}),_style_0$k=`:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}@supports (scrollbar-gutter: stable){.sl-scroll-lock{scrollbar-gutter:stable!important;overflow:hidden!important}}@supports not (scrollbar-gutter: stable){.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}*{box-sizing:border-box}#gallery{position:relative;margin:1rem}@media only screen and (max-width: 768px){#gallery{margin:0}}sl-dialog::part(panel){max-width:unset;max-height:unset;height:100dvh}sl-dialog::part(overlay){--sl-overlay-background-color: rgba(100, 100, 100, .8)}sl-dialog::part(footer){background-color:#64646480}.gallery-item{position:absolute;display:flex;flex-direction:column;width:100px;box-shadow:2px 2px 4px #ccc}.gallery-item:hover{box-shadow:#32325d40 0 6px 12px -2px,#0000004d 0 3px 7px -3px}.image{left:0;top:0;width:100%;height:100%;opacity:0;background-color:#d5d5d5}.fade-in{opacity:0;-webkit-transition:all 1s ease;-moz-transition:all 1s ease;-ms-transition:all 1s ease;-o-transition:all 1s ease}.image:hover{cursor:pointer}.icons{display:flex;align-items:center;gap:6px}.size{width:100%;font-size:.8em;margin-top:3px}.provider-logo{height:20px}.license{cursor:pointer;display:inline-block}.image-card{font-size:.85em;display:flex;flex-direction:column}.title{display:flex;align-items:center;gap:6px;font-size:.9em}.title img{width:16px;opacity:1}.clamp{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.text{margin:6px 0;height:50px}.text p{margin:0;padding:0}.license{display:flex;align-items:center;gap:3px;font-size:.8em;margin-left:.5rem}a.license{color:#000;text-decoration:none;font-size:.9rem}sl-icon{font-size:1.2rem}.push{margin-left:auto}.controls{display:flex;align-items:center;gap:1em}.toolbar{height:32px;justify-content:flex-end;display:flex;align-items:center;gap:.5em;padding:0 .2em}.toolbar svg{width:20px;height:20px;cursor:pointer;fill:#777}.toolbar svg:hover{fill:#444}.dialog .footer{display:flex;align-items:center;gap:.5em;padding:.5em;text-align:left}.iiif{width:32px;height:32px;cursor:copy}.iiif:hover{width:40px;height:40px} -`,Gallery=_export_sfc(_sfc_main$m,[["styles",[_style_0$k]]]),_hoisted_1$j={ref:"root",class:"main"},_hoisted_2$g=createBaseVNode("svg",{slot:"prefix",width:"32",height:"32",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512"},[createBaseVNode("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"})],-1),_hoisted_3$e=["value"],_hoisted_4$d={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_5$b=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_6$a=[_hoisted_5$b],_hoisted_7$8=["onClick","innerHTML"],_hoisted_8$7={key:0},_hoisted_9$8={key:0},_hoisted_10$8={slot:"trigger",size:"medium"},_hoisted_11$8={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_12$8=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_13$7=[_hoisted_12$8],_hoisted_14$6=["onClick","innerHTML"],_hoisted_15$5={key:1},_hoisted_16$5={key:0},_hoisted_17$5={key:0,slot:"trigger",size:"medium"},_hoisted_18$5={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_19$4=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_20$4=[_hoisted_19$4],_hoisted_21$4=["onClick","innerHTML"],_hoisted_22$3={key:0},_hoisted_23$3={slot:"trigger",size:"medium"},_hoisted_24$3={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_25$3=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_26$3=[_hoisted_25$3],_hoisted_27$3=["onClick","disabled"],_hoisted_28$3={key:0,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_29$2=createBaseVNode("path",{d:"M0 96C0 60.7 28.7 32 64 32H196.1c19.1 0 37.4 7.6 50.9 21.1L289.9 96H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16H286.6c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7H64z"},null,-1),_hoisted_30$2=[_hoisted_29$2],_hoisted_31$2={key:1,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512"},_hoisted_32$2=createBaseVNode("path",{d:"M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"},null,-1),_hoisted_33$2=[_hoisted_32$2],_hoisted_34$2={key:2,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},_hoisted_35$2=createBaseVNode("path",{d:"M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z"},null,-1),_hoisted_36$2=[_hoisted_35$2],_hoisted_37$2=["onClick"],_hoisted_38$2=createBaseVNode("svg",{slot:"prefix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"})],-1),_hoisted_39$2=createBaseVNode("span",null,"Add Item",-1),_hoisted_40$2=[_hoisted_38$2,_hoisted_39$2],_hoisted_41$2={key:2},_hoisted_42$2={width:"24",height:"24",slot:"trigger",fill:"#999",style:{cursor:"pointer",padding:"0 0 0 8px","margin-top":"-12px"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_43$2=createBaseVNode("path",{d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"},null,-1),_hoisted_44$2=[_hoisted_43$2],_hoisted_45$2={slot:"prefix",width:"18",height:"18",fill:"red",style:{"margin-right":"0.5em"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_46$2=createBaseVNode("path",{d:"M170.5 51.6L151.5 80h145l-19-28.4c-1.5-2.2-4-3.6-6.7-3.6H177.1c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80H368h48 8c13.3 0 24 10.7 24 24s-10.7 24-24 24h-8V432c0 44.2-35.8 80-80 80H112c-44.2 0-80-35.8-80-80V128H24c-13.3 0-24-10.7-24-24S10.7 80 24 80h8H80 93.8l36.7-55.1C140.9 9.4 158.4 0 177.1 0h93.7c18.7 0 36.2 9.4 46.6 24.9zM80 128V432c0 17.7 14.3 32 32 32H336c17.7 0 32-14.3 32-32V128H80zm80 64V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16z"},null,-1),_hoisted_47$1=[_hoisted_46$2],_hoisted_48=createBaseVNode("div",{slot:"footer"},[createBaseVNode("sl-button",{variant:"primary",class:"cancel",style:{"margin-right":"1em"}},"Cancel"),createBaseVNode("sl-button",{variant:"primary",class:"confirm"},"Confirm")],-1),_hoisted_49={id:"add-file-form",class:"input-validation-pattern"},_hoisted_50=createBaseVNode("sl-input",{style:{flex:"1"},autocomplete:"off",required:"",id:"add-file-input",placeholder:"Enter file path",pattern:"^([A-z0-9\\-_]+/)*[A-z0-9\\-_.]+$"},null,-1),_hoisted_51=createBaseVNode("br",null,null,-1),_hoisted_52=["innerHTML"],_hoisted_53=createBaseVNode("sl-button",{type:"reset",variant:"default"},"Reset",-1),_hoisted_54=createBaseVNode("sl-button",{type:"submit",variant:"primary"},"Add",-1),_sfc_main$l=defineComponent({__name:"GhFileSelector.ce",props:{ghSource:{type:String}},emits:["fileSelected","repoIsWritable"],setup(F,{expose:W,emit:q}){const K=F;W({GithubClient:GithubClient$1}),watch$1(K,()=>X()),onMounted(()=>X());function X(){jp(),vp()}const tt=ref(null),rt=ref(null),ot=ref(null);watch$1(ot,Dp=>{var Lp,xp;Dp==null||Dp.addEventListener("sl-overlay-dismiss",()=>Dp.hide()),Dp==null||Dp.addEventListener("sl-close",()=>Dp.hide()),(Lp=Dp==null?void 0:Dp.querySelector(".cancel"))==null||Lp.addEventListener("click",()=>Dp.hide()),(xp=Dp==null?void 0:Dp.querySelector(".confirm"))==null||xp.addEventListener("click",()=>{Dp==null||Dp.hide(),vg()})});const ut=ref(null);watch$1(ut,Dp=>{var Lp,xp;Dp==null||Dp.addEventListener("sl-overlay-dismiss",()=>Dp.hide()),Dp==null||Dp.addEventListener("sl-close",()=>Dp.hide()),(Lp=Dp==null?void 0:Dp.querySelector(".cancel"))==null||Lp.addEventListener("click",()=>Dp.hide()),(xp=Dp==null?void 0:Dp.querySelector(".confirm"))==null||xp.addEventListener("click",()=>{Dp==null||Dp.hide()})});const yn=ref(null),uo=ref(null),po=ref(""),mo=ref(),wo=ref(!1),lf=ref([]),yf=ref(!1),cf=ref();watch$1(po,()=>{wo.value=window.localStorage.getItem("gh-auth-token")!==null,mo.value=new GithubClient$1(po.value||""),_f.value&&Bf()}),watch$1(mo,async Dp=>{});const vf=ref([]),_f=ref("");watch$1(vf,Dp=>{var xp;if(!Dp.length)return;let Lp=Dp.find(kp=>{var lp;return kp.login===((lp=cf.value)==null?void 0:lp.acct)});_f.value=(Lp==null?void 0:Lp.login)||((xp=cf.value)==null?void 0:xp.acct)||Dp[0].login});async function $f(){Promise.all([mo.value.user(),mo.value.organizations()]).then(Dp=>vf.value=Dp.flat())}function wf(Dp){cf.value=null,_f.value=Dp.login}function Pf(Dp){let Lp=yn.value.value.trim();uo.value&&(uo.value.style.display=Lp.length?"none":"block"),Dp.key==="Enter"&&(_f.value=Lp)}const Cf=ref([]),Af=ref("");watch$1(_f,Dp=>{Af.value="",Bf()}),watch$1(Cf,Dp=>{if(!Dp.length)return;let Lp=Dp.find(xp=>{var kp;return xp.name===((kp=cf.value)==null?void 0:kp.repo)})||Dp.find(xp=>xp.name==="essays")||Dp[0];Af.value=Lp.name});function Bf(){var Dp;(Dp=mo.value)==null||Dp.repos(_f.value).then(Lp=>Cf.value=Lp)}function Hf(Dp){cf.value=null,Af.value=Dp.name}watch$1(yf,Dp=>{q("repoIsWritable",Dp)});const Df=ref([]),Lf=ref("");watch$1(Af,Dp=>{Dp&&(Lf.value="",wo.value&&mo.value.user().then(Lp=>Lp.login).then(Lp=>Dp?mo.value.isCollaborator(_f.value,Dp,Lp):!1).then(Lp=>yf.value=Lp),kf())});async function kf(){mo.value.branches(_f.value,Af.value).then(Dp=>Df.value=Dp)}let Nf;watch$1(Df,async Dp=>{var Lp,xp;Dp.length&&(!Nf&&_f.value&&Af.value&&(Nf=await mo.value.defaultBranch(_f.value,Af.value)),Lf.value=((Lp=cf.value)==null?void 0:Lp.branch)||Nf||((xp=Dp[0])==null?void 0:xp.name))});function Yf(Dp){cf.value=null,Lf.value=Dp.name}watch$1(Lf,Dp=>{_f.value&&Af.value&&Dp&&ap("").then(Lp=>{let xp=ip(Lp);Gf.value=[{dirList:Lp,selected:xp}]})});const Gf=ref([]);watch$1(Gf,()=>{var xp;if(!Gf.value.length)return;let Dp=Gf.value.length-1,Lp=Gf.value[Dp];if(((xp=Lp==null?void 0:Lp.selected)==null?void 0:xp.type)==="dir")ap(Gf.value.map(kp=>kp.selected.name).join("/")).then(kp=>{let lp=ip(kp,Dp+1);Gf.value=[...Gf.value,{dirList:kp,selected:lp}]});else{let kp=`${_f.value}/${Af.value}/${Lf.value}/${Gf.value.map(lp=>lp.selected.name).join("/")}`;q("fileSelected",{trigger:rt.value,path:kp})}});function rp(Dp,Lp){cf.value=null;let xp=[...Gf.value];xp[Dp]={dirList:xp[Dp].dirList,selected:Lp},Gf.value=xp.slice(0,Dp+1)}function ip(Dp,Lp=0){return(Dp==null?void 0:Dp.find(xp=>{var kp,lp;return xp.name===((kp=cf.value)==null?void 0:kp.path[Lp])||xp.name===`${(lp=cf.value)==null?void 0:lp.path[Lp]}.md`}))||(Dp==null?void 0:Dp.filter(xp=>xp.type==="file").find(xp=>xp.name==="index.md"||xp.name==="README.md"))||(Dp==null?void 0:Dp.filter(xp=>xp.type==="file"&&/\.md$/.test(xp.name))[0])||(Dp==null?void 0:Dp.filter(xp=>xp.type==="dir")[0])||(Dp==null?void 0:Dp.filter(xp=>xp.type==="file")[0])}async function ap(Dp){let Lp=await mo.value.dirlist(_f.value,Af.value,Dp,Lf.value),xp=Lp.filter(lp=>lp.type==="dir"),kp=Lp.filter(lp=>lp.type==="file");return[...xp,...kp]}function yp(){vf.value=[],Cf.value=[],Df.value=[],Gf.value=[],_f.value="",Af.value="",Lf.value=""}async function vp(Dp=K.ghSource,Lp="select"){var qf;if(!Dp)return;rt.value=Lp,yp();let[xp,kp,lp,...Of]=(Dp||"").split("/").filter(cp=>cp);cf.value={acct:xp,repo:kp,branch:lp,path:Of},wo.value?($f(),lf.value=await mo.value.user().then(cp=>cp.login),_f.value&&Af.value&&lf.value&&mo.value.isCollaborator(_f.value,Af.value,lf.value).then(cp=>yf.value=cp)):(qf=cf.value)!=null&&qf.acct&&(_f.value=cf.value.acct)}watch$1(cf,Dp=>{});async function Np(){let Lp=await fetch("https://iiif.mdpress.io/gh-token");if(Lp.ok){let xp=await Lp.text();window.localStorage.setItem("gh-unscoped-token",xp)}}async function jp(){window.localStorage.getItem("gh-unscoped-token")||await Np(),po.value=window.localStorage.getItem("gh-auth-token")||window.localStorage.getItem("gh-unscoped-token")}function Ip(Dp){return Dp.toLowerCase().split("-").map(Lp=>Lp.charAt(0).toUpperCase()+Lp.slice(1)).join(" ")}let Jp=0;function ng(Dp=0){var xp,kp,lp;Jp=Dp;let Lp=(xp=ut.value)==null?void 0:xp.querySelector("#add-file-form");Lp.onclick||(Lp.onclick=function(){},Lp.addEventListener("submit",async Of=>{var Ep;tt.value=null,Of.preventDefault();let qf=(Ep=ut.value)==null?void 0:Ep.querySelector("#add-file-input"),cp=[...Gf.value.slice(0,Jp).filter(_p=>_p.selected.type==="dir").map(_p=>_p.selected.name),...qf.value.split("/").filter(_p=>_p)],hp=cp[cp.length-1];cp[cp.length-1].indexOf(".")>0?cp[cp.length-1]=cp[cp.length-1].replace(/readme\.md/,"README.md"):cp.push("README.md");let $p=cp.join("/");hp=Ip(hp.replace(/\.md$/,""));let Vp=`[![](https://v3.juncture-digital.org/images/wb.svg)](https://v3.juncture-digital.org/wb) + */class HSOverlay extends Component$1{constructor(q){super("[data-hs-overlay]");Sv(this,"root");this.root=q,this.openNextOverlay=!1}init(){this.root.addEventListener("click",q=>{const X=q.target.closest(this.selector),tt=q.target.closest("[data-hs-overlay-close]"),rt=q.target.getAttribute("aria-overlay")==="true";if(tt)return this.close(tt.closest(".hs-overlay.open"));if(X)return this.toggle(this.root.querySelector(X.getAttribute("data-hs-overlay")));rt&&this._onBackdropClick(q.target)}),this.root.addEventListener("keydown",q=>{if(q.keyCode===27){const K=this.root.querySelector(".hs-overlay.open");if(!K)return;setTimeout(()=>{K.getAttribute("data-hs-overlay-keyboard")!=="false"&&this.close(K)})}})}toggle(q){q&&(q.classList.contains("hidden")?this.open(q):this.close(q))}open(q){if(!q)return;const K=this.root.querySelector(".hs-overlay.open"),X=this.getClassProperty(q,"--body-scroll","false")!=="true";if(K)return this.openNextOverlay=!0,this.close(K).then(()=>{this.open(q),this.openNextOverlay=!1});X&&(this.root.style.overflow="hidden"),this._buildBackdrop(q),this._checkTimer(q),this._autoHide(q),q.classList.remove("hidden"),q.setAttribute("aria-overlay","true"),q.setAttribute("tabindex","-1"),setTimeout(()=>{q.classList.contains("hidden")||(q.classList.add("open"),this._fireEvent("open",q),this._dispatch("open.hs.overlay",q,q),this._focusInput(q))},50)}close(q){return new Promise(K=>{q&&(q.classList.remove("open"),q.removeAttribute("aria-overlay"),q.removeAttribute("tabindex","-1"),this.afterTransition(q,()=>{q.classList.contains("open")||(q.classList.add("hidden"),this._destroyBackdrop(),this._fireEvent("close",q),this._dispatch("close.hs.overlay",q,q),this.root.style.overflow="",K(q))}))})}_autoHide(q){const K=parseInt(this.getClassProperty(q,"--auto-hide","0"));K&&(q.autoHide=setTimeout(()=>{this.close(q)},K))}_checkTimer(q){q.autoHide&&(clearTimeout(q.autoHide),delete q.autoHide)}_onBackdropClick(q){this.getClassProperty(q,"--overlay-backdrop","true")!=="static"&&this.close(q)}_buildBackdrop(q){const K=q.getAttribute("data-hs-overlay-backdrop-container")||!1;let X=document.createElement("div"),tt="transition duration fixed inset-0 z-50 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 hs-overlay-backdrop";for(const ut of q.classList.values())ut.startsWith("hs-overlay-backdrop-open:")&&(tt+=` ${ut}`);const rt=this.getClassProperty(q,"--overlay-backdrop","true")!=="static";this.getClassProperty(q,"--overlay-backdrop","true")!=="false"&&(K&&(X=this.root.querySelector(K).cloneNode(!0),X.classList.remove("hidden"),tt=X.classList,X.classList=""),rt&&X.addEventListener("click",()=>this.close(q),!0),X.setAttribute("data-hs-overlay-backdrop-template",""),this.root.appendChild(X),setTimeout(()=>{X.classList=tt}))}_destroyBackdrop(){const q=this.root.querySelector("[data-hs-overlay-backdrop-template]");q&&(this.openNextOverlay&&(q.style.transitionDuration=`${parseFloat(window.getComputedStyle(q).transitionDuration.replace(/[^\d.-]/g,""))*1.8}s`),q.classList.add("opacity-0"),this.afterTransition(q,()=>{q.remove()}))}_focusInput(q){const K=q.querySelector("[autofocus]");K&&K.focus()}}const _hoisted_1$l=["innerHTML"],_hoisted_2$i={class:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto min-h-[calc(100%-3.5rem)] flex items-center"},_hoisted_3$g={class:"flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"},_hoisted_4$f={class:"p-4 overflow-y-auto flex items-center gap-4"},_hoisted_5$d=createBaseVNode("sl-spinner",{style:{"font-size":"3rem","--indicator-color":"deeppink","--track-color":"pink"}},null,-1),_hoisted_6$c=["innerHTML"],_sfc_main$n=defineComponent({__name:"Footer.ce",setup(F){const W=ref([]),q=ref(null),K=computed(()=>{var wo,lf;return(lf=(wo=q.value)==null?void 0:wo.getRootNode())==null?void 0:lf.host}),X=ref(null),tt=computed(()=>X==null?void 0:X.value),rt=computed(()=>new HSOverlay(tt.value)),ot=ref(null),ut=computed(()=>ot==null?void 0:ot.value),yn=ref("Generating PDF...");watch$1(ut,wo=>{rt.value.init(),wo.addEventListener("open.hs.overlay",lf=>uo.value=!0),wo.addEventListener("close.hs.overlay",lf=>uo.value=!1)});const uo=ref(!1);watch$1(uo,wo=>{wo?rt.value.open(ut.value):rt.value.close(ut.value)}),watch$1(K,()=>{po()});function po(){function wo(){return Array.from(K.value.querySelectorAll("li")).map(lf=>{let yf=document.createElement("li");yf.innerHTML=marked.parse(lf.textContent||"");let cf=yf.querySelector("code");if(cf){let vf=cf.previousElementSibling,_f=vf||yf,$f=mo(cf.innerHTML);$f.id&&(_f.id=$f.id),$f.class&&$f.class.split(" ").forEach(xf=>_f.classList.add(xf)),$f.style&&_f.setAttribute("style",$f.style),cf.remove()}return yf})}W.value=wo(),new MutationObserver(lf=>{for(let yf of lf)yf.type==="childList"&&(W.value=wo())}).observe(K.value,{childList:!0,subtree:!0})}function mo(wo){var vf;let lf=[];wo=wo.replace(/”/g,'"').replace(/”/g,'"').replace(/’/g,"'"),(vf=wo==null?void 0:wo.match(/[^\s"]+|"([^"]*)"/gmi))==null||vf.filter(_f=>_f).forEach(_f=>{lf.length>0&&lf[lf.length-1].indexOf("=")===lf[lf.length-1].length-1?lf[lf.length-1]=`${lf[lf.length-1]}${_f}`:lf.push(_f)});let yf={},cf=0;for(;cf0){let[$f,xf]=_f.split("=");xf=xf[0]==='"'&&xf[xf.length-1]==='"'?xf.slice(1,-1):xf,yf[$f]?yf[$f]+=` ${xf}`:yf[$f]=xf}else if(_f[0]==="."){let $f="class",xf=_f.slice(1);xf=xf[0]==='"'&&xf[xf.length-1]==='"'?xf.slice(1,-1):xf,yf[$f]?yf[$f]+=` ${xf}`:yf[$f]=xf}else if(_f[0]===":"){let $f="style",xf;_f.length===1&&cf<_f.length&&lf[cf+1][0]==='"'?(xf=lf[cf+1].slice(1,-1),cf++):xf=_f.slice(1),yf[$f]?yf[$f]+=` ${xf}`:yf[$f]=xf}else if(_f[0]==='"'){let $f="args",xf=_f.slice(1,-1);yf[$f]?yf[$f].push(xf):yf[$f]=[xf]}else _f[0]==="#"?yf.id=_f.slice(1):yf[_f]=!0;cf++}return yf}return(wo,lf)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("ul",{ref_key:"footer",ref:q,id:"footer",class:"flex bg-slate-100 p-2 gap-3 mt-8 items-center w-full h-8"},[(openBlock(!0),createElementBlock(Fragment,null,renderList(W.value,(yf,cf)=>(openBlock(),createElementBlock("li",{key:`li-${cf}`,innerHTML:yf.innerHTML,class:normalizeClass(yf.className),style:normalizeStyle(yf.getAttribute("style")||"")},null,14,_hoisted_1$l))),128))],512),createBaseVNode("div",{ref_key:"overlayRef",ref:X},[createBaseVNode("div",{ref_key:"modalRef",ref:ot,id:"hs-basic-modal",class:"hs-overlay hidden w-full h-full fixed top-0 start-0 z-[80] overflow-x-hidden overflow-y-auto pointer-events-none"},[createBaseVNode("div",_hoisted_2$i,[createBaseVNode("div",_hoisted_3$g,[createBaseVNode("div",_hoisted_4$f,[_hoisted_5$d,createBaseVNode("p",{innerHTML:yn.value},null,8,_hoisted_6$c)])])])],512)],512)],64))}}),_style_0$l=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.\\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.\\!relative{position:relative!important}.relative{position:relative}.sticky{position:sticky}.-inset-1{top:-.25rem;right:-.25rem;bottom:-.25rem;left:-.25rem}.inset-0{top:0;right:0;bottom:0;left:0}.end-1{inset-inline-end:.25rem}.right-\\[10px\\]{right:10px}.start-0{inset-inline-start:0px}.top-0{top:0}.top-\\[12px\\]{top:12px}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.z-\\[80\\]{z-index:80}.float-right{float:right}.float-left{float:left}.float-none{float:none}.clear-left{clear:left}.clear-right{clear:right}.clear-both{clear:both}.clear-none{clear:none}.m-1{margin:.25rem}.m-3{margin:.75rem}.me-1{margin-inline-end:.25rem}.ml-1{margin-left:.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-none{overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.\\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\\!table{display:table!important}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.\\!grid{display:grid!important}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.h-1{height:.25rem}.h-40{height:10rem}.h-8{height:2rem}.h-80{height:20rem}.h-auto{height:auto}.h-full{height:100%}.min-h-\\[calc\\(100\\%-3\\.5rem\\)\\]{min-height:calc(100% - 3.5rem)}.w-1{width:.25rem}.w-\\[a-z0-9-\\]{width:a-z0-9-}.w-full{width:100%}.max-w-\\[24px\\]{max-width:24px}.max-w-xs{max-width:20rem}.flex-shrink,.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.caption-top{caption-side:top}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.\\!transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform,.transform-cpu{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}.cursor-pointer{cursor:pointer}.touch-auto{touch-action:auto}.touch-none{touch-action:none}.touch-pan-x{--tw-pan-x: pan-x;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-left{--tw-pan-x: pan-left;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-right{--tw-pan-x: pan-right;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-up{--tw-pan-y: pan-up;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-down{--tw-pan-y: pan-down;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pinch-zoom{--tw-pinch-zoom: pinch-zoom;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-manipulation{touch-action:manipulation}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize-none{resize:none}.resize-y{resize:vertical}.resize-x{resize:horizontal}.resize{resize:both}.snap-none{scroll-snap-type:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-both{scroll-snap-type:both var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.snap-proximity{--tw-scroll-snap-strictness: proximity}.snap-start{scroll-snap-align:start}.snap-end{scroll-snap-align:end}.snap-center{scroll-snap-align:center}.snap-align-none{scroll-snap-align:none}.snap-normal{scroll-snap-stop:normal}.snap-always{scroll-snap-stop:always}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.columns-1{-moz-columns:1;columns:1}.break-before-auto{-moz-column-break-before:auto;break-before:auto}.break-before-avoid{-moz-column-break-before:avoid;break-before:avoid}.break-before-all{-moz-column-break-before:all;break-before:all}.break-before-avoid-page{-moz-column-break-before:avoid;break-before:avoid-page}.break-before-page{-moz-column-break-before:page;break-before:page}.break-before-left{-moz-column-break-before:left;break-before:left}.break-before-right{-moz-column-break-before:right;break-before:right}.break-before-column{-moz-column-break-before:column;break-before:column}.break-inside-auto{-moz-column-break-inside:auto;break-inside:auto}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-inside-avoid-page{break-inside:avoid-page}.break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.break-after-auto{-moz-column-break-after:auto;break-after:auto}.break-after-avoid{-moz-column-break-after:avoid;break-after:avoid}.break-after-all{-moz-column-break-after:all;break-after:all}.break-after-avoid-page{-moz-column-break-after:avoid;break-after:avoid-page}.break-after-page{-moz-column-break-after:page;break-after:page}.break-after-left{-moz-column-break-after:left;break-after:left}.break-after-right{-moz-column-break-after:right;break-after:right}.break-after-column{-moz-column-break-after:column;break-after:column}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row-dense{grid-auto-flow:row dense}.grid-flow-col-dense{grid-auto-flow:column dense}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.flex-nowrap{flex-wrap:nowrap}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-content-end{place-content:end}.place-content-between{place-content:space-between}.place-content-around{place-content:space-around}.place-content-evenly{place-content:space-evenly}.place-content-baseline{place-content:baseline}.place-content-stretch{place-content:stretch}.place-items-start{place-items:start}.place-items-end{place-items:end}.place-items-center{place-items:center}.place-items-baseline{place-items:baseline}.place-items-stretch{place-items:stretch}.content-normal{align-content:normal}.content-center{align-content:center}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-evenly{align-content:space-evenly}.content-baseline{align-content:baseline}.content-stretch{align-content:stretch}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-normal{justify-content:normal}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-stretch{justify-content:stretch}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.divide-dashed>:not([hidden])~:not([hidden]){border-style:dashed}.divide-dotted>:not([hidden])~:not([hidden]){border-style:dotted}.divide-double>:not([hidden])~:not([hidden]){border-style:double}.divide-none>:not([hidden])~:not([hidden]){border-style:none}.place-self-auto{place-self:auto}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.place-self-stretch{place-self:stretch}.self-auto{align-self:auto}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.self-baseline{align-self:baseline}.justify-self-auto{justify-self:auto}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.justify-self-stretch{justify-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-x-clip{overflow-x:clip}.overflow-y-clip{overflow-y:clip}.overflow-x-visible{overflow-x:visible}.overflow-y-visible{overflow-y:visible}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.overscroll-auto{overscroll-behavior:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.overscroll-y-auto{overscroll-behavior-y:auto}.overscroll-y-contain{overscroll-behavior-y:contain}.overscroll-y-none{overscroll-behavior-y:none}.overscroll-x-auto{overscroll-behavior-x:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-x-none{overscroll-behavior-x:none}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.hyphens-none{-webkit-hyphens:none;hyphens:none}.hyphens-manual{-webkit-hyphens:manual;hyphens:manual}.hyphens-auto{-webkit-hyphens:auto;hyphens:auto}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.whitespace-break-spaces{white-space:break-spaces}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-e{border-inline-end-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-double{border-style:double}.border-hidden{border-style:hidden}.border-none{border-style:none}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-\\[rgb\\(255\\,0\\,0\\)\\]{--tw-bg-opacity: 1;background-color:rgb(255 0 0 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-content{background-clip:content-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-origin-border{background-origin:border-box}.bg-origin-padding{background-origin:padding-box}.bg-origin-content{background-origin:content-box}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.object-none{-o-object-fit:none;object-fit:none}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-14{padding:3.5rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-8{padding:2rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pe-1{padding-inline-end:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-top{vertical-align:text-top}.align-text-bottom{vertical-align:text-bottom}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.\\!ordinal{--tw-ordinal: ordinal !important;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero: slashed-zero;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure: lining-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure: oldstyle-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing: proportional-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction: diagonal-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction: stacked-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.text-\\[\\#336699\\]\\/\\[\\.35\\]{color:#33669959}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.bg-blend-normal{background-blend-mode:normal}.bg-blend-multiply{background-blend-mode:multiply}.bg-blend-screen{background-blend-mode:screen}.bg-blend-overlay{background-blend-mode:overlay}.bg-blend-darken{background-blend-mode:darken}.bg-blend-lighten{background-blend-mode:lighten}.bg-blend-color-dodge{background-blend-mode:color-dodge}.bg-blend-color-burn{background-blend-mode:color-burn}.bg-blend-hard-light{background-blend-mode:hard-light}.bg-blend-soft-light{background-blend-mode:soft-light}.bg-blend-difference{background-blend-mode:difference}.bg-blend-exclusion{background-blend-mode:exclusion}.bg-blend-hue{background-blend-mode:hue}.bg-blend-saturation{background-blend-mode:saturation}.bg-blend-color{background-blend-mode:color}.bg-blend-luminosity{background-blend-mode:luminosity}.mix-blend-normal{mix-blend-mode:normal}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-screen{mix-blend-mode:screen}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-darken{mix-blend-mode:darken}.mix-blend-lighten{mix-blend-mode:lighten}.mix-blend-color-dodge{mix-blend-mode:color-dodge}.mix-blend-color-burn{mix-blend-mode:color-burn}.mix-blend-hard-light{mix-blend-mode:hard-light}.mix-blend-soft-light{mix-blend-mode:soft-light}.mix-blend-difference{mix-blend-mode:difference}.mix-blend-exclusion{mix-blend-mode:exclusion}.mix-blend-hue{mix-blend-mode:hue}.mix-blend-saturation{mix-blend-mode:saturation}.mix-blend-color{mix-blend-mode:color}.mix-blend-luminosity{mix-blend-mode:luminosity}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-dashed{outline-style:dashed}.outline-dotted{outline-style:dotted}.outline-double{outline-style:double}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!invert{--tw-invert: invert(100%) !important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter-none{filter:none}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-grayscale{--tw-backdrop-grayscale: grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-invert{--tw-backdrop-invert: invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-sepia{--tw-backdrop-sepia: sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter-none{-webkit-backdrop-filter:none;backdrop-filter:none}.\\!transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.content-\\[\\'this-is-also-valid\\]-weirdly-enough\\'\\]{--tw-content: "this-is-also-valid]-weirdly-enough";content:var(--tw-content)}.\\[--placement\\:bottom\\]{--placement: bottom}.\\[--placement\\:top\\]{--placement: top}.\\[--trigger\\:click\\]{--trigger: click}.\\[-\\:\\=\\]{-: =}.\\[a-zA-Z0-9\\:\\\\\\\\-\\\\\\\\\\._\\$\\]{a-z-a--z0-9:\\\\-\\\\. $}.\\[a-zA-Z0-9\\:_-\\]{a-z-a--z0-9:-}.\\[a-zA-Z\\:_\\]{a-z-a--z:}.\\[a\\:a\\]{a:a}.\\[vite\\:css\\]{vite:css}.\\[vite\\:html\\]{vite:html}html{padding:1rem;font-family:sans-serif}ve-header ul,ve-menu ul{display:none}@media (min-width: 640px){.sm\\:container{width:100%}@media (min-width: 640px){.sm\\:container{max-width:640px}}@media (min-width: 768px){.sm\\:container{max-width:768px}}@media (min-width: 1024px){.sm\\:container{max-width:1024px}}@media (min-width: 1280px){.sm\\:container{max-width:1280px}}@media (min-width: 1536px){.sm\\:container{max-width:1536px}}}.hover\\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\\:font-bold:hover{font-weight:700}.before\\:hover\\:text-center:hover:before{content:var(--tw-content);text-align:center}.hover\\:before\\:text-center:hover:before{content:var(--tw-content);text-align:center}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\\:hover\\:text-center:hover:focus{text-align:center}.hover\\:focus\\:text-center:focus:hover{text-align:center}.hs-tooltip.show .hs-tooltip-shown\\:visible{visibility:visible}.hs-tooltip.show .hs-tooltip-shown\\:opacity-100{opacity:1}.open.hs-overlay-open\\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\\:opacity-100{opacity:1}.open.hs-overlay-open\\:duration-500{transition-duration:.5s}.open .hs-overlay-open\\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\\:opacity-100{opacity:1}.open .hs-overlay-open\\:duration-500{transition-duration:.5s}:is(.dark .dark\\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\\:shadow-slate-700\\/\\[\\.7\\]){--tw-shadow-color: rgb(51 65 85 / .7);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\\:focus\\:ring-offset-gray-800:focus){--tw-ring-offset-color: #1f2937}@media (min-width: 640px){.sm\\:mx-auto{margin-left:auto;margin-right:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:underline{text-decoration-line:underline}}@media (min-width: 768px){.md\\:p-5{padding:1.25rem}}@media (min-width: 1024px){:is(.dark .dark\\:lg\\:hover\\:\\[paint-order\\:markers\\]:hover){paint-order:markers}}img,svg{height:36px}.push{margin-left:auto}@media only screen and (max-width: 768px){#footer{font-size:.8em}li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:#00000080;z-index:2;cursor:pointer} +`,Footer=_export_sfc(_sfc_main$n,[["styles",[_style_0$l]]]),_hoisted_1$k=["id"],_hoisted_2$h=["src","onClick","onDragstart"],_hoisted_3$f=["innerHTML"],_hoisted_4$e=["src"],_hoisted_5$c={slot:"footer",class:"footer"},_hoisted_6$b=["manifest"],_hoisted_7$9={class:"controls push"},_hoisted_8$8={key:0,class:"toolbar"},_hoisted_9$9=createBaseVNode("svg",{class:"push edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M441 58.9L453.1 71c9.4 9.4 9.4 24.6 0 33.9L424 134.1 377.9 88 407 58.9c9.4-9.4 24.6-9.4 33.9 0zM209.8 256.2L344 121.9 390.1 168 255.8 302.2c-2.9 2.9-6.5 5-10.4 6.1l-58.5 16.7 16.7-58.5c1.1-3.9 3.2-7.5 6.1-10.4zM373.1 25L175.8 222.2c-8.7 8.7-15 19.4-18.3 31.1l-28.6 100c-2.4 8.4-.1 17.4 6.1 23.6s15.2 8.5 23.6 6.1l100-28.6c11.8-3.4 22.5-9.7 31.1-18.3L487 138.9c28.1-28.1 28.1-73.7 0-101.8L474.9 25C446.8-3.1 401.2-3.1 373.1 25zM88 64C39.4 64 0 103.4 0 152V424c0 48.6 39.4 88 88 88H360c48.6 0 88-39.4 88-88V312c0-13.3-10.7-24-24-24s-24 10.7-24 24V424c0 22.1-17.9 40-40 40H88c-22.1 0-40-17.9-40-40V152c0-22.1 17.9-40 40-40H200c13.3 0 24-10.7 24-24s-10.7-24-24-24H88z"})],-1),_hoisted_10$9=createBaseVNode("svg",{class:"delete",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M170.5 51.6L151.5 80h145l-19-28.4c-1.5-2.2-4-3.6-6.7-3.6H177.1c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80H368h48 8c13.3 0 24 10.7 24 24s-10.7 24-24 24h-8V432c0 44.2-35.8 80-80 80H112c-44.2 0-80-35.8-80-80V128H24c-13.3 0-24-10.7-24-24S10.7 80 24 80h8H80 93.8l36.7-55.1C140.9 9.4 158.4 0 177.1 0h93.7c18.7 0 36.2 9.4 46.6 24.9zM80 128V432c0 17.7 14.3 32 32 32H336c17.7 0 32-14.3 32-32V128H80zm80 64V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16z"})],-1),_hoisted_11$9=[_hoisted_9$9,_hoisted_10$9],_sfc_main$m=defineComponent({__name:"Gallery.ce",props:{active:{type:Boolean},base:{type:String},caption:{type:Boolean,default:!1},class:{type:String},data:{type:String},dialogWidth:{type:String,default:"100vw"},ghDir:{type:String},height:{type:Number},repoIsWritable:{type:Boolean,default:!1},slot:{type:String}},setup(F){const W=F,q=ref(null),K=computed(()=>{var kf,Nf;return(Nf=(kf=q.value)==null?void 0:kf.getRootNode())==null?void 0:Nf.host});watch$1(K,()=>{Cf()});const X=computed(()=>{var kf;return(kf=q==null?void 0:q.value)==null?void 0:kf.parentNode}),tt=self.window,rt=ref(tt.config||{}),ot=ref(null);watch$1(ot,async()=>{var kf,Nf,Yf,Gf,rp,ip;(kf=rt.value)!=null&&kf.github&&((Nf=ot.value)!=null&&Nf.token)&&(ut.value=await Hf((Gf=(Yf=rt.value)==null?void 0:Yf.source)==null?void 0:Gf.owner,(ip=(rp=rt.value)==null?void 0:rp.source)==null?void 0:ip.repository,ot.value.username,ot.value.token))});const ut=ref(!1),yn=computed(()=>{var kf;if((kf=rt.value.source)!=null&&kf.owner)return rt.value.source;if(W.base){let[Nf,Yf,Gf,...rp]=W.base.split("/");return{owner:Nf,repository:Yf,branch:Gf,dir:rp?`/${rp.join("/")}/`:"/"}}return null}),uo=ref([]);watch$1(uo,async kf=>{mo.value=await loadManifests(kf)});function po(kf){var Nf;return Object.fromEntries((Nf=kf.metadata)==null?void 0:Nf.map(Yf=>[(Yf.label.en||Yf.label.none||Object.keys(Yf.label)[0])[0],(Yf.value.en||Yf.value.none||Object.keys(Yf.value)[0])[0]]))}const mo=ref([]);watch$1(mo,kf=>{wo.value=kf.map(Nf=>{var vp;let Yf=po(Nf),Gf=[Yf.camera,Yf.exposure,Yf.mode].filter(Np=>Np).join(", "),rp=findItem({type:"Annotation",motivation:"painting"},Nf,1).body,ip=((vp=Nf.metadata)==null?void 0:vp.filter(Np=>(Np.label.en||Np.label.none)[0]==="orientation").map(Np=>(Np.value.en||Np.value.none)[0])[0])||1;ip=Array.isArray(ip)?ip[0]:ip;let ap=ip===1||ip===3?rp.width:rp.height,yp=ip===1||ip===3?rp.height:rp.width;return{id:Nf.id,label:Nf.label?Nf.label.en||Nf.label.none||Object.values(Nf.label)[0]:null,summary:Nf.summary?Nf.summary.en||Nf.summary.none||Object.values(Nf.summary)[0]:null,width:ap,height:yp,format:rp.format,orientation:ip,aspect_ratio:Number((ap/yp).toFixed(4)),thumbnail:Nf.thumbnail[0].id,photoDetails:Gf}})});const wo=ref([]);watch$1(wo,kf=>{Pf()});const lf=ref(null);watch$1(lf,()=>{$f.value=lf.value!==null});const yf=ref(0),cf=ref([]);let vf,_f;const $f=ref(!1);watch$1($f,()=>{_f.open=$f.value});function xf(kf){var vp,Np,jp;if(kf.indexOf("http")===0)return kf;let Nf,Yf;kf.indexOf(":")>0?[Nf,Yf]=kf.split(":"):Yf=kf;let Gf=Yf.split("/"),rp=Gf[Gf.length-1],ip=rp.lastIndexOf("."),ap=rp.slice(0,ip),yp=rp.slice(ip+1);return Gf[Gf.length-1]=`${encodeURIComponent(ap)}.${yp}`,kf=Gf.join("/"),kf=Nf?`${Nf}:${Gf.join("/")}`:`gh:${(vp=yn.value)==null?void 0:vp.owner}/${(Np=yn.value)==null?void 0:Np.repository}${(jp=yn.value)==null?void 0:jp.dir}/${Gf.join("/")}`,`https://iiif.mdpress.io/${kf}/manifest.json`}function Af(kf){var rp;let Nf=[];kf=kf.replace(/”/g,'"').replace(/”/g,'"'),(rp=kf==null?void 0:kf.match(/[^\s"]+|"([^"]*)"/gmi))==null||rp.filter(ip=>ip).forEach(ip=>{Nf.length>0&&Nf[Nf.length-1].indexOf("=")===Nf[Nf.length-1].length-1?Nf[Nf.length-1]=`${Nf[Nf.length-1]}${ip}`:Nf.push(ip)});let Yf={},Gf=["src","caption","options","fit","rotate","seq"];return Nf.filter(ip=>ip!=="image").forEach((ip,ap)=>{if(ip.indexOf("=")>0){let yp=ip.indexOf("="),vp=ip.slice(0,yp),Np=ip.slice(yp+1);Yf[vp]=Np[0]==='"'?Np.slice(1,-1):Np}else Yf[Gf[ap]]=ip[0]==='"'?ip.slice(1,-1):ip}),Yf}function Cf(){if(W.data){let kf=document.getElementById(W.data);uo.value=Array.from(kf.querySelectorAll("li")).map(Nf=>Nf.textContent).map(Nf=>xf(Nf))}else if(W.ghDir){let kf=W.ghDir[0]==="/"?W.ghDir.slice(1):W.ghDir;fetch(`https://iiif.mdpress.io/gh-dir/${kf}?filter=images`).then(Nf=>Nf.json()).then(Nf=>{uo.value=Nf.map(Yf=>xf(`gh:${W.ghDir}/${Yf.name}`))})}else{let kf=function(){uo.value=Array.from(Nf.querySelectorAll("li")).map(Yf=>Yf.innerText).map(Yf=>Af(Yf)).map(Yf=>xf(Yf.src))},Nf=K.value;kf(),new MutationObserver(Yf=>{for(let Gf of Yf)Gf.type==="childList"&&kf()}).observe(Nf,{childList:!0,subtree:!0})}}function Pf(){if(wo.value.length===0)return;let kf=W.caption?32:0,Nf=wo.value.length;const Yf=yf.value<=640?2:yf.value<=960?3:yf.value<=1280?4:yf.value<=1920?5:6;let Gf=[],rp=isMobile()?8:16,ip=[],ap=0,yp=0,vp=0;wo.value.forEach((Np,jp)=>{if(vp+=Np.aspect_ratio,ip.push(Np),vp>=Yf||jp+1===Nf){vp=Math.max(vp,Yf);const Jp=(yf.value-rp*(ip.length-1))/vp;ip.forEach(ng=>{const og=Jp*ng.aspect_ratio;Gf.push({width:`${Math.round(og)}px`,height:`${Math.round(Jp+kf)}px`,transform:`translate3d(${Math.round(ap)}px, ${Math.round(yp)}px, 0)`}),ap+=og+rp}),ip=[],vp=0,yp+=Jp+rp+kf,ap=0}}),q.value&&(q.value.style.height=`${yp-rp}px`),cf.value=Gf}function Bf(kf){lf.value=mo.value[kf]}onMounted(()=>{var kf;ot.value=localStorage.getItem("auth-user")&&JSON.parse(localStorage.getItem("auth-user")||"{}"),_f=(kf=X.value)==null?void 0:kf.querySelector(".dialog"),_f.addEventListener("sl-hide",Nf=>$f.value=!1)}),watch$1(q,()=>{var kf;q.value&&(yf.value=((kf=q.value)==null?void 0:kf.clientWidth)||0,new ResizeObserver(()=>{var Yf,Gf,rp;(Yf=q.value)!=null&&Yf.clientWidth&&((Gf=q.value)==null?void 0:Gf.clientWidth)!==yf.value&&(yf.value=(rp=q.value)==null?void 0:rp.clientWidth,clearTimeout(vf),vf=setTimeout(Pf,10))}).observe(q.value))});async function Hf(kf,Nf,Yf,Gf){let rp=`https://api.github.com/repos/${kf}/${Nf}/collaborators/${Yf}`,ip=await fetch(rp,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${Gf}`}});return ip.ok&&ip.status===204}function Df(kf){navigator.clipboard&&navigator.clipboard.writeText(kf)}function Lf(kf,Nf){var Yf;(Yf=Nf.dataTransfer)==null||Yf.setData("text/plain",mo.value[kf].id)}return(kf,Nf)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",{ref_key:"root",ref:q,id:"gallery"},[cf.value.length>0?(openBlock(!0),createElementBlock(Fragment,{key:0},renderList(wo.value,(Yf,Gf)=>(openBlock(),createElementBlock("div",{class:"gallery-item",id:Yf.id,style:normalizeStyle(cf.value[Gf])},[createBaseVNode("img",{class:"image fade-in",onload:"this.style.opacity = 1",src:wo.value[Gf].thumbnail,onClick:rp=>Bf(Gf),onDragstart:rp=>Lf(Gf,rp),draggable:""},null,40,_hoisted_2$h),F.caption?(openBlock(),createElementBlock("div",{key:0,style:{height:"32px",display:"flex","align-items":"center","margin-left":"0.25em"},innerHTML:wo.value[Gf].label},null,8,_hoisted_3$f)):createCommentVNode("",!0)],12,_hoisted_1$k))),256)):createCommentVNode("",!0)],512),createBaseVNode("sl-dialog",{class:"dialog","no-header":"",style:normalizeStyle({"--width":F.dialogWidth,"--body-spacing":0,"--footer-spacing":"0.5em"})},[lf.value?(openBlock(),createElementBlock("ve-image",{key:0,"no-caption":"",src:lf.value.id,fit:"contain"},null,8,_hoisted_4$e)):createCommentVNode("",!0),createBaseVNode("div",_hoisted_5$c,[createBaseVNode("ve-caption",{manifest:lf.value},null,8,_hoisted_6$b),createBaseVNode("div",_hoisted_7$9,[ut.value?(openBlock(),createElementBlock("div",_hoisted_8$8,_hoisted_11$9)):createCommentVNode("",!0),createBaseVNode("img",{src:"https://v3.juncture-digital.org/images/iiif.png",class:"iiif",alt:"IIIF manifest icon",onClick:Nf[0]||(Nf[0]=Yf=>Df(lf.value.id))}),createBaseVNode("sl-button",{variant:"primary",onClick:Nf[1]||(Nf[1]=Yf=>lf.value=null)},"Close")])])],4)],64))}}),_style_0$k=`:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}@supports (scrollbar-gutter: stable){.sl-scroll-lock{scrollbar-gutter:stable!important;overflow:hidden!important}}@supports not (scrollbar-gutter: stable){.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}*{box-sizing:border-box}#gallery{position:relative;margin:1rem}@media only screen and (max-width: 768px){#gallery{margin:0}}sl-dialog::part(panel){max-width:unset;max-height:unset;height:100dvh}sl-dialog::part(overlay){--sl-overlay-background-color: rgba(100, 100, 100, .8)}sl-dialog::part(footer){background-color:#64646480}.gallery-item{position:absolute;display:flex;flex-direction:column;width:100px;box-shadow:2px 2px 4px #ccc}.gallery-item:hover{box-shadow:#32325d40 0 6px 12px -2px,#0000004d 0 3px 7px -3px}.image{left:0;top:0;width:100%;height:100%;opacity:0;background-color:#d5d5d5}.fade-in{opacity:0;-webkit-transition:all 1s ease;-moz-transition:all 1s ease;-ms-transition:all 1s ease;-o-transition:all 1s ease}.image:hover{cursor:pointer}.icons{display:flex;align-items:center;gap:6px}.size{width:100%;font-size:.8em;margin-top:3px}.provider-logo{height:20px}.license{cursor:pointer;display:inline-block}.image-card{font-size:.85em;display:flex;flex-direction:column}.title{display:flex;align-items:center;gap:6px;font-size:.9em}.title img{width:16px;opacity:1}.clamp{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.text{margin:6px 0;height:50px}.text p{margin:0;padding:0}.license{display:flex;align-items:center;gap:3px;font-size:.8em;margin-left:.5rem}a.license{color:#000;text-decoration:none;font-size:.9rem}sl-icon{font-size:1.2rem}.push{margin-left:auto}.controls{display:flex;align-items:center;gap:1em}.toolbar{height:32px;justify-content:flex-end;display:flex;align-items:center;gap:.5em;padding:0 .2em}.toolbar svg{width:20px;height:20px;cursor:pointer;fill:#777}.toolbar svg:hover{fill:#444}.dialog .footer{display:flex;align-items:center;gap:.5em;padding:.5em;text-align:left}.iiif{width:32px;height:32px;cursor:copy}.iiif:hover{width:40px;height:40px} +`,Gallery=_export_sfc(_sfc_main$m,[["styles",[_style_0$k]]]),_hoisted_1$j={ref:"root",class:"main"},_hoisted_2$g=createBaseVNode("svg",{slot:"prefix",width:"32",height:"32",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512"},[createBaseVNode("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"})],-1),_hoisted_3$e=["value"],_hoisted_4$d={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_5$b=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_6$a=[_hoisted_5$b],_hoisted_7$8=["onClick","innerHTML"],_hoisted_8$7={key:0},_hoisted_9$8={key:0},_hoisted_10$8={slot:"trigger",size:"medium"},_hoisted_11$8={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_12$8=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_13$7=[_hoisted_12$8],_hoisted_14$6=["onClick","innerHTML"],_hoisted_15$5={key:1},_hoisted_16$5={key:0},_hoisted_17$5={key:0,slot:"trigger",size:"medium"},_hoisted_18$5={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_19$4=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_20$4=[_hoisted_19$4],_hoisted_21$4=["onClick","innerHTML"],_hoisted_22$3={key:0},_hoisted_23$3={slot:"trigger",size:"medium"},_hoisted_24$3={key:0,slot:"suffix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_25$3=createBaseVNode("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},null,-1),_hoisted_26$3=[_hoisted_25$3],_hoisted_27$3=["onClick","disabled"],_hoisted_28$3={key:0,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_29$2=createBaseVNode("path",{d:"M0 96C0 60.7 28.7 32 64 32H196.1c19.1 0 37.4 7.6 50.9 21.1L289.9 96H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16H286.6c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7H64z"},null,-1),_hoisted_30$2=[_hoisted_29$2],_hoisted_31$2={key:1,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512"},_hoisted_32$2=createBaseVNode("path",{d:"M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"},null,-1),_hoisted_33$2=[_hoisted_32$2],_hoisted_34$2={key:2,slot:"prefix",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},_hoisted_35$2=createBaseVNode("path",{d:"M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z"},null,-1),_hoisted_36$2=[_hoisted_35$2],_hoisted_37$2=["onClick"],_hoisted_38$2=createBaseVNode("svg",{slot:"prefix",width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[createBaseVNode("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"})],-1),_hoisted_39$2=createBaseVNode("span",null,"Add Item",-1),_hoisted_40$2=[_hoisted_38$2,_hoisted_39$2],_hoisted_41$2={key:2},_hoisted_42$2={width:"24",height:"24",slot:"trigger",fill:"#999",style:{cursor:"pointer",padding:"0 0 0 8px","margin-top":"-12px"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_43$2=createBaseVNode("path",{d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"},null,-1),_hoisted_44$2=[_hoisted_43$2],_hoisted_45$2={slot:"prefix",width:"18",height:"18",fill:"red",style:{"margin-right":"0.5em"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},_hoisted_46$2=createBaseVNode("path",{d:"M170.5 51.6L151.5 80h145l-19-28.4c-1.5-2.2-4-3.6-6.7-3.6H177.1c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80H368h48 8c13.3 0 24 10.7 24 24s-10.7 24-24 24h-8V432c0 44.2-35.8 80-80 80H112c-44.2 0-80-35.8-80-80V128H24c-13.3 0-24-10.7-24-24S10.7 80 24 80h8H80 93.8l36.7-55.1C140.9 9.4 158.4 0 177.1 0h93.7c18.7 0 36.2 9.4 46.6 24.9zM80 128V432c0 17.7 14.3 32 32 32H336c17.7 0 32-14.3 32-32V128H80zm80 64V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V192c0-8.8 7.2-16 16-16s16 7.2 16 16z"},null,-1),_hoisted_47$1=[_hoisted_46$2],_hoisted_48=createBaseVNode("div",{slot:"footer"},[createBaseVNode("sl-button",{variant:"primary",class:"cancel",style:{"margin-right":"1em"}},"Cancel"),createBaseVNode("sl-button",{variant:"primary",class:"confirm"},"Confirm")],-1),_hoisted_49={id:"add-file-form",class:"input-validation-pattern"},_hoisted_50=createBaseVNode("sl-input",{style:{flex:"1"},autocomplete:"off",required:"",id:"add-file-input",placeholder:"Enter file path",pattern:"^([A-z0-9\\-_]+/)*[A-z0-9\\-_.]+$"},null,-1),_hoisted_51=createBaseVNode("br",null,null,-1),_hoisted_52=["innerHTML"],_hoisted_53=createBaseVNode("sl-button",{type:"reset",variant:"default"},"Reset",-1),_hoisted_54=createBaseVNode("sl-button",{type:"submit",variant:"primary"},"Add",-1),_sfc_main$l=defineComponent({__name:"GhFileSelector.ce",props:{ghSource:{type:String}},emits:["fileSelected","repoIsWritable"],setup(F,{expose:W,emit:q}){const K=F;W({GithubClient:GithubClient$1}),watch$1(K,()=>X()),onMounted(()=>X());function X(){jp(),vp()}const tt=ref(null),rt=ref(null),ot=ref(null);watch$1(ot,Dp=>{var Lp,xp;Dp==null||Dp.addEventListener("sl-overlay-dismiss",()=>Dp.hide()),Dp==null||Dp.addEventListener("sl-close",()=>Dp.hide()),(Lp=Dp==null?void 0:Dp.querySelector(".cancel"))==null||Lp.addEventListener("click",()=>Dp.hide()),(xp=Dp==null?void 0:Dp.querySelector(".confirm"))==null||xp.addEventListener("click",()=>{Dp==null||Dp.hide(),vg()})});const ut=ref(null);watch$1(ut,Dp=>{var Lp,xp;Dp==null||Dp.addEventListener("sl-overlay-dismiss",()=>Dp.hide()),Dp==null||Dp.addEventListener("sl-close",()=>Dp.hide()),(Lp=Dp==null?void 0:Dp.querySelector(".cancel"))==null||Lp.addEventListener("click",()=>Dp.hide()),(xp=Dp==null?void 0:Dp.querySelector(".confirm"))==null||xp.addEventListener("click",()=>{Dp==null||Dp.hide()})});const yn=ref(null),uo=ref(null),po=ref(""),mo=ref(),wo=ref(!1),lf=ref([]),yf=ref(!1),cf=ref();watch$1(po,()=>{wo.value=window.localStorage.getItem("gh-auth-token")!==null,mo.value=new GithubClient$1(po.value||""),_f.value&&Bf()}),watch$1(mo,async Dp=>{});const vf=ref([]),_f=ref("");watch$1(vf,Dp=>{var xp;if(!Dp.length)return;let Lp=Dp.find(kp=>{var lp;return kp.login===((lp=cf.value)==null?void 0:lp.acct)});_f.value=(Lp==null?void 0:Lp.login)||((xp=cf.value)==null?void 0:xp.acct)||Dp[0].login});async function $f(){Promise.all([mo.value.user(),mo.value.organizations()]).then(Dp=>vf.value=Dp.flat())}function xf(Dp){cf.value=null,_f.value=Dp.login}function Af(Dp){let Lp=yn.value.value.trim();uo.value&&(uo.value.style.display=Lp.length?"none":"block"),Dp.key==="Enter"&&(_f.value=Lp)}const Cf=ref([]),Pf=ref("");watch$1(_f,Dp=>{Pf.value="",Bf()}),watch$1(Cf,Dp=>{if(!Dp.length)return;let Lp=Dp.find(xp=>{var kp;return xp.name===((kp=cf.value)==null?void 0:kp.repo)})||Dp.find(xp=>xp.name==="essays")||Dp[0];Pf.value=Lp.name});function Bf(){var Dp;(Dp=mo.value)==null||Dp.repos(_f.value).then(Lp=>Cf.value=Lp)}function Hf(Dp){cf.value=null,Pf.value=Dp.name}watch$1(yf,Dp=>{q("repoIsWritable",Dp)});const Df=ref([]),Lf=ref("");watch$1(Pf,Dp=>{Dp&&(Lf.value="",wo.value&&mo.value.user().then(Lp=>Lp.login).then(Lp=>Dp?mo.value.isCollaborator(_f.value,Dp,Lp):!1).then(Lp=>yf.value=Lp),kf())});async function kf(){mo.value.branches(_f.value,Pf.value).then(Dp=>Df.value=Dp)}let Nf;watch$1(Df,async Dp=>{var Lp,xp;Dp.length&&(!Nf&&_f.value&&Pf.value&&(Nf=await mo.value.defaultBranch(_f.value,Pf.value)),Lf.value=((Lp=cf.value)==null?void 0:Lp.branch)||Nf||((xp=Dp[0])==null?void 0:xp.name))});function Yf(Dp){cf.value=null,Lf.value=Dp.name}watch$1(Lf,Dp=>{_f.value&&Pf.value&&Dp&&ap("").then(Lp=>{let xp=ip(Lp);Gf.value=[{dirList:Lp,selected:xp}]})});const Gf=ref([]);watch$1(Gf,()=>{var xp;if(!Gf.value.length)return;let Dp=Gf.value.length-1,Lp=Gf.value[Dp];if(((xp=Lp==null?void 0:Lp.selected)==null?void 0:xp.type)==="dir")ap(Gf.value.map(kp=>kp.selected.name).join("/")).then(kp=>{let lp=ip(kp,Dp+1);Gf.value=[...Gf.value,{dirList:kp,selected:lp}]});else{let kp=`${_f.value}/${Pf.value}/${Lf.value}/${Gf.value.map(lp=>lp.selected.name).join("/")}`;q("fileSelected",{trigger:rt.value,path:kp})}});function rp(Dp,Lp){cf.value=null;let xp=[...Gf.value];xp[Dp]={dirList:xp[Dp].dirList,selected:Lp},Gf.value=xp.slice(0,Dp+1)}function ip(Dp,Lp=0){return(Dp==null?void 0:Dp.find(xp=>{var kp,lp;return xp.name===((kp=cf.value)==null?void 0:kp.path[Lp])||xp.name===`${(lp=cf.value)==null?void 0:lp.path[Lp]}.md`}))||(Dp==null?void 0:Dp.filter(xp=>xp.type==="file").find(xp=>xp.name==="index.md"||xp.name==="README.md"))||(Dp==null?void 0:Dp.filter(xp=>xp.type==="file"&&/\.md$/.test(xp.name))[0])||(Dp==null?void 0:Dp.filter(xp=>xp.type==="dir")[0])||(Dp==null?void 0:Dp.filter(xp=>xp.type==="file")[0])}async function ap(Dp){let Lp=await mo.value.dirlist(_f.value,Pf.value,Dp,Lf.value),xp=Lp.filter(lp=>lp.type==="dir"),kp=Lp.filter(lp=>lp.type==="file");return[...xp,...kp]}function yp(){vf.value=[],Cf.value=[],Df.value=[],Gf.value=[],_f.value="",Pf.value="",Lf.value=""}async function vp(Dp=K.ghSource,Lp="select"){var qf;if(!Dp)return;rt.value=Lp,yp();let[xp,kp,lp,...Of]=(Dp||"").split("/").filter(cp=>cp);cf.value={acct:xp,repo:kp,branch:lp,path:Of},wo.value?($f(),lf.value=await mo.value.user().then(cp=>cp.login),_f.value&&Pf.value&&lf.value&&mo.value.isCollaborator(_f.value,Pf.value,lf.value).then(cp=>yf.value=cp)):(qf=cf.value)!=null&&qf.acct&&(_f.value=cf.value.acct)}watch$1(cf,Dp=>{});async function Np(){let Lp=await fetch("https://iiif.mdpress.io/gh-token");if(Lp.ok){let xp=await Lp.text();window.localStorage.setItem("gh-unscoped-token",xp)}}async function jp(){window.localStorage.getItem("gh-unscoped-token")||await Np(),po.value=window.localStorage.getItem("gh-auth-token")||window.localStorage.getItem("gh-unscoped-token")}function Ip(Dp){return Dp.toLowerCase().split("-").map(Lp=>Lp.charAt(0).toUpperCase()+Lp.slice(1)).join(" ")}let Jp=0;function ng(Dp=0){var xp,kp,lp;Jp=Dp;let Lp=(xp=ut.value)==null?void 0:xp.querySelector("#add-file-form");Lp.onclick||(Lp.onclick=function(){},Lp.addEventListener("submit",async Of=>{var Ep;tt.value=null,Of.preventDefault();let qf=(Ep=ut.value)==null?void 0:Ep.querySelector("#add-file-input"),cp=[...Gf.value.slice(0,Jp).filter(_p=>_p.selected.type==="dir").map(_p=>_p.selected.name),...qf.value.split("/").filter(_p=>_p)],hp=cp[cp.length-1];cp[cp.length-1].indexOf(".")>0?cp[cp.length-1]=cp[cp.length-1].replace(/readme\.md/,"README.md"):cp.push("README.md");let $p=cp.join("/");hp=Ip(hp.replace(/\.md$/,""));let Vp=`[![](https://v3.juncture-digital.org/images/wb.svg)](https://v3.juncture-digital.org/wb) # ${hp} -`,bp=await mo.value.putFile(_f.value,Af.value,$p,Vp,Lf.value);if(bp.status>=200&&bp.status<300){let _p=`${_f.value}/${Af.value}/${Lf.value}/${$p}`;vp(_p,"add"),og()}else tt.value=`Error: ${bp.statusText} ${$p}`}),Lp.addEventListener("reset",()=>{tt.value=null})),(kp=ut.value)==null||kp.addEventListener("sl-after-show",()=>{var Of;((Of=ut.value)==null?void 0:Of.querySelector("#add-file-input")).focus()}),(lp=ut.value)==null||lp.show()}function og(){var Lp,xp;let Dp=(Lp=ut.value)==null?void 0:Lp.querySelector("#add-file-input");Dp.value="",tt.value=null,(xp=ut.value)==null||xp.hide()}async function vg(){let Dp=Gf.value.map(Lp=>Lp.selected.name).join("/");await mo.value.deleteFile(_f.value,Af.value,Dp,Lf.value),vp(`${_f.value}/${Af.value}/${Lf.value}`,"delete")}return(Dp,Lp)=>{var xp,kp;return openBlock(),createElementBlock("div",_hoisted_1$j,[_hoisted_2$g,createBaseVNode("sl-breadcrumb",null,[createBaseVNode("sl-breadcrumb-item",null,[createBaseVNode("sl-dropdown",null,[createBaseVNode("sl-input",{ref_key:"acctInput",ref:yn,slot:"trigger",size:"medium",placeholder:"Github username",autocomplete:"off",onKeyup:Pf,value:_f.value},[vf.value.length>0?(openBlock(),createElementBlock("svg",_hoisted_4$d,_hoisted_6$a)):createCommentVNode("",!0)],40,_hoisted_3$e),createBaseVNode("sl-menu",{ref_key:"acctMenu",ref:uo},[(openBlock(!0),createElementBlock(Fragment,null,renderList(vf.value,(lp,Of)=>(openBlock(),createElementBlock("sl-menu-item",{key:`acct-${Of}`,onClick:qf=>wf(lp),innerHTML:lp.login,class:normalizeClass({selected:lp.login===_f.value})},null,10,_hoisted_7$8))),128))],512)])]),Af.value?(openBlock(),createElementBlock("sl-breadcrumb-item",_hoisted_8$7,[Cf.value.length?(openBlock(),createElementBlock("sl-dropdown",_hoisted_9$8,[createBaseVNode("sl-button",_hoisted_10$8,[createTextVNode(toDisplayString(Af.value)+" ",1),Cf.value.length>1?(openBlock(),createElementBlock("svg",_hoisted_11$8,_hoisted_13$7)):createCommentVNode("",!0)]),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Cf.value,(lp,Of)=>(openBlock(),createElementBlock("sl-menu-item",{key:`repo-${Of}`,onClick:qf=>Hf(lp),innerHTML:lp.name,class:normalizeClass({selected:lp.name===Af.value})},null,10,_hoisted_14$6))),128))])])):createCommentVNode("",!0)])):createCommentVNode("",!0),Lf.value?(openBlock(),createElementBlock("sl-breadcrumb-item",_hoisted_15$5,[Df.value.length?(openBlock(),createElementBlock("sl-dropdown",_hoisted_16$5,[Lf.value?(openBlock(),createElementBlock("sl-button",_hoisted_17$5,[createTextVNode(toDisplayString(Lf.value)+" ",1),Df.value.length>1?(openBlock(),createElementBlock("svg",_hoisted_18$5,_hoisted_20$4)):createCommentVNode("",!0)])):createCommentVNode("",!0),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Df.value,(lp,Of)=>(openBlock(),createElementBlock("sl-menu-item",{key:`branch-${Of}`,onClick:qf=>Yf(lp),innerHTML:lp.name,class:normalizeClass({selected:lp.name===Lf.value})},null,10,_hoisted_21$4))),128))])])):createCommentVNode("",!0)])):createCommentVNode("",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(Gf.value,(lp,Of)=>(openBlock(),createElementBlock("sl-breadcrumb-item",{key:`pe-${Of}`},[lp.dirList.length?(openBlock(),createElementBlock("sl-dropdown",_hoisted_22$3,[createBaseVNode("sl-button",_hoisted_23$3,[createTextVNode(toDisplayString(lp.selected.name)+" ",1),lp.dirList.length>1?(openBlock(),createElementBlock("svg",_hoisted_24$3,_hoisted_26$3)):createCommentVNode("",!0)]),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(lp.dirList,(qf,cp)=>(openBlock(),createElementBlock("sl-menu-item",{key:`dl=${Of}-${cp}`,onClick:hp=>(qf.type==="dir"||/\.md$/.test(qf.name))&&rp(Of,qf),class:normalizeClass({selected:qf.name===lp.selected.name}),disabled:qf.type==="file"&&!/\.md$/.test(qf.name)?"":null},[qf.type==="dir"?(openBlock(),createElementBlock("svg",_hoisted_28$3,_hoisted_30$2)):/\.md$/.test(qf.name)?(openBlock(),createElementBlock("svg",_hoisted_31$2,_hoisted_33$2)):(openBlock(),createElementBlock("svg",_hoisted_34$2,_hoisted_36$2)),createTextVNode(" "+toDisplayString(qf.name),1)],10,_hoisted_27$3))),128)),yf.value?(openBlock(),createElementBlock("sl-menu-item",{key:0,onClick:qf=>ng(Of)},_hoisted_40$2,8,_hoisted_37$2)):createCommentVNode("",!0)])])):createCommentVNode("",!0)]))),128)),yf.value?(openBlock(),createElementBlock("sl-dropdown",_hoisted_41$2,[(openBlock(),createElementBlock("svg",_hoisted_42$2,_hoisted_44$2)),createBaseVNode("sl-menu",null,[createBaseVNode("sl-menu-item",{onClick:Lp[0]||(Lp[0]=lp=>{var Of;return(Of=ot.value)==null?void 0:Of.show()})},[(openBlock(),createElementBlock("svg",_hoisted_45$2,_hoisted_47$1)),createTextVNode(" Delete file ")])])])):createCommentVNode("",!0)]),createBaseVNode("sl-dialog",{ref_key:"deleteDialog",ref:ot,label:"Confirm Delete",class:"deleteDialog"},[createTextVNode(" Delete "+toDisplayString((kp=(xp=Gf.value[Gf.value.length-1])==null?void 0:xp.selected)==null?void 0:kp.name)+"? ",1),_hoisted_48],512),createBaseVNode("sl-dialog",{label:"Add File",ref_key:"addDialog",ref:ut},[createBaseVNode("form",_hoisted_49,[_hoisted_50,_hoisted_51,tt.value?(openBlock(),createElementBlock("div",{key:0,innerHTML:tt.value,style:{color:"red","margin-bottom":"1em"}},null,8,_hoisted_52)):createCommentVNode("",!0),createBaseVNode("sl-button",{onClick:Lp[1]||(Lp[1]=lp=>og())},"Cancel"),_hoisted_53,_hoisted_54])],512)],512)}}}),_style_0$j=`:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}@supports (scrollbar-gutter: stable){.sl-scroll-lock{scrollbar-gutter:stable!important;overflow:hidden!important}}@supports not (scrollbar-gutter: stable){.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}*{box-sizing:border-box}:host{display:block;width:100%;border:1px solid #ced4da;position:relative;z-index:1;background-color:#fff;box-sizing:border-box}.main{display:flex;align-items:center;gap:1em;padding:6px}sl-menu{text-align:left}sl-menu-item.selected::part(label){font-weight:700} -`,GhFileSelector=_export_sfc(_sfc_main$l,[["styles",[_style_0$j]]]),_hoisted_1$i={key:0,class:"logo"},_hoisted_2$f=["href"],_hoisted_3$d=["src"],_hoisted_4$c={class:"branding"},_hoisted_5$a={key:0,class:"title"},_hoisted_6$9=["href","innerHTML"],_hoisted_7$7=["innerHTML"],_hoisted_8$6={class:"search-and-menu"},_hoisted_9$7=["search-domain","search-cx","search-key"],_hoisted_10$7=["auth","contact","pdf-download-enabled","innerHTML"],_hoisted_11$7={key:1},_hoisted_12$7=["manifest"],_sfc_main$k=defineComponent({__name:"Header.ce",props:{alpha:{type:Number},auth:{type:String},background:{type:String},backgroundColor:{type:String},breadcrumbs:{type:Boolean,default:!1},color:{type:String},contact:{type:String},height:{type:Number,default:400},iconFilter:{type:String},logo:{type:String},noManifestPopover:{type:Boolean,default:!1},options:{type:String},pdfDownloadEnabled:{type:Boolean,default:!1},position:{type:String,default:"center"},subtitle:{type:String},searchDomain:{type:String},searchCx:{type:String},searchKey:{type:String},title:{type:String},top:{type:Number,default:0}},setup(F){const W=F,q=self.window,K=ref(null),X=computed(()=>{var kf,Nf;return(Nf=(kf=K.value)==null?void 0:kf.getRootNode())==null?void 0:Nf.host}),tt=ref(null),rt=ref(null),ot=ref(),ut=ref(q.config||{}),yn=computed(()=>{var kf;return W.title||((kf=ut.value.meta)==null?void 0:kf.title)}),uo=computed(()=>{var kf,Nf;return W.background||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.backgroundImage)}),po=computed(()=>{var Nf,Yf;let kf=W.logo||((Yf=(Nf=ut.value.defaults)==null?void 0:Nf.header)==null?void 0:Yf.logo);return kf&&((kf==null?void 0:kf.indexOf("http"))===0?kf:`${ut.value.baseurl||""}/${kf[0]==="/"?kf.slice(1):kf}`)}),mo=computed(()=>{var kf,Nf;return W.iconFilter===void 0?(Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.iconFilter:W.iconFilter}),wo=computed(()=>{var kf,Nf;return W.backgroundColor||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.backgroundColor)||(uo.value?"black":"#ddd")}),lf=computed(()=>{var kf,Nf;return W.color||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.color)||"#fff"}),yf=computed(()=>{var kf,Nf;return W.contact||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.contact)}),cf=computed(()=>{var kf,Nf;return W.breadcrumbs||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.breadcrumbs)}),vf=computed(()=>{var kf,Nf;return W.pdfDownloadEnabled||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.pdfDownloadEnabled)}),_f=computed(()=>{var kf,Nf;return W.auth||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.auth)});watch$1(rt,kf=>{kf&&(kf.style.backgroundColor=Lf(wo.value,W.alpha||(uo.value?.5:1)))});const $f=ref(!1),wf=ref(),Pf=ref(),Cf=ref(),Af=ref();watch$1(X,kf=>{var Nf,Yf;if(ut.value=q.config||{},Pf.value=parseImageOptions(W.options||""),uo.value&&Bf(),tt.value&&(tt.value.style.height=W.height?`${W.height}px`:uo.value?"400px":"100px"),(Yf=(Nf=ut.value.defaults)==null?void 0:Nf.header)!=null&&Yf.class&&ut.value.defaults.header.class.split(" ").forEach(Gf=>kf.classList.add(Gf)),$f.value=kf.classList.contains("sticky"),$f.value){let Gf=parseInt(kf.style.top.replace(/px/,"")),rp=W.top?W.top:Gf||(uo.value?-300:0);kf.style.top=`${rp}px`}});function Bf(){getManifest(uo.value).then(kf=>wf.value=kf).catch(kf=>{fetch(`https://${iiifServer}/manifest/`,{method:"POST",body:JSON.stringify({url:uo.value})}).then(Nf=>Nf.json()).then(Nf=>wf.value=Nf)})}onMounted(()=>{nextTick(()=>{var Nf,Yf,Gf,rp;let kf=X.value.querySelector("ul");if(!kf){let ip=X.value.nextElementSibling;ip&&ip.tagName==="UL"&&(kf=ip)}kf?kf.style.display="none":(Yf=(Nf=ut.value.defaults)==null?void 0:Nf.header)!=null&&Yf.nav&&(kf=document.createElement("ul"),(rp=(Gf=ut.value.defaults)==null?void 0:Gf.header)==null||rp.nav.forEach(ip=>{const ap=document.createElement("li"),yp=document.createElement("a");yp.href=ip.href,yp.innerHTML=ip.label,ip.icon&&(yp.innerHTML+=ip.icon),ap.appendChild(yp),kf.appendChild(ap)})),ot.value=kf==null?void 0:kf.innerHTML}),document.addEventListener("scroll",()=>{let kf=K.value?K.value.getBoundingClientRect().height+K.value.getBoundingClientRect().top:0;EventBus$1.emit("offset",kf)})}),watch$1(wf,(kf,Nf)=>{kf!==Nf&&(Cf.value=getItemInfo(kf))}),watch$1(Cf,async(kf,Nf)=>{kf!==Nf&&setTimeout(async()=>{Af.value=kf.service?Hf(kf.service[0].id||kf.service[0]["@id"],Pf.value):await imageDataUrl(Cf.value.id,Pf.value.region,{width:X.value.clientWidth,height:W.height})},100)}),watch$1(Af,()=>{tt.value&&(tt.value.style.backgroundImage=`url("${Af.value}")`,tt.value.style.backgroundPosition=W.position)});function Hf(kf,Nf){let Yf=Cf.value,Gf=Number((Yf.width/Yf.height).toFixed(4)),rp=Math.min(800,X.value.getBoundingClientRect().width.toFixed(0)),ip=Number(rp/Gf).toFixed(0),ap=`${rp},${ip}`;return`${kf.replace(/\/info.json$/,"")}/${Nf.region}/${ap}/${Nf.rotation}/${Nf.quality}.${Nf.format}`}const Df={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#964B00",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8B4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Lf(kf,Nf=1){let Yf,Gf=kf[0]==="#"?kf:Df[kf.toLowerCase()];if(Gf.length===4){let rp=Gf.slice(1,2),ip=Gf.slice(2,3),ap=Gf.slice(3,4);rp=parseInt(rp+rp,16),ip=parseInt(ip+ip,16),ap=parseInt(ap+ap,16),Yf=`rgba(${rp}, ${ip}, ${ap}, ${Nf})`}else{const rp=parseInt(Gf.slice(1,3),16),ip=parseInt(Gf.slice(3,5),16),ap=parseInt(Gf.slice(5,7),16);Yf=`rgba(${rp}, ${ip}, ${ap}, ${Nf})`}return Yf}return(kf,Nf)=>(openBlock(),createElementBlock("div",{class:"header",ref_key:"root",ref:K},[uo.value?(openBlock(),createElementBlock("div",{key:0,class:"background",ref_key:"background",ref:tt},null,512)):createCommentVNode("",!0),createBaseVNode("div",{class:"navbar",ref_key:"navbar",ref:rt,style:normalizeStyle({color:lf.value})},[po.value?(openBlock(),createElementBlock("div",_hoisted_1$i,[createBaseVNode("a",{href:`${ut.value.baseurl||""}/`},[createBaseVNode("img",{src:po.value,class:normalizeClass(`${mo.value?"icon-"+mo.value:""}`),alt:"logo"},null,10,_hoisted_3$d)],8,_hoisted_2$f)])):createCommentVNode("",!0),createBaseVNode("div",_hoisted_4$c,[yn.value?(openBlock(),createElementBlock("div",_hoisted_5$a,[createBaseVNode("a",{href:`${ut.value.baseurl||""}/`,innerHTML:yn.value},null,8,_hoisted_6$9)])):createCommentVNode("",!0),F.subtitle?(openBlock(),createElementBlock("div",{key:1,class:"subtitle clamp1",innerHTML:F.subtitle},null,8,_hoisted_7$7)):createCommentVNode("",!0)]),createBaseVNode("div",_hoisted_8$6,[W.searchDomain?(openBlock(),createElementBlock("ve-site-search",{key:0,"search-domain":W.searchDomain,"search-cx":W.searchCx,"search-key":W.searchKey},null,8,_hoisted_9$7)):createCommentVNode("",!0),ot.value!==void 0||_f.value?(openBlock(),createElementBlock("ve-menu",{key:1,auth:_f.value,contact:yf.value,"pdf-download-enabled":vf.value?"":null,innerHTML:ot.value},null,8,_hoisted_10$7)):createCommentVNode("",!0)])],4),cf.value?(openBlock(),createElementBlock("ve-breadcrumbs",_hoisted_11$7)):createCommentVNode("",!0),wf.value&&!F.noManifestPopover?(openBlock(),createElementBlock("ve-manifest-popup",{key:2,manifest:wf.value},null,8,_hoisted_12$7)):createCommentVNode("",!0)],512))}}),_style_0$i=`:host{display:block}.header{display:grid;grid-template-rows:1fr 100px auto;grid-template-columns:1fr}.background{grid-area:1 / 1 / 3 / 2;background-repeat:no-repeat;background-size:cover;background-position:center;z-index:1;position:relative}.navbar{grid-area:2 / 1 / 3 / 2;background-color:#0006;color:#fff;z-index:2;display:flex;align-items:center;gap:1.5em;padding:0 20px}ve-manifest-popup{visibility:hidden;position:absolute;top:1em;right:1em;z-index:10}.header:hover ve-manifest-popup{visibility:visible;transition:all .5s ease-in}ve-breadcrumbs{grid-area:3 / 1 / 4 / 2;background-color:#fff;color:#000;z-index:1}.branding{display:flex;flex-direction:column;gap:6px}.title a{font-size:2em;line-height:1;font-weight:500;text-decoration:none;color:inherit}.subtitle{font-size:1.5em;line-height:1;font-weight:300}.logo{display:flex;align-items:center;justify-content:center;height:50%}.logo a{height:100%}.logo img{-o-object-fit:contain;object-fit:contain;vertical-align:middle;height:100%}.search-and-menu{margin-left:auto;display:flex;align-items:center;gap:1em}.clamp1{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}@media only screen and (max-width: 768px){.navbar{gap:.75em;padding:0 1em}.title a{font-size:1.3em}.subtitle{font-size:1em}.logo img{max-width:40px}ve-breadcrumbs{padding-left:.5rem}}.icon-white{filter:invert(100%) sepia(0%) saturate(7487%) hue-rotate(339deg) brightness(115%) contrast(100%)} +`,bp=await mo.value.putFile(_f.value,Pf.value,$p,Vp,Lf.value);if(bp.status>=200&&bp.status<300){let _p=`${_f.value}/${Pf.value}/${Lf.value}/${$p}`;vp(_p,"add"),og()}else tt.value=`Error: ${bp.statusText} ${$p}`}),Lp.addEventListener("reset",()=>{tt.value=null})),(kp=ut.value)==null||kp.addEventListener("sl-after-show",()=>{var Of;((Of=ut.value)==null?void 0:Of.querySelector("#add-file-input")).focus()}),(lp=ut.value)==null||lp.show()}function og(){var Lp,xp;let Dp=(Lp=ut.value)==null?void 0:Lp.querySelector("#add-file-input");Dp.value="",tt.value=null,(xp=ut.value)==null||xp.hide()}async function vg(){let Dp=Gf.value.map(Lp=>Lp.selected.name).join("/");await mo.value.deleteFile(_f.value,Pf.value,Dp,Lf.value),vp(`${_f.value}/${Pf.value}/${Lf.value}`,"delete")}return(Dp,Lp)=>{var xp,kp;return openBlock(),createElementBlock("div",_hoisted_1$j,[_hoisted_2$g,createBaseVNode("sl-breadcrumb",null,[createBaseVNode("sl-breadcrumb-item",null,[createBaseVNode("sl-dropdown",null,[createBaseVNode("sl-input",{ref_key:"acctInput",ref:yn,slot:"trigger",size:"medium",placeholder:"Github username",autocomplete:"off",onKeyup:Af,value:_f.value},[vf.value.length>0?(openBlock(),createElementBlock("svg",_hoisted_4$d,_hoisted_6$a)):createCommentVNode("",!0)],40,_hoisted_3$e),createBaseVNode("sl-menu",{ref_key:"acctMenu",ref:uo},[(openBlock(!0),createElementBlock(Fragment,null,renderList(vf.value,(lp,Of)=>(openBlock(),createElementBlock("sl-menu-item",{key:`acct-${Of}`,onClick:qf=>xf(lp),innerHTML:lp.login,class:normalizeClass({selected:lp.login===_f.value})},null,10,_hoisted_7$8))),128))],512)])]),Pf.value?(openBlock(),createElementBlock("sl-breadcrumb-item",_hoisted_8$7,[Cf.value.length?(openBlock(),createElementBlock("sl-dropdown",_hoisted_9$8,[createBaseVNode("sl-button",_hoisted_10$8,[createTextVNode(toDisplayString(Pf.value)+" ",1),Cf.value.length>1?(openBlock(),createElementBlock("svg",_hoisted_11$8,_hoisted_13$7)):createCommentVNode("",!0)]),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Cf.value,(lp,Of)=>(openBlock(),createElementBlock("sl-menu-item",{key:`repo-${Of}`,onClick:qf=>Hf(lp),innerHTML:lp.name,class:normalizeClass({selected:lp.name===Pf.value})},null,10,_hoisted_14$6))),128))])])):createCommentVNode("",!0)])):createCommentVNode("",!0),Lf.value?(openBlock(),createElementBlock("sl-breadcrumb-item",_hoisted_15$5,[Df.value.length?(openBlock(),createElementBlock("sl-dropdown",_hoisted_16$5,[Lf.value?(openBlock(),createElementBlock("sl-button",_hoisted_17$5,[createTextVNode(toDisplayString(Lf.value)+" ",1),Df.value.length>1?(openBlock(),createElementBlock("svg",_hoisted_18$5,_hoisted_20$4)):createCommentVNode("",!0)])):createCommentVNode("",!0),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(Df.value,(lp,Of)=>(openBlock(),createElementBlock("sl-menu-item",{key:`branch-${Of}`,onClick:qf=>Yf(lp),innerHTML:lp.name,class:normalizeClass({selected:lp.name===Lf.value})},null,10,_hoisted_21$4))),128))])])):createCommentVNode("",!0)])):createCommentVNode("",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(Gf.value,(lp,Of)=>(openBlock(),createElementBlock("sl-breadcrumb-item",{key:`pe-${Of}`},[lp.dirList.length?(openBlock(),createElementBlock("sl-dropdown",_hoisted_22$3,[createBaseVNode("sl-button",_hoisted_23$3,[createTextVNode(toDisplayString(lp.selected.name)+" ",1),lp.dirList.length>1?(openBlock(),createElementBlock("svg",_hoisted_24$3,_hoisted_26$3)):createCommentVNode("",!0)]),createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(lp.dirList,(qf,cp)=>(openBlock(),createElementBlock("sl-menu-item",{key:`dl=${Of}-${cp}`,onClick:hp=>(qf.type==="dir"||/\.md$/.test(qf.name))&&rp(Of,qf),class:normalizeClass({selected:qf.name===lp.selected.name}),disabled:qf.type==="file"&&!/\.md$/.test(qf.name)?"":null},[qf.type==="dir"?(openBlock(),createElementBlock("svg",_hoisted_28$3,_hoisted_30$2)):/\.md$/.test(qf.name)?(openBlock(),createElementBlock("svg",_hoisted_31$2,_hoisted_33$2)):(openBlock(),createElementBlock("svg",_hoisted_34$2,_hoisted_36$2)),createTextVNode(" "+toDisplayString(qf.name),1)],10,_hoisted_27$3))),128)),yf.value?(openBlock(),createElementBlock("sl-menu-item",{key:0,onClick:qf=>ng(Of)},_hoisted_40$2,8,_hoisted_37$2)):createCommentVNode("",!0)])])):createCommentVNode("",!0)]))),128)),yf.value?(openBlock(),createElementBlock("sl-dropdown",_hoisted_41$2,[(openBlock(),createElementBlock("svg",_hoisted_42$2,_hoisted_44$2)),createBaseVNode("sl-menu",null,[createBaseVNode("sl-menu-item",{onClick:Lp[0]||(Lp[0]=lp=>{var Of;return(Of=ot.value)==null?void 0:Of.show()})},[(openBlock(),createElementBlock("svg",_hoisted_45$2,_hoisted_47$1)),createTextVNode(" Delete file ")])])])):createCommentVNode("",!0)]),createBaseVNode("sl-dialog",{ref_key:"deleteDialog",ref:ot,label:"Confirm Delete",class:"deleteDialog"},[createTextVNode(" Delete "+toDisplayString((kp=(xp=Gf.value[Gf.value.length-1])==null?void 0:xp.selected)==null?void 0:kp.name)+"? ",1),_hoisted_48],512),createBaseVNode("sl-dialog",{label:"Add File",ref_key:"addDialog",ref:ut},[createBaseVNode("form",_hoisted_49,[_hoisted_50,_hoisted_51,tt.value?(openBlock(),createElementBlock("div",{key:0,innerHTML:tt.value,style:{color:"red","margin-bottom":"1em"}},null,8,_hoisted_52)):createCommentVNode("",!0),createBaseVNode("sl-button",{onClick:Lp[1]||(Lp[1]=lp=>og())},"Cancel"),_hoisted_53,_hoisted_54])],512)],512)}}}),_style_0$j=`:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}@supports (scrollbar-gutter: stable){.sl-scroll-lock{scrollbar-gutter:stable!important;overflow:hidden!important}}@supports not (scrollbar-gutter: stable){.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}*{box-sizing:border-box}:host{display:block;width:100%;border:1px solid #ced4da;position:relative;z-index:1;background-color:#fff;box-sizing:border-box}.main{display:flex;align-items:center;gap:1em;padding:6px}sl-menu{text-align:left}sl-menu-item.selected::part(label){font-weight:700} +`,GhFileSelector=_export_sfc(_sfc_main$l,[["styles",[_style_0$j]]]),_hoisted_1$i={key:0,class:"logo"},_hoisted_2$f=["href"],_hoisted_3$d=["src"],_hoisted_4$c={class:"branding"},_hoisted_5$a={key:0,class:"title"},_hoisted_6$9=["href","innerHTML"],_hoisted_7$7=["innerHTML"],_hoisted_8$6={class:"search-and-menu"},_hoisted_9$7=["search-domain","search-cx","search-key"],_hoisted_10$7=["auth","contact","pdf-download-enabled","innerHTML"],_hoisted_11$7={key:1},_hoisted_12$7=["manifest"],_sfc_main$k=defineComponent({__name:"Header.ce",props:{alpha:{type:Number},auth:{type:String},background:{type:String},backgroundColor:{type:String},breadcrumbs:{type:Boolean,default:!1},color:{type:String},contact:{type:String},height:{type:Number,default:400},iconFilter:{type:String},logo:{type:String},noManifestPopover:{type:Boolean,default:!1},options:{type:String},pdfDownloadEnabled:{type:Boolean,default:!1},position:{type:String,default:"center"},subtitle:{type:String},searchDomain:{type:String},searchCx:{type:String},searchKey:{type:String},title:{type:String},top:{type:Number,default:0}},setup(F){const W=F,q=self.window,K=ref(null),X=computed(()=>{var kf,Nf;return(Nf=(kf=K.value)==null?void 0:kf.getRootNode())==null?void 0:Nf.host}),tt=ref(null),rt=ref(null),ot=ref(),ut=ref(q.config||{}),yn=computed(()=>{var kf;return W.title||((kf=ut.value.meta)==null?void 0:kf.title)}),uo=computed(()=>{var kf,Nf;return W.background||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.backgroundImage)}),po=computed(()=>{var Nf,Yf;let kf=W.logo||((Yf=(Nf=ut.value.defaults)==null?void 0:Nf.header)==null?void 0:Yf.logo);return kf&&((kf==null?void 0:kf.indexOf("http"))===0?kf:`${ut.value.baseurl||""}/${kf[0]==="/"?kf.slice(1):kf}`)}),mo=computed(()=>{var kf,Nf;return W.iconFilter===void 0?(Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.iconFilter:W.iconFilter}),wo=computed(()=>{var kf,Nf;return W.backgroundColor||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.backgroundColor)||(uo.value?"black":"#ddd")}),lf=computed(()=>{var kf,Nf;return W.color||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.color)||"#fff"}),yf=computed(()=>{var kf,Nf;return W.contact||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.contact)}),cf=computed(()=>{var kf,Nf;return W.breadcrumbs||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.breadcrumbs)}),vf=computed(()=>{var kf,Nf;return W.pdfDownloadEnabled||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.pdfDownloadEnabled)}),_f=computed(()=>{var kf,Nf;return W.auth||((Nf=(kf=ut.value.defaults)==null?void 0:kf.header)==null?void 0:Nf.auth)});watch$1(rt,kf=>{kf&&(kf.style.backgroundColor=Lf(wo.value,W.alpha||(uo.value?.5:1)))});const $f=ref(!1),xf=ref(),Af=ref(),Cf=ref(),Pf=ref();watch$1(X,kf=>{var Nf,Yf;if(ut.value=q.config||{},Af.value=parseImageOptions(W.options||""),uo.value&&Bf(),tt.value&&(tt.value.style.height=W.height?`${W.height}px`:uo.value?"400px":"100px"),(Yf=(Nf=ut.value.defaults)==null?void 0:Nf.header)!=null&&Yf.class&&ut.value.defaults.header.class.split(" ").forEach(Gf=>kf.classList.add(Gf)),$f.value=kf.classList.contains("sticky"),$f.value){let Gf=parseInt(kf.style.top.replace(/px/,"")),rp=W.top?W.top:Gf||(uo.value?-300:0);kf.style.top=`${rp}px`}});function Bf(){getManifest(uo.value).then(kf=>xf.value=kf).catch(kf=>{fetch(`https://${iiifServer}/manifest/`,{method:"POST",body:JSON.stringify({url:uo.value})}).then(Nf=>Nf.json()).then(Nf=>xf.value=Nf)})}onMounted(()=>{nextTick(()=>{var Nf,Yf,Gf,rp;let kf=X.value.querySelector("ul");if(!kf){let ip=X.value.nextElementSibling;ip&&ip.tagName==="UL"&&(kf=ip)}kf?kf.style.display="none":(Yf=(Nf=ut.value.defaults)==null?void 0:Nf.header)!=null&&Yf.nav&&(kf=document.createElement("ul"),(rp=(Gf=ut.value.defaults)==null?void 0:Gf.header)==null||rp.nav.forEach(ip=>{const ap=document.createElement("li"),yp=document.createElement("a");yp.href=ip.href,yp.innerHTML=ip.label,ip.icon&&(yp.innerHTML+=ip.icon),ap.appendChild(yp),kf.appendChild(ap)})),ot.value=kf==null?void 0:kf.innerHTML}),document.addEventListener("scroll",()=>{let kf=K.value?K.value.getBoundingClientRect().height+K.value.getBoundingClientRect().top:0;EventBus$1.emit("offset",kf)})}),watch$1(xf,(kf,Nf)=>{kf!==Nf&&(Cf.value=getItemInfo(kf))}),watch$1(Cf,async(kf,Nf)=>{kf!==Nf&&setTimeout(async()=>{Pf.value=kf.service?Hf(kf.service[0].id||kf.service[0]["@id"],Af.value):await imageDataUrl(Cf.value.id,Af.value.region,{width:X.value.clientWidth,height:W.height})},100)}),watch$1(Pf,()=>{tt.value&&(tt.value.style.backgroundImage=`url("${Pf.value}")`,tt.value.style.backgroundPosition=W.position)});function Hf(kf,Nf){let Yf=Cf.value,Gf=Number((Yf.width/Yf.height).toFixed(4)),rp=Math.min(800,X.value.getBoundingClientRect().width.toFixed(0)),ip=Number(rp/Gf).toFixed(0),ap=`${rp},${ip}`;return`${kf.replace(/\/info.json$/,"")}/${Nf.region}/${ap}/${Nf.rotation}/${Nf.quality}.${Nf.format}`}const Df={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#964B00",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8B4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Lf(kf,Nf=1){let Yf,Gf=kf[0]==="#"?kf:Df[kf.toLowerCase()];if(Gf.length===4){let rp=Gf.slice(1,2),ip=Gf.slice(2,3),ap=Gf.slice(3,4);rp=parseInt(rp+rp,16),ip=parseInt(ip+ip,16),ap=parseInt(ap+ap,16),Yf=`rgba(${rp}, ${ip}, ${ap}, ${Nf})`}else{const rp=parseInt(Gf.slice(1,3),16),ip=parseInt(Gf.slice(3,5),16),ap=parseInt(Gf.slice(5,7),16);Yf=`rgba(${rp}, ${ip}, ${ap}, ${Nf})`}return Yf}return(kf,Nf)=>(openBlock(),createElementBlock("div",{class:"header",ref_key:"root",ref:K},[uo.value?(openBlock(),createElementBlock("div",{key:0,class:"background",ref_key:"background",ref:tt},null,512)):createCommentVNode("",!0),createBaseVNode("div",{class:"navbar",ref_key:"navbar",ref:rt,style:normalizeStyle({color:lf.value})},[po.value?(openBlock(),createElementBlock("div",_hoisted_1$i,[createBaseVNode("a",{href:`${ut.value.baseurl||""}/`},[createBaseVNode("img",{src:po.value,class:normalizeClass(`${mo.value?"icon-"+mo.value:""}`),alt:"logo"},null,10,_hoisted_3$d)],8,_hoisted_2$f)])):createCommentVNode("",!0),createBaseVNode("div",_hoisted_4$c,[yn.value?(openBlock(),createElementBlock("div",_hoisted_5$a,[createBaseVNode("a",{href:`${ut.value.baseurl||""}/`,innerHTML:yn.value},null,8,_hoisted_6$9)])):createCommentVNode("",!0),F.subtitle?(openBlock(),createElementBlock("div",{key:1,class:"subtitle clamp1",innerHTML:F.subtitle},null,8,_hoisted_7$7)):createCommentVNode("",!0)]),createBaseVNode("div",_hoisted_8$6,[W.searchDomain?(openBlock(),createElementBlock("ve-site-search",{key:0,"search-domain":W.searchDomain,"search-cx":W.searchCx,"search-key":W.searchKey},null,8,_hoisted_9$7)):createCommentVNode("",!0),ot.value!==void 0||_f.value?(openBlock(),createElementBlock("ve-menu",{key:1,auth:_f.value,contact:yf.value,"pdf-download-enabled":vf.value?"":null,innerHTML:ot.value},null,8,_hoisted_10$7)):createCommentVNode("",!0)])],4),cf.value?(openBlock(),createElementBlock("ve-breadcrumbs",_hoisted_11$7)):createCommentVNode("",!0),xf.value&&!F.noManifestPopover?(openBlock(),createElementBlock("ve-manifest-popup",{key:2,manifest:xf.value},null,8,_hoisted_12$7)):createCommentVNode("",!0)],512))}}),_style_0$i=`:host{display:block}.header{display:grid;grid-template-rows:1fr 100px auto;grid-template-columns:1fr}.background{grid-area:1 / 1 / 3 / 2;background-repeat:no-repeat;background-size:cover;background-position:center;z-index:1;position:relative}.navbar{grid-area:2 / 1 / 3 / 2;background-color:#0006;color:#fff;z-index:2;display:flex;align-items:center;gap:1.5em;padding:0 20px}ve-manifest-popup{visibility:hidden;position:absolute;top:1em;right:1em;z-index:10}.header:hover ve-manifest-popup{visibility:visible;transition:all .5s ease-in}ve-breadcrumbs{grid-area:3 / 1 / 4 / 2;background-color:#fff;color:#000;z-index:1}.branding{display:flex;flex-direction:column;gap:6px}.title a{font-size:2em;line-height:1;font-weight:500;text-decoration:none;color:inherit}.subtitle{font-size:1.5em;line-height:1;font-weight:300}.logo{display:flex;align-items:center;justify-content:center;height:50%}.logo a{height:100%}.logo img{-o-object-fit:contain;object-fit:contain;vertical-align:middle;height:100%}.search-and-menu{margin-left:auto;display:flex;align-items:center;gap:1em}.clamp1{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}@media only screen and (max-width: 768px){.navbar{gap:.75em;padding:0 1em}.title a{font-size:1.3em}.subtitle{font-size:1em}.logo img{max-width:40px}ve-breadcrumbs{padding-left:.5rem}}.icon-white{filter:invert(100%) sepia(0%) saturate(7487%) hue-rotate(339deg) brightness(115%) contrast(100%)} `,Header=_export_sfc(_sfc_main$k,[["styles",[_style_0$i]]]),_hoisted_1$h=["allow","allowfullscreen","allowtransparency","frameborder","height","loading","mozallowfullscreen","msallowfullscreen","name","referrerpolicy","src","webkitallowfullscreen","width"],_hoisted_2$e=["innerHTML"],_sfc_main$j=defineComponent({__name:"IFrame.ce",props:{allow:{type:String},allowfullscreen:{type:Boolean},allowpaymentrequest:{type:Boolean},allowtransparency:{type:Boolean,default:!0},caption:{type:String},frameborder:{type:Number,default:0},height:{type:Number},loading:{type:String,default:"eager"},name:{type:String},referrerpolicy:{type:String},sandbox:{type:String},src:{type:String},srcdoc:{type:String},width:{type:Number}},setup(F){var po,mo,wo;const W=F;watch$1(W,()=>{yn()});const q=ref(null),K=computed(()=>{var lf,yf;return(yf=(lf=q.value)==null?void 0:lf.getRootNode())==null?void 0:yf.host});watch$1(K,lf=>{new ResizeObserver(()=>yn()).observe(lf)});const X=ref(null),tt=ref(W.width||((po=K.value)==null?void 0:po.style.width)&&K.value.clientWidth),rt=ref(W.height||((mo=K.value)==null?void 0:mo.style.height)&&K.value.clientHeight),ot=ref(tt.value||((wo=K.value)==null?void 0:wo.clientWidth)),ut=ref(rt.value||ot.value);function yn(){tt.value=W.width||K.value.style.width&&K.value.clientWidth,rt.value=W.height||K.value.style.height&&K.value.clientHeight,ot.value=tt.value||K.value.clientWidth,ut.value=rt.value||ot.value}function uo(lf){return lf?marked.parse(lf).slice(3,-5):""}return(lf,yf)=>{var cf;return openBlock(),createElementBlock("div",{ref_key:"main",ref:q,class:"main"},[createBaseVNode("iframe",{ref:"iframeEl",allow:F.allow,allowfullscreen:F.allowfullscreen,allowtransparency:F.allowtransparency,frameborder:F.frameborder,height:ut.value-(((cf=X.value)==null?void 0:cf.clientHeight)||0),loading:F.loading,mozallowfullscreen:F.allowfullscreen,msallowfullscreen:F.allowfullscreen,name:F.name,referrerpolicy:F.referrerpolicy,src:F.src,webkitallowfullscreen:F.allowfullscreen,width:ot.value},null,8,_hoisted_1$h),F.caption?(openBlock(),createElementBlock("div",{key:0,ref_key:"captionEl",ref:X,class:"caption",innerHTML:uo(F.caption)},null,8,_hoisted_2$e)):createCommentVNode("",!0)],512)}}}),_style_0$h=`*{box-sizing:border-box}:host{display:block;width:100%;height:100%;margin:0;padding:0}.main{display:flex;flex-direction:column;background-color:#fff;width:100%!important}.caption{padding:.3em;width:100%;font-size:1em;font-weight:500;text-align:left;line-height:1.3;margin-bottom:.3em} `,IFrame=_export_sfc(_sfc_main$j,[["styles",[_style_0$h]]]);var openseadragon={exports:{}},hasRequiredOpenseadragon;function requireOpenseadragon(){return hasRequiredOpenseadragon||(hasRequiredOpenseadragon=1,function(module){//! openseadragon 2.4.2 //! Built on 2020-03-05 @@ -3441,7 +3441,7 @@ Please report this to https://github.com/markedjs/marked.`,W){const tt="

An er //! http://openseadragon.github.io //! License: http://openseadragon.github.io/license/ function OpenSeadragon(F){return new OpenSeadragon.Viewer(F)}(function(F){F.version={versionStr:"2.4.2",major:parseInt("2",10),minor:parseInt("4",10),revision:parseInt("2",10)};var W={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},q=Object.prototype.toString,K=Object.prototype.hasOwnProperty;F.isFunction=function(X){return F.type(X)==="function"},F.isArray=Array.isArray||function(X){return F.type(X)==="array"},F.isWindow=function(X){return X&&typeof X=="object"&&"setInterval"in X},F.type=function(X){return X==null?String(X):W[q.call(X)]||"object"},F.isPlainObject=function(X){if(!X||OpenSeadragon.type(X)!=="object"||X.nodeType||F.isWindow(X)||X.constructor&&!K.call(X,"constructor")&&!K.call(X.constructor.prototype,"isPrototypeOf"))return!1;var tt;for(var rt in X)tt=rt;return tt===void 0||K.call(X,tt)},F.isEmptyObject=function(X){for(var tt in X)return!1;return!0},F.freezeObject=function(X){return Object.freeze?F.freezeObject=Object.freeze:F.freezeObject=function(tt){return tt},F.freezeObject(X)},F.supportsCanvas=function(){var X=document.createElement("canvas");return!!(F.isFunction(X.getContext)&&X.getContext("2d"))}(),F.isCanvasTainted=function(X){var tt=!1;try{X.getContext("2d").getImageData(0,0,1,1)}catch{tt=!0}return tt},F.pixelDensityRatio=function(){if(F.supportsCanvas){var X=document.createElement("canvas").getContext("2d"),tt=window.devicePixelRatio||1,rt=X.webkitBackingStorePixelRatio||X.mozBackingStorePixelRatio||X.msBackingStorePixelRatio||X.oBackingStorePixelRatio||X.backingStorePixelRatio||1;return Math.max(tt,1)/rt}else return 1}()})(OpenSeadragon),function($){$.extend=function(){var F,W,q,K,X,tt,rt=arguments[0]||{},ot=arguments.length,ut=!1,yn=1;for(typeof rt=="boolean"&&(ut=rt,rt=arguments[1]||{},yn=2),typeof rt!="object"&&!OpenSeadragon.isFunction(rt)&&(rt={}),ot===yn&&(rt=this,--yn);yn=q.x&&W.x=q.y},getEvent:function(F){return F?$.getEvent=function(W){return W}:$.getEvent=function(){return window.event},$.getEvent(F)},getMousePosition:function(F){if(typeof F.pageX=="number")$.getMousePosition=function(W){var q=new $.Point;return W=$.getEvent(W),q.x=W.pageX,q.y=W.pageY,q};else if(typeof F.clientX=="number")$.getMousePosition=function(W){var q=new $.Point;return W=$.getEvent(W),q.x=W.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,q.y=W.clientY+document.body.scrollTop+document.documentElement.scrollTop,q};else throw new Error("Unknown event mouse position, no known technique.");return $.getMousePosition(F)},getPageScroll:function(){var F=document.documentElement||{},W=document.body||{};if(typeof window.pageXOffset=="number")$.getPageScroll=function(){return new $.Point(window.pageXOffset,window.pageYOffset)};else if(W.scrollLeft||W.scrollTop)$.getPageScroll=function(){return new $.Point(document.body.scrollLeft,document.body.scrollTop)};else if(F.scrollLeft||F.scrollTop)$.getPageScroll=function(){return new $.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)};else return new $.Point(0,0);return $.getPageScroll()},setPageScroll:function(F){if(typeof window.scrollTo<"u")$.setPageScroll=function(K){window.scrollTo(K.x,K.y)};else{var W=$.getPageScroll();if(W.x===F.x&&W.y===F.y)return;document.body.scrollLeft=F.x,document.body.scrollTop=F.y;var q=$.getPageScroll();if(q.x!==W.x&&q.y!==W.y){$.setPageScroll=function(K){document.body.scrollLeft=K.x,document.body.scrollTop=K.y};return}if(document.documentElement.scrollLeft=F.x,document.documentElement.scrollTop=F.y,q=$.getPageScroll(),q.x!==W.x&&q.y!==W.y){$.setPageScroll=function(K){document.documentElement.scrollLeft=K.x,document.documentElement.scrollTop=K.y};return}$.setPageScroll=function(K){}}return $.setPageScroll(F)},getWindowSize:function(){var F=document.documentElement||{},W=document.body||{};if(typeof window.innerWidth=="number")$.getWindowSize=function(){return new $.Point(window.innerWidth,window.innerHeight)};else if(F.clientWidth||F.clientHeight)$.getWindowSize=function(){return new $.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else if(W.clientWidth||W.clientHeight)$.getWindowSize=function(){return new $.Point(document.body.clientWidth,document.body.clientHeight)};else throw new Error("Unknown window size, no known technique.");return $.getWindowSize()},makeCenteredNode:function(F){F=$.getElement(F);var W=[$.makeNeutralElement("div"),$.makeNeutralElement("div"),$.makeNeutralElement("div")];return $.extend(W[0].style,{display:"table",height:"100%",width:"100%"}),$.extend(W[1].style,{display:"table-row"}),$.extend(W[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),W[0].appendChild(W[1]),W[1].appendChild(W[2]),W[2].appendChild(F),W[0]},makeNeutralElement:function(F){var W=document.createElement(F),q=W.style;return q.background="transparent none",q.border="none",q.margin="0px",q.padding="0px",q.position="static",W},now:function(){return Date.now?$.now=Date.now:$.now=function(){return new Date().getTime()},$.now()},makeTransparentImage:function(F){return $.makeTransparentImage=function(W){var q=$.makeNeutralElement("img");return q.src=W,q},$.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<7&&($.makeTransparentImage=function(W){var q=$.makeNeutralElement("img"),K=null;return K=$.makeNeutralElement("span"),K.style.display="inline-block",q.onload=function(){K.style.width=K.style.width||q.width+"px",K.style.height=K.style.height||q.height+"px",q.onload=null,q=null},q.src=W,K.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+W+"', sizingMethod='scale')",K}),$.makeTransparentImage(F)},setElementOpacity:function(F,W,q){var K,X;F=$.getElement(F),q&&!$.Browser.alpha&&(W=Math.round(W)),$.Browser.opacity?F.style.opacity=W<1?W:"":W<1?(K=Math.round(100*W),X="alpha(opacity="+K+")",F.style.filter=X):F.style.filter=""},setElementTouchActionNone:function(F){F=$.getElement(F),typeof F.style.touchAction<"u"?F.style.touchAction="none":typeof F.style.msTouchAction<"u"&&(F.style.msTouchAction="none")},addClass:function(F,W){F=$.getElement(F),F.className?(" "+F.className+" ").indexOf(" "+W+" ")===-1&&(F.className+=" "+W):F.className=W},indexOf:function(F,W,q){return Array.prototype.indexOf?this.indexOf=function(K,X,tt){return K.indexOf(X,tt)}:this.indexOf=function(K,X,tt){var rt,ot=tt||0,ut;if(!K)throw new TypeError;if(ut=K.length,ut===0||ot>=ut)return-1;for(ot<0&&(ot=ut-Math.abs(ot)),rt=ot;rt=200&&ot.status<300||ot.status===0&&rt!=="http:"&&rt!=="https:"?W(ot):($.console.log("AJAX request returned %d: %s",ot.status,F),$.isFunction(q)&&q(ot)))};try{if(ot.open("GET",F,!0),tt&&(ot.responseType=tt),X)for(var ut in X)Object.prototype.hasOwnProperty.call(X,ut)&&X[ut]&&ot.setRequestHeader(ut,X[ut]);K&&(ot.withCredentials=!0),ot.send(null)}catch(mo){var yn=mo.message,uo=$.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<10;if(uo&&typeof mo.number<"u"&&mo.number==-2147024891&&(yn+=` -See http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx#xdomain`),$.console.log("%s while making AJAX request: %s",mo.name,yn),ot.onreadystatechange=function(){},window.XDomainRequest){var po=new window.XDomainRequest;if(po){po.onload=function(wo){$.isFunction(W)&&W({responseText:po.responseText,status:200,statusText:"OK"})},po.onerror=function(wo){$.isFunction(q)&&q({responseText:po.responseText,status:444,statusText:"An error happened. Due to an XDomainRequest deficiency we can not extract any information about this error. Upgrade your browser."})};try{po.open("GET",F),po.send()}catch{$.isFunction(q)&&q(ot,mo)}}}else $.isFunction(q)&&q(ot,mo)}return ot},jsonp:function(F){var W,q=F.url,K=document.head||document.getElementsByTagName("head")[0]||document.documentElement,X=F.callbackName||"openseadragon"+$.now(),tt=window[X],rt="$1"+X+"$2",ot=F.param||"callback",ut=F.callback;q=q.replace(/(\=)\?(&|$)|\?\?/i,rt),q+=(/\?/.test(q)?"&":"?")+ot+"="+X,window[X]=function(yn){if(tt)window[X]=tt;else try{delete window[X]}catch{}ut&&$.isFunction(ut)&&ut(yn)},W=document.createElement("script"),(F.async!==void 0||F.async!==!1)&&(W.async="async"),F.scriptCharset&&(W.charset=F.scriptCharset),W.src=q,W.onload=W.onreadystatechange=function(yn,uo){(uo||!W.readyState||/loaded|complete/.test(W.readyState))&&(W.onload=W.onreadystatechange=null,K&&W.parentNode&&K.removeChild(W),W=void 0)},K.insertBefore(W,K.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(F){if(window.DOMParser)$.parseXml=function(W){var q=null,K;return K=new DOMParser,q=K.parseFromString(W,"text/xml"),q};else if(window.ActiveXObject)$.parseXml=function(W){var q=null;return q=new ActiveXObject("Microsoft.XMLDOM"),q.async=!1,q.loadXML(W),q};else throw new Error("Browser doesn't support XML DOM.");return $.parseXml(F)},parseJSON:function(string){return window.JSON&&window.JSON.parse?$.parseJSON=window.JSON.parse:$.parseJSON=function(string){return eval("("+string+")")},$.parseJSON(string)},imageFormatSupported:function(F){return F=F||"",!!FILEFORMATS[F.toLowerCase()]}});var nullfunction=function(F){};$.console=window.console||{log:nullfunction,debug:nullfunction,info:nullfunction,warn:nullfunction,error:nullfunction,assert:nullfunction},$.Browser={vendor:$.BROWSERS.UNKNOWN,version:0,alpha:!0};var FILEFORMATS={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},URLPARAMS={};(function(){var F=navigator.appVersion,W=navigator.userAgent,q;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(W.substring(W.indexOf("MSIE")+5,W.indexOf(";",W.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(W.indexOf("Firefox")>=0?($.Browser.vendor=$.BROWSERS.FIREFOX,$.Browser.version=parseFloat(W.substring(W.indexOf("Firefox")+8))):W.indexOf("Safari")>=0?($.Browser.vendor=W.indexOf("Chrome")>=0?$.BROWSERS.CHROME:$.BROWSERS.SAFARI,$.Browser.version=parseFloat(W.substring(W.substring(0,W.indexOf("Safari")).lastIndexOf("/")+1,W.indexOf("Safari")))):(q=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),q.exec(W)!==null&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(RegExp.$1))));break;case"Opera":$.Browser.vendor=$.BROWSERS.OPERA,$.Browser.version=parseFloat(F);break}var K=window.location.search.substring(1),X=K.split("&"),tt,rt,ot;for(ot=0;ot0){var ut=tt.substring(0,rt),yn=tt.substring(rt+1);try{URLPARAMS[ut]=decodeURIComponent(yn)}catch{$.console.error("Ignoring malformed URL parameter: %s=%s",ut,yn)}}$.Browser.alpha=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9||$.Browser.vendor==$.BROWSERS.CHROME&&$.Browser.version<2),$.Browser.opacity=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9)})(),function(F){var W=F.requestAnimationFrame||F.mozRequestAnimationFrame||F.webkitRequestAnimationFrame||F.msRequestAnimationFrame,q=F.cancelAnimationFrame||F.mozCancelAnimationFrame||F.webkitCancelAnimationFrame||F.msCancelAnimationFrame;if(W&&q)$.requestAnimationFrame=function(){return W.apply(F,arguments)},$.cancelAnimationFrame=function(){return q.apply(F,arguments)};else{var K=[],X=[],tt=0,rt;$.requestAnimationFrame=function(ot){return K.push([++tt,ot]),rt||(rt=setInterval(function(){if(K.length){var ut=$.now(),yn=X;for(X=K,K=yn;X.length;)X.shift()[1](ut)}else clearInterval(rt),rt=void 0},1e3/50)),tt},$.cancelAnimationFrame=function(ot){var ut,yn;for(ut=0,yn=K.length;ut8||"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",F.MouseTracker.supportsMouseCapture=function(){var Kf=document.createElement("div");return F.isFunction(Kf.setCapture)&&F.isFunction(Kf.releaseCapture)}(),F.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur",F.MouseTracker.wheelEventName],F.MouseTracker.wheelEventName=="DOMMouseScroll"&&F.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent&&(window.navigator.pointerEnabled||F.Browser.vendor!==F.BROWSERS.IE)?(F.MouseTracker.havePointerEvents=!0,F.MouseTracker.subscribeEvents.push("pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),F.MouseTracker.unprefixedPointerEvents=!0,navigator.maxTouchPoints?F.MouseTracker.maxTouchPoints=navigator.maxTouchPoints:F.MouseTracker.maxTouchPoints=0,F.MouseTracker.haveMouseEnter=!1):window.MSPointerEvent&&window.navigator.msPointerEnabled?(F.MouseTracker.havePointerEvents=!0,F.MouseTracker.subscribeEvents.push("MSPointerOver","MSPointerOut","MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"),F.MouseTracker.unprefixedPointerEvents=!1,navigator.msMaxTouchPoints?F.MouseTracker.maxTouchPoints=navigator.msMaxTouchPoints:F.MouseTracker.maxTouchPoints=0,F.MouseTracker.haveMouseEnter=!1):(F.MouseTracker.havePointerEvents=!1,F.Browser.vendor===F.BROWSERS.IE&&F.Browser.version<9?(F.MouseTracker.subscribeEvents.push("mouseenter","mouseleave"),F.MouseTracker.haveMouseEnter=!0):(F.MouseTracker.subscribeEvents.push("mouseover","mouseout"),F.MouseTracker.haveMouseEnter=!1),F.MouseTracker.subscribeEvents.push("mousedown","mouseup","mousemove"),"ontouchstart"in window&&F.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&F.MouseTracker.subscribeEvents.push("gesturestart","gesturechange"),F.MouseTracker.mousePointerId="legacy-mouse",F.MouseTracker.maxTouchPoints=10),F.MouseTracker.GesturePointList=function(Kf){this._gPoints=[],this.type=Kf,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},F.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(Kf){return this._gPoints.push(Kf)},removeById:function(Kf){var Xf,gp=this._gPoints.length;for(Xf=0;Xf1&&(this.type==="mouse"||this.type==="pen")&&(this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};function K(Kf){var Xf=q[Kf.hash],gp,wp=Xf.activePointersLists.length;for(gp=0;gp0&&(F.removeEvent(F.MouseTracker.captureElement,"mousemove",Xf.mousemovecaptured,!0),F.removeEvent(F.MouseTracker.captureElement,"mouseup",Xf.mouseupcaptured,!0),F.removeEvent(F.MouseTracker.captureElement,F.MouseTracker.unprefixedPointerEvents?"pointermove":"MSPointerMove",Xf.pointermovecaptured,!0),F.removeEvent(F.MouseTracker.captureElement,F.MouseTracker.unprefixedPointerEvents?"pointerup":"MSPointerUp",Xf.pointerupcaptured,!0),F.removeEvent(F.MouseTracker.captureElement,"touchmove",Xf.touchmovecaptured,!0),F.removeEvent(F.MouseTracker.captureElement,"touchend",Xf.touchendcaptured,!0),Xf.activePointersLists[gp].captureCount=0);for(gp=0;gp0){for(wp=0;wp0&&(lm(Kf,Xf,mg,0),gp.captureCount=1,ut(Kf,gp.type),kg(Kf,Xf,mg))}}function Jp(Kf,Xf){var gp,wp,dg,mg=Xf.changedTouches.length,pg=[],wg,Cg=Kf.getActivePointersListByType("touch");for(gp=F.now(),Cg.getLength()>Xf.touches.length-mg&&(F.console.warn("Tracked touch contact count doesn't match event.touches.length. Removing all tracked touch pointers."),Ip(Kf,Xf,Cg)),wp=0;wp"u")return Ip(Kf,Xf,mg),!1;for(Bg=0;Bg"u"?!0:q.attachToViewer,this.autoFade=typeof q.autoFade>"u"?!0:q.autoFade,this.element=W,this.anchor=q.anchor,this.container=K,this.anchor==F.ControlAnchor.ABSOLUTE?(this.wrapper=F.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top=typeof q.top=="number"?q.top+"px":q.top,this.wrapper.style.left=typeof q.left=="number"?q.left+"px":q.left,this.wrapper.style.height=typeof q.height=="number"?q.height+"px":q.height,this.wrapper.style.width=typeof q.width=="number"?q.width+"px":q.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=F.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor==F.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),q.attachToViewer?this.anchor==F.ControlAnchor.TOP_RIGHT||this.anchor==F.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):X.appendChild(this.wrapper)},F.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.container.removeChild(this.wrapper)},isVisible:function(){return this.wrapper.style.display!="none"},setVisible:function(W){this.wrapper.style.display=W?this.anchor==F.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(W){this.element[F.SIGNAL]&&F.Browser.vendor==F.BROWSERS.IE?F.setElementOpacity(this.element,W,!0):F.setElementOpacity(this.wrapper,W,!0)}}}(OpenSeadragon),function(F){F.ControlDock=function(q){var K=["topleft","topright","bottomright","bottomleft"],X,tt;for(F.extend(!0,this,{id:"controldock-"+F.now()+"-"+Math.floor(Math.random()*1e6),container:F.makeNeutralElement("div"),controls:[]},q),this.container.onsubmit=function(){return!1},this.element&&(this.element=F.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),tt=0;tt=0)){switch(K.anchor){case F.ControlAnchor.TOP_RIGHT:X=this.controls.topright,q.style.position="relative",q.style.paddingRight="0px",q.style.paddingTop="0px";break;case F.ControlAnchor.BOTTOM_RIGHT:X=this.controls.bottomright,q.style.position="relative",q.style.paddingRight="0px",q.style.paddingBottom="0px";break;case F.ControlAnchor.BOTTOM_LEFT:X=this.controls.bottomleft,q.style.position="relative",q.style.paddingLeft="0px",q.style.paddingBottom="0px";break;case F.ControlAnchor.TOP_LEFT:X=this.controls.topleft,q.style.position="relative",q.style.paddingLeft="0px",q.style.paddingTop="0px";break;case F.ControlAnchor.ABSOLUTE:X=this.container,q.style.margin="0px",q.style.padding="0px";break;default:case F.ControlAnchor.NONE:X=this.container,q.style.margin="0px",q.style.padding="0px";break}this.controls.push(new F.Control(q,K,X)),q.style.display="inline-block"}},removeControl:function(q){q=F.getElement(q);var K=W(this,q);return K>=0&&(this.controls[K].destroy(),this.controls.splice(K,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var q;for(q=this.controls.length-1;q>=0;q--)if(this.controls[q].isVisible())return!0;return!1},setControlsEnabled:function(q){var K;for(K=this.controls.length-1;K>=0;K--)this.controls[K].setVisible(q);return this}};function W(q,K){var X=q.controls,tt;for(tt=X.length-1;tt>=0;tt--)if(X[tt].element==K)return tt;return-1}}(OpenSeadragon),function(F){F.Placement=F.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(OpenSeadragon),function(F){var W={},q=1;F.Viewer=function(Of){var qf=arguments,cp=this,hp;if(F.isPlainObject(Of)||(Of={id:qf[0],xmlPath:qf.length>1?qf[1]:void 0,prefixUrl:qf.length>2?qf[2]:void 0,controls:qf.length>3?qf[3]:void 0,overlays:qf.length>4?qf[4]:void 0}),Of.config&&(F.extend(!0,Of,Of.config),delete Of.config),F.extend(!0,this,{id:Of.id,hash:Of.hash||q++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttons:null,profiler:null},F.DEFAULT_SETTINGS,Of),typeof this.hash>"u")throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(typeof W[this.hash]<"u"&&F.console.warn("Hash "+this.hash+" has already been used."),W[this.hash]={fsBoundsDelta:new F.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._lastScrollTime=F.now(),F.EventSource.call(this),this.addHandler("open-failed",function($p){var Vp=F.getString("Errors.OpenFailed",$p.eventSource,$p.message);cp._showMessage(Vp)}),F.ControlDock.call(this,Of),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=F.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",function($p){$p.width="100%",$p.height="100%",$p.overflow="hidden",$p.position="absolute",$p.top="0px",$p.left="0px"}(this.canvas.style),F.setElementTouchActionNone(this.canvas),Of.tabIndex!==""&&(this.canvas.tabIndex=Of.tabIndex===void 0?0:Of.tabIndex),this.container.className="openseadragon-container",function($p){$p.width="100%",$p.height="100%",$p.position="relative",$p.overflow="hidden",$p.left="0px",$p.top="0px",$p.textAlign="left"}(this.container.style),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new F.MouseTracker({element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,keyDownHandler:F.delegate(this,lf),keyHandler:F.delegate(this,yf),clickHandler:F.delegate(this,cf),dblClickHandler:F.delegate(this,vf),dragHandler:F.delegate(this,_f),dragEndHandler:F.delegate(this,$f),enterHandler:F.delegate(this,wf),exitHandler:F.delegate(this,Pf),pressHandler:F.delegate(this,Cf),releaseHandler:F.delegate(this,Af),nonPrimaryPressHandler:F.delegate(this,Bf),nonPrimaryReleaseHandler:F.delegate(this,Hf),scrollHandler:F.delegate(this,Lf),pinchHandler:F.delegate(this,Df)}),this.outerTracker=new F.MouseTracker({element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:F.delegate(this,kf),exitHandler:F.delegate(this,Nf)}),this.toolbar&&(this.toolbar=new F.ControlDock({element:this.toolbar})),this.bindStandardControls(),W[this.hash].prevContainerSize=K(this.container),this.world=new F.World({viewer:this}),this.world.addHandler("add-item",function($p){cp.source=cp.world.getItemAt(0).source,W[cp.hash].forceRedraw=!0,cp._updateRequestId||(cp._updateRequestId=ot(cp,Yf))}),this.world.addHandler("remove-item",function($p){cp.world.getItemCount()?cp.source=cp.world.getItemAt(0).source:cp.source=null,W[cp.hash].forceRedraw=!0}),this.world.addHandler("metrics-change",function($p){cp.viewport&&cp.viewport._setContentBounds(cp.world.getHomeBounds(),cp.world.getContentFactor())}),this.world.addHandler("item-index-change",function($p){cp.source=cp.world.getItemAt(0).source}),this.viewport=new F.Viewport({containerSize:W[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new F.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:Of.timeout}),this.tileCache=new F.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new F.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=F.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(hp=this.buttons.buttons.indexOf(this.rotateLeft),this.buttons.buttons.splice(hp,1),this.buttons.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(hp=this.buttons.buttons.indexOf(this.rotateRight),this.buttons.buttons.splice(hp,1),this.buttons.element.removeChild(this.rotateRight.element))),this.showNavigator&&(this.navigator=new F.Navigator({id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),hp=0;hp-1&&Of.index=0&&Of=0)return this;var Vp=tt(this,$p);return this.currentOverlays.push(Vp),Vp.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:Of,location:$p.location,placement:$p.placement}),this},updateOverlay:function(Of,qf,cp){var hp;return Of=F.getElement(Of),hp=rt(this.currentOverlays,Of),hp>=0&&(this.currentOverlays[hp].update(qf,cp),W[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:Of,location:qf,placement:cp})),this},removeOverlay:function(Of){var qf;return Of=F.getElement(Of),qf=rt(this.currentOverlays,Of),qf>=0&&(this.currentOverlays[qf].destroy(),this.currentOverlays.splice(qf,1),W[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:Of})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return W[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(Of){var qf;return Of=F.getElement(Of),qf=rt(this.currentOverlays,Of),qf>=0?this.currentOverlays[qf]:null},_updateSequenceButtons:function(Of){this.nextButton&&(!this.tileSources||this.tileSources.length-1===Of?this.navPrevNextWrap||this.nextButton.disable():this.nextButton.enable()),this.previousButton&&(Of>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(Of){this._hideMessage();var qf=F.makeNeutralElement("div");qf.appendChild(document.createTextNode(Of)),this.messageDiv=F.makeCenteredNode(qf),F.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var Of=this.messageDiv;Of&&(Of.parentNode.removeChild(Of),delete this.messageDiv)},gestureSettingsByDeviceType:function(Of){switch(Of){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var Of,qf=this.currentOverlays.length;for(Of=0;Of1&&(this.referenceStrip=new F.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,useCanvas:this.useCanvas,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else F.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')}});function K(Of){return Of=F.getElement(Of),new F.Point(Of.clientWidth===0?1:Of.clientWidth,Of.clientHeight===0?1:Of.clientHeight)}function X(Of,qf,cp,hp,$p){var Vp=Of;if(F.type(qf)=="string"){if(qf.match(/^\s*<.*>\s*$/))qf=F.parseXml(qf);else if(qf.match(/^\s*[\{\[].*[\}\]]\s*$/))try{var bp=F.parseJSON(qf);qf=bp}catch{}}function Ep(_p,Mp){_p.ready?hp(_p):(_p.addHandler("ready",function(){hp(_p)}),_p.addHandler("open-failed",function(Yp){$p({message:Yp.message,source:Mp})}))}setTimeout(function(){if(F.type(qf)=="string")qf=new F.TileSource({url:qf,crossOriginPolicy:cp.crossOriginPolicy!==void 0?cp.crossOriginPolicy:Of.crossOriginPolicy,ajaxWithCredentials:Of.ajaxWithCredentials,ajaxHeaders:Of.ajaxHeaders,useCanvas:Of.useCanvas,success:function(ug){hp(ug.tileSource)}}),qf.addHandler("open-failed",function(ug){$p(ug)});else if(F.isPlainObject(qf)||qf.nodeType)if(qf.crossOriginPolicy===void 0&&(cp.crossOriginPolicy!==void 0||Of.crossOriginPolicy!==void 0)&&(qf.crossOriginPolicy=cp.crossOriginPolicy!==void 0?cp.crossOriginPolicy:Of.crossOriginPolicy),qf.ajaxWithCredentials===void 0&&(qf.ajaxWithCredentials=Of.ajaxWithCredentials),qf.useCanvas===void 0&&(qf.useCanvas=Of.useCanvas),F.isFunction(qf.getTileUrl)){var _p=new F.TileSource(qf);_p.getTileUrl=qf.getTileUrl,hp(_p)}else{var Mp=F.TileSource.determineType(Vp,qf);if(!Mp){$p({message:"Unable to load TileSource",source:qf});return}var Yp=Mp.prototype.configure.apply(Vp,[qf]);Ep(new Mp(Yp),qf)}else Ep(qf,qf)})}function tt(Of,qf){if(qf instanceof F.Overlay)return qf;var cp=null;if(qf.element)cp=F.getElement(qf.element);else{var hp=qf.id?qf.id:"openseadragon-overlay-"+Math.floor(Math.random()*1e7);cp=F.getElement(qf.id),cp||(cp=document.createElement("a"),cp.href="#/overlay/"+hp),cp.id=hp,F.addClass(cp,qf.className?qf.className:"openseadragon-overlay")}var $p=qf.location,Vp=qf.width,bp=qf.height;if(!$p){var Ep=qf.x,_p=qf.y;if(qf.px!==void 0){var Mp=Of.viewport.imageToViewportRectangle(new F.Rect(qf.px,qf.py,Vp||0,bp||0));Ep=Mp.x,_p=Mp.y,Vp=Vp!==void 0?Mp.width:void 0,bp=bp!==void 0?Mp.height:void 0}$p=new F.Point(Ep,_p)}var Yp=qf.placement;return Yp&&F.type(Yp)==="string"&&(Yp=F.Placement[qf.placement.toUpperCase()]),new F.Overlay({element:cp,location:$p,placement:Yp,onDraw:qf.onDraw,checkResize:qf.checkResize,width:Vp,height:bp,rotationMode:qf.rotationMode})}function rt(Of,qf){var cp;for(cp=Of.length-1;cp>=0;cp--)if(Of[cp].element===qf)return cp;return-1}function ot(Of,qf){return F.requestAnimationFrame(function(){qf(Of)})}function ut(Of){F.requestAnimationFrame(function(){uo(Of)})}function yn(Of){Of.autoHideControls&&(Of.controlsShouldFade=!0,Of.controlsFadeBeginTime=F.now()+Of.controlsFadeDelay,window.setTimeout(function(){ut(Of)},Of.controlsFadeDelay))}function uo(Of){var qf,cp,hp,$p;if(Of.controlsShouldFade){for(qf=F.now(),cp=qf-Of.controlsFadeBeginTime,hp=1-cp/Of.controlsFadeLength,hp=Math.min(1,hp),hp=Math.max(0,hp),$p=Of.controls.length-1;$p>=0;$p--)Of.controls[$p].autoFade&&Of.controls[$p].setOpacity(hp);hp>0&&ut(Of)}}function po(Of){var qf;for(Of.controlsShouldFade=!1,qf=Of.controls.length-1;qf>=0;qf--)Of.controls[qf].setOpacity(1)}function mo(){po(this)}function wo(){yn(this)}function lf(Of){var qf={originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction,preventVerticalPan:Of.preventVerticalPan,preventHorizontalPan:Of.preventHorizontalPan};if(this.raiseEvent("canvas-key",qf),!qf.preventDefaultAction&&!Of.ctrl&&!Of.alt&&!Of.meta)switch(Of.keyCode){case 38:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 40:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 37:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;case 39:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;default:return!0}else return!0}function yf(Of){var qf={originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction,preventVerticalPan:Of.preventVerticalPan,preventHorizontalPan:Of.preventHorizontalPan};if(this.raiseEvent("canvas-key",qf),!qf.preventDefaultAction&&!Of.ctrl&&!Of.alt&&!Of.meta)switch(Of.keyCode){case 43:case 61:return this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),!1;case 45:return this.viewport.zoomBy(.9),this.viewport.applyConstraints(),!1;case 48:return this.viewport.goHome(),this.viewport.applyConstraints(),!1;case 119:case 87:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,-40))),this.viewport.applyConstraints()),!1;case 115:case 83:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,40))),this.viewport.applyConstraints()),!1;case 97:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(-40,0))),this.viewport.applyConstraints()),!1;case 100:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(40,0))),this.viewport.applyConstraints()),!1;case 114:return this.viewport.flipped?this.viewport.setRotation(F.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)):this.viewport.setRotation(F.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)),this.viewport.applyConstraints(),!1;case 82:return this.viewport.flipped?this.viewport.setRotation(F.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)):this.viewport.setRotation(F.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)),this.viewport.applyConstraints(),!1;case 102:return this.viewport.toggleFlip(),!1;default:return!0}else return!0}function cf(Of){var qf,cp=document.activeElement==this.canvas;cp||this.canvas.focus(),this.viewport.flipped&&(Of.position.x=this.viewport.getContainerSize().x-Of.position.x);var hp={tracker:Of.eventSource,position:Of.position,quick:Of.quick,shift:Of.shift,originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction};this.raiseEvent("canvas-click",hp),!hp.preventDefaultAction&&this.viewport&&Of.quick&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.clickToZoom&&(this.viewport.zoomBy(Of.shift?1/this.zoomPerClick:this.zoomPerClick,qf.zoomToRefPoint?this.viewport.pointFromPixel(Of.position,!0):null),this.viewport.applyConstraints()))}function vf(Of){var qf,cp={tracker:Of.eventSource,position:Of.position,shift:Of.shift,originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction};this.raiseEvent("canvas-double-click",cp),!cp.preventDefaultAction&&this.viewport&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.dblClickToZoom&&(this.viewport.zoomBy(Of.shift?1/this.zoomPerClick:this.zoomPerClick,qf.zoomToRefPoint?this.viewport.pointFromPixel(Of.position,!0):null),this.viewport.applyConstraints()))}function _f(Of){var qf,cp={tracker:Of.eventSource,position:Of.position,delta:Of.delta,speed:Of.speed,direction:Of.direction,shift:Of.shift,originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction};if(this.raiseEvent("canvas-drag",cp),!cp.preventDefaultAction&&this.viewport){if(qf=this.gestureSettingsByDeviceType(Of.pointerType),this.panHorizontal||(Of.delta.x=0),this.panVertical||(Of.delta.y=0),this.viewport.flipped&&(Of.delta.x=-Of.delta.x),this.constrainDuringPan){var hp=this.viewport.deltaPointsFromPixels(Of.delta.negate());this.viewport.centerSpringX.target.value+=hp.x,this.viewport.centerSpringY.target.value+=hp.y;var $p=this.viewport.getBounds(),Vp=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=hp.x,this.viewport.centerSpringY.target.value-=hp.y,$p.x!=Vp.x&&(Of.delta.x=0),$p.y!=Vp.y&&(Of.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(Of.delta.negate()),qf.flickEnabled&&!this.constrainDuringPan)}}function $f(Of){if(!Of.preventDefaultAction&&this.viewport){var qf=this.gestureSettingsByDeviceType(Of.pointerType);if(qf.flickEnabled&&Of.speed>=qf.flickMinSpeed){var cp=0;this.panHorizontal&&(cp=qf.flickMomentum*Of.speed*Math.cos(Of.direction));var hp=0;this.panVertical&&(hp=qf.flickMomentum*Of.speed*Math.sin(Of.direction));var $p=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),Vp=this.viewport.pointFromPixel(new F.Point($p.x-cp,$p.y-hp));this.viewport.panTo(Vp,!1)}this.viewport.applyConstraints()}this.raiseEvent("canvas-drag-end",{tracker:Of.eventSource,position:Of.position,speed:Of.speed,direction:Of.direction,shift:Of.shift,originalEvent:Of.originalEvent})}function wf(Of){this.raiseEvent("canvas-enter",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Pf(Of){window.location!=window.parent.location&&F.MouseTracker.resetAllMouseTrackers(),this.raiseEvent("canvas-exit",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Cf(Of){this.raiseEvent("canvas-press",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,insideElementPressed:Of.insideElementPressed,insideElementReleased:Of.insideElementReleased,originalEvent:Of.originalEvent})}function Af(Of){this.raiseEvent("canvas-release",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,insideElementPressed:Of.insideElementPressed,insideElementReleased:Of.insideElementReleased,originalEvent:Of.originalEvent})}function Bf(Of){this.raiseEvent("canvas-nonprimary-press",{tracker:Of.eventSource,position:Of.position,pointerType:Of.pointerType,button:Of.button,buttons:Of.buttons,originalEvent:Of.originalEvent})}function Hf(Of){this.raiseEvent("canvas-nonprimary-release",{tracker:Of.eventSource,position:Of.position,pointerType:Of.pointerType,button:Of.button,buttons:Of.buttons,originalEvent:Of.originalEvent})}function Df(Of){var qf,cp,hp,$p;if(!Of.preventDefaultAction&&this.viewport&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.pinchToZoom&&(cp=this.viewport.pointFromPixel(Of.center,!0),hp=this.viewport.pointFromPixel(Of.lastCenter,!0),$p=hp.minus(cp),this.panHorizontal||($p.x=0),this.panVertical||($p.y=0),this.viewport.zoomBy(Of.distance/Of.lastDistance,cp,!0),qf.zoomToRefPoint&&this.viewport.panBy($p,!0),this.viewport.applyConstraints()),qf.pinchRotate)){var Vp=Math.atan2(Of.gesturePoints[0].currentPos.y-Of.gesturePoints[1].currentPos.y,Of.gesturePoints[0].currentPos.x-Of.gesturePoints[1].currentPos.x),bp=Math.atan2(Of.gesturePoints[0].lastPos.y-Of.gesturePoints[1].lastPos.y,Of.gesturePoints[0].lastPos.x-Of.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(Vp-bp)*(180/Math.PI))}return this.raiseEvent("canvas-pinch",{tracker:Of.eventSource,gesturePoints:Of.gesturePoints,lastCenter:Of.lastCenter,center:Of.center,lastDistance:Of.lastDistance,distance:Of.distance,shift:Of.shift,originalEvent:Of.originalEvent}),!1}function Lf(Of){var qf,cp,hp,$p;if(hp=F.now(),$p=hp-this._lastScrollTime,$p>this.minScrollDeltaTime){if(this._lastScrollTime=hp,this.viewport.flipped&&(Of.position.x=this.viewport.getContainerSize().x-Of.position.x),!Of.preventDefaultAction&&this.viewport&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.scrollToZoom&&(cp=Math.pow(this.zoomPerScroll,Of.scroll),this.viewport.zoomBy(cp,qf.zoomToRefPoint?this.viewport.pointFromPixel(Of.position,!0):null),this.viewport.applyConstraints())),this.raiseEvent("canvas-scroll",{tracker:Of.eventSource,position:Of.position,scroll:Of.scroll,shift:Of.shift,originalEvent:Of.originalEvent}),qf&&qf.scrollToZoom)return!1}else if(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf&&qf.scrollToZoom)return!1}function kf(Of){W[this.hash].mouseInside=!0,po(this),this.raiseEvent("container-enter",{tracker:Of.eventSource,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Nf(Of){Of.pointers<1&&(W[this.hash].mouseInside=!1,W[this.hash].animating||yn(this)),this.raiseEvent("container-exit",{tracker:Of.eventSource,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Yf(Of){Gf(Of),Of.isOpen()?Of._updateRequestId=ot(Of,Yf):Of._updateRequestId=!1}function Gf(Of){if(!Of._opening){if(Of.autoResize){var qf=K(Of.container),cp=W[Of.hash].prevContainerSize;if(!qf.equals(cp)){var hp=Of.viewport;if(Of.preserveImageSizeOnResize){var $p=cp.x/qf.x,Vp=hp.getZoom()*$p,bp=hp.getCenter();hp.resize(qf,!1),hp.zoomTo(Vp,null,!0),hp.panTo(bp,!0)}else{var Ep=hp.getBounds();hp.resize(qf,!0),hp.fitBoundsWithConstraints(Ep,!0)}W[Of.hash].prevContainerSize=qf,W[Of.hash].forceRedraw=!0}}var _p=Of.viewport.update(),Mp=Of.world.update()||_p;_p&&Of.raiseEvent("viewport-change"),Of.referenceStrip&&(Mp=Of.referenceStrip.update(Of.viewport)||Mp),!W[Of.hash].animating&&Mp&&(Of.raiseEvent("animation-start"),po(Of)),(Mp||W[Of.hash].forceRedraw||Of.world.needsDraw())&&(rp(Of),Of._drawOverlays(),Of.navigator&&Of.navigator.update(Of.viewport),W[Of.hash].forceRedraw=!1,Mp&&Of.raiseEvent("animation")),W[Of.hash].animating&&!Mp&&(Of.raiseEvent("animation-finish"),W[Of.hash].mouseInside||yn(Of)),W[Of.hash].animating=Mp}}function rp(Of){Of.imageLoader.clear(),Of.drawer.clear(),Of.world.draw(),Of.raiseEvent("update-viewport",{})}function ip(Of,qf){return Of?Of+qf:qf}function ap(){W[this.hash].lastZoomTime=F.now(),W[this.hash].zoomFactor=this.zoomPerSecond,W[this.hash].zooming=!0,Np(this)}function yp(){W[this.hash].lastZoomTime=F.now(),W[this.hash].zoomFactor=1/this.zoomPerSecond,W[this.hash].zooming=!0,Np(this)}function vp(){W[this.hash].zooming=!1}function Np(Of){F.requestAnimationFrame(F.delegate(Of,jp))}function jp(){var Of,qf,cp;W[this.hash].zooming&&this.viewport&&(Of=F.now(),qf=Of-W[this.hash].lastZoomTime,cp=Math.pow(W[this.hash].zoomFactor,qf/1e3),this.viewport.zoomBy(cp),this.viewport.applyConstraints(),W[this.hash].lastZoomTime=Of,Np(this))}function Ip(){this.viewport&&(W[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function Jp(){this.viewport&&(W[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function ng(){this.buttons.emulateEnter(),this.buttons.emulateExit()}function og(){this.viewport&&this.viewport.goHome()}function vg(){this.isFullPage()&&!F.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttons&&this.buttons.emulateExit(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function Dp(){if(this.viewport){var Of=this.viewport.getRotation();this.viewport.flipped?Of=F.positiveModulo(Of+this.rotationIncrement,360):Of=F.positiveModulo(Of-this.rotationIncrement,360),this.viewport.setRotation(Of)}}function Lp(){if(this.viewport){var Of=this.viewport.getRotation();this.viewport.flipped?Of=F.positiveModulo(Of-this.rotationIncrement,360):Of=F.positiveModulo(Of+this.rotationIncrement,360),this.viewport.setRotation(Of)}}function xp(){this.viewport.toggleFlip()}function kp(){var Of=this._sequenceIndex-1;this.navPrevNextWrap&&Of<0&&(Of+=this.tileSources.length),this.goToPage(Of)}function lp(){var Of=this._sequenceIndex+1;this.navPrevNextWrap&&Of>=this.tileSources.length&&(Of=0),this.goToPage(Of)}}(OpenSeadragon),function(F){F.Navigator=function(ot){var ut=ot.viewer,yn=this,uo,po;ot.id?(this.element=document.getElementById(ot.id),ot.controlOptions={anchor:F.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(ot.id="navigator-"+F.now(),this.element=F.makeNeutralElement("div"),ot.controlOptions={anchor:F.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:ot.autoFade},ot.position&&(ot.position=="BOTTOM_RIGHT"?ot.controlOptions.anchor=F.ControlAnchor.BOTTOM_RIGHT:ot.position=="BOTTOM_LEFT"?ot.controlOptions.anchor=F.ControlAnchor.BOTTOM_LEFT:ot.position=="TOP_RIGHT"?ot.controlOptions.anchor=F.ControlAnchor.TOP_RIGHT:ot.position=="TOP_LEFT"?ot.controlOptions.anchor=F.ControlAnchor.TOP_LEFT:ot.position=="ABSOLUTE"&&(ot.controlOptions.anchor=F.ControlAnchor.ABSOLUTE,ot.controlOptions.top=ot.top,ot.controlOptions.left=ot.left,ot.controlOptions.height=ot.height,ot.controlOptions.width=ot.width))),this.element.id=ot.id,this.element.className+=" navigator",ot=F.extend(!0,{sizeRatio:F.DEFAULT_SETTINGS.navigatorSizeRatio},ot,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:ot.autoResize,minZoomImageRatio:1,background:ot.background,opacity:ot.opacity,borderColor:ot.borderColor,displayRegionColor:ot.displayRegionColor}),ot.minPixelRatio=this.minPixelRatio=ut.minPixelRatio,F.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new F.Point(1,1),this.totalBorderWidths=new F.Point(this.borderWidth*2,this.borderWidth*2).minus(this.fudge),ot.controlOptions.anchor!=F.ControlAnchor.NONE&&function(lf,yf){lf.margin="0px",lf.border=yf+"px solid "+ot.borderColor,lf.padding="0px",lf.background=ot.background,lf.opacity=ot.opacity,lf.overflow="hidden"}(this.element.style,this.borderWidth),this.displayRegion=F.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(lf,yf){lf.position="relative",lf.top="0px",lf.left="0px",lf.fontSize="0px",lf.overflow="hidden",lf.border=yf+"px solid "+ot.displayRegionColor,lf.margin="0px",lf.padding="0px",lf.background="transparent",lf.float="left",lf.cssFloat="left",lf.styleFloat="left",lf.zIndex=999999999,lf.cursor="default"}(this.displayRegion.style,this.borderWidth),this.displayRegionContainer=F.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",ut.addControl(this.element,ot.controlOptions),this._resizeWithViewer=ot.controlOptions.anchor!=F.ControlAnchor.ABSOLUTE&&ot.controlOptions.anchor!=F.ControlAnchor.NONE,ot.width&&ot.height?(this.setWidth(ot.width),this.setHeight(ot.height)):this._resizeWithViewer&&(uo=F.getElementSize(ut.element),this.element.style.height=Math.round(uo.y*ot.sizeRatio)+"px",this.element.style.width=Math.round(uo.x*ot.sizeRatio)+"px",this.oldViewerSize=uo,po=F.getElementSize(this.element),this.elementArea=po.x*po.y),this.oldContainerSize=new F.Point(0,0),F.Viewer.apply(this,[ot]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer);function mo(lf){tt(yn.displayRegionContainer,lf),tt(yn.displayRegion,-lf),yn.viewport.setRotation(lf)}if(ot.navigatorRotate){var wo=ot.viewer.viewport?ot.viewer.viewport.getRotation():ot.viewer.degrees||0;mo(wo),ot.viewer.addHandler("rotate",function(lf){mo(lf.degrees)})}this.innerTracker.destroy(),this.innerTracker=new F.MouseTracker({element:this.element,dragHandler:F.delegate(this,q),clickHandler:F.delegate(this,W),releaseHandler:F.delegate(this,K),scrollHandler:F.delegate(this,X)}),this.addHandler("reset-size",function(){yn.viewport&&yn.viewport.goHome(!0)}),ut.world.addHandler("item-index-change",function(lf){window.setTimeout(function(){var yf=yn.world.getItemAt(lf.previousIndex);yn.world.setItemIndex(yf,lf.newIndex)},1)}),ut.world.addHandler("remove-item",function(lf){var yf=lf.item,cf=yn._getMatchingItem(yf);cf&&yn.world.removeItem(cf)}),this.update(ut.viewport)},F.extend(F.Navigator.prototype,F.EventSource.prototype,F.Viewer.prototype,{updateSize:function(){if(this.viewport){var ot=new F.Point(this.container.clientWidth===0?1:this.container.clientWidth,this.container.clientHeight===0?1:this.container.clientHeight);ot.equals(this.oldContainerSize)||(this.viewport.resize(ot,!0),this.viewport.goHome(!0),this.oldContainerSize=ot,this.drawer.clear(),this.world.draw())}},setWidth:function(ot){this.width=ot,this.element.style.width=typeof ot=="number"?ot+"px":ot,this._resizeWithViewer=!1},setHeight:function(ot){this.height=ot,this.element.style.height=typeof ot=="number"?ot+"px":ot,this._resizeWithViewer=!1},setFlip:function(ot){return this.viewport.setFlip(ot),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(ot){rt(this.displayRegion,ot),rt(this.canvas,ot),rt(this.element,ot)},update:function(ot){var ut,yn,uo,po,mo,wo;if(ut=F.getElementSize(this.viewer.element),this._resizeWithViewer&&ut.x&&ut.y&&!ut.equals(this.oldViewerSize)&&(this.oldViewerSize=ut,this.maintainSizeRatio||!this.elementArea?(yn=ut.x*this.sizeRatio,uo=ut.y*this.sizeRatio):(yn=Math.sqrt(this.elementArea*(ut.x/ut.y)),uo=this.elementArea/yn),this.element.style.width=Math.round(yn)+"px",this.element.style.height=Math.round(uo)+"px",this.elementArea||(this.elementArea=yn*uo),this.updateSize()),ot&&this.viewport){po=ot.getBoundsNoRotate(!0),mo=this.viewport.pixelFromPointNoRotate(po.getTopLeft(),!1),wo=this.viewport.pixelFromPointNoRotate(po.getBottomRight(),!1).minus(this.totalBorderWidths);var lf=this.displayRegion.style;lf.display=this.world.getItemCount()?"block":"none",lf.top=Math.round(mo.y)+"px",lf.left=Math.round(mo.x)+"px";var yf=Math.abs(mo.x-wo.x),cf=Math.abs(mo.y-wo.y);lf.width=Math.round(Math.max(yf,0))+"px",lf.height=Math.round(Math.max(cf,0))+"px"}},addTiledImage:function(ot){var ut=this,yn=ot.originalTiledImage;delete ot.original;var uo=F.extend({},ot,{success:function(po){var mo=po.item;mo._originalForNavigator=yn,ut._matchBounds(mo,yn,!0);function wo(){ut._matchBounds(mo,yn)}function lf(){ut._matchOpacity(mo,yn)}function yf(){ut._matchCompositeOperation(mo,yn)}yn.addHandler("bounds-change",wo),yn.addHandler("clip-change",wo),yn.addHandler("opacity-change",lf),yn.addHandler("composite-operation-change",yf)}});return F.Viewer.prototype.addTiledImage.apply(this,[uo])},_getMatchingItem:function(ot){for(var ut=this.world.getItemCount(),yn,uo=0;uo1||K.y>1));q++);return q-1},getTileAtPoint:function(q,K){var X=K.x>=0&&K.x<=1&&K.y>=0&&K.y<=1/this.aspectRatio;F.console.assert(X,"[TileSource.getTileAtPoint] must be called with a valid point.");var tt=this.dimensions.x*this.getLevelScale(q),rt=K.x*tt,ot=K.y*tt,ut=Math.floor(rt/this.getTileWidth(q)),yn=Math.floor(ot/this.getTileHeight(q));K.x>=1&&(ut=this.getNumTiles(q).x-1);var uo=1e-15;return K.y>=1/this.aspectRatio-uo&&(yn=this.getNumTiles(q).y-1),new F.Point(ut,yn)},getTileBounds:function(q,K,X,tt){var rt=this.dimensions.times(this.getLevelScale(q)),ot=this.getTileWidth(q),ut=this.getTileHeight(q),yn=K===0?0:ot*K-this.tileOverlap,uo=X===0?0:ut*X-this.tileOverlap,po=ot+(K===0?1:2)*this.tileOverlap,mo=ut+(X===0?1:2)*this.tileOverlap,wo=1/rt.x;return po=Math.min(po,rt.x-yn),mo=Math.min(mo,rt.y-uo),tt?new F.Rect(0,0,po,mo):new F.Rect(yn*wo,uo*wo,po*wo,mo*wo)},getImageInfo:function(q){var K=this,X,tt,rt,ot,ut,yn,uo;q&&(ut=q.split("/"),yn=ut[ut.length-1],uo=yn.lastIndexOf("."),uo>-1&&(ut[ut.length-1]=yn.slice(0,uo))),tt=function(po){typeof po=="string"&&(po=F.parseXml(po));var mo=F.TileSource.determineType(K,po,q);if(!mo){K.raiseEvent("open-failed",{message:"Unable to load TileSource",source:q});return}ot=mo.prototype.configure.apply(K,[po,q]),ot.ajaxWithCredentials===void 0&&(ot.ajaxWithCredentials=K.ajaxWithCredentials),rt=new mo(ot),K.ready=!0,K.raiseEvent("ready",{tileSource:rt})},q.match(/\.js$/)?(X=q.split("/").pop().replace(".js",""),F.jsonp({url:q,async:!1,callbackName:X,callback:tt})):F.makeAjaxRequest({url:q,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(po){var mo=W(po);tt(mo)},error:function(po,mo){var wo;try{wo="HTTP "+po.status+" attempting to load TileSource"}catch{var lf;typeof mo>"u"||!mo.toString?lf="Unknown error":lf=mo.toString(),wo=lf+" attempting to load TileSource"}K.raiseEvent("open-failed",{message:wo,source:q})}})},supports:function(q,K){return!1},configure:function(q,K){throw new Error("Method not implemented.")},getTileUrl:function(q,K,X){throw new Error("Method not implemented.")},getTileAjaxHeaders:function(q,K,X){return{}},tileExists:function(q,K,X){var tt=this.getNumTiles(q);return q>=this.minLevel&&q<=this.maxLevel&&K>=0&&X>=0&&K=0;mo--)for(wo=this.displayRects[mo],lf=wo.minLevel;lf<=wo.maxLevel;lf++)this._levelRects[lf]||(this._levelRects[lf]=[]),this._levelRects[lf].push(wo);F.TileSource.apply(this,[yf])},F.extend(F.DziTileSource.prototype,F.TileSource.prototype,{supports:function(K,X){var tt;return K.Image?tt=K.Image.xmlns:K.documentElement&&(K.documentElement.localName=="Image"||K.documentElement.tagName=="Image")&&(tt=K.documentElement.namespaceURI),tt=(tt||"").toLowerCase(),tt.indexOf("schemas.microsoft.com/deepzoom/2008")!==-1||tt.indexOf("schemas.microsoft.com/deepzoom/2009")!==-1},configure:function(K,X){var tt;return F.isPlainObject(K)?tt=q(this,K):tt=W(this,K),X&&!tt.tilesUrl&&(tt.tilesUrl=X.replace(/([^\/]+?)(\.(dzi|xml|js)?(\?[^\/]*)?)?\/?$/,"$1_files/"),X.search(/\.(dzi|xml|js)\?/)!=-1?tt.queryParams=X.match(/\?.*/):tt.queryParams=""),tt},getTileUrl:function(K,X,tt){return[this.tilesUrl,K,"/",X,"_",tt,".",this.fileFormat,this.queryParams].join("")},tileExists:function(K,X,tt){var rt=this._levelRects[K],ot,ut,yn,uo,po,mo,wo;if(this.minLevel&&Kthis.maxLevel)return!1;if(!rt||!rt.length)return!0;for(wo=rt.length-1;wo>=0;wo--)if(ot=rt[wo],!(Kot.maxLevel)&&(ut=this.getLevelScale(K),yn=ot.x*ut,uo=ot.y*ut,po=yn+ot.width*ut,mo=uo+ot.height*ut,yn=Math.floor(yn/this._tileWidth),uo=Math.floor(uo/this._tileWidth),po=Math.ceil(po/this._tileWidth),mo=Math.ceil(mo/this._tileWidth),yn<=X&&X0?tt.tileSize=Math.max.apply(null,po):tt.tileSize=yn}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,tt.levels=q(this),F.extend(!0,tt,{width:tt.levels[tt.levels.length-1].width,height:tt.levels[tt.levels.length-1].height,tileSize:Math.max(tt.height,tt.width),tileOverlap:0,minLevel:0,maxLevel:tt.levels.length-1}),this.levels=tt.levels):F.console.error("Nothing in the info.json to construct image pyramids from");if(!tt.maxLevel&&!this.emulateLegacyImagePyramid)if(!this.scale_factors)tt.maxLevel=Number(Math.ceil(Math.log(Math.max(this.width,this.height),2)));else{var wo=Math.max.apply(null,this.scale_factors);tt.maxLevel=Math.round(Math.log(wo)*Math.LOG2E)}F.TileSource.apply(this,[tt])},F.extend(F.IIIFTileSource.prototype,F.TileSource.prototype,{supports:function(tt,rt){return tt.protocol&&tt.protocol=="http://iiif.io/api/image"||tt["@context"]&&(tt["@context"]=="http://library.stanford.edu/iiif/image-api/1.1/context.json"||tt["@context"]=="http://iiif.io/api/image/1/context.json")||tt.profile&&tt.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")===0||tt.identifier&&tt.width&&tt.height?!0:!!(tt.documentElement&&tt.documentElement.tagName=="info"&&tt.documentElement.namespaceURI=="http://library.stanford.edu/iiif/image-api/ns/")},configure:function(tt,rt){if(F.isPlainObject(tt)){if(!tt["@context"])tt["@context"]="http://iiif.io/api/image/1.0/context.json",tt["@id"]=rt.replace("/info.json",""),tt.version=1;else{var ut=tt["@context"];if(Array.isArray(ut)){for(var yn=0;yn0&&tt>=this.minLevel&&tt<=this.maxLevel&&(rt=this.levels[tt].width/this.levels[this.maxLevel].width),rt}return F.TileSource.prototype.getLevelScale.call(this,tt)},getNumTiles:function(tt){if(this.emulateLegacyImagePyramid){var rt=this.getLevelScale(tt);return rt?new F.Point(1,1):new F.Point(0,0)}return F.TileSource.prototype.getNumTiles.call(this,tt)},getTileAtPoint:function(tt,rt){return this.emulateLegacyImagePyramid?new F.Point(0,0):F.TileSource.prototype.getTileAtPoint.call(this,tt,rt)},getTileUrl:function(tt,rt,ot){if(this.emulateLegacyImagePyramid){var ut=null;return this.levels.length>0&&tt>=this.minLevel&&tt<=this.maxLevel&&(ut=this.levels[tt].url),ut}var yn="0",uo=Math.pow(.5,this.maxLevel-tt),po=Math.ceil(this.width*uo),mo=Math.ceil(this.height*uo),wo,lf,yf,cf,vf,_f,$f,wf,Pf,Cf,Af,Bf,Hf,Df;return wo=this.getTileWidth(tt),lf=this.getTileHeight(tt),yf=Math.ceil(wo/uo),cf=Math.ceil(lf/uo),this.version===1?Hf="native."+this.tileFormat:Hf="default."+this.tileFormat,po1&&tt.profile[1].supports&&(yn=tt.profile[1].supports.indexOf("sizeByW")!==-1),tt.version===3&&tt.extraFeatures&&(yn=tt.extraFeatures.indexOf("sizeByWh")!==-1),!ut||yn}function q(tt){for(var rt=[],ot=0;otut?yn=ot/256:yn=ut/256,rt.maxLevel=Math.ceil(Math.log(yn)/Math.log(2))-1,rt.tileSize=256,rt.width=ot,rt.height=ut,F.TileSource.apply(this,[rt])},F.extend(F.TmsTileSource.prototype,F.TileSource.prototype,{supports:function(W,q){return W.type&&W.type=="tiledmapservice"},configure:function(W,q){return W},getTileUrl:function(W,q,K){var X=this.getNumTiles(W).y-1;return this.tilesUrl+W+"/"+q+"/"+(X-K)+".png"}})}(OpenSeadragon),function(F){F.ZoomifyTileSource=function(W){W.tileSize=256;var q={x:W.width,y:W.height};for(W.imageSizes=[{x:W.width,y:W.height}],W.gridSize=[this._getGridSize(W.width,W.height,W.tileSize)];parseInt(q.x,10)>W.tileSize||parseInt(q.y,10)>W.tileSize;)q.x=Math.floor(q.x/2),q.y=Math.floor(q.y/2),W.imageSizes.push({x:q.x,y:q.y}),W.gridSize.push(this._getGridSize(q.x,q.y,W.tileSize));W.imageSizes.reverse(),W.gridSize.reverse(),W.minLevel=0,W.maxLevel=W.gridSize.length-1,OpenSeadragon.TileSource.apply(this,[W])},F.extend(F.ZoomifyTileSource.prototype,F.TileSource.prototype,{_getGridSize:function(W,q,K){return{x:Math.ceil(W/K),y:Math.ceil(q/K)}},_calculateAbsoluteTileNumber:function(W,q,K){for(var X=0,tt={},rt=0;rt0?(rt=tt.levels[tt.levels.length-1].width,ot=tt.levels[tt.levels.length-1].height):(rt=0,ot=0,F.console.error("No supported image formats found")),F.extend(!0,tt,{width:rt,height:ot,tileSize:Math.max(ot,rt),tileOverlap:0,minLevel:0,maxLevel:tt.levels.length>0?tt.levels.length-1:0}),F.TileSource.apply(this,[tt]),this.levels=tt.levels},F.extend(F.LegacyTileSource.prototype,F.TileSource.prototype,{supports:function(X,tt){return X.type&&X.type=="legacy-image-pyramid"||X.documentElement&&X.documentElement.getAttribute("type")=="legacy-image-pyramid"},configure:function(X,tt){var rt;return F.isPlainObject(X)?rt=K(this,X):rt=q(this,X),rt},getLevelScale:function(X){var tt=NaN;return this.levels.length>0&&X>=this.minLevel&&X<=this.maxLevel&&(tt=this.levels[X].width/this.levels[this.maxLevel].width),tt},getNumTiles:function(X){var tt=this.getLevelScale(X);return tt?new F.Point(1,1):new F.Point(0,0)},getTileUrl:function(X,tt,rt){var ot=null;return this.levels.length>0&&X>=this.minLevel&&X<=this.maxLevel&&(ot=this.levels[X].url),ot}});function W(X){var tt=[],rt,ot;for(ot=0;ot");return tt.sort(function(ut,yn){return ut.height-yn.height})}function q(X,tt){if(!tt||!tt.documentElement)throw new Error(F.getString("Errors.Xml"));var rt=tt.documentElement,ot=rt.tagName,ut=null,yn=[],uo,po;if(ot=="image")try{for(ut={type:rt.getAttribute("type"),levels:[]},yn=rt.getElementsByTagName("level"),po=0;po=this.minLevel&&W<=this.maxLevel&&(q=this.levels[W].width/this.levels[this.maxLevel].width),q},getNumTiles:function(W){var q=this.getLevelScale(W);return q?new F.Point(1,1):new F.Point(0,0)},getTileUrl:function(W,q,K){var X=null;return W>=this.minLevel&&W<=this.maxLevel&&(X=this.levels[W].url),X},getContext2D:function(W,q,K){var X=null;return W>=this.minLevel&&W<=this.maxLevel&&(X=this.levels[W].context2D),X},_buildLevels:function(){var W=[{url:this._image.src,width:Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,height:Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height}];if(!this.buildPyramid||!F.supportsCanvas||!this.useCanvas)return delete this._image,W;var q=Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,K=Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height,X=document.createElement("canvas"),tt=X.getContext("2d");if(X.width=q,X.height=K,tt.drawImage(this._image,0,0,q,K),W[0].context2D=tt,delete this._image,F.isCanvasTainted(X))return W;for(;q>=2&&K>=2;){q=Math.floor(q/2),K=Math.floor(K/2);var rt=document.createElement("canvas"),ot=rt.getContext("2d");rt.width=q,rt.height=K,ot.drawImage(X,0,0,q,K),W.splice(0,0,{context2D:ot,width:q,height:K}),X=rt,tt=ot}return W}})}(OpenSeadragon),function(F){F.TileSourceCollection=function(W,q,K,X){F.console.error("TileSourceCollection is deprecated; use World instead")}}(OpenSeadragon),function(F){F.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},F.Button=function(ot){var ut=this;F.EventSource.call(this),F.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:F.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:F.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null},ot),this.element=ot.element||F.makeNeutralElement("div"),ot.element||(this.imgRest=F.makeTransparentImage(this.srcRest),this.imgGroup=F.makeTransparentImage(this.srcGroup),this.imgHover=F.makeTransparentImage(this.srcHover),this.imgDown=F.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,this.element.style.position="relative",F.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",F.Browser.vendor==F.BROWSERS.FIREFOX&&F.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=F.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new F.MouseTracker({element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(yn){yn.insideElementPressed?(tt(ut,F.ButtonState.DOWN),ut.raiseEvent("enter",{originalEvent:yn.originalEvent})):yn.buttonDownAny||tt(ut,F.ButtonState.HOVER)},focusHandler:function(yn){this.enterHandler(yn),ut.raiseEvent("focus",{originalEvent:yn.originalEvent})},exitHandler:function(yn){rt(ut,F.ButtonState.GROUP),yn.insideElementPressed&&ut.raiseEvent("exit",{originalEvent:yn.originalEvent})},blurHandler:function(yn){this.exitHandler(yn),ut.raiseEvent("blur",{originalEvent:yn.originalEvent})},pressHandler:function(yn){tt(ut,F.ButtonState.DOWN),ut.raiseEvent("press",{originalEvent:yn.originalEvent})},releaseHandler:function(yn){yn.insideElementPressed&&yn.insideElementReleased?(rt(ut,F.ButtonState.HOVER),ut.raiseEvent("release",{originalEvent:yn.originalEvent})):yn.insideElementPressed?rt(ut,F.ButtonState.GROUP):tt(ut,F.ButtonState.HOVER)},clickHandler:function(yn){yn.quick&&ut.raiseEvent("click",{originalEvent:yn.originalEvent})},keyHandler:function(yn){return yn.keyCode===13?(ut.raiseEvent("click",{originalEvent:yn.originalEvent}),ut.raiseEvent("release",{originalEvent:yn.originalEvent}),!1):!0}}),rt(this,F.ButtonState.REST)},F.extend(F.Button.prototype,F.EventSource.prototype,{notifyGroupEnter:function(){tt(this,F.ButtonState.GROUP)},notifyGroupExit:function(){rt(this,F.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,F.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,F.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()}});function W(ot){F.requestAnimationFrame(function(){q(ot)})}function q(ot){var ut,yn,uo;ot.shouldFade&&(ut=F.now(),yn=ut-ot.fadeBeginTime,uo=1-yn/ot.fadeLength,uo=Math.min(1,uo),uo=Math.max(0,uo),ot.imgGroup&&F.setElementOpacity(ot.imgGroup,uo,!0),uo>0&&W(ot))}function K(ot){ot.shouldFade=!0,ot.fadeBeginTime=F.now()+ot.fadeDelay,window.setTimeout(function(){W(ot)},ot.fadeDelay)}function X(ot){ot.shouldFade=!1,ot.imgGroup&&F.setElementOpacity(ot.imgGroup,1,!0)}function tt(ot,ut){ot.element.disabled||(ut>=F.ButtonState.GROUP&&ot.currentState==F.ButtonState.REST&&(X(ot),ot.currentState=F.ButtonState.GROUP),ut>=F.ButtonState.HOVER&&ot.currentState==F.ButtonState.GROUP&&(ot.imgHover&&(ot.imgHover.style.visibility=""),ot.currentState=F.ButtonState.HOVER),ut>=F.ButtonState.DOWN&&ot.currentState==F.ButtonState.HOVER&&(ot.imgDown&&(ot.imgDown.style.visibility=""),ot.currentState=F.ButtonState.DOWN))}function rt(ot,ut){ot.element.disabled||(ut<=F.ButtonState.HOVER&&ot.currentState==F.ButtonState.DOWN&&(ot.imgDown&&(ot.imgDown.style.visibility="hidden"),ot.currentState=F.ButtonState.HOVER),ut<=F.ButtonState.GROUP&&ot.currentState==F.ButtonState.HOVER&&(ot.imgHover&&(ot.imgHover.style.visibility="hidden"),ot.currentState=F.ButtonState.GROUP),ut<=F.ButtonState.REST&&ot.currentState==F.ButtonState.GROUP&&(K(ot),ot.currentState=F.ButtonState.REST))}}(OpenSeadragon),function(F){F.ButtonGroup=function(W){F.extend(!0,this,{buttons:[],clickTimeThreshold:F.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:F.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},W);var q=this.buttons.concat([]),K=this,X;if(this.element=W.element||F.makeNeutralElement("div"),!W.group)for(this.element.style.display="inline-block",X=0;X=270?(rt=this.getTopRight(),this.x=rt.x,this.y=rt.y,ot=this.height,this.height=this.width,this.width=ot,this.degrees-=270):this.degrees>=180?(rt=this.getBottomRight(),this.x=rt.x,this.y=rt.y,this.degrees-=180):this.degrees>=90&&(rt=this.getBottomLeft(),this.x=rt.x,this.y=rt.y,ot=this.height,this.height=this.width,this.width=ot,this.degrees-=90)},F.Rect.fromSummits=function(W,q,K){var X=W.distanceTo(q),tt=W.distanceTo(K),rt=q.minus(W),ot=Math.atan(rt.y/rt.x);return rt.x<0?ot+=Math.PI:rt.y<0&&(ot+=2*Math.PI),new F.Rect(W.x,W.y,X,tt,ot/Math.PI*180)},F.Rect.prototype={clone:function(){return new F.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new F.Point(this.x,this.y)},getBottomRight:function(){return new F.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new F.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new F.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new F.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new F.Point(this.width,this.height)},equals:function(W){return W instanceof F.Rect&&this.x===W.x&&this.y===W.y&&this.width===W.width&&this.height===W.height&&this.degrees===W.degrees},times:function(W){return new F.Rect(this.x*W,this.y*W,this.width*W,this.height*W,this.degrees)},translate:function(W){return new F.Rect(this.x+W.x,this.y+W.y,this.width,this.height,this.degrees)},union:function(W){var q=this.getBoundingBox(),K=W.getBoundingBox(),X=Math.min(q.x,K.x),tt=Math.min(q.y,K.y),rt=Math.max(q.x+q.width,K.x+K.width),ot=Math.max(q.y+q.height,K.y+K.height);return new F.Rect(X,tt,rt-X,ot-tt)},intersection:function(W){var q=1e-10,K=[],X=this.getTopLeft();W.containsPoint(X,q)&&K.push(X);var tt=this.getTopRight();W.containsPoint(tt,q)&&K.push(tt);var rt=this.getBottomLeft();W.containsPoint(rt,q)&&K.push(rt);var ot=this.getBottomRight();W.containsPoint(ot,q)&&K.push(ot);var ut=W.getTopLeft();this.containsPoint(ut,q)&&K.push(ut);var yn=W.getTopRight();this.containsPoint(yn,q)&&K.push(yn);var uo=W.getBottomLeft();this.containsPoint(uo,q)&&K.push(uo);var po=W.getBottomRight();this.containsPoint(po,q)&&K.push(po);for(var mo=this._getSegments(),wo=W._getSegments(),lf=0;lfPf&&(Pf=Hf.x),Hf.yAf&&(Af=Hf.y)}return new F.Rect(wf,Cf,Pf-wf,Af-Cf)},_getSegments:function(){var W=this.getTopLeft(),q=this.getTopRight(),K=this.getBottomLeft(),X=this.getBottomRight();return[[W,q],[q,X],[X,K],[K,W]]},rotate:function(W,q){if(W=F.positiveModulo(W,360),W===0)return this.clone();q=q||this.getCenter();var K=this.getTopLeft().rotate(W,q),X=this.getTopRight().rotate(W,q),tt=X.minus(K);tt=tt.apply(function(ot){var ut=1e-15;return Math.abs(ot)=-q&&(W.x-X.x)*rt.x+(W.y-X.y)*rt.y<=q&&(W.x-K.x)*ot.x+(W.y-K.y)*ot.y>=-q&&(W.x-tt.x)*ot.x+(W.y-tt.y)*ot.y<=q},toString:function(){return"["+Math.round(this.x*100)/100+", "+Math.round(this.y*100)/100+", "+Math.round(this.width*100)/100+"x"+Math.round(this.height*100)/100+", "+Math.round(this.degrees*100)/100+"deg]"}}}(OpenSeadragon),function(F){var W={};F.ReferenceStrip=function(yn){var uo=this,po=yn.viewer,mo=F.getElementSize(po.element),wo,lf,yf;for(yn.id||(yn.id="referencestrip-"+F.now(),this.element=F.makeNeutralElement("div"),this.element.id=yn.id,this.element.className="referencestrip"),yn=F.extend(!0,{sizeRatio:F.DEFAULT_SETTINGS.referenceStripSizeRatio,position:F.DEFAULT_SETTINGS.referenceStripPosition,scroll:F.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:F.DEFAULT_SETTINGS.clickTimeThreshold},yn,{element:this.element,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1}),F.extend(this,yn),W[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,lf=this.element.style,lf.marginTop="0px",lf.marginRight="0px",lf.marginBottom="0px",lf.marginLeft="0px",lf.left="0px",lf.bottom="0px",lf.border="0px",lf.background="#000",lf.position="relative",F.setElementTouchActionNone(this.element),F.setElementOpacity(this.element,.8),this.viewer=po,this.innerTracker=new F.MouseTracker({element:this.element,dragHandler:F.delegate(this,q),scrollHandler:F.delegate(this,K),enterHandler:F.delegate(this,tt),exitHandler:F.delegate(this,rt),keyDownHandler:F.delegate(this,ot),keyHandler:F.delegate(this,ut)}),yn.width&&yn.height?(this.element.style.width=yn.width+"px",this.element.style.height=yn.height+"px",po.addControl(this.element,{anchor:F.ControlAnchor.BOTTOM_LEFT})):yn.scroll=="horizontal"?(this.element.style.width=mo.x*yn.sizeRatio*po.tileSources.length+12*po.tileSources.length+"px",this.element.style.height=mo.y*yn.sizeRatio+"px",po.addControl(this.element,{anchor:F.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=mo.y*yn.sizeRatio*po.tileSources.length+12*po.tileSources.length+"px",this.element.style.width=mo.x*yn.sizeRatio+"px",po.addControl(this.element,{anchor:F.ControlAnchor.TOP_LEFT})),this.panelWidth=mo.x*this.sizeRatio+8,this.panelHeight=mo.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},yf=0;yflf+po.x-this.panelWidth?(cf=Math.min(cf,mo-po.x),this.element.style.marginLeft=-cf+"px",X(this,po.x,-cf)):cfyf+po.y-this.panelHeight?(cf=Math.min(cf,wo-po.y),this.element.style.marginTop=-cf+"px",X(this,po.y,-cf)):cf0?uo>-(mo-lf.x)&&(this.element.style.marginLeft=uo+yn.delta.x*2+"px",X(this,lf.x,uo+yn.delta.x*2)):-yn.delta.x<0&&uo<0&&(this.element.style.marginLeft=uo+yn.delta.x*2+"px",X(this,lf.x,uo+yn.delta.x*2)):-yn.delta.y>0?po>-(wo-lf.y)&&(this.element.style.marginTop=po+yn.delta.y*2+"px",X(this,lf.y,po+yn.delta.y*2)):-yn.delta.y<0&&po<0&&(this.element.style.marginTop=po+yn.delta.y*2+"px",X(this,lf.y,po+yn.delta.y*2))),!1}function K(yn){var uo=Number(this.element.style.marginLeft.replace("px","")),po=Number(this.element.style.marginTop.replace("px","")),mo=Number(this.element.style.width.replace("px","")),wo=Number(this.element.style.height.replace("px","")),lf=F.getElementSize(this.viewer.canvas);return this.element&&(this.scroll=="horizontal"?yn.scroll>0?uo>-(mo-lf.x)&&(this.element.style.marginLeft=uo-yn.scroll*60+"px",X(this,lf.x,uo-yn.scroll*60)):yn.scroll<0&&uo<0&&(this.element.style.marginLeft=uo-yn.scroll*60+"px",X(this,lf.x,uo-yn.scroll*60)):yn.scroll<0?po>lf.y-wo&&(this.element.style.marginTop=po+yn.scroll*60+"px",X(this,lf.y,po+yn.scroll*60)):yn.scroll>0&&po<0&&(this.element.style.marginTop=po+yn.scroll*60+"px",X(this,lf.y,po+yn.scroll*60))),!1}function X(yn,uo,po){var mo,wo,lf,yf,cf,vf,_f;for(yn.scroll=="horizontal"?mo=yn.panelWidth:mo=yn.panelHeight,wo=Math.ceil(uo/mo)+5,lf=Math.ceil((Math.abs(po)+uo)/mo)+1,wo=lf-wo,wo=wo<0?0:wo,vf=wo;vf1?K[1].springStiffness:5,animationTime:K.length>1?K[1].animationTime:1.5}),F.console.assert(typeof q.springStiffness=="number"&&q.springStiffness!==0,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),F.console.assert(typeof q.animationTime=="number"&&q.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),q.exponential&&(this._exponential=!0,delete q.exponential),F.extend(!0,this,q),this.current={value:typeof this.initial=="number"?this.initial:this._exponential?0:1,time:F.now()},F.console.assert(!this._exponential||this.current.value!==0,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},F.Spring.prototype={resetTo:function(q){F.console.assert(!this._exponential||q!==0,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=q,this.start.time=this.target.time=this.current.time=F.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(q){F.console.assert(!this._exponential||q!==0,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=q,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(q){this.start.value+=q,this.target.value+=q,this._exponential&&(F.console.assert(this.target.value!==0&&this.start.value!==0,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(q){this._exponential=q,this._exponential&&(F.console.assert(this.current.value!==0&&this.target.value!==0&&this.start.value!==0,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){this.current.time=F.now();var q,K;this._exponential?(q=this.start._logValue,K=this.target._logValue):(q=this.start.value,K=this.target.value);var X=this.current.time>=this.target.time?K:q+(K-q)*W(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time)),tt=this.current.value;return this._exponential?this.current.value=Math.exp(X):this.current.value=X,tt!=this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}};function W(q,K){return(1-Math.exp(q*-K))/(1-Math.exp(-q))}}(OpenSeadragon),function(F){function W(K){F.extend(!0,this,{timeout:F.DEFAULT_SETTINGS.timeout,jobId:null},K),this.image=null}W.prototype={errorMsg:null,start:function(){var K=this,X=this.abort;this.image=new Image,this.image.onload=function(){K.finish(!0)},this.image.onabort=this.image.onerror=function(){K.errorMsg="Image load aborted",K.finish(!1)},this.jobId=window.setTimeout(function(){K.errorMsg="Image load exceeded timeout ("+K.timeout+" ms)",K.finish(!1)},this.timeout),this.loadWithAjax?(this.request=F.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",success:function(tt){var rt;try{rt=new window.Blob([tt.response])}catch(uo){var ot=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(uo.name==="TypeError"&&ot){var ut=new ot;ut.append(tt.response),rt=ut.getBlob()}}rt.size===0&&(K.errorMsg="Empty image response.",K.finish(!1));var yn=(window.URL||window.webkitURL).createObjectURL(rt);K.image.src=yn},error:function(tt){K.errorMsg="Image load aborted - XHR error",K.finish(!1)}}),this.abort=function(){K.request.abort(),typeof X=="function"&&X()}):(this.crossOriginPolicy!==!1&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(K){this.image.onload=this.image.onerror=this.image.onabort=null,K||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},F.ImageLoader=function(K){F.extend(!0,this,{jobLimit:F.DEFAULT_SETTINGS.imageLoaderLimit,timeout:F.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},K)},F.ImageLoader.prototype={addJob:function(K){var X=this,tt=function(ut){q(X,ut,K.callback)},rt={src:K.src,loadWithAjax:K.loadWithAjax,ajaxHeaders:K.loadWithAjax?K.ajaxHeaders:null,crossOriginPolicy:K.crossOriginPolicy,ajaxWithCredentials:K.ajaxWithCredentials,callback:tt,abort:K.abort,timeout:this.timeout},ot=new W(rt);!this.jobLimit||this.jobsInProgress0&&(rt=K.jobQueue.shift(),rt.start(),K.jobsInProgress++),tt(X.image,X.errorMsg,X.request)}}(OpenSeadragon),function(F){F.Tile=function(W,q,K,X,tt,rt,ot,ut,yn,uo){this.level=W,this.x=q,this.y=K,this.bounds=X,this.sourceBounds=uo,this.exists=tt,this.url=rt,this.context2D=ot,this.loadWithAjax=ut,this.ajaxHeaders=yn,this.ajaxHeaders?this.cacheKey=this.url+"+"+JSON.stringify(this.ajaxHeaders):this.cacheKey=this.url,this.loaded=!1,this.loading=!1,this.element=null,this.imgElement=null,this.image=null,this.style=null,this.position=null,this.size=null,this.blendStart=null,this.opacity=null,this.squaredDistance=null,this.visibility=null,this.beingDrawn=!1,this.lastTouchTime=0,this.isRightMost=!1,this.isBottomMost=!1},F.Tile.prototype={toString:function(){return this.level+"/"+this.x+"_"+this.y},_hasTransparencyChannel:function(){return!!this.context2D||this.url.match(".png")},drawHTML:function(W){if(!this.cacheImageRecord){F.console.warn("[Tile.drawHTML] attempting to draw tile %s when it's not cached",this.toString());return}if(!this.loaded){F.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}this.element||(this.element=F.makeNeutralElement("div"),this.imgElement=this.cacheImageRecord.getImage().cloneNode(),this.imgElement.style.msInterpolationMode="nearest-neighbor",this.imgElement.style.width="100%",this.imgElement.style.height="100%",this.style=this.element.style,this.style.position="absolute"),this.element.parentNode!=W&&W.appendChild(this.element),this.imgElement.parentNode!=this.element&&this.element.appendChild(this.imgElement),this.style.top=this.position.y+"px",this.style.left=this.position.x+"px",this.style.height=this.size.y+"px",this.style.width=this.size.x+"px",F.setElementOpacity(this.element,this.opacity)},drawCanvas:function(W,q,K,X){var tt=this.position.times(F.pixelDensityRatio),rt=this.size.times(F.pixelDensityRatio),ot;if(!this.context2D&&!this.cacheImageRecord){F.console.warn("[Tile.drawCanvas] attempting to draw tile %s when it's not cached",this.toString());return}if(ot=this.context2D||this.cacheImageRecord.getRenderedContext(),!this.loaded||!ot){F.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}W.save(),W.globalAlpha=this.opacity,typeof K=="number"&&K!==1&&(tt=tt.times(K),rt=rt.times(K)),X instanceof F.Point&&(tt=tt.plus(X)),W.globalAlpha===1&&this._hasTransparencyChannel()&&W.clearRect(tt.x,tt.y,rt.x,rt.y),q({context:W,tile:this,rendered:ot});var ut,yn;this.sourceBounds?(ut=Math.min(this.sourceBounds.width,ot.canvas.width),yn=Math.min(this.sourceBounds.height,ot.canvas.height)):(ut=ot.canvas.width,yn=ot.canvas.height),W.drawImage(ot.canvas,0,0,ut,yn,tt.x,tt.y,rt.x,rt.y),W.restore()},getScaleForEdgeSmoothing:function(){var W;if(this.cacheImageRecord)W=this.cacheImageRecord.getRenderedContext();else if(this.context2D)W=this.context2D;else return F.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;return W.canvas.width/(this.size.x*F.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(W,q,K){var X=Math.max(1,Math.ceil((K.x-q.x)/2)),tt=Math.max(1,Math.ceil((K.y-q.y)/2));return new F.Point(X,tt).minus(this.position.times(F.pixelDensityRatio).times(W||1).apply(function(rt){return rt%1}))},unload:function(){this.imgElement&&this.imgElement.parentNode&&this.imgElement.parentNode.removeChild(this.imgElement),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.imgElement=null,this.loaded=!1,this.loading=!1}}}(OpenSeadragon),function(F){F.OverlayPlacement=F.Placement,F.OverlayRotationMode=F.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),F.Overlay=function(W,q,K){var X;F.isPlainObject(W)?X=W:X={element:W,location:q,placement:K},this.element=X.element,this.style=X.element.style,this._init(X)},F.Overlay.prototype={_init:function(W){this.location=W.location,this.placement=W.placement===void 0?F.Placement.TOP_LEFT:W.placement,this.onDraw=W.onDraw,this.checkResize=W.checkResize===void 0?!0:W.checkResize,this.width=W.width===void 0?null:W.width,this.height=W.height===void 0?null:W.height,this.rotationMode=W.rotationMode||F.OverlayRotationMode.EXACT,this.location instanceof F.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=F.Placement.TOP_LEFT),this.scales=this.width!==null&&this.height!==null,this.bounds=new F.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(W,q){var K=F.Placement.properties[this.placement];K&&(K.isHorizontallyCentered?W.x-=q.x/2:K.isRight&&(W.x-=q.x),K.isVerticallyCentered?W.y-=q.y/2:K.isBottom&&(W.y-=q.y))},destroy:function(){var W=this.element,q=this.style;W.parentNode&&(W.parentNode.removeChild(W),W.prevElementParent&&(q.display="none",document.body.appendChild(W))),this.onDraw=null,q.top="",q.left="",q.position="",this.width!==null&&(q.width=""),this.height!==null&&(q.height="");var K=F.getCssPropertyWithVendorPrefix("transformOrigin"),X=F.getCssPropertyWithVendorPrefix("transform");K&&X&&(q[K]="",q[X]="")},drawHTML:function(W,q){var K=this.element;K.parentNode!==W&&(K.prevElementParent=K.parentNode,K.prevNextSibling=K.nextSibling,W.appendChild(K),this.style.position="absolute",this.size=F.getElementSize(K));var X=this._getOverlayPositionAndSize(q),tt=X.position,rt=this.size=X.size,ot=X.rotate;if(this.onDraw)this.onDraw(tt,rt,this.element);else{var ut=this.style;ut.left=tt.x+"px",ut.top=tt.y+"px",this.width!==null&&(ut.width=rt.x+"px"),this.height!==null&&(ut.height=rt.y+"px");var yn=F.getCssPropertyWithVendorPrefix("transformOrigin"),uo=F.getCssPropertyWithVendorPrefix("transform");yn&&uo&&(ot?(ut[yn]=this._getTransformOrigin(),ut[uo]="rotate("+ot+"deg)"):(ut[yn]="",ut[uo]="")),ut.display!=="none"&&(ut.display="block")}},_getOverlayPositionAndSize:function(W){var q=W.pixelFromPoint(this.location,!0),K=this._getSizeInPixels(W);this.adjust(q,K);var X=0;if(W.degrees&&this.rotationMode!==F.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===F.OverlayRotationMode.BOUNDING_BOX&&this.width!==null&&this.height!==null){var tt=new F.Rect(q.x,q.y,K.x,K.y),rt=this._getBoundingBox(tt,W.degrees);q=rt.getTopLeft(),K=rt.getSize()}else X=W.degrees;return{position:q,size:K,rotate:X}},_getSizeInPixels:function(W){var q=this.size.x,K=this.size.y;if(this.width!==null||this.height!==null){var X=W.deltaPixelsFromPointsNoRotate(new F.Point(this.width||0,this.height||0),!0);this.width!==null&&(q=X.x),this.height!==null&&(K=X.y)}if(this.checkResize&&(this.width===null||this.height===null)){var tt=this.size=F.getElementSize(this.element);this.width===null&&(q=tt.x),this.height===null&&(K=tt.y)}return new F.Point(q,K)},_getBoundingBox:function(W,q){var K=this._getPlacementPoint(W);return W.rotate(q,K).getBoundingBox()},_getPlacementPoint:function(W){var q=new F.Point(W.x,W.y),K=F.Placement.properties[this.placement];return K&&(K.isHorizontallyCentered?q.x+=W.width/2:K.isRight&&(q.x+=W.width),K.isVerticallyCentered?q.y+=W.height/2:K.isBottom&&(q.y+=W.height)),q},_getTransformOrigin:function(){var W="",q=F.Placement.properties[this.placement];return q&&(q.isLeft?W="left":q.isRight&&(W="right"),q.isTop?W+=" top":q.isBottom&&(W+=" bottom")),W},update:function(W,q){var K=F.isPlainObject(W)?W:{location:W,placement:q};this._init({location:K.location||this.location,placement:K.placement!==void 0?K.placement:this.placement,onDraw:K.onDraw||this.onDraw,checkResize:K.checkResize||this.checkResize,width:K.width!==void 0?K.width:this.width,height:K.height!==void 0?K.height:this.height,rotationMode:K.rotationMode||this.rotationMode})},getBounds:function(W){F.console.assert(W,"A viewport must now be passed to Overlay.getBounds.");var q=this.width,K=this.height;if(q===null||K===null){var X=W.deltaPointsFromPixelsNoRotate(this.size,!0);q===null&&(q=X.x),K===null&&(K=X.y)}var tt=this.location.clone();return this.adjust(tt,new F.Point(q,K)),this._adjustBoundsForRotation(W,new F.Rect(tt.x,tt.y,q,K))},_adjustBoundsForRotation:function(W,q){if(!W||W.degrees===0||this.rotationMode===F.OverlayRotationMode.EXACT)return q;if(this.rotationMode===F.OverlayRotationMode.BOUNDING_BOX){if(this.width===null||this.height===null)return q;var K=this._getOverlayPositionAndSize(W);return W.viewerElementToViewportRectangle(new F.Rect(K.position.x,K.position.y,K.size.x,K.size.y))}return q.rotate(-W.degrees,this._getPlacementPoint(q))}}}(OpenSeadragon),function(F){F.Drawer=function(W){F.console.assert(W.viewer,"[Drawer] options.viewer is required");var q=arguments;if(F.isPlainObject(W)||(W={source:q[0],viewport:q[1],element:q[2]}),F.console.assert(W.viewport,"[Drawer] options.viewport is required"),F.console.assert(W.element,"[Drawer] options.element is required"),W.source&&F.console.error("[Drawer] options.source is no longer accepted; use TiledImage instead"),this.viewer=W.viewer,this.viewport=W.viewport,this.debugGridColor=typeof W.debugGridColor=="string"?[W.debugGridColor]:W.debugGridColor||F.DEFAULT_SETTINGS.debugGridColor,W.opacity&&F.console.error("[Drawer] options.opacity is no longer accepted; set the opacity on the TiledImage instead"),this.useCanvas=F.supportsCanvas&&(this.viewer?this.viewer.useCanvas:!0),this.container=F.getElement(W.element),this.canvas=F.makeNeutralElement(this.useCanvas?"canvas":"div"),this.context=this.useCanvas?this.canvas.getContext("2d"):null,this.sketchCanvas=null,this.sketchContext=null,this.element=this.container,this.container.dir="ltr",this.useCanvas){var K=this._calculateCanvasSize();this.canvas.width=K.x,this.canvas.height=K.y}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",F.setElementOpacity(this.canvas,this.opacity,!0),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._imageSmoothingEnabled=!0},F.Drawer.prototype={addOverlay:function(W,q,K,X){return F.console.error("drawer.addOverlay is deprecated. Use viewer.addOverlay instead."),this.viewer.addOverlay(W,q,K,X),this},updateOverlay:function(W,q,K){return F.console.error("drawer.updateOverlay is deprecated. Use viewer.updateOverlay instead."),this.viewer.updateOverlay(W,q,K),this},removeOverlay:function(W){return F.console.error("drawer.removeOverlay is deprecated. Use viewer.removeOverlay instead."),this.viewer.removeOverlay(W),this},clearOverlays:function(){return F.console.error("drawer.clearOverlays is deprecated. Use viewer.clearOverlays instead."),this.viewer.clearOverlays(),this},viewportCoordToDrawerCoord:function(W){var q=this.viewport.pixelFromPointNoRotate(W,!0);return new F.Point(q.x*F.pixelDensityRatio,q.y*F.pixelDensityRatio)},clipWithPolygons:function(W,q){if(this.useCanvas){var K=this._getContext(q);K.beginPath(),W.forEach(function(X){X.forEach(function(tt,rt){K[rt===0?"moveTo":"lineTo"](tt.x,tt.y)})}),K.clip()}},setOpacity:function(W){F.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");for(var q=this.viewer.world,K=0;Kq&&(q=X)}return q},needsUpdate:function(){return F.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return F.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return F.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return F.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var W=this._calculateCanvasSize();if((this.canvas.width!=W.x||this.canvas.height!=W.y)&&(this.canvas.width=W.x,this.canvas.height=W.y,this._updateImageSmoothingEnabled(this.context),this.sketchCanvas!==null)){var q=this._calculateSketchCanvasSize();this.sketchCanvas.width=q.x,this.sketchCanvas.height=q.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(W,q){if(this.useCanvas){var K=this._getContext(W);if(q)K.clearRect(q.x,q.y,q.width,q.height);else{var X=K.canvas;K.clearRect(0,0,X.width,X.height)}}},viewportToDrawerRectangle:function(W){var q=this.viewport.pixelFromPointNoRotate(W.getTopLeft(),!0),K=this.viewport.deltaPixelsFromPointsNoRotate(W.getSize(),!0);return new F.Rect(q.x*F.pixelDensityRatio,q.y*F.pixelDensityRatio,K.x*F.pixelDensityRatio,K.y*F.pixelDensityRatio)},drawTile:function(W,q,K,X,tt){if(F.console.assert(W,"[Drawer.drawTile] tile is required"),F.console.assert(q,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var rt=this._getContext(K);X=X||1,W.drawCanvas(rt,q,X,tt)}else W.drawHTML(this.canvas)},_getContext:function(W){var q=this.context;if(W){if(this.sketchCanvas===null){this.sketchCanvas=document.createElement("canvas");var K=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=K.x,this.sketchCanvas.height=K.y,this.sketchContext=this.sketchCanvas.getContext("2d"),this.viewport.getRotation()===0){var X=this;this.viewer.addHandler("rotate",function tt(){if(X.viewport.getRotation()!==0){X.viewer.removeHandler("rotate",tt);var rt=X._calculateSketchCanvasSize();X.sketchCanvas.width=rt.x,X.sketchCanvas.height=rt.y}})}this._updateImageSmoothingEnabled(this.sketchContext)}q=this.sketchContext}return q},saveContext:function(W){this.useCanvas&&this._getContext(W).save()},restoreContext:function(W){this.useCanvas&&this._getContext(W).restore()},setClip:function(W,q){if(this.useCanvas){var K=this._getContext(q);K.beginPath(),K.rect(W.x,W.y,W.width,W.height),K.clip()}},drawRectangle:function(W,q,K){if(this.useCanvas){var X=this._getContext(K);X.save(),X.fillStyle=q,X.fillRect(W.x,W.y,W.width,W.height),X.restore()}},blendSketch:function(W,q,K,X){var tt=W;if(F.isPlainObject(tt)||(tt={opacity:W,scale:q,translate:K,compositeOperation:X}),!(!this.useCanvas||!this.sketchCanvas)){W=tt.opacity,X=tt.compositeOperation;var rt=tt.bounds;if(this.context.save(),this.context.globalAlpha=W,X&&(this.context.globalCompositeOperation=X),rt)rt.x<0&&(rt.width+=rt.x,rt.x=0),rt.x+rt.width>this.canvas.width&&(rt.width=this.canvas.width-rt.x),rt.y<0&&(rt.height+=rt.y,rt.y=0),rt.y+rt.height>this.canvas.height&&(rt.height=this.canvas.height-rt.y),this.context.drawImage(this.sketchCanvas,rt.x,rt.y,rt.width,rt.height,rt.x,rt.y,rt.width,rt.height);else{q=tt.scale||1,K=tt.translate;var ot=K instanceof F.Point?K:new F.Point(0,0),ut=0,yn=0;if(K){var uo=this.sketchCanvas.width-this.canvas.width,po=this.sketchCanvas.height-this.canvas.height;ut=Math.round(uo/2),yn=Math.round(po/2)}this.context.drawImage(this.sketchCanvas,ot.x-ut*q,ot.y-yn*q,(this.canvas.width+2*ut)*q,(this.canvas.height+2*yn)*q,-ut,-yn,this.canvas.width+2*ut,this.canvas.height+2*yn)}this.context.restore()}},drawDebugInfo:function(W,q,K,X){if(this.useCanvas){var tt=this.viewer.world.getIndexOfItem(X)%this.debugGridColor.length,rt=this.context;rt.save(),rt.lineWidth=2*F.pixelDensityRatio,rt.font="small-caps bold "+13*F.pixelDensityRatio+"px arial",rt.strokeStyle=this.debugGridColor[tt],rt.fillStyle=this.debugGridColor[tt],this.viewport.degrees!==0&&this._offsetForRotation({degrees:this.viewport.degrees}),X.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:X.getRotation(!0),point:X.viewport.pixelFromPointNoRotate(X._getRotationPoint(!0),!0)}),X.viewport.degrees===0&&X.getRotation(!0)%360===0&&X._drawer.viewer.viewport.getFlip()&&X._drawer._flip(),rt.strokeRect(W.position.x*F.pixelDensityRatio,W.position.y*F.pixelDensityRatio,W.size.x*F.pixelDensityRatio,W.size.y*F.pixelDensityRatio);var ot=(W.position.x+W.size.x/2)*F.pixelDensityRatio,ut=(W.position.y+W.size.y/2)*F.pixelDensityRatio;rt.translate(ot,ut),rt.rotate(Math.PI/180*-this.viewport.degrees),rt.translate(-ot,-ut),W.x===0&&W.y===0&&(rt.fillText("Zoom: "+this.viewport.getZoom(),W.position.x*F.pixelDensityRatio,(W.position.y-30)*F.pixelDensityRatio),rt.fillText("Pan: "+this.viewport.getBounds().toString(),W.position.x*F.pixelDensityRatio,(W.position.y-20)*F.pixelDensityRatio)),rt.fillText("Level: "+W.level,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+20)*F.pixelDensityRatio),rt.fillText("Column: "+W.x,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+30)*F.pixelDensityRatio),rt.fillText("Row: "+W.y,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+40)*F.pixelDensityRatio),rt.fillText("Order: "+K+" of "+q,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+50)*F.pixelDensityRatio),rt.fillText("Size: "+W.size.toString(),(W.position.x+10)*F.pixelDensityRatio,(W.position.y+60)*F.pixelDensityRatio),rt.fillText("Position: "+W.position.toString(),(W.position.x+10)*F.pixelDensityRatio,(W.position.y+70)*F.pixelDensityRatio),this.viewport.degrees!==0&&this._restoreRotationChanges(),X.getRotation(!0)%360!==0&&this._restoreRotationChanges(),X.viewport.degrees===0&&X.getRotation(!0)%360===0&&X._drawer.viewer.viewport.getFlip()&&X._drawer._flip(),rt.restore()}},debugRect:function(W){if(this.useCanvas){var q=this.context;q.save(),q.lineWidth=2*F.pixelDensityRatio,q.strokeStyle=this.debugGridColor[0],q.fillStyle=this.debugGridColor[0],q.strokeRect(W.x*F.pixelDensityRatio,W.y*F.pixelDensityRatio,W.width*F.pixelDensityRatio,W.height*F.pixelDensityRatio),q.restore()}},setImageSmoothingEnabled:function(W){this.useCanvas&&(this._imageSmoothingEnabled=W,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(W){W.msImageSmoothingEnabled=this._imageSmoothingEnabled,W.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(W){var q=this._getContext(W).canvas;return new F.Point(q.width,q.height)},getCanvasCenter:function(){return new F.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(W){var q=W.point?W.point.times(F.pixelDensityRatio):this.getCanvasCenter(),K=this._getContext(W.useSketch);K.save(),K.translate(q.x,q.y),this.viewer.viewport.flipped?(K.rotate(Math.PI/180*-W.degrees),K.scale(-1,1)):K.rotate(Math.PI/180*W.degrees),K.translate(-q.x,-q.y)},_flip:function(W){W=W||{};var q=W.point?W.point.times(F.pixelDensityRatio):this.getCanvasCenter(),K=this._getContext(W.useSketch);K.translate(q.x,0),K.scale(-1,1),K.translate(-q.x,0)},_restoreRotationChanges:function(W){var q=this._getContext(W);q.restore()},_calculateCanvasSize:function(){var W=F.pixelDensityRatio,q=this.viewport.getContainerSize();return{x:Math.round(q.x*W),y:Math.round(q.y*W)}},_calculateSketchCanvasSize:function(){var W=this._calculateCanvasSize();if(this.viewport.getRotation()===0)return W;var q=Math.ceil(Math.sqrt(W.x*W.x+W.y*W.y));return{x:q,y:q}}}}(OpenSeadragon),function(F){F.Viewport=function(W){var q=arguments;q.length&&q[0]instanceof F.Point&&(W={containerSize:q[0],contentSize:q[1],config:q[2]}),W.config&&(F.extend(!0,W,W.config),delete W.config),this._margins=F.extend({left:0,top:0,right:0,bottom:0},W.margins||{}),delete W.margins,F.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,viewer:null,springStiffness:F.DEFAULT_SETTINGS.springStiffness,animationTime:F.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:F.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:F.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:F.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:F.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:F.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:F.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:F.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:F.DEFAULT_SETTINGS.maxZoomLevel,degrees:F.DEFAULT_SETTINGS.degrees,flipped:F.DEFAULT_SETTINGS.flipped,homeFillsViewer:F.DEFAULT_SETTINGS.homeFillsViewer},W),this._updateContainerInnerSize(),this.centerSpringX=new F.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new F.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new F.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._setContentBounds(new F.Rect(0,0,1,1),1),this.goHome(!0),this.update()},F.Viewport.prototype={resetContentSize:function(W){return F.console.assert(W,"[Viewport.resetContentSize] contentSize is required"),F.console.assert(W instanceof F.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),F.console.assert(W.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),F.console.assert(W.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new F.Rect(0,0,1,W.y/W.x),W.x),this},setHomeBounds:function(W,q){F.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(W,q)},_setContentBounds:function(W,q){F.console.assert(W,"[Viewport._setContentBounds] bounds is required"),F.console.assert(W instanceof F.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),F.console.assert(W.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),F.console.assert(W.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=W.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(q),this._contentBounds=W.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(q),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:q,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var W=this._contentAspectRatio/this.getAspectRatio(),q;return this.homeFillsViewer?q=W>=1?W:1:q=W>=1?1:W,q/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var W=this._contentBounds.getCenter(),q=1/this.getHomeZoom(),K=q/this.getAspectRatio();return new F.Rect(W.x-q/2,W.y-K/2,q,K)},goHome:function(W){return this.viewer&&this.viewer.raiseEvent("home",{immediately:W}),this.fitBounds(this.getHomeBounds(),W)},getMinZoom:function(){var W=this.getHomeZoom(),q=this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*W;return q},getMaxZoom:function(){var W=this.maxZoomLevel;return W||(W=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,W/=this._contentBounds.width),Math.max(W,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new F.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return F.extend({},this._margins)},setMargins:function(W){F.console.assert(F.type(W)==="object","[Viewport.setMargins] margins must be an object"),this._margins=F.extend({left:0,top:0,right:0,bottom:0},W),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(W){return this.getBoundsNoRotate(W).rotate(-this.getRotation())},getBoundsNoRotate:function(W){var q=this.getCenter(W),K=1/this.getZoom(W),X=K/this.getAspectRatio();return new F.Rect(q.x-K/2,q.y-X/2,K,X)},getBoundsWithMargins:function(W){return this.getBoundsNoRotateWithMargins(W).rotate(-this.getRotation(),this.getCenter(W))},getBoundsNoRotateWithMargins:function(W){var q=this.getBoundsNoRotate(W),K=this._containerInnerSize.x*this.getZoom(W);return q.x-=this._margins.left/K,q.y-=this._margins.top/K,q.width+=(this._margins.left+this._margins.right)/K,q.height+=(this._margins.top+this._margins.bottom)/K,q},getCenter:function(W){var q=new F.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),K=new F.Point(this.centerSpringX.target.value,this.centerSpringY.target.value),X,tt,rt,ot,ut,yn,uo,po;return W?q:this.zoomPoint?(X=this.pixelFromPoint(this.zoomPoint,!0),tt=this.getZoom(),rt=1/tt,ot=rt/this.getAspectRatio(),ut=new F.Rect(q.x-rt/2,q.y-ot/2,rt,ot),yn=this._pixelFromPoint(this.zoomPoint,ut),uo=yn.minus(X),po=uo.divide(this._containerInnerSize.x*tt),K.plus(po)):K},getZoom:function(W){return W?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(W){return Math.max(Math.min(W,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(W){var q=new F.Rect(W.x,W.y,W.width,W.height);if(!this.wrapHorizontal){var K=this.visibilityRatio*q.width,X=q.x+q.width,tt=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,rt=this._contentBoundsNoRotate.x-X+K,ot=tt-q.x-K;K>this._contentBoundsNoRotate.width?q.x+=(rt+ot)/2:ot<0?q.x+=ot:rt>0&&(q.x+=rt)}if(!this.wrapVertical){var ut=this.visibilityRatio*q.height,yn=q.y+q.height,uo=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,po=this._contentBoundsNoRotate.y-yn+ut,mo=uo-q.y-ut;ut>this._contentBoundsNoRotate.height?q.y+=(po+mo)/2:mo<0?q.y+=mo:po>0&&(q.y+=po)}return q},_raiseConstraintsEvent:function(W){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:W})},applyConstraints:function(W){var q=this.getZoom(),K=this._applyZoomConstraints(q);q!==K&&this.zoomTo(K,this.zoomPoint,W);var X=this.getBoundsNoRotate(),tt=this._applyBoundaryConstraints(X);return this._raiseConstraintsEvent(W),(X.x!==tt.x||X.y!==tt.y||W)&&this.fitBounds(tt.rotate(-this.getRotation()),W),this},ensureVisible:function(W){return this.applyConstraints(W)},_fitBounds:function(W,q){q=q||{};var K=q.immediately||!1,X=q.constraints||!1,tt=this.getAspectRatio(),rt=W.getCenter(),ot=new F.Rect(W.x,W.y,W.width,W.height,W.degrees+this.getRotation()).getBoundingBox();ot.getAspectRatio()>=tt?ot.height=ot.width/tt:ot.width=ot.height*tt,ot.x=rt.x-ot.width/2,ot.y=rt.y-ot.height/2;var ut=1/ot.width;if(X){var yn=ot.getAspectRatio(),uo=this._applyZoomConstraints(ut);ut!==uo&&(ut=uo,ot.width=1/ut,ot.x=rt.x-ot.width/2,ot.height=ot.width/yn,ot.y=rt.y-ot.height/2),ot=this._applyBoundaryConstraints(ot),rt=ot.getCenter(),this._raiseConstraintsEvent(K)}if(K)return this.panTo(rt,!0),this.zoomTo(ut,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var po=this.getBounds(),mo=this.getZoom();if(mo===0||Math.abs(ut/mo-1)<1e-8)return this.zoomTo(ut,!0),this.panTo(rt,K);ot=ot.rotate(-this.getRotation());var wo=ot.getTopLeft().times(ut).minus(po.getTopLeft().times(mo)).divide(ut-mo);return this.zoomTo(ut,wo,K)},fitBounds:function(W,q){return this._fitBounds(W,{immediately:q,constraints:!1})},fitBoundsWithConstraints:function(W,q){return this._fitBounds(W,{immediately:q,constraints:!0})},fitVertically:function(W){var q=new F.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(q,W)},fitHorizontally:function(W){var q=new F.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(q,W)},getConstrainedBounds:function(W){var q,K;return q=this.getBounds(W),K=this._applyBoundaryConstraints(q),K},panBy:function(W,q){var K=new F.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(K.plus(W),q)},panTo:function(W,q){return q?(this.centerSpringX.resetTo(W.x),this.centerSpringY.resetTo(W.y)):(this.centerSpringX.springTo(W.x),this.centerSpringY.springTo(W.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:W,immediately:q}),this},zoomBy:function(W,q,K){return this.zoomTo(this.zoomSpring.target.value*W,q,K)},zoomTo:function(W,q,K){var X=this;return this.zoomPoint=q instanceof F.Point&&!isNaN(q.x)&&!isNaN(q.y)?q:null,K?this._adjustCenterSpringsForZoomPoint(function(){X.zoomSpring.resetTo(W)}):this.zoomSpring.springTo(W),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:W,refPoint:q,immediately:K}),this},setRotation:function(W){return!this.viewer||!this.viewer.drawer.canRotate()?this:(this.degrees=F.positiveModulo(W,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:W}),this)},getRotation:function(){return this.degrees},resize:function(W,q){var K=this.getBoundsNoRotate(),X=K,tt;return this.containerSize.x=W.x,this.containerSize.y=W.y,this._updateContainerInnerSize(),q&&(tt=W.x/this.containerSize.x,X.width=K.width*tt,X.height=X.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:W,maintain:q}),this.fitBounds(X,!0)},_updateContainerInnerSize:function(){this._containerInnerSize=new F.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var W=this;this._adjustCenterSpringsForZoomPoint(function(){W.zoomSpring.update()}),this.centerSpringX.update(),this.centerSpringY.update();var q=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,q},_adjustCenterSpringsForZoomPoint:function(W){if(this.zoomPoint){var q=this.pixelFromPoint(this.zoomPoint,!0);W();var K=this.pixelFromPoint(this.zoomPoint,!0),X=K.minus(q),tt=this.deltaPointsFromPixels(X,!0);this.centerSpringX.shiftBy(tt.x),this.centerSpringY.shiftBy(tt.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else W()},deltaPixelsFromPointsNoRotate:function(W,q){return W.times(this._containerInnerSize.x*this.getZoom(q))},deltaPixelsFromPoints:function(W,q){return this.deltaPixelsFromPointsNoRotate(W.rotate(this.getRotation()),q)},deltaPointsFromPixelsNoRotate:function(W,q){return W.divide(this._containerInnerSize.x*this.getZoom(q))},deltaPointsFromPixels:function(W,q){return this.deltaPointsFromPixelsNoRotate(W,q).rotate(-this.getRotation())},pixelFromPointNoRotate:function(W,q){return this._pixelFromPointNoRotate(W,this.getBoundsNoRotate(q))},pixelFromPoint:function(W,q){return this._pixelFromPoint(W,this.getBoundsNoRotate(q))},_pixelFromPointNoRotate:function(W,q){return W.minus(q.getTopLeft()).times(this._containerInnerSize.x/q.width).plus(new F.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(W,q){return this._pixelFromPointNoRotate(W.rotate(this.getRotation(),this.getCenter(!0)),q)},pointFromPixelNoRotate:function(W,q){var K=this.getBoundsNoRotate(q);return W.minus(new F.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/K.width).plus(K.getTopLeft())},pointFromPixel:function(W,q){return this.pointFromPixelNoRotate(W,q).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(W,q){var K=this._contentBoundsNoRotate.width;return new F.Point(W*this._contentSizeNoRotate.x/K,q*this._contentSizeNoRotate.x/K)},viewportToImageCoordinates:function(W,q){if(W instanceof F.Point)return this.viewportToImageCoordinates(W.x,W.y);if(this.viewer){var K=this.viewer.world.getItemCount();if(K>1)F.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(K===1){var X=this.viewer.world.getItemAt(0);return X.viewportToImageCoordinates(W,q,!0)}}return this._viewportToImageDelta(W-this._contentBoundsNoRotate.x,q-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(W,q){var K=this._contentBoundsNoRotate.width;return new F.Point(W/this._contentSizeNoRotate.x*K,q/this._contentSizeNoRotate.x*K)},imageToViewportCoordinates:function(W,q){if(W instanceof F.Point)return this.imageToViewportCoordinates(W.x,W.y);if(this.viewer){var K=this.viewer.world.getItemCount();if(K>1)F.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(K===1){var X=this.viewer.world.getItemAt(0);return X.imageToViewportCoordinates(W,q,!0)}}var tt=this._imageToViewportDelta(W,q);return tt.x+=this._contentBoundsNoRotate.x,tt.y+=this._contentBoundsNoRotate.y,tt},imageToViewportRectangle:function(W,q,K,X){var tt=W;if(tt instanceof F.Rect||(tt=new F.Rect(W,q,K,X)),this.viewer){var rt=this.viewer.world.getItemCount();if(rt>1)F.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(rt===1){var ot=this.viewer.world.getItemAt(0);return ot.imageToViewportRectangle(W,q,K,X,!0)}}var ut=this.imageToViewportCoordinates(tt.x,tt.y),yn=this._imageToViewportDelta(tt.width,tt.height);return new F.Rect(ut.x,ut.y,yn.x,yn.y,tt.degrees)},viewportToImageRectangle:function(W,q,K,X){var tt=W;if(tt instanceof F.Rect||(tt=new F.Rect(W,q,K,X)),this.viewer){var rt=this.viewer.world.getItemCount();if(rt>1)F.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(rt===1){var ot=this.viewer.world.getItemAt(0);return ot.viewportToImageRectangle(W,q,K,X,!0)}}var ut=this.viewportToImageCoordinates(tt.x,tt.y),yn=this._viewportToImageDelta(tt.width,tt.height);return new F.Rect(ut.x,ut.y,yn.x,yn.y,tt.degrees)},viewerElementToImageCoordinates:function(W){var q=this.pointFromPixel(W,!0);return this.viewportToImageCoordinates(q)},imageToViewerElementCoordinates:function(W){var q=this.imageToViewportCoordinates(W);return this.pixelFromPoint(q,!0)},windowToImageCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var q=W.minus(F.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(q)},imageToWindowCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer.");var q=this.imageToViewerElementCoordinates(W);return q.plus(F.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(W){return this.pointFromPixel(W,!0)},viewportToViewerElementCoordinates:function(W){return this.pixelFromPoint(W,!0)},viewerElementToViewportRectangle:function(W){return F.Rect.fromSummits(this.pointFromPixel(W.getTopLeft(),!0),this.pointFromPixel(W.getTopRight(),!0),this.pointFromPixel(W.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(W){return F.Rect.fromSummits(this.pixelFromPoint(W.getTopLeft(),!0),this.pixelFromPoint(W.getTopRight(),!0),this.pixelFromPoint(W.getBottomLeft(),!0))},windowToViewportCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var q=W.minus(F.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(q)},viewportToWindowCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer.");var q=this.viewportToViewerElementCoordinates(W);return q.plus(F.getElementPosition(this.viewer.element))},viewportToImageZoom:function(W){if(this.viewer){var q=this.viewer.world.getItemCount();if(q>1)F.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(q===1){var K=this.viewer.world.getItemAt(0);return K.viewportToImageZoom(W)}}var X=this._contentSizeNoRotate.x,tt=this._containerInnerSize.x,rt=this._contentBoundsNoRotate.width,ot=tt/X*rt;return W*ot},imageToViewportZoom:function(W){if(this.viewer){var q=this.viewer.world.getItemCount();if(q>1)F.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(q===1){var K=this.viewer.world.getItemAt(0);return K.imageToViewportZoom(W)}}var X=this._contentSizeNoRotate.x,tt=this._containerInnerSize.x,rt=this._contentBoundsNoRotate.width,ot=X/tt/rt;return W*ot},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(W){return this.flipped===W?this:(this.flipped=W,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:W}),this)}}}(OpenSeadragon),function(F){F.TiledImage=function(cf){var vf=this;F.console.assert(cf.tileCache,"[TiledImage] options.tileCache is required"),F.console.assert(cf.drawer,"[TiledImage] options.drawer is required"),F.console.assert(cf.viewer,"[TiledImage] options.viewer is required"),F.console.assert(cf.imageLoader,"[TiledImage] options.imageLoader is required"),F.console.assert(cf.source,"[TiledImage] options.source is required"),F.console.assert(!cf.clip||cf.clip instanceof F.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),F.EventSource.call(this),this._tileCache=cf.tileCache,delete cf.tileCache,this._drawer=cf.drawer,delete cf.drawer,this._imageLoader=cf.imageLoader,delete cf.imageLoader,cf.clip instanceof F.Rect&&(this._clip=cf.clip.clone()),delete cf.clip;var _f=cf.x||0;delete cf.x;var $f=cf.y||0;delete cf.y,this.normHeight=cf.source.dimensions.y/cf.source.dimensions.x,this.contentAspectX=cf.source.dimensions.x/cf.source.dimensions.y;var wf=1;cf.width?(wf=cf.width,delete cf.width,cf.height&&(F.console.error("specifying both width and height to a tiledImage is not supported"),delete cf.height)):cf.height&&(wf=cf.height/this.normHeight,delete cf.height);var Pf=cf.fitBounds;delete cf.fitBounds;var Cf=cf.fitBoundsPlacement||OpenSeadragon.Placement.CENTER;delete cf.fitBoundsPlacement;var Af=cf.degrees||0;delete cf.degrees,F.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:F.DEFAULT_SETTINGS.springStiffness,animationTime:F.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:F.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:F.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:F.DEFAULT_SETTINGS.wrapVertical,immediateRender:F.DEFAULT_SETTINGS.immediateRender,blendTime:F.DEFAULT_SETTINGS.blendTime,alwaysBlend:F.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:F.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:F.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:F.DEFAULT_SETTINGS.iOSDevice,debugMode:F.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:F.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:F.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:F.DEFAULT_SETTINGS.placeholderFillStyle,opacity:F.DEFAULT_SETTINGS.opacity,preload:F.DEFAULT_SETTINGS.preload,compositeOperation:F.DEFAULT_SETTINGS.compositeOperation},cf),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new F.Spring({initial:_f,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new F.Spring({initial:$f,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new F.Spring({initial:wf,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new F.Spring({initial:Af,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),Pf&&this.fitBounds(Pf,Cf,!0),this._drawingHandler=function(Bf){vf.viewer.raiseEvent("tile-drawing",F.extend({tiledImage:vf},Bf))}},F.extend(F.TiledImage.prototype,F.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(cf){cf!==this._fullyLoaded&&(this._fullyLoaded=cf,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=F.now(),this._needsDraw=!0},update:function(){var cf=this._xSpring.update(),vf=this._ySpring.update(),_f=this._scaleSpring.update(),$f=this._degreesSpring.update();return cf||vf||_f||$f?(this._updateForScale(),this._needsDraw=!0,!0):!1},draw:function(){this.opacity!==0||this._preload?(this._midDraw=!0,this._updateViewport(),this._midDraw=!1):this._needsDraw=!1},destroy:function(){this.reset()},getBounds:function(cf){return this.getBoundsNoRotate(cf).rotate(this.getRotation(cf),this._getRotationPoint(cf))},getBoundsNoRotate:function(cf){return cf?new F.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new F.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return F.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(cf){var vf=this.getBoundsNoRotate(cf);if(this._clip){var _f=cf?this._worldWidthCurrent:this._worldWidthTarget,$f=_f/this.source.dimensions.x,wf=this._clip.times($f);vf=new F.Rect(vf.x+wf.x,vf.y+wf.y,wf.width,wf.height)}return vf.rotate(this.getRotation(cf),this._getRotationPoint(cf))},getContentSize:function(){return new F.Point(this.source.dimensions.x,this.source.dimensions.y)},_viewportToImageDelta:function(cf,vf,_f){var $f=_f?this._scaleSpring.current.value:this._scaleSpring.target.value;return new F.Point(cf*(this.source.dimensions.x/$f),vf*(this.source.dimensions.y*this.contentAspectX/$f))},viewportToImageCoordinates:function(cf,vf,_f){var $f;return cf instanceof F.Point?(_f=vf,$f=cf):$f=new F.Point(cf,vf),$f=$f.rotate(-this.getRotation(_f),this._getRotationPoint(_f)),_f?this._viewportToImageDelta($f.x-this._xSpring.current.value,$f.y-this._ySpring.current.value):this._viewportToImageDelta($f.x-this._xSpring.target.value,$f.y-this._ySpring.target.value)},_imageToViewportDelta:function(cf,vf,_f){var $f=_f?this._scaleSpring.current.value:this._scaleSpring.target.value;return new F.Point(cf/this.source.dimensions.x*$f,vf/this.source.dimensions.y/this.contentAspectX*$f)},imageToViewportCoordinates:function(cf,vf,_f){cf instanceof F.Point&&(_f=vf,vf=cf.y,cf=cf.x);var $f=this._imageToViewportDelta(cf,vf);return _f?($f.x+=this._xSpring.current.value,$f.y+=this._ySpring.current.value):($f.x+=this._xSpring.target.value,$f.y+=this._ySpring.target.value),$f.rotate(this.getRotation(_f),this._getRotationPoint(_f))},imageToViewportRectangle:function(cf,vf,_f,$f,wf){var Pf=cf;Pf instanceof F.Rect?wf=vf:Pf=new F.Rect(cf,vf,_f,$f);var Cf=this.imageToViewportCoordinates(Pf.getTopLeft(),wf),Af=this._imageToViewportDelta(Pf.width,Pf.height,wf);return new F.Rect(Cf.x,Cf.y,Af.x,Af.y,Pf.degrees+this.getRotation(wf))},viewportToImageRectangle:function(cf,vf,_f,$f,wf){var Pf=cf;cf instanceof F.Rect?wf=vf:Pf=new F.Rect(cf,vf,_f,$f);var Cf=this.viewportToImageCoordinates(Pf.getTopLeft(),wf),Af=this._viewportToImageDelta(Pf.width,Pf.height,wf);return new F.Rect(Cf.x,Cf.y,Af.x,Af.y,Pf.degrees-this.getRotation(wf))},viewerElementToImageCoordinates:function(cf){var vf=this.viewport.pointFromPixel(cf,!0);return this.viewportToImageCoordinates(vf)},imageToViewerElementCoordinates:function(cf){var vf=this.imageToViewportCoordinates(cf);return this.viewport.pixelFromPoint(vf,!0)},windowToImageCoordinates:function(cf){var vf=cf.minus(OpenSeadragon.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(vf)},imageToWindowCoordinates:function(cf){var vf=this.imageToViewerElementCoordinates(cf);return vf.plus(OpenSeadragon.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(cf){var vf=this._scaleSpring.current.value;return cf=cf.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new F.Rect((cf.x-this._xSpring.current.value)/vf,(cf.y-this._ySpring.current.value)/vf,cf.width/vf,cf.height/vf,cf.degrees)},viewportToImageZoom:function(cf){var vf=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return vf*cf},imageToViewportZoom:function(cf){var vf=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return cf/vf},setPosition:function(cf,vf){var _f=this._xSpring.target.value===cf.x&&this._ySpring.target.value===cf.y;if(vf){if(_f&&this._xSpring.current.value===cf.x&&this._ySpring.current.value===cf.y)return;this._xSpring.resetTo(cf.x),this._ySpring.resetTo(cf.y),this._needsDraw=!0}else{if(_f)return;this._xSpring.springTo(cf.x),this._ySpring.springTo(cf.y),this._needsDraw=!0}_f||this._raiseBoundsChange()},setWidth:function(cf,vf){this._setScale(cf,vf)},setHeight:function(cf,vf){this._setScale(cf/this.normHeight,vf)},setCroppingPolygons:function(cf){var vf=function($f){return $f instanceof F.Point||typeof $f.x=="number"&&typeof $f.y=="number"},_f=function($f){return $f.map(function(wf){try{if(vf(wf))return{x:wf.x,y:wf.y};throw new Error}catch{throw new Error("A Provided cropping polygon point is not supported")}})};try{if(!F.isArray(cf))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=cf.map(function($f){return _f($f)})}catch($f){F.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),F.console.error($f),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(cf,vf,_f){vf=vf||F.Placement.CENTER;var $f=F.Placement.properties[vf],wf=this.contentAspectX,Pf=0,Cf=0,Af=1,Bf=1;if(this._clip&&(wf=this._clip.getAspectRatio(),Af=this._clip.width/this.source.dimensions.x,Bf=this._clip.height/this.source.dimensions.y,cf.getAspectRatio()>wf?(Pf=this._clip.x/this._clip.height*cf.height,Cf=this._clip.y/this._clip.height*cf.height):(Pf=this._clip.x/this._clip.width*cf.width,Cf=this._clip.y/this._clip.width*cf.width)),cf.getAspectRatio()>wf){var Hf=cf.height/Bf,Df=0;$f.isHorizontallyCentered?Df=(cf.width-cf.height*wf)/2:$f.isRight&&(Df=cf.width-cf.height*wf),this.setPosition(new F.Point(cf.x-Pf+Df,cf.y-Cf),_f),this.setHeight(Hf,_f)}else{var Lf=cf.width/Af,kf=0;$f.isVerticallyCentered?kf=(cf.height-cf.width/wf)/2:$f.isBottom&&(kf=cf.height-cf.width/wf),this.setPosition(new F.Point(cf.x-Pf,cf.y-Cf+kf),_f),this.setWidth(Lf,_f)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(cf){F.console.assert(!cf||cf instanceof F.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),cf instanceof F.Rect?this._clip=cf.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getOpacity:function(){return this.opacity},setOpacity:function(cf){cf!==this.opacity&&(this.opacity=cf,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(cf){this._preload=!!cf,this._needsDraw=!0},getRotation:function(cf){return cf?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(cf,vf){this._degreesSpring.target.value===cf&&this._degreesSpring.isAtTargetValue()||(vf?this._degreesSpring.resetTo(cf):this._degreesSpring.springTo(cf),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(cf){return this.getBoundsNoRotate(cf).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(cf){cf!==this.compositeOperation&&(this.compositeOperation=cf,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(cf,vf){var _f=this._scaleSpring.target.value===cf;if(vf){if(_f&&this._scaleSpring.current.value===cf)return;this._scaleSpring.resetTo(cf),this._updateForScale(),this._needsDraw=!0}else{if(_f)return;this._scaleSpring.springTo(cf),this._updateForScale(),this._needsDraw=!0}_f||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var cf=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),vf=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,_f=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(vf/this.minPixelRatio)/Math.log(2))));return _f=Math.max(_f,this.source.minLevel||0),cf=Math.min(cf,_f),{lowestLevel:cf,highestLevel:_f}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){var cf=this.lastDrawn.pop();cf.beingDrawn=!1}var vf=this.viewport,_f=this._viewportToTiledImageRectangle(vf.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var $f=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(_f=_f.intersection($f),_f===null)return}for(var wf=this._getLevelsInterval(),Pf=wf.lowestLevel,Cf=wf.highestLevel,Af=null,Bf=!1,Hf=F.now(),Df=Cf;Df>=Pf;Df--){var Lf=!1,kf=vf.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Df),!0).x*this._scaleSpring.current.value;if(Df===Pf||!Bf&&kf>=this.minPixelRatio)Lf=!0,Bf=!0;else if(!Bf)continue;var Nf=vf.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Df),!1).x*this._scaleSpring.current.value,Yf=vf.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,Gf=this.immediateRender?1:Yf,rp=Math.min(1,(kf-.5)/.5),ip=Gf/Math.abs(Gf-Nf);if(Af=W(this,Bf,Lf,Df,rp,ip,_f,Hf,Af),yn(this.coverage,Df))break}lf(this,this.lastDrawn),Af&&!Af.context2D?(X(this,Af,Hf),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(this._tilesLoading===0)},_getCornerTiles:function(cf,vf,_f){var $f,wf;this.wrapHorizontal?($f=F.positiveModulo(vf.x,1),wf=F.positiveModulo(_f.x,1)):($f=Math.max(0,vf.x),wf=Math.min(1,_f.x));var Pf,Cf,Af=1/this.source.aspectRatio;this.wrapVertical?(Pf=F.positiveModulo(vf.y,Af),Cf=F.positiveModulo(_f.y,Af)):(Pf=Math.max(0,vf.y),Cf=Math.min(Af,_f.y));var Bf=this.source.getTileAtPoint(cf,new F.Point($f,Pf)),Hf=this.source.getTileAtPoint(cf,new F.Point(wf,Cf)),Df=this.source.getNumTiles(cf);return this.wrapHorizontal&&(Bf.x+=Df.x*Math.floor(vf.x),Hf.x+=Df.x*Math.floor(_f.x)),this.wrapVertical&&(Bf.y+=Df.y*Math.floor(vf.y/Af),Hf.y+=Df.y*Math.floor(_f.y/Af)),{topLeft:Bf,bottomRight:Hf}}});function W(cf,vf,_f,$f,wf,Pf,Cf,Af,Bf){var Hf=Cf.getBoundingBox().getTopLeft(),Df=Cf.getBoundingBox().getBottomRight();cf.viewer&&cf.viewer.raiseEvent("update-level",{tiledImage:cf,havedrawn:vf,level:$f,opacity:wf,visibility:Pf,drawArea:Cf,topleft:Hf,bottomright:Df,currenttime:Af,best:Bf}),mo(cf.coverage,$f),mo(cf.loadingCoverage,$f);for(var Lf=cf._getCornerTiles($f,Hf,Df),kf=Lf.topLeft,Nf=Lf.bottomRight,Yf=cf.source.getNumTiles($f),Gf=cf.viewport.pixelFromPoint(cf.viewport.getCenter()),rp=kf.x;rp<=Nf.x;rp++)for(var ip=kf.y;ip<=Nf.y;ip++){if(!cf.wrapHorizontal&&!cf.wrapVertical){var ap=cf.source.getTileBounds($f,rp,ip);if(Cf.intersection(ap)===null)continue}Bf=q(cf,_f,vf,rp,ip,$f,wf,Pf,Gf,Yf,Af,Bf)}return Bf}function q(cf,vf,_f,$f,wf,Pf,Cf,Af,Bf,Hf,Df,Lf){var kf=K($f,wf,Pf,cf,cf.source,cf.tilesMatrix,Df,Hf,cf._worldWidthCurrent,cf._worldHeightCurrent),Nf=_f;cf.viewer&&cf.viewer.raiseEvent("update-tile",{tiledImage:cf,tile:kf}),po(cf.coverage,Pf,$f,wf,!1);var Yf=kf.loaded||kf.loading||uo(cf.loadingCoverage,Pf,$f,wf);if(po(cf.loadingCoverage,Pf,$f,wf,Yf),!kf.exists||(vf&&!Nf&&(uo(cf.coverage,Pf,$f,wf)?po(cf.coverage,Pf,$f,wf,!0):Nf=!0),!Nf))return Lf;if(ot(kf,cf.source.tileOverlap,cf.viewport,Bf,Af,cf),!kf.loaded)if(kf.context2D)rt(cf,kf);else{var Gf=cf._tileCache.getImageRecord(kf.cacheKey);if(Gf){var rp=Gf.getImage();rt(cf,kf,rp)}}if(kf.loaded){var ip=ut(cf,kf,$f,wf,Pf,Cf,Df);ip&&(cf._needsDraw=!0)}else kf.loading?cf._tilesLoading++:Yf||(Lf=wo(Lf,kf));return Lf}function K(cf,vf,_f,$f,wf,Pf,Cf,Af,Bf,Hf){var Df,Lf,kf,Nf,Yf,Gf,rp,ip,ap;return Pf[_f]||(Pf[_f]={}),Pf[_f][cf]||(Pf[_f][cf]={}),Pf[_f][cf][vf]||(Df=(Af.x+cf%Af.x)%Af.x,Lf=(Af.y+vf%Af.y)%Af.y,kf=wf.getTileBounds(_f,Df,Lf),Nf=wf.getTileBounds(_f,Df,Lf,!0),Yf=wf.tileExists(_f,Df,Lf),Gf=wf.getTileUrl(_f,Df,Lf),$f.loadTilesWithAjax?(rp=wf.getTileAjaxHeaders(_f,Df,Lf),F.isPlainObject($f.ajaxHeaders)&&(rp=F.extend({},$f.ajaxHeaders,rp))):rp=null,ip=wf.getContext2D?wf.getContext2D(_f,Df,Lf):void 0,kf.x+=(cf-Df)/Af.x,kf.y+=Hf/Bf*((vf-Lf)/Af.y),ap=new F.Tile(_f,cf,vf,kf,Yf,Gf,ip,$f.loadTilesWithAjax,rp,Nf),Df===Af.x-1&&(ap.isRightMost=!0),Lf===Af.y-1&&(ap.isBottomMost=!0),Pf[_f][cf][vf]=ap),ap=Pf[_f][cf][vf],ap.lastTouchTime=Cf,ap}function X(cf,vf,_f){vf.loading=!0,cf._imageLoader.addJob({src:vf.url,loadWithAjax:vf.loadWithAjax,ajaxHeaders:vf.ajaxHeaders,crossOriginPolicy:cf.crossOriginPolicy,ajaxWithCredentials:cf.ajaxWithCredentials,callback:function($f,wf,Pf){tt(cf,vf,_f,$f,wf,Pf)},abort:function(){vf.loading=!1}})}function tt(cf,vf,_f,$f,wf,Pf){if(!$f){F.console.log("Tile %s failed to load: %s - error: %s",vf,vf.url,wf),cf.viewer.raiseEvent("tile-load-failed",{tile:vf,tiledImage:cf,time:_f,message:wf,tileRequest:Pf}),vf.loading=!1,vf.exists=!1;return}if(_fcf.visibility||vf.visibility==cf.visibility&&vf.squaredDistance1&&Af>cf.smoothTileEdgesMinZoom&&!cf.iOSDevice&&cf.getRotation(!0)%360===0&&F.supportsCanvas&&($f=!0,wf=_f.getScaleForEdgeSmoothing(),Pf=_f.getTranslationForEdgeSmoothing(wf,cf._drawer.getCanvasSize(!1),cf._drawer.getCanvasSize(!0)));var Bf;$f&&(wf||(Bf=cf.viewport.viewportToViewerElementRectangle(cf.getClippedBounds(!0)).getIntegerBoundingBox(),cf._drawer.viewer.viewport.getFlip()&&(cf.viewport.degrees!==0||cf.getRotation(!0)%360!==0)&&(Bf.x=cf._drawer.viewer.container.clientWidth-(Bf.x+Bf.width)),Bf=Bf.times(F.pixelDensityRatio)),cf._drawer._clear(!0,Bf)),wf||(cf.viewport.degrees!==0&&cf._drawer._offsetForRotation({degrees:cf.viewport.degrees,useSketch:$f}),cf.getRotation(!0)%360!==0&&cf._drawer._offsetForRotation({degrees:cf.getRotation(!0),point:cf.viewport.pixelFromPointNoRotate(cf._getRotationPoint(!0),!0),useSketch:$f}),cf.viewport.degrees===0&&cf.getRotation(!0)%360===0&&cf._drawer.viewer.viewport.getFlip()&&cf._drawer._flip());var Hf=!1;if(cf._clip){cf._drawer.saveContext($f);var Df=cf.imageToViewportRectangle(cf._clip,!0);Df=Df.rotate(-cf.getRotation(!0),cf._getRotationPoint(!0));var Lf=cf._drawer.viewportToDrawerRectangle(Df);wf&&(Lf=Lf.times(wf)),Pf&&(Lf=Lf.translate(Pf)),cf._drawer.setClip(Lf,$f),Hf=!0}if(cf._croppingPolygons){cf._drawer.saveContext($f);try{var kf=cf._croppingPolygons.map(function(rp){return rp.map(function(ip){var ap=cf.imageToViewportCoordinates(ip.x,ip.y,!0).rotate(-cf.getRotation(!0),cf._getRotationPoint(!0)),yp=cf._drawer.viewportCoordToDrawerCoord(ap);return wf&&(yp=yp.times(wf)),yp})});cf._drawer.clipWithPolygons(kf,$f)}catch(rp){F.console.error(rp)}Hf=!0}if(cf.placeholderFillStyle&&cf._hasOpaqueTile===!1){var Nf=cf._drawer.viewportToDrawerRectangle(cf.getBounds(!0));wf&&(Nf=Nf.times(wf)),Pf&&(Nf=Nf.translate(Pf));var Yf=null;typeof cf.placeholderFillStyle=="function"?Yf=cf.placeholderFillStyle(cf,cf._drawer.context):Yf=cf.placeholderFillStyle,cf._drawer.drawRectangle(Nf,Yf,$f)}for(var Gf=vf.length-1;Gf>=0;Gf--)_f=vf[Gf],cf._drawer.drawTile(_f,cf._drawingHandler,$f,wf,Pf),_f.beingDrawn=!0,cf.viewer&&cf.viewer.raiseEvent("tile-drawn",{tiledImage:cf,tile:_f});Hf&&cf._drawer.restoreContext($f),wf||(cf.getRotation(!0)%360!==0&&cf._drawer._restoreRotationChanges($f),cf.viewport.degrees!==0&&cf._drawer._restoreRotationChanges($f)),$f&&(wf&&(cf.viewport.degrees!==0&&cf._drawer._offsetForRotation({degrees:cf.viewport.degrees,useSketch:!1}),cf.getRotation(!0)%360!==0&&cf._drawer._offsetForRotation({degrees:cf.getRotation(!0),point:cf.viewport.pixelFromPointNoRotate(cf._getRotationPoint(!0),!0),useSketch:!1})),cf._drawer.blendSketch({opacity:cf.opacity,scale:wf,translate:Pf,compositeOperation:cf.compositeOperation,bounds:Bf}),wf&&(cf.getRotation(!0)%360!==0&&cf._drawer._restoreRotationChanges(!1),cf.viewport.degrees!==0&&cf._drawer._restoreRotationChanges(!1))),wf||cf.viewport.degrees===0&&cf.getRotation(!0)%360===0&&cf._drawer.viewer.viewport.getFlip()&&cf._drawer._flip(),yf(cf,vf)}}function yf(cf,vf){if(cf.debugMode)for(var _f=vf.length-1;_f>=0;_f--){var $f=vf[_f];try{cf._drawer.drawDebugInfo($f,vf.length,_f,cf)}catch(wf){F.console.error(wf)}}}}(OpenSeadragon),function(F){var W=function(K){F.console.assert(K,"[TileCache.cacheTile] options is required"),F.console.assert(K.tile,"[TileCache.cacheTile] options.tile is required"),F.console.assert(K.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=K.tile,this.tiledImage=K.tiledImage},q=function(K){F.console.assert(K,"[ImageRecord] options is required"),F.console.assert(K.image,"[ImageRecord] options.image is required"),this._image=K.image,this._tiles=[]};q.prototype={destroy:function(){this._image=null,this._renderedContext=null,this._tiles=null},getImage:function(){return this._image},getRenderedContext:function(){if(!this._renderedContext){var K=document.createElement("canvas");K.width=this._image.width,K.height=this._image.height,this._renderedContext=K.getContext("2d"),this._renderedContext.drawImage(this._image,0,0),this._image=null}return this._renderedContext},setRenderedContext:function(K){F.console.error("ImageRecord.setRenderedContext is deprecated. The rendered context should be created by the ImageRecord itself when calling ImageRecord.getRenderedContext."),this._renderedContext=K},addTile:function(K){F.console.assert(K,"[ImageRecord.addTile] tile is required"),this._tiles.push(K)},removeTile:function(K){for(var X=0;Xthis._maxImageCacheCount){for(var ot=null,ut=-1,yn=null,uo,po,mo,wo,lf,yf,cf=this._tilesLoaded.length-1;cf>=0;cf--)if(yf=this._tilesLoaded[cf],uo=yf.tile,!(uo.level<=X||uo.beingDrawn)){if(!ot){ot=uo,ut=cf,yn=yf;continue}wo=uo.lastTouchTime,po=ot.lastTouchTime,lf=uo.level,mo=ot.level,(womo)&&(ot=uo,ut=cf,yn=yf)}ot&&ut>=0&&(this._unloadTile(yn),tt=ut)}this._tilesLoaded[tt]=new W({tile:K.tile,tiledImage:K.tiledImage})},clearTilesFor:function(K){F.console.assert(K,"[TileCache.clearTilesFor] tiledImage is required");for(var X,tt=0;tt=this._items.length)throw new Error("Index bigger than number of layers.");q===K||K===-1||(this._items.splice(K,1),this._items.splice(q,0,W),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:W,previousIndex:K,newIndex:q}))},removeItem:function(W){F.console.assert(W,"[World.removeItem] item is required");var q=F.indexOf(this._items,W);q!==-1&&(W.removeHandler("bounds-change",this._delegatedFigureSizes),W.removeHandler("clip-change",this._delegatedFigureSizes),W.destroy(),this._items.splice(q,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(W))},removeAll:function(){this.viewer._cancelPendingImages();var W,q;for(q=0;qwo.height?lf=rt:lf=rt*(wo.width/wo.height),yf=lf*(wo.height/wo.width),cf=new F.Point(uo+(rt-lf)/2,po+(rt-yf)/2),mo.setPosition(cf,q),mo.setWidth(lf,q),K==="horizontal"?uo+=ut:po+=ut;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var W=this._homeBounds?this._homeBounds.clone():null,q=this._contentSize?this._contentSize.clone():null,K=this._contentFactor||0;if(!this._items.length)this._homeBounds=new F.Rect(0,0,1,1),this._contentSize=new F.Point(1,1),this._contentFactor=1;else{var X=this._items[0],tt=X.getBounds();this._contentFactor=X.getContentSize().x/tt.width;for(var rt=X.getClippedBounds().getBoundingBox(),ot=rt.x,ut=rt.y,yn=rt.x+rt.width,uo=rt.y+rt.height,po=1;pout.version.major)throw new Error("OpenSeadragonViewerInputHook requires OpenSeadragon version 1.0.0+");return ut.Viewer.prototype.addViewerInputHook=function(uo){return(uo=uo||{}).viewer=this,new yn.ViewerInputHook(uo)},yn.ViewerInputHook=function(uo){var po,mo;for((uo=uo||{}).hooks=uo.hooks||[],this.viewer=uo.viewer||null,this.viewerTrackers={},this.hooks=[],this.viewer&&(this.viewerTrackers.viewer=this.viewer.innerTracker,this.viewerTrackers.viewer_outer=this.viewer.outerTracker),po=0;polf in wo?q(wo,lf,{enumerable:!0,configurable:!0,writable:!0,value:yf}):wo[lf]=yf,yn=(wo,lf)=>{for(var yf in lf||(lf={}))rt.call(lf,yf)&&ut(wo,yf,lf[yf]);if(tt)for(var yf of tt(lf))ot.call(lf,yf)&&ut(wo,yf,lf[yf]);return wo},uo=(wo,lf)=>K(wo,X(lf)),po=(wo,lf)=>{var yf={};for(var cf in wo)rt.call(wo,cf)&&lf.indexOf(cf)<0&&(yf[cf]=wo[cf]);if(wo!=null&&tt)for(var cf of tt(wo))lf.indexOf(cf)<0&&ot.call(wo,cf)&&(yf[cf]=wo[cf]);return yf},mo=(wo,lf,yf)=>(ut(wo,typeof lf!="symbol"?lf+"":lf,yf),yf);(function(wo,lf){F.exports=lf(requireOpenseadragon())})(commonjsGlobal$3,function(wo){function lf(go){return go&&typeof go=="object"&&"default"in go?go:{default:go}}var yf=lf(wo),cf,vf,_f,$f,wf,Pf,Cf,Af={},Bf=[],Hf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Df(go,xo){for(var uf in xo)go[uf]=xo[uf];return go}function Lf(go){var xo=go.parentNode;xo&&xo.removeChild(go)}function kf(go,xo,uf){var df,gf,Ef,Rf={};for(Ef in xo)Ef=="key"?df=xo[Ef]:Ef=="ref"?gf=xo[Ef]:Rf[Ef]=xo[Ef];if(arguments.length>2&&(Rf.children=arguments.length>3?cf.call(arguments,2):uf),typeof go=="function"&&go.defaultProps!=null)for(Ef in go.defaultProps)Rf[Ef]===void 0&&(Rf[Ef]=go.defaultProps[Ef]);return Nf(go,Rf,df,gf,null)}function Nf(go,xo,uf,df,gf){var Ef={type:go,props:xo,key:uf,ref:df,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:gf??++_f};return vf.vnode!=null&&vf.vnode(Ef),Ef}function Yf(){return{current:null}}function Gf(go){return go.children}function rp(go,xo){this.props=go,this.context=xo}function ip(go,xo){if(xo==null)return go.__?ip(go.__,go.__.__k.indexOf(go)+1):null;for(var uf;xo0?Nf(Pp.type,Pp.props,Pp.key,null,Pp.__v):Pp)!=null){if(Pp.__=uf,Pp.__b=uf.__b+1,(Tp=Tg[Jf])===null||Tp&&Pp.key==Tp.key&&Pp.type===Tp.type)Tg[Jf]=void 0;else for(mp=0;mp2&&(Rf.children=arguments.length>3?cf.call(arguments,2):uf),Nf(go.type,Rf,df||go.key,gf||go.ref,null)}function bp(go,xo){var uf={__c:xo="__cC"+Cf++,__:go,Consumer:function(df,gf){return df.children(gf)},Provider:function(df){var gf,Ef;return this.getChildContext||(gf=[],(Ef={})[xo]=this,this.getChildContext=function(){return Ef},this.shouldComponentUpdate=function(Rf){this.props.value!==Rf.value&&gf.some(yp)},this.sub=function(Rf){gf.push(Rf);var Vf=Rf.componentWillUnmount;Rf.componentWillUnmount=function(){gf.splice(gf.indexOf(Rf),1),Vf&&Vf.call(Rf)}}),df.children}};return uf.Provider.__=uf.Consumer.contextType=uf}cf=Bf.slice,vf={__e:function(go,xo){for(var uf,df,gf;xo=xo.__;)if((uf=xo.__c)&&!uf.__)try{if((df=uf.constructor)&&df.getDerivedStateFromError!=null&&(uf.setState(df.getDerivedStateFromError(go)),gf=uf.__d),uf.componentDidCatch!=null&&(uf.componentDidCatch(go),gf=uf.__d),gf)return uf.__E=uf}catch(Ef){go=Ef}throw go}},_f=0,rp.prototype.setState=function(go,xo){var uf;uf=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Df({},this.state),typeof go=="function"&&(go=go(Df({},uf),this.props)),go&&Df(uf,go),go!=null&&this.__v&&(xo&&this.__h.push(xo),yp(this))},rp.prototype.forceUpdate=function(go){this.__v&&(this.__e=!0,go&&this.__h.push(go),yp(this))},rp.prototype.render=Gf,$f=[],wf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,vp.__r=0,Cf=0;var Ep,_p,Mp,Yp=0,ug=[],hg=vf.__b,xg=vf.__r,kg=vf.diffed,Dg=vf.__c,lm=vf.unmount;function Bp(go,xo){vf.__h&&vf.__h(_p,go,Yp||xo),Yp=0;var uf=_p.__H||(_p.__H={__:[],__h:[]});return go>=uf.__.length&&uf.__.push({}),uf.__[go]}function Rp(go){return Yp=1,Fp(Hg,go)}function Fp(go,xo,uf){var df=Bp(Ep++,2);return df.t=go,df.__c||(df.__=[uf?uf(xo):Hg(void 0,xo),function(gf){var Ef=df.t(df.__[0],gf);df.__[0]!==Ef&&(df.__=[Ef,df.__[1]],df.__c.setState({}))}],df.__c=_p),df.__}function Op(go,xo){var uf=Bp(Ep++,3);!vf.__s&&mm(uf.__H,xo)&&(uf.__=go,uf.__H=xo,_p.__H.__h.push(uf))}function Kp(go,xo){var uf=Bp(Ep++,4);!vf.__s&&mm(uf.__H,xo)&&(uf.__=go,uf.__H=xo,_p.__h.push(uf))}function Kf(go){return Yp=5,gp(function(){return{current:go}},[])}function Xf(go,xo,uf){Yp=6,Kp(function(){typeof go=="function"?go(xo()):go&&(go.current=xo())},uf==null?uf:uf.concat(go))}function gp(go,xo){var uf=Bp(Ep++,7);return mm(uf.__H,xo)&&(uf.__=go(),uf.__H=xo,uf.__h=go),uf.__}function wp(go,xo){return Yp=8,gp(function(){return go},xo)}function dg(go){var xo=_p.context[go.__c],uf=Bp(Ep++,9);return uf.c=go,xo?(uf.__==null&&(uf.__=!0,xo.sub(_p)),xo.props.value):go.__}function mg(go,xo){vf.useDebugValue&&vf.useDebugValue(xo?xo(go):go)}function pg(go){var xo=Bp(Ep++,10),uf=Rp();return xo.__=go,_p.componentDidCatch||(_p.componentDidCatch=function(df){xo.__&&xo.__(df),uf[1](df)}),[uf[0],function(){uf[1](void 0)}]}function wg(){ug.forEach(function(go){if(go.__P)try{go.__H.__h.forEach(Bg),go.__H.__h.forEach(Xg),go.__H.__h=[]}catch(xo){go.__H.__h=[],vf.__e(xo,go.__v)}}),ug=[]}vf.__b=function(go){_p=null,hg&&hg(go)},vf.__r=function(go){xg&&xg(go),Ep=0;var xo=(_p=go.__c).__H;xo&&(xo.__h.forEach(Bg),xo.__h.forEach(Xg),xo.__h=[])},vf.diffed=function(go){kg&&kg(go);var xo=go.__c;xo&&xo.__H&&xo.__H.__h.length&&(ug.push(xo)!==1&&Mp===vf.requestAnimationFrame||((Mp=vf.requestAnimationFrame)||function(uf){var df,gf=function(){clearTimeout(Ef),Cg&&cancelAnimationFrame(df),setTimeout(uf)},Ef=setTimeout(gf,100);Cg&&(df=requestAnimationFrame(gf))})(wg)),_p=void 0},vf.__c=function(go,xo){xo.some(function(uf){try{uf.__h.forEach(Bg),uf.__h=uf.__h.filter(function(df){return!df.__||Xg(df)})}catch(df){xo.some(function(gf){gf.__h&&(gf.__h=[])}),xo=[],vf.__e(df,uf.__v)}}),Dg&&Dg(go,xo)},vf.unmount=function(go){lm&&lm(go);var xo=go.__c;if(xo&&xo.__H)try{xo.__H.__.forEach(Bg)}catch(uf){vf.__e(uf,xo.__v)}};var Cg=typeof requestAnimationFrame=="function";function Bg(go){var xo=_p;typeof go.__c=="function"&&go.__c(),_p=xo}function Xg(go){var xo=_p;go.__c=go.__(),_p=xo}function mm(go,xo){return!go||go.length!==xo.length||xo.some(function(uf,df){return uf!==go[df]})}function Hg(go,xo){return typeof xo=="function"?xo(go):xo}function Iy(go,xo){for(var uf in xo)go[uf]=xo[uf];return go}function py(go,xo){for(var uf in go)if(uf!=="__source"&&!(uf in xo))return!0;for(var df in xo)if(df!=="__source"&&go[df]!==xo[df])return!0;return!1}function Yy(go){this.props=go}function Yb(go,xo){function uf(gf){var Ef=this.props.ref,Rf=Ef==gf.ref;return!Rf&&Ef&&(Ef.call?Ef(null):Ef.current=null),xo?!xo(this.props,gf)||!Rf:py(this.props,gf)}function df(gf){return this.shouldComponentUpdate=uf,kf(go,gf)}return df.displayName="Memo("+(go.displayName||go.name)+")",df.prototype.isReactComponent=!0,df.__f=!0,df}(Yy.prototype=new rp).isPureReactComponent=!0,Yy.prototype.shouldComponentUpdate=function(go,xo){return py(this.props,go)||py(this.state,xo)};var p0=vf.__b;vf.__b=function(go){go.type&&go.type.__f&&go.ref&&(go.props.ref=go.ref,go.ref=null),p0&&p0(go)};var _b=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Fy(go){function xo(uf,df){var gf=Iy({},uf);return delete gf.ref,go(gf,(df=uf.ref||df)&&(typeof df!="object"||"current"in df)?df:null)}return xo.$$typeof=_b,xo.render=xo,xo.prototype.isReactComponent=xo.__f=!0,xo.displayName="ForwardRef("+(go.displayName||go.name)+")",xo}var qg=function(go,xo){return go==null?null:Ip(Ip(go).map(xo))},E1={map:qg,forEach:qg,count:function(go){return go?Ip(go).length:0},only:function(go){var xo=Ip(go);if(xo.length!==1)throw"Children.only";return xo[0]},toArray:Ip},A$=vf.__e;vf.__e=function(go,xo,uf){if(go.then){for(var df,gf=xo;gf=gf.__;)if((df=gf.__c)&&df.__c)return xo.__e==null&&(xo.__e=uf.__e,xo.__k=uf.__k),df.__c(go,xo)}A$(go,xo,uf)};var qv=vf.unmount;function H0(){this.__u=0,this.t=null,this.__b=null}function wb(go){var xo=go.__.__c;return xo&&xo.__e&&xo.__e(go)}function R$(go){var xo,uf,df;function gf(Ef){if(xo||(xo=go()).then(function(Rf){uf=Rf.default||Rf},function(Rf){df=Rf}),df)throw df;if(!uf)throw xo;return kf(uf,Ef)}return gf.displayName="Lazy",gf.__f=!0,gf}function g0(){this.u=null,this.o=null}vf.unmount=function(go){var xo=go.__c;xo&&xo.__R&&xo.__R(),xo&&go.__h===!0&&(go.type=null),qv&&qv(go)},(H0.prototype=new rp).__c=function(go,xo){var uf=xo.__c,df=this;df.t==null&&(df.t=[]),df.t.push(uf);var gf=wb(df.__v),Ef=!1,Rf=function(){Ef||(Ef=!0,uf.__R=null,gf?gf(Vf):Vf())};uf.__R=Rf;var Vf=function(){if(!--df.__u){if(df.state.__e){var ep=df.state.__e;df.__v.__k[0]=function mp(Tp,Pp,tg){return Tp&&(Tp.__v=null,Tp.__k=Tp.__k&&Tp.__k.map(function(gg){return mp(gg,Pp,tg)}),Tp.__c&&Tp.__c.__P===Pp&&(Tp.__e&&tg.insertBefore(Tp.__e,Tp.__d),Tp.__c.__e=!0,Tp.__c.__P=tg)),Tp}(ep,ep.__c.__P,ep.__c.__O)}var Jf;for(df.setState({__e:df.__b=null});Jf=df.t.pop();)Jf.forceUpdate()}},Qf=xo.__h===!0;df.__u++||Qf||df.setState({__e:df.__b=df.__v.__k[0]}),go.then(Rf,Rf)},H0.prototype.componentWillUnmount=function(){this.t=[]},H0.prototype.render=function(go,xo){if(this.__b){if(this.__v.__k){var uf=document.createElement("div"),df=this.__v.__k[0].__c;this.__v.__k[0]=function Ef(Rf,Vf,Qf){return Rf&&(Rf.__c&&Rf.__c.__H&&(Rf.__c.__H.__.forEach(function(ep){typeof ep.__c=="function"&&ep.__c()}),Rf.__c.__H=null),(Rf=Iy({},Rf)).__c!=null&&(Rf.__c.__P===Qf&&(Rf.__c.__P=Vf),Rf.__c=null),Rf.__k=Rf.__k&&Rf.__k.map(function(ep){return Ef(ep,Vf,Qf)})),Rf}(this.__b,uf,df.__O=df.__P)}this.__b=null}var gf=xo.__e&&kf(Gf,null,go.fallback);return gf&&(gf.__h=null),[kf(Gf,null,xo.__e?null:go.children),gf]};var m_=function(go,xo,uf){if(++uf[1]===uf[0]&&go.o.delete(xo),go.props.revealOrder&&(go.props.revealOrder[0]!=="t"||!go.o.size))for(uf=go.u;uf;){for(;uf.length>3;)uf.pop()();if(uf[1]>>1,1),xo.i.removeChild(df)}}),hp(kf(Jg,{context:xo.context},go.__v),xo.l)):xo.l&&xo.componentWillUnmount()}function Eg(go,xo){return kf(Hp,{__v:go,i:xo})}(g0.prototype=new rp).__e=function(go){var xo=this,uf=wb(xo.__v),df=xo.o.get(go);return df[0]++,function(gf){var Ef=function(){xo.props.revealOrder?(df.push(gf),m_(xo,go,df)):gf()};uf?uf(Ef):Ef()}},g0.prototype.render=function(go){this.u=null,this.o=new Map;var xo=Ip(go.children);go.revealOrder&&go.revealOrder[0]==="b"&&xo.reverse();for(var uf=xo.length;uf--;)this.o.set(xo[uf],this.u=[1,0,this.u]);return go.children},g0.prototype.componentDidUpdate=g0.prototype.componentDidMount=function(){var go=this;this.o.forEach(function(xo,uf){m_(go,uf,xo)})};var Gg=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,yv=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Py=function(go){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(go)};function Cv(go,xo,uf){return xo.__k==null&&(xo.textContent=""),hp(go,xo),typeof uf=="function"&&uf(),go?go.__c:null}function By(go,xo,uf){return $p(go,xo),typeof uf=="function"&&uf(),go?go.__c:null}rp.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(go){Object.defineProperty(rp.prototype,go,{configurable:!0,get:function(){return this["UNSAFE_"+go]},set:function(xo){Object.defineProperty(this,go,{configurable:!0,writable:!0,value:xo})}})});var S1=vf.event;function T1(){}function jy(){return this.cancelBubble}function cw(){return this.defaultPrevented}vf.event=function(go){return S1&&(go=S1(go)),go.persist=T1,go.isPropagationStopped=jy,go.isDefaultPrevented=cw,go.nativeEvent=go};var xb,N$={configurable:!0,get:function(){return this.class}},$x=vf.vnode;vf.vnode=function(go){var xo=go.type,uf=go.props,df=uf;if(typeof xo=="string"){for(var gf in df={},uf){var Ef=uf[gf];gf==="value"&&"defaultValue"in uf&&Ef==null||(gf==="defaultValue"&&"value"in uf&&uf.value==null?gf="value":gf==="download"&&Ef===!0?Ef="":/ondoubleclick/i.test(gf)?gf="ondblclick":/^onchange(textarea|input)/i.test(gf+xo)&&!Py(uf.type)?gf="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(gf)?gf=gf.toLowerCase():yv.test(gf)?gf=gf.replace(/[A-Z0-9]/,"-$&").toLowerCase():Ef===null&&(Ef=void 0),df[gf]=Ef)}xo=="select"&&df.multiple&&Array.isArray(df.value)&&(df.value=Ip(uf.children).forEach(function(Rf){Rf.props.selected=df.value.indexOf(Rf.props.value)!=-1})),xo=="select"&&df.defaultValue!=null&&(df.value=Ip(uf.children).forEach(function(Rf){Rf.props.selected=df.multiple?df.defaultValue.indexOf(Rf.props.value)!=-1:df.defaultValue==Rf.props.value})),go.props=df}xo&&uf.class!=uf.className&&(N$.enumerable="className"in uf,uf.className!=null&&(df.class=uf.className),Object.defineProperty(df,"className",N$)),go.$$typeof=Gg,$x&&$x(go)};var _x=vf.__r;vf.__r=function(go){_x&&_x(go),xb=go.__c};var Kb={ReactCurrentDispatcher:{current:{readContext:function(go){return xb.__n[go.__c].props.value}}}},dv="17.0.2";function Ov(go){return kf.bind(null,go)}function Xb(go){return!!go&&go.$$typeof===Gg}function Y1(go){return Xb(go)?Vp.apply(null,arguments):go}function K1(go){return!!go.__k&&(hp(null,go),!0)}function Zb(go){return go&&(go.base||go.nodeType===1&&go)||null}var Tm=function(go,xo){return go(xo)},cm=function(go,xo){return go(xo)},uw=Gf,Zg={useState:Rp,useReducer:Fp,useEffect:Op,useLayoutEffect:Kp,useRef:Kf,useImperativeHandle:Xf,useMemo:gp,useCallback:wp,useContext:dg,useDebugValue:mg,version:"17.0.2",Children:E1,render:Cv,hydrate:By,unmountComponentAtNode:K1,createPortal:Eg,createElement:kf,createContext:bp,createFactory:Ov,cloneElement:Y1,createRef:Yf,Fragment:Gf,isValidElement:Xb,findDOMNode:Zb,Component:rp,PureComponent:Yy,memo:Yb,forwardRef:Fy,flushSync:cm,unstable_batchedUpdates:Tm,StrictMode:Gf,Suspense:H0,SuspenseList:g0,lazy:R$,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Kb},_m=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Zg,version:dv,Children:E1,render:Cv,hydrate:By,unmountComponentAtNode:K1,createPortal:Eg,createFactory:Ov,cloneElement:Y1,isValidElement:Xb,findDOMNode:Zb,PureComponent:Yy,memo:Yb,forwardRef:Fy,flushSync:cm,unstable_batchedUpdates:Tm,StrictMode:uw,Suspense:H0,SuspenseList:g0,lazy:R$,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Kb,createElement:kf,createContext:bp,createRef:Yf,Fragment:Gf,Component:rp,useState:Rp,useReducer:Fp,useEffect:Op,useLayoutEffect:Kp,useRef:Kf,useImperativeHandle:Xf,useMemo:gp,useCallback:wp,useContext:dg,useDebugValue:mg,useErrorBoundary:pg}),Eb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof commonjsGlobal$3<"u"?commonjsGlobal$3:typeof self<"u"?self:{};function v_(go){return go&&go.__esModule&&Object.prototype.hasOwnProperty.call(go,"default")?go.default:go}function X1(go){if(go.__esModule)return go;var xo=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(go).forEach(function(uf){var df=Object.getOwnPropertyDescriptor(go,uf);Object.defineProperty(xo,uf,df.get?df:{enumerable:!0,get:function(){return go[uf]}})}),xo}var Yv={exports:{}};function Iv(){}Iv.prototype={on:function(go,xo,uf){var df=this.e||(this.e={});return(df[go]||(df[go]=[])).push({fn:xo,ctx:uf}),this},once:function(go,xo,uf){var df=this;function gf(){df.off(go,gf),xo.apply(uf,arguments)}return gf._=xo,this.on(go,gf,uf)},emit:function(go){var xo=[].slice.call(arguments,1),uf=((this.e||(this.e={}))[go]||[]).slice(),df=0,gf=uf.length;for(df;df0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";var df=(go=window.document)===null||go===void 0||(xo=go.documentElement)===null||xo===void 0?void 0:xo.style;if(!df||uf in df)return"";for(var gf=0;gf=0?($.Browser.vendor=$.BROWSERS.FIREFOX,$.Browser.version=parseFloat(W.substring(W.indexOf("Firefox")+8))):W.indexOf("Safari")>=0?($.Browser.vendor=W.indexOf("Chrome")>=0?$.BROWSERS.CHROME:$.BROWSERS.SAFARI,$.Browser.version=parseFloat(W.substring(W.substring(0,W.indexOf("Safari")).lastIndexOf("/")+1,W.indexOf("Safari")))):(q=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),q.exec(W)!==null&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(RegExp.$1))));break;case"Opera":$.Browser.vendor=$.BROWSERS.OPERA,$.Browser.version=parseFloat(F);break}var K=window.location.search.substring(1),X=K.split("&"),tt,rt,ot;for(ot=0;ot0){var ut=tt.substring(0,rt),yn=tt.substring(rt+1);try{URLPARAMS[ut]=decodeURIComponent(yn)}catch{$.console.error("Ignoring malformed URL parameter: %s=%s",ut,yn)}}$.Browser.alpha=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9||$.Browser.vendor==$.BROWSERS.CHROME&&$.Browser.version<2),$.Browser.opacity=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9)})(),function(F){var W=F.requestAnimationFrame||F.mozRequestAnimationFrame||F.webkitRequestAnimationFrame||F.msRequestAnimationFrame,q=F.cancelAnimationFrame||F.mozCancelAnimationFrame||F.webkitCancelAnimationFrame||F.msCancelAnimationFrame;if(W&&q)$.requestAnimationFrame=function(){return W.apply(F,arguments)},$.cancelAnimationFrame=function(){return q.apply(F,arguments)};else{var K=[],X=[],tt=0,rt;$.requestAnimationFrame=function(ot){return K.push([++tt,ot]),rt||(rt=setInterval(function(){if(K.length){var ut=$.now(),yn=X;for(X=K,K=yn;X.length;)X.shift()[1](ut)}else clearInterval(rt),rt=void 0},1e3/50)),tt},$.cancelAnimationFrame=function(ot){var ut,yn;for(ut=0,yn=K.length;ut8||"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",F.MouseTracker.supportsMouseCapture=function(){var Kf=document.createElement("div");return F.isFunction(Kf.setCapture)&&F.isFunction(Kf.releaseCapture)}(),F.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur",F.MouseTracker.wheelEventName],F.MouseTracker.wheelEventName=="DOMMouseScroll"&&F.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent&&(window.navigator.pointerEnabled||F.Browser.vendor!==F.BROWSERS.IE)?(F.MouseTracker.havePointerEvents=!0,F.MouseTracker.subscribeEvents.push("pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),F.MouseTracker.unprefixedPointerEvents=!0,navigator.maxTouchPoints?F.MouseTracker.maxTouchPoints=navigator.maxTouchPoints:F.MouseTracker.maxTouchPoints=0,F.MouseTracker.haveMouseEnter=!1):window.MSPointerEvent&&window.navigator.msPointerEnabled?(F.MouseTracker.havePointerEvents=!0,F.MouseTracker.subscribeEvents.push("MSPointerOver","MSPointerOut","MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"),F.MouseTracker.unprefixedPointerEvents=!1,navigator.msMaxTouchPoints?F.MouseTracker.maxTouchPoints=navigator.msMaxTouchPoints:F.MouseTracker.maxTouchPoints=0,F.MouseTracker.haveMouseEnter=!1):(F.MouseTracker.havePointerEvents=!1,F.Browser.vendor===F.BROWSERS.IE&&F.Browser.version<9?(F.MouseTracker.subscribeEvents.push("mouseenter","mouseleave"),F.MouseTracker.haveMouseEnter=!0):(F.MouseTracker.subscribeEvents.push("mouseover","mouseout"),F.MouseTracker.haveMouseEnter=!1),F.MouseTracker.subscribeEvents.push("mousedown","mouseup","mousemove"),"ontouchstart"in window&&F.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&F.MouseTracker.subscribeEvents.push("gesturestart","gesturechange"),F.MouseTracker.mousePointerId="legacy-mouse",F.MouseTracker.maxTouchPoints=10),F.MouseTracker.GesturePointList=function(Kf){this._gPoints=[],this.type=Kf,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},F.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(Kf){return this._gPoints.push(Kf)},removeById:function(Kf){var Xf,gp=this._gPoints.length;for(Xf=0;Xf1&&(this.type==="mouse"||this.type==="pen")&&(this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};function K(Kf){var Xf=q[Kf.hash],gp,wp=Xf.activePointersLists.length;for(gp=0;gp0&&(F.removeEvent(F.MouseTracker.captureElement,"mousemove",Xf.mousemovecaptured,!0),F.removeEvent(F.MouseTracker.captureElement,"mouseup",Xf.mouseupcaptured,!0),F.removeEvent(F.MouseTracker.captureElement,F.MouseTracker.unprefixedPointerEvents?"pointermove":"MSPointerMove",Xf.pointermovecaptured,!0),F.removeEvent(F.MouseTracker.captureElement,F.MouseTracker.unprefixedPointerEvents?"pointerup":"MSPointerUp",Xf.pointerupcaptured,!0),F.removeEvent(F.MouseTracker.captureElement,"touchmove",Xf.touchmovecaptured,!0),F.removeEvent(F.MouseTracker.captureElement,"touchend",Xf.touchendcaptured,!0),Xf.activePointersLists[gp].captureCount=0);for(gp=0;gp0){for(wp=0;wp0&&(lm(Kf,Xf,mg,0),gp.captureCount=1,ut(Kf,gp.type),kg(Kf,Xf,mg))}}function Jp(Kf,Xf){var gp,wp,dg,mg=Xf.changedTouches.length,pg=[],wg,Cg=Kf.getActivePointersListByType("touch");for(gp=F.now(),Cg.getLength()>Xf.touches.length-mg&&(F.console.warn("Tracked touch contact count doesn't match event.touches.length. Removing all tracked touch pointers."),Ip(Kf,Xf,Cg)),wp=0;wp"u")return Ip(Kf,Xf,mg),!1;for(Bg=0;Bg"u"?!0:q.attachToViewer,this.autoFade=typeof q.autoFade>"u"?!0:q.autoFade,this.element=W,this.anchor=q.anchor,this.container=K,this.anchor==F.ControlAnchor.ABSOLUTE?(this.wrapper=F.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top=typeof q.top=="number"?q.top+"px":q.top,this.wrapper.style.left=typeof q.left=="number"?q.left+"px":q.left,this.wrapper.style.height=typeof q.height=="number"?q.height+"px":q.height,this.wrapper.style.width=typeof q.width=="number"?q.width+"px":q.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=F.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor==F.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),q.attachToViewer?this.anchor==F.ControlAnchor.TOP_RIGHT||this.anchor==F.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):X.appendChild(this.wrapper)},F.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.container.removeChild(this.wrapper)},isVisible:function(){return this.wrapper.style.display!="none"},setVisible:function(W){this.wrapper.style.display=W?this.anchor==F.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(W){this.element[F.SIGNAL]&&F.Browser.vendor==F.BROWSERS.IE?F.setElementOpacity(this.element,W,!0):F.setElementOpacity(this.wrapper,W,!0)}}}(OpenSeadragon),function(F){F.ControlDock=function(q){var K=["topleft","topright","bottomright","bottomleft"],X,tt;for(F.extend(!0,this,{id:"controldock-"+F.now()+"-"+Math.floor(Math.random()*1e6),container:F.makeNeutralElement("div"),controls:[]},q),this.container.onsubmit=function(){return!1},this.element&&(this.element=F.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),tt=0;tt=0)){switch(K.anchor){case F.ControlAnchor.TOP_RIGHT:X=this.controls.topright,q.style.position="relative",q.style.paddingRight="0px",q.style.paddingTop="0px";break;case F.ControlAnchor.BOTTOM_RIGHT:X=this.controls.bottomright,q.style.position="relative",q.style.paddingRight="0px",q.style.paddingBottom="0px";break;case F.ControlAnchor.BOTTOM_LEFT:X=this.controls.bottomleft,q.style.position="relative",q.style.paddingLeft="0px",q.style.paddingBottom="0px";break;case F.ControlAnchor.TOP_LEFT:X=this.controls.topleft,q.style.position="relative",q.style.paddingLeft="0px",q.style.paddingTop="0px";break;case F.ControlAnchor.ABSOLUTE:X=this.container,q.style.margin="0px",q.style.padding="0px";break;default:case F.ControlAnchor.NONE:X=this.container,q.style.margin="0px",q.style.padding="0px";break}this.controls.push(new F.Control(q,K,X)),q.style.display="inline-block"}},removeControl:function(q){q=F.getElement(q);var K=W(this,q);return K>=0&&(this.controls[K].destroy(),this.controls.splice(K,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var q;for(q=this.controls.length-1;q>=0;q--)if(this.controls[q].isVisible())return!0;return!1},setControlsEnabled:function(q){var K;for(K=this.controls.length-1;K>=0;K--)this.controls[K].setVisible(q);return this}};function W(q,K){var X=q.controls,tt;for(tt=X.length-1;tt>=0;tt--)if(X[tt].element==K)return tt;return-1}}(OpenSeadragon),function(F){F.Placement=F.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(OpenSeadragon),function(F){var W={},q=1;F.Viewer=function(Of){var qf=arguments,cp=this,hp;if(F.isPlainObject(Of)||(Of={id:qf[0],xmlPath:qf.length>1?qf[1]:void 0,prefixUrl:qf.length>2?qf[2]:void 0,controls:qf.length>3?qf[3]:void 0,overlays:qf.length>4?qf[4]:void 0}),Of.config&&(F.extend(!0,Of,Of.config),delete Of.config),F.extend(!0,this,{id:Of.id,hash:Of.hash||q++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttons:null,profiler:null},F.DEFAULT_SETTINGS,Of),typeof this.hash>"u")throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(typeof W[this.hash]<"u"&&F.console.warn("Hash "+this.hash+" has already been used."),W[this.hash]={fsBoundsDelta:new F.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._lastScrollTime=F.now(),F.EventSource.call(this),this.addHandler("open-failed",function($p){var Vp=F.getString("Errors.OpenFailed",$p.eventSource,$p.message);cp._showMessage(Vp)}),F.ControlDock.call(this,Of),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=F.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",function($p){$p.width="100%",$p.height="100%",$p.overflow="hidden",$p.position="absolute",$p.top="0px",$p.left="0px"}(this.canvas.style),F.setElementTouchActionNone(this.canvas),Of.tabIndex!==""&&(this.canvas.tabIndex=Of.tabIndex===void 0?0:Of.tabIndex),this.container.className="openseadragon-container",function($p){$p.width="100%",$p.height="100%",$p.position="relative",$p.overflow="hidden",$p.left="0px",$p.top="0px",$p.textAlign="left"}(this.container.style),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new F.MouseTracker({element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,keyDownHandler:F.delegate(this,lf),keyHandler:F.delegate(this,yf),clickHandler:F.delegate(this,cf),dblClickHandler:F.delegate(this,vf),dragHandler:F.delegate(this,_f),dragEndHandler:F.delegate(this,$f),enterHandler:F.delegate(this,xf),exitHandler:F.delegate(this,Af),pressHandler:F.delegate(this,Cf),releaseHandler:F.delegate(this,Pf),nonPrimaryPressHandler:F.delegate(this,Bf),nonPrimaryReleaseHandler:F.delegate(this,Hf),scrollHandler:F.delegate(this,Lf),pinchHandler:F.delegate(this,Df)}),this.outerTracker=new F.MouseTracker({element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:F.delegate(this,kf),exitHandler:F.delegate(this,Nf)}),this.toolbar&&(this.toolbar=new F.ControlDock({element:this.toolbar})),this.bindStandardControls(),W[this.hash].prevContainerSize=K(this.container),this.world=new F.World({viewer:this}),this.world.addHandler("add-item",function($p){cp.source=cp.world.getItemAt(0).source,W[cp.hash].forceRedraw=!0,cp._updateRequestId||(cp._updateRequestId=ot(cp,Yf))}),this.world.addHandler("remove-item",function($p){cp.world.getItemCount()?cp.source=cp.world.getItemAt(0).source:cp.source=null,W[cp.hash].forceRedraw=!0}),this.world.addHandler("metrics-change",function($p){cp.viewport&&cp.viewport._setContentBounds(cp.world.getHomeBounds(),cp.world.getContentFactor())}),this.world.addHandler("item-index-change",function($p){cp.source=cp.world.getItemAt(0).source}),this.viewport=new F.Viewport({containerSize:W[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new F.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:Of.timeout}),this.tileCache=new F.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new F.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=F.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(hp=this.buttons.buttons.indexOf(this.rotateLeft),this.buttons.buttons.splice(hp,1),this.buttons.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(hp=this.buttons.buttons.indexOf(this.rotateRight),this.buttons.buttons.splice(hp,1),this.buttons.element.removeChild(this.rotateRight.element))),this.showNavigator&&(this.navigator=new F.Navigator({id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),hp=0;hp-1&&Of.index=0&&Of=0)return this;var Vp=tt(this,$p);return this.currentOverlays.push(Vp),Vp.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:Of,location:$p.location,placement:$p.placement}),this},updateOverlay:function(Of,qf,cp){var hp;return Of=F.getElement(Of),hp=rt(this.currentOverlays,Of),hp>=0&&(this.currentOverlays[hp].update(qf,cp),W[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:Of,location:qf,placement:cp})),this},removeOverlay:function(Of){var qf;return Of=F.getElement(Of),qf=rt(this.currentOverlays,Of),qf>=0&&(this.currentOverlays[qf].destroy(),this.currentOverlays.splice(qf,1),W[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:Of})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return W[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(Of){var qf;return Of=F.getElement(Of),qf=rt(this.currentOverlays,Of),qf>=0?this.currentOverlays[qf]:null},_updateSequenceButtons:function(Of){this.nextButton&&(!this.tileSources||this.tileSources.length-1===Of?this.navPrevNextWrap||this.nextButton.disable():this.nextButton.enable()),this.previousButton&&(Of>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(Of){this._hideMessage();var qf=F.makeNeutralElement("div");qf.appendChild(document.createTextNode(Of)),this.messageDiv=F.makeCenteredNode(qf),F.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var Of=this.messageDiv;Of&&(Of.parentNode.removeChild(Of),delete this.messageDiv)},gestureSettingsByDeviceType:function(Of){switch(Of){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var Of,qf=this.currentOverlays.length;for(Of=0;Of1&&(this.referenceStrip=new F.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,useCanvas:this.useCanvas,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else F.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')}});function K(Of){return Of=F.getElement(Of),new F.Point(Of.clientWidth===0?1:Of.clientWidth,Of.clientHeight===0?1:Of.clientHeight)}function X(Of,qf,cp,hp,$p){var Vp=Of;if(F.type(qf)=="string"){if(qf.match(/^\s*<.*>\s*$/))qf=F.parseXml(qf);else if(qf.match(/^\s*[\{\[].*[\}\]]\s*$/))try{var bp=F.parseJSON(qf);qf=bp}catch{}}function Ep(_p,Mp){_p.ready?hp(_p):(_p.addHandler("ready",function(){hp(_p)}),_p.addHandler("open-failed",function(Yp){$p({message:Yp.message,source:Mp})}))}setTimeout(function(){if(F.type(qf)=="string")qf=new F.TileSource({url:qf,crossOriginPolicy:cp.crossOriginPolicy!==void 0?cp.crossOriginPolicy:Of.crossOriginPolicy,ajaxWithCredentials:Of.ajaxWithCredentials,ajaxHeaders:Of.ajaxHeaders,useCanvas:Of.useCanvas,success:function(ug){hp(ug.tileSource)}}),qf.addHandler("open-failed",function(ug){$p(ug)});else if(F.isPlainObject(qf)||qf.nodeType)if(qf.crossOriginPolicy===void 0&&(cp.crossOriginPolicy!==void 0||Of.crossOriginPolicy!==void 0)&&(qf.crossOriginPolicy=cp.crossOriginPolicy!==void 0?cp.crossOriginPolicy:Of.crossOriginPolicy),qf.ajaxWithCredentials===void 0&&(qf.ajaxWithCredentials=Of.ajaxWithCredentials),qf.useCanvas===void 0&&(qf.useCanvas=Of.useCanvas),F.isFunction(qf.getTileUrl)){var _p=new F.TileSource(qf);_p.getTileUrl=qf.getTileUrl,hp(_p)}else{var Mp=F.TileSource.determineType(Vp,qf);if(!Mp){$p({message:"Unable to load TileSource",source:qf});return}var Yp=Mp.prototype.configure.apply(Vp,[qf]);Ep(new Mp(Yp),qf)}else Ep(qf,qf)})}function tt(Of,qf){if(qf instanceof F.Overlay)return qf;var cp=null;if(qf.element)cp=F.getElement(qf.element);else{var hp=qf.id?qf.id:"openseadragon-overlay-"+Math.floor(Math.random()*1e7);cp=F.getElement(qf.id),cp||(cp=document.createElement("a"),cp.href="#/overlay/"+hp),cp.id=hp,F.addClass(cp,qf.className?qf.className:"openseadragon-overlay")}var $p=qf.location,Vp=qf.width,bp=qf.height;if(!$p){var Ep=qf.x,_p=qf.y;if(qf.px!==void 0){var Mp=Of.viewport.imageToViewportRectangle(new F.Rect(qf.px,qf.py,Vp||0,bp||0));Ep=Mp.x,_p=Mp.y,Vp=Vp!==void 0?Mp.width:void 0,bp=bp!==void 0?Mp.height:void 0}$p=new F.Point(Ep,_p)}var Yp=qf.placement;return Yp&&F.type(Yp)==="string"&&(Yp=F.Placement[qf.placement.toUpperCase()]),new F.Overlay({element:cp,location:$p,placement:Yp,onDraw:qf.onDraw,checkResize:qf.checkResize,width:Vp,height:bp,rotationMode:qf.rotationMode})}function rt(Of,qf){var cp;for(cp=Of.length-1;cp>=0;cp--)if(Of[cp].element===qf)return cp;return-1}function ot(Of,qf){return F.requestAnimationFrame(function(){qf(Of)})}function ut(Of){F.requestAnimationFrame(function(){uo(Of)})}function yn(Of){Of.autoHideControls&&(Of.controlsShouldFade=!0,Of.controlsFadeBeginTime=F.now()+Of.controlsFadeDelay,window.setTimeout(function(){ut(Of)},Of.controlsFadeDelay))}function uo(Of){var qf,cp,hp,$p;if(Of.controlsShouldFade){for(qf=F.now(),cp=qf-Of.controlsFadeBeginTime,hp=1-cp/Of.controlsFadeLength,hp=Math.min(1,hp),hp=Math.max(0,hp),$p=Of.controls.length-1;$p>=0;$p--)Of.controls[$p].autoFade&&Of.controls[$p].setOpacity(hp);hp>0&&ut(Of)}}function po(Of){var qf;for(Of.controlsShouldFade=!1,qf=Of.controls.length-1;qf>=0;qf--)Of.controls[qf].setOpacity(1)}function mo(){po(this)}function wo(){yn(this)}function lf(Of){var qf={originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction,preventVerticalPan:Of.preventVerticalPan,preventHorizontalPan:Of.preventHorizontalPan};if(this.raiseEvent("canvas-key",qf),!qf.preventDefaultAction&&!Of.ctrl&&!Of.alt&&!Of.meta)switch(Of.keyCode){case 38:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 40:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 37:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;case 39:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;default:return!0}else return!0}function yf(Of){var qf={originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction,preventVerticalPan:Of.preventVerticalPan,preventHorizontalPan:Of.preventHorizontalPan};if(this.raiseEvent("canvas-key",qf),!qf.preventDefaultAction&&!Of.ctrl&&!Of.alt&&!Of.meta)switch(Of.keyCode){case 43:case 61:return this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),!1;case 45:return this.viewport.zoomBy(.9),this.viewport.applyConstraints(),!1;case 48:return this.viewport.goHome(),this.viewport.applyConstraints(),!1;case 119:case 87:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,-40))),this.viewport.applyConstraints()),!1;case 115:case 83:return qf.preventVerticalPan||(Of.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(0,40))),this.viewport.applyConstraints()),!1;case 97:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(-40,0))),this.viewport.applyConstraints()),!1;case 100:return qf.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new F.Point(40,0))),this.viewport.applyConstraints()),!1;case 114:return this.viewport.flipped?this.viewport.setRotation(F.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)):this.viewport.setRotation(F.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)),this.viewport.applyConstraints(),!1;case 82:return this.viewport.flipped?this.viewport.setRotation(F.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)):this.viewport.setRotation(F.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)),this.viewport.applyConstraints(),!1;case 102:return this.viewport.toggleFlip(),!1;default:return!0}else return!0}function cf(Of){var qf,cp=document.activeElement==this.canvas;cp||this.canvas.focus(),this.viewport.flipped&&(Of.position.x=this.viewport.getContainerSize().x-Of.position.x);var hp={tracker:Of.eventSource,position:Of.position,quick:Of.quick,shift:Of.shift,originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction};this.raiseEvent("canvas-click",hp),!hp.preventDefaultAction&&this.viewport&&Of.quick&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.clickToZoom&&(this.viewport.zoomBy(Of.shift?1/this.zoomPerClick:this.zoomPerClick,qf.zoomToRefPoint?this.viewport.pointFromPixel(Of.position,!0):null),this.viewport.applyConstraints()))}function vf(Of){var qf,cp={tracker:Of.eventSource,position:Of.position,shift:Of.shift,originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction};this.raiseEvent("canvas-double-click",cp),!cp.preventDefaultAction&&this.viewport&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.dblClickToZoom&&(this.viewport.zoomBy(Of.shift?1/this.zoomPerClick:this.zoomPerClick,qf.zoomToRefPoint?this.viewport.pointFromPixel(Of.position,!0):null),this.viewport.applyConstraints()))}function _f(Of){var qf,cp={tracker:Of.eventSource,position:Of.position,delta:Of.delta,speed:Of.speed,direction:Of.direction,shift:Of.shift,originalEvent:Of.originalEvent,preventDefaultAction:Of.preventDefaultAction};if(this.raiseEvent("canvas-drag",cp),!cp.preventDefaultAction&&this.viewport){if(qf=this.gestureSettingsByDeviceType(Of.pointerType),this.panHorizontal||(Of.delta.x=0),this.panVertical||(Of.delta.y=0),this.viewport.flipped&&(Of.delta.x=-Of.delta.x),this.constrainDuringPan){var hp=this.viewport.deltaPointsFromPixels(Of.delta.negate());this.viewport.centerSpringX.target.value+=hp.x,this.viewport.centerSpringY.target.value+=hp.y;var $p=this.viewport.getBounds(),Vp=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=hp.x,this.viewport.centerSpringY.target.value-=hp.y,$p.x!=Vp.x&&(Of.delta.x=0),$p.y!=Vp.y&&(Of.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(Of.delta.negate()),qf.flickEnabled&&!this.constrainDuringPan)}}function $f(Of){if(!Of.preventDefaultAction&&this.viewport){var qf=this.gestureSettingsByDeviceType(Of.pointerType);if(qf.flickEnabled&&Of.speed>=qf.flickMinSpeed){var cp=0;this.panHorizontal&&(cp=qf.flickMomentum*Of.speed*Math.cos(Of.direction));var hp=0;this.panVertical&&(hp=qf.flickMomentum*Of.speed*Math.sin(Of.direction));var $p=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),Vp=this.viewport.pointFromPixel(new F.Point($p.x-cp,$p.y-hp));this.viewport.panTo(Vp,!1)}this.viewport.applyConstraints()}this.raiseEvent("canvas-drag-end",{tracker:Of.eventSource,position:Of.position,speed:Of.speed,direction:Of.direction,shift:Of.shift,originalEvent:Of.originalEvent})}function xf(Of){this.raiseEvent("canvas-enter",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Af(Of){window.location!=window.parent.location&&F.MouseTracker.resetAllMouseTrackers(),this.raiseEvent("canvas-exit",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Cf(Of){this.raiseEvent("canvas-press",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,insideElementPressed:Of.insideElementPressed,insideElementReleased:Of.insideElementReleased,originalEvent:Of.originalEvent})}function Pf(Of){this.raiseEvent("canvas-release",{tracker:Of.eventSource,pointerType:Of.pointerType,position:Of.position,insideElementPressed:Of.insideElementPressed,insideElementReleased:Of.insideElementReleased,originalEvent:Of.originalEvent})}function Bf(Of){this.raiseEvent("canvas-nonprimary-press",{tracker:Of.eventSource,position:Of.position,pointerType:Of.pointerType,button:Of.button,buttons:Of.buttons,originalEvent:Of.originalEvent})}function Hf(Of){this.raiseEvent("canvas-nonprimary-release",{tracker:Of.eventSource,position:Of.position,pointerType:Of.pointerType,button:Of.button,buttons:Of.buttons,originalEvent:Of.originalEvent})}function Df(Of){var qf,cp,hp,$p;if(!Of.preventDefaultAction&&this.viewport&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.pinchToZoom&&(cp=this.viewport.pointFromPixel(Of.center,!0),hp=this.viewport.pointFromPixel(Of.lastCenter,!0),$p=hp.minus(cp),this.panHorizontal||($p.x=0),this.panVertical||($p.y=0),this.viewport.zoomBy(Of.distance/Of.lastDistance,cp,!0),qf.zoomToRefPoint&&this.viewport.panBy($p,!0),this.viewport.applyConstraints()),qf.pinchRotate)){var Vp=Math.atan2(Of.gesturePoints[0].currentPos.y-Of.gesturePoints[1].currentPos.y,Of.gesturePoints[0].currentPos.x-Of.gesturePoints[1].currentPos.x),bp=Math.atan2(Of.gesturePoints[0].lastPos.y-Of.gesturePoints[1].lastPos.y,Of.gesturePoints[0].lastPos.x-Of.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(Vp-bp)*(180/Math.PI))}return this.raiseEvent("canvas-pinch",{tracker:Of.eventSource,gesturePoints:Of.gesturePoints,lastCenter:Of.lastCenter,center:Of.center,lastDistance:Of.lastDistance,distance:Of.distance,shift:Of.shift,originalEvent:Of.originalEvent}),!1}function Lf(Of){var qf,cp,hp,$p;if(hp=F.now(),$p=hp-this._lastScrollTime,$p>this.minScrollDeltaTime){if(this._lastScrollTime=hp,this.viewport.flipped&&(Of.position.x=this.viewport.getContainerSize().x-Of.position.x),!Of.preventDefaultAction&&this.viewport&&(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf.scrollToZoom&&(cp=Math.pow(this.zoomPerScroll,Of.scroll),this.viewport.zoomBy(cp,qf.zoomToRefPoint?this.viewport.pointFromPixel(Of.position,!0):null),this.viewport.applyConstraints())),this.raiseEvent("canvas-scroll",{tracker:Of.eventSource,position:Of.position,scroll:Of.scroll,shift:Of.shift,originalEvent:Of.originalEvent}),qf&&qf.scrollToZoom)return!1}else if(qf=this.gestureSettingsByDeviceType(Of.pointerType),qf&&qf.scrollToZoom)return!1}function kf(Of){W[this.hash].mouseInside=!0,po(this),this.raiseEvent("container-enter",{tracker:Of.eventSource,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Nf(Of){Of.pointers<1&&(W[this.hash].mouseInside=!1,W[this.hash].animating||yn(this)),this.raiseEvent("container-exit",{tracker:Of.eventSource,position:Of.position,buttons:Of.buttons,pointers:Of.pointers,insideElementPressed:Of.insideElementPressed,buttonDownAny:Of.buttonDownAny,originalEvent:Of.originalEvent})}function Yf(Of){Gf(Of),Of.isOpen()?Of._updateRequestId=ot(Of,Yf):Of._updateRequestId=!1}function Gf(Of){if(!Of._opening){if(Of.autoResize){var qf=K(Of.container),cp=W[Of.hash].prevContainerSize;if(!qf.equals(cp)){var hp=Of.viewport;if(Of.preserveImageSizeOnResize){var $p=cp.x/qf.x,Vp=hp.getZoom()*$p,bp=hp.getCenter();hp.resize(qf,!1),hp.zoomTo(Vp,null,!0),hp.panTo(bp,!0)}else{var Ep=hp.getBounds();hp.resize(qf,!0),hp.fitBoundsWithConstraints(Ep,!0)}W[Of.hash].prevContainerSize=qf,W[Of.hash].forceRedraw=!0}}var _p=Of.viewport.update(),Mp=Of.world.update()||_p;_p&&Of.raiseEvent("viewport-change"),Of.referenceStrip&&(Mp=Of.referenceStrip.update(Of.viewport)||Mp),!W[Of.hash].animating&&Mp&&(Of.raiseEvent("animation-start"),po(Of)),(Mp||W[Of.hash].forceRedraw||Of.world.needsDraw())&&(rp(Of),Of._drawOverlays(),Of.navigator&&Of.navigator.update(Of.viewport),W[Of.hash].forceRedraw=!1,Mp&&Of.raiseEvent("animation")),W[Of.hash].animating&&!Mp&&(Of.raiseEvent("animation-finish"),W[Of.hash].mouseInside||yn(Of)),W[Of.hash].animating=Mp}}function rp(Of){Of.imageLoader.clear(),Of.drawer.clear(),Of.world.draw(),Of.raiseEvent("update-viewport",{})}function ip(Of,qf){return Of?Of+qf:qf}function ap(){W[this.hash].lastZoomTime=F.now(),W[this.hash].zoomFactor=this.zoomPerSecond,W[this.hash].zooming=!0,Np(this)}function yp(){W[this.hash].lastZoomTime=F.now(),W[this.hash].zoomFactor=1/this.zoomPerSecond,W[this.hash].zooming=!0,Np(this)}function vp(){W[this.hash].zooming=!1}function Np(Of){F.requestAnimationFrame(F.delegate(Of,jp))}function jp(){var Of,qf,cp;W[this.hash].zooming&&this.viewport&&(Of=F.now(),qf=Of-W[this.hash].lastZoomTime,cp=Math.pow(W[this.hash].zoomFactor,qf/1e3),this.viewport.zoomBy(cp),this.viewport.applyConstraints(),W[this.hash].lastZoomTime=Of,Np(this))}function Ip(){this.viewport&&(W[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function Jp(){this.viewport&&(W[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function ng(){this.buttons.emulateEnter(),this.buttons.emulateExit()}function og(){this.viewport&&this.viewport.goHome()}function vg(){this.isFullPage()&&!F.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttons&&this.buttons.emulateExit(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function Dp(){if(this.viewport){var Of=this.viewport.getRotation();this.viewport.flipped?Of=F.positiveModulo(Of+this.rotationIncrement,360):Of=F.positiveModulo(Of-this.rotationIncrement,360),this.viewport.setRotation(Of)}}function Lp(){if(this.viewport){var Of=this.viewport.getRotation();this.viewport.flipped?Of=F.positiveModulo(Of-this.rotationIncrement,360):Of=F.positiveModulo(Of+this.rotationIncrement,360),this.viewport.setRotation(Of)}}function xp(){this.viewport.toggleFlip()}function kp(){var Of=this._sequenceIndex-1;this.navPrevNextWrap&&Of<0&&(Of+=this.tileSources.length),this.goToPage(Of)}function lp(){var Of=this._sequenceIndex+1;this.navPrevNextWrap&&Of>=this.tileSources.length&&(Of=0),this.goToPage(Of)}}(OpenSeadragon),function(F){F.Navigator=function(ot){var ut=ot.viewer,yn=this,uo,po;ot.id?(this.element=document.getElementById(ot.id),ot.controlOptions={anchor:F.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(ot.id="navigator-"+F.now(),this.element=F.makeNeutralElement("div"),ot.controlOptions={anchor:F.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:ot.autoFade},ot.position&&(ot.position=="BOTTOM_RIGHT"?ot.controlOptions.anchor=F.ControlAnchor.BOTTOM_RIGHT:ot.position=="BOTTOM_LEFT"?ot.controlOptions.anchor=F.ControlAnchor.BOTTOM_LEFT:ot.position=="TOP_RIGHT"?ot.controlOptions.anchor=F.ControlAnchor.TOP_RIGHT:ot.position=="TOP_LEFT"?ot.controlOptions.anchor=F.ControlAnchor.TOP_LEFT:ot.position=="ABSOLUTE"&&(ot.controlOptions.anchor=F.ControlAnchor.ABSOLUTE,ot.controlOptions.top=ot.top,ot.controlOptions.left=ot.left,ot.controlOptions.height=ot.height,ot.controlOptions.width=ot.width))),this.element.id=ot.id,this.element.className+=" navigator",ot=F.extend(!0,{sizeRatio:F.DEFAULT_SETTINGS.navigatorSizeRatio},ot,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:ot.autoResize,minZoomImageRatio:1,background:ot.background,opacity:ot.opacity,borderColor:ot.borderColor,displayRegionColor:ot.displayRegionColor}),ot.minPixelRatio=this.minPixelRatio=ut.minPixelRatio,F.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new F.Point(1,1),this.totalBorderWidths=new F.Point(this.borderWidth*2,this.borderWidth*2).minus(this.fudge),ot.controlOptions.anchor!=F.ControlAnchor.NONE&&function(lf,yf){lf.margin="0px",lf.border=yf+"px solid "+ot.borderColor,lf.padding="0px",lf.background=ot.background,lf.opacity=ot.opacity,lf.overflow="hidden"}(this.element.style,this.borderWidth),this.displayRegion=F.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(lf,yf){lf.position="relative",lf.top="0px",lf.left="0px",lf.fontSize="0px",lf.overflow="hidden",lf.border=yf+"px solid "+ot.displayRegionColor,lf.margin="0px",lf.padding="0px",lf.background="transparent",lf.float="left",lf.cssFloat="left",lf.styleFloat="left",lf.zIndex=999999999,lf.cursor="default"}(this.displayRegion.style,this.borderWidth),this.displayRegionContainer=F.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",ut.addControl(this.element,ot.controlOptions),this._resizeWithViewer=ot.controlOptions.anchor!=F.ControlAnchor.ABSOLUTE&&ot.controlOptions.anchor!=F.ControlAnchor.NONE,ot.width&&ot.height?(this.setWidth(ot.width),this.setHeight(ot.height)):this._resizeWithViewer&&(uo=F.getElementSize(ut.element),this.element.style.height=Math.round(uo.y*ot.sizeRatio)+"px",this.element.style.width=Math.round(uo.x*ot.sizeRatio)+"px",this.oldViewerSize=uo,po=F.getElementSize(this.element),this.elementArea=po.x*po.y),this.oldContainerSize=new F.Point(0,0),F.Viewer.apply(this,[ot]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer);function mo(lf){tt(yn.displayRegionContainer,lf),tt(yn.displayRegion,-lf),yn.viewport.setRotation(lf)}if(ot.navigatorRotate){var wo=ot.viewer.viewport?ot.viewer.viewport.getRotation():ot.viewer.degrees||0;mo(wo),ot.viewer.addHandler("rotate",function(lf){mo(lf.degrees)})}this.innerTracker.destroy(),this.innerTracker=new F.MouseTracker({element:this.element,dragHandler:F.delegate(this,q),clickHandler:F.delegate(this,W),releaseHandler:F.delegate(this,K),scrollHandler:F.delegate(this,X)}),this.addHandler("reset-size",function(){yn.viewport&&yn.viewport.goHome(!0)}),ut.world.addHandler("item-index-change",function(lf){window.setTimeout(function(){var yf=yn.world.getItemAt(lf.previousIndex);yn.world.setItemIndex(yf,lf.newIndex)},1)}),ut.world.addHandler("remove-item",function(lf){var yf=lf.item,cf=yn._getMatchingItem(yf);cf&&yn.world.removeItem(cf)}),this.update(ut.viewport)},F.extend(F.Navigator.prototype,F.EventSource.prototype,F.Viewer.prototype,{updateSize:function(){if(this.viewport){var ot=new F.Point(this.container.clientWidth===0?1:this.container.clientWidth,this.container.clientHeight===0?1:this.container.clientHeight);ot.equals(this.oldContainerSize)||(this.viewport.resize(ot,!0),this.viewport.goHome(!0),this.oldContainerSize=ot,this.drawer.clear(),this.world.draw())}},setWidth:function(ot){this.width=ot,this.element.style.width=typeof ot=="number"?ot+"px":ot,this._resizeWithViewer=!1},setHeight:function(ot){this.height=ot,this.element.style.height=typeof ot=="number"?ot+"px":ot,this._resizeWithViewer=!1},setFlip:function(ot){return this.viewport.setFlip(ot),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(ot){rt(this.displayRegion,ot),rt(this.canvas,ot),rt(this.element,ot)},update:function(ot){var ut,yn,uo,po,mo,wo;if(ut=F.getElementSize(this.viewer.element),this._resizeWithViewer&&ut.x&&ut.y&&!ut.equals(this.oldViewerSize)&&(this.oldViewerSize=ut,this.maintainSizeRatio||!this.elementArea?(yn=ut.x*this.sizeRatio,uo=ut.y*this.sizeRatio):(yn=Math.sqrt(this.elementArea*(ut.x/ut.y)),uo=this.elementArea/yn),this.element.style.width=Math.round(yn)+"px",this.element.style.height=Math.round(uo)+"px",this.elementArea||(this.elementArea=yn*uo),this.updateSize()),ot&&this.viewport){po=ot.getBoundsNoRotate(!0),mo=this.viewport.pixelFromPointNoRotate(po.getTopLeft(),!1),wo=this.viewport.pixelFromPointNoRotate(po.getBottomRight(),!1).minus(this.totalBorderWidths);var lf=this.displayRegion.style;lf.display=this.world.getItemCount()?"block":"none",lf.top=Math.round(mo.y)+"px",lf.left=Math.round(mo.x)+"px";var yf=Math.abs(mo.x-wo.x),cf=Math.abs(mo.y-wo.y);lf.width=Math.round(Math.max(yf,0))+"px",lf.height=Math.round(Math.max(cf,0))+"px"}},addTiledImage:function(ot){var ut=this,yn=ot.originalTiledImage;delete ot.original;var uo=F.extend({},ot,{success:function(po){var mo=po.item;mo._originalForNavigator=yn,ut._matchBounds(mo,yn,!0);function wo(){ut._matchBounds(mo,yn)}function lf(){ut._matchOpacity(mo,yn)}function yf(){ut._matchCompositeOperation(mo,yn)}yn.addHandler("bounds-change",wo),yn.addHandler("clip-change",wo),yn.addHandler("opacity-change",lf),yn.addHandler("composite-operation-change",yf)}});return F.Viewer.prototype.addTiledImage.apply(this,[uo])},_getMatchingItem:function(ot){for(var ut=this.world.getItemCount(),yn,uo=0;uo1||K.y>1));q++);return q-1},getTileAtPoint:function(q,K){var X=K.x>=0&&K.x<=1&&K.y>=0&&K.y<=1/this.aspectRatio;F.console.assert(X,"[TileSource.getTileAtPoint] must be called with a valid point.");var tt=this.dimensions.x*this.getLevelScale(q),rt=K.x*tt,ot=K.y*tt,ut=Math.floor(rt/this.getTileWidth(q)),yn=Math.floor(ot/this.getTileHeight(q));K.x>=1&&(ut=this.getNumTiles(q).x-1);var uo=1e-15;return K.y>=1/this.aspectRatio-uo&&(yn=this.getNumTiles(q).y-1),new F.Point(ut,yn)},getTileBounds:function(q,K,X,tt){var rt=this.dimensions.times(this.getLevelScale(q)),ot=this.getTileWidth(q),ut=this.getTileHeight(q),yn=K===0?0:ot*K-this.tileOverlap,uo=X===0?0:ut*X-this.tileOverlap,po=ot+(K===0?1:2)*this.tileOverlap,mo=ut+(X===0?1:2)*this.tileOverlap,wo=1/rt.x;return po=Math.min(po,rt.x-yn),mo=Math.min(mo,rt.y-uo),tt?new F.Rect(0,0,po,mo):new F.Rect(yn*wo,uo*wo,po*wo,mo*wo)},getImageInfo:function(q){var K=this,X,tt,rt,ot,ut,yn,uo;q&&(ut=q.split("/"),yn=ut[ut.length-1],uo=yn.lastIndexOf("."),uo>-1&&(ut[ut.length-1]=yn.slice(0,uo))),tt=function(po){typeof po=="string"&&(po=F.parseXml(po));var mo=F.TileSource.determineType(K,po,q);if(!mo){K.raiseEvent("open-failed",{message:"Unable to load TileSource",source:q});return}ot=mo.prototype.configure.apply(K,[po,q]),ot.ajaxWithCredentials===void 0&&(ot.ajaxWithCredentials=K.ajaxWithCredentials),rt=new mo(ot),K.ready=!0,K.raiseEvent("ready",{tileSource:rt})},q.match(/\.js$/)?(X=q.split("/").pop().replace(".js",""),F.jsonp({url:q,async:!1,callbackName:X,callback:tt})):F.makeAjaxRequest({url:q,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(po){var mo=W(po);tt(mo)},error:function(po,mo){var wo;try{wo="HTTP "+po.status+" attempting to load TileSource"}catch{var lf;typeof mo>"u"||!mo.toString?lf="Unknown error":lf=mo.toString(),wo=lf+" attempting to load TileSource"}K.raiseEvent("open-failed",{message:wo,source:q})}})},supports:function(q,K){return!1},configure:function(q,K){throw new Error("Method not implemented.")},getTileUrl:function(q,K,X){throw new Error("Method not implemented.")},getTileAjaxHeaders:function(q,K,X){return{}},tileExists:function(q,K,X){var tt=this.getNumTiles(q);return q>=this.minLevel&&q<=this.maxLevel&&K>=0&&X>=0&&K=0;mo--)for(wo=this.displayRects[mo],lf=wo.minLevel;lf<=wo.maxLevel;lf++)this._levelRects[lf]||(this._levelRects[lf]=[]),this._levelRects[lf].push(wo);F.TileSource.apply(this,[yf])},F.extend(F.DziTileSource.prototype,F.TileSource.prototype,{supports:function(K,X){var tt;return K.Image?tt=K.Image.xmlns:K.documentElement&&(K.documentElement.localName=="Image"||K.documentElement.tagName=="Image")&&(tt=K.documentElement.namespaceURI),tt=(tt||"").toLowerCase(),tt.indexOf("schemas.microsoft.com/deepzoom/2008")!==-1||tt.indexOf("schemas.microsoft.com/deepzoom/2009")!==-1},configure:function(K,X){var tt;return F.isPlainObject(K)?tt=q(this,K):tt=W(this,K),X&&!tt.tilesUrl&&(tt.tilesUrl=X.replace(/([^\/]+?)(\.(dzi|xml|js)?(\?[^\/]*)?)?\/?$/,"$1_files/"),X.search(/\.(dzi|xml|js)\?/)!=-1?tt.queryParams=X.match(/\?.*/):tt.queryParams=""),tt},getTileUrl:function(K,X,tt){return[this.tilesUrl,K,"/",X,"_",tt,".",this.fileFormat,this.queryParams].join("")},tileExists:function(K,X,tt){var rt=this._levelRects[K],ot,ut,yn,uo,po,mo,wo;if(this.minLevel&&Kthis.maxLevel)return!1;if(!rt||!rt.length)return!0;for(wo=rt.length-1;wo>=0;wo--)if(ot=rt[wo],!(Kot.maxLevel)&&(ut=this.getLevelScale(K),yn=ot.x*ut,uo=ot.y*ut,po=yn+ot.width*ut,mo=uo+ot.height*ut,yn=Math.floor(yn/this._tileWidth),uo=Math.floor(uo/this._tileWidth),po=Math.ceil(po/this._tileWidth),mo=Math.ceil(mo/this._tileWidth),yn<=X&&X0?tt.tileSize=Math.max.apply(null,po):tt.tileSize=yn}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,tt.levels=q(this),F.extend(!0,tt,{width:tt.levels[tt.levels.length-1].width,height:tt.levels[tt.levels.length-1].height,tileSize:Math.max(tt.height,tt.width),tileOverlap:0,minLevel:0,maxLevel:tt.levels.length-1}),this.levels=tt.levels):F.console.error("Nothing in the info.json to construct image pyramids from");if(!tt.maxLevel&&!this.emulateLegacyImagePyramid)if(!this.scale_factors)tt.maxLevel=Number(Math.ceil(Math.log(Math.max(this.width,this.height),2)));else{var wo=Math.max.apply(null,this.scale_factors);tt.maxLevel=Math.round(Math.log(wo)*Math.LOG2E)}F.TileSource.apply(this,[tt])},F.extend(F.IIIFTileSource.prototype,F.TileSource.prototype,{supports:function(tt,rt){return tt.protocol&&tt.protocol=="http://iiif.io/api/image"||tt["@context"]&&(tt["@context"]=="http://library.stanford.edu/iiif/image-api/1.1/context.json"||tt["@context"]=="http://iiif.io/api/image/1/context.json")||tt.profile&&tt.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")===0||tt.identifier&&tt.width&&tt.height?!0:!!(tt.documentElement&&tt.documentElement.tagName=="info"&&tt.documentElement.namespaceURI=="http://library.stanford.edu/iiif/image-api/ns/")},configure:function(tt,rt){if(F.isPlainObject(tt)){if(!tt["@context"])tt["@context"]="http://iiif.io/api/image/1.0/context.json",tt["@id"]=rt.replace("/info.json",""),tt.version=1;else{var ut=tt["@context"];if(Array.isArray(ut)){for(var yn=0;yn0&&tt>=this.minLevel&&tt<=this.maxLevel&&(rt=this.levels[tt].width/this.levels[this.maxLevel].width),rt}return F.TileSource.prototype.getLevelScale.call(this,tt)},getNumTiles:function(tt){if(this.emulateLegacyImagePyramid){var rt=this.getLevelScale(tt);return rt?new F.Point(1,1):new F.Point(0,0)}return F.TileSource.prototype.getNumTiles.call(this,tt)},getTileAtPoint:function(tt,rt){return this.emulateLegacyImagePyramid?new F.Point(0,0):F.TileSource.prototype.getTileAtPoint.call(this,tt,rt)},getTileUrl:function(tt,rt,ot){if(this.emulateLegacyImagePyramid){var ut=null;return this.levels.length>0&&tt>=this.minLevel&&tt<=this.maxLevel&&(ut=this.levels[tt].url),ut}var yn="0",uo=Math.pow(.5,this.maxLevel-tt),po=Math.ceil(this.width*uo),mo=Math.ceil(this.height*uo),wo,lf,yf,cf,vf,_f,$f,xf,Af,Cf,Pf,Bf,Hf,Df;return wo=this.getTileWidth(tt),lf=this.getTileHeight(tt),yf=Math.ceil(wo/uo),cf=Math.ceil(lf/uo),this.version===1?Hf="native."+this.tileFormat:Hf="default."+this.tileFormat,po1&&tt.profile[1].supports&&(yn=tt.profile[1].supports.indexOf("sizeByW")!==-1),tt.version===3&&tt.extraFeatures&&(yn=tt.extraFeatures.indexOf("sizeByWh")!==-1),!ut||yn}function q(tt){for(var rt=[],ot=0;otut?yn=ot/256:yn=ut/256,rt.maxLevel=Math.ceil(Math.log(yn)/Math.log(2))-1,rt.tileSize=256,rt.width=ot,rt.height=ut,F.TileSource.apply(this,[rt])},F.extend(F.TmsTileSource.prototype,F.TileSource.prototype,{supports:function(W,q){return W.type&&W.type=="tiledmapservice"},configure:function(W,q){return W},getTileUrl:function(W,q,K){var X=this.getNumTiles(W).y-1;return this.tilesUrl+W+"/"+q+"/"+(X-K)+".png"}})}(OpenSeadragon),function(F){F.ZoomifyTileSource=function(W){W.tileSize=256;var q={x:W.width,y:W.height};for(W.imageSizes=[{x:W.width,y:W.height}],W.gridSize=[this._getGridSize(W.width,W.height,W.tileSize)];parseInt(q.x,10)>W.tileSize||parseInt(q.y,10)>W.tileSize;)q.x=Math.floor(q.x/2),q.y=Math.floor(q.y/2),W.imageSizes.push({x:q.x,y:q.y}),W.gridSize.push(this._getGridSize(q.x,q.y,W.tileSize));W.imageSizes.reverse(),W.gridSize.reverse(),W.minLevel=0,W.maxLevel=W.gridSize.length-1,OpenSeadragon.TileSource.apply(this,[W])},F.extend(F.ZoomifyTileSource.prototype,F.TileSource.prototype,{_getGridSize:function(W,q,K){return{x:Math.ceil(W/K),y:Math.ceil(q/K)}},_calculateAbsoluteTileNumber:function(W,q,K){for(var X=0,tt={},rt=0;rt0?(rt=tt.levels[tt.levels.length-1].width,ot=tt.levels[tt.levels.length-1].height):(rt=0,ot=0,F.console.error("No supported image formats found")),F.extend(!0,tt,{width:rt,height:ot,tileSize:Math.max(ot,rt),tileOverlap:0,minLevel:0,maxLevel:tt.levels.length>0?tt.levels.length-1:0}),F.TileSource.apply(this,[tt]),this.levels=tt.levels},F.extend(F.LegacyTileSource.prototype,F.TileSource.prototype,{supports:function(X,tt){return X.type&&X.type=="legacy-image-pyramid"||X.documentElement&&X.documentElement.getAttribute("type")=="legacy-image-pyramid"},configure:function(X,tt){var rt;return F.isPlainObject(X)?rt=K(this,X):rt=q(this,X),rt},getLevelScale:function(X){var tt=NaN;return this.levels.length>0&&X>=this.minLevel&&X<=this.maxLevel&&(tt=this.levels[X].width/this.levels[this.maxLevel].width),tt},getNumTiles:function(X){var tt=this.getLevelScale(X);return tt?new F.Point(1,1):new F.Point(0,0)},getTileUrl:function(X,tt,rt){var ot=null;return this.levels.length>0&&X>=this.minLevel&&X<=this.maxLevel&&(ot=this.levels[X].url),ot}});function W(X){var tt=[],rt,ot;for(ot=0;ot");return tt.sort(function(ut,yn){return ut.height-yn.height})}function q(X,tt){if(!tt||!tt.documentElement)throw new Error(F.getString("Errors.Xml"));var rt=tt.documentElement,ot=rt.tagName,ut=null,yn=[],uo,po;if(ot=="image")try{for(ut={type:rt.getAttribute("type"),levels:[]},yn=rt.getElementsByTagName("level"),po=0;po=this.minLevel&&W<=this.maxLevel&&(q=this.levels[W].width/this.levels[this.maxLevel].width),q},getNumTiles:function(W){var q=this.getLevelScale(W);return q?new F.Point(1,1):new F.Point(0,0)},getTileUrl:function(W,q,K){var X=null;return W>=this.minLevel&&W<=this.maxLevel&&(X=this.levels[W].url),X},getContext2D:function(W,q,K){var X=null;return W>=this.minLevel&&W<=this.maxLevel&&(X=this.levels[W].context2D),X},_buildLevels:function(){var W=[{url:this._image.src,width:Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,height:Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height}];if(!this.buildPyramid||!F.supportsCanvas||!this.useCanvas)return delete this._image,W;var q=Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,K=Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height,X=document.createElement("canvas"),tt=X.getContext("2d");if(X.width=q,X.height=K,tt.drawImage(this._image,0,0,q,K),W[0].context2D=tt,delete this._image,F.isCanvasTainted(X))return W;for(;q>=2&&K>=2;){q=Math.floor(q/2),K=Math.floor(K/2);var rt=document.createElement("canvas"),ot=rt.getContext("2d");rt.width=q,rt.height=K,ot.drawImage(X,0,0,q,K),W.splice(0,0,{context2D:ot,width:q,height:K}),X=rt,tt=ot}return W}})}(OpenSeadragon),function(F){F.TileSourceCollection=function(W,q,K,X){F.console.error("TileSourceCollection is deprecated; use World instead")}}(OpenSeadragon),function(F){F.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},F.Button=function(ot){var ut=this;F.EventSource.call(this),F.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:F.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:F.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null},ot),this.element=ot.element||F.makeNeutralElement("div"),ot.element||(this.imgRest=F.makeTransparentImage(this.srcRest),this.imgGroup=F.makeTransparentImage(this.srcGroup),this.imgHover=F.makeTransparentImage(this.srcHover),this.imgDown=F.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,this.element.style.position="relative",F.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",F.Browser.vendor==F.BROWSERS.FIREFOX&&F.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=F.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new F.MouseTracker({element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(yn){yn.insideElementPressed?(tt(ut,F.ButtonState.DOWN),ut.raiseEvent("enter",{originalEvent:yn.originalEvent})):yn.buttonDownAny||tt(ut,F.ButtonState.HOVER)},focusHandler:function(yn){this.enterHandler(yn),ut.raiseEvent("focus",{originalEvent:yn.originalEvent})},exitHandler:function(yn){rt(ut,F.ButtonState.GROUP),yn.insideElementPressed&&ut.raiseEvent("exit",{originalEvent:yn.originalEvent})},blurHandler:function(yn){this.exitHandler(yn),ut.raiseEvent("blur",{originalEvent:yn.originalEvent})},pressHandler:function(yn){tt(ut,F.ButtonState.DOWN),ut.raiseEvent("press",{originalEvent:yn.originalEvent})},releaseHandler:function(yn){yn.insideElementPressed&&yn.insideElementReleased?(rt(ut,F.ButtonState.HOVER),ut.raiseEvent("release",{originalEvent:yn.originalEvent})):yn.insideElementPressed?rt(ut,F.ButtonState.GROUP):tt(ut,F.ButtonState.HOVER)},clickHandler:function(yn){yn.quick&&ut.raiseEvent("click",{originalEvent:yn.originalEvent})},keyHandler:function(yn){return yn.keyCode===13?(ut.raiseEvent("click",{originalEvent:yn.originalEvent}),ut.raiseEvent("release",{originalEvent:yn.originalEvent}),!1):!0}}),rt(this,F.ButtonState.REST)},F.extend(F.Button.prototype,F.EventSource.prototype,{notifyGroupEnter:function(){tt(this,F.ButtonState.GROUP)},notifyGroupExit:function(){rt(this,F.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,F.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,F.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()}});function W(ot){F.requestAnimationFrame(function(){q(ot)})}function q(ot){var ut,yn,uo;ot.shouldFade&&(ut=F.now(),yn=ut-ot.fadeBeginTime,uo=1-yn/ot.fadeLength,uo=Math.min(1,uo),uo=Math.max(0,uo),ot.imgGroup&&F.setElementOpacity(ot.imgGroup,uo,!0),uo>0&&W(ot))}function K(ot){ot.shouldFade=!0,ot.fadeBeginTime=F.now()+ot.fadeDelay,window.setTimeout(function(){W(ot)},ot.fadeDelay)}function X(ot){ot.shouldFade=!1,ot.imgGroup&&F.setElementOpacity(ot.imgGroup,1,!0)}function tt(ot,ut){ot.element.disabled||(ut>=F.ButtonState.GROUP&&ot.currentState==F.ButtonState.REST&&(X(ot),ot.currentState=F.ButtonState.GROUP),ut>=F.ButtonState.HOVER&&ot.currentState==F.ButtonState.GROUP&&(ot.imgHover&&(ot.imgHover.style.visibility=""),ot.currentState=F.ButtonState.HOVER),ut>=F.ButtonState.DOWN&&ot.currentState==F.ButtonState.HOVER&&(ot.imgDown&&(ot.imgDown.style.visibility=""),ot.currentState=F.ButtonState.DOWN))}function rt(ot,ut){ot.element.disabled||(ut<=F.ButtonState.HOVER&&ot.currentState==F.ButtonState.DOWN&&(ot.imgDown&&(ot.imgDown.style.visibility="hidden"),ot.currentState=F.ButtonState.HOVER),ut<=F.ButtonState.GROUP&&ot.currentState==F.ButtonState.HOVER&&(ot.imgHover&&(ot.imgHover.style.visibility="hidden"),ot.currentState=F.ButtonState.GROUP),ut<=F.ButtonState.REST&&ot.currentState==F.ButtonState.GROUP&&(K(ot),ot.currentState=F.ButtonState.REST))}}(OpenSeadragon),function(F){F.ButtonGroup=function(W){F.extend(!0,this,{buttons:[],clickTimeThreshold:F.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:F.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},W);var q=this.buttons.concat([]),K=this,X;if(this.element=W.element||F.makeNeutralElement("div"),!W.group)for(this.element.style.display="inline-block",X=0;X=270?(rt=this.getTopRight(),this.x=rt.x,this.y=rt.y,ot=this.height,this.height=this.width,this.width=ot,this.degrees-=270):this.degrees>=180?(rt=this.getBottomRight(),this.x=rt.x,this.y=rt.y,this.degrees-=180):this.degrees>=90&&(rt=this.getBottomLeft(),this.x=rt.x,this.y=rt.y,ot=this.height,this.height=this.width,this.width=ot,this.degrees-=90)},F.Rect.fromSummits=function(W,q,K){var X=W.distanceTo(q),tt=W.distanceTo(K),rt=q.minus(W),ot=Math.atan(rt.y/rt.x);return rt.x<0?ot+=Math.PI:rt.y<0&&(ot+=2*Math.PI),new F.Rect(W.x,W.y,X,tt,ot/Math.PI*180)},F.Rect.prototype={clone:function(){return new F.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new F.Point(this.x,this.y)},getBottomRight:function(){return new F.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new F.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new F.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new F.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new F.Point(this.width,this.height)},equals:function(W){return W instanceof F.Rect&&this.x===W.x&&this.y===W.y&&this.width===W.width&&this.height===W.height&&this.degrees===W.degrees},times:function(W){return new F.Rect(this.x*W,this.y*W,this.width*W,this.height*W,this.degrees)},translate:function(W){return new F.Rect(this.x+W.x,this.y+W.y,this.width,this.height,this.degrees)},union:function(W){var q=this.getBoundingBox(),K=W.getBoundingBox(),X=Math.min(q.x,K.x),tt=Math.min(q.y,K.y),rt=Math.max(q.x+q.width,K.x+K.width),ot=Math.max(q.y+q.height,K.y+K.height);return new F.Rect(X,tt,rt-X,ot-tt)},intersection:function(W){var q=1e-10,K=[],X=this.getTopLeft();W.containsPoint(X,q)&&K.push(X);var tt=this.getTopRight();W.containsPoint(tt,q)&&K.push(tt);var rt=this.getBottomLeft();W.containsPoint(rt,q)&&K.push(rt);var ot=this.getBottomRight();W.containsPoint(ot,q)&&K.push(ot);var ut=W.getTopLeft();this.containsPoint(ut,q)&&K.push(ut);var yn=W.getTopRight();this.containsPoint(yn,q)&&K.push(yn);var uo=W.getBottomLeft();this.containsPoint(uo,q)&&K.push(uo);var po=W.getBottomRight();this.containsPoint(po,q)&&K.push(po);for(var mo=this._getSegments(),wo=W._getSegments(),lf=0;lfAf&&(Af=Hf.x),Hf.yPf&&(Pf=Hf.y)}return new F.Rect(xf,Cf,Af-xf,Pf-Cf)},_getSegments:function(){var W=this.getTopLeft(),q=this.getTopRight(),K=this.getBottomLeft(),X=this.getBottomRight();return[[W,q],[q,X],[X,K],[K,W]]},rotate:function(W,q){if(W=F.positiveModulo(W,360),W===0)return this.clone();q=q||this.getCenter();var K=this.getTopLeft().rotate(W,q),X=this.getTopRight().rotate(W,q),tt=X.minus(K);tt=tt.apply(function(ot){var ut=1e-15;return Math.abs(ot)=-q&&(W.x-X.x)*rt.x+(W.y-X.y)*rt.y<=q&&(W.x-K.x)*ot.x+(W.y-K.y)*ot.y>=-q&&(W.x-tt.x)*ot.x+(W.y-tt.y)*ot.y<=q},toString:function(){return"["+Math.round(this.x*100)/100+", "+Math.round(this.y*100)/100+", "+Math.round(this.width*100)/100+"x"+Math.round(this.height*100)/100+", "+Math.round(this.degrees*100)/100+"deg]"}}}(OpenSeadragon),function(F){var W={};F.ReferenceStrip=function(yn){var uo=this,po=yn.viewer,mo=F.getElementSize(po.element),wo,lf,yf;for(yn.id||(yn.id="referencestrip-"+F.now(),this.element=F.makeNeutralElement("div"),this.element.id=yn.id,this.element.className="referencestrip"),yn=F.extend(!0,{sizeRatio:F.DEFAULT_SETTINGS.referenceStripSizeRatio,position:F.DEFAULT_SETTINGS.referenceStripPosition,scroll:F.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:F.DEFAULT_SETTINGS.clickTimeThreshold},yn,{element:this.element,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1}),F.extend(this,yn),W[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,lf=this.element.style,lf.marginTop="0px",lf.marginRight="0px",lf.marginBottom="0px",lf.marginLeft="0px",lf.left="0px",lf.bottom="0px",lf.border="0px",lf.background="#000",lf.position="relative",F.setElementTouchActionNone(this.element),F.setElementOpacity(this.element,.8),this.viewer=po,this.innerTracker=new F.MouseTracker({element:this.element,dragHandler:F.delegate(this,q),scrollHandler:F.delegate(this,K),enterHandler:F.delegate(this,tt),exitHandler:F.delegate(this,rt),keyDownHandler:F.delegate(this,ot),keyHandler:F.delegate(this,ut)}),yn.width&&yn.height?(this.element.style.width=yn.width+"px",this.element.style.height=yn.height+"px",po.addControl(this.element,{anchor:F.ControlAnchor.BOTTOM_LEFT})):yn.scroll=="horizontal"?(this.element.style.width=mo.x*yn.sizeRatio*po.tileSources.length+12*po.tileSources.length+"px",this.element.style.height=mo.y*yn.sizeRatio+"px",po.addControl(this.element,{anchor:F.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=mo.y*yn.sizeRatio*po.tileSources.length+12*po.tileSources.length+"px",this.element.style.width=mo.x*yn.sizeRatio+"px",po.addControl(this.element,{anchor:F.ControlAnchor.TOP_LEFT})),this.panelWidth=mo.x*this.sizeRatio+8,this.panelHeight=mo.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},yf=0;yflf+po.x-this.panelWidth?(cf=Math.min(cf,mo-po.x),this.element.style.marginLeft=-cf+"px",X(this,po.x,-cf)):cfyf+po.y-this.panelHeight?(cf=Math.min(cf,wo-po.y),this.element.style.marginTop=-cf+"px",X(this,po.y,-cf)):cf0?uo>-(mo-lf.x)&&(this.element.style.marginLeft=uo+yn.delta.x*2+"px",X(this,lf.x,uo+yn.delta.x*2)):-yn.delta.x<0&&uo<0&&(this.element.style.marginLeft=uo+yn.delta.x*2+"px",X(this,lf.x,uo+yn.delta.x*2)):-yn.delta.y>0?po>-(wo-lf.y)&&(this.element.style.marginTop=po+yn.delta.y*2+"px",X(this,lf.y,po+yn.delta.y*2)):-yn.delta.y<0&&po<0&&(this.element.style.marginTop=po+yn.delta.y*2+"px",X(this,lf.y,po+yn.delta.y*2))),!1}function K(yn){var uo=Number(this.element.style.marginLeft.replace("px","")),po=Number(this.element.style.marginTop.replace("px","")),mo=Number(this.element.style.width.replace("px","")),wo=Number(this.element.style.height.replace("px","")),lf=F.getElementSize(this.viewer.canvas);return this.element&&(this.scroll=="horizontal"?yn.scroll>0?uo>-(mo-lf.x)&&(this.element.style.marginLeft=uo-yn.scroll*60+"px",X(this,lf.x,uo-yn.scroll*60)):yn.scroll<0&&uo<0&&(this.element.style.marginLeft=uo-yn.scroll*60+"px",X(this,lf.x,uo-yn.scroll*60)):yn.scroll<0?po>lf.y-wo&&(this.element.style.marginTop=po+yn.scroll*60+"px",X(this,lf.y,po+yn.scroll*60)):yn.scroll>0&&po<0&&(this.element.style.marginTop=po+yn.scroll*60+"px",X(this,lf.y,po+yn.scroll*60))),!1}function X(yn,uo,po){var mo,wo,lf,yf,cf,vf,_f;for(yn.scroll=="horizontal"?mo=yn.panelWidth:mo=yn.panelHeight,wo=Math.ceil(uo/mo)+5,lf=Math.ceil((Math.abs(po)+uo)/mo)+1,wo=lf-wo,wo=wo<0?0:wo,vf=wo;vf1?K[1].springStiffness:5,animationTime:K.length>1?K[1].animationTime:1.5}),F.console.assert(typeof q.springStiffness=="number"&&q.springStiffness!==0,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),F.console.assert(typeof q.animationTime=="number"&&q.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),q.exponential&&(this._exponential=!0,delete q.exponential),F.extend(!0,this,q),this.current={value:typeof this.initial=="number"?this.initial:this._exponential?0:1,time:F.now()},F.console.assert(!this._exponential||this.current.value!==0,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},F.Spring.prototype={resetTo:function(q){F.console.assert(!this._exponential||q!==0,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=q,this.start.time=this.target.time=this.current.time=F.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(q){F.console.assert(!this._exponential||q!==0,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=q,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(q){this.start.value+=q,this.target.value+=q,this._exponential&&(F.console.assert(this.target.value!==0&&this.start.value!==0,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(q){this._exponential=q,this._exponential&&(F.console.assert(this.current.value!==0&&this.target.value!==0&&this.start.value!==0,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){this.current.time=F.now();var q,K;this._exponential?(q=this.start._logValue,K=this.target._logValue):(q=this.start.value,K=this.target.value);var X=this.current.time>=this.target.time?K:q+(K-q)*W(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time)),tt=this.current.value;return this._exponential?this.current.value=Math.exp(X):this.current.value=X,tt!=this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}};function W(q,K){return(1-Math.exp(q*-K))/(1-Math.exp(-q))}}(OpenSeadragon),function(F){function W(K){F.extend(!0,this,{timeout:F.DEFAULT_SETTINGS.timeout,jobId:null},K),this.image=null}W.prototype={errorMsg:null,start:function(){var K=this,X=this.abort;this.image=new Image,this.image.onload=function(){K.finish(!0)},this.image.onabort=this.image.onerror=function(){K.errorMsg="Image load aborted",K.finish(!1)},this.jobId=window.setTimeout(function(){K.errorMsg="Image load exceeded timeout ("+K.timeout+" ms)",K.finish(!1)},this.timeout),this.loadWithAjax?(this.request=F.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",success:function(tt){var rt;try{rt=new window.Blob([tt.response])}catch(uo){var ot=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(uo.name==="TypeError"&&ot){var ut=new ot;ut.append(tt.response),rt=ut.getBlob()}}rt.size===0&&(K.errorMsg="Empty image response.",K.finish(!1));var yn=(window.URL||window.webkitURL).createObjectURL(rt);K.image.src=yn},error:function(tt){K.errorMsg="Image load aborted - XHR error",K.finish(!1)}}),this.abort=function(){K.request.abort(),typeof X=="function"&&X()}):(this.crossOriginPolicy!==!1&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(K){this.image.onload=this.image.onerror=this.image.onabort=null,K||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},F.ImageLoader=function(K){F.extend(!0,this,{jobLimit:F.DEFAULT_SETTINGS.imageLoaderLimit,timeout:F.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},K)},F.ImageLoader.prototype={addJob:function(K){var X=this,tt=function(ut){q(X,ut,K.callback)},rt={src:K.src,loadWithAjax:K.loadWithAjax,ajaxHeaders:K.loadWithAjax?K.ajaxHeaders:null,crossOriginPolicy:K.crossOriginPolicy,ajaxWithCredentials:K.ajaxWithCredentials,callback:tt,abort:K.abort,timeout:this.timeout},ot=new W(rt);!this.jobLimit||this.jobsInProgress0&&(rt=K.jobQueue.shift(),rt.start(),K.jobsInProgress++),tt(X.image,X.errorMsg,X.request)}}(OpenSeadragon),function(F){F.Tile=function(W,q,K,X,tt,rt,ot,ut,yn,uo){this.level=W,this.x=q,this.y=K,this.bounds=X,this.sourceBounds=uo,this.exists=tt,this.url=rt,this.context2D=ot,this.loadWithAjax=ut,this.ajaxHeaders=yn,this.ajaxHeaders?this.cacheKey=this.url+"+"+JSON.stringify(this.ajaxHeaders):this.cacheKey=this.url,this.loaded=!1,this.loading=!1,this.element=null,this.imgElement=null,this.image=null,this.style=null,this.position=null,this.size=null,this.blendStart=null,this.opacity=null,this.squaredDistance=null,this.visibility=null,this.beingDrawn=!1,this.lastTouchTime=0,this.isRightMost=!1,this.isBottomMost=!1},F.Tile.prototype={toString:function(){return this.level+"/"+this.x+"_"+this.y},_hasTransparencyChannel:function(){return!!this.context2D||this.url.match(".png")},drawHTML:function(W){if(!this.cacheImageRecord){F.console.warn("[Tile.drawHTML] attempting to draw tile %s when it's not cached",this.toString());return}if(!this.loaded){F.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}this.element||(this.element=F.makeNeutralElement("div"),this.imgElement=this.cacheImageRecord.getImage().cloneNode(),this.imgElement.style.msInterpolationMode="nearest-neighbor",this.imgElement.style.width="100%",this.imgElement.style.height="100%",this.style=this.element.style,this.style.position="absolute"),this.element.parentNode!=W&&W.appendChild(this.element),this.imgElement.parentNode!=this.element&&this.element.appendChild(this.imgElement),this.style.top=this.position.y+"px",this.style.left=this.position.x+"px",this.style.height=this.size.y+"px",this.style.width=this.size.x+"px",F.setElementOpacity(this.element,this.opacity)},drawCanvas:function(W,q,K,X){var tt=this.position.times(F.pixelDensityRatio),rt=this.size.times(F.pixelDensityRatio),ot;if(!this.context2D&&!this.cacheImageRecord){F.console.warn("[Tile.drawCanvas] attempting to draw tile %s when it's not cached",this.toString());return}if(ot=this.context2D||this.cacheImageRecord.getRenderedContext(),!this.loaded||!ot){F.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}W.save(),W.globalAlpha=this.opacity,typeof K=="number"&&K!==1&&(tt=tt.times(K),rt=rt.times(K)),X instanceof F.Point&&(tt=tt.plus(X)),W.globalAlpha===1&&this._hasTransparencyChannel()&&W.clearRect(tt.x,tt.y,rt.x,rt.y),q({context:W,tile:this,rendered:ot});var ut,yn;this.sourceBounds?(ut=Math.min(this.sourceBounds.width,ot.canvas.width),yn=Math.min(this.sourceBounds.height,ot.canvas.height)):(ut=ot.canvas.width,yn=ot.canvas.height),W.drawImage(ot.canvas,0,0,ut,yn,tt.x,tt.y,rt.x,rt.y),W.restore()},getScaleForEdgeSmoothing:function(){var W;if(this.cacheImageRecord)W=this.cacheImageRecord.getRenderedContext();else if(this.context2D)W=this.context2D;else return F.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;return W.canvas.width/(this.size.x*F.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(W,q,K){var X=Math.max(1,Math.ceil((K.x-q.x)/2)),tt=Math.max(1,Math.ceil((K.y-q.y)/2));return new F.Point(X,tt).minus(this.position.times(F.pixelDensityRatio).times(W||1).apply(function(rt){return rt%1}))},unload:function(){this.imgElement&&this.imgElement.parentNode&&this.imgElement.parentNode.removeChild(this.imgElement),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.imgElement=null,this.loaded=!1,this.loading=!1}}}(OpenSeadragon),function(F){F.OverlayPlacement=F.Placement,F.OverlayRotationMode=F.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),F.Overlay=function(W,q,K){var X;F.isPlainObject(W)?X=W:X={element:W,location:q,placement:K},this.element=X.element,this.style=X.element.style,this._init(X)},F.Overlay.prototype={_init:function(W){this.location=W.location,this.placement=W.placement===void 0?F.Placement.TOP_LEFT:W.placement,this.onDraw=W.onDraw,this.checkResize=W.checkResize===void 0?!0:W.checkResize,this.width=W.width===void 0?null:W.width,this.height=W.height===void 0?null:W.height,this.rotationMode=W.rotationMode||F.OverlayRotationMode.EXACT,this.location instanceof F.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=F.Placement.TOP_LEFT),this.scales=this.width!==null&&this.height!==null,this.bounds=new F.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(W,q){var K=F.Placement.properties[this.placement];K&&(K.isHorizontallyCentered?W.x-=q.x/2:K.isRight&&(W.x-=q.x),K.isVerticallyCentered?W.y-=q.y/2:K.isBottom&&(W.y-=q.y))},destroy:function(){var W=this.element,q=this.style;W.parentNode&&(W.parentNode.removeChild(W),W.prevElementParent&&(q.display="none",document.body.appendChild(W))),this.onDraw=null,q.top="",q.left="",q.position="",this.width!==null&&(q.width=""),this.height!==null&&(q.height="");var K=F.getCssPropertyWithVendorPrefix("transformOrigin"),X=F.getCssPropertyWithVendorPrefix("transform");K&&X&&(q[K]="",q[X]="")},drawHTML:function(W,q){var K=this.element;K.parentNode!==W&&(K.prevElementParent=K.parentNode,K.prevNextSibling=K.nextSibling,W.appendChild(K),this.style.position="absolute",this.size=F.getElementSize(K));var X=this._getOverlayPositionAndSize(q),tt=X.position,rt=this.size=X.size,ot=X.rotate;if(this.onDraw)this.onDraw(tt,rt,this.element);else{var ut=this.style;ut.left=tt.x+"px",ut.top=tt.y+"px",this.width!==null&&(ut.width=rt.x+"px"),this.height!==null&&(ut.height=rt.y+"px");var yn=F.getCssPropertyWithVendorPrefix("transformOrigin"),uo=F.getCssPropertyWithVendorPrefix("transform");yn&&uo&&(ot?(ut[yn]=this._getTransformOrigin(),ut[uo]="rotate("+ot+"deg)"):(ut[yn]="",ut[uo]="")),ut.display!=="none"&&(ut.display="block")}},_getOverlayPositionAndSize:function(W){var q=W.pixelFromPoint(this.location,!0),K=this._getSizeInPixels(W);this.adjust(q,K);var X=0;if(W.degrees&&this.rotationMode!==F.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===F.OverlayRotationMode.BOUNDING_BOX&&this.width!==null&&this.height!==null){var tt=new F.Rect(q.x,q.y,K.x,K.y),rt=this._getBoundingBox(tt,W.degrees);q=rt.getTopLeft(),K=rt.getSize()}else X=W.degrees;return{position:q,size:K,rotate:X}},_getSizeInPixels:function(W){var q=this.size.x,K=this.size.y;if(this.width!==null||this.height!==null){var X=W.deltaPixelsFromPointsNoRotate(new F.Point(this.width||0,this.height||0),!0);this.width!==null&&(q=X.x),this.height!==null&&(K=X.y)}if(this.checkResize&&(this.width===null||this.height===null)){var tt=this.size=F.getElementSize(this.element);this.width===null&&(q=tt.x),this.height===null&&(K=tt.y)}return new F.Point(q,K)},_getBoundingBox:function(W,q){var K=this._getPlacementPoint(W);return W.rotate(q,K).getBoundingBox()},_getPlacementPoint:function(W){var q=new F.Point(W.x,W.y),K=F.Placement.properties[this.placement];return K&&(K.isHorizontallyCentered?q.x+=W.width/2:K.isRight&&(q.x+=W.width),K.isVerticallyCentered?q.y+=W.height/2:K.isBottom&&(q.y+=W.height)),q},_getTransformOrigin:function(){var W="",q=F.Placement.properties[this.placement];return q&&(q.isLeft?W="left":q.isRight&&(W="right"),q.isTop?W+=" top":q.isBottom&&(W+=" bottom")),W},update:function(W,q){var K=F.isPlainObject(W)?W:{location:W,placement:q};this._init({location:K.location||this.location,placement:K.placement!==void 0?K.placement:this.placement,onDraw:K.onDraw||this.onDraw,checkResize:K.checkResize||this.checkResize,width:K.width!==void 0?K.width:this.width,height:K.height!==void 0?K.height:this.height,rotationMode:K.rotationMode||this.rotationMode})},getBounds:function(W){F.console.assert(W,"A viewport must now be passed to Overlay.getBounds.");var q=this.width,K=this.height;if(q===null||K===null){var X=W.deltaPointsFromPixelsNoRotate(this.size,!0);q===null&&(q=X.x),K===null&&(K=X.y)}var tt=this.location.clone();return this.adjust(tt,new F.Point(q,K)),this._adjustBoundsForRotation(W,new F.Rect(tt.x,tt.y,q,K))},_adjustBoundsForRotation:function(W,q){if(!W||W.degrees===0||this.rotationMode===F.OverlayRotationMode.EXACT)return q;if(this.rotationMode===F.OverlayRotationMode.BOUNDING_BOX){if(this.width===null||this.height===null)return q;var K=this._getOverlayPositionAndSize(W);return W.viewerElementToViewportRectangle(new F.Rect(K.position.x,K.position.y,K.size.x,K.size.y))}return q.rotate(-W.degrees,this._getPlacementPoint(q))}}}(OpenSeadragon),function(F){F.Drawer=function(W){F.console.assert(W.viewer,"[Drawer] options.viewer is required");var q=arguments;if(F.isPlainObject(W)||(W={source:q[0],viewport:q[1],element:q[2]}),F.console.assert(W.viewport,"[Drawer] options.viewport is required"),F.console.assert(W.element,"[Drawer] options.element is required"),W.source&&F.console.error("[Drawer] options.source is no longer accepted; use TiledImage instead"),this.viewer=W.viewer,this.viewport=W.viewport,this.debugGridColor=typeof W.debugGridColor=="string"?[W.debugGridColor]:W.debugGridColor||F.DEFAULT_SETTINGS.debugGridColor,W.opacity&&F.console.error("[Drawer] options.opacity is no longer accepted; set the opacity on the TiledImage instead"),this.useCanvas=F.supportsCanvas&&(this.viewer?this.viewer.useCanvas:!0),this.container=F.getElement(W.element),this.canvas=F.makeNeutralElement(this.useCanvas?"canvas":"div"),this.context=this.useCanvas?this.canvas.getContext("2d"):null,this.sketchCanvas=null,this.sketchContext=null,this.element=this.container,this.container.dir="ltr",this.useCanvas){var K=this._calculateCanvasSize();this.canvas.width=K.x,this.canvas.height=K.y}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",F.setElementOpacity(this.canvas,this.opacity,!0),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._imageSmoothingEnabled=!0},F.Drawer.prototype={addOverlay:function(W,q,K,X){return F.console.error("drawer.addOverlay is deprecated. Use viewer.addOverlay instead."),this.viewer.addOverlay(W,q,K,X),this},updateOverlay:function(W,q,K){return F.console.error("drawer.updateOverlay is deprecated. Use viewer.updateOverlay instead."),this.viewer.updateOverlay(W,q,K),this},removeOverlay:function(W){return F.console.error("drawer.removeOverlay is deprecated. Use viewer.removeOverlay instead."),this.viewer.removeOverlay(W),this},clearOverlays:function(){return F.console.error("drawer.clearOverlays is deprecated. Use viewer.clearOverlays instead."),this.viewer.clearOverlays(),this},viewportCoordToDrawerCoord:function(W){var q=this.viewport.pixelFromPointNoRotate(W,!0);return new F.Point(q.x*F.pixelDensityRatio,q.y*F.pixelDensityRatio)},clipWithPolygons:function(W,q){if(this.useCanvas){var K=this._getContext(q);K.beginPath(),W.forEach(function(X){X.forEach(function(tt,rt){K[rt===0?"moveTo":"lineTo"](tt.x,tt.y)})}),K.clip()}},setOpacity:function(W){F.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");for(var q=this.viewer.world,K=0;Kq&&(q=X)}return q},needsUpdate:function(){return F.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return F.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return F.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return F.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var W=this._calculateCanvasSize();if((this.canvas.width!=W.x||this.canvas.height!=W.y)&&(this.canvas.width=W.x,this.canvas.height=W.y,this._updateImageSmoothingEnabled(this.context),this.sketchCanvas!==null)){var q=this._calculateSketchCanvasSize();this.sketchCanvas.width=q.x,this.sketchCanvas.height=q.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(W,q){if(this.useCanvas){var K=this._getContext(W);if(q)K.clearRect(q.x,q.y,q.width,q.height);else{var X=K.canvas;K.clearRect(0,0,X.width,X.height)}}},viewportToDrawerRectangle:function(W){var q=this.viewport.pixelFromPointNoRotate(W.getTopLeft(),!0),K=this.viewport.deltaPixelsFromPointsNoRotate(W.getSize(),!0);return new F.Rect(q.x*F.pixelDensityRatio,q.y*F.pixelDensityRatio,K.x*F.pixelDensityRatio,K.y*F.pixelDensityRatio)},drawTile:function(W,q,K,X,tt){if(F.console.assert(W,"[Drawer.drawTile] tile is required"),F.console.assert(q,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var rt=this._getContext(K);X=X||1,W.drawCanvas(rt,q,X,tt)}else W.drawHTML(this.canvas)},_getContext:function(W){var q=this.context;if(W){if(this.sketchCanvas===null){this.sketchCanvas=document.createElement("canvas");var K=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=K.x,this.sketchCanvas.height=K.y,this.sketchContext=this.sketchCanvas.getContext("2d"),this.viewport.getRotation()===0){var X=this;this.viewer.addHandler("rotate",function tt(){if(X.viewport.getRotation()!==0){X.viewer.removeHandler("rotate",tt);var rt=X._calculateSketchCanvasSize();X.sketchCanvas.width=rt.x,X.sketchCanvas.height=rt.y}})}this._updateImageSmoothingEnabled(this.sketchContext)}q=this.sketchContext}return q},saveContext:function(W){this.useCanvas&&this._getContext(W).save()},restoreContext:function(W){this.useCanvas&&this._getContext(W).restore()},setClip:function(W,q){if(this.useCanvas){var K=this._getContext(q);K.beginPath(),K.rect(W.x,W.y,W.width,W.height),K.clip()}},drawRectangle:function(W,q,K){if(this.useCanvas){var X=this._getContext(K);X.save(),X.fillStyle=q,X.fillRect(W.x,W.y,W.width,W.height),X.restore()}},blendSketch:function(W,q,K,X){var tt=W;if(F.isPlainObject(tt)||(tt={opacity:W,scale:q,translate:K,compositeOperation:X}),!(!this.useCanvas||!this.sketchCanvas)){W=tt.opacity,X=tt.compositeOperation;var rt=tt.bounds;if(this.context.save(),this.context.globalAlpha=W,X&&(this.context.globalCompositeOperation=X),rt)rt.x<0&&(rt.width+=rt.x,rt.x=0),rt.x+rt.width>this.canvas.width&&(rt.width=this.canvas.width-rt.x),rt.y<0&&(rt.height+=rt.y,rt.y=0),rt.y+rt.height>this.canvas.height&&(rt.height=this.canvas.height-rt.y),this.context.drawImage(this.sketchCanvas,rt.x,rt.y,rt.width,rt.height,rt.x,rt.y,rt.width,rt.height);else{q=tt.scale||1,K=tt.translate;var ot=K instanceof F.Point?K:new F.Point(0,0),ut=0,yn=0;if(K){var uo=this.sketchCanvas.width-this.canvas.width,po=this.sketchCanvas.height-this.canvas.height;ut=Math.round(uo/2),yn=Math.round(po/2)}this.context.drawImage(this.sketchCanvas,ot.x-ut*q,ot.y-yn*q,(this.canvas.width+2*ut)*q,(this.canvas.height+2*yn)*q,-ut,-yn,this.canvas.width+2*ut,this.canvas.height+2*yn)}this.context.restore()}},drawDebugInfo:function(W,q,K,X){if(this.useCanvas){var tt=this.viewer.world.getIndexOfItem(X)%this.debugGridColor.length,rt=this.context;rt.save(),rt.lineWidth=2*F.pixelDensityRatio,rt.font="small-caps bold "+13*F.pixelDensityRatio+"px arial",rt.strokeStyle=this.debugGridColor[tt],rt.fillStyle=this.debugGridColor[tt],this.viewport.degrees!==0&&this._offsetForRotation({degrees:this.viewport.degrees}),X.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:X.getRotation(!0),point:X.viewport.pixelFromPointNoRotate(X._getRotationPoint(!0),!0)}),X.viewport.degrees===0&&X.getRotation(!0)%360===0&&X._drawer.viewer.viewport.getFlip()&&X._drawer._flip(),rt.strokeRect(W.position.x*F.pixelDensityRatio,W.position.y*F.pixelDensityRatio,W.size.x*F.pixelDensityRatio,W.size.y*F.pixelDensityRatio);var ot=(W.position.x+W.size.x/2)*F.pixelDensityRatio,ut=(W.position.y+W.size.y/2)*F.pixelDensityRatio;rt.translate(ot,ut),rt.rotate(Math.PI/180*-this.viewport.degrees),rt.translate(-ot,-ut),W.x===0&&W.y===0&&(rt.fillText("Zoom: "+this.viewport.getZoom(),W.position.x*F.pixelDensityRatio,(W.position.y-30)*F.pixelDensityRatio),rt.fillText("Pan: "+this.viewport.getBounds().toString(),W.position.x*F.pixelDensityRatio,(W.position.y-20)*F.pixelDensityRatio)),rt.fillText("Level: "+W.level,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+20)*F.pixelDensityRatio),rt.fillText("Column: "+W.x,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+30)*F.pixelDensityRatio),rt.fillText("Row: "+W.y,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+40)*F.pixelDensityRatio),rt.fillText("Order: "+K+" of "+q,(W.position.x+10)*F.pixelDensityRatio,(W.position.y+50)*F.pixelDensityRatio),rt.fillText("Size: "+W.size.toString(),(W.position.x+10)*F.pixelDensityRatio,(W.position.y+60)*F.pixelDensityRatio),rt.fillText("Position: "+W.position.toString(),(W.position.x+10)*F.pixelDensityRatio,(W.position.y+70)*F.pixelDensityRatio),this.viewport.degrees!==0&&this._restoreRotationChanges(),X.getRotation(!0)%360!==0&&this._restoreRotationChanges(),X.viewport.degrees===0&&X.getRotation(!0)%360===0&&X._drawer.viewer.viewport.getFlip()&&X._drawer._flip(),rt.restore()}},debugRect:function(W){if(this.useCanvas){var q=this.context;q.save(),q.lineWidth=2*F.pixelDensityRatio,q.strokeStyle=this.debugGridColor[0],q.fillStyle=this.debugGridColor[0],q.strokeRect(W.x*F.pixelDensityRatio,W.y*F.pixelDensityRatio,W.width*F.pixelDensityRatio,W.height*F.pixelDensityRatio),q.restore()}},setImageSmoothingEnabled:function(W){this.useCanvas&&(this._imageSmoothingEnabled=W,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(W){W.msImageSmoothingEnabled=this._imageSmoothingEnabled,W.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(W){var q=this._getContext(W).canvas;return new F.Point(q.width,q.height)},getCanvasCenter:function(){return new F.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(W){var q=W.point?W.point.times(F.pixelDensityRatio):this.getCanvasCenter(),K=this._getContext(W.useSketch);K.save(),K.translate(q.x,q.y),this.viewer.viewport.flipped?(K.rotate(Math.PI/180*-W.degrees),K.scale(-1,1)):K.rotate(Math.PI/180*W.degrees),K.translate(-q.x,-q.y)},_flip:function(W){W=W||{};var q=W.point?W.point.times(F.pixelDensityRatio):this.getCanvasCenter(),K=this._getContext(W.useSketch);K.translate(q.x,0),K.scale(-1,1),K.translate(-q.x,0)},_restoreRotationChanges:function(W){var q=this._getContext(W);q.restore()},_calculateCanvasSize:function(){var W=F.pixelDensityRatio,q=this.viewport.getContainerSize();return{x:Math.round(q.x*W),y:Math.round(q.y*W)}},_calculateSketchCanvasSize:function(){var W=this._calculateCanvasSize();if(this.viewport.getRotation()===0)return W;var q=Math.ceil(Math.sqrt(W.x*W.x+W.y*W.y));return{x:q,y:q}}}}(OpenSeadragon),function(F){F.Viewport=function(W){var q=arguments;q.length&&q[0]instanceof F.Point&&(W={containerSize:q[0],contentSize:q[1],config:q[2]}),W.config&&(F.extend(!0,W,W.config),delete W.config),this._margins=F.extend({left:0,top:0,right:0,bottom:0},W.margins||{}),delete W.margins,F.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,viewer:null,springStiffness:F.DEFAULT_SETTINGS.springStiffness,animationTime:F.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:F.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:F.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:F.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:F.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:F.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:F.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:F.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:F.DEFAULT_SETTINGS.maxZoomLevel,degrees:F.DEFAULT_SETTINGS.degrees,flipped:F.DEFAULT_SETTINGS.flipped,homeFillsViewer:F.DEFAULT_SETTINGS.homeFillsViewer},W),this._updateContainerInnerSize(),this.centerSpringX=new F.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new F.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new F.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._setContentBounds(new F.Rect(0,0,1,1),1),this.goHome(!0),this.update()},F.Viewport.prototype={resetContentSize:function(W){return F.console.assert(W,"[Viewport.resetContentSize] contentSize is required"),F.console.assert(W instanceof F.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),F.console.assert(W.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),F.console.assert(W.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new F.Rect(0,0,1,W.y/W.x),W.x),this},setHomeBounds:function(W,q){F.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(W,q)},_setContentBounds:function(W,q){F.console.assert(W,"[Viewport._setContentBounds] bounds is required"),F.console.assert(W instanceof F.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),F.console.assert(W.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),F.console.assert(W.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=W.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(q),this._contentBounds=W.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(q),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:q,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var W=this._contentAspectRatio/this.getAspectRatio(),q;return this.homeFillsViewer?q=W>=1?W:1:q=W>=1?1:W,q/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var W=this._contentBounds.getCenter(),q=1/this.getHomeZoom(),K=q/this.getAspectRatio();return new F.Rect(W.x-q/2,W.y-K/2,q,K)},goHome:function(W){return this.viewer&&this.viewer.raiseEvent("home",{immediately:W}),this.fitBounds(this.getHomeBounds(),W)},getMinZoom:function(){var W=this.getHomeZoom(),q=this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*W;return q},getMaxZoom:function(){var W=this.maxZoomLevel;return W||(W=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,W/=this._contentBounds.width),Math.max(W,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new F.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return F.extend({},this._margins)},setMargins:function(W){F.console.assert(F.type(W)==="object","[Viewport.setMargins] margins must be an object"),this._margins=F.extend({left:0,top:0,right:0,bottom:0},W),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(W){return this.getBoundsNoRotate(W).rotate(-this.getRotation())},getBoundsNoRotate:function(W){var q=this.getCenter(W),K=1/this.getZoom(W),X=K/this.getAspectRatio();return new F.Rect(q.x-K/2,q.y-X/2,K,X)},getBoundsWithMargins:function(W){return this.getBoundsNoRotateWithMargins(W).rotate(-this.getRotation(),this.getCenter(W))},getBoundsNoRotateWithMargins:function(W){var q=this.getBoundsNoRotate(W),K=this._containerInnerSize.x*this.getZoom(W);return q.x-=this._margins.left/K,q.y-=this._margins.top/K,q.width+=(this._margins.left+this._margins.right)/K,q.height+=(this._margins.top+this._margins.bottom)/K,q},getCenter:function(W){var q=new F.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),K=new F.Point(this.centerSpringX.target.value,this.centerSpringY.target.value),X,tt,rt,ot,ut,yn,uo,po;return W?q:this.zoomPoint?(X=this.pixelFromPoint(this.zoomPoint,!0),tt=this.getZoom(),rt=1/tt,ot=rt/this.getAspectRatio(),ut=new F.Rect(q.x-rt/2,q.y-ot/2,rt,ot),yn=this._pixelFromPoint(this.zoomPoint,ut),uo=yn.minus(X),po=uo.divide(this._containerInnerSize.x*tt),K.plus(po)):K},getZoom:function(W){return W?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(W){return Math.max(Math.min(W,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(W){var q=new F.Rect(W.x,W.y,W.width,W.height);if(!this.wrapHorizontal){var K=this.visibilityRatio*q.width,X=q.x+q.width,tt=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,rt=this._contentBoundsNoRotate.x-X+K,ot=tt-q.x-K;K>this._contentBoundsNoRotate.width?q.x+=(rt+ot)/2:ot<0?q.x+=ot:rt>0&&(q.x+=rt)}if(!this.wrapVertical){var ut=this.visibilityRatio*q.height,yn=q.y+q.height,uo=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,po=this._contentBoundsNoRotate.y-yn+ut,mo=uo-q.y-ut;ut>this._contentBoundsNoRotate.height?q.y+=(po+mo)/2:mo<0?q.y+=mo:po>0&&(q.y+=po)}return q},_raiseConstraintsEvent:function(W){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:W})},applyConstraints:function(W){var q=this.getZoom(),K=this._applyZoomConstraints(q);q!==K&&this.zoomTo(K,this.zoomPoint,W);var X=this.getBoundsNoRotate(),tt=this._applyBoundaryConstraints(X);return this._raiseConstraintsEvent(W),(X.x!==tt.x||X.y!==tt.y||W)&&this.fitBounds(tt.rotate(-this.getRotation()),W),this},ensureVisible:function(W){return this.applyConstraints(W)},_fitBounds:function(W,q){q=q||{};var K=q.immediately||!1,X=q.constraints||!1,tt=this.getAspectRatio(),rt=W.getCenter(),ot=new F.Rect(W.x,W.y,W.width,W.height,W.degrees+this.getRotation()).getBoundingBox();ot.getAspectRatio()>=tt?ot.height=ot.width/tt:ot.width=ot.height*tt,ot.x=rt.x-ot.width/2,ot.y=rt.y-ot.height/2;var ut=1/ot.width;if(X){var yn=ot.getAspectRatio(),uo=this._applyZoomConstraints(ut);ut!==uo&&(ut=uo,ot.width=1/ut,ot.x=rt.x-ot.width/2,ot.height=ot.width/yn,ot.y=rt.y-ot.height/2),ot=this._applyBoundaryConstraints(ot),rt=ot.getCenter(),this._raiseConstraintsEvent(K)}if(K)return this.panTo(rt,!0),this.zoomTo(ut,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var po=this.getBounds(),mo=this.getZoom();if(mo===0||Math.abs(ut/mo-1)<1e-8)return this.zoomTo(ut,!0),this.panTo(rt,K);ot=ot.rotate(-this.getRotation());var wo=ot.getTopLeft().times(ut).minus(po.getTopLeft().times(mo)).divide(ut-mo);return this.zoomTo(ut,wo,K)},fitBounds:function(W,q){return this._fitBounds(W,{immediately:q,constraints:!1})},fitBoundsWithConstraints:function(W,q){return this._fitBounds(W,{immediately:q,constraints:!0})},fitVertically:function(W){var q=new F.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(q,W)},fitHorizontally:function(W){var q=new F.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(q,W)},getConstrainedBounds:function(W){var q,K;return q=this.getBounds(W),K=this._applyBoundaryConstraints(q),K},panBy:function(W,q){var K=new F.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(K.plus(W),q)},panTo:function(W,q){return q?(this.centerSpringX.resetTo(W.x),this.centerSpringY.resetTo(W.y)):(this.centerSpringX.springTo(W.x),this.centerSpringY.springTo(W.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:W,immediately:q}),this},zoomBy:function(W,q,K){return this.zoomTo(this.zoomSpring.target.value*W,q,K)},zoomTo:function(W,q,K){var X=this;return this.zoomPoint=q instanceof F.Point&&!isNaN(q.x)&&!isNaN(q.y)?q:null,K?this._adjustCenterSpringsForZoomPoint(function(){X.zoomSpring.resetTo(W)}):this.zoomSpring.springTo(W),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:W,refPoint:q,immediately:K}),this},setRotation:function(W){return!this.viewer||!this.viewer.drawer.canRotate()?this:(this.degrees=F.positiveModulo(W,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:W}),this)},getRotation:function(){return this.degrees},resize:function(W,q){var K=this.getBoundsNoRotate(),X=K,tt;return this.containerSize.x=W.x,this.containerSize.y=W.y,this._updateContainerInnerSize(),q&&(tt=W.x/this.containerSize.x,X.width=K.width*tt,X.height=X.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:W,maintain:q}),this.fitBounds(X,!0)},_updateContainerInnerSize:function(){this._containerInnerSize=new F.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var W=this;this._adjustCenterSpringsForZoomPoint(function(){W.zoomSpring.update()}),this.centerSpringX.update(),this.centerSpringY.update();var q=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,q},_adjustCenterSpringsForZoomPoint:function(W){if(this.zoomPoint){var q=this.pixelFromPoint(this.zoomPoint,!0);W();var K=this.pixelFromPoint(this.zoomPoint,!0),X=K.minus(q),tt=this.deltaPointsFromPixels(X,!0);this.centerSpringX.shiftBy(tt.x),this.centerSpringY.shiftBy(tt.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else W()},deltaPixelsFromPointsNoRotate:function(W,q){return W.times(this._containerInnerSize.x*this.getZoom(q))},deltaPixelsFromPoints:function(W,q){return this.deltaPixelsFromPointsNoRotate(W.rotate(this.getRotation()),q)},deltaPointsFromPixelsNoRotate:function(W,q){return W.divide(this._containerInnerSize.x*this.getZoom(q))},deltaPointsFromPixels:function(W,q){return this.deltaPointsFromPixelsNoRotate(W,q).rotate(-this.getRotation())},pixelFromPointNoRotate:function(W,q){return this._pixelFromPointNoRotate(W,this.getBoundsNoRotate(q))},pixelFromPoint:function(W,q){return this._pixelFromPoint(W,this.getBoundsNoRotate(q))},_pixelFromPointNoRotate:function(W,q){return W.minus(q.getTopLeft()).times(this._containerInnerSize.x/q.width).plus(new F.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(W,q){return this._pixelFromPointNoRotate(W.rotate(this.getRotation(),this.getCenter(!0)),q)},pointFromPixelNoRotate:function(W,q){var K=this.getBoundsNoRotate(q);return W.minus(new F.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/K.width).plus(K.getTopLeft())},pointFromPixel:function(W,q){return this.pointFromPixelNoRotate(W,q).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(W,q){var K=this._contentBoundsNoRotate.width;return new F.Point(W*this._contentSizeNoRotate.x/K,q*this._contentSizeNoRotate.x/K)},viewportToImageCoordinates:function(W,q){if(W instanceof F.Point)return this.viewportToImageCoordinates(W.x,W.y);if(this.viewer){var K=this.viewer.world.getItemCount();if(K>1)F.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(K===1){var X=this.viewer.world.getItemAt(0);return X.viewportToImageCoordinates(W,q,!0)}}return this._viewportToImageDelta(W-this._contentBoundsNoRotate.x,q-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(W,q){var K=this._contentBoundsNoRotate.width;return new F.Point(W/this._contentSizeNoRotate.x*K,q/this._contentSizeNoRotate.x*K)},imageToViewportCoordinates:function(W,q){if(W instanceof F.Point)return this.imageToViewportCoordinates(W.x,W.y);if(this.viewer){var K=this.viewer.world.getItemCount();if(K>1)F.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(K===1){var X=this.viewer.world.getItemAt(0);return X.imageToViewportCoordinates(W,q,!0)}}var tt=this._imageToViewportDelta(W,q);return tt.x+=this._contentBoundsNoRotate.x,tt.y+=this._contentBoundsNoRotate.y,tt},imageToViewportRectangle:function(W,q,K,X){var tt=W;if(tt instanceof F.Rect||(tt=new F.Rect(W,q,K,X)),this.viewer){var rt=this.viewer.world.getItemCount();if(rt>1)F.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(rt===1){var ot=this.viewer.world.getItemAt(0);return ot.imageToViewportRectangle(W,q,K,X,!0)}}var ut=this.imageToViewportCoordinates(tt.x,tt.y),yn=this._imageToViewportDelta(tt.width,tt.height);return new F.Rect(ut.x,ut.y,yn.x,yn.y,tt.degrees)},viewportToImageRectangle:function(W,q,K,X){var tt=W;if(tt instanceof F.Rect||(tt=new F.Rect(W,q,K,X)),this.viewer){var rt=this.viewer.world.getItemCount();if(rt>1)F.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(rt===1){var ot=this.viewer.world.getItemAt(0);return ot.viewportToImageRectangle(W,q,K,X,!0)}}var ut=this.viewportToImageCoordinates(tt.x,tt.y),yn=this._viewportToImageDelta(tt.width,tt.height);return new F.Rect(ut.x,ut.y,yn.x,yn.y,tt.degrees)},viewerElementToImageCoordinates:function(W){var q=this.pointFromPixel(W,!0);return this.viewportToImageCoordinates(q)},imageToViewerElementCoordinates:function(W){var q=this.imageToViewportCoordinates(W);return this.pixelFromPoint(q,!0)},windowToImageCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var q=W.minus(F.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(q)},imageToWindowCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer.");var q=this.imageToViewerElementCoordinates(W);return q.plus(F.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(W){return this.pointFromPixel(W,!0)},viewportToViewerElementCoordinates:function(W){return this.pixelFromPoint(W,!0)},viewerElementToViewportRectangle:function(W){return F.Rect.fromSummits(this.pointFromPixel(W.getTopLeft(),!0),this.pointFromPixel(W.getTopRight(),!0),this.pointFromPixel(W.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(W){return F.Rect.fromSummits(this.pixelFromPoint(W.getTopLeft(),!0),this.pixelFromPoint(W.getTopRight(),!0),this.pixelFromPoint(W.getBottomLeft(),!0))},windowToViewportCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var q=W.minus(F.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(q)},viewportToWindowCoordinates:function(W){F.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer.");var q=this.viewportToViewerElementCoordinates(W);return q.plus(F.getElementPosition(this.viewer.element))},viewportToImageZoom:function(W){if(this.viewer){var q=this.viewer.world.getItemCount();if(q>1)F.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(q===1){var K=this.viewer.world.getItemAt(0);return K.viewportToImageZoom(W)}}var X=this._contentSizeNoRotate.x,tt=this._containerInnerSize.x,rt=this._contentBoundsNoRotate.width,ot=tt/X*rt;return W*ot},imageToViewportZoom:function(W){if(this.viewer){var q=this.viewer.world.getItemCount();if(q>1)F.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(q===1){var K=this.viewer.world.getItemAt(0);return K.imageToViewportZoom(W)}}var X=this._contentSizeNoRotate.x,tt=this._containerInnerSize.x,rt=this._contentBoundsNoRotate.width,ot=X/tt/rt;return W*ot},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(W){return this.flipped===W?this:(this.flipped=W,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:W}),this)}}}(OpenSeadragon),function(F){F.TiledImage=function(cf){var vf=this;F.console.assert(cf.tileCache,"[TiledImage] options.tileCache is required"),F.console.assert(cf.drawer,"[TiledImage] options.drawer is required"),F.console.assert(cf.viewer,"[TiledImage] options.viewer is required"),F.console.assert(cf.imageLoader,"[TiledImage] options.imageLoader is required"),F.console.assert(cf.source,"[TiledImage] options.source is required"),F.console.assert(!cf.clip||cf.clip instanceof F.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),F.EventSource.call(this),this._tileCache=cf.tileCache,delete cf.tileCache,this._drawer=cf.drawer,delete cf.drawer,this._imageLoader=cf.imageLoader,delete cf.imageLoader,cf.clip instanceof F.Rect&&(this._clip=cf.clip.clone()),delete cf.clip;var _f=cf.x||0;delete cf.x;var $f=cf.y||0;delete cf.y,this.normHeight=cf.source.dimensions.y/cf.source.dimensions.x,this.contentAspectX=cf.source.dimensions.x/cf.source.dimensions.y;var xf=1;cf.width?(xf=cf.width,delete cf.width,cf.height&&(F.console.error("specifying both width and height to a tiledImage is not supported"),delete cf.height)):cf.height&&(xf=cf.height/this.normHeight,delete cf.height);var Af=cf.fitBounds;delete cf.fitBounds;var Cf=cf.fitBoundsPlacement||OpenSeadragon.Placement.CENTER;delete cf.fitBoundsPlacement;var Pf=cf.degrees||0;delete cf.degrees,F.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:F.DEFAULT_SETTINGS.springStiffness,animationTime:F.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:F.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:F.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:F.DEFAULT_SETTINGS.wrapVertical,immediateRender:F.DEFAULT_SETTINGS.immediateRender,blendTime:F.DEFAULT_SETTINGS.blendTime,alwaysBlend:F.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:F.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:F.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:F.DEFAULT_SETTINGS.iOSDevice,debugMode:F.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:F.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:F.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:F.DEFAULT_SETTINGS.placeholderFillStyle,opacity:F.DEFAULT_SETTINGS.opacity,preload:F.DEFAULT_SETTINGS.preload,compositeOperation:F.DEFAULT_SETTINGS.compositeOperation},cf),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new F.Spring({initial:_f,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new F.Spring({initial:$f,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new F.Spring({initial:xf,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new F.Spring({initial:Pf,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),Af&&this.fitBounds(Af,Cf,!0),this._drawingHandler=function(Bf){vf.viewer.raiseEvent("tile-drawing",F.extend({tiledImage:vf},Bf))}},F.extend(F.TiledImage.prototype,F.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(cf){cf!==this._fullyLoaded&&(this._fullyLoaded=cf,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=F.now(),this._needsDraw=!0},update:function(){var cf=this._xSpring.update(),vf=this._ySpring.update(),_f=this._scaleSpring.update(),$f=this._degreesSpring.update();return cf||vf||_f||$f?(this._updateForScale(),this._needsDraw=!0,!0):!1},draw:function(){this.opacity!==0||this._preload?(this._midDraw=!0,this._updateViewport(),this._midDraw=!1):this._needsDraw=!1},destroy:function(){this.reset()},getBounds:function(cf){return this.getBoundsNoRotate(cf).rotate(this.getRotation(cf),this._getRotationPoint(cf))},getBoundsNoRotate:function(cf){return cf?new F.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new F.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return F.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(cf){var vf=this.getBoundsNoRotate(cf);if(this._clip){var _f=cf?this._worldWidthCurrent:this._worldWidthTarget,$f=_f/this.source.dimensions.x,xf=this._clip.times($f);vf=new F.Rect(vf.x+xf.x,vf.y+xf.y,xf.width,xf.height)}return vf.rotate(this.getRotation(cf),this._getRotationPoint(cf))},getContentSize:function(){return new F.Point(this.source.dimensions.x,this.source.dimensions.y)},_viewportToImageDelta:function(cf,vf,_f){var $f=_f?this._scaleSpring.current.value:this._scaleSpring.target.value;return new F.Point(cf*(this.source.dimensions.x/$f),vf*(this.source.dimensions.y*this.contentAspectX/$f))},viewportToImageCoordinates:function(cf,vf,_f){var $f;return cf instanceof F.Point?(_f=vf,$f=cf):$f=new F.Point(cf,vf),$f=$f.rotate(-this.getRotation(_f),this._getRotationPoint(_f)),_f?this._viewportToImageDelta($f.x-this._xSpring.current.value,$f.y-this._ySpring.current.value):this._viewportToImageDelta($f.x-this._xSpring.target.value,$f.y-this._ySpring.target.value)},_imageToViewportDelta:function(cf,vf,_f){var $f=_f?this._scaleSpring.current.value:this._scaleSpring.target.value;return new F.Point(cf/this.source.dimensions.x*$f,vf/this.source.dimensions.y/this.contentAspectX*$f)},imageToViewportCoordinates:function(cf,vf,_f){cf instanceof F.Point&&(_f=vf,vf=cf.y,cf=cf.x);var $f=this._imageToViewportDelta(cf,vf);return _f?($f.x+=this._xSpring.current.value,$f.y+=this._ySpring.current.value):($f.x+=this._xSpring.target.value,$f.y+=this._ySpring.target.value),$f.rotate(this.getRotation(_f),this._getRotationPoint(_f))},imageToViewportRectangle:function(cf,vf,_f,$f,xf){var Af=cf;Af instanceof F.Rect?xf=vf:Af=new F.Rect(cf,vf,_f,$f);var Cf=this.imageToViewportCoordinates(Af.getTopLeft(),xf),Pf=this._imageToViewportDelta(Af.width,Af.height,xf);return new F.Rect(Cf.x,Cf.y,Pf.x,Pf.y,Af.degrees+this.getRotation(xf))},viewportToImageRectangle:function(cf,vf,_f,$f,xf){var Af=cf;cf instanceof F.Rect?xf=vf:Af=new F.Rect(cf,vf,_f,$f);var Cf=this.viewportToImageCoordinates(Af.getTopLeft(),xf),Pf=this._viewportToImageDelta(Af.width,Af.height,xf);return new F.Rect(Cf.x,Cf.y,Pf.x,Pf.y,Af.degrees-this.getRotation(xf))},viewerElementToImageCoordinates:function(cf){var vf=this.viewport.pointFromPixel(cf,!0);return this.viewportToImageCoordinates(vf)},imageToViewerElementCoordinates:function(cf){var vf=this.imageToViewportCoordinates(cf);return this.viewport.pixelFromPoint(vf,!0)},windowToImageCoordinates:function(cf){var vf=cf.minus(OpenSeadragon.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(vf)},imageToWindowCoordinates:function(cf){var vf=this.imageToViewerElementCoordinates(cf);return vf.plus(OpenSeadragon.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(cf){var vf=this._scaleSpring.current.value;return cf=cf.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new F.Rect((cf.x-this._xSpring.current.value)/vf,(cf.y-this._ySpring.current.value)/vf,cf.width/vf,cf.height/vf,cf.degrees)},viewportToImageZoom:function(cf){var vf=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return vf*cf},imageToViewportZoom:function(cf){var vf=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return cf/vf},setPosition:function(cf,vf){var _f=this._xSpring.target.value===cf.x&&this._ySpring.target.value===cf.y;if(vf){if(_f&&this._xSpring.current.value===cf.x&&this._ySpring.current.value===cf.y)return;this._xSpring.resetTo(cf.x),this._ySpring.resetTo(cf.y),this._needsDraw=!0}else{if(_f)return;this._xSpring.springTo(cf.x),this._ySpring.springTo(cf.y),this._needsDraw=!0}_f||this._raiseBoundsChange()},setWidth:function(cf,vf){this._setScale(cf,vf)},setHeight:function(cf,vf){this._setScale(cf/this.normHeight,vf)},setCroppingPolygons:function(cf){var vf=function($f){return $f instanceof F.Point||typeof $f.x=="number"&&typeof $f.y=="number"},_f=function($f){return $f.map(function(xf){try{if(vf(xf))return{x:xf.x,y:xf.y};throw new Error}catch{throw new Error("A Provided cropping polygon point is not supported")}})};try{if(!F.isArray(cf))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=cf.map(function($f){return _f($f)})}catch($f){F.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),F.console.error($f),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(cf,vf,_f){vf=vf||F.Placement.CENTER;var $f=F.Placement.properties[vf],xf=this.contentAspectX,Af=0,Cf=0,Pf=1,Bf=1;if(this._clip&&(xf=this._clip.getAspectRatio(),Pf=this._clip.width/this.source.dimensions.x,Bf=this._clip.height/this.source.dimensions.y,cf.getAspectRatio()>xf?(Af=this._clip.x/this._clip.height*cf.height,Cf=this._clip.y/this._clip.height*cf.height):(Af=this._clip.x/this._clip.width*cf.width,Cf=this._clip.y/this._clip.width*cf.width)),cf.getAspectRatio()>xf){var Hf=cf.height/Bf,Df=0;$f.isHorizontallyCentered?Df=(cf.width-cf.height*xf)/2:$f.isRight&&(Df=cf.width-cf.height*xf),this.setPosition(new F.Point(cf.x-Af+Df,cf.y-Cf),_f),this.setHeight(Hf,_f)}else{var Lf=cf.width/Pf,kf=0;$f.isVerticallyCentered?kf=(cf.height-cf.width/xf)/2:$f.isBottom&&(kf=cf.height-cf.width/xf),this.setPosition(new F.Point(cf.x-Af,cf.y-Cf+kf),_f),this.setWidth(Lf,_f)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(cf){F.console.assert(!cf||cf instanceof F.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),cf instanceof F.Rect?this._clip=cf.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getOpacity:function(){return this.opacity},setOpacity:function(cf){cf!==this.opacity&&(this.opacity=cf,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(cf){this._preload=!!cf,this._needsDraw=!0},getRotation:function(cf){return cf?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(cf,vf){this._degreesSpring.target.value===cf&&this._degreesSpring.isAtTargetValue()||(vf?this._degreesSpring.resetTo(cf):this._degreesSpring.springTo(cf),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(cf){return this.getBoundsNoRotate(cf).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(cf){cf!==this.compositeOperation&&(this.compositeOperation=cf,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(cf,vf){var _f=this._scaleSpring.target.value===cf;if(vf){if(_f&&this._scaleSpring.current.value===cf)return;this._scaleSpring.resetTo(cf),this._updateForScale(),this._needsDraw=!0}else{if(_f)return;this._scaleSpring.springTo(cf),this._updateForScale(),this._needsDraw=!0}_f||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var cf=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),vf=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,_f=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(vf/this.minPixelRatio)/Math.log(2))));return _f=Math.max(_f,this.source.minLevel||0),cf=Math.min(cf,_f),{lowestLevel:cf,highestLevel:_f}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){var cf=this.lastDrawn.pop();cf.beingDrawn=!1}var vf=this.viewport,_f=this._viewportToTiledImageRectangle(vf.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var $f=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(_f=_f.intersection($f),_f===null)return}for(var xf=this._getLevelsInterval(),Af=xf.lowestLevel,Cf=xf.highestLevel,Pf=null,Bf=!1,Hf=F.now(),Df=Cf;Df>=Af;Df--){var Lf=!1,kf=vf.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Df),!0).x*this._scaleSpring.current.value;if(Df===Af||!Bf&&kf>=this.minPixelRatio)Lf=!0,Bf=!0;else if(!Bf)continue;var Nf=vf.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Df),!1).x*this._scaleSpring.current.value,Yf=vf.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,Gf=this.immediateRender?1:Yf,rp=Math.min(1,(kf-.5)/.5),ip=Gf/Math.abs(Gf-Nf);if(Pf=W(this,Bf,Lf,Df,rp,ip,_f,Hf,Pf),yn(this.coverage,Df))break}lf(this,this.lastDrawn),Pf&&!Pf.context2D?(X(this,Pf,Hf),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(this._tilesLoading===0)},_getCornerTiles:function(cf,vf,_f){var $f,xf;this.wrapHorizontal?($f=F.positiveModulo(vf.x,1),xf=F.positiveModulo(_f.x,1)):($f=Math.max(0,vf.x),xf=Math.min(1,_f.x));var Af,Cf,Pf=1/this.source.aspectRatio;this.wrapVertical?(Af=F.positiveModulo(vf.y,Pf),Cf=F.positiveModulo(_f.y,Pf)):(Af=Math.max(0,vf.y),Cf=Math.min(Pf,_f.y));var Bf=this.source.getTileAtPoint(cf,new F.Point($f,Af)),Hf=this.source.getTileAtPoint(cf,new F.Point(xf,Cf)),Df=this.source.getNumTiles(cf);return this.wrapHorizontal&&(Bf.x+=Df.x*Math.floor(vf.x),Hf.x+=Df.x*Math.floor(_f.x)),this.wrapVertical&&(Bf.y+=Df.y*Math.floor(vf.y/Pf),Hf.y+=Df.y*Math.floor(_f.y/Pf)),{topLeft:Bf,bottomRight:Hf}}});function W(cf,vf,_f,$f,xf,Af,Cf,Pf,Bf){var Hf=Cf.getBoundingBox().getTopLeft(),Df=Cf.getBoundingBox().getBottomRight();cf.viewer&&cf.viewer.raiseEvent("update-level",{tiledImage:cf,havedrawn:vf,level:$f,opacity:xf,visibility:Af,drawArea:Cf,topleft:Hf,bottomright:Df,currenttime:Pf,best:Bf}),mo(cf.coverage,$f),mo(cf.loadingCoverage,$f);for(var Lf=cf._getCornerTiles($f,Hf,Df),kf=Lf.topLeft,Nf=Lf.bottomRight,Yf=cf.source.getNumTiles($f),Gf=cf.viewport.pixelFromPoint(cf.viewport.getCenter()),rp=kf.x;rp<=Nf.x;rp++)for(var ip=kf.y;ip<=Nf.y;ip++){if(!cf.wrapHorizontal&&!cf.wrapVertical){var ap=cf.source.getTileBounds($f,rp,ip);if(Cf.intersection(ap)===null)continue}Bf=q(cf,_f,vf,rp,ip,$f,xf,Af,Gf,Yf,Pf,Bf)}return Bf}function q(cf,vf,_f,$f,xf,Af,Cf,Pf,Bf,Hf,Df,Lf){var kf=K($f,xf,Af,cf,cf.source,cf.tilesMatrix,Df,Hf,cf._worldWidthCurrent,cf._worldHeightCurrent),Nf=_f;cf.viewer&&cf.viewer.raiseEvent("update-tile",{tiledImage:cf,tile:kf}),po(cf.coverage,Af,$f,xf,!1);var Yf=kf.loaded||kf.loading||uo(cf.loadingCoverage,Af,$f,xf);if(po(cf.loadingCoverage,Af,$f,xf,Yf),!kf.exists||(vf&&!Nf&&(uo(cf.coverage,Af,$f,xf)?po(cf.coverage,Af,$f,xf,!0):Nf=!0),!Nf))return Lf;if(ot(kf,cf.source.tileOverlap,cf.viewport,Bf,Pf,cf),!kf.loaded)if(kf.context2D)rt(cf,kf);else{var Gf=cf._tileCache.getImageRecord(kf.cacheKey);if(Gf){var rp=Gf.getImage();rt(cf,kf,rp)}}if(kf.loaded){var ip=ut(cf,kf,$f,xf,Af,Cf,Df);ip&&(cf._needsDraw=!0)}else kf.loading?cf._tilesLoading++:Yf||(Lf=wo(Lf,kf));return Lf}function K(cf,vf,_f,$f,xf,Af,Cf,Pf,Bf,Hf){var Df,Lf,kf,Nf,Yf,Gf,rp,ip,ap;return Af[_f]||(Af[_f]={}),Af[_f][cf]||(Af[_f][cf]={}),Af[_f][cf][vf]||(Df=(Pf.x+cf%Pf.x)%Pf.x,Lf=(Pf.y+vf%Pf.y)%Pf.y,kf=xf.getTileBounds(_f,Df,Lf),Nf=xf.getTileBounds(_f,Df,Lf,!0),Yf=xf.tileExists(_f,Df,Lf),Gf=xf.getTileUrl(_f,Df,Lf),$f.loadTilesWithAjax?(rp=xf.getTileAjaxHeaders(_f,Df,Lf),F.isPlainObject($f.ajaxHeaders)&&(rp=F.extend({},$f.ajaxHeaders,rp))):rp=null,ip=xf.getContext2D?xf.getContext2D(_f,Df,Lf):void 0,kf.x+=(cf-Df)/Pf.x,kf.y+=Hf/Bf*((vf-Lf)/Pf.y),ap=new F.Tile(_f,cf,vf,kf,Yf,Gf,ip,$f.loadTilesWithAjax,rp,Nf),Df===Pf.x-1&&(ap.isRightMost=!0),Lf===Pf.y-1&&(ap.isBottomMost=!0),Af[_f][cf][vf]=ap),ap=Af[_f][cf][vf],ap.lastTouchTime=Cf,ap}function X(cf,vf,_f){vf.loading=!0,cf._imageLoader.addJob({src:vf.url,loadWithAjax:vf.loadWithAjax,ajaxHeaders:vf.ajaxHeaders,crossOriginPolicy:cf.crossOriginPolicy,ajaxWithCredentials:cf.ajaxWithCredentials,callback:function($f,xf,Af){tt(cf,vf,_f,$f,xf,Af)},abort:function(){vf.loading=!1}})}function tt(cf,vf,_f,$f,xf,Af){if(!$f){F.console.log("Tile %s failed to load: %s - error: %s",vf,vf.url,xf),cf.viewer.raiseEvent("tile-load-failed",{tile:vf,tiledImage:cf,time:_f,message:xf,tileRequest:Af}),vf.loading=!1,vf.exists=!1;return}if(_fcf.visibility||vf.visibility==cf.visibility&&vf.squaredDistance1&&Pf>cf.smoothTileEdgesMinZoom&&!cf.iOSDevice&&cf.getRotation(!0)%360===0&&F.supportsCanvas&&($f=!0,xf=_f.getScaleForEdgeSmoothing(),Af=_f.getTranslationForEdgeSmoothing(xf,cf._drawer.getCanvasSize(!1),cf._drawer.getCanvasSize(!0)));var Bf;$f&&(xf||(Bf=cf.viewport.viewportToViewerElementRectangle(cf.getClippedBounds(!0)).getIntegerBoundingBox(),cf._drawer.viewer.viewport.getFlip()&&(cf.viewport.degrees!==0||cf.getRotation(!0)%360!==0)&&(Bf.x=cf._drawer.viewer.container.clientWidth-(Bf.x+Bf.width)),Bf=Bf.times(F.pixelDensityRatio)),cf._drawer._clear(!0,Bf)),xf||(cf.viewport.degrees!==0&&cf._drawer._offsetForRotation({degrees:cf.viewport.degrees,useSketch:$f}),cf.getRotation(!0)%360!==0&&cf._drawer._offsetForRotation({degrees:cf.getRotation(!0),point:cf.viewport.pixelFromPointNoRotate(cf._getRotationPoint(!0),!0),useSketch:$f}),cf.viewport.degrees===0&&cf.getRotation(!0)%360===0&&cf._drawer.viewer.viewport.getFlip()&&cf._drawer._flip());var Hf=!1;if(cf._clip){cf._drawer.saveContext($f);var Df=cf.imageToViewportRectangle(cf._clip,!0);Df=Df.rotate(-cf.getRotation(!0),cf._getRotationPoint(!0));var Lf=cf._drawer.viewportToDrawerRectangle(Df);xf&&(Lf=Lf.times(xf)),Af&&(Lf=Lf.translate(Af)),cf._drawer.setClip(Lf,$f),Hf=!0}if(cf._croppingPolygons){cf._drawer.saveContext($f);try{var kf=cf._croppingPolygons.map(function(rp){return rp.map(function(ip){var ap=cf.imageToViewportCoordinates(ip.x,ip.y,!0).rotate(-cf.getRotation(!0),cf._getRotationPoint(!0)),yp=cf._drawer.viewportCoordToDrawerCoord(ap);return xf&&(yp=yp.times(xf)),yp})});cf._drawer.clipWithPolygons(kf,$f)}catch(rp){F.console.error(rp)}Hf=!0}if(cf.placeholderFillStyle&&cf._hasOpaqueTile===!1){var Nf=cf._drawer.viewportToDrawerRectangle(cf.getBounds(!0));xf&&(Nf=Nf.times(xf)),Af&&(Nf=Nf.translate(Af));var Yf=null;typeof cf.placeholderFillStyle=="function"?Yf=cf.placeholderFillStyle(cf,cf._drawer.context):Yf=cf.placeholderFillStyle,cf._drawer.drawRectangle(Nf,Yf,$f)}for(var Gf=vf.length-1;Gf>=0;Gf--)_f=vf[Gf],cf._drawer.drawTile(_f,cf._drawingHandler,$f,xf,Af),_f.beingDrawn=!0,cf.viewer&&cf.viewer.raiseEvent("tile-drawn",{tiledImage:cf,tile:_f});Hf&&cf._drawer.restoreContext($f),xf||(cf.getRotation(!0)%360!==0&&cf._drawer._restoreRotationChanges($f),cf.viewport.degrees!==0&&cf._drawer._restoreRotationChanges($f)),$f&&(xf&&(cf.viewport.degrees!==0&&cf._drawer._offsetForRotation({degrees:cf.viewport.degrees,useSketch:!1}),cf.getRotation(!0)%360!==0&&cf._drawer._offsetForRotation({degrees:cf.getRotation(!0),point:cf.viewport.pixelFromPointNoRotate(cf._getRotationPoint(!0),!0),useSketch:!1})),cf._drawer.blendSketch({opacity:cf.opacity,scale:xf,translate:Af,compositeOperation:cf.compositeOperation,bounds:Bf}),xf&&(cf.getRotation(!0)%360!==0&&cf._drawer._restoreRotationChanges(!1),cf.viewport.degrees!==0&&cf._drawer._restoreRotationChanges(!1))),xf||cf.viewport.degrees===0&&cf.getRotation(!0)%360===0&&cf._drawer.viewer.viewport.getFlip()&&cf._drawer._flip(),yf(cf,vf)}}function yf(cf,vf){if(cf.debugMode)for(var _f=vf.length-1;_f>=0;_f--){var $f=vf[_f];try{cf._drawer.drawDebugInfo($f,vf.length,_f,cf)}catch(xf){F.console.error(xf)}}}}(OpenSeadragon),function(F){var W=function(K){F.console.assert(K,"[TileCache.cacheTile] options is required"),F.console.assert(K.tile,"[TileCache.cacheTile] options.tile is required"),F.console.assert(K.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=K.tile,this.tiledImage=K.tiledImage},q=function(K){F.console.assert(K,"[ImageRecord] options is required"),F.console.assert(K.image,"[ImageRecord] options.image is required"),this._image=K.image,this._tiles=[]};q.prototype={destroy:function(){this._image=null,this._renderedContext=null,this._tiles=null},getImage:function(){return this._image},getRenderedContext:function(){if(!this._renderedContext){var K=document.createElement("canvas");K.width=this._image.width,K.height=this._image.height,this._renderedContext=K.getContext("2d"),this._renderedContext.drawImage(this._image,0,0),this._image=null}return this._renderedContext},setRenderedContext:function(K){F.console.error("ImageRecord.setRenderedContext is deprecated. The rendered context should be created by the ImageRecord itself when calling ImageRecord.getRenderedContext."),this._renderedContext=K},addTile:function(K){F.console.assert(K,"[ImageRecord.addTile] tile is required"),this._tiles.push(K)},removeTile:function(K){for(var X=0;Xthis._maxImageCacheCount){for(var ot=null,ut=-1,yn=null,uo,po,mo,wo,lf,yf,cf=this._tilesLoaded.length-1;cf>=0;cf--)if(yf=this._tilesLoaded[cf],uo=yf.tile,!(uo.level<=X||uo.beingDrawn)){if(!ot){ot=uo,ut=cf,yn=yf;continue}wo=uo.lastTouchTime,po=ot.lastTouchTime,lf=uo.level,mo=ot.level,(womo)&&(ot=uo,ut=cf,yn=yf)}ot&&ut>=0&&(this._unloadTile(yn),tt=ut)}this._tilesLoaded[tt]=new W({tile:K.tile,tiledImage:K.tiledImage})},clearTilesFor:function(K){F.console.assert(K,"[TileCache.clearTilesFor] tiledImage is required");for(var X,tt=0;tt=this._items.length)throw new Error("Index bigger than number of layers.");q===K||K===-1||(this._items.splice(K,1),this._items.splice(q,0,W),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:W,previousIndex:K,newIndex:q}))},removeItem:function(W){F.console.assert(W,"[World.removeItem] item is required");var q=F.indexOf(this._items,W);q!==-1&&(W.removeHandler("bounds-change",this._delegatedFigureSizes),W.removeHandler("clip-change",this._delegatedFigureSizes),W.destroy(),this._items.splice(q,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(W))},removeAll:function(){this.viewer._cancelPendingImages();var W,q;for(q=0;qwo.height?lf=rt:lf=rt*(wo.width/wo.height),yf=lf*(wo.height/wo.width),cf=new F.Point(uo+(rt-lf)/2,po+(rt-yf)/2),mo.setPosition(cf,q),mo.setWidth(lf,q),K==="horizontal"?uo+=ut:po+=ut;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var W=this._homeBounds?this._homeBounds.clone():null,q=this._contentSize?this._contentSize.clone():null,K=this._contentFactor||0;if(!this._items.length)this._homeBounds=new F.Rect(0,0,1,1),this._contentSize=new F.Point(1,1),this._contentFactor=1;else{var X=this._items[0],tt=X.getBounds();this._contentFactor=X.getContentSize().x/tt.width;for(var rt=X.getClippedBounds().getBoundingBox(),ot=rt.x,ut=rt.y,yn=rt.x+rt.width,uo=rt.y+rt.height,po=1;pout.version.major)throw new Error("OpenSeadragonViewerInputHook requires OpenSeadragon version 1.0.0+");return ut.Viewer.prototype.addViewerInputHook=function(uo){return(uo=uo||{}).viewer=this,new yn.ViewerInputHook(uo)},yn.ViewerInputHook=function(uo){var po,mo;for((uo=uo||{}).hooks=uo.hooks||[],this.viewer=uo.viewer||null,this.viewerTrackers={},this.hooks=[],this.viewer&&(this.viewerTrackers.viewer=this.viewer.innerTracker,this.viewerTrackers.viewer_outer=this.viewer.outerTracker),po=0;polf in wo?q(wo,lf,{enumerable:!0,configurable:!0,writable:!0,value:yf}):wo[lf]=yf,yn=(wo,lf)=>{for(var yf in lf||(lf={}))rt.call(lf,yf)&&ut(wo,yf,lf[yf]);if(tt)for(var yf of tt(lf))ot.call(lf,yf)&&ut(wo,yf,lf[yf]);return wo},uo=(wo,lf)=>K(wo,X(lf)),po=(wo,lf)=>{var yf={};for(var cf in wo)rt.call(wo,cf)&&lf.indexOf(cf)<0&&(yf[cf]=wo[cf]);if(wo!=null&&tt)for(var cf of tt(wo))lf.indexOf(cf)<0&&ot.call(wo,cf)&&(yf[cf]=wo[cf]);return yf},mo=(wo,lf,yf)=>(ut(wo,typeof lf!="symbol"?lf+"":lf,yf),yf);(function(wo,lf){F.exports=lf(requireOpenseadragon())})(commonjsGlobal$3,function(wo){function lf(go){return go&&typeof go=="object"&&"default"in go?go:{default:go}}var yf=lf(wo),cf,vf,_f,$f,xf,Af,Cf,Pf={},Bf=[],Hf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Df(go,xo){for(var uf in xo)go[uf]=xo[uf];return go}function Lf(go){var xo=go.parentNode;xo&&xo.removeChild(go)}function kf(go,xo,uf){var df,gf,Ef,Rf={};for(Ef in xo)Ef=="key"?df=xo[Ef]:Ef=="ref"?gf=xo[Ef]:Rf[Ef]=xo[Ef];if(arguments.length>2&&(Rf.children=arguments.length>3?cf.call(arguments,2):uf),typeof go=="function"&&go.defaultProps!=null)for(Ef in go.defaultProps)Rf[Ef]===void 0&&(Rf[Ef]=go.defaultProps[Ef]);return Nf(go,Rf,df,gf,null)}function Nf(go,xo,uf,df,gf){var Ef={type:go,props:xo,key:uf,ref:df,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:gf??++_f};return vf.vnode!=null&&vf.vnode(Ef),Ef}function Yf(){return{current:null}}function Gf(go){return go.children}function rp(go,xo){this.props=go,this.context=xo}function ip(go,xo){if(xo==null)return go.__?ip(go.__,go.__.__k.indexOf(go)+1):null;for(var uf;xo0?Nf(Pp.type,Pp.props,Pp.key,null,Pp.__v):Pp)!=null){if(Pp.__=uf,Pp.__b=uf.__b+1,(Tp=Tg[Jf])===null||Tp&&Pp.key==Tp.key&&Pp.type===Tp.type)Tg[Jf]=void 0;else for(mp=0;mp2&&(Rf.children=arguments.length>3?cf.call(arguments,2):uf),Nf(go.type,Rf,df||go.key,gf||go.ref,null)}function bp(go,xo){var uf={__c:xo="__cC"+Cf++,__:go,Consumer:function(df,gf){return df.children(gf)},Provider:function(df){var gf,Ef;return this.getChildContext||(gf=[],(Ef={})[xo]=this,this.getChildContext=function(){return Ef},this.shouldComponentUpdate=function(Rf){this.props.value!==Rf.value&&gf.some(yp)},this.sub=function(Rf){gf.push(Rf);var Vf=Rf.componentWillUnmount;Rf.componentWillUnmount=function(){gf.splice(gf.indexOf(Rf),1),Vf&&Vf.call(Rf)}}),df.children}};return uf.Provider.__=uf.Consumer.contextType=uf}cf=Bf.slice,vf={__e:function(go,xo){for(var uf,df,gf;xo=xo.__;)if((uf=xo.__c)&&!uf.__)try{if((df=uf.constructor)&&df.getDerivedStateFromError!=null&&(uf.setState(df.getDerivedStateFromError(go)),gf=uf.__d),uf.componentDidCatch!=null&&(uf.componentDidCatch(go),gf=uf.__d),gf)return uf.__E=uf}catch(Ef){go=Ef}throw go}},_f=0,rp.prototype.setState=function(go,xo){var uf;uf=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Df({},this.state),typeof go=="function"&&(go=go(Df({},uf),this.props)),go&&Df(uf,go),go!=null&&this.__v&&(xo&&this.__h.push(xo),yp(this))},rp.prototype.forceUpdate=function(go){this.__v&&(this.__e=!0,go&&this.__h.push(go),yp(this))},rp.prototype.render=Gf,$f=[],xf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,vp.__r=0,Cf=0;var Ep,_p,Mp,Yp=0,ug=[],hg=vf.__b,xg=vf.__r,kg=vf.diffed,Dg=vf.__c,lm=vf.unmount;function Bp(go,xo){vf.__h&&vf.__h(_p,go,Yp||xo),Yp=0;var uf=_p.__H||(_p.__H={__:[],__h:[]});return go>=uf.__.length&&uf.__.push({}),uf.__[go]}function Rp(go){return Yp=1,Fp(Hg,go)}function Fp(go,xo,uf){var df=Bp(Ep++,2);return df.t=go,df.__c||(df.__=[uf?uf(xo):Hg(void 0,xo),function(gf){var Ef=df.t(df.__[0],gf);df.__[0]!==Ef&&(df.__=[Ef,df.__[1]],df.__c.setState({}))}],df.__c=_p),df.__}function Op(go,xo){var uf=Bp(Ep++,3);!vf.__s&&mm(uf.__H,xo)&&(uf.__=go,uf.__H=xo,_p.__H.__h.push(uf))}function Kp(go,xo){var uf=Bp(Ep++,4);!vf.__s&&mm(uf.__H,xo)&&(uf.__=go,uf.__H=xo,_p.__h.push(uf))}function Kf(go){return Yp=5,gp(function(){return{current:go}},[])}function Xf(go,xo,uf){Yp=6,Kp(function(){typeof go=="function"?go(xo()):go&&(go.current=xo())},uf==null?uf:uf.concat(go))}function gp(go,xo){var uf=Bp(Ep++,7);return mm(uf.__H,xo)&&(uf.__=go(),uf.__H=xo,uf.__h=go),uf.__}function wp(go,xo){return Yp=8,gp(function(){return go},xo)}function dg(go){var xo=_p.context[go.__c],uf=Bp(Ep++,9);return uf.c=go,xo?(uf.__==null&&(uf.__=!0,xo.sub(_p)),xo.props.value):go.__}function mg(go,xo){vf.useDebugValue&&vf.useDebugValue(xo?xo(go):go)}function pg(go){var xo=Bp(Ep++,10),uf=Rp();return xo.__=go,_p.componentDidCatch||(_p.componentDidCatch=function(df){xo.__&&xo.__(df),uf[1](df)}),[uf[0],function(){uf[1](void 0)}]}function wg(){ug.forEach(function(go){if(go.__P)try{go.__H.__h.forEach(Bg),go.__H.__h.forEach(Xg),go.__H.__h=[]}catch(xo){go.__H.__h=[],vf.__e(xo,go.__v)}}),ug=[]}vf.__b=function(go){_p=null,hg&&hg(go)},vf.__r=function(go){xg&&xg(go),Ep=0;var xo=(_p=go.__c).__H;xo&&(xo.__h.forEach(Bg),xo.__h.forEach(Xg),xo.__h=[])},vf.diffed=function(go){kg&&kg(go);var xo=go.__c;xo&&xo.__H&&xo.__H.__h.length&&(ug.push(xo)!==1&&Mp===vf.requestAnimationFrame||((Mp=vf.requestAnimationFrame)||function(uf){var df,gf=function(){clearTimeout(Ef),Cg&&cancelAnimationFrame(df),setTimeout(uf)},Ef=setTimeout(gf,100);Cg&&(df=requestAnimationFrame(gf))})(wg)),_p=void 0},vf.__c=function(go,xo){xo.some(function(uf){try{uf.__h.forEach(Bg),uf.__h=uf.__h.filter(function(df){return!df.__||Xg(df)})}catch(df){xo.some(function(gf){gf.__h&&(gf.__h=[])}),xo=[],vf.__e(df,uf.__v)}}),Dg&&Dg(go,xo)},vf.unmount=function(go){lm&&lm(go);var xo=go.__c;if(xo&&xo.__H)try{xo.__H.__.forEach(Bg)}catch(uf){vf.__e(uf,xo.__v)}};var Cg=typeof requestAnimationFrame=="function";function Bg(go){var xo=_p;typeof go.__c=="function"&&go.__c(),_p=xo}function Xg(go){var xo=_p;go.__c=go.__(),_p=xo}function mm(go,xo){return!go||go.length!==xo.length||xo.some(function(uf,df){return uf!==go[df]})}function Hg(go,xo){return typeof xo=="function"?xo(go):xo}function Iy(go,xo){for(var uf in xo)go[uf]=xo[uf];return go}function py(go,xo){for(var uf in go)if(uf!=="__source"&&!(uf in xo))return!0;for(var df in xo)if(df!=="__source"&&go[df]!==xo[df])return!0;return!1}function Yy(go){this.props=go}function Yb(go,xo){function uf(gf){var Ef=this.props.ref,Rf=Ef==gf.ref;return!Rf&&Ef&&(Ef.call?Ef(null):Ef.current=null),xo?!xo(this.props,gf)||!Rf:py(this.props,gf)}function df(gf){return this.shouldComponentUpdate=uf,kf(go,gf)}return df.displayName="Memo("+(go.displayName||go.name)+")",df.prototype.isReactComponent=!0,df.__f=!0,df}(Yy.prototype=new rp).isPureReactComponent=!0,Yy.prototype.shouldComponentUpdate=function(go,xo){return py(this.props,go)||py(this.state,xo)};var p0=vf.__b;vf.__b=function(go){go.type&&go.type.__f&&go.ref&&(go.props.ref=go.ref,go.ref=null),p0&&p0(go)};var _b=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Fy(go){function xo(uf,df){var gf=Iy({},uf);return delete gf.ref,go(gf,(df=uf.ref||df)&&(typeof df!="object"||"current"in df)?df:null)}return xo.$$typeof=_b,xo.render=xo,xo.prototype.isReactComponent=xo.__f=!0,xo.displayName="ForwardRef("+(go.displayName||go.name)+")",xo}var qg=function(go,xo){return go==null?null:Ip(Ip(go).map(xo))},E1={map:qg,forEach:qg,count:function(go){return go?Ip(go).length:0},only:function(go){var xo=Ip(go);if(xo.length!==1)throw"Children.only";return xo[0]},toArray:Ip},A$=vf.__e;vf.__e=function(go,xo,uf){if(go.then){for(var df,gf=xo;gf=gf.__;)if((df=gf.__c)&&df.__c)return xo.__e==null&&(xo.__e=uf.__e,xo.__k=uf.__k),df.__c(go,xo)}A$(go,xo,uf)};var qv=vf.unmount;function H0(){this.__u=0,this.t=null,this.__b=null}function wb(go){var xo=go.__.__c;return xo&&xo.__e&&xo.__e(go)}function R$(go){var xo,uf,df;function gf(Ef){if(xo||(xo=go()).then(function(Rf){uf=Rf.default||Rf},function(Rf){df=Rf}),df)throw df;if(!uf)throw xo;return kf(uf,Ef)}return gf.displayName="Lazy",gf.__f=!0,gf}function g0(){this.u=null,this.o=null}vf.unmount=function(go){var xo=go.__c;xo&&xo.__R&&xo.__R(),xo&&go.__h===!0&&(go.type=null),qv&&qv(go)},(H0.prototype=new rp).__c=function(go,xo){var uf=xo.__c,df=this;df.t==null&&(df.t=[]),df.t.push(uf);var gf=wb(df.__v),Ef=!1,Rf=function(){Ef||(Ef=!0,uf.__R=null,gf?gf(Vf):Vf())};uf.__R=Rf;var Vf=function(){if(!--df.__u){if(df.state.__e){var ep=df.state.__e;df.__v.__k[0]=function mp(Tp,Pp,tg){return Tp&&(Tp.__v=null,Tp.__k=Tp.__k&&Tp.__k.map(function(gg){return mp(gg,Pp,tg)}),Tp.__c&&Tp.__c.__P===Pp&&(Tp.__e&&tg.insertBefore(Tp.__e,Tp.__d),Tp.__c.__e=!0,Tp.__c.__P=tg)),Tp}(ep,ep.__c.__P,ep.__c.__O)}var Jf;for(df.setState({__e:df.__b=null});Jf=df.t.pop();)Jf.forceUpdate()}},Qf=xo.__h===!0;df.__u++||Qf||df.setState({__e:df.__b=df.__v.__k[0]}),go.then(Rf,Rf)},H0.prototype.componentWillUnmount=function(){this.t=[]},H0.prototype.render=function(go,xo){if(this.__b){if(this.__v.__k){var uf=document.createElement("div"),df=this.__v.__k[0].__c;this.__v.__k[0]=function Ef(Rf,Vf,Qf){return Rf&&(Rf.__c&&Rf.__c.__H&&(Rf.__c.__H.__.forEach(function(ep){typeof ep.__c=="function"&&ep.__c()}),Rf.__c.__H=null),(Rf=Iy({},Rf)).__c!=null&&(Rf.__c.__P===Qf&&(Rf.__c.__P=Vf),Rf.__c=null),Rf.__k=Rf.__k&&Rf.__k.map(function(ep){return Ef(ep,Vf,Qf)})),Rf}(this.__b,uf,df.__O=df.__P)}this.__b=null}var gf=xo.__e&&kf(Gf,null,go.fallback);return gf&&(gf.__h=null),[kf(Gf,null,xo.__e?null:go.children),gf]};var m_=function(go,xo,uf){if(++uf[1]===uf[0]&&go.o.delete(xo),go.props.revealOrder&&(go.props.revealOrder[0]!=="t"||!go.o.size))for(uf=go.u;uf;){for(;uf.length>3;)uf.pop()();if(uf[1]>>1,1),xo.i.removeChild(df)}}),hp(kf(Jg,{context:xo.context},go.__v),xo.l)):xo.l&&xo.componentWillUnmount()}function Eg(go,xo){return kf(Hp,{__v:go,i:xo})}(g0.prototype=new rp).__e=function(go){var xo=this,uf=wb(xo.__v),df=xo.o.get(go);return df[0]++,function(gf){var Ef=function(){xo.props.revealOrder?(df.push(gf),m_(xo,go,df)):gf()};uf?uf(Ef):Ef()}},g0.prototype.render=function(go){this.u=null,this.o=new Map;var xo=Ip(go.children);go.revealOrder&&go.revealOrder[0]==="b"&&xo.reverse();for(var uf=xo.length;uf--;)this.o.set(xo[uf],this.u=[1,0,this.u]);return go.children},g0.prototype.componentDidUpdate=g0.prototype.componentDidMount=function(){var go=this;this.o.forEach(function(xo,uf){m_(go,uf,xo)})};var Gg=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,yv=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Py=function(go){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(go)};function Cv(go,xo,uf){return xo.__k==null&&(xo.textContent=""),hp(go,xo),typeof uf=="function"&&uf(),go?go.__c:null}function By(go,xo,uf){return $p(go,xo),typeof uf=="function"&&uf(),go?go.__c:null}rp.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(go){Object.defineProperty(rp.prototype,go,{configurable:!0,get:function(){return this["UNSAFE_"+go]},set:function(xo){Object.defineProperty(this,go,{configurable:!0,writable:!0,value:xo})}})});var S1=vf.event;function T1(){}function jy(){return this.cancelBubble}function cw(){return this.defaultPrevented}vf.event=function(go){return S1&&(go=S1(go)),go.persist=T1,go.isPropagationStopped=jy,go.isDefaultPrevented=cw,go.nativeEvent=go};var xb,N$={configurable:!0,get:function(){return this.class}},$x=vf.vnode;vf.vnode=function(go){var xo=go.type,uf=go.props,df=uf;if(typeof xo=="string"){for(var gf in df={},uf){var Ef=uf[gf];gf==="value"&&"defaultValue"in uf&&Ef==null||(gf==="defaultValue"&&"value"in uf&&uf.value==null?gf="value":gf==="download"&&Ef===!0?Ef="":/ondoubleclick/i.test(gf)?gf="ondblclick":/^onchange(textarea|input)/i.test(gf+xo)&&!Py(uf.type)?gf="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(gf)?gf=gf.toLowerCase():yv.test(gf)?gf=gf.replace(/[A-Z0-9]/,"-$&").toLowerCase():Ef===null&&(Ef=void 0),df[gf]=Ef)}xo=="select"&&df.multiple&&Array.isArray(df.value)&&(df.value=Ip(uf.children).forEach(function(Rf){Rf.props.selected=df.value.indexOf(Rf.props.value)!=-1})),xo=="select"&&df.defaultValue!=null&&(df.value=Ip(uf.children).forEach(function(Rf){Rf.props.selected=df.multiple?df.defaultValue.indexOf(Rf.props.value)!=-1:df.defaultValue==Rf.props.value})),go.props=df}xo&&uf.class!=uf.className&&(N$.enumerable="className"in uf,uf.className!=null&&(df.class=uf.className),Object.defineProperty(df,"className",N$)),go.$$typeof=Gg,$x&&$x(go)};var _x=vf.__r;vf.__r=function(go){_x&&_x(go),xb=go.__c};var Kb={ReactCurrentDispatcher:{current:{readContext:function(go){return xb.__n[go.__c].props.value}}}},dv="17.0.2";function Ov(go){return kf.bind(null,go)}function Xb(go){return!!go&&go.$$typeof===Gg}function Y1(go){return Xb(go)?Vp.apply(null,arguments):go}function K1(go){return!!go.__k&&(hp(null,go),!0)}function Zb(go){return go&&(go.base||go.nodeType===1&&go)||null}var Tm=function(go,xo){return go(xo)},cm=function(go,xo){return go(xo)},uw=Gf,Zg={useState:Rp,useReducer:Fp,useEffect:Op,useLayoutEffect:Kp,useRef:Kf,useImperativeHandle:Xf,useMemo:gp,useCallback:wp,useContext:dg,useDebugValue:mg,version:"17.0.2",Children:E1,render:Cv,hydrate:By,unmountComponentAtNode:K1,createPortal:Eg,createElement:kf,createContext:bp,createFactory:Ov,cloneElement:Y1,createRef:Yf,Fragment:Gf,isValidElement:Xb,findDOMNode:Zb,Component:rp,PureComponent:Yy,memo:Yb,forwardRef:Fy,flushSync:cm,unstable_batchedUpdates:Tm,StrictMode:Gf,Suspense:H0,SuspenseList:g0,lazy:R$,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Kb},_m=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Zg,version:dv,Children:E1,render:Cv,hydrate:By,unmountComponentAtNode:K1,createPortal:Eg,createFactory:Ov,cloneElement:Y1,isValidElement:Xb,findDOMNode:Zb,PureComponent:Yy,memo:Yb,forwardRef:Fy,flushSync:cm,unstable_batchedUpdates:Tm,StrictMode:uw,Suspense:H0,SuspenseList:g0,lazy:R$,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Kb,createElement:kf,createContext:bp,createRef:Yf,Fragment:Gf,Component:rp,useState:Rp,useReducer:Fp,useEffect:Op,useLayoutEffect:Kp,useRef:Kf,useImperativeHandle:Xf,useMemo:gp,useCallback:wp,useContext:dg,useDebugValue:mg,useErrorBoundary:pg}),Eb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof commonjsGlobal$3<"u"?commonjsGlobal$3:typeof self<"u"?self:{};function v_(go){return go&&go.__esModule&&Object.prototype.hasOwnProperty.call(go,"default")?go.default:go}function X1(go){if(go.__esModule)return go;var xo=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(go).forEach(function(uf){var df=Object.getOwnPropertyDescriptor(go,uf);Object.defineProperty(xo,uf,df.get?df:{enumerable:!0,get:function(){return go[uf]}})}),xo}var Yv={exports:{}};function Iv(){}Iv.prototype={on:function(go,xo,uf){var df=this.e||(this.e={});return(df[go]||(df[go]=[])).push({fn:xo,ctx:uf}),this},once:function(go,xo,uf){var df=this;function gf(){df.off(go,gf),xo.apply(uf,arguments)}return gf._=xo,this.on(go,gf,uf)},emit:function(go){var xo=[].slice.call(arguments,1),uf=((this.e||(this.e={}))[go]||[]).slice(),df=0,gf=uf.length;for(df;df0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";var df=(go=window.document)===null||go===void 0||(xo=go.documentElement)===null||xo===void 0?void 0:xo.style;if(!df||uf in df)return"";for(var gf=0;gf: Unmounted during event!");return xo}var C1={},r$={};Object.defineProperty(r$,"__esModule",{value:!0}),r$.default=n$;function n$(){}function z$(go){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?z$=function(xo){return typeof xo}:z$=function(xo){return xo&&typeof Symbol=="function"&&xo.constructor===Symbol&&xo!==Symbol.prototype?"symbol":typeof xo},z$(go)}Object.defineProperty(C1,"__esModule",{value:!0}),C1.default=void 0;var bw=j2(t1),Ay=my(Jb.exports),Ox=my(t1),xv=um,I0=v0,H$=O0,_y=my(r$);function my(go){return go&&go.__esModule?go:{default:go}}function o1(go){if(typeof WeakMap!="function")return null;var xo=new WeakMap,uf=new WeakMap;return(o1=function(df){return df?uf:xo})(go)}function j2(go,xo){if(!xo&&go&&go.__esModule)return go;if(go===null||z$(go)!=="object"&&typeof go!="function")return{default:go};var uf=o1(xo);if(uf&&uf.has(go))return uf.get(go);var df={},gf=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ef in go)if(Ef!=="default"&&Object.prototype.hasOwnProperty.call(go,Ef)){var Rf=gf?Object.getOwnPropertyDescriptor(go,Ef):null;Rf&&(Rf.get||Rf.set)?Object.defineProperty(df,Ef,Rf):df[Ef]=go[Ef]}return df.default=go,uf&&uf.set(go,df),df}function U$(go,xo){return _w(go)||Q1(go,xo)||i$(go,xo)||$w()}function $w(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i$(go,xo){if(go){if(typeof go=="string")return Ix(go,xo);var uf=Object.prototype.toString.call(go).slice(8,-1);if(uf==="Object"&&go.constructor&&(uf=go.constructor.name),uf==="Map"||uf==="Set")return Array.from(go);if(uf==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(uf))return Ix(go,xo)}}function Ix(go,xo){(xo==null||xo>go.length)&&(xo=go.length);for(var uf=0,df=new Array(xo);uf"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function k_(go){return k_=Object.setPrototypeOf?Object.getPrototypeOf:function(xo){return xo.__proto__||Object.getPrototypeOf(xo)},k_(go)}function y0(go,xo,uf){return xo in go?Object.defineProperty(go,xo,{value:uf,enumerable:!0,configurable:!0,writable:!0}):go[xo]=uf,go}var b0={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},O1=b0.mouse,o$=function(go){eb(uf,go);var xo=V$(uf);function uf(){var df;ZE(this,uf);for(var gf=arguments.length,Ef=new Array(gf),Rf=0;Rf not mounted on DragStart!");var ep=Qf.ownerDocument;if(!(df.props.disabled||!(Vf.target instanceof ep.defaultView.Node)||df.props.handle&&!(0,xv.matchesSelectorAndParentsTo)(Vf.target,df.props.handle,Qf)||df.props.cancel&&(0,xv.matchesSelectorAndParentsTo)(Vf.target,df.props.cancel,Qf))){Vf.type==="touchstart"&&Vf.preventDefault();var Jf=(0,xv.getTouchIdentifier)(Vf);df.setState({touchIdentifier:Jf});var mp=(0,I0.getControlPosition)(Vf,Jf,Mv(df));if(mp!=null){var Tp=mp.x,Pp=mp.y,tg=(0,I0.createCoreData)(Mv(df),Tp,Pp);(0,_y.default)("DraggableCore: handleDragStart: %j",tg),(0,_y.default)("calling",df.props.onStart);var gg=df.props.onStart(Vf,tg);gg===!1||df.mounted===!1||(df.props.enableUserSelectHack&&(0,xv.addUserSelectStyles)(ep),df.setState({dragging:!0,lastX:Tp,lastY:Pp}),(0,xv.addEvent)(ep,O1.move,df.handleDrag),(0,xv.addEvent)(ep,O1.stop,df.handleDragStop))}}}),y0(Mv(df),"handleDrag",function(Vf){var Qf=(0,I0.getControlPosition)(Vf,df.state.touchIdentifier,Mv(df));if(Qf!=null){var ep=Qf.x,Jf=Qf.y;if(Array.isArray(df.props.grid)){var mp=ep-df.state.lastX,Tp=Jf-df.state.lastY,Pp=(0,I0.snapToGrid)(df.props.grid,mp,Tp),tg=U$(Pp,2);if(mp=tg[0],Tp=tg[1],!mp&&!Tp)return;ep=df.state.lastX+mp,Jf=df.state.lastY+Tp}var gg=(0,I0.createCoreData)(Mv(df),ep,Jf);(0,_y.default)("DraggableCore: handleDrag: %j",gg);var fg=df.props.onDrag(Vf,gg);if(fg===!1||df.mounted===!1){try{df.handleDragStop(new MouseEvent("mouseup"))}catch{var Tg=document.createEvent("MouseEvents");Tg.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),df.handleDragStop(Tg)}return}df.setState({lastX:ep,lastY:Jf})}}),y0(Mv(df),"handleDragStop",function(Vf){if(df.state.dragging){var Qf=(0,I0.getControlPosition)(Vf,df.state.touchIdentifier,Mv(df));if(Qf!=null){var ep=Qf.x,Jf=Qf.y,mp=(0,I0.createCoreData)(Mv(df),ep,Jf),Tp=df.props.onStop(Vf,mp);if(Tp===!1||df.mounted===!1)return!1;var Pp=df.findDOMNode();Pp&&df.props.enableUserSelectHack&&(0,xv.removeUserSelectStyles)(Pp.ownerDocument),(0,_y.default)("DraggableCore: handleDragStop: %j",mp),df.setState({dragging:!1,lastX:NaN,lastY:NaN}),Pp&&((0,_y.default)("DraggableCore: Removing handlers"),(0,xv.removeEvent)(Pp.ownerDocument,O1.move,df.handleDrag),(0,xv.removeEvent)(Pp.ownerDocument,O1.stop,df.handleDragStop))}}}),y0(Mv(df),"onMouseDown",function(Vf){return O1=b0.mouse,df.handleDragStart(Vf)}),y0(Mv(df),"onMouseUp",function(Vf){return O1=b0.mouse,df.handleDragStop(Vf)}),y0(Mv(df),"onTouchStart",function(Vf){return O1=b0.touch,df.handleDragStart(Vf)}),y0(Mv(df),"onTouchEnd",function(Vf){return O1=b0.touch,df.handleDragStop(Vf)}),df}return JE(uf,[{key:"componentDidMount",value:function(){this.mounted=!0;var df=this.findDOMNode();df&&(0,xv.addEvent)(df,b0.touch.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var df=this.findDOMNode();if(df){var gf=df.ownerDocument;(0,xv.removeEvent)(gf,b0.mouse.move,this.handleDrag),(0,xv.removeEvent)(gf,b0.touch.move,this.handleDrag),(0,xv.removeEvent)(gf,b0.mouse.stop,this.handleDragStop),(0,xv.removeEvent)(gf,b0.touch.stop,this.handleDragStop),(0,xv.removeEvent)(df,b0.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,xv.removeUserSelectStyles)(gf)}}},{key:"findDOMNode",value:function(){var df,gf,Ef;return(df=(gf=this.props)===null||gf===void 0||(Ef=gf.nodeRef)===null||Ef===void 0?void 0:Ef.current)!==null&&df!==void 0?df:Ox.default.findDOMNode(this)}},{key:"render",value:function(){return bw.cloneElement(bw.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),uf}(bw.Component);C1.default=o$,y0(o$,"displayName","DraggableCore"),y0(o$,"propTypes",{allowAnyClick:Ay.default.bool,disabled:Ay.default.bool,enableUserSelectHack:Ay.default.bool,offsetParent:function(go,xo){if(go[xo]&&go[xo].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Ay.default.arrayOf(Ay.default.number),handle:Ay.default.string,cancel:Ay.default.string,nodeRef:Ay.default.object,onStart:Ay.default.func,onDrag:Ay.default.func,onStop:Ay.default.func,onMouseDown:Ay.default.func,scale:Ay.default.number,className:H$.dontSetMe,style:H$.dontSetMe,transform:H$.dontSetMe}),y0(o$,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(go){function xo(bg){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xo=function(Pg){return typeof Pg}:xo=function(Pg){return Pg&&typeof Symbol=="function"&&Pg.constructor===Symbol&&Pg!==Symbol.prototype?"symbol":typeof Pg},xo(bg)}Object.defineProperty(go,"__esModule",{value:!0}),Object.defineProperty(go,"DraggableCore",{enumerable:!0,get:function(){return ep.default}}),go.default=void 0;var uf=tg(t1),df=Tp(Jb.exports),gf=Tp(t1),Ef=Tp(r1),Rf=um,Vf=v0,Qf=O0,ep=Tp(C1),Jf=Tp(r$),mp=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function Tp(bg){return bg&&bg.__esModule?bg:{default:bg}}function Pp(bg){if(typeof WeakMap!="function")return null;var Pg=new WeakMap,Ng=new WeakMap;return(Pp=function(Ag){return Ag?Ng:Pg})(bg)}function tg(bg,Pg){if(!Pg&&bg&&bg.__esModule)return bg;if(bg===null||xo(bg)!=="object"&&typeof bg!="function")return{default:bg};var Ng=Pp(Pg);if(Ng&&Ng.has(bg))return Ng.get(bg);var Ag={},zg=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Sm in bg)if(Sm!=="default"&&Object.prototype.hasOwnProperty.call(bg,Sm)){var fy=zg?Object.getOwnPropertyDescriptor(bg,Sm):null;fy&&(fy.get||fy.set)?Object.defineProperty(Ag,Sm,fy):Ag[Sm]=bg[Sm]}return Ag.default=bg,Ng&&Ng.set(bg,Ag),Ag}function gg(){return gg=Object.assign||function(bg){for(var Pg=1;Pg=0)&&(!Object.prototype.propertyIsEnumerable.call(bg,Ag)||(Ng[Ag]=bg[Ag]))}return Ng}function Tg(bg,Pg){if(bg==null)return{};var Ng={},Ag=Object.keys(bg),zg,Sm;for(Sm=0;Sm=0)&&(Ng[zg]=bg[zg]);return Ng}function Rg(bg,Pg){var Ng=Object.keys(bg);if(Object.getOwnPropertySymbols){var Ag=Object.getOwnPropertySymbols(bg);Pg&&(Ag=Ag.filter(function(zg){return Object.getOwnPropertyDescriptor(bg,zg).enumerable})),Ng.push.apply(Ng,Ag)}return Ng}function $m(bg){for(var Pg=1;Pg=4;++df,gf-=4)uf=go.charCodeAt(df)&255|(go.charCodeAt(++df)&255)<<8|(go.charCodeAt(++df)&255)<<16|(go.charCodeAt(++df)&255)<<24,uf=(uf&65535)*1540483477+((uf>>>16)*59797<<16),uf^=uf>>>24,xo=(uf&65535)*1540483477+((uf>>>16)*59797<<16)^(xo&65535)*1540483477+((xo>>>16)*59797<<16);switch(gf){case 3:xo^=(go.charCodeAt(df+2)&255)<<16;case 2:xo^=(go.charCodeAt(df+1)&255)<<8;case 1:xo^=go.charCodeAt(df)&255,xo=(xo&65535)*1540483477+((xo>>>16)*59797<<16)}return xo^=xo>>>13,xo=(xo&65535)*1540483477+((xo>>>16)*59797<<16),((xo^xo>>>15)>>>0).toString(36)}var h_={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},vm=/[A-Z]|^ms/g,O$=/_EMO_([^_]+?)_([^]*?)_EMO_/g,rw=function(go){return go.charCodeAt(1)===45},I$=function(go){return go!=null&&typeof go!="boolean"},d0=My(function(go){return rw(go)?go:go.replace(vm,"-$&").toLowerCase()}),tT=function(go,xo){switch(go){case"animation":case"animationName":if(typeof xo=="string")return xo.replace(O$,function(uf,df,gf){return w1={name:df,styles:gf,next:w1},df})}return h_[go]!==1&&!rw(go)&&typeof xo=="number"&&xo!==0?xo+"px":xo};function qy(go,xo,uf){if(uf==null)return"";if(uf.__emotion_styles!==void 0)return uf;switch(typeof uf){case"boolean":return"";case"object":{if(uf.anim===1)return w1={name:uf.name,styles:uf.styles,next:w1},uf.name;if(uf.styles!==void 0){var df=uf.next;if(df!==void 0)for(;df!==void 0;)w1={name:df.name,styles:df.styles,next:w1},df=df.next;var gf=uf.styles+";";return gf}return Jv(go,xo,uf)}case"function":{if(go!==void 0){var Ef=w1,Rf=uf(go);return w1=Ef,qy(go,xo,Rf)}break}}if(xo==null)return uf;var Vf=xo[uf];return Vf!==void 0?Vf:uf}function Jv(go,xo,uf){var df="";if(Array.isArray(uf))for(var gf=0;gf=0)&&(uf[gf]=go[gf]);return uf}function $b(go,xo){if(go==null)return{};var uf=OE(go,xo),df,gf;if(Object.getOwnPropertySymbols){var Ef=Object.getOwnPropertySymbols(go);for(gf=0;gf=0)&&(!Object.prototype.propertyIsEnumerable.call(go,df)||(uf[df]=go[df]))}return uf}function d_(go){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d_=function(xo){return typeof xo}:d_=function(xo){return xo&&typeof Symbol=="function"&&xo.constructor===Symbol&&xo!==Symbol.prototype?"symbol":typeof xo},d_(go)}var y2={};Object.defineProperty(y2,"__esModule",{value:!0});var IE=Object.assign||function(go){for(var xo=1;xo=0||!Object.prototype.hasOwnProperty.call(go,df)||(uf[df]=go[df]);return uf}function aT(go,xo){if(!(go instanceof xo))throw new TypeError("Cannot call a class as a function")}function RE(go,xo){if(!go)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return xo&&(typeof xo=="object"||typeof xo=="function")?xo:go}function sT(go,xo){if(typeof xo!="function"&&xo!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof xo);go.prototype=Object.create(xo&&xo.prototype,{constructor:{value:go,enumerable:!1,writable:!0,configurable:!0}}),xo&&(Object.setPrototypeOf?Object.setPrototypeOf(go,xo):go.__proto__=xo)}var lT={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},cT=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],iC=function(go){return cT.forEach(function(xo){return delete go[xo]}),go},uT=function(go,xo){xo.style.fontSize=go.fontSize,xo.style.fontFamily=go.fontFamily,xo.style.fontWeight=go.fontWeight,xo.style.fontStyle=go.fontStyle,xo.style.letterSpacing=go.letterSpacing,xo.style.textTransform=go.textTransform},hT=typeof window<"u"&&window.navigator?/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent):!1,dT=function(){return hT?"_"+Math.random().toString(36).substr(2,12):void 0},NE=function(go){sT(xo,go),iT(xo,null,[{key:"getDerivedStateFromProps",value:function(uf,df){var gf=uf.id;return gf!==df.prevId?{inputId:gf||dT(),prevId:gf}:null}}]);function xo(uf){aT(this,xo);var df=RE(this,(xo.__proto__||Object.getPrototypeOf(xo)).call(this,uf));return df.inputRef=function(gf){df.input=gf,typeof df.props.inputRef=="function"&&df.props.inputRef(gf)},df.placeHolderSizerRef=function(gf){df.placeHolderSizer=gf},df.sizerRef=function(gf){df.sizer=gf},df.state={inputWidth:uf.minWidth,inputId:uf.id||dT(),prevId:uf.id},df}return iT(xo,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(uf,df){df.inputWidth!==this.state.inputWidth&&typeof this.props.onAutosize=="function"&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(!(!this.mounted||!window.getComputedStyle)){var uf=this.input&&window.getComputedStyle(this.input);!uf||(uT(uf,this.sizer),this.placeHolderSizer&&uT(uf,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(!(!this.mounted||!this.sizer||typeof this.sizer.scrollWidth>"u")){var uf=void 0;this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?uf=Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:uf=this.sizer.scrollWidth+2;var df=this.props.type==="number"&&this.props.extraWidth===void 0?16:parseInt(this.props.extraWidth)||0;uf+=df,uf"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function aC(go){if(go===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return go}function gx(go,xo){return xo&&(typeof xo=="object"||typeof xo=="function")?xo:aC(go)}function iw(go){var xo=pT();return function(){var uf=DE(go),df;if(xo){var gf=DE(this).constructor;df=Reflect.construct(uf,arguments,gf)}else df=uf.apply(this,arguments);return gx(this,df)}}var f_=function(){};function LE(go,xo){return xo?xo[0]==="-"?go+xo:go+"__"+xo:go}function sC(go,xo,uf){var df=[uf];if(xo&&go)for(var gf in xo)xo.hasOwnProperty(gf)&&xo[gf]&&df.push("".concat(LE(go,gf)));return df.filter(function(Ef){return Ef}).map(function(Ef){return String(Ef).trim()}).join(" ")}var gT=function(go){return Array.isArray(go)?go.filter(Boolean):d_(go)==="object"&&go!==null?[go]:[]},lC=function(go){go.className,go.clearValue,go.cx,go.getStyles,go.getValue,go.hasValue,go.isMulti,go.isRtl,go.options,go.selectOption,go.selectProps,go.setValue,go.theme;var xo=$b(go,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]);return Dy({},xo)};function mT(go){return[document.documentElement,document.body,window].indexOf(go)>-1}function vT(go){return mT(go)?window.pageYOffset:go.scrollTop}function FE(go,xo){if(mT(go)){window.scrollTo(0,xo);return}go.scrollTop=xo}function cC(go){var xo=getComputedStyle(go),uf=xo.position==="absolute",df=/(auto|scroll)/,gf=document.documentElement;if(xo.position==="fixed")return gf;for(var Ef=go;Ef=Ef.parentElement;)if(xo=getComputedStyle(Ef),!(uf&&xo.position==="static")&&df.test(xo.overflow+xo.overflowY+xo.overflowX))return Ef;return gf}function yT(go,xo,uf,df){return uf*((go=go/df-1)*go*go+1)+xo}function w2(go,xo){var uf=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,df=arguments.length>3&&arguments[3]!==void 0?arguments[3]:f_,gf=vT(go),Ef=xo-gf,Rf=10,Vf=0;function Qf(){Vf+=Rf;var ep=yT(Vf,gf,Ef,uf);FE(go,ep),Vfuf.bottom?FE(go,Math.min(xo.offsetTop+xo.clientHeight-go.offsetHeight+gf,go.scrollHeight)):df.top-gf=gg)return{placement:"bottom",maxHeight:xo};if(Fv>=gg&&!Rf)return Ef&&w2(ep,Bv,x1),{placement:"bottom",maxHeight:xo};if(!Rf&&Fv>=df||Rf&&dy>=df){Ef&&w2(ep,Bv,x1);var lw=Rf?dy-am:Fv-am;return{placement:"bottom",maxHeight:lw}}if(gf==="auto"||Rf){var Wb=xo,P$=Rf?gm:by;return P$>=df&&(Wb=Math.min(P$-am-Qf.controlHeight,xo)),{placement:"top",maxHeight:Wb}}if(gf==="bottom")return Ef&&FE(ep,Bv),{placement:"bottom",maxHeight:xo};break;case"top":if(gm>=gg)return{placement:"top",maxHeight:xo};if(by>=gg&&!Rf)return Ef&&w2(ep,Gb,x1),{placement:"top",maxHeight:xo};if(!Rf&&by>=df||Rf&&gm>=df){var z0=xo;return(!Rf&&by>=df||Rf&&gm>=df)&&(z0=Rf?gm-wm:by-wm),Ef&&w2(ep,Gb,x1),{placement:"top",maxHeight:z0}}return{placement:"bottom",maxHeight:xo};default:throw new Error('Invalid placement provided "'.concat(gf,'".'))}return Jf}function pC(go){var xo={bottom:"top",top:"bottom"};return go?xo[go]:"bottom"}var aw=function(go){return go==="auto"?"bottom":go},gC=function(go){var xo,uf=go.placement,df=go.theme,gf=df.borderRadius,Ef=df.spacing,Rf=df.colors;return xo={label:"menu"},Vb(xo,pC(uf),"100%"),Vb(xo,"backgroundColor",Rf.neutral0),Vb(xo,"borderRadius",gf),Vb(xo,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Vb(xo,"marginBottom",Ef.menuGutter),Vb(xo,"marginTop",Ef.menuGutter),Vb(xo,"position","absolute"),Vb(xo,"width","100%"),Vb(xo,"zIndex",1),xo},mC=bp({getPortalPlacement:null}),vC=function(go){fx(uf,go);var xo=iw(uf);function uf(){var df;nw(this,uf);for(var gf=arguments.length,Ef=new Array(gf),Rf=0;Rf=4;++df,gf-=4)uf=go.charCodeAt(df)&255|(go.charCodeAt(++df)&255)<<8|(go.charCodeAt(++df)&255)<<16|(go.charCodeAt(++df)&255)<<24,uf=(uf&65535)*1540483477+((uf>>>16)*59797<<16),uf^=uf>>>24,xo=(uf&65535)*1540483477+((uf>>>16)*59797<<16)^(xo&65535)*1540483477+((xo>>>16)*59797<<16);switch(gf){case 3:xo^=(go.charCodeAt(df+2)&255)<<16;case 2:xo^=(go.charCodeAt(df+1)&255)<<8;case 1:xo^=go.charCodeAt(df)&255,xo=(xo&65535)*1540483477+((xo>>>16)*59797<<16)}return xo^=xo>>>13,xo=(xo&65535)*1540483477+((xo>>>16)*59797<<16),((xo^xo>>>15)>>>0).toString(36)}var h_={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},vm=/[A-Z]|^ms/g,O$=/_EMO_([^_]+?)_([^]*?)_EMO_/g,rw=function(go){return go.charCodeAt(1)===45},I$=function(go){return go!=null&&typeof go!="boolean"},d0=My(function(go){return rw(go)?go:go.replace(vm,"-$&").toLowerCase()}),tT=function(go,xo){switch(go){case"animation":case"animationName":if(typeof xo=="string")return xo.replace(O$,function(uf,df,gf){return w1={name:df,styles:gf,next:w1},df})}return h_[go]!==1&&!rw(go)&&typeof xo=="number"&&xo!==0?xo+"px":xo};function qy(go,xo,uf){if(uf==null)return"";if(uf.__emotion_styles!==void 0)return uf;switch(typeof uf){case"boolean":return"";case"object":{if(uf.anim===1)return w1={name:uf.name,styles:uf.styles,next:w1},uf.name;if(uf.styles!==void 0){var df=uf.next;if(df!==void 0)for(;df!==void 0;)w1={name:df.name,styles:df.styles,next:w1},df=df.next;var gf=uf.styles+";";return gf}return Jv(go,xo,uf)}case"function":{if(go!==void 0){var Ef=w1,Rf=uf(go);return w1=Ef,qy(go,xo,Rf)}break}}if(xo==null)return uf;var Vf=xo[uf];return Vf!==void 0?Vf:uf}function Jv(go,xo,uf){var df="";if(Array.isArray(uf))for(var gf=0;gf=0)&&(uf[gf]=go[gf]);return uf}function $b(go,xo){if(go==null)return{};var uf=OE(go,xo),df,gf;if(Object.getOwnPropertySymbols){var Ef=Object.getOwnPropertySymbols(go);for(gf=0;gf=0)&&(!Object.prototype.propertyIsEnumerable.call(go,df)||(uf[df]=go[df]))}return uf}function d_(go){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d_=function(xo){return typeof xo}:d_=function(xo){return xo&&typeof Symbol=="function"&&xo.constructor===Symbol&&xo!==Symbol.prototype?"symbol":typeof xo},d_(go)}var y2={};Object.defineProperty(y2,"__esModule",{value:!0});var IE=Object.assign||function(go){for(var xo=1;xo=0||!Object.prototype.hasOwnProperty.call(go,df)||(uf[df]=go[df]);return uf}function aT(go,xo){if(!(go instanceof xo))throw new TypeError("Cannot call a class as a function")}function RE(go,xo){if(!go)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return xo&&(typeof xo=="object"||typeof xo=="function")?xo:go}function sT(go,xo){if(typeof xo!="function"&&xo!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof xo);go.prototype=Object.create(xo&&xo.prototype,{constructor:{value:go,enumerable:!1,writable:!0,configurable:!0}}),xo&&(Object.setPrototypeOf?Object.setPrototypeOf(go,xo):go.__proto__=xo)}var lT={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},cT=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],iC=function(go){return cT.forEach(function(xo){return delete go[xo]}),go},uT=function(go,xo){xo.style.fontSize=go.fontSize,xo.style.fontFamily=go.fontFamily,xo.style.fontWeight=go.fontWeight,xo.style.fontStyle=go.fontStyle,xo.style.letterSpacing=go.letterSpacing,xo.style.textTransform=go.textTransform},hT=typeof window<"u"&&window.navigator?/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent):!1,dT=function(){return hT?"_"+Math.random().toString(36).substr(2,12):void 0},NE=function(go){sT(xo,go),iT(xo,null,[{key:"getDerivedStateFromProps",value:function(uf,df){var gf=uf.id;return gf!==df.prevId?{inputId:gf||dT(),prevId:gf}:null}}]);function xo(uf){aT(this,xo);var df=RE(this,(xo.__proto__||Object.getPrototypeOf(xo)).call(this,uf));return df.inputRef=function(gf){df.input=gf,typeof df.props.inputRef=="function"&&df.props.inputRef(gf)},df.placeHolderSizerRef=function(gf){df.placeHolderSizer=gf},df.sizerRef=function(gf){df.sizer=gf},df.state={inputWidth:uf.minWidth,inputId:uf.id||dT(),prevId:uf.id},df}return iT(xo,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(uf,df){df.inputWidth!==this.state.inputWidth&&typeof this.props.onAutosize=="function"&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(!(!this.mounted||!window.getComputedStyle)){var uf=this.input&&window.getComputedStyle(this.input);!uf||(uT(uf,this.sizer),this.placeHolderSizer&&uT(uf,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(!(!this.mounted||!this.sizer||typeof this.sizer.scrollWidth>"u")){var uf=void 0;this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?uf=Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:uf=this.sizer.scrollWidth+2;var df=this.props.type==="number"&&this.props.extraWidth===void 0?16:parseInt(this.props.extraWidth)||0;uf+=df,uf"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function aC(go){if(go===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return go}function gx(go,xo){return xo&&(typeof xo=="object"||typeof xo=="function")?xo:aC(go)}function iw(go){var xo=pT();return function(){var uf=DE(go),df;if(xo){var gf=DE(this).constructor;df=Reflect.construct(uf,arguments,gf)}else df=uf.apply(this,arguments);return gx(this,df)}}var f_=function(){};function LE(go,xo){return xo?xo[0]==="-"?go+xo:go+"__"+xo:go}function sC(go,xo,uf){var df=[uf];if(xo&&go)for(var gf in xo)xo.hasOwnProperty(gf)&&xo[gf]&&df.push("".concat(LE(go,gf)));return df.filter(function(Ef){return Ef}).map(function(Ef){return String(Ef).trim()}).join(" ")}var gT=function(go){return Array.isArray(go)?go.filter(Boolean):d_(go)==="object"&&go!==null?[go]:[]},lC=function(go){go.className,go.clearValue,go.cx,go.getStyles,go.getValue,go.hasValue,go.isMulti,go.isRtl,go.options,go.selectOption,go.selectProps,go.setValue,go.theme;var xo=$b(go,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]);return Dy({},xo)};function mT(go){return[document.documentElement,document.body,window].indexOf(go)>-1}function vT(go){return mT(go)?window.pageYOffset:go.scrollTop}function FE(go,xo){if(mT(go)){window.scrollTo(0,xo);return}go.scrollTop=xo}function cC(go){var xo=getComputedStyle(go),uf=xo.position==="absolute",df=/(auto|scroll)/,gf=document.documentElement;if(xo.position==="fixed")return gf;for(var Ef=go;Ef=Ef.parentElement;)if(xo=getComputedStyle(Ef),!(uf&&xo.position==="static")&&df.test(xo.overflow+xo.overflowY+xo.overflowX))return Ef;return gf}function yT(go,xo,uf,df){return uf*((go=go/df-1)*go*go+1)+xo}function w2(go,xo){var uf=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,df=arguments.length>3&&arguments[3]!==void 0?arguments[3]:f_,gf=vT(go),Ef=xo-gf,Rf=10,Vf=0;function Qf(){Vf+=Rf;var ep=yT(Vf,gf,Ef,uf);FE(go,ep),Vfuf.bottom?FE(go,Math.min(xo.offsetTop+xo.clientHeight-go.offsetHeight+gf,go.scrollHeight)):df.top-gf=gg)return{placement:"bottom",maxHeight:xo};if(Fv>=gg&&!Rf)return Ef&&w2(ep,Bv,x1),{placement:"bottom",maxHeight:xo};if(!Rf&&Fv>=df||Rf&&dy>=df){Ef&&w2(ep,Bv,x1);var lw=Rf?dy-am:Fv-am;return{placement:"bottom",maxHeight:lw}}if(gf==="auto"||Rf){var Wb=xo,P$=Rf?gm:by;return P$>=df&&(Wb=Math.min(P$-am-Qf.controlHeight,xo)),{placement:"top",maxHeight:Wb}}if(gf==="bottom")return Ef&&FE(ep,Bv),{placement:"bottom",maxHeight:xo};break;case"top":if(gm>=gg)return{placement:"top",maxHeight:xo};if(by>=gg&&!Rf)return Ef&&w2(ep,Gb,x1),{placement:"top",maxHeight:xo};if(!Rf&&by>=df||Rf&&gm>=df){var z0=xo;return(!Rf&&by>=df||Rf&&gm>=df)&&(z0=Rf?gm-wm:by-wm),Ef&&w2(ep,Gb,x1),{placement:"top",maxHeight:z0}}return{placement:"bottom",maxHeight:xo};default:throw new Error('Invalid placement provided "'.concat(gf,'".'))}return Jf}function pC(go){var xo={bottom:"top",top:"bottom"};return go?xo[go]:"bottom"}var aw=function(go){return go==="auto"?"bottom":go},gC=function(go){var xo,uf=go.placement,df=go.theme,gf=df.borderRadius,Ef=df.spacing,Rf=df.colors;return xo={label:"menu"},Vb(xo,pC(uf),"100%"),Vb(xo,"backgroundColor",Rf.neutral0),Vb(xo,"borderRadius",gf),Vb(xo,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Vb(xo,"marginBottom",Ef.menuGutter),Vb(xo,"marginTop",Ef.menuGutter),Vb(xo,"position","absolute"),Vb(xo,"width","100%"),Vb(xo,"zIndex",1),xo},mC=bp({getPortalPlacement:null}),vC=function(go){fx(uf,go);var xo=iw(uf);function uf(){var df;nw(this,uf);for(var gf=arguments.length,Ef=new Array(gf),Rf=0;Rfgo.length)&&(xo=go.length);for(var uf=0,df=new Array(xo);uf-1}};function jP(go){go.in,go.out,go.onExited,go.appear,go.enter,go.exit;var xo=go.innerRef;go.emotion;var uf=$b(go,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return im("input",Kg({ref:xo},uf,{css:e1({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"","")}))}var zP=function(go){go.preventDefault(),go.stopPropagation()};function HP(go){var xo=go.isEnabled,uf=go.onBottomArrive,df=go.onBottomLeave,gf=go.onTopArrive,Ef=go.onTopLeave,Rf=Kf(!1),Vf=Kf(!1),Qf=Kf(0),ep=Kf(null),Jf=wp(function(fg,Tg){if(ep.current!==null){var Rg=ep.current,$m=Rg.scrollTop,pm=Rg.scrollHeight,am=Rg.clientHeight,wm=ep.current,gm=Tg>0,dy=pm-am-$m,by=!1;dy>Tg&&Rf.current&&(df&&df(fg),Rf.current=!1),gm&&Vf.current&&(Ef&&Ef(fg),Vf.current=!1),gm&&Tg>dy?(uf&&!Rf.current&&uf(fg),wm.scrollTop=pm,by=!0,Rf.current=!0):!gm&&-Tg>$m&&(gf&&!Vf.current&&gf(fg),wm.scrollTop=0,by=!0,Vf.current=!0),by&&zP(fg)}},[]),mp=wp(function(fg){Jf(fg,fg.deltaY)},[Jf]),Tp=wp(function(fg){Qf.current=fg.changedTouches[0].clientY},[]),Pp=wp(function(fg){var Tg=Qf.current-fg.changedTouches[0].clientY;Jf(fg,Tg)},[Jf]),tg=wp(function(fg){if(fg){var Tg=dC?{passive:!1}:!1;typeof fg.addEventListener=="function"&&fg.addEventListener("wheel",mp,Tg),typeof fg.addEventListener=="function"&&fg.addEventListener("touchstart",Tp,Tg),typeof fg.addEventListener=="function"&&fg.addEventListener("touchmove",Pp,Tg)}},[Pp,Tp,mp]),gg=wp(function(fg){!fg||(typeof fg.removeEventListener=="function"&&fg.removeEventListener("wheel",mp,!1),typeof fg.removeEventListener=="function"&&fg.removeEventListener("touchstart",Tp,!1),typeof fg.removeEventListener=="function"&&fg.removeEventListener("touchmove",Pp,!1))},[Pp,Tp,mp]);return Op(function(){if(xo){var fg=ep.current;return tg(fg),function(){gg(fg)}}},[xo,tg,gg]),function(fg){ep.current=fg}}var yI=["boxSizing","height","overflow","paddingRight","position"],bI={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function $I(go){go.preventDefault()}function _I(go){go.stopPropagation()}function wI(){var go=this.scrollTop,xo=this.scrollHeight,uf=go+this.offsetHeight;go===0?this.scrollTop=1:uf===xo&&(this.scrollTop=go-1)}function xI(){return"ontouchstart"in window||navigator.maxTouchPoints}var EI=!!(typeof window<"u"&&window.document&&window.document.createElement),_T=0,jE={capture:!1,passive:!1};function UP(go){var xo=go.isEnabled,uf=go.accountForScrollbars,df=uf===void 0?!0:uf,gf=Kf({}),Ef=Kf(null),Rf=wp(function(Qf){if(EI){var ep=document.body,Jf=ep&&ep.style;if(df&&yI.forEach(function(tg){var gg=Jf&&Jf[tg];gf.current[tg]=gg}),df&&_T<1){var mp=parseInt(gf.current.paddingRight,10)||0,Tp=document.body?document.body.clientWidth:0,Pp=window.innerWidth-Tp+mp||0;Object.keys(bI).forEach(function(tg){var gg=bI[tg];Jf&&(Jf[tg]=gg)}),Jf&&(Jf.paddingRight="".concat(Pp,"px"))}ep&&xI()&&(ep.addEventListener("touchmove",$I,jE),Qf&&(Qf.addEventListener("touchstart",wI,jE),Qf.addEventListener("touchmove",_I,jE))),_T+=1}},[]),Vf=wp(function(Qf){if(EI){var ep=document.body,Jf=ep&&ep.style;_T=Math.max(_T-1,0),df&&_T<1&&yI.forEach(function(mp){var Tp=gf.current[mp];Jf&&(Jf[mp]=Tp)}),ep&&xI()&&(ep.removeEventListener("touchmove",$I,jE),Qf&&(Qf.removeEventListener("touchstart",wI,jE),Qf.removeEventListener("touchmove",_I,jE)))}},[]);return Op(function(){if(xo){var Qf=Ef.current;return Rf(Qf),function(){Vf(Qf)}}},[xo,Rf,Vf]),function(Qf){Ef.current=Qf}}var VP=function(){return document.activeElement&&document.activeElement.blur()},GP={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function WP(go){var xo=go.children,uf=go.lockEnabled,df=go.captureEnabled,gf=df===void 0?!0:df,Ef=go.onBottomArrive,Rf=go.onBottomLeave,Vf=go.onTopArrive,Qf=go.onTopLeave,ep=HP({isEnabled:gf,onBottomArrive:Ef,onBottomLeave:Rf,onTopArrive:Vf,onTopLeave:Qf}),Jf=UP({isEnabled:uf}),mp=function(Tp){ep(Tp),Jf(Tp)};return im(Zg.Fragment,null,uf&&im("div",{onClick:VP,css:GP}),xo(mp))}var qP=function(go){return go.label},YP=function(go){return go.label},KP=function(go){return go.value},XP=function(go){return!!go.isDisabled},ZP={clearIndicator:tp,container:ls,control:lg,dropdownIndicator:pp,group:Wp,groupHeading:ig,indicatorsContainer:Sf,indicatorSeparator:up,input:cg,loadingIndicator:Ap,loadingMessage:at,menu:gC,menuList:RO,menuPortal:fo,multiValue:_g,multiValueLabel:bm,multiValueRemove:Mg,noOptionsMessage:nt,option:p_,placeholder:S2,singleValue:BE,valueContainer:mf},JP={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},QP=4,SI=4,eA=38,tA=SI*2,rA={baseUnit:SI,controlHeight:eA,menuGutter:tA},jO={borderRadius:QP,colors:JP,spacing:rA},nA={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:hC(),captureMenuScroll:!hC(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:BP(),formatGroupLabel:qP,getOptionLabel:YP,getOptionValue:KP,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:XP,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!PO(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(go){var xo=go.count;return"".concat(xo," result").concat(xo!==1?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function TI(go,xo,uf,df){var gf=PI(go,xo,uf),Ef=AI(go,xo,uf),Rf=II(go,xo),Vf=wC(go,xo);return{type:"option",data:xo,isDisabled:gf,isSelected:Ef,label:Rf,value:Vf,index:df}}function kI(go,xo){return go.options.map(function(uf,df){if(uf.options){var gf=uf.options.map(function(Rf,Vf){return TI(go,Rf,xo,Vf)}).filter(function(Rf){return OI(go,Rf)});return gf.length>0?{type:"group",data:uf,options:gf,index:df}:void 0}var Ef=TI(go,uf,xo,df);return OI(go,Ef)?Ef:void 0}).filter(function(uf){return!!uf})}function CI(go){return go.reduce(function(xo,uf){return uf.type==="group"?xo.push.apply(xo,fI(uf.options.map(function(df){return df.data}))):xo.push(uf.data),xo},[])}function iA(go,xo){return CI(kI(go,xo))}function OI(go,xo){var uf=go.inputValue,df=uf===void 0?"":uf,gf=xo.data,Ef=xo.isSelected,Rf=xo.label,Vf=xo.value;return(!NI(go)||!Ef)&&RI(go,{label:Rf,value:Vf,data:gf},df)}function oA(go,xo){var uf=go.focusedValue,df=go.selectValue,gf=df.indexOf(uf);if(gf>-1){var Ef=xo.indexOf(uf);if(Ef>-1)return uf;if(gf-1?uf:xo[0]}var II=function(go,xo){return go.getOptionLabel(xo)},wC=function(go,xo){return go.getOptionValue(xo)};function PI(go,xo,uf){return typeof go.isOptionDisabled=="function"?go.isOptionDisabled(xo,uf):!1}function AI(go,xo,uf){if(uf.indexOf(xo)>-1)return!0;if(typeof go.isOptionSelected=="function")return go.isOptionSelected(xo,uf);var df=wC(go,xo);return uf.some(function(gf){return wC(go,gf)===df})}function RI(go,xo,uf){return go.filterOption?go.filterOption(xo,uf):!0}var NI=function(go){var xo=go.hideSelectedOptions,uf=go.isMulti;return xo===void 0?uf:xo},sA=1,MI=function(go){fx(uf,go);var xo=iw(uf);function uf(df){var gf;return nw(this,uf),gf=xo.call(this,df),gf.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},gf.blockOptionHover=!1,gf.isComposing=!1,gf.commonProps=void 0,gf.initialTouchX=0,gf.initialTouchY=0,gf.instancePrefix="",gf.openAfterFocus=!1,gf.scrollToFocusedOptionOnUpdate=!1,gf.userIsDragging=void 0,gf.controlRef=null,gf.getControlRef=function(Ef){gf.controlRef=Ef},gf.focusedOptionRef=null,gf.getFocusedOptionRef=function(Ef){gf.focusedOptionRef=Ef},gf.menuListRef=null,gf.getMenuListRef=function(Ef){gf.menuListRef=Ef},gf.inputRef=null,gf.getInputRef=function(Ef){gf.inputRef=Ef},gf.focus=gf.focusInput,gf.blur=gf.blurInput,gf.onChange=function(Ef,Rf){var Vf=gf.props,Qf=Vf.onChange,ep=Vf.name;Rf.name=ep,gf.ariaOnChange(Ef,Rf),Qf(Ef,Rf)},gf.setValue=function(Ef){var Rf=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"set-value",Vf=arguments.length>2?arguments[2]:void 0,Qf=gf.props,ep=Qf.closeMenuOnSelect,Jf=Qf.isMulti;gf.onInputChange("",{action:"set-value"}),ep&&(gf.setState({inputIsHiddenAfterUpdate:!Jf}),gf.onMenuClose()),gf.setState({clearFocusValueOnUpdate:!0}),gf.onChange(Ef,{action:Rf,option:Vf})},gf.selectOption=function(Ef){var Rf=gf.props,Vf=Rf.blurInputOnSelect,Qf=Rf.isMulti,ep=Rf.name,Jf=gf.state.selectValue,mp=Qf&&gf.isOptionSelected(Ef,Jf),Tp=gf.isOptionDisabled(Ef,Jf);if(mp){var Pp=gf.getOptionValue(Ef);gf.setValue(Jf.filter(function(tg){return gf.getOptionValue(tg)!==Pp}),"deselect-option",Ef)}else if(!Tp)Qf?gf.setValue([].concat(fI(Jf),[Ef]),"select-option",Ef):gf.setValue(Ef,"select-option");else{gf.ariaOnChange(Ef,{action:"select-option",name:ep});return}Vf&&gf.blurInput()},gf.removeValue=function(Ef){var Rf=gf.props.isMulti,Vf=gf.state.selectValue,Qf=gf.getOptionValue(Ef),ep=Vf.filter(function(mp){return gf.getOptionValue(mp)!==Qf}),Jf=Rf?ep:ep[0]||null;gf.onChange(Jf,{action:"remove-value",removedValue:Ef}),gf.focusInput()},gf.clearValue=function(){var Ef=gf.state.selectValue;gf.onChange(gf.props.isMulti?[]:null,{action:"clear",removedValues:Ef})},gf.popValue=function(){var Ef=gf.props.isMulti,Rf=gf.state.selectValue,Vf=Rf[Rf.length-1],Qf=Rf.slice(0,Rf.length-1),ep=Ef?Qf:Qf[0]||null;gf.onChange(ep,{action:"pop-value",removedValue:Vf})},gf.getValue=function(){return gf.state.selectValue},gf.cx=function(){for(var Ef=arguments.length,Rf=new Array(Ef),Vf=0;VfJf||ep>Jf}},gf.onTouchEnd=function(Ef){gf.userIsDragging||(gf.controlRef&&!gf.controlRef.contains(Ef.target)&&gf.menuListRef&&!gf.menuListRef.contains(Ef.target)&&gf.blurInput(),gf.initialTouchX=0,gf.initialTouchY=0)},gf.onControlTouchEnd=function(Ef){gf.userIsDragging||gf.onControlMouseDown(Ef)},gf.onClearIndicatorTouchEnd=function(Ef){gf.userIsDragging||gf.onClearIndicatorMouseDown(Ef)},gf.onDropdownIndicatorTouchEnd=function(Ef){gf.userIsDragging||gf.onDropdownIndicatorMouseDown(Ef)},gf.handleInputChange=function(Ef){var Rf=Ef.currentTarget.value;gf.setState({inputIsHiddenAfterUpdate:!1}),gf.onInputChange(Rf,{action:"input-change"}),gf.props.menuIsOpen||gf.onMenuOpen()},gf.onInputFocus=function(Ef){gf.props.onFocus&&gf.props.onFocus(Ef),gf.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(gf.openAfterFocus||gf.props.openMenuOnFocus)&&gf.openMenu("first"),gf.openAfterFocus=!1},gf.onInputBlur=function(Ef){if(gf.menuListRef&&gf.menuListRef.contains(document.activeElement)){gf.inputRef.focus();return}gf.props.onBlur&&gf.props.onBlur(Ef),gf.onInputChange("",{action:"input-blur"}),gf.onMenuClose(),gf.setState({focusedValue:null,isFocused:!1})},gf.onOptionHover=function(Ef){gf.blockOptionHover||gf.state.focusedOption===Ef||gf.setState({focusedOption:Ef})},gf.shouldHideSelectedOptions=function(){return NI(gf.props)},gf.onKeyDown=function(Ef){var Rf=gf.props,Vf=Rf.isMulti,Qf=Rf.backspaceRemovesValue,ep=Rf.escapeClearsValue,Jf=Rf.inputValue,mp=Rf.isClearable,Tp=Rf.isDisabled,Pp=Rf.menuIsOpen,tg=Rf.onKeyDown,gg=Rf.tabSelectsValue,fg=Rf.openMenuOnFocus,Tg=gf.state,Rg=Tg.focusedOption,$m=Tg.focusedValue,pm=Tg.selectValue;if(!Tp&&!(typeof tg=="function"&&(tg(Ef),Ef.defaultPrevented))){switch(gf.blockOptionHover=!0,Ef.key){case"ArrowLeft":if(!Vf||Jf)return;gf.focusValue("previous");break;case"ArrowRight":if(!Vf||Jf)return;gf.focusValue("next");break;case"Delete":case"Backspace":if(Jf)return;if($m)gf.removeValue($m);else{if(!Qf)return;Vf?gf.popValue():mp&&gf.clearValue()}break;case"Tab":if(gf.isComposing||Ef.shiftKey||!Pp||!gg||!Rg||fg&&gf.isOptionSelected(Rg,pm))return;gf.selectOption(Rg);break;case"Enter":if(Ef.keyCode===229)break;if(Pp){if(!Rg||gf.isComposing)return;gf.selectOption(Rg);break}return;case"Escape":Pp?(gf.setState({inputIsHiddenAfterUpdate:!1}),gf.onInputChange("",{action:"menu-close"}),gf.onMenuClose()):mp&&ep&&gf.clearValue();break;case" ":if(Jf)return;if(!Pp){gf.openMenu("first");break}if(!Rg)return;gf.selectOption(Rg);break;case"ArrowUp":Pp?gf.focusOption("up"):gf.openMenu("last");break;case"ArrowDown":Pp?gf.focusOption("down"):gf.openMenu("first");break;case"PageUp":if(!Pp)return;gf.focusOption("pageup");break;case"PageDown":if(!Pp)return;gf.focusOption("pagedown");break;case"Home":if(!Pp)return;gf.focusOption("first");break;case"End":if(!Pp)return;gf.focusOption("last");break;default:return}Ef.preventDefault()}},gf.instancePrefix="react-select-"+(gf.props.instanceId||++sA),gf.state.selectValue=gT(df.value),gf}return $2(uf,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(df){var gf=this.props,Ef=gf.isDisabled,Rf=gf.menuIsOpen,Vf=this.state.isFocused;(Vf&&!Ef&&df.isDisabled||Vf&&Rf&&!df.menuIsOpen)&&this.focusInput(),Vf&&Ef&&!df.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(IO(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(df,gf){this.props.onInputChange(df,gf)}},{key:"focusInput",value:function(){!this.inputRef||this.inputRef.focus()}},{key:"blurInput",value:function(){!this.inputRef||this.inputRef.blur()}},{key:"openMenu",value:function(df){var gf=this,Ef=this.state,Rf=Ef.selectValue,Vf=Ef.isFocused,Qf=this.buildFocusableOptions(),ep=df==="first"?0:Qf.length-1;if(!this.props.isMulti){var Jf=Qf.indexOf(Rf[0]);Jf>-1&&(ep=Jf)}this.scrollToFocusedOptionOnUpdate=!(Vf&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:Qf[ep]},function(){return gf.onMenuOpen()})}},{key:"focusValue",value:function(df){var gf=this.state,Ef=gf.selectValue,Rf=gf.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var Vf=Ef.indexOf(Rf);Rf||(Vf=-1);var Qf=Ef.length-1,ep=-1;if(Ef.length){switch(df){case"previous":Vf===0?ep=0:Vf===-1?ep=Qf:ep=Vf-1;break;case"next":Vf>-1&&Vf0&&arguments[0]!==void 0?arguments[0]:"first",gf=this.props.pageSize,Ef=this.state.focusedOption,Rf=this.getFocusableOptions();if(Rf.length){var Vf=0,Qf=Rf.indexOf(Ef);Ef||(Qf=-1),df==="up"?Vf=Qf>0?Qf-1:Rf.length-1:df==="down"?Vf=(Qf+1)%Rf.length:df==="pageup"?(Vf=Qf-gf,Vf<0&&(Vf=0)):df==="pagedown"?(Vf=Qf+gf,Vf>Rf.length-1&&(Vf=Rf.length-1)):df==="last"&&(Vf=Rf.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:Rf[Vf],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(jO):Dy(Dy({},jO),this.props.theme):jO}},{key:"getCommonProps",value:function(){var df=this.clearValue,gf=this.cx,Ef=this.getStyles,Rf=this.getValue,Vf=this.selectOption,Qf=this.setValue,ep=this.props,Jf=ep.isMulti,mp=ep.isRtl,Tp=ep.options,Pp=this.hasValue();return{clearValue:df,cx:gf,getStyles:Ef,getValue:Rf,hasValue:Pp,isMulti:Jf,isRtl:mp,options:Tp,selectOption:Vf,selectProps:ep,setValue:Qf,theme:this.getTheme()}}},{key:"hasValue",value:function(){var df=this.state.selectValue;return df.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var df=this.props,gf=df.isClearable,Ef=df.isMulti;return gf===void 0?Ef:gf}},{key:"isOptionDisabled",value:function(df,gf){return PI(this.props,df,gf)}},{key:"isOptionSelected",value:function(df,gf){return AI(this.props,df,gf)}},{key:"filterOption",value:function(df,gf){return RI(this.props,df,gf)}},{key:"formatOptionLabel",value:function(df,gf){if(typeof this.props.formatOptionLabel=="function"){var Ef=this.props.inputValue,Rf=this.state.selectValue;return this.props.formatOptionLabel(df,{context:gf,inputValue:Ef,selectValue:Rf})}else return this.getOptionLabel(df)}},{key:"formatGroupLabel",value:function(df){return this.props.formatGroupLabel(df)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var df=this.props,gf=df.isDisabled,Ef=df.isSearchable,Rf=df.inputId,Vf=df.inputValue,Qf=df.tabIndex,ep=df.form,Jf=this.getComponents(),mp=Jf.Input,Tp=this.state.inputIsHidden,Pp=this.commonProps,tg=Rf||this.getElementId("input"),gg={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return Ef?Zg.createElement(mp,Kg({},Pp,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:tg,innerRef:this.getInputRef,isDisabled:gf,isHidden:Tp,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:Qf,form:ep,type:"text",value:Vf},gg)):Zg.createElement(jP,Kg({id:tg,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:f_,onFocus:this.onInputFocus,readOnly:!0,disabled:gf,tabIndex:Qf,form:ep,value:""},gg))}},{key:"renderPlaceholderOrValue",value:function(){var df=this,gf=this.getComponents(),Ef=gf.MultiValue,Rf=gf.MultiValueContainer,Vf=gf.MultiValueLabel,Qf=gf.MultiValueRemove,ep=gf.SingleValue,Jf=gf.Placeholder,mp=this.commonProps,Tp=this.props,Pp=Tp.controlShouldRenderValue,tg=Tp.isDisabled,gg=Tp.isMulti,fg=Tp.inputValue,Tg=Tp.placeholder,Rg=this.state,$m=Rg.selectValue,pm=Rg.focusedValue,am=Rg.isFocused;if(!this.hasValue()||!Pp)return fg?null:Zg.createElement(Jf,Kg({},mp,{key:"placeholder",isDisabled:tg,isFocused:am}),Tg);if(gg){var wm=$m.map(function(dy,by){var Fv=dy===pm;return Zg.createElement(Ef,Kg({},mp,{components:{Container:Rf,Label:Vf,Remove:Qf},isFocused:Fv,isDisabled:tg,key:"".concat(df.getOptionValue(dy)).concat(by),index:by,removeProps:{onClick:function(){return df.removeValue(dy)},onTouchEnd:function(){return df.removeValue(dy)},onMouseDown:function(Bv){Bv.preventDefault(),Bv.stopPropagation()}},data:dy}),df.formatOptionLabel(dy,"value"))});return wm}if(fg)return null;var gm=$m[0];return Zg.createElement(ep,Kg({},mp,{data:gm,isDisabled:tg}),this.formatOptionLabel(gm,"value"))}},{key:"renderClearIndicator",value:function(){var df=this.getComponents(),gf=df.ClearIndicator,Ef=this.commonProps,Rf=this.props,Vf=Rf.isDisabled,Qf=Rf.isLoading,ep=this.state.isFocused;if(!this.isClearable()||!gf||Vf||!this.hasValue()||Qf)return null;var Jf={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return Zg.createElement(gf,Kg({},Ef,{innerProps:Jf,isFocused:ep}))}},{key:"renderLoadingIndicator",value:function(){var df=this.getComponents(),gf=df.LoadingIndicator,Ef=this.commonProps,Rf=this.props,Vf=Rf.isDisabled,Qf=Rf.isLoading,ep=this.state.isFocused;if(!gf||!Qf)return null;var Jf={"aria-hidden":"true"};return Zg.createElement(gf,Kg({},Ef,{innerProps:Jf,isDisabled:Vf,isFocused:ep}))}},{key:"renderIndicatorSeparator",value:function(){var df=this.getComponents(),gf=df.DropdownIndicator,Ef=df.IndicatorSeparator;if(!gf||!Ef)return null;var Rf=this.commonProps,Vf=this.props.isDisabled,Qf=this.state.isFocused;return Zg.createElement(Ef,Kg({},Rf,{isDisabled:Vf,isFocused:Qf}))}},{key:"renderDropdownIndicator",value:function(){var df=this.getComponents(),gf=df.DropdownIndicator;if(!gf)return null;var Ef=this.commonProps,Rf=this.props.isDisabled,Vf=this.state.isFocused,Qf={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return Zg.createElement(gf,Kg({},Ef,{innerProps:Qf,isDisabled:Rf,isFocused:Vf}))}},{key:"renderMenu",value:function(){var df=this,gf=this.getComponents(),Ef=gf.Group,Rf=gf.GroupHeading,Vf=gf.Menu,Qf=gf.MenuList,ep=gf.MenuPortal,Jf=gf.LoadingMessage,mp=gf.NoOptionsMessage,Tp=gf.Option,Pp=this.commonProps,tg=this.state.focusedOption,gg=this.props,fg=gg.captureMenuScroll,Tg=gg.inputValue,Rg=gg.isLoading,$m=gg.loadingMessage,pm=gg.minMenuHeight,am=gg.maxMenuHeight,wm=gg.menuIsOpen,gm=gg.menuPlacement,dy=gg.menuPosition,by=gg.menuPortalTarget,Fv=gg.menuShouldBlockScroll,Bv=gg.menuShouldScrollIntoView,Gb=gg.noOptionsMessage,x1=gg.onMenuScrollToTop,lw=gg.onMenuScrollToBottom;if(!wm)return null;var Wb=function(ey,bg){var Pg=ey.type,Ng=ey.data,Ag=ey.isDisabled,zg=ey.isSelected,Sm=ey.label,fy=ey.value,f0=tg===Ng,jv=Ag?void 0:function(){return df.onOptionHover(Ng)},P2=Ag?void 0:function(){return df.selectOption(Ng)},g_="".concat(df.getElementId("option"),"-").concat(bg),bx={id:g_,onClick:P2,onMouseMove:jv,onMouseOver:jv,tabIndex:-1};return Zg.createElement(Tp,Kg({},Pp,{innerProps:bx,data:Ng,isDisabled:Ag,isSelected:zg,key:g_,label:Sm,type:Pg,value:fy,isFocused:f0,innerRef:f0?df.getFocusedOptionRef:void 0}),df.formatOptionLabel(ey.data,"menu"))},P$;if(this.hasOptions())P$=this.getCategorizedOptions().map(function(ey){if(ey.type==="group"){var bg=ey.data,Pg=ey.options,Ng=ey.index,Ag="".concat(df.getElementId("group"),"-").concat(Ng),zg="".concat(Ag,"-heading");return Zg.createElement(Ef,Kg({},Pp,{key:Ag,data:bg,options:Pg,Heading:Rf,headingProps:{id:zg,data:ey.data},label:df.formatGroupLabel(ey.data)}),ey.options.map(function(Sm){return Wb(Sm,"".concat(Ng,"-").concat(Sm.index))}))}else if(ey.type==="option")return Wb(ey,"".concat(ey.index))});else if(Rg){var z0=$m({inputValue:Tg});if(z0===null)return null;P$=Zg.createElement(Jf,Pp,z0)}else{var PC=Gb({inputValue:Tg});if(PC===null)return null;P$=Zg.createElement(mp,Pp,PC)}var I2={minMenuHeight:pm,maxMenuHeight:am,menuPlacement:gm,menuPosition:dy,menuShouldScrollIntoView:Bv},qb=Zg.createElement(vC,Kg({},Pp,I2),function(ey){var bg=ey.ref,Pg=ey.placerProps,Ng=Pg.placement,Ag=Pg.maxHeight;return Zg.createElement(Vf,Kg({},Pp,I2,{innerRef:bg,innerProps:{onMouseDown:df.onMenuMouseDown,onMouseMove:df.onMenuMouseMove},isLoading:Rg,placement:Ng}),Zg.createElement(WP,{captureEnabled:fg,onTopArrive:x1,onBottomArrive:lw,lockEnabled:Fv},function(zg){return Zg.createElement(Qf,Kg({},Pp,{innerRef:function(Sm){df.getMenuListRef(Sm),zg(Sm)},isLoading:Rg,maxHeight:Ag,focusedOption:tg}),P$)}))});return by||dy==="fixed"?Zg.createElement(ep,Kg({},Pp,{appendTo:by,controlElement:this.controlRef,menuPlacement:gm,menuPosition:dy}),qb):qb}},{key:"renderFormField",value:function(){var df=this,gf=this.props,Ef=gf.delimiter,Rf=gf.isDisabled,Vf=gf.isMulti,Qf=gf.name,ep=this.state.selectValue;if(!(!Qf||Rf))if(Vf)if(Ef){var Jf=ep.map(function(Pp){return df.getOptionValue(Pp)}).join(Ef);return Zg.createElement("input",{name:Qf,type:"hidden",value:Jf})}else{var mp=ep.length>0?ep.map(function(Pp,tg){return Zg.createElement("input",{key:"i-".concat(tg),name:Qf,type:"hidden",value:df.getOptionValue(Pp)})}):Zg.createElement("input",{name:Qf,type:"hidden"});return Zg.createElement("div",null,mp)}else{var Tp=ep[0]?this.getOptionValue(ep[0]):"";return Zg.createElement("input",{name:Qf,type:"hidden",value:Tp})}}},{key:"renderLiveRegion",value:function(){var df=this.commonProps,gf=this.state,Ef=gf.ariaSelection,Rf=gf.focusedOption,Vf=gf.focusedValue,Qf=gf.isFocused,ep=gf.selectValue,Jf=this.getFocusableOptions();return Zg.createElement(MP,Kg({},df,{ariaSelection:Ef,focusedOption:Rf,focusedValue:Vf,isFocused:Qf,selectValue:ep,focusableOptions:Jf}))}},{key:"render",value:function(){var df=this.getComponents(),gf=df.Control,Ef=df.IndicatorsContainer,Rf=df.SelectContainer,Vf=df.ValueContainer,Qf=this.props,ep=Qf.className,Jf=Qf.id,mp=Qf.isDisabled,Tp=Qf.menuIsOpen,Pp=this.state.isFocused,tg=this.commonProps=this.getCommonProps();return Zg.createElement(Rf,Kg({},tg,{className:ep,innerProps:{id:Jf,onKeyDown:this.onKeyDown},isDisabled:mp,isFocused:Pp}),this.renderLiveRegion(),Zg.createElement(gf,Kg({},tg,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:mp,isFocused:Pp,menuIsOpen:Tp}),Zg.createElement(Vf,Kg({},tg,{isDisabled:mp}),this.renderPlaceholderOrValue(),this.renderInput()),Zg.createElement(Ef,Kg({},tg,{isDisabled:mp}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(df,gf){var Ef=gf.prevProps,Rf=gf.clearFocusValueOnUpdate,Vf=gf.inputIsHiddenAfterUpdate,Qf=df.options,ep=df.value,Jf=df.menuIsOpen,mp=df.inputValue,Tp={};if(Ef&&(ep!==Ef.value||Qf!==Ef.options||Jf!==Ef.menuIsOpen||mp!==Ef.inputValue)){var Pp=gT(ep),tg=Jf?iA(df,Pp):[],gg=Rf?oA(gf,Pp):null,fg=aA(gf,tg);Tp={selectValue:Pp,focusedOption:fg,focusedValue:gg,clearFocusValueOnUpdate:!1}}var Tg=Vf!=null&&df!==Ef?{inputIsHidden:Vf,inputIsHiddenAfterUpdate:void 0}:{};return Dy(Dy(Dy({},Tp),Tg),{},{prevProps:df})}}]),uf}(rp);MI.defaultProps=nA;var lA={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},cA=function(go){var xo,uf;return uf=xo=function(df){fx(Ef,df);var gf=iw(Ef);function Ef(){var Rf;nw(this,Ef);for(var Vf=arguments.length,Qf=new Array(Vf),ep=0;ep1?Qf-1:0),Jf=1;Jf{const xo=go.content?zO.find(uf=>uf.value===go.content):null;return kf("div",{className:"r6o-purposedropdown"},kf(hA,{value:xo,onChange:go.onChange,options:zO,isDisabled:!go.editable}))};const dA=go=>kf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1000 940",width:go.width},kf("metadata",null,"IcoFont Icons"),kf("title",null,"simple-down"),kf("glyph",{glyphName:"simple-down",unicode:"",horizAdvX:"1000"}),kf("path",{fill:"currentColor",d:"M200 392.6l300 300 300-300-85.10000000000002-85.10000000000002-214.89999999999998 214.79999999999995-214.89999999999998-214.89999999999998-85.10000000000002 85.20000000000005z"})),fA=go=>kf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"180 150 700 800",width:go.width},kf("metadata",null,"IcoFont Icons"),kf("title",null,"close"),kf("glyph",{glyphName:"close",unicode:"",horizAdvX:"1000"}),kf("path",{fill:"currentColor",d:"M709.8 206.6c-64.39999999999998 65.50000000000003-128.89999999999998 131.20000000000002-194.19999999999993 197.6-8.600000000000023 8.699999999999989-22.400000000000034 8.800000000000011-31 0-65-66-129.70000000000005-131.8-194.5-197.6-8.600000000000023-8.699999999999989-22.400000000000034-8.599999999999994-30.900000000000034 0.09999999999999432-15.699999999999989 16.200000000000017-31.099999999999994 32.30000000000001-47.099999999999994 48.80000000000001-8.5 8.800000000000011-8.299999999999983 23 0.20000000000001705 31.69999999999999 63.099999999999966 64.19999999999999 127.89999999999998 130.10000000000002 193.59999999999997 197 8.600000000000023 8.699999999999989 8.5 22.80000000000001 0 31.599999999999966-65.19999999999999 66.40000000000009-130.2 132.5-194.7 198.10000000000002-8.5 8.700000000000045-8.5 22.800000000000068 0.20000000000001705 31.399999999999977l47.79999999999998 47.90000000000009c8.600000000000023 8.599999999999909 22.600000000000023 8.599999999999909 31.100000000000023-0.10000000000002274l194.2-197.30000000000007c8.600000000000023-8.699999999999932 22.399999999999977-8.699999999999932 31 0 64.70000000000005 65.80000000000007 129.20000000000005 131.4000000000001 194.20000000000005 197.5 8.599999999999909 8.700000000000045 22.5 8.800000000000068 31 0.10000000000002274 16-16.199999999999932 31.699999999999932-32.19999999999993 47.59999999999991-48.299999999999955 8.600000000000023-8.700000000000045 8.600000000000023-22.899999999999977 0.10000000000002274-31.600000000000023-63.799999999999955-65-128.5-130.89999999999998-194.19999999999993-197.79999999999995-8.600000000000023-8.700000000000045-8.600000000000023-22.900000000000034 0-31.600000000000023 65.19999999999993-66.40000000000003 130.0999999999999-132.5 194.5-198.20000000000005 8.599999999999909-8.699999999999989 8.5-22.799999999999955-0.10000000000002274-31.49999999999997l-47.80000000000007-48.099999999999994c-8.5-8.5-22.399999999999977-8.400000000000006-31 0.29999999999998295z"})),pA=go=>kf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:go.width},kf("path",{fill:"currentColor",d:"M268 416h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12zM432 80h-82.41l-34-56.7A48 48 0 0 0 274.41 0H173.59a48 48 0 0 0-41.16 23.3L98.41 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16v336a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM171.84 50.91A6 6 0 0 1 177 48h94a6 6 0 0 1 5.15 2.91L293.61 80H154.39zM368 464H80V128h288zm-212-48h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12z"}));var gA=go=>{const[xo,uf]=Rp(!1),[df,gf]=Rp(!1),Ef=mp=>{uf(!0),gf(!1)},Rf=mp=>{go.onDelete(go.body),gf(!1)},Vf=mp=>go.onUpdate(go.body,uo(yn({},go.body),{value:mp.target.value})),Qf=mp=>go.onUpdate(go.body,uo(yn({},go.body),{purpose:mp.value})),ep=go.body.modified||go.body.created,Jf=go.body.creator&&kf("div",{className:"r6o-lastmodified"},kf("span",{className:"r6o-lastmodified-by"},go.body.creator.name||go.body.creator.id),go.body.created&&kf("span",{className:"r6o-lastmodified-at"},kf(q$,{datetime:go.env.toClientTime(ep),locale:ay.locale()})));return go.readOnly?kf("div",{className:"r6o-widget comment"},kf("div",{className:"r6o-readonly-comment"},go.body.value),Jf):kf("div",{className:xo?"r6o-widget comment editable":"r6o-widget comment"},kf(tx,{editable:xo,content:go.body.value,onChange:Vf,onSaveAndClose:go.onSaveAndClose}),!xo&&Jf,go.purposeSelector&&kf(DI,{editable:xo,content:go.body.purpose,onChange:Qf,onSaveAndClose:go.onSaveAndClose}),kf("div",{className:df?"r6o-icon r6o-arrow-down r6o-menu-open":"r6o-icon r6o-arrow-down",onClick:()=>gf(!df)},kf(dA,{width:12})),df&&kf(h2,{onEdit:Ef,onDelete:Rf,onClickOutside:()=>gf(!1)}))};const mA=zO.map(go=>go.value),LI=(go,xo)=>{const uf=xo?mA.indexOf(go.purpose)>-1:go.purpose=="commenting"||go.purpose=="replying";return go.type==="TextualBody"&&(!go.hasOwnProperty("purpose")||uf)},FI=(go,xo)=>{var uf,df;if(xo.editable===!0)return!1;if(xo.editable===!1)return!0;if(xo.editable==="MINE_ONLY"){const gf=(uf=go.creator)==null?void 0:uf.id;return((df=xo.env.user)==null?void 0:df.id)!==gf}return xo.readOnly},vA=(go,xo)=>go||{type:"TextualBody",value:"",purpose:xo?"replying":"commenting",draft:!0},BI=go=>{const xo=go.annotation?go.annotation.bodies.filter(Rf=>LI(Rf,go.purposeSelector)):[],uf=vA(xo.find(Rf=>Rf.draft==!0),xo.length>1),df=xo.filter(Rf=>Rf!=uf),gf=Rf=>{const Vf=uf.value,Qf=Rf.target.value;Vf.length===0&&Qf.length>0?go.onAppendBody(uo(yn({},uf),{value:Qf})):Vf.length>0&&Qf.length===0?go.onRemoveBody(uf):go.onUpdateBody(uf,uo(yn({},uf),{value:Qf}))},Ef=Rf=>go.onUpdateBody(uf,uo(yn({},uf),{purpose:Rf.value}));return kf(Gf,null,df.map((Rf,Vf)=>kf(gA,{key:Vf,env:go.env,purposeSelector:go.purposeSelector,readOnly:FI(Rf,go),body:Rf,onUpdate:go.onUpdateBody,onDelete:go.onRemoveBody,onSaveAndClose:go.onSaveAndClose})),!go.readOnly&&go.annotation&&kf("div",{className:"r6o-widget comment editable"},kf(tx,{focus:go.focus,content:uf.value,editable:!0,placeholder:df.length>0?ay.t("Add a reply..."):ay.t("Add a comment..."),onChange:gf,onSaveAndClose:()=>go.onSaveAndClose()}),go.purposeSelector&&uf.value.length>0&&kf(DI,{editable:!0,content:uf.purpose,onChange:Ef,onSaveAndClose:()=>go.onSaveAndClose()})))};BI.disableDelete=(go,xo)=>go.bodies.filter(uf=>LI(uf,xo.purposeSelector)).some(uf=>FI(uf,xo));var jI=BI;function zI(go,xo){go.prototype=Object.create(xo.prototype),go.prototype.constructor=go,_2(go,xo)}function yA(go,xo){return go.classList?!!xo&&go.classList.contains(xo):(" "+(go.className.baseVal||go.className)+" ").indexOf(" "+xo+" ")!==-1}function bA(go,xo){go.classList?go.classList.add(xo):yA(go,xo)||(typeof go.className=="string"?go.className=go.className+" "+xo:go.setAttribute("class",(go.className&&go.className.baseVal||"")+" "+xo))}function HI(go,xo){return go.replace(new RegExp("(^|\\s)"+xo+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function $A(go,xo){go.classList?go.classList.remove(xo):typeof go.className=="string"?go.className=HI(go.className,xo):go.setAttribute("class",HI(go.className&&go.className.baseVal||"",xo))}var UI={disabled:!1},VI=Zg.createContext(null),wT="unmounted",T2="exited",k2="entering",zE="entered",HO="exiting",sw=function(go){zI(xo,go);function xo(df,gf){var Ef;Ef=go.call(this,df,gf)||this;var Rf=gf,Vf=Rf&&!Rf.isMounting?df.enter:df.appear,Qf;return Ef.appearStatus=null,df.in?Vf?(Qf=T2,Ef.appearStatus=k2):Qf=zE:df.unmountOnExit||df.mountOnEnter?Qf=wT:Qf=T2,Ef.state={status:Qf},Ef.nextCallback=null,Ef}xo.getDerivedStateFromProps=function(df,gf){var Ef=df.in;return Ef&&gf.status===wT?{status:T2}:null};var uf=xo.prototype;return uf.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},uf.componentDidUpdate=function(df){var gf=null;if(df!==this.props){var Ef=this.state.status;this.props.in?Ef!==k2&&Ef!==zE&&(gf=k2):(Ef===k2||Ef===zE)&&(gf=HO)}this.updateStatus(!1,gf)},uf.componentWillUnmount=function(){this.cancelNextCallback()},uf.getTimeouts=function(){var df=this.props.timeout,gf,Ef,Rf;return gf=Ef=Rf=df,df!=null&&typeof df!="number"&&(gf=df.exit,Ef=df.enter,Rf=df.appear!==void 0?df.appear:Ef),{exit:gf,enter:Ef,appear:Rf}},uf.updateStatus=function(df,gf){df===void 0&&(df=!1),gf!==null?(this.cancelNextCallback(),gf===k2?this.performEnter(df):this.performExit()):this.props.unmountOnExit&&this.state.status===T2&&this.setState({status:wT})},uf.performEnter=function(df){var gf=this,Ef=this.props.enter,Rf=this.context?this.context.isMounting:df,Vf=this.props.nodeRef?[Rf]:[Zg.findDOMNode(this),Rf],Qf=Vf[0],ep=Vf[1],Jf=this.getTimeouts(),mp=Rf?Jf.appear:Jf.enter;if(!df&&!Ef||UI.disabled){this.safeSetState({status:zE},function(){gf.props.onEntered(Qf)});return}this.props.onEnter(Qf,ep),this.safeSetState({status:k2},function(){gf.props.onEntering(Qf,ep),gf.onTransitionEnd(mp,function(){gf.safeSetState({status:zE},function(){gf.props.onEntered(Qf,ep)})})})},uf.performExit=function(){var df=this,gf=this.props.exit,Ef=this.getTimeouts(),Rf=this.props.nodeRef?void 0:Zg.findDOMNode(this);if(!gf||UI.disabled){this.safeSetState({status:T2},function(){df.props.onExited(Rf)});return}this.props.onExit(Rf),this.safeSetState({status:HO},function(){df.props.onExiting(Rf),df.onTransitionEnd(Ef.exit,function(){df.safeSetState({status:T2},function(){df.props.onExited(Rf)})})})},uf.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},uf.safeSetState=function(df,gf){gf=this.setNextCallback(gf),this.setState(df,gf)},uf.setNextCallback=function(df){var gf=this,Ef=!0;return this.nextCallback=function(Rf){Ef&&(Ef=!1,gf.nextCallback=null,df(Rf))},this.nextCallback.cancel=function(){Ef=!1},this.nextCallback},uf.onTransitionEnd=function(df,gf){this.setNextCallback(gf);var Ef=this.props.nodeRef?this.props.nodeRef.current:Zg.findDOMNode(this),Rf=df==null&&!this.props.addEndListener;if(!Ef||Rf){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var Vf=this.props.nodeRef?[this.nextCallback]:[Ef,this.nextCallback],Qf=Vf[0],ep=Vf[1];this.props.addEndListener(Qf,ep)}df!=null&&setTimeout(this.nextCallback,df)},uf.render=function(){var df=this.state.status;if(df===wT)return null;var gf=this.props,Ef=gf.children;gf.in,gf.mountOnEnter,gf.unmountOnExit,gf.appear,gf.enter,gf.exit,gf.timeout,gf.addEndListener,gf.onEnter,gf.onEntering,gf.onEntered,gf.onExit,gf.onExiting,gf.onExited,gf.nodeRef;var Rf=OE(gf,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Zg.createElement(VI.Provider,{value:null},typeof Ef=="function"?Ef(df,Rf):Zg.cloneElement(Zg.Children.only(Ef),Rf))},xo}(Zg.Component);sw.contextType=VI,sw.propTypes={};function HE(){}sw.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:HE,onEntering:HE,onEntered:HE,onExit:HE,onExiting:HE,onExited:HE},sw.UNMOUNTED=wT,sw.EXITED=T2,sw.ENTERING=k2,sw.ENTERED=zE,sw.EXITING=HO;var _A=sw,wA=function(go,xo){return go&&xo&&xo.split(" ").forEach(function(uf){return bA(go,uf)})},UO=function(go,xo){return go&&xo&&xo.split(" ").forEach(function(uf){return $A(go,uf)})},VO=function(go){zI(xo,go);function xo(){for(var df,gf=arguments.length,Ef=new Array(gf),Rf=0;Rfxo.filter(uf=>(uf.label?uf.label:uf).toLowerCase().startsWith(go.toLowerCase())),SA=(go,xo)=>xo(go);var TA=go=>{const xo=Kf(),[uf,df]=Rp(go.initialValue||""),[gf,Ef]=Rp([]),[Rf,Vf]=Rp(null);Op(()=>{go.focus&&xo.current.querySelector("input").focus({preventScroll:!0})},[]),Op(()=>{go.onChange&&go.onChange(uf)},[uf]);const Qf=Jf=>{if(typeof go.vocabulary=="function"){const mp=SA(Jf,go.vocabulary);mp.then?mp.then(Ef):Ef(mp)}else{const mp=EA(Jf,go.vocabulary);Ef(mp)}},ep=()=>{if(Rf!==null)go.onSubmit(gf[Rf]);else{const Jf=uf.trim();if(Jf){const mp=Array.isArray(go.vocabulary)?go.vocabulary.find(Tp=>(Tp.label||Tp).toLowerCase()===Jf.toLowerCase()):null;mp?go.onSubmit(mp):go.onSubmit(Jf)}}df(""),Ef([]),Vf(null)};return kf("div",{ref:xo,className:"r6o-autocomplete"},kf("div",null,kf("input",{onKeyDown:Jf=>{if(Jf.which===13)ep();else if(Jf.which===27)go.onCancel&&go.onCancel();else if(gf.length>0){if(Jf.which===38)if(Rf===null)Vf(0);else{const mp=Math.max(0,Rf-1);Vf(mp)}else if(Jf.which===40)if(Rf===null)Vf(0);else{const mp=Math.min(gf.length-1,Rf+1);Vf(mp)}}else Jf.which===40&&Array.isArray(go.vocabulary)&&Ef(go.vocabulary)},onChange:Jf=>{const{value:mp}=Jf.target;df(mp),Vf(null),mp?Qf(mp):Ef([])},value:uf,placeholder:go.placeholder})),kf("ul",null,gf.length>0&&gf.map((Jf,mp)=>kf("li",{key:`${Jf.label?Jf.label:Jf}${mp}`,onClick:ep,onMouseEnter:()=>Vf(mp),style:Rf===mp?{backgroundColor:"#bde4ff"}:{}},Jf.label?Jf.label:Jf))))};const kA=go=>go||{type:"TextualBody",value:"",purpose:"tagging",draft:!0};var GI=go=>{const xo=go.annotation?go.annotation.bodies.filter(Jf=>Jf.type==="TextualBody"&&Jf.purpose==="tagging"):[],uf=kA(xo.slice().reverse().find(Jf=>Jf.draft)),df=xo.filter(Jf=>Jf!=uf),[gf,Ef]=Rp(!1),Rf=Jf=>mp=>{Ef(gf===Jf?!1:Jf)},Vf=Jf=>{const mp=uf.value.trim(),Tp=Jf.trim();mp.length===0&&Tp.length>0?go.onAppendBody(uo(yn({},uf),{value:Tp})):mp.length>0&&Tp.length===0?go.onRemoveBody(uf):go.onUpdateBody(uf,uo(yn({},uf),{value:Tp}))},Qf=Jf=>mp=>{mp.stopPropagation(),go.onRemoveBody(Jf)},ep=Jf=>{const mp=Jf.label?uo(yn({},uf),{value:Jf.label,source:Jf.uri}):uo(yn({},uf),{value:Jf}),Tp=po(mp,["draft"]);uf.value.trim().length===0?go.onAppendBody(Tp):go.onUpdateBody(uf,Tp)};return kf("div",{className:"r6o-widget r6o-tag"},df.length>0&&kf("ul",{className:"r6o-taglist"},df.map(Jf=>kf("li",{key:Jf.value,onClick:Rf(Jf.value)},kf("span",{className:"r6o-label"},Jf.value),!go.readOnly&&kf(xA,{in:gf===Jf.value,timeout:200,classNames:"r6o-delete"},kf("span",{className:"r6o-delete-wrapper",onClick:Qf(Jf)},kf("span",{className:"r6o-delete"},kf(fA,{width:12}))))))),!go.readOnly&&kf(TA,{focus:go.focus,placeholder:ay.t("Add tag..."),vocabulary:go.vocabulary||[],onChange:Vf,onSubmit:ep}))};class WI extends rp{constructor(xo){super(xo),this.element=Zg.createRef()}renderWidget(xo){const uf=this.props.widget(uo(yn({annotation:xo.annotation,readOnly:xo.readOnly},xo.config),{onAppendBody:(df,gf)=>xo.onAppendBody(df,gf),onUpdateBody:(df,gf,Ef)=>xo.onUpdateBody(df,gf,Ef),onUpsertBody:(df,gf,Ef)=>xo.onUpsertBody(df,gf,Ef),onRemoveBody:(df,gf)=>xo.onRemoveBody(df,gf),onBatchModify:(df,gf)=>xo.onBatchModify(df,gf),onSetProperty:(df,gf)=>xo.onSetProperty(df,gf),onSaveAndClose:()=>xo.onSaveAndClose()}));for(;this.element.current.firstChild;)this.element.current.removeChild(this.element.current.lastChild);this.element.current.appendChild(uf)}componentDidMount(){this.renderWidget(this.props)}componentWillReceiveProps(xo){this.element.current&&this.props.annotation!==xo.annotation&&this.renderWidget(xo)}render(){return kf("div",{ref:this.element,className:"widget"})}}window.React=Zg,window.ReactDOM=Zg;const CA={COMMENT:jI,TAG:GI},OA=[kf(jI,null),kf(GI,null)],IA=go=>{const xo=df=>{var gf;return typeof df=="function"&&!!((gf=df.prototype)!=null&&gf.isReactComponent)},uf=df=>typeof df=="function"&&(String(df).match(/return .+\(['|"].+['|"],\s*\{/g)||String(df).match(/return .+preact_compat/)||String(df).match(/return .+\.createElement/g));return xo(go)||uf(go)},PA=go=>{const xo=(uf,df,gf)=>{if(typeof uf=="string"||uf instanceof String)return Zg.createElement(CA[uf],df);if((gf==null?void 0:gf.toLowerCase())==="react")return Zg.createElement(uf,df);if((gf==null?void 0:gf.toLowerCase())==="plainjs")return kf(WI,{widget:uf,config:df});if(IA(uf))return Zg.createElement(uf,df);if(typeof uf=="function"||uf instanceof Function)return kf(WI,{widget:uf,config:df});throw`${uf} is not a valid plugin`};if(go.widget){const uf=go,{widget:df,force:gf}=uf,Ef=po(uf,["widget","force"]);return xo(df,Ef,gf)}else return xo(go)},qI=14;var YI=(go,xo,uf,df)=>{const gf=go.getBoundingClientRect();xo.className="r6o-editor r6o-arrow-top r6o-arrow-left";const{left:Ef,top:Rf,right:Vf,bottom:Qf}=uf.getBoundingClientRect();if(xo.style.top=`${Qf-gf.top+qI}px`,xo.style.left=`${Ef-gf.left}px`,df){const ep=xo.children[1].getBoundingClientRect();if(ep.right>window.innerWidth&&(xo.classList.remove("r6o-arrow-left"),xo.classList.add("r6o-arrow-right"),xo.style.left=`${Vf-ep.width-gf.left}px`),ep.bottom>window.innerHeight){xo.classList.remove("r6o-arrow-top"),xo.classList.add("r6o-arrow-bottom");const mp=xo.children[1].getBoundingClientRect().height;xo.style.top=`${Rf-gf.top-mp-qI}px`}const Jf=xo.children[1].getBoundingClientRect();if(Jf.top<0){xo.classList.add("pushed","down"),xo.style.top=`${-gf.top}px`;const mp=Qf-gf.top;Jf.height-gf.top>mp&&xo.classList.remove("r6o-arrow-bottom")}Jf.left<0&&(xo.classList.add("pushed","right"),xo.style.left=`${-gf.left}px`),requestAnimationFrame(()=>xo.style.opacity=1)}};const KI=go=>{const{top:xo,left:uf,width:df,height:gf}=go.getBoundingClientRect();return`${xo}, ${uf}, ${df}, ${gf}`};class AA extends rp{constructor(xo){super(xo),mo(this,"initResizeObserver",()=>{const uf=this.props.autoPosition===void 0?!0:this.props.autoPosition;if(window!=null&&window.ResizeObserver){const df=new ResizeObserver(()=>{this.state.dragged||YI(this.props.wrapperEl,this.element.current,this.props.selectedElement,uf)});return df.observe(this.props.wrapperEl),()=>df.disconnect()}else this.state.dragged||YI(this.props.wrapperEl,this.element.current,this.props.selectedElement,uf)}),mo(this,"creationMeta",uf=>{const df={},{user:gf}=this.props.env;return gf&&(df.creator={},gf.id&&(df.creator.id=gf.id),gf.displayName&&(df.creator.name=gf.displayName),df[uf.created?"modified":"created"]=this.props.env.getCurrentTimeAdjusted()),df}),mo(this,"getCurrentAnnotation",()=>this.state.currentAnnotation.clone()),mo(this,"updateCurrentAnnotation",(uf,df)=>this.setState({currentAnnotation:this.state.currentAnnotation.clone(uf)},()=>{df&&this.onOk()})),mo(this,"onAppendBody",(uf,df)=>this.updateCurrentAnnotation({body:[...this.state.currentAnnotation.bodies,yn(yn({},uf),this.creationMeta(uf))]},df)),mo(this,"onUpdateBody",(uf,df,gf)=>this.updateCurrentAnnotation({body:this.state.currentAnnotation.bodies.map(Ef=>Ef===uf?yn(yn({},df),this.creationMeta(df)):Ef)},gf)),mo(this,"onRemoveBody",(uf,df)=>this.updateCurrentAnnotation({body:this.state.currentAnnotation.bodies.filter(gf=>gf!==uf)},df)),mo(this,"onUpsertBody",(uf,df,gf)=>{if(uf==null&&df!=null)this.onAppendBody(df,gf);else if(uf!=null&&df!=null)this.onUpdateBody(uf,df,gf);else if(uf!=null&&df==null){const Ef=this.state.currentAnnotation.bodies.find(Rf=>Rf.purpose===uf.purpose);Ef?this.onUpdateBody(Ef,uf,gf):this.onAppendBody(uf,gf)}}),mo(this,"onBatchModify",(uf,df)=>{const gf=uf.filter(ep=>ep.action==="upsert"&&ep.body).map(ep=>({previous:this.state.currentAnnotation.bodies.find(Jf=>Jf.purpose===ep.body.purpose),updated:yn(yn({},ep.body),this.creationMeta(ep.body))})),Ef=uf.filter(ep=>ep.action==="remove").map(ep=>ep.body),Rf=[...uf.filter(ep=>ep.action==="append"||ep.action==="upsert"&&ep.updated&&!ep.previous).map(ep=>yn(yn({},ep.body),this.creationMeta(ep.body))),...gf.filter(ep=>!ep.previous).map(ep=>ep.updated)],Vf=[...uf.filter(ep=>ep.action==="update"||ep.action==="upsert"&&ep.updated&&ep.previous).map(ep=>({previous:ep.previous,updated:yn(yn({},ep.updated),this.creationMeta(ep.updated))})),...gf.filter(ep=>ep.previous)],Qf=[...this.state.currentAnnotation.bodies.filter(ep=>!Ef.includes(ep)).map(ep=>{const Jf=Vf.find(mp=>mp.previous===ep);return Jf?Jf.updated:ep}),...Rf];this.updateCurrentAnnotation({body:Qf},df)}),mo(this,"onSetProperty",(uf,df)=>{if(["@context","id","type","body","target"].includes(uf))throw new Exception(`Cannot set ${uf} - not allowed`);if(df)this.updateCurrentAnnotation({[uf]:df});else{const gf=this.currentAnnotation.clone();delete gf[uf],this.setState({currentAnnotation:gf})}}),mo(this,"onCancel",()=>this.props.onCancel(this.props.annotation)),mo(this,"onOk",()=>{const uf=gf=>gf.clone({body:gf.bodies.map(Ef=>{var Rf=Ef,Vf=po(Rf,["draft"]);return Vf})}),{currentAnnotation:df}=this.state;df.bodies.length===0&&!this.props.allowEmpty?df.isSelection?this.onCancel():this.props.onAnnotationDeleted(this.props.annotation):df.isSelection?this.props.onAnnotationCreated(uf(df).toAnnotation()):this.props.onAnnotationUpdated(uf(df),this.props.annotation)}),mo(this,"onDelete",()=>this.props.onAnnotationDeleted(this.props.annotation)),this.element=Zg.createRef(),this.state={currentAnnotation:xo.annotation,dragged:!1,selectionBounds:KI(xo.selectedElement)}}componentWillReceiveProps(xo){var uf;const{selectionBounds:df}=this.state,gf=KI(xo.selectedElement);(uf=this.props.annotation)!=null&&uf.isEqual(xo.annotation)?this.setState({selectionBounds:gf}):this.setState({currentAnnotation:xo.annotation,selectionBounds:gf}),this.props.modifiedTarget!=xo.modifiedTarget&&this.state.currentAnnotation&&this.updateCurrentAnnotation({target:this.props.modifiedTarget}),df!=gf&&this.element.current&&(this.removeObserver&&this.removeObserver(),this.removeObserver=this.initResizeObserver())}componentDidMount(){this.removeObserver=this.initResizeObserver(),new MutationObserver(()=>{this.element.current&&(this.removeObserver&&this.removeObserver(),this.removeObserver=this.initResizeObserver())}).observe(this.element.current,{childList:!0,subtree:!0})}componentWillUnmount(){this.removeObserver&&this.removeObserver()}render(){const{currentAnnotation:xo}=this.state,uf=this.props.widgets?this.props.widgets.map(PA):OA,df=Ef=>Ef.type.disableDelete?Ef.type.disableDelete(xo,uo(yn({},Ef.props),{readOnly:this.props.readOnly,env:this.props.env})):!1,gf=xo&&(xo.bodies.length>0||this.props.allowEmpty)&&!this.props.readOnly&&!xo.isSelection&&!uf.some(df);return kf(Ew,{disabled:!this.props.detachable,handle:".r6o-draggable",cancel:".r6o-btn, .r6o-btn *",onDrag:()=>this.setState({dragged:!0})},kf("div",{ref:this.element,className:this.state.dragged?"r6o-editor dragged":"r6o-editor"},kf("div",{className:"r6o-arrow"}),kf("div",{className:"r6o-editor-inner"},uf.map((Ef,Rf)=>Zg.cloneElement(Ef,{key:`${Rf}`,focus:Rf===0,annotation:xo,readOnly:this.props.readOnly,env:this.props.env,onAppendBody:this.onAppendBody,onUpdateBody:this.onUpdateBody,onRemoveBody:this.onRemoveBody,onUpsertBody:this.onUpsertBody,onBatchModify:this.onBatchModify,onSetProperty:this.onSetProperty,onSaveAndClose:this.onOk})),this.props.readOnly?kf("div",{className:"r6o-footer"},kf("button",{className:"r6o-btn",onClick:this.onCancel},ay.t("Close"))):kf("div",{className:this.props.detachable?"r6o-footer r6o-draggable":"r6o-footer"},gf&&kf("button",{className:"r6o-btn left delete-annotation",title:ay.t("Delete"),onClick:this.onDelete},kf(pA,{width:12})),kf("button",{className:"r6o-btn outline",onClick:this.onCancel},ay.t("Cancel")),kf("button",{className:"r6o-btn ",onClick:this.onOk},ay.t("Ok"))))))}}var xC,RA=new Uint8Array(16);function NA(){if(!xC&&(xC=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!xC))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xC(RA)}var MA=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function DA(go){return typeof go=="string"&&MA.test(go)}for(var j0=[],GO=0;GO<256;++GO)j0.push((GO+256).toString(16).substr(1));function LA(go){var xo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,uf=(j0[go[xo+0]]+j0[go[xo+1]]+j0[go[xo+2]]+j0[go[xo+3]]+"-"+j0[go[xo+4]]+j0[go[xo+5]]+"-"+j0[go[xo+6]]+j0[go[xo+7]]+"-"+j0[go[xo+8]]+j0[go[xo+9]]+"-"+j0[go[xo+10]]+j0[go[xo+11]]+j0[go[xo+12]]+j0[go[xo+13]]+j0[go[xo+14]]+j0[go[xo+15]]).toLowerCase();if(!DA(uf))throw TypeError("Stringified UUID is invalid");return uf}function XI(go,xo,uf){go=go||{};var df=go.random||(go.rng||NA)();if(df[6]=df[6]&15|64,df[8]=df[8]&63|128,xo){uf=uf||0;for(var gf=0;gf<16;++gf)xo[uf+gf]=df[gf];return xo}return LA(df)}var FA=function go(xo,uf){if(xo===uf)return!0;if(xo&&uf&&typeof xo=="object"&&typeof uf=="object"){if(xo.constructor!==uf.constructor)return!1;var df,gf,Ef;if(Array.isArray(xo)){if(df=xo.length,df!=uf.length)return!1;for(gf=df;gf--!=0;)if(!go(xo[gf],uf[gf]))return!1;return!0}if(xo.constructor===RegExp)return xo.source===uf.source&&xo.flags===uf.flags;if(xo.valueOf!==Object.prototype.valueOf)return xo.valueOf()===uf.valueOf();if(xo.toString!==Object.prototype.toString)return xo.toString()===uf.toString();if(Ef=Object.keys(xo),df=Ef.length,df!==Object.keys(uf).length)return!1;for(gf=df;gf--!=0;)if(!Object.prototype.hasOwnProperty.call(uf,Ef[gf]))return!1;for(gf=df;gf--!=0;){var Rf=Ef[gf];if(!go(xo[Rf],uf[Rf]))return!1}return!0}return xo!==xo&&uf!==uf},ZI=FA;const WO=class{constructor(go,xo){mo(this,"clone",(uf,df)=>new WO(yn(yn({},this.underlying),uf),yn(yn({},this.opts),df))),mo(this,"selector",uf=>{const{target:df}=this.underlying;if(df.selector)return(Array.isArray(df.selector)?df.selector:[df.selector]).find(gf=>gf.type===uf)}),this.underlying=go,this.opts=xo}isEqual(go){return(go==null?void 0:go.type)!=="Annotation"?!1:this.underlying===go.underlying?!0:!this.underlying.id||!go.underlying.id?!1:ZI(this.underlying,go.underlying)}get readOnly(){var go;return(go=this.opts)==null?void 0:go.readOnly}get id(){return this.underlying.id}get type(){return this.underlying.type}get motivation(){return this.underlying.motivation}get body(){return this.underlying.body}get target(){return this.underlying.target}get bodies(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]}set bodies(go){this.underlying.body=go}get targets(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}get quote(){return this.selector("TextQuoteSelector").exact}get start(){return this.selector("TextPositionSelector").start}get end(){return this.selector("TextPositionSelector").end}};let C2=WO;mo(C2,"create",go=>{const xo={"@context":"http://www.w3.org/ns/anno.jsonld",type:"Annotation",id:`#${XI()}`,body:[]};return new WO(yn(yn({},xo),go))});class xT{constructor(xo,uf){mo(this,"clone",df=>{const gf=new xT;return gf.underlying=JSON.parse(JSON.stringify(this.underlying)),df&&(gf.underlying=yn(yn({},gf.underlying),df)),gf}),mo(this,"selector",df=>{const{target:gf}=this.underlying;if(gf.selector)return(Array.isArray(gf.selector)?gf.selector:[gf.selector]).find(Ef=>Ef.type===df)}),mo(this,"toAnnotation",()=>{const df=Object.assign({},this.underlying,{"@context":"http://www.w3.org/ns/anno.jsonld",type:"Annotation",id:`#${XI()}`});return new C2(df)}),this.underlying={type:"Selection",body:uf||[],target:xo}}get type(){return this.underlying.type}get body(){return this.underlying.body}get target(){return this.underlying.target}get targets(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}isEqual(xo){return xo?ZI(this.underlying,xo.underlying):!1}get bodies(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]}get quote(){return this.selector("TextQuoteSelector").exact}get isSelection(){return!0}}let qO=0;var BA=()=>({setServerTime:go=>{const xo=Date.now();qO=go-xo},getCurrentTimeAdjusted:()=>new Date(Date.now()+qO).toISOString(),toClientTime:go=>Date.parse(go)-qO});const jA=(go,xo)=>{if(go){const uf=go==="auto"?window.navigator.userLanguage||window.navigator.language:go;try{ay.init(uf.split("-")[0].toLowerCase(),xo)}catch{console.warn(`Unsupported locale '${uf}'. Falling back to default en.`)}}else ay.init(null,xo)},wv="http://www.w3.org/2000/svg",YO=go=>{const xo=go.getAttribute("class");return xo?new Set(xo.split(" ")):new Set},yx=(go,xo)=>{const uf=YO(go);uf.add(xo),go.setAttribute("class",Array.from(uf).join(" "))},zA=(go,xo)=>{const uf=YO(go);uf.delete(xo),uf.size===0?go.removeAttribute("class"):go.setAttribute("class",Array.from(uf).join(" "))},KO=(go,xo)=>YO(go).has(xo),O2=(go,xo)=>{const uf=go.selector("FragmentSelector");if(uf!=null&&uf.conformsTo.startsWith("http://www.w3.org/TR/media-frags")){const{value:df}=uf,gf=df.includes(":")?df.substring(df.indexOf("=")+1,df.indexOf(":")):"pixel",Ef=df.includes(":")?df.substring(df.indexOf(":")+1):df.substring(df.indexOf("=")+1);let[Rf,Vf,Qf,ep]=Ef.split(",").map(parseFloat);return gf.toLowerCase()==="percent"&&(Rf=Rf*xo.naturalWidth/100,Vf=Vf*xo.naturalHeight/100,Qf=Qf*xo.naturalWidth/100,ep=ep*xo.naturalHeight/100),{x:Rf,y:Vf,w:Qf,h:ep}}},HA=(go,xo,uf,df,gf)=>({source:gf==null?void 0:gf.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:`xywh=pixel:${go},${xo},${uf},${df}`}}),VA=(go,xo,uf,df,gf)=>{const Ef=go/gf.naturalWidth*100,Rf=xo/gf.naturalHeight*100,Vf=uf/gf.naturalWidth*100,Qf=df/gf.naturalHeight*100;return{source:gf.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:`xywh=percent:${Ef},${Rf},${Vf},${Qf}`}}},ET=(go,xo,uf,df,gf,Ef)=>(Ef==null?void 0:Ef.toLowerCase())==="percent"?VA(go,xo,uf,df,gf):HA(go,xo,uf,df,gf),EC=(go,xo,uf,df,gf)=>{go.setAttribute("x",xo),go.setAttribute("y",uf),go.setAttribute("width",df),go.setAttribute("height",gf)},SC=(go,xo,uf)=>{go.setAttribute("cx",xo),go.setAttribute("cy",uf),go.setAttribute("r",7)},JI=(go,xo,uf,df,gf)=>{const Ef=document.createElementNS(wv,"path");Ef.setAttribute("fill-rule","evenodd");const{naturalWidth:Rf,naturalHeight:Vf}=go;return Ef.setAttribute("d",`M0 0 h${Rf} v${Vf} h-${Rf} z M${xo} ${uf} h${df} v${gf} h-${df} z`),Ef},XO=(go,xo,uf,df,gf,Ef)=>{const{naturalWidth:Rf,naturalHeight:Vf}=xo;go.setAttribute("d",`M0 0 h${Rf} v${Vf} h-${Rf} z M${uf} ${df} h${gf} v${Ef} h-${gf} z`)},ZO=(go,xo,uf,df)=>{const{x:gf,y:Ef,w:Rf,h:Vf}=go.type==="Annotation"||go.type==="Selection"?O2(go,xo):{x:go,y:xo,w:uf,h:df},Qf=document.createElementNS(wv,"g");if(Rf===0&&Vf===0){yx(Qf,"a9s-point"),yx(Qf,"a9s-non-scaling"),Qf.setAttribute("transform-origin",`${gf} ${Ef}`);const ep=document.createElementNS(wv,"circle"),Jf=document.createElementNS(wv,"circle");Jf.setAttribute("class","a9s-inner"),SC(Jf,gf,Ef),ep.setAttribute("class","a9s-outer"),SC(ep,gf,Ef),Qf.appendChild(ep),Qf.appendChild(Jf)}else{const ep=document.createElementNS(wv,"rect"),Jf=document.createElementNS(wv,"rect");Jf.setAttribute("class","a9s-inner"),EC(Jf,gf,Ef,Rf,Vf),ep.setAttribute("class","a9s-outer"),EC(ep,gf,Ef,Rf,Vf),Qf.appendChild(ep),Qf.appendChild(Jf)}return Qf},QI=go=>{const xo=go.querySelector(".a9s-outer");if(xo.nodeName==="rect"){const uf=parseFloat(xo.getAttribute("x")),df=parseFloat(xo.getAttribute("y")),gf=parseFloat(xo.getAttribute("width")),Ef=parseFloat(xo.getAttribute("height"));return{x:uf,y:df,w:gf,h:Ef}}else{const uf=parseFloat(xo.getAttribute("cx")),df=parseFloat(xo.getAttribute("cy"));return{x:uf,y:df,w:0,h:0}}},JO=(go,xo,uf,df,gf)=>{const Ef=go.querySelector(".a9s-inner"),Rf=go.querySelector(".a9s-outer");Rf.nodeName==="rect"?(EC(Ef,xo,uf,df,gf),EC(Rf,xo,uf,df,gf)):(SC(Ef,xo,uf),SC(Rf,xo,uf))},GA=(go,xo)=>{const{w:uf,h:df}=O2(go,xo);return uf*df};class WA{constructor(xo,uf,df,gf,Ef){mo(this,"dragTo",(Rf,Vf)=>{this.group.style.display=null,this.opposite=[Rf,Vf];const{x:Qf,y:ep,w:Jf,h:mp}=this.bbox;XO(this.mask,this.env.image,Qf,ep,Jf,mp),JO(this.rect,Qf,ep,Jf,mp)}),mo(this,"getBoundingClientRect",()=>this.rect.getBoundingClientRect()),mo(this,"toSelection",()=>{const{x:Rf,y:Vf,w:Qf,h:ep}=this.bbox;return new xT(ET(Rf,Vf,Qf,ep,this.env.image,this.config.fragmentUnit))}),mo(this,"destroy",()=>{this.group.parentNode.removeChild(this.group),this.mask=null,this.rect=null,this.group=null}),this.anchor=[xo,uf],this.opposite=[xo,uf],this.config=gf,this.env=Ef,this.group=document.createElementNS(wv,"g"),this.mask=JI(Ef.image,xo,uf,2,2),this.mask.setAttribute("class","a9s-selection-mask"),this.rect=ZO(xo,uf,2,2),this.rect.setAttribute("class","a9s-selection"),this.group.style.pointerEvents="none",this.group.style.display="none",this.group.appendChild(this.mask),this.group.appendChild(this.rect),df.appendChild(this.group)}get bbox(){const xo=this.opposite[0]-this.anchor[0],uf=this.opposite[1]-this.anchor[1];return{x:xo>0?this.anchor[0]:this.opposite[0],y:uf>0?this.anchor[1]:this.opposite[1],w:Math.max(1,Math.abs(xo)),h:Math.max(1,Math.abs(uf))}}get element(){return this.rect}}const qA={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"},QO=()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,YA=go=>{let xo=null;const uf=(gf,Ef)=>new MouseEvent(gf,{screenX:Ef.screenX,screenY:Ef.screenY,clientX:Ef.clientX,clientY:Ef.clientY,pageX:Ef.pageX,pageY:Ef.pageY,bubbles:!0}),df=gf=>{const Ef=gf.changedTouches[0],Rf=uf(qA[gf.type],Ef);Ef.target.dispatchEvent(Rf),gf.preventDefault(),(gf.type==="touchstart"||gf.type==="touchmove")&&(xo&&clearTimeout(xo),xo=setTimeout(()=>{const Vf=uf("dblclick",Ef);Ef.target.dispatchEvent(Vf)},800)),gf.type==="touchend"&&xo&&clearTimeout(xo)};go.addEventListener("touchstart",df,!0),go.addEventListener("touchmove",df,!0),go.addEventListener("touchend",df,!0),go.addEventListener("touchcancel",df,!0)},TC="An implementation is missing",KA=QO();class eP extends Z1{constructor(xo,uf,df){super(),mo(this,"enableResponsive",()=>{window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>{const Ef=this.svg.getBoundingClientRect(),{width:Rf,height:Vf}=this.svg.viewBox.baseVal;this.scale=Math.max(Rf/Ef.width,Vf/Ef.height),this.onScaleChanged&&this.onScaleChanged(this.scale)}),this.resizeObserver.observe(this.svg.parentNode))}),mo(this,"getSVGPoint",Ef=>{const Rf=this.svg.createSVGPoint();if(KA){const Vf=this.svg.getBoundingClientRect(),Qf=Ef.clientX-Vf.x,ep=Ef.clientY-Vf.y,{left:Jf,top:mp}=this.svg.getBoundingClientRect();return Rf.x=Qf+Jf,Rf.y=ep+mp,Rf.matrixTransform(this.g.getScreenCTM().inverse())}else return Rf.x=Ef.offsetX,Rf.y=Ef.offsetY,Rf.matrixTransform(this.g.getCTM().inverse())}),mo(this,"drawHandle",(Ef,Rf)=>{const Vf=document.createElementNS(wv,"g");Vf.setAttribute("class","a9s-handle");const Qf=document.createElementNS(wv,"g"),ep=Pp=>{const tg=document.createElementNS(wv,"circle");return tg.setAttribute("cx",Ef),tg.setAttribute("cy",Rf),tg.setAttribute("r",Pp),tg},Jf=this.config.handleRadius||6,mp=ep(Jf);mp.setAttribute("class","a9s-handle-inner");const Tp=ep(Jf+1);return Tp.setAttribute("class","a9s-handle-outer"),Qf.appendChild(Tp),Qf.appendChild(mp),Vf.appendChild(Qf),Vf}),mo(this,"setHandleXY",(Ef,Rf,Vf)=>{const Qf=Ef.querySelector(".a9s-handle-inner");Qf.setAttribute("cx",Rf),Qf.setAttribute("cy",Vf);const ep=Ef.querySelector(".a9s-handle-outer");ep.setAttribute("cx",Rf),ep.setAttribute("cy",Vf)}),mo(this,"getHandleXY",Ef=>{const Rf=Ef.querySelector(".a9s-handle-outer");return{x:parseFloat(Rf.getAttribute("cx")),y:parseFloat(Rf.getAttribute("cy"))}}),mo(this,"scaleHandle",Ef=>{const Rf=Ef.querySelector(".a9s-handle-inner"),Vf=Ef.querySelector(".a9s-handle-outer"),Qf=this.scale*(this.config.handleRadius||6);Rf.setAttribute("r",Qf),Vf.setAttribute("r",Qf)}),this.svg=xo.closest("svg"),this.g=xo,this.config=uf,this.env=df,this.scale=1;const{image:gf}=df;(gf instanceof Element||gf instanceof HTMLDocument)&&this.enableResponsive()}destroy(){this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=null}}class eI extends eP{constructor(xo,uf,df){super(xo,uf,df),mo(this,"attachListeners",({mouseMove:gf,mouseUp:Ef,dblClick:Rf})=>{gf&&(this.mouseMove=Vf=>{const{x:Qf,y:ep}=this.getSVGPoint(Vf);this.started||(this.emit("startSelection",{x:Qf,y:ep}),this.started=!0),gf(Qf,ep,Vf)},this.svg.addEventListener("mousemove",this.mouseMove)),Ef&&(this.mouseUp=Vf=>{if(Vf.button!==0)return;const{x:Qf,y:ep}=this.getSVGPoint(Vf);Ef(Qf,ep,Vf)},document.addEventListener("mouseup",this.mouseUp)),Rf&&(this.dblClick=Vf=>{const{x:Qf,y:ep}=this.getSVGPoint(Vf);Rf(Qf,ep,Vf)},document.addEventListener("dblclick",this.dblClick))}),mo(this,"detachListeners",()=>{this.mouseMove&&this.svg.removeEventListener("mousemove",this.mouseMove),this.mouseUp&&document.removeEventListener("mouseup",this.mouseUp),this.dblClick&&document.removeEventListener("dblclick",this.dblClick)}),mo(this,"start",(gf,Ef)=>{const{x:Rf,y:Vf}=this.getSVGPoint(gf);this.startDrawing(Rf,Vf,Ef,gf)}),mo(this,"startDrawing",gf=>{throw new Error(TC)}),mo(this,"createEditableShape",gf=>{throw new Error(TC)}),this.started=!1}get isDrawing(){throw new Error(TC)}}eI.supports=go=>{throw new Error(TC)};const tP="An implementation is missing";class rP extends eP{constructor(xo,uf,df,gf){super(uf,df,gf),mo(this,"updateState",Ef=>{throw new Error(tP)}),this.annotation=xo}get element(){throw new Error(tP)}}const XA=/firefox/i.test(navigator.userAgent),nP=(go,xo,uf,df,gf)=>{go.setAttribute("width",df),go.setAttribute("height",gf),XA?(go.setAttribute("x",0),go.setAttribute("y",0),go.setAttribute("transform",`translate(${xo}, ${uf})`)):(go.setAttribute("x",xo),go.setAttribute("y",uf))},iP=(go,xo)=>{const{x:uf,y:df,width:gf,height:Ef}=xo.getBBox(),Rf=document.createElementNS(wv,"svg");Rf.setAttribute("class","a9s-formatter-el"),nP(Rf,uf,df,gf,Ef);const Vf=document.createElementNS(wv,"g");Vf.appendChild(go),Rf.appendChild(Vf),xo.append(Rf)},kC=(go,xo,uf)=>{if(!uf)return go;const df=uf(xo);if(!df)return go;if(typeof df=="string"||df instanceof String)yx(go,df);else if(df.nodeType===Node.ELEMENT_NODE)iP(df,go);else{const{className:gf,style:Ef,element:Rf}=df;if(gf&&yx(go,gf),Ef){const Vf=go.querySelector(".a9s-outer"),Qf=go.querySelector(".a9s-inner");Vf&&Qf?(Vf.setAttribute("style","display:none"),Qf.setAttribute("style",Ef)):go.setAttribute("style",Ef)}Rf&&iP(Rf,go);for(const Vf in df)df.hasOwnProperty(Vf)&&Vf.startsWith("data-")&&go.setAttribute(Vf,df[Vf])}},tI=(go,xo,uf,df,gf)=>{const Ef=go.querySelector(".a9s-formatter-el");Ef&&nP(Ef,xo,uf,df,gf)};class ZA extends rP{constructor(xo,uf,df,gf){super(xo,uf,df,gf),mo(this,"onScaleChanged",()=>this.handles.map(this.scaleHandle)),mo(this,"setSize",(ep,Jf,mp,Tp)=>{JO(this.rectangle,ep,Jf,mp,Tp),XO(this.mask,this.env.image,ep,Jf,mp,Tp),tI(this.elementGroup,ep,Jf,mp,Tp);const[Pp,tg,gg,fg]=this.handles;this.setHandleXY(Pp,ep,Jf),this.setHandleXY(tg,ep+mp,Jf),this.setHandleXY(gg,ep+mp,Jf+Tp),this.setHandleXY(fg,ep,Jf+Tp)}),mo(this,"stretchCorners",(ep,Jf,mp)=>{const Tp=this.getHandleXY(Jf),Pp=mp.x-Tp.x,tg=mp.y-Tp.y,gg=Pp>0?Tp.x:mp.x,fg=tg>0?Tp.y:mp.y,Tg=Math.abs(Pp),Rg=Math.abs(tg);JO(this.rectangle,gg,fg,Tg,Rg),XO(this.mask,this.env.image,gg,fg,Tg,Rg),tI(this.elementGroup,gg,fg,Tg,Rg),this.setHandleXY(this.handles[ep],mp.x,mp.y);const $m=this.handles[(ep+3)%4];this.setHandleXY($m,Tp.x,mp.y);const pm=this.handles[(ep+5)%4];return this.setHandleXY(pm,mp.x,Tp.y),{x:gg,y:fg,w:Tg,h:Rg}}),mo(this,"onGrab",ep=>Jf=>{if(Jf.button!==0)return;this.grabbedElem=ep;const mp=this.getSVGPoint(Jf),{x:Tp,y:Pp}=QI(this.rectangle);this.mouseOffset={x:mp.x-Tp,y:mp.y-Pp}}),mo(this,"onMouseMove",ep=>{if(ep.button!==0)return;const Jf=(mp,Tp)=>mp<0?0:mp>Tp?Tp:mp;if(this.grabbedElem){const mp=this.getSVGPoint(ep);if(this.grabbedElem===this.rectangle){const{w:Tp,h:Pp}=QI(this.rectangle),{naturalWidth:tg,naturalHeight:gg}=this.env.image,fg=Jf(mp.x-this.mouseOffset.x,tg-Tp),Tg=Jf(mp.y-this.mouseOffset.y,gg-Pp);this.setSize(fg,Tg,Tp,Pp),this.emit("update",ET(fg,Tg,Tp,Pp,this.env.image,this.config.fragmentUnit))}else{const Tp=this.handles.indexOf(this.grabbedElem),Pp=Tp<2?this.handles[Tp+2]:this.handles[Tp-2],{x:tg,y:gg,w:fg,h:Tg}=this.stretchCorners(Tp,Pp,mp);this.emit("update",ET(tg,gg,fg,Tg,this.env.image,this.config.fragmentUnit))}}}),mo(this,"onMouseUp",ep=>{this.grabbedElem=null,this.mouseOffset=null}),mo(this,"updateState",ep=>{const{x:Jf,y:mp,w:Tp,h:Pp}=O2(ep,this.env.image);this.setSize(Jf,mp,Tp,Pp)}),this.svg.addEventListener("mousemove",this.onMouseMove),this.svg.addEventListener("mouseup",this.onMouseUp);const{x:Ef,y:Rf,w:Vf,h:Qf}=O2(xo,gf.image);this.containerGroup=document.createElementNS(wv,"g"),this.mask=JI(gf.image,Ef,Rf,Vf,Qf),this.mask.setAttribute("class","a9s-selection-mask"),this.containerGroup.appendChild(this.mask),this.elementGroup=document.createElementNS(wv,"g"),this.elementGroup.setAttribute("class","a9s-annotation editable selected"),this.rectangle=ZO(Ef,Rf,Vf,Qf),this.rectangle.querySelector(".a9s-inner").addEventListener("mousedown",this.onGrab(this.rectangle)),this.elementGroup.appendChild(this.rectangle),this.handles=[[Ef,Rf],[Ef+Vf,Rf],[Ef+Vf,Rf+Qf],[Ef,Rf+Qf]].map(ep=>{const[Jf,mp]=ep,Tp=this.drawHandle(Jf,mp);return Tp.addEventListener("mousedown",this.onGrab(Tp)),this.elementGroup.appendChild(Tp),Tp}),this.containerGroup.appendChild(this.elementGroup),uf.appendChild(this.containerGroup),kC(this.rectangle,xo,df.formatter),this.grabbedElem=null,this.mouseOffset=null}get element(){return this.elementGroup}destroy(){this.containerGroup.parentNode.removeChild(this.containerGroup),super.destroy()}}class CC extends eI{constructor(xo,uf,df){super(xo,uf,df),mo(this,"startDrawing",(gf,Ef)=>{this.attachListeners({mouseMove:this.onMouseMove,mouseUp:this.onMouseUp}),this.rubberband=new WA(gf,Ef,this.g,this.config,this.env)}),mo(this,"stop",()=>{this.rubberband&&(this.rubberband.destroy(),this.rubberband=null)}),mo(this,"onMouseMove",(gf,Ef)=>this.rubberband.dragTo(gf,Ef)),mo(this,"onMouseUp",()=>{this.detachListeners(),this.started=!1;const{width:gf,height:Ef}=this.rubberband.getBoundingClientRect(),Rf=this.config.minSelectionWidth||4,Vf=this.config.minSelectionHeight||4;if(gf>=Rf&&Ef>=Vf){const{element:Qf}=this.rubberband;Qf.annotation=this.rubberband.toSelection(),this.emit("complete",Qf)}else this.emit("cancel");this.stop()}),mo(this,"createEditableShape",gf=>new ZA(gf,this.g,this.config,this.env)),this.rubberband=null}get isDrawing(){return this.rubberband!=null}}CC.identifier="rect",CC.supports=go=>{const xo=go.selector("FragmentSelector");return xo==null?void 0:xo.conformsTo.startsWith("http://www.w3.org/TR/media-frags")};const JA=go=>{const xo=new XMLSerializer().serializeToString(go.documentElement).replace("",``);return new DOMParser().parseFromString(xo,"image/svg+xml").documentElement},oP=go=>{const xo=df=>{Array.from(df.attributes).forEach(gf=>{gf.name.startsWith("on")&&df.removeAttribute(gf.name)})},uf=go.getElementsByTagName("script");return Array.from(uf).reverse().forEach(df=>df.parentNode.removeChild(df)),xo(go),Array.from(go.querySelectorAll("*")).forEach(xo),go},UE=go=>{const xo=go.selector("SvgSelector");if(xo){const uf=new DOMParser,{value:df}=xo,gf=uf.parseFromString(df,"image/svg+xml"),Ef=gf.lookupPrefix(wv),Rf=gf.lookupNamespaceURI(null);return Ef||Rf?oP(gf).firstChild:oP(JA(gf)).firstChild}},aP=go=>{const xo=UE(go),uf=document.createElementNS(wv,"g"),df=xo.cloneNode(!0);df.setAttribute("class","a9s-inner");const gf=xo.cloneNode(!0);return gf.setAttribute("class","a9s-outer"),uf.appendChild(gf),uf.appendChild(df),uf},rI=(go,xo)=>{const uf=go.querySelector(".a9s-inner").cloneNode(!0);uf.removeAttribute("class"),uf.removeAttribute("xmlns");let df=uf.outerHTML||new XMLSerializer().serializeToString(uf);return df=df.replace(` xmlns="${wv}"`,""),{source:xo==null?void 0:xo.src,selector:{type:"SvgSelector",value:`${df}`}}},QA=go=>{const xo=UE(go),uf=xo.nodeName.toLowerCase();if(uf==="polygon")return e3(xo);if(uf==="circle")return t3(xo);if(uf==="ellipse")return r3(xo);if(uf=="path")return n3(xo);throw`Unsupported SVG shape type: ${uf}`},e3=go=>{const xo=go.getAttribute("points").split(" ").map(gf=>gf.split(",").map(Ef=>parseFloat(Ef.trim())));let uf=0,df=xo.length-1;for(let gf=0;gf{const xo=go.getAttribute("r");return xo*xo*Math.PI},r3=go=>{const xo=go.getAttribute("rx"),uf=go.getAttribute("ry");return xo*uf*Math.PI},n3=go=>{const xo=go.getAttribute("d").split("L");let uf=0;if(xo.length>1){var df=xo[xo.length-1].trim().split(" ");let gf=parseFloat(df[0]),Ef=parseFloat(df[1]);df=xo[0].substring(1).trim().split(" ");let Rf=parseFloat(df[0]),Vf=parseFloat(df[1]);uf+=(gf+Rf)*(Ef-Vf),gf=Rf,Ef=Vf;for(let Qf=1;Qf{this.mask.setAttribute("d",`M0 0 h${this.w} v${this.h} h-${this.w} z M${this.polygon.getAttribute("points")} z`)}),mo(this,"destroy",()=>this.mask.parentNode.removeChild(this.mask)),this.w=xo.naturalWidth,this.h=xo.naturalHeight,this.polygon=uf,this.mask=document.createElementNS(wv,"path"),this.mask.setAttribute("fill-rule","evenodd"),this.mask.setAttribute("class","a9s-selection-mask"),this.mask.setAttribute("d",`M0 0 h${this.w} v${this.h} h-${this.w} z M${this.polygon.getAttribute("points")} z`)}get element(){return this.mask}}class i3{constructor(xo,uf,df){mo(this,"setPoints",gf=>{const Ef=gf.map(Rf=>`${Rf[0]},${Rf[1]}`).join(" ");this.outer.setAttribute("points",Ef),this.inner.setAttribute("points",Ef)}),mo(this,"getBoundingClientRect",()=>this.outer.getBoundingClientRect()),mo(this,"dragTo",gf=>{this.group.style.display=null,this.mousepos=gf;const Ef=[...this.points,gf];this.setPoints(Ef),this.mask.redraw()}),mo(this,"addPoint",()=>{const[gf,Ef]=this.mousepos,Rf=this.points[this.points.length-1];Math.pow(gf-Rf[0],2)+Math.pow(Ef-Rf[1],2)>4&&(this.points=[...this.points,this.mousepos],this.setPoints(this.points),this.mask.redraw())}),mo(this,"destroy",()=>{this.group.parentNode.removeChild(this.group),this.polygon=null,this.group=null}),mo(this,"toSelection",()=>new xT(rI(this.group,this.env.image))),this.points=[xo],this.env=df,this.mousepos=xo,this.group=document.createElementNS(wv,"g"),this.polygon=document.createElementNS(wv,"g"),this.polygon.setAttribute("class","a9s-selection"),this.outer=document.createElementNS(wv,"polygon"),this.outer.setAttribute("class","a9s-outer"),this.inner=document.createElementNS(wv,"polygon"),this.inner.setAttribute("class","a9s-inner"),this.setPoints(this.points),this.mask=new sP(df.image,this.inner),this.polygon.appendChild(this.outer),this.polygon.appendChild(this.inner),this.group.style.display="none",this.group.appendChild(this.mask.element),this.group.appendChild(this.polygon),uf.appendChild(this.group)}get element(){return this.polygon}}const nI=go=>{const xo=go.querySelector(".a9s-inner").points,uf=[];for(let df=0;dfgo.querySelector(".a9s-inner").getBBox();class a3 extends rP{constructor(xo,uf,df,gf){super(xo,uf,df,gf),mo(this,"onScaleChanged",()=>this.handles.map(this.scaleHandle)),mo(this,"setPoints",Ef=>{const Rf=Pp=>Math.round(10*Pp)/10,Vf=Ef.map(Pp=>`${Rf(Pp.x)},${Rf(Pp.y)}`).join(" ");this.shape.querySelector(".a9s-inner").setAttribute("points",Vf);const Qf=this.shape.querySelector(".a9s-outer");Qf.setAttribute("points",Vf),this.mask.redraw();const{x:ep,y:Jf,width:mp,height:Tp}=Qf.getBBox();tI(this.elementGroup,ep,Jf,mp,Tp)}),mo(this,"onGrab",Ef=>Rf=>{Rf.button===0&&(this.grabbedElem=Ef,this.grabbedAt=this.getSVGPoint(Rf))}),mo(this,"onMouseMove",Ef=>{const Rf=(Vf,Qf,ep)=>Vf+Qf<0?-Vf:Vf+Qf>ep?ep-Vf:Qf;if(this.grabbedElem){const Vf=this.getSVGPoint(Ef);if(this.grabbedElem===this.shape){const{x:Qf,y:ep,width:Jf,height:mp}=o3(this.shape),{naturalWidth:Tp,naturalHeight:Pp}=this.env.image,tg=Rf(Qf,Vf.x-this.grabbedAt.x,Tp-Jf),gg=Rf(ep,Vf.y-this.grabbedAt.y,Pp-mp),fg=nI(this.shape).map(Tg=>({x:Tg.x+tg,y:Tg.y+gg}));this.grabbedAt=Vf,this.setPoints(fg),fg.forEach((Tg,Rg)=>this.setHandleXY(this.handles[Rg],Tg.x,Tg.y)),this.emit("update",rI(this.shape,this.env.image))}else{const Qf=this.handles.indexOf(this.grabbedElem),ep=nI(this.shape).map((Jf,mp)=>mp===Qf?Vf:Jf);this.setPoints(ep),this.setHandleXY(this.handles[Qf],Vf.x,Vf.y),this.emit("update",rI(this.shape,this.env.image))}}}),mo(this,"onMouseUp",Ef=>{this.grabbedElem=null,this.grabbedAt=null}),mo(this,"updateState",Ef=>{const Rf=UE(Ef).getAttribute("points").split(" ").map(Vf=>{const[Qf,ep]=Vf.split(",").map(Jf=>parseFloat(Jf.trim()));return{x:Qf,y:ep}});this.setPoints(Rf),Rf.forEach((Vf,Qf)=>this.setHandleXY(this.handles[Qf],Vf.x,Vf.y))}),mo(this,"destroy",()=>{this.containerGroup.parentNode.removeChild(this.containerGroup),super.destroy()}),this.svg.addEventListener("mousemove",this.onMouseMove),this.svg.addEventListener("mouseup",this.onMouseUp),this.containerGroup=document.createElementNS(wv,"g"),this.shape=aP(xo),this.shape.querySelector(".a9s-inner").addEventListener("mousedown",this.onGrab(this.shape)),this.mask=new sP(gf.image,this.shape.querySelector(".a9s-inner")),this.containerGroup.appendChild(this.mask.element),this.elementGroup=document.createElementNS(wv,"g"),this.elementGroup.setAttribute("class","a9s-annotation editable selected"),this.elementGroup.appendChild(this.shape),this.handles=nI(this.shape).map(Ef=>{const Rf=this.drawHandle(Ef.x,Ef.y);return Rf.addEventListener("mousedown",this.onGrab(Rf)),this.elementGroup.appendChild(Rf),Rf}),this.containerGroup.appendChild(this.elementGroup),uf.appendChild(this.containerGroup),kC(this.shape,xo,df.formatter),this.grabbedElem=null,this.grabbedAt=null}get element(){return this.elementGroup}}class iI extends eI{constructor(xo,uf,df){super(xo,uf,df),mo(this,"startDrawing",(gf,Ef,Rf)=>{this._isDrawing=!0,this._startOnSingleClick=Rf,this.attachListeners({mouseMove:this.onMouseMove,mouseUp:this.onMouseUp,dblClick:this.onDblClick}),this.rubberband=new i3([gf,Ef],this.g,this.env)}),mo(this,"stop",()=>{this.detachListeners(),this._isDrawing=!1,this.rubberband&&(this.rubberband.destroy(),this.rubberband=null)}),mo(this,"onMouseMove",(gf,Ef)=>this.rubberband.dragTo([gf,Ef])),mo(this,"onMouseUp",()=>{const{width:gf,height:Ef}=this.rubberband.getBoundingClientRect(),Rf=this.config.minSelectionWidth||4,Vf=this.config.minSelectionHeight||4;gf>=Rf||Ef>=Vf?this.rubberband.addPoint():this._startOnSingleClick||(this.emit("cancel"),this.stop())}),mo(this,"onDblClick",()=>{this._isDrawing=!1;const gf=this.rubberband.element;gf.annotation=this.rubberband.toSelection(),this.emit("complete",gf),this.stop()}),mo(this,"createEditableShape",gf=>new a3(gf,this.g,this.config,this.env)),this._isDrawing=!1,this._startOnSingleClick=!1}get isDrawing(){return this._isDrawing}}iI.identifier="polygon",iI.supports=go=>{var xo;const uf=go.selector("SvgSelector");if(uf)return(xo=uf.value)==null?void 0:xo.match(/^this._registered.map(gf=>gf.identifier)),mo(this,"registerTool",gf=>{const Ef=gf.identifier;this.listTools().includes(Ef)&&this.unregisterTool(Ef),this._registered.push(gf)}),mo(this,"unregisterTool",gf=>this._registered=this._registered.filter(Ef=>Ef.identifier!==gf)),mo(this,"setCurrent",gf=>{const Ef=typeof gf=="string"||gf instanceof String?this._registered.find(Rf=>Rf.identifier===gf):gf;this._current=new Ef(this._g,this._config,this._env),this._current.on("startSelection",Rf=>this.emit("startSelection",Rf)),this._current.on("complete",Rf=>this.emit("complete",Rf)),this._current.on("cancel",Rf=>this.emit("cancel",Rf))}),mo(this,"forAnnotation",gf=>{var Ef;const[Rf,...Vf]=gf.targets,Qf=(Ef=Rf.renderedVia)==null?void 0:Ef.name,ep=Qf?this._registered.find(Jf=>Jf.identifier===Qf):this._registered.find(Jf=>Jf.supports(gf));return ep?new ep(this._g,this._config,this._env):null}),this._g=xo,this._config=uf,this._env=df,this._registered=[CC,iI],this.setCurrent(CC)}get current(){return this._current}}class l3{constructor(xo,uf,df){this.svg=xo.closest("svg"),this.g=document.createElementNS(wv,"g"),this.g.setAttribute("class","a9s-crosshair");const gf=document.createElementNS(wv,"line"),Ef=document.createElementNS(wv,"line");this.g.appendChild(gf),this.g.appendChild(Ef),xo.appendChild(this.g);const Rf=Vf=>{const Qf=this.svg.getBoundingClientRect(),ep=Vf.clientX-Qf.x,Jf=Vf.clientY-Qf.y,mp=this.svg.createSVGPoint(),{left:Tp,top:Pp}=this.svg.getBoundingClientRect();return mp.x=ep+Tp,mp.y=Jf+Pp,mp.matrixTransform(xo.getScreenCTM().inverse())};this.svg.addEventListener("mousemove",Vf=>{const{x:Qf,y:ep}=Rf(Vf);gf.setAttribute("x1",0),gf.setAttribute("y1",ep),gf.setAttribute("x2",uf),gf.setAttribute("y2",ep),Ef.setAttribute("x1",Qf),Ef.setAttribute("y1",0),Ef.setAttribute("x2",Qf),Ef.setAttribute("y2",df)})}}const c3={FragmentSelector:ZO,SvgSelector:aP},u3={FragmentSelector:GA,SvgSelector:QA},lP=go=>{const xo=go.targets[0];if(xo)return Array.isArray(xo.selector)?xo.selector[0]:xo.selector},oI=(go,xo)=>c3[lP(go).type](go,xo),cP=(go,xo)=>u3[lP(go).type](go,xo);function h3(go,xo,uf,df,gf){uP(go,xo,uf||0,df||go.length-1,gf||d3)}function uP(go,xo,uf,df,gf){for(;df>uf;){if(df-uf>600){var Ef=df-uf+1,Rf=xo-uf+1,Vf=Math.log(Ef),Qf=.5*Math.exp(2*Vf/3),ep=.5*Math.sqrt(Vf*Qf*(Ef-Qf)/Ef)*(Rf-Ef/2<0?-1:1),Jf=Math.max(uf,Math.floor(xo-Rf*Qf/Ef+ep)),mp=Math.min(df,Math.floor(xo+(Ef-Rf)*Qf/Ef+ep));uP(go,xo,Jf,mp,gf)}var Tp=go[xo],Pp=uf,tg=df;for(ST(go,uf,xo),gf(go[df],Tp)>0&&ST(go,uf,df);Pp0;)tg--}gf(go[uf],Tp)===0?ST(go,uf,tg):(tg++,ST(go,tg,df)),tg<=xo&&(uf=tg+1),xo<=tg&&(df=tg-1)}}function ST(go,xo,uf){var df=go[xo];go[xo]=go[uf],go[uf]=df}function d3(go,xo){return goxo?1:0}class f3{constructor(xo=9){this._maxEntries=Math.max(4,xo),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(xo){let uf=this.data;const df=[];if(!IC(xo,uf))return df;const gf=this.toBBox,Ef=[];for(;uf;){for(let Rf=0;Rf=0&&Ef[uf].children.length>this._maxEntries;)this._split(Ef,uf),uf--;this._adjustParentBBoxes(gf,Ef,uf)}_split(xo,uf){const df=xo[uf],gf=df.children.length,Ef=this._minEntries;this._chooseSplitAxis(df,Ef,gf);const Rf=this._chooseSplitIndex(df,Ef,gf),Vf=GE(df.children.splice(Rf,df.children.length-Rf));Vf.height=df.height,Vf.leaf=df.leaf,VE(df,this.toBBox),VE(Vf,this.toBBox),uf?xo[uf-1].children.push(Vf):this._splitRoot(df,Vf)}_splitRoot(xo,uf){this.data=GE([xo,uf]),this.data.height=xo.height+1,this.data.leaf=!1,VE(this.data,this.toBBox)}_chooseSplitIndex(xo,uf,df){let gf,Ef=1/0,Rf=1/0;for(let Vf=uf;Vf<=df-uf;Vf++){const Qf=TT(xo,0,Vf,this.toBBox),ep=TT(xo,Vf,df,this.toBBox),Jf=y3(Qf,ep),mp=aI(Qf)+aI(ep);Jf=uf;ep--){const Jf=xo.children[ep];kT(Vf,xo.leaf?Ef(Jf):Jf),Qf+=OC(Vf)}return Qf}_adjustParentBBoxes(xo,uf,df){for(let gf=df;gf>=0;gf--)kT(uf[gf],xo)}_condense(xo){for(let uf=xo.length-1,df;uf>=0;uf--)xo[uf].children.length===0?uf>0?(df=xo[uf-1].children,df.splice(df.indexOf(xo[uf]),1)):this.clear():VE(xo[uf],this.toBBox)}}function p3(go,xo,uf){if(!uf)return xo.indexOf(go);for(let df=0;df=go.minX&&xo.maxY>=go.minY}function GE(go){return{children:go,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function hP(go,xo,uf,df,gf){const Ef=[xo,uf];for(;Ef.length;){if(uf=Ef.pop(),xo=Ef.pop(),uf-xo<=df)continue;const Rf=xo+Math.ceil((uf-xo)/df/2)*df;h3(go,Rf,xo,uf,gf),Ef.push(xo,Rf,Rf,uf)}}const dP=go=>{const xo=oI(go),uf=document.createElementNS(wv,"svg");uf.style.position="absolute",uf.style.opacity=0,uf.style.top=0,uf.style.left=0,uf.appendChild(xo),document.body.appendChild(uf);const{x:df,y:gf,width:Ef,height:Rf}=xo.getBBox();return document.body.removeChild(uf),{minX:df,minY:gf,maxX:df+Ef,maxY:gf+Rf}};class b3{constructor(xo){mo(this,"getAnnotationAt",(uf,df,gf)=>{const Ef=gf?5/gf:5,Rf=this.spatial_index.search({minX:uf-Ef,minY:df-Ef,maxX:uf+Ef,maxY:df+Ef}).map(Vf=>Vf.annotation);if(Rf.length>0)return Rf.sort((Vf,Qf)=>cP(Vf,this.env.image)-cP(Qf,this.env.image)),Rf[0]}),mo(this,"getAnnotationsIntersecting",uf=>this.spatial_index.search(uf).map(df=>df.annotation)),mo(this,"insert",uf=>{(Array.isArray(uf)?uf:[uf]).forEach(df=>{this.spatial_index.insert(uo(yn({},dP(df)),{annotation:df}))})}),mo(this,"remove",uf=>{const df=uo(yn({},dP(uf)),{annotation:uf});this.spatial_index.remove(df,(gf,Ef)=>gf.annotation.id===Ef.annotation.id)}),this.env=xo,this.spatial_index=new f3}}const $3=(go,xo)=>{const uf=KO(xo,".a9s-annotation")?xo:xo.querySelector(".a9s-annotation"),{canvas:df}=go.drawer,gf=df.getBoundingClientRect(),Ef=df.width/gf.width,Rf=df.height/gf.height,Vf=uf.getBoundingClientRect(),Qf=Vf.x-gf.x,ep=Vf.y-gf.y,{width:Jf,height:mp}=Vf,Tp=document.createElement("CANVAS"),Pp=Tp.getContext("2d");Tp.width=Jf,Tp.height=mp,Pp.drawImage(df,Qf*Ef,ep*Rf,Jf*Ef,mp*Rf,0,0,Jf,mp);const tg=go.viewport.viewportToImageCoordinates(Vf.x,Vf.y),gg=go.viewport.viewportToImageZoom(go.viewport.getZoom());return{snippet:Tp,transform:fg=>{const Tg=tg.x+fg[0]/Ef/gg,Rg=tg.y+fg[1]/Rf/gg;return[Tg,Rg]}}},_3=QO();class fP extends Z1{constructor(xo){super(),mo(this,"_getShapeAt",df=>{const gf=Qf=>{const ep=this.svg.createSVGPoint();if(window.TouchEvent&&Qf instanceof TouchEvent){const Jf=this.svg.getBoundingClientRect(),mp=Qf.touches[0],Tp=mp.clientX-Jf.x,Pp=mp.clientY-Jf.y,{left:tg,top:gg}=this.svg.getBoundingClientRect();return ep.x=Tp+tg,ep.y=Pp+gg,ep.matrixTransform(this.g.getScreenCTM().inverse())}else return ep.x=Qf.offsetX,ep.y=Qf.offsetY,ep.matrixTransform(this.g.getCTM().inverse())},{x:Ef,y:Rf}=gf(df),Vf=this.store.getAnnotationAt(Ef,Rf,this.currentScale());if(Vf)return this.findShape(Vf)}),mo(this,"_initDrawingTools",df=>{this.tools=new s3(this.g,this.config,this.env),this.tools.on("complete",this.onDrawingComplete);let gf=!1;this.mouseTracker=new yf.default.MouseTracker({element:this.svg,pressHandler:Ef=>{this.tools.current.isDrawing||(this.tools.current.start(Ef.originalEvent,this.drawOnSingleClick&&!this.hoveredShape),df||this.scaleTool(this.tools.current))},moveHandler:Ef=>{if(this.tools.current.isDrawing){const{x:Rf,y:Vf}=this.tools.current.getSVGPoint(Ef.originalEvent);this.tools.current.onMouseMove(Rf,Vf,Ef.originalEvent),gf||(this.emit("startSelection",{x:Rf,y:Vf}),gf=!0)}},releaseHandler:Ef=>{if(this.tools.current.isDrawing){const{x:Rf,y:Vf}=this.tools.current.getSVGPoint(Ef.originalEvent);this.tools.current.onMouseUp(Rf,Vf,Ef.originalEvent)}gf=!1}}).setTracking(!1),this.onKeyDown&&document.removeEventListener("keydown",this.onKeyDown),this.onKeyUp&&document.removeEventListener("keydown",this.onKeyDown),this.onKeyDown=Ef=>{Ef.which===16&&!this.selectedShape&&this.mouseTracker.setTracking(!this.readOnly)},this.onKeyUp=Ef=>{Ef.which===16&&!this.tools.current.isDrawing&&this.mouseTracker.setTracking(!1)},document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp)}),mo(this,"_initMouseEvents",()=>{let df=this.viewer.gestureSettingsByDeviceType("mouse").clickToZoom;this.svg.addEventListener("mousemove",Rf=>{var Vf,Qf;if(!((Vf=this.tools)!=null&&Vf.current.isDrawing)&&!Rf.target.closest(".a9s-annotation.editable.selected")){const ep=this._getShapeAt(Rf);if((ep==null?void 0:ep.annotation)!==((Qf=this.hoveredShape)==null?void 0:Qf.annotation)){if(this.hoveredShape){this.viewer.gestureSettingsByDeviceType("mouse").clickToZoom=df;const Jf=this.hoveredShape.element||this.hoveredShape;zA(Jf,"hover"),this.emit("mouseLeaveAnnotation",this.hoveredShape.annotation,this.hoveredShape)}ep&&(df=this.viewer.gestureSettingsByDeviceType("mouse").clickToZoom,this.viewer.gestureSettingsByDeviceType("mouse").clickToZoom=!1,yx(ep,"hover"),this.emit("mouseEnterAnnotation",ep.annotation,ep))}this.hoveredShape=ep}});let gf=null;new yf.default.MouseTracker({element:this.viewer.canvas,pressHandler:()=>{gf=new Date().getTime()}}),this.svg.addEventListener("mousedown",()=>{gf=new Date().getTime()});const Ef=Rf=>{var Vf;if(!((Vf=this.tools.current)!=null&&Vf.isDrawing||this.disableSelect)&&new Date().getTime()-gf<250){const Qf=Rf.target.closest(".a9s-annotation.editable.selected")?this.selectedShape:this._getShapeAt(Rf);Qf?this.selectShape(Qf):Qf||(this.deselect(),this.emit("select",{}))}this.disableSelect&&this.emit("clickAnnotation",this.hoveredShape.annotation,this.hoveredShape)};this.svg.addEventListener("click",Ef),this.svg.addEventListener("touchstart",Ef)}),mo(this,"_refreshNonScalingAnnotations",()=>{const df=this.currentScale();Array.from(this.svg.querySelectorAll(".a9s-non-scaling")).forEach(gf=>gf.setAttribute("transform",`scale(${1/df})`))}),mo(this,"addAnnotation",(df,gf)=>{const Ef=gf||this.g,Rf=oI(df,this.env.image);return yx(Rf,"a9s-annotation"),Rf.setAttribute("data-id",df.id),Rf.annotation=df,Ef.appendChild(Rf),kC(Rf,df,this.formatter),this.scaleFormatterElements(Rf),Rf}),mo(this,"addDrawingTool",df=>this.tools.registerTool(df)),mo(this,"addOrUpdateAnnotation",(df,gf)=>{var Ef,Rf;(((Ef=this.selectedShape)==null?void 0:Ef.annotation)===df||((Rf=this.selectedShape)==null?void 0:Rf.annotation)==gf)&&this.deselect(),gf&&this.removeAnnotation(df),this.removeAnnotation(df);const Vf=this.addAnnotation(df);KO(Vf,"a9s-non-scaling")&&Vf.setAttribute("transform",`scale(${1/this.currentScale()})`),this.store.insert(df)}),mo(this,"currentScale",()=>{const df=this.viewer.viewport.getContainerSize().x;return this.viewer.viewport.getZoom(!0)*df/this.viewer.world.getContentFactor()}),mo(this,"deselect",()=>{var df;if((df=this.tools)==null||df.current.stop(),this.selectedShape){const{annotation:gf}=this.selectedShape;if(this.selectedShape.destroy&&(this.selectedShape.mouseTracker.destroy(),this.selectedShape.destroy(),!gf.isSelection)){const Ef=this.addAnnotation(gf);KO(Ef,"a9s-non-scaling")&&Ef.setAttribute("transform",`scale(${1/this.currentScale()})`)}this.selectedShape=null}}),mo(this,"destroy",()=>{this.deselect(),this.svg.parentNode.removeChild(this.svg)}),mo(this,"findShape",df=>{const gf=df!=null&&df.id?df.id:df;return this.g.querySelector(`.a9s-annotation[data-id="${gf}"]`)}),mo(this,"fitBounds",(df,gf)=>{const Ef=this.findShape(df);if(Ef){const{x:Rf,y:Vf,width:Qf,height:ep}=Ef.getBBox(),Jf=this.viewer.viewport.imageToViewportRectangle(Rf,Vf,Qf,ep);this.viewer.viewport.fitBounds(Jf,gf)}}),mo(this,"getAnnotations",()=>Array.from(this.g.querySelectorAll(".a9s-annotation")).map(df=>df.annotation)),mo(this,"getSelectedImageSnippet",()=>{var df;if(this.selectedShape){const gf=(df=this.selectedShape.element)!=null?df:this.selectedShape;return $3(this.viewer,gf)}}),mo(this,"init",df=>{this.deselect(),Array.from(this.g.querySelectorAll(".a9s-annotation")).forEach(gf=>this.g.removeChild(gf)),console.time("Took"),console.log("Drawing..."),this.loaded||(this.g.style.display="none"),df.forEach(gf=>this.addAnnotation(gf)),console.log("Indexing..."),this.store.insert(df),console.timeEnd("Took"),this.resize()}),mo(this,"listDrawingTools",()=>this.tools.listTools()),mo(this,"overrideId",(df,gf)=>{const Ef=this.findShape(df);Ef.setAttribute("data-id",gf);const{annotation:Rf}=Ef,Vf=Rf.clone({id:gf});return Ef.annotation=Vf,this.store.remove(Rf),this.store.insert(Vf),Vf}),mo(this,"panTo",(df,gf)=>{const Ef=this.findShape(df);if(Ef){const{top:Rf,left:Vf,width:Qf,height:ep}=Ef.getBoundingClientRect(),Jf=Vf+Qf/2+window.scrollX,mp=Rf+ep/2+window.scrollY,Tp=this.viewer.viewport.windowToViewportCoordinates(new yf.default.Point(Jf,mp));this.viewer.viewport.panTo(Tp,gf)}}),mo(this,"removeAnnotation",df=>{var gf,Ef;const Rf=df.type?df.id:df;((gf=this.selectedShape)==null?void 0:gf.annotation.id)===Rf&&this.deselect();const Vf=this.findShape(df);if(Vf){const{annotation:Qf}=Vf;((Ef=this.selectedShape)==null?void 0:Ef.annotation)===Qf&&this.deselect(),Vf.parentNode.removeChild(Vf),this.store.remove(Qf)}}),mo(this,"removeDrawingTool",df=>{var gf;return(gf=this.tools)==null?void 0:gf.unregisterTool(df)}),mo(this,"scaleFormatterElements",df=>{const gf=1/this.currentScale();if(df){const Ef=df.querySelector(".a9s-formatter-el");Ef&&Ef.firstChild.setAttribute("transform",`scale(${gf})`)}else Array.from(this.g.querySelectorAll(".a9s-formatter-el")).forEach(Ef=>Ef.firstChild.setAttribute("transform",`scale(${gf})`))}),mo(this,"scaleTool",df=>{if(df){const gf=1/this.currentScale();df.scale=gf,df.onScaleChanged&&df.onScaleChanged(gf)}}),mo(this,"selectAnnotation",(df,gf)=>{this.selectedShape&&this.deselect();const Ef=this.findShape(df);if(Ef){this.selectShape(Ef,gf);const Rf=this.selectedShape.element?this.selectedShape.element:this.selectedShape;return{annotation:Ef.annotation,element:Rf}}else this.deselect()}),mo(this,"selectShape",(df,gf)=>{var Ef;if(!gf&&!df.annotation.isSelection&&this.emit("clickAnnotation",df.annotation,df),((Ef=this.selectedShape)==null?void 0:Ef.annotation)===df.annotation)return;this.selectedShape&&this.selectedShape.annotation!==df.annotation&&this.deselect();const{annotation:Rf}=df;if(this.readOnly||Rf.readOnly||this.headless)this.selectedShape=df,gf||this.emit("select",{annotation:Rf,element:df,skipEvent:gf});else{const Vf=this.tools.forAnnotation(Rf);if(Vf){setTimeout(()=>{df.parentNode.removeChild(df),gf||this.emit("select",{annotation:Rf,element:this.selectedShape.element})},1),this.selectedShape=Vf.createEditableShape(Rf),this.scaleTool(this.selectedShape),this.scaleFormatterElements(this.selectedShape.element),this.selectedShape.element.annotation=Rf;const Qf=new yf.default.MouseTracker({element:this.svg}).setTracking(!0);this.selectedShape.element.addEventListener("mouseenter",()=>{this.hoveredShape=this.selectedShape,Qf.setTracking(!0)}),this.selectedShape.element.addEventListener("mouseleave",()=>{this.hoveredShape=null,Qf.setTracking(!1)}),this.selectedShape.mouseTracker=Qf,this.selectedShape.on("update",ep=>this.emit("updateTarget",this.selectedShape.element,ep))}else this.selectedShape=df,gf||this.emit("select",{annotation:Rf,element:this.selectedShape})}}),mo(this,"setDrawingEnabled",df=>{var gf;return(gf=this.mouseTracker)==null?void 0:gf.setTracking(df&&!this.readOnly)}),mo(this,"setDrawingTool",df=>{var gf;this.tools&&((gf=this.tools.current)==null||gf.stop(),this.tools.setCurrent(df))}),mo(this,"setVisible",df=>{df?this.svg.style.display=null:(this.deselect(),this.svg.style.display="none")}),mo(this,"stopDrawing",()=>{var df,gf;return(gf=(df=this.tools)==null?void 0:df.current)==null?void 0:gf.stop()}),this.viewer=xo.viewer,this.config=xo.config,this.env=xo.env,this.readOnly=xo.config.readOnly,this.headless=xo.config.headless,this.formatter=xo.config.formatter,this.disableSelect=xo.disableSelect,this.drawOnSingleClick=xo.config.drawOnSingleClick,this.svg=document.createElementNS(wv,"svg"),_3?(this.svg.setAttribute("class","a9s-annotationlayer a9s-osd-annotationlayer touch"),YA(this.svg)):this.svg.setAttribute("class","a9s-annotationlayer a9s-osd-annotationlayer"),this.g=document.createElementNS(wv,"g"),this.svg.appendChild(this.g),this.viewer.canvas.appendChild(this.svg),this.viewer.addHandler("animation",()=>this.resize()),this.viewer.addHandler("rotate",()=>this.resize()),this.viewer.addHandler("resize",()=>this.resize()),this.viewer.addHandler("flip",()=>this.resize()),this.loaded=!1;const uf=()=>{const{x:df,y:gf}=this.viewer.world.getItemAt(0).source.dimensions;this.env.image={src:this.viewer.world.getItemAt(0).source["@id"]||new URL(this.viewer.world.getItemAt(0).source.url,document.baseURI).href,naturalWidth:df,naturalHeight:gf},xo.config.crosshair&&(this.crosshair=new l3(this.g,df,gf),yx(this.svg,"has-crosshair")),this.loaded=!0,this.g.style.display="inline",this.resize()};this.viewer.addHandler("open",uf),this.viewer.world.addHandler("add-item",uf),this.viewer.world.getItemAt(0)&&uf(),this.store=new b3(this.env),this.selectedShape=null,this.hoveredShape=null,this._initMouseEvents()}resize(){var xo;const uf=this.viewer.viewport.getFlip(),df=this.viewer.viewport.pixelFromPoint(new yf.default.Point(0,0),!0);uf&&(df.x=this.viewer.viewport._containerInnerSize.x-df.x);const gf=this.currentScale(),Ef=uf?-gf:gf,Rf=this.viewer.viewport.getRotation();this.g.setAttribute("transform",`translate(${df.x}, ${df.y}) scale(${Ef}, ${gf}) rotate(${Rf})`),this._refreshNonScalingAnnotations(),this.scaleFormatterElements(),this.selectedShape&&(this.selectedShape.element?(this.scaleTool(this.selectedShape),this.emit("viewportChange",this.selectedShape.element)):this.emit("viewportChange",this.selectedShape)),(xo=this.tools)!=null&&xo.current.isDrawing&&this.scaleTool(this.tools.current)}}class w3 extends fP{constructor(xo){super(xo),mo(this,"onDrawingComplete",uf=>{this.selectShape(uf),this.emit("createSelection",uf.annotation),this.mouseTracker.setTracking(!1)}),this._initDrawingTools()}}const lI=go=>{const xo=go.viewport.viewportToImageRectangle(go.viewport.getBounds(!0)),uf=go.viewport.getContainerSize().x,df=go.viewport.getZoom(!0)*uf/go.world.getContentFactor();return{extent:xo,scale:df}},x3=go=>{var xo;const uf=go.targets[0];return uf?Array.isArray(uf.selector)?uf.selector[0].type:(xo=uf.selector)==null?void 0:xo.type:null},pP=(go,xo)=>{const{extent:uf,scale:df}=lI(go),{selector:gf}=xo,Ef=C2.create({target:xo});if(gf.type==="SvgSelector"){const Rf=UE(Ef),Vf=Rf.nodeName.toLowerCase();let Qf=null;if(Vf==="polygon")Qf=E3(Rf,uf,df);else if(Vf==="circle")Qf=S3(Rf,uf,df);else if(Vf==="ellipse")Qf=T3(Rf,uf,df);else if(Vf==="path")Qf=k3(Rf,uf,df);else throw`Unsupported SVG shape type: ${Vf}`;let ep=Qf.outerHTML||new XMLSerializer().serializeToString(Qf);return ep=ep.replace(` xmlns="${wv}"`,""),uo(yn({},xo),{selector:{type:"SvgSelector",value:`${ep}`}})}else if(gf.type==="FragmentSelector"){const{x:Rf,y:Vf,w:Qf,h:ep}=O2(Ef),Jf=uf.x+Rf/df,mp=uf.y+Vf/df,Tp=Qf/df,Pp=ep/df;return ET(Jf,mp,Tp,Pp)}else throw`Unsupported selector type: ${gf.type}`},E3=(go,xo,uf)=>{const df=Array.from(go.points).map(gf=>{const Ef=xo.x+gf.x/uf,Rf=xo.y+gf.y/uf;return Ef+","+Rf}).join(" ");return go.setAttribute("points",df),go},S3=(go,xo,uf)=>{const df=parseFloat(go.getAttribute("cx")),gf=parseFloat(go.getAttribute("cy")),Ef=parseFloat(go.getAttribute("r"));return go.setAttribute("cx",xo.x+df/uf),go.setAttribute("cy",xo.y+gf/uf),go.setAttribute("r",Ef/uf),go},T3=(go,xo,uf)=>{const df=parseFloat(go.getAttribute("cx")),gf=parseFloat(go.getAttribute("cy")),Ef=parseFloat(go.getAttribute("rx")),Rf=parseFloat(go.getAttribute("ry"));return go.setAttribute("cx",xo.x+df/uf),go.setAttribute("cy",xo.y+gf/uf),go.setAttribute("rx",Ef/uf),go.setAttribute("ry",Rf/uf),go},k3=(go,xo,uf)=>{const df=go.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(gf=>gf.trim()).map(gf=>{const Ef=gf.substring(0,1);if(Ef.toLowerCase()==="z")return Ef;{const Rf=gf.substring(1).split(" ").map(Jf=>parseFloat(Jf.trim())),Vf=Ef===Ef.toUpperCase(),Qf=Vf?xo.x+Rf[0]/uf:Rf[0]/uf,ep=Vf?xo.y+Rf[1]/uf:Rf[1]/uf;return Ef+" "+Qf+" "+ep}}).join(" ");return go.setAttribute("d",df),go},gP=(go,xo)=>{const{extent:uf,scale:df}=lI(go),gf=xo.selector("FragmentSelector");if(xo.selector("SvgSelector")){const Ef=UE(xo),Rf=Ef.nodeName.toLowerCase();let Vf=null;if(Rf==="polygon")Vf=C3(Ef,uf,df);else if(Rf==="circle")Vf=O3(Ef,uf,df);else if(Rf==="ellipse")Vf=I3(Ef,uf,df);else if(Rf==="path")Vf=P3(Ef,uf,df);else throw`Unsupported SVG shape type: ${Rf}`;let Qf=Vf.outerHTML||new XMLSerializer().serializeToString(Vf);Qf=Qf.replace(` xmlns="${wv}"`,"");const ep={selector:{type:"SvgSelector",value:`${Qf}`}};return xo.clone({target:ep})}else if(gf){const{x:Ef,y:Rf,w:Vf,h:Qf}=O2(xo),ep=(Ef-uf.x)*df,Jf=(Rf-uf.y)*df,mp=ET(ep,Jf,Vf*df,Qf*df);return xo.clone({target:mp})}},C3=(go,xo,uf)=>{const df=Array.from(go.points).map(gf=>{const Ef=uf*(gf.x-xo.x),Rf=uf*(gf.y-xo.y);return Ef+","+Rf}).join(" ");return go.setAttribute("points",df),go},O3=(go,xo,uf)=>{const df=go.getAttribute("cx"),gf=go.getAttribute("cy"),Ef=go.getAttribute("r");return go.setAttribute("cx",uf*(df-xo.x)),go.setAttribute("cy",uf*(gf-xo.y)),go.setAttribute("r",Ef*uf),go},I3=(go,xo,uf)=>{const df=go.getAttribute("cx"),gf=go.getAttribute("cy"),Ef=go.getAttribute("rx"),Rf=go.getAttribute("ry");return go.setAttribute("cx",uf*(df-xo.x)),go.setAttribute("cy",uf*(gf-xo.y)),go.setAttribute("rx",Ef*uf),go.setAttribute("ry",Rf*uf),go},P3=(go,xo,uf)=>{const df=go.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(gf=>gf.trim()).map(gf=>{const Ef=gf.substring(0,1);if(Ef.toLowerCase()==="z")return Ef;{const Rf=gf.substring(1).split(" ").filter(Jf=>Jf).map(Jf=>parseFloat(Jf.trim())),Vf=Ef===Ef.toUpperCase(),Qf=Vf?uf*(Rf[0]-xo.x):uf*Rf[0],ep=Vf?uf*(Rf[1]-xo.y):uf*Rf[1];return Ef+" "+Qf+" "+ep}}).join(" ");return go.setAttribute("d",df),go},mP=(go,xo)=>{const{extent:uf,scale:df}=lI(go),gf=x3(xo.annotation);if(gf==="FragmentSelector")A3(xo,uf,df);else if(gf==="SvgSelector")R3(xo,uf,df);else throw`Unsupported selector type type: ${gf}`},A3=(go,xo,uf)=>{const{x:df,y:gf,w:Ef,h:Rf}=O2(go.annotation),Vf=go.querySelector(".a9s-outer"),Qf=go.querySelector(".a9s-inner"),ep=uf*(df-xo.x),Jf=uf*(gf-xo.y);Ef===0&&Rf===0?[Vf,Qf].forEach(mp=>{mp.setAttribute("cx",ep),mp.setAttribute("cy",Jf)}):[Vf,Qf].forEach(mp=>{mp.setAttribute("x",ep),mp.setAttribute("y",Jf),mp.setAttribute("width",Ef*uf),mp.setAttribute("height",Rf*uf)})},R3=(go,xo,uf)=>{const df=UE(go.annotation),gf=df.nodeName.toLowerCase();if(gf==="polygon")N3(go,df,xo,uf);else if(gf==="circle")M3(go,df,xo,uf);else if(gf==="ellipse")D3(go,df,xo,uf);else if(gf==="path")L3(go,df,xo,uf);else throw`Unsupported SVG shape type: ${gf}`},N3=(go,xo,uf,df)=>{const gf=Array.from(xo.points).map(Ef=>{const Rf=df*(Ef.x-uf.x),Vf=df*(Ef.y-uf.y);return Rf+","+Vf}).join(" ");go.querySelector(".a9s-outer").setAttribute("points",gf),go.querySelector(".a9s-inner").setAttribute("points",gf)},M3=(go,xo,uf,df)=>{const gf=df*(xo.getAttribute("cx")-uf.x),Ef=df*(xo.getAttribute("cy")-uf.y),Rf=df*xo.getAttribute("r"),Vf=go.querySelector(".a9s-outer");Vf.setAttribute("cx",gf),Vf.setAttribute("cy",Ef),Vf.setAttribute("r",Rf);const Qf=go.querySelector(".a9s-inner");Qf.setAttribute("cx",gf),Qf.setAttribute("cy",Ef),Qf.setAttribute("r",Rf)},D3=(go,xo,uf,df)=>{const gf=df*(xo.getAttribute("cx")-uf.x),Ef=df*(xo.getAttribute("cy")-uf.y),Rf=df*xo.getAttribute("rx"),Vf=df*xo.getAttribute("ry"),Qf=go.querySelector(".a9s-outer");Qf.setAttribute("cx",gf),Qf.setAttribute("cy",Ef),Qf.setAttribute("rx",Rf),Qf.setAttribute("ry",Vf);const ep=go.querySelector(".a9s-inner");ep.setAttribute("cx",gf),ep.setAttribute("cy",Ef),ep.setAttribute("rx",Rf),ep.setAttribute("ry",Vf)},L3=(go,xo,uf,df)=>{const gf=xo.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(Ef=>Ef.trim()).map(Ef=>{const Rf=Ef.substring(0,1);if(Rf.toLowerCase()==="z")return Rf;{const Vf=Ef.substring(1).split(" ").filter(mp=>mp).map(mp=>parseFloat(mp.trim())),Qf=Rf===Rf.toUpperCase(),ep=Qf?df*(Vf[0]-uf.x):df*Vf[0],Jf=Qf?df*(Vf[1]-uf.y):df*Vf[1];return Rf+" "+ep+" "+Jf}}).join(" ");go.querySelector(".a9s-inner").setAttribute("d",gf),go.querySelector(".a9s-outer").setAttribute("d",gf)},F3=QO();class B3 extends fP{constructor(xo){super(xo),mo(this,"onDrawingComplete",uf=>{const df=uf.annotation.clone({target:pP(this.viewer,uf.annotation.target)});uf.annotation=df,this.selectShape(uf),this.emit("createSelection",uf.annotation),this.mouseTracker.setTracking(!1)}),mo(this,"addAnnotation",(uf,df)=>{const gf=df||this.g,Ef=oI(uf,this.env.image);return yx(Ef,"a9s-annotation"),Ef.setAttribute("data-id",uf.id),Ef.annotation=uf,mP(this.viewer,Ef),gf.appendChild(Ef),kC(Ef,uf,this.formatter),Ef}),mo(this,"_getShapeAt",uf=>{const df=Qf=>{if(F3){const ep=this.svg.getBoundingClientRect(),Jf=Qf.clientX-ep.x,mp=Qf.clientY-ep.y;return new yf.default.Point(Jf,mp)}else return new yf.default.Point(Qf.offsetX,Qf.offsetY)},gf=this.viewer.viewport.viewerElementToViewportCoordinates(df(uf)),{x:Ef,y:Rf}=this.viewer.viewport.viewportToImageCoordinates(gf.x,gf.y),Vf=this.store.getAnnotationAt(Ef,Rf,this.currentScale());if(Vf)return this.findShape(Vf)}),mo(this,"selectShape",(uf,df)=>{var gf;if(!df&&!uf.annotation.isSelection&&this.emit("clickAnnotation",uf.annotation,uf),((gf=this.selectedShape)==null?void 0:gf.annotation)===uf.annotation)return;this.selectedShape&&this.selectedShape.annotation!==uf.annotation&&this.deselect(!0);const{annotation:Ef}=uf;if(this.readOnly||Ef.readOnly||this.headless)this.selectedShape=uf,df||this.emit("select",{annotation:Ef,element:uf,skipEvent:df});else{setTimeout(()=>{uf.parentNode.removeChild(uf),df||this.emit("select",{annotation:Ef,element:this.selectedShape.element})},1);const Rf=this.tools.forAnnotation(Ef);this.selectedShape=Rf.createEditableShape(Ef),this.selectedShape.element.annotation=Ef;const Vf=gP(this.viewer,Ef);this.selectedShape.updateState(Vf);const Qf=new yf.default.MouseTracker({element:this.svg}).setTracking(!0);this.selectedShape.element.addEventListener("mouseenter",ep=>Qf.setTracking(!0)),this.selectedShape.element.addEventListener("mouseleave",ep=>Qf.setTracking(!1)),this.selectedShape.mouseTracker=Qf,this.selectedShape.on("update",ep=>{const Jf=pP(this.viewer,ep);this.selectedShape.element.annotation=this.selectedShape.annotation.clone({target:Jf}),this.emit("updateTarget",this.selectedShape.element,Jf)})}}),this._initDrawingTools(!0)}resize(){const xo=this.viewer.viewport.getBounds(!0),{x:uf,y:df,width:gf,height:Ef}=this.viewer.viewport.viewportToImageRectangle(xo),Rf={minX:uf,minY:df,maxX:uf+gf,maxY:df+Ef},Vf=new Set(this.store.getAnnotationsIntersecting(Rf).map(Qf=>Qf.id));if(Vf.size>0&&Array.from(this.g.querySelectorAll(".a9s-annotation:not(.selected)")).forEach(Qf=>{Vf.has(Qf.annotation.id)?(Qf.removeAttribute("visibility"),mP(this.viewer,Qf)):Qf.hasAttribute("visibility")||Qf.setAttribute("visibility","hidden")}),this.selectedShape)if(this.selectedShape.element){const Qf=gP(this.viewer,this.selectedShape.element.annotation);this.selectedShape.updateState&&this.selectedShape.updateState(Qf),this.emit("viewportChange",this.selectedShape.element)}else this.emit("viewportChange",this.selectedShape)}}class j3 extends rp{constructor(xo){super(xo),mo(this,"clearState",uf=>this.setState({selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,beforeHeadlessModify:null},uf)),mo(this,"forwardEvent",(uf,df)=>{this.annotationLayer.on(uf,(gf,Ef)=>{this.props[df](gf.clone(),Ef)})}),mo(this,"escapeKeyCancel",uf=>{if(uf.which===27){this.annotationLayer.stopDrawing();const{selectedAnnotation:df}=this.state;df&&(this.cancelSelected(),this.props.onCancelSelected(df))}}),mo(this,"handleStartSelect",uf=>this.props.onSelectionStarted(uf)),mo(this,"handleSelect",(uf,df)=>{this.state.editorDisabled?this.onHeadlessSelect(uf,df):this.onNormalSelect(uf,df)}),mo(this,"onNormalSelect",(uf,df)=>{const{annotation:gf,element:Ef}=uf;if(gf){const Rf=()=>{this.setState({selectedAnnotation:gf,selectedDOMElement:Ef,modifiedTarget:null},()=>{df||(gf.isSelection?this.props.onSelectionCreated(gf.clone()):this.props.onAnnotationSelected(gf.clone(),Ef))})},{selectedAnnotation:Vf}=this.state;Vf&&!Vf.isEqual(gf)?this.clearState(()=>{this.props.onCancelSelected(Vf),Rf()}):Rf()}else{const{selectedAnnotation:Rf}=this.state;Rf?this.clearState(()=>this.props.onCancelSelected(Rf)):this.clearState()}}),mo(this,"onHeadlessSelect",(uf,df)=>{this.saveSelected().then(()=>{this.onNormalSelect(uf,df)})}),mo(this,"handleUpdateTarget",(uf,df)=>{this.setState({selectedDOMElement:uf,modifiedTarget:df});const gf=JSON.parse(JSON.stringify(df));this.props.onSelectionTargetChanged(gf)}),mo(this,"handleViewportChange",uf=>this.setState({selectedDOMElement:uf})),mo(this,"overrideAnnotationId",uf=>df=>{const{id:gf}=uf;this.state.selectedAnnotation?this.setState({selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null},()=>{this.annotationLayer.overrideId(gf,df)}):this.annotationLayer.overrideId(gf,df)}),mo(this,"onCreateOrUpdateAnnotation",(uf,df)=>(gf,Ef)=>{let Rf=gf.isSelection?gf.toAnnotation():gf;Rf=this.state.modifiedTarget?Rf.clone({target:this.state.modifiedTarget}):Rf.clone(),this.clearState(()=>{this.annotationLayer.deselect(),this.annotationLayer.addOrUpdateAnnotation(Rf,Ef),Ef?this.props[uf](Rf,Ef.clone()):this.props[uf](Rf,this.overrideAnnotationId(gf)),df&&df()})}),mo(this,"onDeleteAnnotation",uf=>{this.clearState(),this.annotationLayer.removeAnnotation(uf),this.props.onAnnotationDeleted(uf)}),mo(this,"onCancelAnnotation",(uf,df)=>{this.state.editorDisabled||this.annotationLayer.deselect(),this.props.onCancelSelected(uf),this.clearState(df)}),mo(this,"addAnnotation",uf=>{var df;uf.id===((df=this.state.selectedAnnotation)==null?void 0:df.id)&&(this.annotationLayer.deselect(),this.clearState()),this.annotationLayer.addOrUpdateAnnotation(uf.clone())}),mo(this,"addDrawingTool",uf=>this.annotationLayer.addDrawingTool(uf)),mo(this,"cancelSelected",()=>new Promise(uf=>{this.annotationLayer.deselect(),this.state.selectedAnnotation?this.clearState(uf):uf()})),mo(this,"fitBounds",(uf,df)=>this.annotationLayer.fitBounds(uf,df)),mo(this,"getAnnotationById",uf=>{var df;return(df=this.annotationLayer.findShape(uf))==null?void 0:df.annotation}),mo(this,"getAnnotations",()=>this.annotationLayer.getAnnotations().map(uf=>uf.clone())),mo(this,"getSelected",()=>{var uf;if(this.state.selectedAnnotation)return this.state.editorDisabled?this.state.selectedAnnotation:(uf=this._editor.current)==null?void 0:uf.getCurrentAnnotation()}),mo(this,"getSelectedImageSnippet",()=>this.annotationLayer.getSelectedImageSnippet()),mo(this,"listDrawingTools",()=>this.annotationLayer.listDrawingTools()),mo(this,"panTo",(uf,df)=>this.annotationLayer.panTo(uf,df)),mo(this,"removeAnnotation",uf=>this.annotationLayer.removeAnnotation(uf)),mo(this,"removeDrawingTool",uf=>this.annotationLayer.removeDrawingTool(uf)),mo(this,"saveSelected",()=>new Promise(uf=>{const df=this.state.selectedAnnotation;if(df)if(df.isSelection)df.bodies.length>0||this.props.config.allowEmpty?this.onCreateOrUpdateAnnotation("onAnnotationCreated",uf)(df,df):(this.annotationLayer.deselect(),uf());else{const{beforeHeadlessModify:gf,modifiedTarget:Ef}=this.state;gf?this.onCreateOrUpdateAnnotation("onAnnotationUpdated",uf)(df,gf):Ef?this.onCreateOrUpdateAnnotation("onAnnotationUpdated",uf)(df,df):this.onCancelAnnotation(df,uf)}else uf()})),mo(this,"selectAnnotation",uf=>{const df=this.annotationLayer.selectAnnotation(uf,!0);if(df)return this.handleSelect(df,!0),df.annotation.clone();this.clearState()}),mo(this,"setAnnotations",uf=>this.annotationLayer.init(uf.map(df=>df.clone()))),mo(this,"setDrawingEnabled",uf=>this.annotationLayer.setDrawingEnabled(uf)),mo(this,"setDrawingTool",uf=>this.annotationLayer.setDrawingTool(uf)),mo(this,"setVisible",uf=>{this.annotationLayer.setVisible(uf),uf||this.clearState()}),mo(this,"updateSelected",(uf,df)=>new Promise(gf=>{this.state.selectedAnnotation&&(df?this.state.selectedAnnotation.isSelection?this.onCreateOrUpdateAnnotation("onAnnotationCreated",gf)(uf):this.onCreateOrUpdateAnnotation("onAnnotationUpdated",gf)(uf,this.state.selectedAnnotation):this.setState({selectedAnnotation:uf,beforeHeadlessModify:this.state.beforeHeadlessModify||this.state.selectedAnnotation},gf))})),this.state={selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,readOnly:xo.config.readOnly,editorDisabled:xo.config.disableEditor,widgets:xo.config.widgets,beforeHeadlessModify:null},this._editor=Zg.createRef()}componentDidMount(){this.annotationLayer=this.props.config.gigapixelMode?new B3(this.props):new w3(this.props),this.annotationLayer.on("startSelection",this.handleStartSelect),this.annotationLayer.on("select",this.handleSelect),this.annotationLayer.on("updateTarget",this.handleUpdateTarget),this.annotationLayer.on("viewportChange",this.handleViewportChange),this.forwardEvent("mouseEnterAnnotation","onMouseEnterAnnotation"),this.forwardEvent("mouseLeaveAnnotation","onMouseLeaveAnnotation"),this.forwardEvent("clickAnnotation","onClickAnnotation"),document.addEventListener("keyup",this.escapeKeyCancel)}componentWillUnmount(){this.annotationLayer.destroy(),document.removeEventListener("keyup",this.escapeKeyCancel)}get disableEditor(){return this.state.editorDisabled}set disableEditor(xo){this.setState({editorDisabled:xo},()=>{xo?document.addEventListener("keyup",this.escapeKeyCancel):document.removeEventListener("keyup",this.escapeKeyCancel)})}get disableSelect(){return this.annotationLayer.disableSelect}set disableSelect(xo){this.annotationLayer.disableSelect=xo}get readOnly(){return this.state.readOnly}set readOnly(xo){this.annotationLayer.readOnly=xo,this.setState({readOnly:xo})}get widgets(){return this.state.widgets}set widgets(xo){this.setState({widgets:xo})}render(){var xo;const uf=this.state.selectedAnnotation&&!this.state.editorDisabled,df=this.state.readOnly||((xo=this.state.selectedAnnotation)==null?void 0:xo.readOnly);return uf&&kf(AA,{ref:this._editor,detachable:!0,wrapperEl:this.props.wrapperEl,annotation:this.state.selectedAnnotation,modifiedTarget:this.state.modifiedTarget,selectedElement:this.state.selectedDOMElement,readOnly:df,allowEmpty:this.props.config.allowEmpty,widgets:this.state.widgets,env:this.props.env,onAnnotationCreated:this.onCreateOrUpdateAnnotation("onAnnotationCreated"),onAnnotationUpdated:this.onCreateOrUpdateAnnotation("onAnnotationUpdated"),onAnnotationDeleted:this.onDeleteAnnotation,onCancel:this.onCancelAnnotation})}}class z3{constructor(xo,uf){mo(this,"handleAnnotationCreated",(gf,Ef)=>this._emitter.emit("createAnnotation",gf.underlying,Ef)),mo(this,"handleAnnotationDeleted",gf=>this._emitter.emit("deleteAnnotation",gf.underlying)),mo(this,"handleAnnotationSelected",(gf,Ef)=>this._emitter.emit("selectAnnotation",gf.underlying,Ef)),mo(this,"handleAnnotationUpdated",(gf,Ef)=>this._emitter.emit("updateAnnotation",gf.underlying,Ef.underlying)),mo(this,"handleCancelSelected",gf=>this._emitter.emit("cancelSelected",gf.underlying)),mo(this,"handleClickAnnotation",(gf,Ef)=>this._emitter.emit("clickAnnotation",gf.underlying,Ef)),mo(this,"handleSelectionCreated",gf=>this._emitter.emit("createSelection",gf.underlying)),mo(this,"handleSelectionStarted",gf=>this._emitter.emit("startSelection",gf)),mo(this,"handleSelectionTargetChanged",gf=>this._emitter.emit("changeSelectionTarget",gf)),mo(this,"handleMouseEnterAnnotation",(gf,Ef)=>this._emitter.emit("mouseEnterAnnotation",gf.underlying,Ef)),mo(this,"handleMouseLeaveAnnotation",(gf,Ef)=>this._emitter.emit("mouseLeaveAnnotation",gf.underlying,Ef)),mo(this,"_wrap",gf=>(gf==null?void 0:gf.type)==="Annotation"?new C2(gf):gf),mo(this,"addAnnotation",gf=>this._app.current.addAnnotation(new C2(gf))),mo(this,"addDrawingTool",gf=>this._app.current.addDrawingTool(gf)),mo(this,"cancelSelected",()=>this._app.current.cancelSelected()),mo(this,"clearAnnotations",()=>this.setAnnotations([])),mo(this,"clearAuthInfo",()=>this._env.user=null),mo(this,"destroy",()=>Zg.unmountComponentAtNode(this.appContainerEl)),mo(this,"fitBounds",(gf,Ef)=>this._app.current.fitBounds(this._wrap(gf),Ef)),mo(this,"getAnnotationById",gf=>{const Ef=this._app.current.getAnnotationById(gf);return Ef==null?void 0:Ef.underlying}),mo(this,"getAnnotations",()=>this._app.current.getAnnotations().map(gf=>gf.underlying)),mo(this,"getSelected",()=>{const gf=this._app.current.getSelected();return gf==null?void 0:gf.underlying}),mo(this,"getSelectedImageSnippet",()=>this._app.current.getSelectedImageSnippet()),mo(this,"listDrawingTools",()=>this._app.current.listDrawingTools()),mo(this,"loadAnnotations",gf=>fetch(gf).then(Ef=>Ef.json()).then(Ef=>(this.setAnnotations(Ef),Ef))),mo(this,"off",(gf,Ef)=>this._emitter.off(gf,Ef)),mo(this,"on",(gf,Ef)=>this._emitter.on(gf,Ef)),mo(this,"once",(gf,Ef)=>this._emitter.once(gf,Ef)),mo(this,"panTo",(gf,Ef)=>this._app.current.panTo(this._wrap(gf),Ef)),mo(this,"removeAnnotation",gf=>this._app.current.removeAnnotation(this._wrap(gf))),mo(this,"removeDrawingTool",gf=>this._app.current.removeDrawingTool(gf)),mo(this,"saveSelected",()=>this._app.current.saveSelected()),mo(this,"selectAnnotation",gf=>{const Ef=this._app.current.selectAnnotation(this._wrap(gf));return Ef==null?void 0:Ef.underlying}),mo(this,"setAnnotations",gf=>{const Ef=(gf||[]).map(Rf=>new C2(Rf));this._app.current.setAnnotations(Ef)}),mo(this,"setAuthInfo",gf=>this._env.user=gf),mo(this,"setDrawingEnabled",gf=>this._app.current.setDrawingEnabled(gf)),mo(this,"setDrawingTool",gf=>this._app.current.setDrawingTool(gf)),mo(this,"setServerTime",gf=>this._env.setServerTime(gf)),mo(this,"setVisible",gf=>this._app.current.setVisible(gf)),mo(this,"updateSelected",(gf,Ef)=>{let Rf=null;gf.type==="Annotation"?Rf=new C2(gf):gf.type==="Selection"&&(Rf=new xT(gf.target,gf.body)),Rf&&this._app.current.updateSelected(Rf,Ef)});const df=uf||{};this._app=Zg.createRef(),this._emitter=new Z1,this._env=BA(),this._element=xo.element,window.getComputedStyle(this._element).getPropertyValue("position")==="static"&&(this._element.style.position="relative"),jA(df.locale,df.messages),this.appContainerEl=document.createElement("DIV"),this._element.appendChild(this.appContainerEl),Zg.render(kf(j3,{ref:this._app,viewer:xo,wrapperEl:this._element,config:df,env:this._env,onSelectionStarted:this.handleSelectionStarted,onSelectionCreated:this.handleSelectionCreated,onSelectionTargetChanged:this.handleSelectionTargetChanged,onAnnotationCreated:this.handleAnnotationCreated,onAnnotationSelected:this.handleAnnotationSelected,onAnnotationUpdated:this.handleAnnotationUpdated,onAnnotationDeleted:this.handleAnnotationDeleted,onCancelSelected:this.handleCancelSelected,onClickAnnotation:this.handleClickAnnotation,onMouseEnterAnnotation:this.handleMouseEnterAnnotation,onMouseLeaveAnnotation:this.handleMouseLeaveAnnotation}),this.appContainerEl)}get disableEditor(){return this._app.current.disableEditor}set disableEditor(xo){this._app.current.disableEditor=xo}get disableSelect(){return this._app.current.disableSelect}set disableSelect(xo){this._app.current.disableSelect=xo}get readOnly(){return this._app.current.readOnly}set readOnly(xo){this._app.current.readOnly=xo}get widgets(){return this._app.current.widgets}set widgets(xo){this._app.current.widgets=xo}}var H3=(go,xo)=>new z3(go,xo);return H3})})(openseadragonAnnotorious_min);var openseadragonAnnotorious_minExports=openseadragonAnnotorious_min.exports;const Annotorious=getDefaultExportFromCjs$3(openseadragonAnnotorious_minExports);class GithubClient{constructor(W){this._shas={},this.authToken=W}b64EncodeUnicode(W){return btoa(encodeURIComponent(W).replace(/%([0-9A-F]{2})/g,function(q,K){return String.fromCharCode(parseInt(K,16))}))}b64DecodeUnicode(W){return decodeURIComponent(Array.prototype.map.call(atob(W),function(q){return"%"+("00"+q.charCodeAt(0).toString(16)).slice(-2)}).join(""))}user(){return fetch("https://api.github.com/user",{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}}).then(W=>W.json())}async isCollaborator(W,q,K){let X=`https://api.github.com/repos/${W}/${q}/collaborators/${K}`,tt=await fetch(X,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}});return tt.ok&&tt.status===204}organizations(){return fetch("https://api.github.com/user/orgs",{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}}).then(W=>W.json())}repos(W="",q=""){let K=W?`users/${W}`:q?`orgs/${q}`:"user";return fetch(`https://api.github.com/${K}/repos?per_page=100`,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}}).then(X=>X.json())}async createRepository({org:W=null,name:q="",description:K="",auto_init:X=!0}){let tt=W?`https://api.github.com/orgs/${W}/repos`:"https://api.github.com/user/repos",rt=await fetch(tt,{method:"POST",body:JSON.stringify({name:q,description:K,auto_init:X}),headers:{Authorization:`Token ${this.authToken}`}});return{status:rt.status,statusText:rt.statusText}}branches(W,q){return fetch(`https://api.github.com/repos/${W}/${q}/branches`,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}}).then(K=>K.json())}async getFile(W,q,K,X){var ut;let tt=((ut=window.config)==null?void 0:ut.source)||{};W=W||tt.owner,q=q||tt.repository,X=X||tt.branch;let rt=`https://api.github.com/repos/${W}/${q}/contents/${K}?ref=${X}`,ot=this.authToken?await fetch(rt,{headers:{Authorization:`Token ${this.authToken}`}}):await fetch(rt);return ot.status===200?(ot=await ot.json(),{sha:ot.sha,content:JSON.parse(decodeURIComponent(escape(atob(ot.content))))}):ot.status===403||ot.status===401?(rt=`https://raw.githubusercontent.com/${W}/${q}/${X}/${K}`,ot=await fetch(rt),ot.ok?(ot=await ot.json(),{sha:null,content:ot}):null):null}async getSha(W,q,K,X){let tt=`https://api.github.com/repos/${W}/${q}/contents/${K}`;X&&(tt+=`?ref=${X}`);let rt=await fetch(tt,{headers:{Authorization:`Token ${this.authToken}`}});return rt.ok&&(rt=await rt.json()),rt.sha}async putFile(W,q,K,X,tt,rt=!1,ot=""){let ut=`https://api.github.com/repos/${W}/${q}/contents/${K}`,yn=`${W}/${q}/${tt}/${K}`;ot=ot||this._shas[yn]||await this.getSha(W,q,K,tt);let uo={message:"API commit",content:rt?btoa(X):this.b64EncodeUnicode(X)};tt&&(uo.branch=tt),ot&&(uo.sha=ot);let po=await fetch(ut,{method:"PUT",body:JSON.stringify(uo),headers:{Authorization:`Token ${this.authToken}`}});return po.ok&&(ot=(await po.json()).content.sha,this._shas[yn]=ot),{status:po.status,statusText:po.statusText,sha:ot}}async deleteFile(W,q,K,X,tt=""){tt=tt||await this.getSha(W,q,K,X);let rt=`https://api.github.com/repos/${W}/${q}/contents/${K}`,ut=await fetch(rt,{method:"DELETE",body:JSON.stringify({message:"API commit",sha:tt}),headers:{Authorization:`Token ${this.authToken}`}});ut=await ut.json()}async defaultBranch(W,q){let K=null,X=`https://api.github.com/repos/${W}/${q}`,tt=await fetch(X,{headers:{Authorization:`Token ${this.authToken}`}});return tt.ok&&(tt=await tt.json(),K=tt.default_branch),K}async dirlist(W,q,K,X){var yn;K=K||"",X=X||await this.defaultBranch(W,q);let tt=[],rt=`https://api.github.com/repos/${W}/${q}/git/trees/${X}`,ot={Authorization:`Token ${this.authToken}`,Accept:"application/vnd.github.v3+json","If-None-Match":""},ut=K.split("/").filter(uo=>uo);for(let uo=0;uolf.path===ut[uo]):null;if(rt=wo?wo.url:null,!rt)break}if(rt){let uo=await fetch(rt,{headers:ot});tt=((uo.ok?await uo.json():{}).tree||[]).map(mo=>({name:mo.path,sha:mo.sha,type:mo.type==="tree"?"dir":"file"}))}return tt}async fullPath(W,q,K,X,tt=!1){let rt=K.split("/").filter(uo=>uo),ot=rt[rt.length-1],ut=await this.dirlist(W,q,rt.join("/"),X);if(ut.length===0&&(rt.pop(),ut=await this.dirlist(W,q,rt.join("/"),X)),!tt){let uo=[ot,`${ot}.md`,"README.md"];for(let po=0;pomo.type==="file"&&mo.name===uo[po])){rt.push(uo[po]);break}}return rt.join("/")}async userCanUpdateRepo(W,q){return this.user().then(K=>K.login).then(K=>q?this.isCollaborator(W,q,K):!1)}}class Annotator{constructor(W,q="",K=!1){this.ref="main",this.imageId="",this.sha="",this.visible=!1,this.ghAuthToken="",this.selected=null,this.osd=W,this.base=q;let[X,tt,...rt]=this.base.split("/");this.acct=X,this.repo=tt,this.basePath=rt.join("/"),this.annotorious=Annotorious(W,{readOnly:!K}),this.annotorious.on("createAnnotation",async ot=>this.createAnnotation(ot)),this.annotorious.on("updateAnnotation",async ot=>this.updateAnnotation(ot)),this.annotorious.on("deleteAnnotation",async ot=>this.deleteAnnotation(ot)),this.annotorious.on("selectAnnotation",async ot=>this.onSelect(ot)),this.setVisible(!0),this.ghAuthToken=localStorage.getItem("gh-auth-token")||"",this.ghClient=new GithubClient(this.ghAuthToken)}async loadAnnotations(W){this.imageId=W,this.setVisible(!1);let q=[],K=await this.ghClient.getFile(this.acct,this.repo,`${this.basePath}/${this.imageId}.json`,this.ref);return K!=null&&K.content&&(q=K.content,this.sha=K.sha),this.annotorious.setAnnotations(q),this.annotorious.readOnly&&q.forEach(X=>{let tt=this.annoEl(X.id);tt&&(tt.addEventListener("mouseenter",()=>this.select(X.id)),tt.addEventListener("mouseleave",()=>this.deselect()),tt.addEventListener("click",()=>navigator.clipboard.writeText(X.id)))}),q}setVisible(W){this.visible=W;let q=this.osd.element.querySelector(".a9s-annotationlayer");q&&(q.style.visibility=this.visible?"visible":"hidden",q.style.display=this.visible?"inline":"none"),Array.from(this.osd.element.querySelectorAll(".a9s-annotation")).forEach(K=>K.style.visibility=this.visible?"visible":"hidden")}toggleVisibility(W){W&&W.stopPropagation(),this.setVisible(!this.visible)}onSelect(W){this.selected=W.id,navigator.clipboard&&navigator.clipboard.writeText(this.selected)}annoEl(W){return this.osd.element.querySelector(`[data-id="${W}"]`)}getAnnotation(W){return this.annotorious.getAnnotations().find(q=>q.id===W)}getAnnotationRegion(W){return this.getAnnotation(W).target.selector.value.replace(/xywh=pixel:/g,"")}select(W){if(W!==this.selected){if(this.setVisible(!0),this.selected=W,this.osd.element.querySelectorAll(".a9s-annotation").forEach(q=>{q.dataset.id===W?(q.style.visibility="visible",q.classList.add("selected"),this.annotorious.selectAnnotation(W)):q.style.visibility="hidden"}),this.selected){let q=this.annoEl(W);q&&(q.style.visibility="visible")}}else this.setVisible(!1),this.deselect()}deselect(){Array.from(this.osd.element.querySelectorAll(".a9s-annotation")).forEach(W=>W.style.visibility=this.visible?"visible":"hidden"),this.annotorious.cancelSelected(),this.selected=void 0}async saveAnnotations(){let W=JSON.stringify(this.annotorious.getAnnotations(),null,2);await this.ghClient.putFile(this.acct,this.repo,`${this.basePath}${this.basePath?"/":""}${this.imageId}.json`,W,this.ref,!1,this.sha)}async createAnnotation(W){W.id=sha256(W.id).slice(0,8),W.target.id=this.imageId,this.saveAnnotations(),navigator.clipboard&&navigator.clipboard.writeText(W.id)}async updateAnnotation(W){W.target.id=this.imageId,this.saveAnnotations(),navigator.clipboard&&navigator.clipboard.writeText(W.id)}async deleteAnnotation(W){this.saveAnnotations()}}const _hoisted_1$g=["src"],_hoisted_2$d=["aria-label","alt"],_hoisted_3$c=["innerHTML"],_hoisted_4$b={class:"status"},_hoisted_5$9={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_6$8=createBaseVNode("path",{d:"M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"},null,-1),_hoisted_7$6=[_hoisted_6$8],_hoisted_8$5={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_9$6=createBaseVNode("path",{d:"M441 58.9L453.1 71c9.4 9.4 9.4 24.6 0 33.9L424 134.1 377.9 88 407 58.9c9.4-9.4 24.6-9.4 33.9 0zM209.8 256.2L344 121.9 390.1 168 255.8 302.2c-2.9 2.9-6.5 5-10.4 6.1l-58.5 16.7 16.7-58.5c1.1-3.9 3.2-7.5 6.1-10.4zM373.1 25L175.8 222.2c-8.7 8.7-15 19.4-18.3 31.1l-28.6 100c-2.4 8.4-.1 17.4 6.1 23.6s15.2 8.5 23.6 6.1l100-28.6c11.8-3.4 22.5-9.7 31.1-18.3L487 138.9c28.1-28.1 28.1-73.7 0-101.8L474.9 25C446.8-3.1 401.2-3.1 373.1 25zM88 64C39.4 64 0 103.4 0 152V424c0 48.6 39.4 88 88 88H360c48.6 0 88-39.4 88-88V312c0-13.3-10.7-24-24-24s-24 10.7-24 24V424c0 22.1-17.9 40-40 40H88c-22.1 0-40-17.9-40-40V152c0-22.1 17.9-40 40-40H200c13.3 0 24-10.7 24-24s-10.7-24-24-24H88z"},null,-1),_hoisted_10$6=[_hoisted_9$6],_hoisted_11$6={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_12$6=createBaseVNode("path",{d:"M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"},null,-1),_hoisted_13$6=[_hoisted_12$6],_hoisted_14$5={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_15$4=createBaseVNode("path",{d:"M441 58.9L453.1 71c9.4 9.4 9.4 24.6 0 33.9L424 134.1 377.9 88 407 58.9c9.4-9.4 24.6-9.4 33.9 0zM209.8 256.2L344 121.9 390.1 168 255.8 302.2c-2.9 2.9-6.5 5-10.4 6.1l-58.5 16.7 16.7-58.5c1.1-3.9 3.2-7.5 6.1-10.4zM373.1 25L175.8 222.2c-8.7 8.7-15 19.4-18.3 31.1l-28.6 100c-2.4 8.4-.1 17.4 6.1 23.6s15.2 8.5 23.6 6.1l100-28.6c11.8-3.4 22.5-9.7 31.1-18.3L487 138.9c28.1-28.1 28.1-73.7 0-101.8L474.9 25C446.8-3.1 401.2-3.1 373.1 25zM88 64C39.4 64 0 103.4 0 152V424c0 48.6 39.4 88 88 88H360c48.6 0 88-39.4 88-88V312c0-13.3-10.7-24-24-24s-24 10.7-24 24V424c0 22.1-17.9 40-40 40H88c-22.1 0-40-17.9-40-40V152c0-22.1 17.9-40 40-40H200c13.3 0 24-10.7 24-24s-10.7-24-24-24H88z"},null,-1),_hoisted_16$4=[_hoisted_15$4],_hoisted_17$4={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_18$4=createBaseVNode("path",{d:"M160 368c26.5 0 48 21.5 48 48v16l72.5-54.4c8.3-6.2 18.4-9.6 28.8-9.6H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H64c-8.8 0-16 7.2-16 16V352c0 8.8 7.2 16 16 16h96zm48 124l-.2 .2-5.1 3.8-17.1 12.8c-4.8 3.6-11.3 4.2-16.8 1.5s-8.8-8.2-8.8-14.3V474.7v-6.4V468v-4V416H112 64c-35.3 0-64-28.7-64-64V64C0 28.7 28.7 0 64 0H448c35.3 0 64 28.7 64 64V352c0 35.3-28.7 64-64 64H309.3L208 492z"},null,-1),_hoisted_19$3=[_hoisted_18$4],_hoisted_20$3={variant:"primary",pill:""},_hoisted_21$3=["manifest","caption","description","annoid"],_sfc_main$i=defineComponent({__name:"Image.ce",props:{active:{type:Boolean,default:!1},base:{type:String},caption:{type:String},data:{type:String},fit:{type:String,default:"contain"},format:{type:String},height:{type:Number},manifest:{type:String},noCaption:{type:Boolean,default:!1},options:{type:String},refresh:{type:Boolean,default:!1},region:{type:String},repoIsWritable:{type:Boolean,default:!1},quality:{type:String},rotate:{type:Number},rotation:{type:String},seq:{type:Number,default:1},size:{type:String},slot:{type:String},src:{type:String},static:{type:Boolean,default:!1},width:{type:Number},zoomOnScroll:{type:Boolean,default:!1},attribution:{type:String},description:{type:String},label:{type:String},license:{type:String},owner:{type:String},summary:{type:String},title:{type:String},url:{type:String}},setup(F){const W=F,q=ref(),K=computed(()=>{var Of,qf;return(qf=(Of=q.value)==null?void 0:Of.getRootNode())==null?void 0:qf.host}),X=computed(()=>{var Of;return(Of=q==null?void 0:q.value)==null?void 0:Of.parentNode});watch$1(X,Of=>{Of.children[1].classList.remove("sticky")}),watch$1(W,()=>{ip()});const tt=self.window,rt=ref(tt.config||{}),ot=computed(()=>{var Of;if((Of=rt.value.source)!=null&&Of.owner)return rt.value.source;if(W.base){let[qf,cp,hp,...$p]=W.base.split("/");return{owner:qf,repository:cp,branch:hp,dir:$p?`/${$p.join("/")}/`:"/"}}return null}),ut=computed(()=>{var Of,qf,cp,hp;return`https://raw.githubusercontent.com/${(Of=ot.value)==null?void 0:Of.owner}/${(qf=ot.value)==null?void 0:qf.repository}/${(cp=ot.value)==null?void 0:cp.branch}/${(hp=ot.value)==null?void 0:hp.dir.replace(/\/(README|index)\.md$/,"")}`}),yn=ref(null),uo=ref(),po=computed(()=>{var _p;let Of=yf.value[vf.value]&&ap({type:"Annotation",motivation:"painting"},yf.value[vf.value],lf.value[vf.value].seq||1).body;if(!Of)return"";let qf,[cp,hp,$p,...Vp]=((_p=W.options)==null?void 0:_p.split("/"))||[],[bp,Ep]=Vp;return cp=W.region||cp||"full",hp=W.size?W.size:hp||(Lf.value?kf.value?`${Lf.value},${kf.value}`:`${Lf.value},`:kf.value?`,${kf.value}`:"400,"),$p=W.rotation||$p||"0",bp=W.quality||bp||"default",Ep=W.format||Ep||"jpg",qf=`${Of.service[0].id||Of.service[0]["@id"]}/${cp}/${hp}/${$p}/${bp}.${Ep}`,qf}),mo=computed(()=>{let Of=new URLSearchParams(tt.location.search).get("refresh");return W.refresh||Of==="true"||Of===""}),wo=ref(0);watch$1(wo,()=>{Np(),wo.value>0&&(!cf.value.length||W.static)&&Df(),wo.value>0&&!Nf.value&&jp()});const lf=ref([]);watch$1(lf,async Of=>{yf.value=await Promise.all(Of.map(qf=>qf.src||qf.manifest?getManifest(qf.src||qf.manifest,mo.value):fetch(`https://${iiifServer}/manifest/${mo.value?"?refresh":""}`,{method:"POST",body:JSON.stringify(Object.fromEntries(Object.entries(qf).filter(([cp,hp])=>["attribution","caption","description","fit","label","license","summary","title","url"].includes(cp)).map(([cp,hp])=>(cp==="url"&&hp.indexOf("http")<0&&(hp=hp.indexOf("wc:")===0?mwImage(hp.slice(3),0):hp.indexOf("gh:")===0?`${ut.value}/${hp.slice(3)}`:`${ut.value}/${hp}`),[cp,hp]))))}).then(cp=>cp.json()))).then(qf=>qf.flat().filter(cp=>cp))});const yf=ref([]),cf=computed(()=>yf.value.map((Of,qf)=>{var hp;let cp=(hp=ap({type:"Annotation",motivation:"painting"},Of,lf.value[qf].seq||1))==null?void 0:hp.body;return cp.service?`${cp.service[0].id||cp.service[0]["@id"]}/info.json`:{url:cp.id,type:"image",buildPyramid:!0}}));watch$1(cf,Of=>{var qf;(qf=Nf.value)==null||qf.open(Of)});const vf=ref(0),_f=computed(()=>yf.value[vf.value]&&ap({type:"Annotation",motivation:"painting"},yf.value[vf.value],lf.value[vf.value].seq||1).body),$f=computed(()=>{var Of;return _f.value&&sha256(decodeURIComponent((Of=_f.value.id)==null?void 0:Of.split("/").pop().toLowerCase().replace(".jpeg",".jpg"))).slice(0,8)});watch$1($f,async Of=>Cf.value=uo.value?await uo.value.loadAnnotations(Of)||[]:0);const wf=ref(!1),Pf=ref(!1);watch$1(Pf,()=>uo.value.setVisible(Pf.value));const Cf=ref([]);function Af(){Pf.value=!Pf.value}const Bf=computed(()=>_f.value&&{width:_f.value.width,height:_f.value.height}),Hf=computed(()=>{var Of,qf;return Number(((((Of=Bf.value)==null?void 0:Of.width)||1)/(((qf=Bf.value)==null?void 0:qf.height)||1)).toFixed(4))});watch$1(Hf,()=>{Np()});function Df(){function Of(cp){var bp;let hp=[];cp=cp.replace(/”/g,'"').replace(/”/g,'"'),(bp=cp==null?void 0:cp.match(/[^\s"]+|"([^"]*)"/gmi))==null||bp.filter(Ep=>Ep).forEach(Ep=>{hp.length>0&&hp[hp.length-1].indexOf("=")===hp[hp.length-1].length-1?hp[hp.length-1]=`${hp[hp.length-1]}${Ep}`:hp.push(Ep)});let $p={},Vp=["src","caption","options","fit","rotate","seq"];return hp.filter(Ep=>Ep!=="image").forEach((Ep,_p)=>{if(Ep.indexOf("=")>0){let Mp=Ep.indexOf("="),Yp=Ep.slice(0,Mp),ug=Ep.slice(Mp+1);$p[Yp]=ug[0]==='"'?ug.slice(1,-1):ug}else $p[Vp[_p]]=Ep[0]==='"'?Ep.slice(1,-1):Ep}),$p}function qf(){let cp=new Set(["attribution","caption","description","fit","label","license","manifest","noCaption","region","rotate","seq","src","summary","title","url"]),hp=W.src||W.url||W.manifest?Object.fromEntries(Object.entries(W).filter(([Vp,bp])=>cp.has(Vp)&&bp)):null,$p=hp?[hp]:[];Array.from(K.value.querySelectorAll("li")).map(Vp=>Of(Vp.textContent||"")).filter(Vp=>Vp.src||Vp.manifest||Vp.url).forEach((Vp,bp)=>$p.push({...Vp,idx:bp})),$p.forEach(Vp=>{Vp.src&&Vp.src.indexOf("http")<0&&(/^[\w-]+:/.test(Vp.src)||(Vp.src=`gh:${ot.value.owner}/${ot.value.repository}${ot.value.dir}/${Vp.src}`))}),lf.value=$p}new MutationObserver(cp=>{for(let hp of cp)hp.type==="childList"&&qf()}).observe(K.value,{childList:!0,subtree:!0,characterData:!0}),qf()}watch$1(yn,()=>{var Of;yn.value&&!Lf.value&&(new ResizeObserver(()=>{var qf;wo.value=((qf=yn.value)==null?void 0:qf.clientWidth)||wo.value}).observe(yn.value),wo.value=(Of=yn.value)==null?void 0:Of.clientWidth)});const Lf=ref(0);watch$1(Lf,Of=>{var qf;(qf=q.value)==null||qf.setAttribute("style",`width: ${W.width}px; margin: auto;`),wo.value=Of});const kf=ref(0);watch$1(kf,Of=>{K.value.style.height=Of?`${Of}px`:"unset",vp(),setTimeout(()=>{var qf,cp;return(cp=(qf=Nf.value)==null?void 0:qf.viewport)==null?void 0:cp.goHome(!1)},250)});const Nf=ref(),Yf=computed(()=>{var Of,qf,cp;return W.caption||yf.value[vf.value]&&((cp=(qf=(Of=yf.value[vf.value])==null?void 0:Of.label)==null?void 0:qf.en)==null?void 0:cp[0])}),Gf=ref(),rp=ref(!1);function ip(){W.active&&!rp.value&&(rp.value=!0),Lf.value=W.width||0,kf.value=W.height||0}onMounted(()=>{ip()});function ap(Of,qf,cp=1){const hp=yp(Of,qf);return hp.length>=cp?hp[cp-1]:null}function yp(Of,qf,cp=[]){if(cp=cp||[],qf!=null&&qf.items)for(let hp=0;hp$p[bp]&&$p[bp]!==Ep)?cp.push($p):yp(Of,$p,cp)}return cp}function vp(){var Of,qf,cp,hp;(Of=yn.value)!=null&&Of.clientWidth&&(kf.value?(qf=yn.value)==null||qf.setAttribute("style","flex: 1 1 0%; position: relative"):(hp=yn.value)==null||hp.setAttribute("style",`height: ${Number(((cp=yn.value)==null?void 0:cp.clientWidth)/Hf.value).toFixed(0)}px;`))}function Np(){vp(),setTimeout(()=>{var Of,qf;return(qf=(Of=Nf.value)==null?void 0:Of.viewport)==null?void 0:qf.goHome(!1)},250)}function jp(){var bp,Ep,_p,Mp,Yp;if(Nf.value||!yn.value)return;vp();const Of={element:yn.value,prefixUrl:"https://openseadragon.github.io/openseadragon/images/",homeFillsViewer:W.fit==="cover",maxZoomPixelRatio:10,sequenceMode:!0,showReferenceStrip:!0};Nf.value=OpenSeadragon(Of),Nf.value.addHandler("viewport-change",()=>kp()),Nf.value.addHandler("page",ug=>{vf.value=ug.page}),Nf.value.world.addHandler("add-item",ug=>{let hg=lf.value[vf.value];if(hg!=null&&hg.rotate&&ug.item.setRotation(parseInt(hg.rotate),!0),hg!=null&&hg.region&&Nf.value){let xg=Dp(hg.region,Nf.value);setTimeout(()=>{var kg;return(kg=Nf.value)==null?void 0:kg.viewport.fitBounds(xg,!1)},100)}}),Ip(),Jp(),setTimeout(()=>Lp(),500),cf.value.length&&((bp=Nf.value)==null||bp.open(cf.value));let qf=(Ep=ot.value)==null?void 0:Ep.owner,cp=(_p=ot.value)==null?void 0:_p.repository,hp,$p=(Mp=ot.value)==null?void 0:Mp.dir.split("/").filter(ug=>ug),Vp=(Yp=new URL(location.href).searchParams.get("source"))==null?void 0:Yp.split("/").filter(ug=>ug).filter(ug=>!/\.md$/.test(ug));Vp&&([qf,cp,hp,...$p]=Vp),uo.value=new Annotator(Nf.value,`${qf}/${cp}${$p!=null&&$p.length?"/":""}${($p||[]).join("/")}`,W.repoIsWritable),$f.value&&uo.value.loadAnnotations($f.value).then(ug=>Cf.value=ug)}function Ip(){W.zoomOnScroll||new OpenSeadragonViewerInputHook({viewer:Nf.value,hooks:[{tracker:"viewer",handler:"scrollHandler",hookHandler:Of=>{var qf;return!((qf=Nf.value)!=null&&qf.isFullPage())&&!Of.originalEvent.ctrlKey&&(Of.preventDefaultAction=!0,Of.stopHandlers=!0),!0}}]})}function Jp(){var qf;let Of=(qf=K.value)==null?void 0:qf.parentElement;for(;Of;)Array.from(Of.querySelectorAll("a")).filter(cp=>cp.href!=="javascript:;").forEach(async cp=>{var bp;let $p=new URL(cp.href).pathname.split("/").filter(Ep=>Ep).map(Ep=>Ep.toLowerCase()).map(Ep=>Ep==="zoomto"?"zoom":Ep),Vp=$p.indexOf("zoom");if(Vp>=0){let Ep=/^(pct:|pixel:|px:)?[-+\d.]+,[-+\d.]+,[-+\d.]+,[-+\d.]+$/.test($p[Vp+1])?$p[Vp+1]:"",_p=$p.slice(Vp+1).find(kg=>kg.length===8&&/^[0-9a-f]+$/.test(kg)),Mp=$p.slice(Vp+2).filter(kg=>kg==="click"||kg==="mouseover")[0]||"click",Yp=$p.slice(Vp+2).filter(kg=>kg!=="click"&&kg!=="mouseover"&&kg!==_p)[0],ug,hg,xg=cp.parentElement;for(;xg&&!hg;)hg=xg.dataset.id,xg=xg.parentElement;if(hg){let kg=(bp=K.value)==null?void 0:bp.dataset.id;if(kg&&kg!==hg)return}if(Yp&&(ug=document.getElementById(Yp),!ug)||(ug=ng(cp,"ve-image"),ug!==K.value))return;cp.classList.add("zoom"),cp.href="javascript:;",Ep&&cp.setAttribute("data-region",Ep),_p&&cp.setAttribute("data-annoid",_p),cp.addEventListener(Mp,kg=>{var Rp,Fp;let Dg=cp,lm=Dg.getAttribute("data-region")||((Rp=Dg==null?void 0:Dg.parentElement)==null?void 0:Rp.getAttribute("data-region")),Bp=Dg.getAttribute("data-annoId")||((Fp=Dg==null?void 0:Dg.parentElement)==null?void 0:Fp.getAttribute("data-annoId"));lm&&vg(lm),Bp&&uo.value.select(Bp)})}}),Of=Of.parentElement}function ng(Of,qf){let cp,hp=Of.parentElement;for(;hp&&!cp;)cp=hp.querySelector(qf),hp=hp.parentElement;return cp}let og="";function vg(Of){var cp,hp;Of=Of.replace(/^zoom\|/i,"");const qf=Of==null?void 0:Of.match(/^(?(pct:|pixel:|px:)?[+-\d.]+,[+-\d.]+,[+-\d.]+,[+-\d.]+)?$/);if(qf){let $p=(cp=qf==null?void 0:qf.groups)==null?void 0:cp.region;if($p){if(og===$p)(hp=Nf.value)==null||hp.viewport.goHome(),og="";else if(og=$p,Nf.value){let Vp=Dp($p,Nf.value);Nf.value.viewport.fitBounds(Vp,!1)}}}}function Dp(Of,qf){let cp;const hp=Of.split(":");let[$p,Vp,bp,Ep]=hp[hp.length-1].split(",").map(Mp=>parseInt(Mp));const _p=qf.world.getItemAt(0).getContentSize();return hp.length===2&&(hp[0]==="pct"||hp[0]==="percent")&&($p=Math.round(_p.x*$p/100),Vp=Math.round(_p.y*Vp/100),bp=Math.round(_p.x*bp/100),Ep=Math.round(_p.y*Ep/100)),cp=qf.viewport.imageToViewportRectangle($p,Vp,bp,Ep),cp}function Lp(){var qf,cp;const Of=(qf=Nf.value)==null?void 0:qf.world.getItemAt(0);if(Of){let hp=(cp=Nf.value)==null?void 0:cp.viewport.getBounds();const $p=hp?Of.viewportToImageRectangle(hp):null;Gf.value=$p?`${Math.ceil($p.x)},${Math.ceil($p.y)},${Math.ceil($p.width)},${Math.ceil($p.height)}`:""}}let xp=null;function kp(){xp!==null&&(clearTimeout(xp),xp=null),xp=tt.setTimeout(()=>Lp(),100)}function lp(Of){navigator.clipboard&&navigator.clipboard.writeText(Of)}return(Of,qf)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:q,class:"image"},[F.static&&po.value?(openBlock(),createElementBlock("img",{key:0,src:po.value,style:{width:"100%"}},null,8,_hoisted_1$g)):cf.value?(openBlock(),createElementBlock("div",{key:1,ref_key:"osdEl",ref:yn,class:normalizeClass(wf.value?"osd edit":"osd view"),id:"osd",role:"img","aria-label":Yf.value,alt:Yf.value},[Gf.value?(openBlock(),createElementBlock("div",{key:0,class:"coords",innerHTML:Gf.value,onClick:qf[0]||(qf[0]=cp=>lp(Gf.value||""))},null,8,_hoisted_3$c)):createCommentVNode("",!0)],10,_hoisted_2$d)):createCommentVNode("",!0),createBaseVNode("div",_hoisted_4$b,[Cf.value.length===0&&F.repoIsWritable?(openBlock(),createElementBlock("div",{key:0,class:"annotations-indicator",onClick:Af},[Pf.value?(openBlock(),createElementBlock("svg",_hoisted_5$9,_hoisted_7$6)):(openBlock(),createElementBlock("svg",_hoisted_8$5,_hoisted_10$6))])):Cf.value.length>0?(openBlock(),createElementBlock("div",{key:1,class:"annotations-indicator",onClick:Af},[F.repoIsWritable&&Pf.value?(openBlock(),createElementBlock("svg",_hoisted_11$6,_hoisted_13$6)):F.repoIsWritable?(openBlock(),createElementBlock("svg",_hoisted_14$5,_hoisted_16$4)):(openBlock(),createElementBlock("svg",_hoisted_17$4,_hoisted_19$3)),createBaseVNode("sl-badge",_hoisted_20$3,toDisplayString(Cf.value.length),1)])):createCommentVNode("",!0),yf.value.length&&!F.noCaption?(openBlock(),createElementBlock("ve-caption",{key:2,manifest:yf.value[vf.value],caption:Yf.value,description:F.src&&F.description,annoid:$f.value},null,8,_hoisted_21$3)):createCommentVNode("",!0)])],512))}}),_style_0$g=`.r6o-editor{top:0;left:0;margin-left:-19px}.a9s-annotationlayer{position:absolute;top:0;left:0;width:100%;height:100%;outline:none;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none}.a9s-annotationlayer.no-cursor,.a9s-annotationlayer.no-cursor *{cursor:none!important}.a9s-crosshair line{stroke-width:1px;stroke:#00000080;pointer-events:none;vector-effect:non-scaling-stroke;shape-rendering:crispEdges}.a9s-selection-mask{stroke:none;fill:transparent;pointer-events:none}.a9s-annotation rect,.a9s-annotation circle,.a9s-annotation ellipse,.a9s-annotation path,.a9s-annotation polygon,.a9s-annotation line,.a9s-selection rect,.a9s-selection circle,.a9s-selection ellipse,.a9s-selection path,.a9s-selection polygon,.a9s-selection line{fill:transparent;cursor:pointer;vector-effect:non-scaling-stroke}.a9s-annotation .a9s-inner,.a9s-selection .a9s-inner{stroke:#fff;stroke-width:1px;fill:transparent}.a9s-annotation .a9s-inner:hover,.a9s-selection .a9s-inner:hover{stroke:#fff000}.a9s-annotation .a9s-outer,.a9s-selection .a9s-outer{stroke:#000000b3;stroke-width:3px;fill:none}.a9s-annotation .a9s-formatter-el,.a9s-selection .a9s-formatter-el{overflow:visible}.a9s-annotation.a9s-point .a9s-inner{display:none}.a9s-annotation.a9s-point .a9s-outer{stroke:#5a5a5a;stroke-width:1.5px;fill:#ffffff80}.a9s-annotation.a9s-point .a9s-outer:hover{fill:#fff000}.a9s-annotation.selected .a9s-inner,.a9s-selection .a9s-inner{stroke:#fff000}.a9s-annotation.editable .a9s-inner{stroke:#fff000;cursor:move!important}.a9s-annotation.editable .a9s-inner:hover{fill:#fff0001a}.a9s-handle{cursor:move}.a9s-handle .a9s-handle-inner{stroke:#fff000;fill:#000}.a9s-handle .a9s-handle-outer{stroke:#000;fill:#fff}.a9s-handle:hover .a9s-handle-inner{fill:#fff000}.r6o-btn{background-color:#4483c4;border:1px solid #4483c4;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-block;font-size:14px;margin:0;outline:none;text-decoration:none;white-space:nowrap;padding:6px 18px;min-width:70px;vertical-align:middle;border-radius:2px}.r6o-btn *{vertical-align:middle;cursor:pointer}.r6o-btn .r6o-icon{margin-right:4px}.r6o-btn:disabled{border-color:#a3c2e2!important;background-color:#a3c2e2!important}.r6o-btn:hover{background-color:#4f92d7;border-color:#4f92d7}.r6o-btn.outline{border:1px solid #4483c4;color:#4483c4;background-color:transparent;text-shadow:none}.r6o-autocomplete{display:inline;position:relative}.r6o-autocomplete div[role=combobox]{display:inline}.r6o-autocomplete input{outline:none;border:none;width:80px;height:100%;line-height:14px;white-space:pre;box-sizing:border-box;background-color:transparent;font-size:14px;color:#3f3f3f}.r6o-autocomplete ul{position:absolute;margin:0;padding:0;list-style-type:none;background-color:#fff;border-radius:3px;border:1px solid #d6d7d9;box-sizing:border-box;box-shadow:0 0 20px #00000040}.r6o-autocomplete ul:empty{display:none}.r6o-autocomplete li{box-sizing:border-box;padding:2px 12px;width:100%;cursor:pointer}.r6o-editable-text{max-height:120px;overflow:auto;outline:none;min-height:2em;font-size:14px;font-family:Lato,sans-serif}.r6o-editable-text:empty:not(:focus):before{content:attr(data-placeholder);color:#c2c2c2}.r6o-widget.comment{font-size:14px;min-height:3em;background-color:#fff;position:relative}.r6o-widget.comment .r6o-editable-text,.r6o-widget.comment .r6o-readonly-comment{padding:10px;width:100%;box-sizing:border-box;outline:none;border:none;background-color:transparent;resize:none}.r6o-widget.comment .r6o-readonly-comment{white-space:pre-line}.r6o-widget.comment .r6o-editable-text::-webkit-input-placeholder{color:#c2c2c2}.r6o-widget.comment .r6o-editable-text::-moz-placeholder{color:#c2c2c2}.r6o-widget.comment .r6o-editable-text:-moz-placeholder{color:#c2c2c2}.r6o-widget.comment .r6o-editable-text:-ms-input-placeholder{color:#c2c2c2}.r6o-widget.comment .r6o-lastmodified{border:1px solid #e5e5e5;display:inline-block;border-radius:2px;margin:0 10px 8px;padding:4px 5px;line-height:100%;font-size:12px}.r6o-widget.comment .r6o-lastmodified .r6o-lastmodified-at{color:#757575;padding-left:3px}.r6o-widget.comment .r6o-arrow-down{position:absolute;height:20px;width:20px;top:9px;right:9px;line-height:22px;background-color:#fff;text-align:center;-webkit-font-smoothing:antialiased;border:1px solid #e5e5e5;cursor:pointer;border-radius:1px}.r6o-widget.comment .r6o-arrow-down.r6o-menu-open{border-color:#4483c4}.r6o-widget.comment .r6o-comment-dropdown-menu{position:absolute;top:32px;right:8px;background-color:#fff;border:1px solid #e5e5e5;list-style-type:none;margin:0;padding:5px 0;z-index:9999;box-shadow:0 2px 4px #0003}.r6o-widget.comment .r6o-comment-dropdown-menu li{padding:0 15px;cursor:pointer}.r6o-widget.comment .r6o-comment-dropdown-menu li:hover{background-color:#ecf0f1}.r6o-widget.comment .r6o-purposedropdown{position:relative;z-index:2}.r6o-widget.comment.editable{background-color:#ecf0f1}.r6o-widget.r6o-tag:empty{display:none}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.r6o-widget.tag .r6o-taglist li{height:27px}.r6o-widget.tag .r6o-taglist li .r6o-delete-wrapper .r6o-delete{position:relative;top:-4px}}.r6o-widget.r6o-tag{background-color:#ecf0f1;border-bottom:1px solid #e5e5e5;padding:1px 3px;display:flex}.r6o-widget.r6o-tag ul{margin:0;padding:0;list-style-type:none;z-index:1}.r6o-widget.r6o-tag ul.r6o-taglist{flex:0;white-space:nowrap}.r6o-widget.r6o-tag ul.r6o-taglist li{display:inline-block;margin:1px 1px 1px 0;padding:0;vertical-align:middle;overflow:hidden;font-size:12px;background-color:#fff;border:1px solid #d6d7d9;cursor:pointer;position:relative;line-height:180%;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;border-radius:2px;box-shadow:0 0 4px #0000001a}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-label{padding:2px 8px;display:inline-block}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-wrapper{display:inline-block;padding:2px 0;color:#fff;width:0;height:100%;background-color:#4483c4;-webkit-border-top-right-radius:2px;-webkit-border-bottom-right-radius:2px;-khtml-border-radius-topright:2px;-khtml-border-radius-bottomright:2px;-moz-border-radius-topright:2px;-moz-border-radius-bottomright:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-wrapper .r6o-delete{padding:2px 6px}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-wrapper svg{vertical-align:text-top}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-enter-active{width:24px;transition:width .2s}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-enter-done,.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-exit{width:24px}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-exit-active{width:0;transition:width .2s}.r6o-widget.r6o-tag .r6o-autocomplete{flex:1;position:relative}.r6o-widget.r6o-tag .r6o-autocomplete li{font-size:14px}.r6o-widget.r6o-tag input{width:100%;padding:0 3px;min-width:80px;outline:none;border:none;line-height:170%;background-color:transparent;color:#3f3f3f}.r6o-widget.r6o-tag input::-webkit-input-placeholder{color:#c2c2c2}.r6o-widget.r6o-tag input::-moz-placeholder{color:#c2c2c2}.r6o-widget.r6o-tag input:-moz-placeholder{color:#c2c2c2}.r6o-widget.r6o-tag input:-ms-input-placeholder{color:#c2c2c2}.r6o-editor{position:absolute;z-index:99999;width:400px;color:#3f3f3f;opacity:0;font-family:Lato,sans-serif;font-size:17px;line-height:27px;transition:opacity .2s ease-in}.r6o-editor .r6o-arrow{position:absolute;overflow:hidden;top:-12px;left:12px;width:28px;height:12px;display:none}.r6o-editor .r6o-arrow:after{content:"";position:absolute;top:5px;left:5px;width:18px;height:18px;background-color:#fff;-webkit-backface-visibility:hidden;transform:rotate(45deg)}.r6o-editor .r6o-editor-inner{background-color:#fff;border-radius:2px;box-shadow:2px 2px 42px #0006}.r6o-editor .r6o-editor-inner .r6o-widget:first-child{-webkit-border-top-left-radius:2px;-webkit-border-top-right-radius:2px;-khtml-border-radius-topleft:2px;-khtml-border-radius-topright:2px;-moz-border-radius-topleft:2px;-moz-border-radius-topright:2px;border-top-left-radius:2px;border-top-right-radius:2px}.r6o-editor .r6o-editor-inner .r6o-widget{border-bottom:1px solid #e5e5e5}.r6o-editor .r6o-footer{position:relative;text-align:right;padding:8px 0}.r6o-editor .r6o-footer .r6o-btn{margin-right:8px}.r6o-editor .r6o-footer .r6o-btn.delete-annotation{position:absolute;top:7px;left:7px;background-color:transparent;border:none;color:#4483c4;width:32px;height:32px;min-width:0;border-radius:100%;padding:0;display:flex;justify-content:center;align-items:center;transition:all .1s ease-in}.r6o-editor .r6o-footer .r6o-btn.delete-annotation:hover{color:#fff;background-color:#ef352c}@media (max-width: 640px){.r6o-editor{width:260px}}.r6o-editor.r6o-arrow-top .r6o-arrow{display:block}.r6o-editor.r6o-arrow-right{margin-left:8px}.r6o-editor.r6o-arrow-right .r6o-arrow{left:auto;right:12px}.r6o-editor.r6o-arrow-bottom .r6o-arrow{display:block;top:auto;bottom:-12px}.r6o-editor.r6o-arrow-bottom .r6o-arrow:after{top:-11px;box-shadow:none}.r6o-editor.pushed .r6o-arrow,.r6o-editor.dragged .r6o-arrow{display:none}.r6o-editor .r6o-draggable{cursor:move}.r6o-purposedropdown{width:150px;display:inline-block}.r6o-noselect{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.a9s-annotation.hover .a9s-inner{stroke:#fff000}.a9s-annotation:not(.hover):hover .a9s-inner{stroke:#fff}.image{display:flex;flex-direction:column;box-shadow:0 2px 4px #00000080!important}.osd{position:relative;width:100%;background-color:#000}.coords{opacity:0;position:absolute;bottom:0;right:0;background-color:#fff;border:1px solid #ccc;padding:.5em;z-index:10;transition:all .5s ease-out}.coords:hover{opacity:1;cursor:copy}.status{display:flex;align-items:center;gap:.2em;background-color:#fff}.annotations-indicator{display:flex;position:relative;width:1.8em;padding:.5em;cursor:pointer}.annotations-indicator svg{width:1.3em;height:1.3em}.annotations-indicator sl-badge{position:absolute;top:0;right:0}.r6o-readonly-comment{display:inline;padding:0!important;line-height:1!important}.view .r6o-editor,.view .r6o-editor-inner,.view .r6o-widget{display:inline-block;min-height:unset!important;min-width:200px;font-size:1em;line-height:1.2;border-bottom:none}.view .r6o-widget.comment{padding:10px}.r6o-tag,.comment.editable:nth-of-type(2){display:none!important}.edit .r6o-editor{width:216px}svg.a9s-annotationlayer .a9s-selection .a9s-inner,svg.a9s-annotationlayer .a9s-annotation .a9s-inner{stroke-width:3;stroke:#ff0}.a9s-selection-mask{stroke:none;fill:#0006;pointer-events:none} +`]))),Ap=function(go){var xo=go.isFocused,uf=go.size,df=go.theme,gf=df.colors,Ef=df.spacing.baseUnit;return{label:"loadingIndicator",color:xo?gf.neutral60:gf.neutral20,display:"flex",padding:Ef*2,transition:"color 150ms",alignSelf:"center",fontSize:uf,lineHeight:1,marginRight:uf,textAlign:"center",verticalAlign:"middle"}},rg=function(go){var xo=go.delay,uf=go.offset;return im("span",{css:e1({animation:"".concat(Qp," 1s ease-in-out ").concat(xo,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:uf?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"","")})},zp=function(go){var xo=go.className,uf=go.cx,df=go.getStyles,gf=go.innerProps,Ef=go.isRtl;return im("div",Kg({css:df("loadingIndicator",go),className:uf({indicator:!0,"loading-indicator":!0},xo)},gf),im(rg,{delay:0,offset:Ef}),im(rg,{delay:160,offset:!0}),im(rg,{delay:320,offset:!Ef}))};zp.defaultProps={size:4};var lg=function(go){var xo=go.isDisabled,uf=go.isFocused,df=go.theme,gf=df.colors,Ef=df.borderRadius,Rf=df.spacing;return{label:"control",alignItems:"center",backgroundColor:xo?gf.neutral5:gf.neutral0,borderColor:xo?gf.neutral10:uf?gf.primary:gf.neutral20,borderRadius:Ef,borderStyle:"solid",borderWidth:1,boxShadow:uf?"0 0 0 1px ".concat(gf.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:Rf.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:uf?gf.primary:gf.neutral30}}},qp=function(go){var xo=go.children,uf=go.cx,df=go.getStyles,gf=go.className,Ef=go.isDisabled,Rf=go.isFocused,Vf=go.innerRef,Qf=go.innerProps,ep=go.menuIsOpen;return im("div",Kg({ref:Vf,css:df("control",go),className:uf({control:!0,"control--is-disabled":Ef,"control--is-focused":Rf,"control--menu-is-open":ep},gf)},Qf),xo)},Wp=function(go){var xo=go.theme.spacing;return{paddingBottom:xo.baseUnit*2,paddingTop:xo.baseUnit*2}},Up=function(go){var xo=go.children,uf=go.className,df=go.cx,gf=go.getStyles,Ef=go.Heading,Rf=go.headingProps,Vf=go.innerProps,Qf=go.label,ep=go.theme,Jf=go.selectProps;return im("div",Kg({css:gf("group",go),className:df({group:!0},uf)},Vf),im(Ef,Kg({},Rf,{selectProps:Jf,theme:ep,getStyles:gf,cx:df}),Qf),im("div",null,xo))},ig=function(go){var xo=go.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:xo.baseUnit*3,paddingRight:xo.baseUnit*3,textTransform:"uppercase"}},Xp=function(go){var xo=go.getStyles,uf=go.cx,df=go.className,gf=lC(go);gf.data;var Ef=$b(gf,["data"]);return im("div",Kg({css:xo("groupHeading",go),className:uf({"group-heading":!0},df)},Ef))},cg=function(go){var xo=go.isDisabled,uf=go.theme,df=uf.spacing,gf=uf.colors;return{margin:df.baseUnit/2,paddingBottom:df.baseUnit/2,paddingTop:df.baseUnit/2,visibility:xo?"hidden":"visible",color:gf.neutral80}},Sp=function(go){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:go?0:1,outline:0,padding:0,color:"inherit"}},Ug=function(go){var xo=go.className,uf=go.cx,df=go.getStyles,gf=lC(go),Ef=gf.innerRef,Rf=gf.isDisabled,Vf=gf.isHidden,Qf=$b(gf,["innerRef","isDisabled","isHidden"]);return im("div",{css:df("input",go)},im(ME,Kg({className:uf({input:!0},xo),inputRef:Ef,inputStyle:Sp(Vf),disabled:Rf},Qf)))},_g=function(go){var xo=go.theme,uf=xo.spacing,df=xo.borderRadius,gf=xo.colors;return{label:"multiValue",backgroundColor:gf.neutral10,borderRadius:df/2,display:"flex",margin:uf.baseUnit/2,minWidth:0}},bm=function(go){var xo=go.theme,uf=xo.borderRadius,df=xo.colors,gf=go.cropWithEllipsis;return{borderRadius:uf/2,color:df.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:gf?"ellipsis":null,whiteSpace:"nowrap"}},Mg=function(go){var xo=go.theme,uf=xo.spacing,df=xo.borderRadius,gf=xo.colors,Ef=go.isFocused;return{alignItems:"center",borderRadius:df/2,backgroundColor:Ef&&gf.dangerLight,display:"flex",paddingLeft:uf.baseUnit,paddingRight:uf.baseUnit,":hover":{backgroundColor:gf.dangerLight,color:gf.danger}}},em=function(go){var xo=go.children,uf=go.innerProps;return im("div",uf,xo)},Lm=em,vv=em;function Ly(go){var xo=go.children,uf=go.innerProps;return im("div",uf,xo||im(Wf,{size:14}))}var x2=function(go){var xo=go.children,uf=go.className,df=go.components,gf=go.cx,Ef=go.data,Rf=go.getStyles,Vf=go.innerProps,Qf=go.isDisabled,ep=go.removeProps,Jf=go.selectProps,mp=df.Container,Tp=df.Label,Pp=df.Remove;return im(hy,null,function(tg){var gg=tg.css,fg=tg.cx;return im(mp,{data:Ef,innerProps:Dy({className:fg(gg(Rf("multiValue",go)),gf({"multi-value":!0,"multi-value--is-disabled":Qf},uf))},Vf),selectProps:Jf},im(Tp,{data:Ef,innerProps:{className:fg(gg(Rf("multiValueLabel",go)),gf({"multi-value__label":!0},uf))},selectProps:Jf},xo),im(Pp,{data:Ef,innerProps:Dy({className:fg(gg(Rf("multiValueRemove",go)),gf({"multi-value__remove":!0},uf))},ep),selectProps:Jf}))})};x2.defaultProps={cropWithEllipsis:!0};var p_=function(go){var xo=go.isDisabled,uf=go.isFocused,df=go.isSelected,gf=go.theme,Ef=gf.spacing,Rf=gf.colors;return{label:"option",backgroundColor:df?Rf.primary:uf?Rf.primary25:"transparent",color:xo?Rf.neutral20:df?Rf.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(Ef.baseUnit*2,"px ").concat(Ef.baseUnit*3,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!xo&&(df?Rf.primary:Rf.primary50)}}},E2=function(go){var xo=go.children,uf=go.className,df=go.cx,gf=go.getStyles,Ef=go.isDisabled,Rf=go.isFocused,Vf=go.isSelected,Qf=go.innerRef,ep=go.innerProps;return im("div",Kg({css:gf("option",go),className:df({option:!0,"option--is-disabled":Ef,"option--is-focused":Rf,"option--is-selected":Vf},uf),ref:Qf},ep),xo)},S2=function(go){var xo=go.theme,uf=xo.spacing,df=xo.colors;return{label:"placeholder",color:df.neutral50,marginLeft:uf.baseUnit/2,marginRight:uf.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},mx=function(go){var xo=go.children,uf=go.className,df=go.cx,gf=go.getStyles,Ef=go.innerProps;return im("div",Kg({css:gf("placeholder",go),className:df({placeholder:!0},uf)},Ef),xo)},BE=function(go){var xo=go.isDisabled,uf=go.theme,df=uf.spacing,gf=uf.colors;return{label:"singleValue",color:xo?gf.neutral40:gf.neutral80,marginLeft:df.baseUnit/2,marginRight:df.baseUnit/2,maxWidth:"calc(100% - ".concat(df.baseUnit*2,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},vx=function(go){var xo=go.children,uf=go.className,df=go.cx,gf=go.getStyles,Ef=go.isDisabled,Rf=go.innerProps;return im("div",Kg({css:gf("singleValue",go),className:df({"single-value":!0,"single-value--is-disabled":Ef},uf)},Rf),xo)},$C={ClearIndicator:op,Control:qp,DropdownIndicator:Uf,DownChevron:Mf,CrossIcon:Wf,Group:Up,GroupHeading:Xp,IndicatorsContainer:wf,IndicatorSeparator:sp,Input:Ug,LoadingIndicator:zp,Menu:yC,MenuList:bC,MenuPortal:vo,LoadingMessage:lo,NoOptionsMessage:wt,MultiValue:x2,MultiValueContainer:Lm,MultiValueLabel:vv,MultiValueRemove:Ly,Option:E2,Placeholder:mx,SelectContainer:ff,SingleValue:vx,ValueContainer:bf},_C=function(go){return Dy(Dy({},$C),go.components)};function MO(go,xo){(xo==null||xo>go.length)&&(xo=go.length);for(var uf=0,df=new Array(xo);uf-1}};function jP(go){go.in,go.out,go.onExited,go.appear,go.enter,go.exit;var xo=go.innerRef;go.emotion;var uf=$b(go,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return im("input",Kg({ref:xo},uf,{css:e1({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"","")}))}var zP=function(go){go.preventDefault(),go.stopPropagation()};function HP(go){var xo=go.isEnabled,uf=go.onBottomArrive,df=go.onBottomLeave,gf=go.onTopArrive,Ef=go.onTopLeave,Rf=Kf(!1),Vf=Kf(!1),Qf=Kf(0),ep=Kf(null),Jf=wp(function(fg,Tg){if(ep.current!==null){var Rg=ep.current,$m=Rg.scrollTop,pm=Rg.scrollHeight,am=Rg.clientHeight,wm=ep.current,gm=Tg>0,dy=pm-am-$m,by=!1;dy>Tg&&Rf.current&&(df&&df(fg),Rf.current=!1),gm&&Vf.current&&(Ef&&Ef(fg),Vf.current=!1),gm&&Tg>dy?(uf&&!Rf.current&&uf(fg),wm.scrollTop=pm,by=!0,Rf.current=!0):!gm&&-Tg>$m&&(gf&&!Vf.current&&gf(fg),wm.scrollTop=0,by=!0,Vf.current=!0),by&&zP(fg)}},[]),mp=wp(function(fg){Jf(fg,fg.deltaY)},[Jf]),Tp=wp(function(fg){Qf.current=fg.changedTouches[0].clientY},[]),Pp=wp(function(fg){var Tg=Qf.current-fg.changedTouches[0].clientY;Jf(fg,Tg)},[Jf]),tg=wp(function(fg){if(fg){var Tg=dC?{passive:!1}:!1;typeof fg.addEventListener=="function"&&fg.addEventListener("wheel",mp,Tg),typeof fg.addEventListener=="function"&&fg.addEventListener("touchstart",Tp,Tg),typeof fg.addEventListener=="function"&&fg.addEventListener("touchmove",Pp,Tg)}},[Pp,Tp,mp]),gg=wp(function(fg){!fg||(typeof fg.removeEventListener=="function"&&fg.removeEventListener("wheel",mp,!1),typeof fg.removeEventListener=="function"&&fg.removeEventListener("touchstart",Tp,!1),typeof fg.removeEventListener=="function"&&fg.removeEventListener("touchmove",Pp,!1))},[Pp,Tp,mp]);return Op(function(){if(xo){var fg=ep.current;return tg(fg),function(){gg(fg)}}},[xo,tg,gg]),function(fg){ep.current=fg}}var yI=["boxSizing","height","overflow","paddingRight","position"],bI={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function $I(go){go.preventDefault()}function _I(go){go.stopPropagation()}function wI(){var go=this.scrollTop,xo=this.scrollHeight,uf=go+this.offsetHeight;go===0?this.scrollTop=1:uf===xo&&(this.scrollTop=go-1)}function xI(){return"ontouchstart"in window||navigator.maxTouchPoints}var EI=!!(typeof window<"u"&&window.document&&window.document.createElement),_T=0,jE={capture:!1,passive:!1};function UP(go){var xo=go.isEnabled,uf=go.accountForScrollbars,df=uf===void 0?!0:uf,gf=Kf({}),Ef=Kf(null),Rf=wp(function(Qf){if(EI){var ep=document.body,Jf=ep&&ep.style;if(df&&yI.forEach(function(tg){var gg=Jf&&Jf[tg];gf.current[tg]=gg}),df&&_T<1){var mp=parseInt(gf.current.paddingRight,10)||0,Tp=document.body?document.body.clientWidth:0,Pp=window.innerWidth-Tp+mp||0;Object.keys(bI).forEach(function(tg){var gg=bI[tg];Jf&&(Jf[tg]=gg)}),Jf&&(Jf.paddingRight="".concat(Pp,"px"))}ep&&xI()&&(ep.addEventListener("touchmove",$I,jE),Qf&&(Qf.addEventListener("touchstart",wI,jE),Qf.addEventListener("touchmove",_I,jE))),_T+=1}},[]),Vf=wp(function(Qf){if(EI){var ep=document.body,Jf=ep&&ep.style;_T=Math.max(_T-1,0),df&&_T<1&&yI.forEach(function(mp){var Tp=gf.current[mp];Jf&&(Jf[mp]=Tp)}),ep&&xI()&&(ep.removeEventListener("touchmove",$I,jE),Qf&&(Qf.removeEventListener("touchstart",wI,jE),Qf.removeEventListener("touchmove",_I,jE)))}},[]);return Op(function(){if(xo){var Qf=Ef.current;return Rf(Qf),function(){Vf(Qf)}}},[xo,Rf,Vf]),function(Qf){Ef.current=Qf}}var VP=function(){return document.activeElement&&document.activeElement.blur()},GP={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function WP(go){var xo=go.children,uf=go.lockEnabled,df=go.captureEnabled,gf=df===void 0?!0:df,Ef=go.onBottomArrive,Rf=go.onBottomLeave,Vf=go.onTopArrive,Qf=go.onTopLeave,ep=HP({isEnabled:gf,onBottomArrive:Ef,onBottomLeave:Rf,onTopArrive:Vf,onTopLeave:Qf}),Jf=UP({isEnabled:uf}),mp=function(Tp){ep(Tp),Jf(Tp)};return im(Zg.Fragment,null,uf&&im("div",{onClick:VP,css:GP}),xo(mp))}var qP=function(go){return go.label},YP=function(go){return go.label},KP=function(go){return go.value},XP=function(go){return!!go.isDisabled},ZP={clearIndicator:tp,container:ls,control:lg,dropdownIndicator:pp,group:Wp,groupHeading:ig,indicatorsContainer:Sf,indicatorSeparator:up,input:cg,loadingIndicator:Ap,loadingMessage:at,menu:gC,menuList:RO,menuPortal:fo,multiValue:_g,multiValueLabel:bm,multiValueRemove:Mg,noOptionsMessage:nt,option:p_,placeholder:S2,singleValue:BE,valueContainer:mf},JP={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},QP=4,SI=4,eA=38,tA=SI*2,rA={baseUnit:SI,controlHeight:eA,menuGutter:tA},jO={borderRadius:QP,colors:JP,spacing:rA},nA={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:hC(),captureMenuScroll:!hC(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:BP(),formatGroupLabel:qP,getOptionLabel:YP,getOptionValue:KP,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:XP,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!PO(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(go){var xo=go.count;return"".concat(xo," result").concat(xo!==1?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function TI(go,xo,uf,df){var gf=PI(go,xo,uf),Ef=AI(go,xo,uf),Rf=II(go,xo),Vf=wC(go,xo);return{type:"option",data:xo,isDisabled:gf,isSelected:Ef,label:Rf,value:Vf,index:df}}function kI(go,xo){return go.options.map(function(uf,df){if(uf.options){var gf=uf.options.map(function(Rf,Vf){return TI(go,Rf,xo,Vf)}).filter(function(Rf){return OI(go,Rf)});return gf.length>0?{type:"group",data:uf,options:gf,index:df}:void 0}var Ef=TI(go,uf,xo,df);return OI(go,Ef)?Ef:void 0}).filter(function(uf){return!!uf})}function CI(go){return go.reduce(function(xo,uf){return uf.type==="group"?xo.push.apply(xo,fI(uf.options.map(function(df){return df.data}))):xo.push(uf.data),xo},[])}function iA(go,xo){return CI(kI(go,xo))}function OI(go,xo){var uf=go.inputValue,df=uf===void 0?"":uf,gf=xo.data,Ef=xo.isSelected,Rf=xo.label,Vf=xo.value;return(!NI(go)||!Ef)&&RI(go,{label:Rf,value:Vf,data:gf},df)}function oA(go,xo){var uf=go.focusedValue,df=go.selectValue,gf=df.indexOf(uf);if(gf>-1){var Ef=xo.indexOf(uf);if(Ef>-1)return uf;if(gf-1?uf:xo[0]}var II=function(go,xo){return go.getOptionLabel(xo)},wC=function(go,xo){return go.getOptionValue(xo)};function PI(go,xo,uf){return typeof go.isOptionDisabled=="function"?go.isOptionDisabled(xo,uf):!1}function AI(go,xo,uf){if(uf.indexOf(xo)>-1)return!0;if(typeof go.isOptionSelected=="function")return go.isOptionSelected(xo,uf);var df=wC(go,xo);return uf.some(function(gf){return wC(go,gf)===df})}function RI(go,xo,uf){return go.filterOption?go.filterOption(xo,uf):!0}var NI=function(go){var xo=go.hideSelectedOptions,uf=go.isMulti;return xo===void 0?uf:xo},sA=1,MI=function(go){fx(uf,go);var xo=iw(uf);function uf(df){var gf;return nw(this,uf),gf=xo.call(this,df),gf.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},gf.blockOptionHover=!1,gf.isComposing=!1,gf.commonProps=void 0,gf.initialTouchX=0,gf.initialTouchY=0,gf.instancePrefix="",gf.openAfterFocus=!1,gf.scrollToFocusedOptionOnUpdate=!1,gf.userIsDragging=void 0,gf.controlRef=null,gf.getControlRef=function(Ef){gf.controlRef=Ef},gf.focusedOptionRef=null,gf.getFocusedOptionRef=function(Ef){gf.focusedOptionRef=Ef},gf.menuListRef=null,gf.getMenuListRef=function(Ef){gf.menuListRef=Ef},gf.inputRef=null,gf.getInputRef=function(Ef){gf.inputRef=Ef},gf.focus=gf.focusInput,gf.blur=gf.blurInput,gf.onChange=function(Ef,Rf){var Vf=gf.props,Qf=Vf.onChange,ep=Vf.name;Rf.name=ep,gf.ariaOnChange(Ef,Rf),Qf(Ef,Rf)},gf.setValue=function(Ef){var Rf=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"set-value",Vf=arguments.length>2?arguments[2]:void 0,Qf=gf.props,ep=Qf.closeMenuOnSelect,Jf=Qf.isMulti;gf.onInputChange("",{action:"set-value"}),ep&&(gf.setState({inputIsHiddenAfterUpdate:!Jf}),gf.onMenuClose()),gf.setState({clearFocusValueOnUpdate:!0}),gf.onChange(Ef,{action:Rf,option:Vf})},gf.selectOption=function(Ef){var Rf=gf.props,Vf=Rf.blurInputOnSelect,Qf=Rf.isMulti,ep=Rf.name,Jf=gf.state.selectValue,mp=Qf&&gf.isOptionSelected(Ef,Jf),Tp=gf.isOptionDisabled(Ef,Jf);if(mp){var Pp=gf.getOptionValue(Ef);gf.setValue(Jf.filter(function(tg){return gf.getOptionValue(tg)!==Pp}),"deselect-option",Ef)}else if(!Tp)Qf?gf.setValue([].concat(fI(Jf),[Ef]),"select-option",Ef):gf.setValue(Ef,"select-option");else{gf.ariaOnChange(Ef,{action:"select-option",name:ep});return}Vf&&gf.blurInput()},gf.removeValue=function(Ef){var Rf=gf.props.isMulti,Vf=gf.state.selectValue,Qf=gf.getOptionValue(Ef),ep=Vf.filter(function(mp){return gf.getOptionValue(mp)!==Qf}),Jf=Rf?ep:ep[0]||null;gf.onChange(Jf,{action:"remove-value",removedValue:Ef}),gf.focusInput()},gf.clearValue=function(){var Ef=gf.state.selectValue;gf.onChange(gf.props.isMulti?[]:null,{action:"clear",removedValues:Ef})},gf.popValue=function(){var Ef=gf.props.isMulti,Rf=gf.state.selectValue,Vf=Rf[Rf.length-1],Qf=Rf.slice(0,Rf.length-1),ep=Ef?Qf:Qf[0]||null;gf.onChange(ep,{action:"pop-value",removedValue:Vf})},gf.getValue=function(){return gf.state.selectValue},gf.cx=function(){for(var Ef=arguments.length,Rf=new Array(Ef),Vf=0;VfJf||ep>Jf}},gf.onTouchEnd=function(Ef){gf.userIsDragging||(gf.controlRef&&!gf.controlRef.contains(Ef.target)&&gf.menuListRef&&!gf.menuListRef.contains(Ef.target)&&gf.blurInput(),gf.initialTouchX=0,gf.initialTouchY=0)},gf.onControlTouchEnd=function(Ef){gf.userIsDragging||gf.onControlMouseDown(Ef)},gf.onClearIndicatorTouchEnd=function(Ef){gf.userIsDragging||gf.onClearIndicatorMouseDown(Ef)},gf.onDropdownIndicatorTouchEnd=function(Ef){gf.userIsDragging||gf.onDropdownIndicatorMouseDown(Ef)},gf.handleInputChange=function(Ef){var Rf=Ef.currentTarget.value;gf.setState({inputIsHiddenAfterUpdate:!1}),gf.onInputChange(Rf,{action:"input-change"}),gf.props.menuIsOpen||gf.onMenuOpen()},gf.onInputFocus=function(Ef){gf.props.onFocus&&gf.props.onFocus(Ef),gf.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(gf.openAfterFocus||gf.props.openMenuOnFocus)&&gf.openMenu("first"),gf.openAfterFocus=!1},gf.onInputBlur=function(Ef){if(gf.menuListRef&&gf.menuListRef.contains(document.activeElement)){gf.inputRef.focus();return}gf.props.onBlur&&gf.props.onBlur(Ef),gf.onInputChange("",{action:"input-blur"}),gf.onMenuClose(),gf.setState({focusedValue:null,isFocused:!1})},gf.onOptionHover=function(Ef){gf.blockOptionHover||gf.state.focusedOption===Ef||gf.setState({focusedOption:Ef})},gf.shouldHideSelectedOptions=function(){return NI(gf.props)},gf.onKeyDown=function(Ef){var Rf=gf.props,Vf=Rf.isMulti,Qf=Rf.backspaceRemovesValue,ep=Rf.escapeClearsValue,Jf=Rf.inputValue,mp=Rf.isClearable,Tp=Rf.isDisabled,Pp=Rf.menuIsOpen,tg=Rf.onKeyDown,gg=Rf.tabSelectsValue,fg=Rf.openMenuOnFocus,Tg=gf.state,Rg=Tg.focusedOption,$m=Tg.focusedValue,pm=Tg.selectValue;if(!Tp&&!(typeof tg=="function"&&(tg(Ef),Ef.defaultPrevented))){switch(gf.blockOptionHover=!0,Ef.key){case"ArrowLeft":if(!Vf||Jf)return;gf.focusValue("previous");break;case"ArrowRight":if(!Vf||Jf)return;gf.focusValue("next");break;case"Delete":case"Backspace":if(Jf)return;if($m)gf.removeValue($m);else{if(!Qf)return;Vf?gf.popValue():mp&&gf.clearValue()}break;case"Tab":if(gf.isComposing||Ef.shiftKey||!Pp||!gg||!Rg||fg&&gf.isOptionSelected(Rg,pm))return;gf.selectOption(Rg);break;case"Enter":if(Ef.keyCode===229)break;if(Pp){if(!Rg||gf.isComposing)return;gf.selectOption(Rg);break}return;case"Escape":Pp?(gf.setState({inputIsHiddenAfterUpdate:!1}),gf.onInputChange("",{action:"menu-close"}),gf.onMenuClose()):mp&&ep&&gf.clearValue();break;case" ":if(Jf)return;if(!Pp){gf.openMenu("first");break}if(!Rg)return;gf.selectOption(Rg);break;case"ArrowUp":Pp?gf.focusOption("up"):gf.openMenu("last");break;case"ArrowDown":Pp?gf.focusOption("down"):gf.openMenu("first");break;case"PageUp":if(!Pp)return;gf.focusOption("pageup");break;case"PageDown":if(!Pp)return;gf.focusOption("pagedown");break;case"Home":if(!Pp)return;gf.focusOption("first");break;case"End":if(!Pp)return;gf.focusOption("last");break;default:return}Ef.preventDefault()}},gf.instancePrefix="react-select-"+(gf.props.instanceId||++sA),gf.state.selectValue=gT(df.value),gf}return $2(uf,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(df){var gf=this.props,Ef=gf.isDisabled,Rf=gf.menuIsOpen,Vf=this.state.isFocused;(Vf&&!Ef&&df.isDisabled||Vf&&Rf&&!df.menuIsOpen)&&this.focusInput(),Vf&&Ef&&!df.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(IO(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(df,gf){this.props.onInputChange(df,gf)}},{key:"focusInput",value:function(){!this.inputRef||this.inputRef.focus()}},{key:"blurInput",value:function(){!this.inputRef||this.inputRef.blur()}},{key:"openMenu",value:function(df){var gf=this,Ef=this.state,Rf=Ef.selectValue,Vf=Ef.isFocused,Qf=this.buildFocusableOptions(),ep=df==="first"?0:Qf.length-1;if(!this.props.isMulti){var Jf=Qf.indexOf(Rf[0]);Jf>-1&&(ep=Jf)}this.scrollToFocusedOptionOnUpdate=!(Vf&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:Qf[ep]},function(){return gf.onMenuOpen()})}},{key:"focusValue",value:function(df){var gf=this.state,Ef=gf.selectValue,Rf=gf.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var Vf=Ef.indexOf(Rf);Rf||(Vf=-1);var Qf=Ef.length-1,ep=-1;if(Ef.length){switch(df){case"previous":Vf===0?ep=0:Vf===-1?ep=Qf:ep=Vf-1;break;case"next":Vf>-1&&Vf0&&arguments[0]!==void 0?arguments[0]:"first",gf=this.props.pageSize,Ef=this.state.focusedOption,Rf=this.getFocusableOptions();if(Rf.length){var Vf=0,Qf=Rf.indexOf(Ef);Ef||(Qf=-1),df==="up"?Vf=Qf>0?Qf-1:Rf.length-1:df==="down"?Vf=(Qf+1)%Rf.length:df==="pageup"?(Vf=Qf-gf,Vf<0&&(Vf=0)):df==="pagedown"?(Vf=Qf+gf,Vf>Rf.length-1&&(Vf=Rf.length-1)):df==="last"&&(Vf=Rf.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:Rf[Vf],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(jO):Dy(Dy({},jO),this.props.theme):jO}},{key:"getCommonProps",value:function(){var df=this.clearValue,gf=this.cx,Ef=this.getStyles,Rf=this.getValue,Vf=this.selectOption,Qf=this.setValue,ep=this.props,Jf=ep.isMulti,mp=ep.isRtl,Tp=ep.options,Pp=this.hasValue();return{clearValue:df,cx:gf,getStyles:Ef,getValue:Rf,hasValue:Pp,isMulti:Jf,isRtl:mp,options:Tp,selectOption:Vf,selectProps:ep,setValue:Qf,theme:this.getTheme()}}},{key:"hasValue",value:function(){var df=this.state.selectValue;return df.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var df=this.props,gf=df.isClearable,Ef=df.isMulti;return gf===void 0?Ef:gf}},{key:"isOptionDisabled",value:function(df,gf){return PI(this.props,df,gf)}},{key:"isOptionSelected",value:function(df,gf){return AI(this.props,df,gf)}},{key:"filterOption",value:function(df,gf){return RI(this.props,df,gf)}},{key:"formatOptionLabel",value:function(df,gf){if(typeof this.props.formatOptionLabel=="function"){var Ef=this.props.inputValue,Rf=this.state.selectValue;return this.props.formatOptionLabel(df,{context:gf,inputValue:Ef,selectValue:Rf})}else return this.getOptionLabel(df)}},{key:"formatGroupLabel",value:function(df){return this.props.formatGroupLabel(df)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var df=this.props,gf=df.isDisabled,Ef=df.isSearchable,Rf=df.inputId,Vf=df.inputValue,Qf=df.tabIndex,ep=df.form,Jf=this.getComponents(),mp=Jf.Input,Tp=this.state.inputIsHidden,Pp=this.commonProps,tg=Rf||this.getElementId("input"),gg={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return Ef?Zg.createElement(mp,Kg({},Pp,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:tg,innerRef:this.getInputRef,isDisabled:gf,isHidden:Tp,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:Qf,form:ep,type:"text",value:Vf},gg)):Zg.createElement(jP,Kg({id:tg,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:f_,onFocus:this.onInputFocus,readOnly:!0,disabled:gf,tabIndex:Qf,form:ep,value:""},gg))}},{key:"renderPlaceholderOrValue",value:function(){var df=this,gf=this.getComponents(),Ef=gf.MultiValue,Rf=gf.MultiValueContainer,Vf=gf.MultiValueLabel,Qf=gf.MultiValueRemove,ep=gf.SingleValue,Jf=gf.Placeholder,mp=this.commonProps,Tp=this.props,Pp=Tp.controlShouldRenderValue,tg=Tp.isDisabled,gg=Tp.isMulti,fg=Tp.inputValue,Tg=Tp.placeholder,Rg=this.state,$m=Rg.selectValue,pm=Rg.focusedValue,am=Rg.isFocused;if(!this.hasValue()||!Pp)return fg?null:Zg.createElement(Jf,Kg({},mp,{key:"placeholder",isDisabled:tg,isFocused:am}),Tg);if(gg){var wm=$m.map(function(dy,by){var Fv=dy===pm;return Zg.createElement(Ef,Kg({},mp,{components:{Container:Rf,Label:Vf,Remove:Qf},isFocused:Fv,isDisabled:tg,key:"".concat(df.getOptionValue(dy)).concat(by),index:by,removeProps:{onClick:function(){return df.removeValue(dy)},onTouchEnd:function(){return df.removeValue(dy)},onMouseDown:function(Bv){Bv.preventDefault(),Bv.stopPropagation()}},data:dy}),df.formatOptionLabel(dy,"value"))});return wm}if(fg)return null;var gm=$m[0];return Zg.createElement(ep,Kg({},mp,{data:gm,isDisabled:tg}),this.formatOptionLabel(gm,"value"))}},{key:"renderClearIndicator",value:function(){var df=this.getComponents(),gf=df.ClearIndicator,Ef=this.commonProps,Rf=this.props,Vf=Rf.isDisabled,Qf=Rf.isLoading,ep=this.state.isFocused;if(!this.isClearable()||!gf||Vf||!this.hasValue()||Qf)return null;var Jf={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return Zg.createElement(gf,Kg({},Ef,{innerProps:Jf,isFocused:ep}))}},{key:"renderLoadingIndicator",value:function(){var df=this.getComponents(),gf=df.LoadingIndicator,Ef=this.commonProps,Rf=this.props,Vf=Rf.isDisabled,Qf=Rf.isLoading,ep=this.state.isFocused;if(!gf||!Qf)return null;var Jf={"aria-hidden":"true"};return Zg.createElement(gf,Kg({},Ef,{innerProps:Jf,isDisabled:Vf,isFocused:ep}))}},{key:"renderIndicatorSeparator",value:function(){var df=this.getComponents(),gf=df.DropdownIndicator,Ef=df.IndicatorSeparator;if(!gf||!Ef)return null;var Rf=this.commonProps,Vf=this.props.isDisabled,Qf=this.state.isFocused;return Zg.createElement(Ef,Kg({},Rf,{isDisabled:Vf,isFocused:Qf}))}},{key:"renderDropdownIndicator",value:function(){var df=this.getComponents(),gf=df.DropdownIndicator;if(!gf)return null;var Ef=this.commonProps,Rf=this.props.isDisabled,Vf=this.state.isFocused,Qf={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return Zg.createElement(gf,Kg({},Ef,{innerProps:Qf,isDisabled:Rf,isFocused:Vf}))}},{key:"renderMenu",value:function(){var df=this,gf=this.getComponents(),Ef=gf.Group,Rf=gf.GroupHeading,Vf=gf.Menu,Qf=gf.MenuList,ep=gf.MenuPortal,Jf=gf.LoadingMessage,mp=gf.NoOptionsMessage,Tp=gf.Option,Pp=this.commonProps,tg=this.state.focusedOption,gg=this.props,fg=gg.captureMenuScroll,Tg=gg.inputValue,Rg=gg.isLoading,$m=gg.loadingMessage,pm=gg.minMenuHeight,am=gg.maxMenuHeight,wm=gg.menuIsOpen,gm=gg.menuPlacement,dy=gg.menuPosition,by=gg.menuPortalTarget,Fv=gg.menuShouldBlockScroll,Bv=gg.menuShouldScrollIntoView,Gb=gg.noOptionsMessage,x1=gg.onMenuScrollToTop,lw=gg.onMenuScrollToBottom;if(!wm)return null;var Wb=function(ey,bg){var Pg=ey.type,Ng=ey.data,Ag=ey.isDisabled,zg=ey.isSelected,Sm=ey.label,fy=ey.value,f0=tg===Ng,jv=Ag?void 0:function(){return df.onOptionHover(Ng)},P2=Ag?void 0:function(){return df.selectOption(Ng)},g_="".concat(df.getElementId("option"),"-").concat(bg),bx={id:g_,onClick:P2,onMouseMove:jv,onMouseOver:jv,tabIndex:-1};return Zg.createElement(Tp,Kg({},Pp,{innerProps:bx,data:Ng,isDisabled:Ag,isSelected:zg,key:g_,label:Sm,type:Pg,value:fy,isFocused:f0,innerRef:f0?df.getFocusedOptionRef:void 0}),df.formatOptionLabel(ey.data,"menu"))},P$;if(this.hasOptions())P$=this.getCategorizedOptions().map(function(ey){if(ey.type==="group"){var bg=ey.data,Pg=ey.options,Ng=ey.index,Ag="".concat(df.getElementId("group"),"-").concat(Ng),zg="".concat(Ag,"-heading");return Zg.createElement(Ef,Kg({},Pp,{key:Ag,data:bg,options:Pg,Heading:Rf,headingProps:{id:zg,data:ey.data},label:df.formatGroupLabel(ey.data)}),ey.options.map(function(Sm){return Wb(Sm,"".concat(Ng,"-").concat(Sm.index))}))}else if(ey.type==="option")return Wb(ey,"".concat(ey.index))});else if(Rg){var z0=$m({inputValue:Tg});if(z0===null)return null;P$=Zg.createElement(Jf,Pp,z0)}else{var PC=Gb({inputValue:Tg});if(PC===null)return null;P$=Zg.createElement(mp,Pp,PC)}var I2={minMenuHeight:pm,maxMenuHeight:am,menuPlacement:gm,menuPosition:dy,menuShouldScrollIntoView:Bv},qb=Zg.createElement(vC,Kg({},Pp,I2),function(ey){var bg=ey.ref,Pg=ey.placerProps,Ng=Pg.placement,Ag=Pg.maxHeight;return Zg.createElement(Vf,Kg({},Pp,I2,{innerRef:bg,innerProps:{onMouseDown:df.onMenuMouseDown,onMouseMove:df.onMenuMouseMove},isLoading:Rg,placement:Ng}),Zg.createElement(WP,{captureEnabled:fg,onTopArrive:x1,onBottomArrive:lw,lockEnabled:Fv},function(zg){return Zg.createElement(Qf,Kg({},Pp,{innerRef:function(Sm){df.getMenuListRef(Sm),zg(Sm)},isLoading:Rg,maxHeight:Ag,focusedOption:tg}),P$)}))});return by||dy==="fixed"?Zg.createElement(ep,Kg({},Pp,{appendTo:by,controlElement:this.controlRef,menuPlacement:gm,menuPosition:dy}),qb):qb}},{key:"renderFormField",value:function(){var df=this,gf=this.props,Ef=gf.delimiter,Rf=gf.isDisabled,Vf=gf.isMulti,Qf=gf.name,ep=this.state.selectValue;if(!(!Qf||Rf))if(Vf)if(Ef){var Jf=ep.map(function(Pp){return df.getOptionValue(Pp)}).join(Ef);return Zg.createElement("input",{name:Qf,type:"hidden",value:Jf})}else{var mp=ep.length>0?ep.map(function(Pp,tg){return Zg.createElement("input",{key:"i-".concat(tg),name:Qf,type:"hidden",value:df.getOptionValue(Pp)})}):Zg.createElement("input",{name:Qf,type:"hidden"});return Zg.createElement("div",null,mp)}else{var Tp=ep[0]?this.getOptionValue(ep[0]):"";return Zg.createElement("input",{name:Qf,type:"hidden",value:Tp})}}},{key:"renderLiveRegion",value:function(){var df=this.commonProps,gf=this.state,Ef=gf.ariaSelection,Rf=gf.focusedOption,Vf=gf.focusedValue,Qf=gf.isFocused,ep=gf.selectValue,Jf=this.getFocusableOptions();return Zg.createElement(MP,Kg({},df,{ariaSelection:Ef,focusedOption:Rf,focusedValue:Vf,isFocused:Qf,selectValue:ep,focusableOptions:Jf}))}},{key:"render",value:function(){var df=this.getComponents(),gf=df.Control,Ef=df.IndicatorsContainer,Rf=df.SelectContainer,Vf=df.ValueContainer,Qf=this.props,ep=Qf.className,Jf=Qf.id,mp=Qf.isDisabled,Tp=Qf.menuIsOpen,Pp=this.state.isFocused,tg=this.commonProps=this.getCommonProps();return Zg.createElement(Rf,Kg({},tg,{className:ep,innerProps:{id:Jf,onKeyDown:this.onKeyDown},isDisabled:mp,isFocused:Pp}),this.renderLiveRegion(),Zg.createElement(gf,Kg({},tg,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:mp,isFocused:Pp,menuIsOpen:Tp}),Zg.createElement(Vf,Kg({},tg,{isDisabled:mp}),this.renderPlaceholderOrValue(),this.renderInput()),Zg.createElement(Ef,Kg({},tg,{isDisabled:mp}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(df,gf){var Ef=gf.prevProps,Rf=gf.clearFocusValueOnUpdate,Vf=gf.inputIsHiddenAfterUpdate,Qf=df.options,ep=df.value,Jf=df.menuIsOpen,mp=df.inputValue,Tp={};if(Ef&&(ep!==Ef.value||Qf!==Ef.options||Jf!==Ef.menuIsOpen||mp!==Ef.inputValue)){var Pp=gT(ep),tg=Jf?iA(df,Pp):[],gg=Rf?oA(gf,Pp):null,fg=aA(gf,tg);Tp={selectValue:Pp,focusedOption:fg,focusedValue:gg,clearFocusValueOnUpdate:!1}}var Tg=Vf!=null&&df!==Ef?{inputIsHidden:Vf,inputIsHiddenAfterUpdate:void 0}:{};return Dy(Dy(Dy({},Tp),Tg),{},{prevProps:df})}}]),uf}(rp);MI.defaultProps=nA;var lA={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},cA=function(go){var xo,uf;return uf=xo=function(df){fx(Ef,df);var gf=iw(Ef);function Ef(){var Rf;nw(this,Ef);for(var Vf=arguments.length,Qf=new Array(Vf),ep=0;ep1?Qf-1:0),Jf=1;Jf{const xo=go.content?zO.find(uf=>uf.value===go.content):null;return kf("div",{className:"r6o-purposedropdown"},kf(hA,{value:xo,onChange:go.onChange,options:zO,isDisabled:!go.editable}))};const dA=go=>kf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1000 940",width:go.width},kf("metadata",null,"IcoFont Icons"),kf("title",null,"simple-down"),kf("glyph",{glyphName:"simple-down",unicode:"",horizAdvX:"1000"}),kf("path",{fill:"currentColor",d:"M200 392.6l300 300 300-300-85.10000000000002-85.10000000000002-214.89999999999998 214.79999999999995-214.89999999999998-214.89999999999998-85.10000000000002 85.20000000000005z"})),fA=go=>kf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"180 150 700 800",width:go.width},kf("metadata",null,"IcoFont Icons"),kf("title",null,"close"),kf("glyph",{glyphName:"close",unicode:"",horizAdvX:"1000"}),kf("path",{fill:"currentColor",d:"M709.8 206.6c-64.39999999999998 65.50000000000003-128.89999999999998 131.20000000000002-194.19999999999993 197.6-8.600000000000023 8.699999999999989-22.400000000000034 8.800000000000011-31 0-65-66-129.70000000000005-131.8-194.5-197.6-8.600000000000023-8.699999999999989-22.400000000000034-8.599999999999994-30.900000000000034 0.09999999999999432-15.699999999999989 16.200000000000017-31.099999999999994 32.30000000000001-47.099999999999994 48.80000000000001-8.5 8.800000000000011-8.299999999999983 23 0.20000000000001705 31.69999999999999 63.099999999999966 64.19999999999999 127.89999999999998 130.10000000000002 193.59999999999997 197 8.600000000000023 8.699999999999989 8.5 22.80000000000001 0 31.599999999999966-65.19999999999999 66.40000000000009-130.2 132.5-194.7 198.10000000000002-8.5 8.700000000000045-8.5 22.800000000000068 0.20000000000001705 31.399999999999977l47.79999999999998 47.90000000000009c8.600000000000023 8.599999999999909 22.600000000000023 8.599999999999909 31.100000000000023-0.10000000000002274l194.2-197.30000000000007c8.600000000000023-8.699999999999932 22.399999999999977-8.699999999999932 31 0 64.70000000000005 65.80000000000007 129.20000000000005 131.4000000000001 194.20000000000005 197.5 8.599999999999909 8.700000000000045 22.5 8.800000000000068 31 0.10000000000002274 16-16.199999999999932 31.699999999999932-32.19999999999993 47.59999999999991-48.299999999999955 8.600000000000023-8.700000000000045 8.600000000000023-22.899999999999977 0.10000000000002274-31.600000000000023-63.799999999999955-65-128.5-130.89999999999998-194.19999999999993-197.79999999999995-8.600000000000023-8.700000000000045-8.600000000000023-22.900000000000034 0-31.600000000000023 65.19999999999993-66.40000000000003 130.0999999999999-132.5 194.5-198.20000000000005 8.599999999999909-8.699999999999989 8.5-22.799999999999955-0.10000000000002274-31.49999999999997l-47.80000000000007-48.099999999999994c-8.5-8.5-22.399999999999977-8.400000000000006-31 0.29999999999998295z"})),pA=go=>kf("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:go.width},kf("path",{fill:"currentColor",d:"M268 416h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12zM432 80h-82.41l-34-56.7A48 48 0 0 0 274.41 0H173.59a48 48 0 0 0-41.16 23.3L98.41 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16v336a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM171.84 50.91A6 6 0 0 1 177 48h94a6 6 0 0 1 5.15 2.91L293.61 80H154.39zM368 464H80V128h288zm-212-48h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12z"}));var gA=go=>{const[xo,uf]=Rp(!1),[df,gf]=Rp(!1),Ef=mp=>{uf(!0),gf(!1)},Rf=mp=>{go.onDelete(go.body),gf(!1)},Vf=mp=>go.onUpdate(go.body,uo(yn({},go.body),{value:mp.target.value})),Qf=mp=>go.onUpdate(go.body,uo(yn({},go.body),{purpose:mp.value})),ep=go.body.modified||go.body.created,Jf=go.body.creator&&kf("div",{className:"r6o-lastmodified"},kf("span",{className:"r6o-lastmodified-by"},go.body.creator.name||go.body.creator.id),go.body.created&&kf("span",{className:"r6o-lastmodified-at"},kf(q$,{datetime:go.env.toClientTime(ep),locale:ay.locale()})));return go.readOnly?kf("div",{className:"r6o-widget comment"},kf("div",{className:"r6o-readonly-comment"},go.body.value),Jf):kf("div",{className:xo?"r6o-widget comment editable":"r6o-widget comment"},kf(tx,{editable:xo,content:go.body.value,onChange:Vf,onSaveAndClose:go.onSaveAndClose}),!xo&&Jf,go.purposeSelector&&kf(DI,{editable:xo,content:go.body.purpose,onChange:Qf,onSaveAndClose:go.onSaveAndClose}),kf("div",{className:df?"r6o-icon r6o-arrow-down r6o-menu-open":"r6o-icon r6o-arrow-down",onClick:()=>gf(!df)},kf(dA,{width:12})),df&&kf(h2,{onEdit:Ef,onDelete:Rf,onClickOutside:()=>gf(!1)}))};const mA=zO.map(go=>go.value),LI=(go,xo)=>{const uf=xo?mA.indexOf(go.purpose)>-1:go.purpose=="commenting"||go.purpose=="replying";return go.type==="TextualBody"&&(!go.hasOwnProperty("purpose")||uf)},FI=(go,xo)=>{var uf,df;if(xo.editable===!0)return!1;if(xo.editable===!1)return!0;if(xo.editable==="MINE_ONLY"){const gf=(uf=go.creator)==null?void 0:uf.id;return((df=xo.env.user)==null?void 0:df.id)!==gf}return xo.readOnly},vA=(go,xo)=>go||{type:"TextualBody",value:"",purpose:xo?"replying":"commenting",draft:!0},BI=go=>{const xo=go.annotation?go.annotation.bodies.filter(Rf=>LI(Rf,go.purposeSelector)):[],uf=vA(xo.find(Rf=>Rf.draft==!0),xo.length>1),df=xo.filter(Rf=>Rf!=uf),gf=Rf=>{const Vf=uf.value,Qf=Rf.target.value;Vf.length===0&&Qf.length>0?go.onAppendBody(uo(yn({},uf),{value:Qf})):Vf.length>0&&Qf.length===0?go.onRemoveBody(uf):go.onUpdateBody(uf,uo(yn({},uf),{value:Qf}))},Ef=Rf=>go.onUpdateBody(uf,uo(yn({},uf),{purpose:Rf.value}));return kf(Gf,null,df.map((Rf,Vf)=>kf(gA,{key:Vf,env:go.env,purposeSelector:go.purposeSelector,readOnly:FI(Rf,go),body:Rf,onUpdate:go.onUpdateBody,onDelete:go.onRemoveBody,onSaveAndClose:go.onSaveAndClose})),!go.readOnly&&go.annotation&&kf("div",{className:"r6o-widget comment editable"},kf(tx,{focus:go.focus,content:uf.value,editable:!0,placeholder:df.length>0?ay.t("Add a reply..."):ay.t("Add a comment..."),onChange:gf,onSaveAndClose:()=>go.onSaveAndClose()}),go.purposeSelector&&uf.value.length>0&&kf(DI,{editable:!0,content:uf.purpose,onChange:Ef,onSaveAndClose:()=>go.onSaveAndClose()})))};BI.disableDelete=(go,xo)=>go.bodies.filter(uf=>LI(uf,xo.purposeSelector)).some(uf=>FI(uf,xo));var jI=BI;function zI(go,xo){go.prototype=Object.create(xo.prototype),go.prototype.constructor=go,_2(go,xo)}function yA(go,xo){return go.classList?!!xo&&go.classList.contains(xo):(" "+(go.className.baseVal||go.className)+" ").indexOf(" "+xo+" ")!==-1}function bA(go,xo){go.classList?go.classList.add(xo):yA(go,xo)||(typeof go.className=="string"?go.className=go.className+" "+xo:go.setAttribute("class",(go.className&&go.className.baseVal||"")+" "+xo))}function HI(go,xo){return go.replace(new RegExp("(^|\\s)"+xo+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function $A(go,xo){go.classList?go.classList.remove(xo):typeof go.className=="string"?go.className=HI(go.className,xo):go.setAttribute("class",HI(go.className&&go.className.baseVal||"",xo))}var UI={disabled:!1},VI=Zg.createContext(null),wT="unmounted",T2="exited",k2="entering",zE="entered",HO="exiting",sw=function(go){zI(xo,go);function xo(df,gf){var Ef;Ef=go.call(this,df,gf)||this;var Rf=gf,Vf=Rf&&!Rf.isMounting?df.enter:df.appear,Qf;return Ef.appearStatus=null,df.in?Vf?(Qf=T2,Ef.appearStatus=k2):Qf=zE:df.unmountOnExit||df.mountOnEnter?Qf=wT:Qf=T2,Ef.state={status:Qf},Ef.nextCallback=null,Ef}xo.getDerivedStateFromProps=function(df,gf){var Ef=df.in;return Ef&&gf.status===wT?{status:T2}:null};var uf=xo.prototype;return uf.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},uf.componentDidUpdate=function(df){var gf=null;if(df!==this.props){var Ef=this.state.status;this.props.in?Ef!==k2&&Ef!==zE&&(gf=k2):(Ef===k2||Ef===zE)&&(gf=HO)}this.updateStatus(!1,gf)},uf.componentWillUnmount=function(){this.cancelNextCallback()},uf.getTimeouts=function(){var df=this.props.timeout,gf,Ef,Rf;return gf=Ef=Rf=df,df!=null&&typeof df!="number"&&(gf=df.exit,Ef=df.enter,Rf=df.appear!==void 0?df.appear:Ef),{exit:gf,enter:Ef,appear:Rf}},uf.updateStatus=function(df,gf){df===void 0&&(df=!1),gf!==null?(this.cancelNextCallback(),gf===k2?this.performEnter(df):this.performExit()):this.props.unmountOnExit&&this.state.status===T2&&this.setState({status:wT})},uf.performEnter=function(df){var gf=this,Ef=this.props.enter,Rf=this.context?this.context.isMounting:df,Vf=this.props.nodeRef?[Rf]:[Zg.findDOMNode(this),Rf],Qf=Vf[0],ep=Vf[1],Jf=this.getTimeouts(),mp=Rf?Jf.appear:Jf.enter;if(!df&&!Ef||UI.disabled){this.safeSetState({status:zE},function(){gf.props.onEntered(Qf)});return}this.props.onEnter(Qf,ep),this.safeSetState({status:k2},function(){gf.props.onEntering(Qf,ep),gf.onTransitionEnd(mp,function(){gf.safeSetState({status:zE},function(){gf.props.onEntered(Qf,ep)})})})},uf.performExit=function(){var df=this,gf=this.props.exit,Ef=this.getTimeouts(),Rf=this.props.nodeRef?void 0:Zg.findDOMNode(this);if(!gf||UI.disabled){this.safeSetState({status:T2},function(){df.props.onExited(Rf)});return}this.props.onExit(Rf),this.safeSetState({status:HO},function(){df.props.onExiting(Rf),df.onTransitionEnd(Ef.exit,function(){df.safeSetState({status:T2},function(){df.props.onExited(Rf)})})})},uf.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},uf.safeSetState=function(df,gf){gf=this.setNextCallback(gf),this.setState(df,gf)},uf.setNextCallback=function(df){var gf=this,Ef=!0;return this.nextCallback=function(Rf){Ef&&(Ef=!1,gf.nextCallback=null,df(Rf))},this.nextCallback.cancel=function(){Ef=!1},this.nextCallback},uf.onTransitionEnd=function(df,gf){this.setNextCallback(gf);var Ef=this.props.nodeRef?this.props.nodeRef.current:Zg.findDOMNode(this),Rf=df==null&&!this.props.addEndListener;if(!Ef||Rf){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var Vf=this.props.nodeRef?[this.nextCallback]:[Ef,this.nextCallback],Qf=Vf[0],ep=Vf[1];this.props.addEndListener(Qf,ep)}df!=null&&setTimeout(this.nextCallback,df)},uf.render=function(){var df=this.state.status;if(df===wT)return null;var gf=this.props,Ef=gf.children;gf.in,gf.mountOnEnter,gf.unmountOnExit,gf.appear,gf.enter,gf.exit,gf.timeout,gf.addEndListener,gf.onEnter,gf.onEntering,gf.onEntered,gf.onExit,gf.onExiting,gf.onExited,gf.nodeRef;var Rf=OE(gf,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Zg.createElement(VI.Provider,{value:null},typeof Ef=="function"?Ef(df,Rf):Zg.cloneElement(Zg.Children.only(Ef),Rf))},xo}(Zg.Component);sw.contextType=VI,sw.propTypes={};function HE(){}sw.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:HE,onEntering:HE,onEntered:HE,onExit:HE,onExiting:HE,onExited:HE},sw.UNMOUNTED=wT,sw.EXITED=T2,sw.ENTERING=k2,sw.ENTERED=zE,sw.EXITING=HO;var _A=sw,wA=function(go,xo){return go&&xo&&xo.split(" ").forEach(function(uf){return bA(go,uf)})},UO=function(go,xo){return go&&xo&&xo.split(" ").forEach(function(uf){return $A(go,uf)})},VO=function(go){zI(xo,go);function xo(){for(var df,gf=arguments.length,Ef=new Array(gf),Rf=0;Rfxo.filter(uf=>(uf.label?uf.label:uf).toLowerCase().startsWith(go.toLowerCase())),SA=(go,xo)=>xo(go);var TA=go=>{const xo=Kf(),[uf,df]=Rp(go.initialValue||""),[gf,Ef]=Rp([]),[Rf,Vf]=Rp(null);Op(()=>{go.focus&&xo.current.querySelector("input").focus({preventScroll:!0})},[]),Op(()=>{go.onChange&&go.onChange(uf)},[uf]);const Qf=Jf=>{if(typeof go.vocabulary=="function"){const mp=SA(Jf,go.vocabulary);mp.then?mp.then(Ef):Ef(mp)}else{const mp=EA(Jf,go.vocabulary);Ef(mp)}},ep=()=>{if(Rf!==null)go.onSubmit(gf[Rf]);else{const Jf=uf.trim();if(Jf){const mp=Array.isArray(go.vocabulary)?go.vocabulary.find(Tp=>(Tp.label||Tp).toLowerCase()===Jf.toLowerCase()):null;mp?go.onSubmit(mp):go.onSubmit(Jf)}}df(""),Ef([]),Vf(null)};return kf("div",{ref:xo,className:"r6o-autocomplete"},kf("div",null,kf("input",{onKeyDown:Jf=>{if(Jf.which===13)ep();else if(Jf.which===27)go.onCancel&&go.onCancel();else if(gf.length>0){if(Jf.which===38)if(Rf===null)Vf(0);else{const mp=Math.max(0,Rf-1);Vf(mp)}else if(Jf.which===40)if(Rf===null)Vf(0);else{const mp=Math.min(gf.length-1,Rf+1);Vf(mp)}}else Jf.which===40&&Array.isArray(go.vocabulary)&&Ef(go.vocabulary)},onChange:Jf=>{const{value:mp}=Jf.target;df(mp),Vf(null),mp?Qf(mp):Ef([])},value:uf,placeholder:go.placeholder})),kf("ul",null,gf.length>0&&gf.map((Jf,mp)=>kf("li",{key:`${Jf.label?Jf.label:Jf}${mp}`,onClick:ep,onMouseEnter:()=>Vf(mp),style:Rf===mp?{backgroundColor:"#bde4ff"}:{}},Jf.label?Jf.label:Jf))))};const kA=go=>go||{type:"TextualBody",value:"",purpose:"tagging",draft:!0};var GI=go=>{const xo=go.annotation?go.annotation.bodies.filter(Jf=>Jf.type==="TextualBody"&&Jf.purpose==="tagging"):[],uf=kA(xo.slice().reverse().find(Jf=>Jf.draft)),df=xo.filter(Jf=>Jf!=uf),[gf,Ef]=Rp(!1),Rf=Jf=>mp=>{Ef(gf===Jf?!1:Jf)},Vf=Jf=>{const mp=uf.value.trim(),Tp=Jf.trim();mp.length===0&&Tp.length>0?go.onAppendBody(uo(yn({},uf),{value:Tp})):mp.length>0&&Tp.length===0?go.onRemoveBody(uf):go.onUpdateBody(uf,uo(yn({},uf),{value:Tp}))},Qf=Jf=>mp=>{mp.stopPropagation(),go.onRemoveBody(Jf)},ep=Jf=>{const mp=Jf.label?uo(yn({},uf),{value:Jf.label,source:Jf.uri}):uo(yn({},uf),{value:Jf}),Tp=po(mp,["draft"]);uf.value.trim().length===0?go.onAppendBody(Tp):go.onUpdateBody(uf,Tp)};return kf("div",{className:"r6o-widget r6o-tag"},df.length>0&&kf("ul",{className:"r6o-taglist"},df.map(Jf=>kf("li",{key:Jf.value,onClick:Rf(Jf.value)},kf("span",{className:"r6o-label"},Jf.value),!go.readOnly&&kf(xA,{in:gf===Jf.value,timeout:200,classNames:"r6o-delete"},kf("span",{className:"r6o-delete-wrapper",onClick:Qf(Jf)},kf("span",{className:"r6o-delete"},kf(fA,{width:12}))))))),!go.readOnly&&kf(TA,{focus:go.focus,placeholder:ay.t("Add tag..."),vocabulary:go.vocabulary||[],onChange:Vf,onSubmit:ep}))};class WI extends rp{constructor(xo){super(xo),this.element=Zg.createRef()}renderWidget(xo){const uf=this.props.widget(uo(yn({annotation:xo.annotation,readOnly:xo.readOnly},xo.config),{onAppendBody:(df,gf)=>xo.onAppendBody(df,gf),onUpdateBody:(df,gf,Ef)=>xo.onUpdateBody(df,gf,Ef),onUpsertBody:(df,gf,Ef)=>xo.onUpsertBody(df,gf,Ef),onRemoveBody:(df,gf)=>xo.onRemoveBody(df,gf),onBatchModify:(df,gf)=>xo.onBatchModify(df,gf),onSetProperty:(df,gf)=>xo.onSetProperty(df,gf),onSaveAndClose:()=>xo.onSaveAndClose()}));for(;this.element.current.firstChild;)this.element.current.removeChild(this.element.current.lastChild);this.element.current.appendChild(uf)}componentDidMount(){this.renderWidget(this.props)}componentWillReceiveProps(xo){this.element.current&&this.props.annotation!==xo.annotation&&this.renderWidget(xo)}render(){return kf("div",{ref:this.element,className:"widget"})}}window.React=Zg,window.ReactDOM=Zg;const CA={COMMENT:jI,TAG:GI},OA=[kf(jI,null),kf(GI,null)],IA=go=>{const xo=df=>{var gf;return typeof df=="function"&&!!((gf=df.prototype)!=null&&gf.isReactComponent)},uf=df=>typeof df=="function"&&(String(df).match(/return .+\(['|"].+['|"],\s*\{/g)||String(df).match(/return .+preact_compat/)||String(df).match(/return .+\.createElement/g));return xo(go)||uf(go)},PA=go=>{const xo=(uf,df,gf)=>{if(typeof uf=="string"||uf instanceof String)return Zg.createElement(CA[uf],df);if((gf==null?void 0:gf.toLowerCase())==="react")return Zg.createElement(uf,df);if((gf==null?void 0:gf.toLowerCase())==="plainjs")return kf(WI,{widget:uf,config:df});if(IA(uf))return Zg.createElement(uf,df);if(typeof uf=="function"||uf instanceof Function)return kf(WI,{widget:uf,config:df});throw`${uf} is not a valid plugin`};if(go.widget){const uf=go,{widget:df,force:gf}=uf,Ef=po(uf,["widget","force"]);return xo(df,Ef,gf)}else return xo(go)},qI=14;var YI=(go,xo,uf,df)=>{const gf=go.getBoundingClientRect();xo.className="r6o-editor r6o-arrow-top r6o-arrow-left";const{left:Ef,top:Rf,right:Vf,bottom:Qf}=uf.getBoundingClientRect();if(xo.style.top=`${Qf-gf.top+qI}px`,xo.style.left=`${Ef-gf.left}px`,df){const ep=xo.children[1].getBoundingClientRect();if(ep.right>window.innerWidth&&(xo.classList.remove("r6o-arrow-left"),xo.classList.add("r6o-arrow-right"),xo.style.left=`${Vf-ep.width-gf.left}px`),ep.bottom>window.innerHeight){xo.classList.remove("r6o-arrow-top"),xo.classList.add("r6o-arrow-bottom");const mp=xo.children[1].getBoundingClientRect().height;xo.style.top=`${Rf-gf.top-mp-qI}px`}const Jf=xo.children[1].getBoundingClientRect();if(Jf.top<0){xo.classList.add("pushed","down"),xo.style.top=`${-gf.top}px`;const mp=Qf-gf.top;Jf.height-gf.top>mp&&xo.classList.remove("r6o-arrow-bottom")}Jf.left<0&&(xo.classList.add("pushed","right"),xo.style.left=`${-gf.left}px`),requestAnimationFrame(()=>xo.style.opacity=1)}};const KI=go=>{const{top:xo,left:uf,width:df,height:gf}=go.getBoundingClientRect();return`${xo}, ${uf}, ${df}, ${gf}`};class AA extends rp{constructor(xo){super(xo),mo(this,"initResizeObserver",()=>{const uf=this.props.autoPosition===void 0?!0:this.props.autoPosition;if(window!=null&&window.ResizeObserver){const df=new ResizeObserver(()=>{this.state.dragged||YI(this.props.wrapperEl,this.element.current,this.props.selectedElement,uf)});return df.observe(this.props.wrapperEl),()=>df.disconnect()}else this.state.dragged||YI(this.props.wrapperEl,this.element.current,this.props.selectedElement,uf)}),mo(this,"creationMeta",uf=>{const df={},{user:gf}=this.props.env;return gf&&(df.creator={},gf.id&&(df.creator.id=gf.id),gf.displayName&&(df.creator.name=gf.displayName),df[uf.created?"modified":"created"]=this.props.env.getCurrentTimeAdjusted()),df}),mo(this,"getCurrentAnnotation",()=>this.state.currentAnnotation.clone()),mo(this,"updateCurrentAnnotation",(uf,df)=>this.setState({currentAnnotation:this.state.currentAnnotation.clone(uf)},()=>{df&&this.onOk()})),mo(this,"onAppendBody",(uf,df)=>this.updateCurrentAnnotation({body:[...this.state.currentAnnotation.bodies,yn(yn({},uf),this.creationMeta(uf))]},df)),mo(this,"onUpdateBody",(uf,df,gf)=>this.updateCurrentAnnotation({body:this.state.currentAnnotation.bodies.map(Ef=>Ef===uf?yn(yn({},df),this.creationMeta(df)):Ef)},gf)),mo(this,"onRemoveBody",(uf,df)=>this.updateCurrentAnnotation({body:this.state.currentAnnotation.bodies.filter(gf=>gf!==uf)},df)),mo(this,"onUpsertBody",(uf,df,gf)=>{if(uf==null&&df!=null)this.onAppendBody(df,gf);else if(uf!=null&&df!=null)this.onUpdateBody(uf,df,gf);else if(uf!=null&&df==null){const Ef=this.state.currentAnnotation.bodies.find(Rf=>Rf.purpose===uf.purpose);Ef?this.onUpdateBody(Ef,uf,gf):this.onAppendBody(uf,gf)}}),mo(this,"onBatchModify",(uf,df)=>{const gf=uf.filter(ep=>ep.action==="upsert"&&ep.body).map(ep=>({previous:this.state.currentAnnotation.bodies.find(Jf=>Jf.purpose===ep.body.purpose),updated:yn(yn({},ep.body),this.creationMeta(ep.body))})),Ef=uf.filter(ep=>ep.action==="remove").map(ep=>ep.body),Rf=[...uf.filter(ep=>ep.action==="append"||ep.action==="upsert"&&ep.updated&&!ep.previous).map(ep=>yn(yn({},ep.body),this.creationMeta(ep.body))),...gf.filter(ep=>!ep.previous).map(ep=>ep.updated)],Vf=[...uf.filter(ep=>ep.action==="update"||ep.action==="upsert"&&ep.updated&&ep.previous).map(ep=>({previous:ep.previous,updated:yn(yn({},ep.updated),this.creationMeta(ep.updated))})),...gf.filter(ep=>ep.previous)],Qf=[...this.state.currentAnnotation.bodies.filter(ep=>!Ef.includes(ep)).map(ep=>{const Jf=Vf.find(mp=>mp.previous===ep);return Jf?Jf.updated:ep}),...Rf];this.updateCurrentAnnotation({body:Qf},df)}),mo(this,"onSetProperty",(uf,df)=>{if(["@context","id","type","body","target"].includes(uf))throw new Exception(`Cannot set ${uf} - not allowed`);if(df)this.updateCurrentAnnotation({[uf]:df});else{const gf=this.currentAnnotation.clone();delete gf[uf],this.setState({currentAnnotation:gf})}}),mo(this,"onCancel",()=>this.props.onCancel(this.props.annotation)),mo(this,"onOk",()=>{const uf=gf=>gf.clone({body:gf.bodies.map(Ef=>{var Rf=Ef,Vf=po(Rf,["draft"]);return Vf})}),{currentAnnotation:df}=this.state;df.bodies.length===0&&!this.props.allowEmpty?df.isSelection?this.onCancel():this.props.onAnnotationDeleted(this.props.annotation):df.isSelection?this.props.onAnnotationCreated(uf(df).toAnnotation()):this.props.onAnnotationUpdated(uf(df),this.props.annotation)}),mo(this,"onDelete",()=>this.props.onAnnotationDeleted(this.props.annotation)),this.element=Zg.createRef(),this.state={currentAnnotation:xo.annotation,dragged:!1,selectionBounds:KI(xo.selectedElement)}}componentWillReceiveProps(xo){var uf;const{selectionBounds:df}=this.state,gf=KI(xo.selectedElement);(uf=this.props.annotation)!=null&&uf.isEqual(xo.annotation)?this.setState({selectionBounds:gf}):this.setState({currentAnnotation:xo.annotation,selectionBounds:gf}),this.props.modifiedTarget!=xo.modifiedTarget&&this.state.currentAnnotation&&this.updateCurrentAnnotation({target:this.props.modifiedTarget}),df!=gf&&this.element.current&&(this.removeObserver&&this.removeObserver(),this.removeObserver=this.initResizeObserver())}componentDidMount(){this.removeObserver=this.initResizeObserver(),new MutationObserver(()=>{this.element.current&&(this.removeObserver&&this.removeObserver(),this.removeObserver=this.initResizeObserver())}).observe(this.element.current,{childList:!0,subtree:!0})}componentWillUnmount(){this.removeObserver&&this.removeObserver()}render(){const{currentAnnotation:xo}=this.state,uf=this.props.widgets?this.props.widgets.map(PA):OA,df=Ef=>Ef.type.disableDelete?Ef.type.disableDelete(xo,uo(yn({},Ef.props),{readOnly:this.props.readOnly,env:this.props.env})):!1,gf=xo&&(xo.bodies.length>0||this.props.allowEmpty)&&!this.props.readOnly&&!xo.isSelection&&!uf.some(df);return kf(Ew,{disabled:!this.props.detachable,handle:".r6o-draggable",cancel:".r6o-btn, .r6o-btn *",onDrag:()=>this.setState({dragged:!0})},kf("div",{ref:this.element,className:this.state.dragged?"r6o-editor dragged":"r6o-editor"},kf("div",{className:"r6o-arrow"}),kf("div",{className:"r6o-editor-inner"},uf.map((Ef,Rf)=>Zg.cloneElement(Ef,{key:`${Rf}`,focus:Rf===0,annotation:xo,readOnly:this.props.readOnly,env:this.props.env,onAppendBody:this.onAppendBody,onUpdateBody:this.onUpdateBody,onRemoveBody:this.onRemoveBody,onUpsertBody:this.onUpsertBody,onBatchModify:this.onBatchModify,onSetProperty:this.onSetProperty,onSaveAndClose:this.onOk})),this.props.readOnly?kf("div",{className:"r6o-footer"},kf("button",{className:"r6o-btn",onClick:this.onCancel},ay.t("Close"))):kf("div",{className:this.props.detachable?"r6o-footer r6o-draggable":"r6o-footer"},gf&&kf("button",{className:"r6o-btn left delete-annotation",title:ay.t("Delete"),onClick:this.onDelete},kf(pA,{width:12})),kf("button",{className:"r6o-btn outline",onClick:this.onCancel},ay.t("Cancel")),kf("button",{className:"r6o-btn ",onClick:this.onOk},ay.t("Ok"))))))}}var xC,RA=new Uint8Array(16);function NA(){if(!xC&&(xC=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!xC))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xC(RA)}var MA=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function DA(go){return typeof go=="string"&&MA.test(go)}for(var j0=[],GO=0;GO<256;++GO)j0.push((GO+256).toString(16).substr(1));function LA(go){var xo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,uf=(j0[go[xo+0]]+j0[go[xo+1]]+j0[go[xo+2]]+j0[go[xo+3]]+"-"+j0[go[xo+4]]+j0[go[xo+5]]+"-"+j0[go[xo+6]]+j0[go[xo+7]]+"-"+j0[go[xo+8]]+j0[go[xo+9]]+"-"+j0[go[xo+10]]+j0[go[xo+11]]+j0[go[xo+12]]+j0[go[xo+13]]+j0[go[xo+14]]+j0[go[xo+15]]).toLowerCase();if(!DA(uf))throw TypeError("Stringified UUID is invalid");return uf}function XI(go,xo,uf){go=go||{};var df=go.random||(go.rng||NA)();if(df[6]=df[6]&15|64,df[8]=df[8]&63|128,xo){uf=uf||0;for(var gf=0;gf<16;++gf)xo[uf+gf]=df[gf];return xo}return LA(df)}var FA=function go(xo,uf){if(xo===uf)return!0;if(xo&&uf&&typeof xo=="object"&&typeof uf=="object"){if(xo.constructor!==uf.constructor)return!1;var df,gf,Ef;if(Array.isArray(xo)){if(df=xo.length,df!=uf.length)return!1;for(gf=df;gf--!=0;)if(!go(xo[gf],uf[gf]))return!1;return!0}if(xo.constructor===RegExp)return xo.source===uf.source&&xo.flags===uf.flags;if(xo.valueOf!==Object.prototype.valueOf)return xo.valueOf()===uf.valueOf();if(xo.toString!==Object.prototype.toString)return xo.toString()===uf.toString();if(Ef=Object.keys(xo),df=Ef.length,df!==Object.keys(uf).length)return!1;for(gf=df;gf--!=0;)if(!Object.prototype.hasOwnProperty.call(uf,Ef[gf]))return!1;for(gf=df;gf--!=0;){var Rf=Ef[gf];if(!go(xo[Rf],uf[Rf]))return!1}return!0}return xo!==xo&&uf!==uf},ZI=FA;const WO=class{constructor(go,xo){mo(this,"clone",(uf,df)=>new WO(yn(yn({},this.underlying),uf),yn(yn({},this.opts),df))),mo(this,"selector",uf=>{const{target:df}=this.underlying;if(df.selector)return(Array.isArray(df.selector)?df.selector:[df.selector]).find(gf=>gf.type===uf)}),this.underlying=go,this.opts=xo}isEqual(go){return(go==null?void 0:go.type)!=="Annotation"?!1:this.underlying===go.underlying?!0:!this.underlying.id||!go.underlying.id?!1:ZI(this.underlying,go.underlying)}get readOnly(){var go;return(go=this.opts)==null?void 0:go.readOnly}get id(){return this.underlying.id}get type(){return this.underlying.type}get motivation(){return this.underlying.motivation}get body(){return this.underlying.body}get target(){return this.underlying.target}get bodies(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]}set bodies(go){this.underlying.body=go}get targets(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}get quote(){return this.selector("TextQuoteSelector").exact}get start(){return this.selector("TextPositionSelector").start}get end(){return this.selector("TextPositionSelector").end}};let C2=WO;mo(C2,"create",go=>{const xo={"@context":"http://www.w3.org/ns/anno.jsonld",type:"Annotation",id:`#${XI()}`,body:[]};return new WO(yn(yn({},xo),go))});class xT{constructor(xo,uf){mo(this,"clone",df=>{const gf=new xT;return gf.underlying=JSON.parse(JSON.stringify(this.underlying)),df&&(gf.underlying=yn(yn({},gf.underlying),df)),gf}),mo(this,"selector",df=>{const{target:gf}=this.underlying;if(gf.selector)return(Array.isArray(gf.selector)?gf.selector:[gf.selector]).find(Ef=>Ef.type===df)}),mo(this,"toAnnotation",()=>{const df=Object.assign({},this.underlying,{"@context":"http://www.w3.org/ns/anno.jsonld",type:"Annotation",id:`#${XI()}`});return new C2(df)}),this.underlying={type:"Selection",body:uf||[],target:xo}}get type(){return this.underlying.type}get body(){return this.underlying.body}get target(){return this.underlying.target}get targets(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}isEqual(xo){return xo?ZI(this.underlying,xo.underlying):!1}get bodies(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]}get quote(){return this.selector("TextQuoteSelector").exact}get isSelection(){return!0}}let qO=0;var BA=()=>({setServerTime:go=>{const xo=Date.now();qO=go-xo},getCurrentTimeAdjusted:()=>new Date(Date.now()+qO).toISOString(),toClientTime:go=>Date.parse(go)-qO});const jA=(go,xo)=>{if(go){const uf=go==="auto"?window.navigator.userLanguage||window.navigator.language:go;try{ay.init(uf.split("-")[0].toLowerCase(),xo)}catch{console.warn(`Unsupported locale '${uf}'. Falling back to default en.`)}}else ay.init(null,xo)},wv="http://www.w3.org/2000/svg",YO=go=>{const xo=go.getAttribute("class");return xo?new Set(xo.split(" ")):new Set},yx=(go,xo)=>{const uf=YO(go);uf.add(xo),go.setAttribute("class",Array.from(uf).join(" "))},zA=(go,xo)=>{const uf=YO(go);uf.delete(xo),uf.size===0?go.removeAttribute("class"):go.setAttribute("class",Array.from(uf).join(" "))},KO=(go,xo)=>YO(go).has(xo),O2=(go,xo)=>{const uf=go.selector("FragmentSelector");if(uf!=null&&uf.conformsTo.startsWith("http://www.w3.org/TR/media-frags")){const{value:df}=uf,gf=df.includes(":")?df.substring(df.indexOf("=")+1,df.indexOf(":")):"pixel",Ef=df.includes(":")?df.substring(df.indexOf(":")+1):df.substring(df.indexOf("=")+1);let[Rf,Vf,Qf,ep]=Ef.split(",").map(parseFloat);return gf.toLowerCase()==="percent"&&(Rf=Rf*xo.naturalWidth/100,Vf=Vf*xo.naturalHeight/100,Qf=Qf*xo.naturalWidth/100,ep=ep*xo.naturalHeight/100),{x:Rf,y:Vf,w:Qf,h:ep}}},HA=(go,xo,uf,df,gf)=>({source:gf==null?void 0:gf.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:`xywh=pixel:${go},${xo},${uf},${df}`}}),VA=(go,xo,uf,df,gf)=>{const Ef=go/gf.naturalWidth*100,Rf=xo/gf.naturalHeight*100,Vf=uf/gf.naturalWidth*100,Qf=df/gf.naturalHeight*100;return{source:gf.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:`xywh=percent:${Ef},${Rf},${Vf},${Qf}`}}},ET=(go,xo,uf,df,gf,Ef)=>(Ef==null?void 0:Ef.toLowerCase())==="percent"?VA(go,xo,uf,df,gf):HA(go,xo,uf,df,gf),EC=(go,xo,uf,df,gf)=>{go.setAttribute("x",xo),go.setAttribute("y",uf),go.setAttribute("width",df),go.setAttribute("height",gf)},SC=(go,xo,uf)=>{go.setAttribute("cx",xo),go.setAttribute("cy",uf),go.setAttribute("r",7)},JI=(go,xo,uf,df,gf)=>{const Ef=document.createElementNS(wv,"path");Ef.setAttribute("fill-rule","evenodd");const{naturalWidth:Rf,naturalHeight:Vf}=go;return Ef.setAttribute("d",`M0 0 h${Rf} v${Vf} h-${Rf} z M${xo} ${uf} h${df} v${gf} h-${df} z`),Ef},XO=(go,xo,uf,df,gf,Ef)=>{const{naturalWidth:Rf,naturalHeight:Vf}=xo;go.setAttribute("d",`M0 0 h${Rf} v${Vf} h-${Rf} z M${uf} ${df} h${gf} v${Ef} h-${gf} z`)},ZO=(go,xo,uf,df)=>{const{x:gf,y:Ef,w:Rf,h:Vf}=go.type==="Annotation"||go.type==="Selection"?O2(go,xo):{x:go,y:xo,w:uf,h:df},Qf=document.createElementNS(wv,"g");if(Rf===0&&Vf===0){yx(Qf,"a9s-point"),yx(Qf,"a9s-non-scaling"),Qf.setAttribute("transform-origin",`${gf} ${Ef}`);const ep=document.createElementNS(wv,"circle"),Jf=document.createElementNS(wv,"circle");Jf.setAttribute("class","a9s-inner"),SC(Jf,gf,Ef),ep.setAttribute("class","a9s-outer"),SC(ep,gf,Ef),Qf.appendChild(ep),Qf.appendChild(Jf)}else{const ep=document.createElementNS(wv,"rect"),Jf=document.createElementNS(wv,"rect");Jf.setAttribute("class","a9s-inner"),EC(Jf,gf,Ef,Rf,Vf),ep.setAttribute("class","a9s-outer"),EC(ep,gf,Ef,Rf,Vf),Qf.appendChild(ep),Qf.appendChild(Jf)}return Qf},QI=go=>{const xo=go.querySelector(".a9s-outer");if(xo.nodeName==="rect"){const uf=parseFloat(xo.getAttribute("x")),df=parseFloat(xo.getAttribute("y")),gf=parseFloat(xo.getAttribute("width")),Ef=parseFloat(xo.getAttribute("height"));return{x:uf,y:df,w:gf,h:Ef}}else{const uf=parseFloat(xo.getAttribute("cx")),df=parseFloat(xo.getAttribute("cy"));return{x:uf,y:df,w:0,h:0}}},JO=(go,xo,uf,df,gf)=>{const Ef=go.querySelector(".a9s-inner"),Rf=go.querySelector(".a9s-outer");Rf.nodeName==="rect"?(EC(Ef,xo,uf,df,gf),EC(Rf,xo,uf,df,gf)):(SC(Ef,xo,uf),SC(Rf,xo,uf))},GA=(go,xo)=>{const{w:uf,h:df}=O2(go,xo);return uf*df};class WA{constructor(xo,uf,df,gf,Ef){mo(this,"dragTo",(Rf,Vf)=>{this.group.style.display=null,this.opposite=[Rf,Vf];const{x:Qf,y:ep,w:Jf,h:mp}=this.bbox;XO(this.mask,this.env.image,Qf,ep,Jf,mp),JO(this.rect,Qf,ep,Jf,mp)}),mo(this,"getBoundingClientRect",()=>this.rect.getBoundingClientRect()),mo(this,"toSelection",()=>{const{x:Rf,y:Vf,w:Qf,h:ep}=this.bbox;return new xT(ET(Rf,Vf,Qf,ep,this.env.image,this.config.fragmentUnit))}),mo(this,"destroy",()=>{this.group.parentNode.removeChild(this.group),this.mask=null,this.rect=null,this.group=null}),this.anchor=[xo,uf],this.opposite=[xo,uf],this.config=gf,this.env=Ef,this.group=document.createElementNS(wv,"g"),this.mask=JI(Ef.image,xo,uf,2,2),this.mask.setAttribute("class","a9s-selection-mask"),this.rect=ZO(xo,uf,2,2),this.rect.setAttribute("class","a9s-selection"),this.group.style.pointerEvents="none",this.group.style.display="none",this.group.appendChild(this.mask),this.group.appendChild(this.rect),df.appendChild(this.group)}get bbox(){const xo=this.opposite[0]-this.anchor[0],uf=this.opposite[1]-this.anchor[1];return{x:xo>0?this.anchor[0]:this.opposite[0],y:uf>0?this.anchor[1]:this.opposite[1],w:Math.max(1,Math.abs(xo)),h:Math.max(1,Math.abs(uf))}}get element(){return this.rect}}const qA={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"},QO=()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,YA=go=>{let xo=null;const uf=(gf,Ef)=>new MouseEvent(gf,{screenX:Ef.screenX,screenY:Ef.screenY,clientX:Ef.clientX,clientY:Ef.clientY,pageX:Ef.pageX,pageY:Ef.pageY,bubbles:!0}),df=gf=>{const Ef=gf.changedTouches[0],Rf=uf(qA[gf.type],Ef);Ef.target.dispatchEvent(Rf),gf.preventDefault(),(gf.type==="touchstart"||gf.type==="touchmove")&&(xo&&clearTimeout(xo),xo=setTimeout(()=>{const Vf=uf("dblclick",Ef);Ef.target.dispatchEvent(Vf)},800)),gf.type==="touchend"&&xo&&clearTimeout(xo)};go.addEventListener("touchstart",df,!0),go.addEventListener("touchmove",df,!0),go.addEventListener("touchend",df,!0),go.addEventListener("touchcancel",df,!0)},TC="An implementation is missing",KA=QO();class eP extends Z1{constructor(xo,uf,df){super(),mo(this,"enableResponsive",()=>{window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>{const Ef=this.svg.getBoundingClientRect(),{width:Rf,height:Vf}=this.svg.viewBox.baseVal;this.scale=Math.max(Rf/Ef.width,Vf/Ef.height),this.onScaleChanged&&this.onScaleChanged(this.scale)}),this.resizeObserver.observe(this.svg.parentNode))}),mo(this,"getSVGPoint",Ef=>{const Rf=this.svg.createSVGPoint();if(KA){const Vf=this.svg.getBoundingClientRect(),Qf=Ef.clientX-Vf.x,ep=Ef.clientY-Vf.y,{left:Jf,top:mp}=this.svg.getBoundingClientRect();return Rf.x=Qf+Jf,Rf.y=ep+mp,Rf.matrixTransform(this.g.getScreenCTM().inverse())}else return Rf.x=Ef.offsetX,Rf.y=Ef.offsetY,Rf.matrixTransform(this.g.getCTM().inverse())}),mo(this,"drawHandle",(Ef,Rf)=>{const Vf=document.createElementNS(wv,"g");Vf.setAttribute("class","a9s-handle");const Qf=document.createElementNS(wv,"g"),ep=Pp=>{const tg=document.createElementNS(wv,"circle");return tg.setAttribute("cx",Ef),tg.setAttribute("cy",Rf),tg.setAttribute("r",Pp),tg},Jf=this.config.handleRadius||6,mp=ep(Jf);mp.setAttribute("class","a9s-handle-inner");const Tp=ep(Jf+1);return Tp.setAttribute("class","a9s-handle-outer"),Qf.appendChild(Tp),Qf.appendChild(mp),Vf.appendChild(Qf),Vf}),mo(this,"setHandleXY",(Ef,Rf,Vf)=>{const Qf=Ef.querySelector(".a9s-handle-inner");Qf.setAttribute("cx",Rf),Qf.setAttribute("cy",Vf);const ep=Ef.querySelector(".a9s-handle-outer");ep.setAttribute("cx",Rf),ep.setAttribute("cy",Vf)}),mo(this,"getHandleXY",Ef=>{const Rf=Ef.querySelector(".a9s-handle-outer");return{x:parseFloat(Rf.getAttribute("cx")),y:parseFloat(Rf.getAttribute("cy"))}}),mo(this,"scaleHandle",Ef=>{const Rf=Ef.querySelector(".a9s-handle-inner"),Vf=Ef.querySelector(".a9s-handle-outer"),Qf=this.scale*(this.config.handleRadius||6);Rf.setAttribute("r",Qf),Vf.setAttribute("r",Qf)}),this.svg=xo.closest("svg"),this.g=xo,this.config=uf,this.env=df,this.scale=1;const{image:gf}=df;(gf instanceof Element||gf instanceof HTMLDocument)&&this.enableResponsive()}destroy(){this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=null}}class eI extends eP{constructor(xo,uf,df){super(xo,uf,df),mo(this,"attachListeners",({mouseMove:gf,mouseUp:Ef,dblClick:Rf})=>{gf&&(this.mouseMove=Vf=>{const{x:Qf,y:ep}=this.getSVGPoint(Vf);this.started||(this.emit("startSelection",{x:Qf,y:ep}),this.started=!0),gf(Qf,ep,Vf)},this.svg.addEventListener("mousemove",this.mouseMove)),Ef&&(this.mouseUp=Vf=>{if(Vf.button!==0)return;const{x:Qf,y:ep}=this.getSVGPoint(Vf);Ef(Qf,ep,Vf)},document.addEventListener("mouseup",this.mouseUp)),Rf&&(this.dblClick=Vf=>{const{x:Qf,y:ep}=this.getSVGPoint(Vf);Rf(Qf,ep,Vf)},document.addEventListener("dblclick",this.dblClick))}),mo(this,"detachListeners",()=>{this.mouseMove&&this.svg.removeEventListener("mousemove",this.mouseMove),this.mouseUp&&document.removeEventListener("mouseup",this.mouseUp),this.dblClick&&document.removeEventListener("dblclick",this.dblClick)}),mo(this,"start",(gf,Ef)=>{const{x:Rf,y:Vf}=this.getSVGPoint(gf);this.startDrawing(Rf,Vf,Ef,gf)}),mo(this,"startDrawing",gf=>{throw new Error(TC)}),mo(this,"createEditableShape",gf=>{throw new Error(TC)}),this.started=!1}get isDrawing(){throw new Error(TC)}}eI.supports=go=>{throw new Error(TC)};const tP="An implementation is missing";class rP extends eP{constructor(xo,uf,df,gf){super(uf,df,gf),mo(this,"updateState",Ef=>{throw new Error(tP)}),this.annotation=xo}get element(){throw new Error(tP)}}const XA=/firefox/i.test(navigator.userAgent),nP=(go,xo,uf,df,gf)=>{go.setAttribute("width",df),go.setAttribute("height",gf),XA?(go.setAttribute("x",0),go.setAttribute("y",0),go.setAttribute("transform",`translate(${xo}, ${uf})`)):(go.setAttribute("x",xo),go.setAttribute("y",uf))},iP=(go,xo)=>{const{x:uf,y:df,width:gf,height:Ef}=xo.getBBox(),Rf=document.createElementNS(wv,"svg");Rf.setAttribute("class","a9s-formatter-el"),nP(Rf,uf,df,gf,Ef);const Vf=document.createElementNS(wv,"g");Vf.appendChild(go),Rf.appendChild(Vf),xo.append(Rf)},kC=(go,xo,uf)=>{if(!uf)return go;const df=uf(xo);if(!df)return go;if(typeof df=="string"||df instanceof String)yx(go,df);else if(df.nodeType===Node.ELEMENT_NODE)iP(df,go);else{const{className:gf,style:Ef,element:Rf}=df;if(gf&&yx(go,gf),Ef){const Vf=go.querySelector(".a9s-outer"),Qf=go.querySelector(".a9s-inner");Vf&&Qf?(Vf.setAttribute("style","display:none"),Qf.setAttribute("style",Ef)):go.setAttribute("style",Ef)}Rf&&iP(Rf,go);for(const Vf in df)df.hasOwnProperty(Vf)&&Vf.startsWith("data-")&&go.setAttribute(Vf,df[Vf])}},tI=(go,xo,uf,df,gf)=>{const Ef=go.querySelector(".a9s-formatter-el");Ef&&nP(Ef,xo,uf,df,gf)};class ZA extends rP{constructor(xo,uf,df,gf){super(xo,uf,df,gf),mo(this,"onScaleChanged",()=>this.handles.map(this.scaleHandle)),mo(this,"setSize",(ep,Jf,mp,Tp)=>{JO(this.rectangle,ep,Jf,mp,Tp),XO(this.mask,this.env.image,ep,Jf,mp,Tp),tI(this.elementGroup,ep,Jf,mp,Tp);const[Pp,tg,gg,fg]=this.handles;this.setHandleXY(Pp,ep,Jf),this.setHandleXY(tg,ep+mp,Jf),this.setHandleXY(gg,ep+mp,Jf+Tp),this.setHandleXY(fg,ep,Jf+Tp)}),mo(this,"stretchCorners",(ep,Jf,mp)=>{const Tp=this.getHandleXY(Jf),Pp=mp.x-Tp.x,tg=mp.y-Tp.y,gg=Pp>0?Tp.x:mp.x,fg=tg>0?Tp.y:mp.y,Tg=Math.abs(Pp),Rg=Math.abs(tg);JO(this.rectangle,gg,fg,Tg,Rg),XO(this.mask,this.env.image,gg,fg,Tg,Rg),tI(this.elementGroup,gg,fg,Tg,Rg),this.setHandleXY(this.handles[ep],mp.x,mp.y);const $m=this.handles[(ep+3)%4];this.setHandleXY($m,Tp.x,mp.y);const pm=this.handles[(ep+5)%4];return this.setHandleXY(pm,mp.x,Tp.y),{x:gg,y:fg,w:Tg,h:Rg}}),mo(this,"onGrab",ep=>Jf=>{if(Jf.button!==0)return;this.grabbedElem=ep;const mp=this.getSVGPoint(Jf),{x:Tp,y:Pp}=QI(this.rectangle);this.mouseOffset={x:mp.x-Tp,y:mp.y-Pp}}),mo(this,"onMouseMove",ep=>{if(ep.button!==0)return;const Jf=(mp,Tp)=>mp<0?0:mp>Tp?Tp:mp;if(this.grabbedElem){const mp=this.getSVGPoint(ep);if(this.grabbedElem===this.rectangle){const{w:Tp,h:Pp}=QI(this.rectangle),{naturalWidth:tg,naturalHeight:gg}=this.env.image,fg=Jf(mp.x-this.mouseOffset.x,tg-Tp),Tg=Jf(mp.y-this.mouseOffset.y,gg-Pp);this.setSize(fg,Tg,Tp,Pp),this.emit("update",ET(fg,Tg,Tp,Pp,this.env.image,this.config.fragmentUnit))}else{const Tp=this.handles.indexOf(this.grabbedElem),Pp=Tp<2?this.handles[Tp+2]:this.handles[Tp-2],{x:tg,y:gg,w:fg,h:Tg}=this.stretchCorners(Tp,Pp,mp);this.emit("update",ET(tg,gg,fg,Tg,this.env.image,this.config.fragmentUnit))}}}),mo(this,"onMouseUp",ep=>{this.grabbedElem=null,this.mouseOffset=null}),mo(this,"updateState",ep=>{const{x:Jf,y:mp,w:Tp,h:Pp}=O2(ep,this.env.image);this.setSize(Jf,mp,Tp,Pp)}),this.svg.addEventListener("mousemove",this.onMouseMove),this.svg.addEventListener("mouseup",this.onMouseUp);const{x:Ef,y:Rf,w:Vf,h:Qf}=O2(xo,gf.image);this.containerGroup=document.createElementNS(wv,"g"),this.mask=JI(gf.image,Ef,Rf,Vf,Qf),this.mask.setAttribute("class","a9s-selection-mask"),this.containerGroup.appendChild(this.mask),this.elementGroup=document.createElementNS(wv,"g"),this.elementGroup.setAttribute("class","a9s-annotation editable selected"),this.rectangle=ZO(Ef,Rf,Vf,Qf),this.rectangle.querySelector(".a9s-inner").addEventListener("mousedown",this.onGrab(this.rectangle)),this.elementGroup.appendChild(this.rectangle),this.handles=[[Ef,Rf],[Ef+Vf,Rf],[Ef+Vf,Rf+Qf],[Ef,Rf+Qf]].map(ep=>{const[Jf,mp]=ep,Tp=this.drawHandle(Jf,mp);return Tp.addEventListener("mousedown",this.onGrab(Tp)),this.elementGroup.appendChild(Tp),Tp}),this.containerGroup.appendChild(this.elementGroup),uf.appendChild(this.containerGroup),kC(this.rectangle,xo,df.formatter),this.grabbedElem=null,this.mouseOffset=null}get element(){return this.elementGroup}destroy(){this.containerGroup.parentNode.removeChild(this.containerGroup),super.destroy()}}class CC extends eI{constructor(xo,uf,df){super(xo,uf,df),mo(this,"startDrawing",(gf,Ef)=>{this.attachListeners({mouseMove:this.onMouseMove,mouseUp:this.onMouseUp}),this.rubberband=new WA(gf,Ef,this.g,this.config,this.env)}),mo(this,"stop",()=>{this.rubberband&&(this.rubberband.destroy(),this.rubberband=null)}),mo(this,"onMouseMove",(gf,Ef)=>this.rubberband.dragTo(gf,Ef)),mo(this,"onMouseUp",()=>{this.detachListeners(),this.started=!1;const{width:gf,height:Ef}=this.rubberband.getBoundingClientRect(),Rf=this.config.minSelectionWidth||4,Vf=this.config.minSelectionHeight||4;if(gf>=Rf&&Ef>=Vf){const{element:Qf}=this.rubberband;Qf.annotation=this.rubberband.toSelection(),this.emit("complete",Qf)}else this.emit("cancel");this.stop()}),mo(this,"createEditableShape",gf=>new ZA(gf,this.g,this.config,this.env)),this.rubberband=null}get isDrawing(){return this.rubberband!=null}}CC.identifier="rect",CC.supports=go=>{const xo=go.selector("FragmentSelector");return xo==null?void 0:xo.conformsTo.startsWith("http://www.w3.org/TR/media-frags")};const JA=go=>{const xo=new XMLSerializer().serializeToString(go.documentElement).replace("",``);return new DOMParser().parseFromString(xo,"image/svg+xml").documentElement},oP=go=>{const xo=df=>{Array.from(df.attributes).forEach(gf=>{gf.name.startsWith("on")&&df.removeAttribute(gf.name)})},uf=go.getElementsByTagName("script");return Array.from(uf).reverse().forEach(df=>df.parentNode.removeChild(df)),xo(go),Array.from(go.querySelectorAll("*")).forEach(xo),go},UE=go=>{const xo=go.selector("SvgSelector");if(xo){const uf=new DOMParser,{value:df}=xo,gf=uf.parseFromString(df,"image/svg+xml"),Ef=gf.lookupPrefix(wv),Rf=gf.lookupNamespaceURI(null);return Ef||Rf?oP(gf).firstChild:oP(JA(gf)).firstChild}},aP=go=>{const xo=UE(go),uf=document.createElementNS(wv,"g"),df=xo.cloneNode(!0);df.setAttribute("class","a9s-inner");const gf=xo.cloneNode(!0);return gf.setAttribute("class","a9s-outer"),uf.appendChild(gf),uf.appendChild(df),uf},rI=(go,xo)=>{const uf=go.querySelector(".a9s-inner").cloneNode(!0);uf.removeAttribute("class"),uf.removeAttribute("xmlns");let df=uf.outerHTML||new XMLSerializer().serializeToString(uf);return df=df.replace(` xmlns="${wv}"`,""),{source:xo==null?void 0:xo.src,selector:{type:"SvgSelector",value:`${df}`}}},QA=go=>{const xo=UE(go),uf=xo.nodeName.toLowerCase();if(uf==="polygon")return e3(xo);if(uf==="circle")return t3(xo);if(uf==="ellipse")return r3(xo);if(uf=="path")return n3(xo);throw`Unsupported SVG shape type: ${uf}`},e3=go=>{const xo=go.getAttribute("points").split(" ").map(gf=>gf.split(",").map(Ef=>parseFloat(Ef.trim())));let uf=0,df=xo.length-1;for(let gf=0;gf{const xo=go.getAttribute("r");return xo*xo*Math.PI},r3=go=>{const xo=go.getAttribute("rx"),uf=go.getAttribute("ry");return xo*uf*Math.PI},n3=go=>{const xo=go.getAttribute("d").split("L");let uf=0;if(xo.length>1){var df=xo[xo.length-1].trim().split(" ");let gf=parseFloat(df[0]),Ef=parseFloat(df[1]);df=xo[0].substring(1).trim().split(" ");let Rf=parseFloat(df[0]),Vf=parseFloat(df[1]);uf+=(gf+Rf)*(Ef-Vf),gf=Rf,Ef=Vf;for(let Qf=1;Qf{this.mask.setAttribute("d",`M0 0 h${this.w} v${this.h} h-${this.w} z M${this.polygon.getAttribute("points")} z`)}),mo(this,"destroy",()=>this.mask.parentNode.removeChild(this.mask)),this.w=xo.naturalWidth,this.h=xo.naturalHeight,this.polygon=uf,this.mask=document.createElementNS(wv,"path"),this.mask.setAttribute("fill-rule","evenodd"),this.mask.setAttribute("class","a9s-selection-mask"),this.mask.setAttribute("d",`M0 0 h${this.w} v${this.h} h-${this.w} z M${this.polygon.getAttribute("points")} z`)}get element(){return this.mask}}class i3{constructor(xo,uf,df){mo(this,"setPoints",gf=>{const Ef=gf.map(Rf=>`${Rf[0]},${Rf[1]}`).join(" ");this.outer.setAttribute("points",Ef),this.inner.setAttribute("points",Ef)}),mo(this,"getBoundingClientRect",()=>this.outer.getBoundingClientRect()),mo(this,"dragTo",gf=>{this.group.style.display=null,this.mousepos=gf;const Ef=[...this.points,gf];this.setPoints(Ef),this.mask.redraw()}),mo(this,"addPoint",()=>{const[gf,Ef]=this.mousepos,Rf=this.points[this.points.length-1];Math.pow(gf-Rf[0],2)+Math.pow(Ef-Rf[1],2)>4&&(this.points=[...this.points,this.mousepos],this.setPoints(this.points),this.mask.redraw())}),mo(this,"destroy",()=>{this.group.parentNode.removeChild(this.group),this.polygon=null,this.group=null}),mo(this,"toSelection",()=>new xT(rI(this.group,this.env.image))),this.points=[xo],this.env=df,this.mousepos=xo,this.group=document.createElementNS(wv,"g"),this.polygon=document.createElementNS(wv,"g"),this.polygon.setAttribute("class","a9s-selection"),this.outer=document.createElementNS(wv,"polygon"),this.outer.setAttribute("class","a9s-outer"),this.inner=document.createElementNS(wv,"polygon"),this.inner.setAttribute("class","a9s-inner"),this.setPoints(this.points),this.mask=new sP(df.image,this.inner),this.polygon.appendChild(this.outer),this.polygon.appendChild(this.inner),this.group.style.display="none",this.group.appendChild(this.mask.element),this.group.appendChild(this.polygon),uf.appendChild(this.group)}get element(){return this.polygon}}const nI=go=>{const xo=go.querySelector(".a9s-inner").points,uf=[];for(let df=0;dfgo.querySelector(".a9s-inner").getBBox();class a3 extends rP{constructor(xo,uf,df,gf){super(xo,uf,df,gf),mo(this,"onScaleChanged",()=>this.handles.map(this.scaleHandle)),mo(this,"setPoints",Ef=>{const Rf=Pp=>Math.round(10*Pp)/10,Vf=Ef.map(Pp=>`${Rf(Pp.x)},${Rf(Pp.y)}`).join(" ");this.shape.querySelector(".a9s-inner").setAttribute("points",Vf);const Qf=this.shape.querySelector(".a9s-outer");Qf.setAttribute("points",Vf),this.mask.redraw();const{x:ep,y:Jf,width:mp,height:Tp}=Qf.getBBox();tI(this.elementGroup,ep,Jf,mp,Tp)}),mo(this,"onGrab",Ef=>Rf=>{Rf.button===0&&(this.grabbedElem=Ef,this.grabbedAt=this.getSVGPoint(Rf))}),mo(this,"onMouseMove",Ef=>{const Rf=(Vf,Qf,ep)=>Vf+Qf<0?-Vf:Vf+Qf>ep?ep-Vf:Qf;if(this.grabbedElem){const Vf=this.getSVGPoint(Ef);if(this.grabbedElem===this.shape){const{x:Qf,y:ep,width:Jf,height:mp}=o3(this.shape),{naturalWidth:Tp,naturalHeight:Pp}=this.env.image,tg=Rf(Qf,Vf.x-this.grabbedAt.x,Tp-Jf),gg=Rf(ep,Vf.y-this.grabbedAt.y,Pp-mp),fg=nI(this.shape).map(Tg=>({x:Tg.x+tg,y:Tg.y+gg}));this.grabbedAt=Vf,this.setPoints(fg),fg.forEach((Tg,Rg)=>this.setHandleXY(this.handles[Rg],Tg.x,Tg.y)),this.emit("update",rI(this.shape,this.env.image))}else{const Qf=this.handles.indexOf(this.grabbedElem),ep=nI(this.shape).map((Jf,mp)=>mp===Qf?Vf:Jf);this.setPoints(ep),this.setHandleXY(this.handles[Qf],Vf.x,Vf.y),this.emit("update",rI(this.shape,this.env.image))}}}),mo(this,"onMouseUp",Ef=>{this.grabbedElem=null,this.grabbedAt=null}),mo(this,"updateState",Ef=>{const Rf=UE(Ef).getAttribute("points").split(" ").map(Vf=>{const[Qf,ep]=Vf.split(",").map(Jf=>parseFloat(Jf.trim()));return{x:Qf,y:ep}});this.setPoints(Rf),Rf.forEach((Vf,Qf)=>this.setHandleXY(this.handles[Qf],Vf.x,Vf.y))}),mo(this,"destroy",()=>{this.containerGroup.parentNode.removeChild(this.containerGroup),super.destroy()}),this.svg.addEventListener("mousemove",this.onMouseMove),this.svg.addEventListener("mouseup",this.onMouseUp),this.containerGroup=document.createElementNS(wv,"g"),this.shape=aP(xo),this.shape.querySelector(".a9s-inner").addEventListener("mousedown",this.onGrab(this.shape)),this.mask=new sP(gf.image,this.shape.querySelector(".a9s-inner")),this.containerGroup.appendChild(this.mask.element),this.elementGroup=document.createElementNS(wv,"g"),this.elementGroup.setAttribute("class","a9s-annotation editable selected"),this.elementGroup.appendChild(this.shape),this.handles=nI(this.shape).map(Ef=>{const Rf=this.drawHandle(Ef.x,Ef.y);return Rf.addEventListener("mousedown",this.onGrab(Rf)),this.elementGroup.appendChild(Rf),Rf}),this.containerGroup.appendChild(this.elementGroup),uf.appendChild(this.containerGroup),kC(this.shape,xo,df.formatter),this.grabbedElem=null,this.grabbedAt=null}get element(){return this.elementGroup}}class iI extends eI{constructor(xo,uf,df){super(xo,uf,df),mo(this,"startDrawing",(gf,Ef,Rf)=>{this._isDrawing=!0,this._startOnSingleClick=Rf,this.attachListeners({mouseMove:this.onMouseMove,mouseUp:this.onMouseUp,dblClick:this.onDblClick}),this.rubberband=new i3([gf,Ef],this.g,this.env)}),mo(this,"stop",()=>{this.detachListeners(),this._isDrawing=!1,this.rubberband&&(this.rubberband.destroy(),this.rubberband=null)}),mo(this,"onMouseMove",(gf,Ef)=>this.rubberband.dragTo([gf,Ef])),mo(this,"onMouseUp",()=>{const{width:gf,height:Ef}=this.rubberband.getBoundingClientRect(),Rf=this.config.minSelectionWidth||4,Vf=this.config.minSelectionHeight||4;gf>=Rf||Ef>=Vf?this.rubberband.addPoint():this._startOnSingleClick||(this.emit("cancel"),this.stop())}),mo(this,"onDblClick",()=>{this._isDrawing=!1;const gf=this.rubberband.element;gf.annotation=this.rubberband.toSelection(),this.emit("complete",gf),this.stop()}),mo(this,"createEditableShape",gf=>new a3(gf,this.g,this.config,this.env)),this._isDrawing=!1,this._startOnSingleClick=!1}get isDrawing(){return this._isDrawing}}iI.identifier="polygon",iI.supports=go=>{var xo;const uf=go.selector("SvgSelector");if(uf)return(xo=uf.value)==null?void 0:xo.match(/^this._registered.map(gf=>gf.identifier)),mo(this,"registerTool",gf=>{const Ef=gf.identifier;this.listTools().includes(Ef)&&this.unregisterTool(Ef),this._registered.push(gf)}),mo(this,"unregisterTool",gf=>this._registered=this._registered.filter(Ef=>Ef.identifier!==gf)),mo(this,"setCurrent",gf=>{const Ef=typeof gf=="string"||gf instanceof String?this._registered.find(Rf=>Rf.identifier===gf):gf;this._current=new Ef(this._g,this._config,this._env),this._current.on("startSelection",Rf=>this.emit("startSelection",Rf)),this._current.on("complete",Rf=>this.emit("complete",Rf)),this._current.on("cancel",Rf=>this.emit("cancel",Rf))}),mo(this,"forAnnotation",gf=>{var Ef;const[Rf,...Vf]=gf.targets,Qf=(Ef=Rf.renderedVia)==null?void 0:Ef.name,ep=Qf?this._registered.find(Jf=>Jf.identifier===Qf):this._registered.find(Jf=>Jf.supports(gf));return ep?new ep(this._g,this._config,this._env):null}),this._g=xo,this._config=uf,this._env=df,this._registered=[CC,iI],this.setCurrent(CC)}get current(){return this._current}}class l3{constructor(xo,uf,df){this.svg=xo.closest("svg"),this.g=document.createElementNS(wv,"g"),this.g.setAttribute("class","a9s-crosshair");const gf=document.createElementNS(wv,"line"),Ef=document.createElementNS(wv,"line");this.g.appendChild(gf),this.g.appendChild(Ef),xo.appendChild(this.g);const Rf=Vf=>{const Qf=this.svg.getBoundingClientRect(),ep=Vf.clientX-Qf.x,Jf=Vf.clientY-Qf.y,mp=this.svg.createSVGPoint(),{left:Tp,top:Pp}=this.svg.getBoundingClientRect();return mp.x=ep+Tp,mp.y=Jf+Pp,mp.matrixTransform(xo.getScreenCTM().inverse())};this.svg.addEventListener("mousemove",Vf=>{const{x:Qf,y:ep}=Rf(Vf);gf.setAttribute("x1",0),gf.setAttribute("y1",ep),gf.setAttribute("x2",uf),gf.setAttribute("y2",ep),Ef.setAttribute("x1",Qf),Ef.setAttribute("y1",0),Ef.setAttribute("x2",Qf),Ef.setAttribute("y2",df)})}}const c3={FragmentSelector:ZO,SvgSelector:aP},u3={FragmentSelector:GA,SvgSelector:QA},lP=go=>{const xo=go.targets[0];if(xo)return Array.isArray(xo.selector)?xo.selector[0]:xo.selector},oI=(go,xo)=>c3[lP(go).type](go,xo),cP=(go,xo)=>u3[lP(go).type](go,xo);function h3(go,xo,uf,df,gf){uP(go,xo,uf||0,df||go.length-1,gf||d3)}function uP(go,xo,uf,df,gf){for(;df>uf;){if(df-uf>600){var Ef=df-uf+1,Rf=xo-uf+1,Vf=Math.log(Ef),Qf=.5*Math.exp(2*Vf/3),ep=.5*Math.sqrt(Vf*Qf*(Ef-Qf)/Ef)*(Rf-Ef/2<0?-1:1),Jf=Math.max(uf,Math.floor(xo-Rf*Qf/Ef+ep)),mp=Math.min(df,Math.floor(xo+(Ef-Rf)*Qf/Ef+ep));uP(go,xo,Jf,mp,gf)}var Tp=go[xo],Pp=uf,tg=df;for(ST(go,uf,xo),gf(go[df],Tp)>0&&ST(go,uf,df);Pp0;)tg--}gf(go[uf],Tp)===0?ST(go,uf,tg):(tg++,ST(go,tg,df)),tg<=xo&&(uf=tg+1),xo<=tg&&(df=tg-1)}}function ST(go,xo,uf){var df=go[xo];go[xo]=go[uf],go[uf]=df}function d3(go,xo){return goxo?1:0}class f3{constructor(xo=9){this._maxEntries=Math.max(4,xo),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(xo){let uf=this.data;const df=[];if(!IC(xo,uf))return df;const gf=this.toBBox,Ef=[];for(;uf;){for(let Rf=0;Rf=0&&Ef[uf].children.length>this._maxEntries;)this._split(Ef,uf),uf--;this._adjustParentBBoxes(gf,Ef,uf)}_split(xo,uf){const df=xo[uf],gf=df.children.length,Ef=this._minEntries;this._chooseSplitAxis(df,Ef,gf);const Rf=this._chooseSplitIndex(df,Ef,gf),Vf=GE(df.children.splice(Rf,df.children.length-Rf));Vf.height=df.height,Vf.leaf=df.leaf,VE(df,this.toBBox),VE(Vf,this.toBBox),uf?xo[uf-1].children.push(Vf):this._splitRoot(df,Vf)}_splitRoot(xo,uf){this.data=GE([xo,uf]),this.data.height=xo.height+1,this.data.leaf=!1,VE(this.data,this.toBBox)}_chooseSplitIndex(xo,uf,df){let gf,Ef=1/0,Rf=1/0;for(let Vf=uf;Vf<=df-uf;Vf++){const Qf=TT(xo,0,Vf,this.toBBox),ep=TT(xo,Vf,df,this.toBBox),Jf=y3(Qf,ep),mp=aI(Qf)+aI(ep);Jf=uf;ep--){const Jf=xo.children[ep];kT(Vf,xo.leaf?Ef(Jf):Jf),Qf+=OC(Vf)}return Qf}_adjustParentBBoxes(xo,uf,df){for(let gf=df;gf>=0;gf--)kT(uf[gf],xo)}_condense(xo){for(let uf=xo.length-1,df;uf>=0;uf--)xo[uf].children.length===0?uf>0?(df=xo[uf-1].children,df.splice(df.indexOf(xo[uf]),1)):this.clear():VE(xo[uf],this.toBBox)}}function p3(go,xo,uf){if(!uf)return xo.indexOf(go);for(let df=0;df=go.minX&&xo.maxY>=go.minY}function GE(go){return{children:go,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function hP(go,xo,uf,df,gf){const Ef=[xo,uf];for(;Ef.length;){if(uf=Ef.pop(),xo=Ef.pop(),uf-xo<=df)continue;const Rf=xo+Math.ceil((uf-xo)/df/2)*df;h3(go,Rf,xo,uf,gf),Ef.push(xo,Rf,Rf,uf)}}const dP=go=>{const xo=oI(go),uf=document.createElementNS(wv,"svg");uf.style.position="absolute",uf.style.opacity=0,uf.style.top=0,uf.style.left=0,uf.appendChild(xo),document.body.appendChild(uf);const{x:df,y:gf,width:Ef,height:Rf}=xo.getBBox();return document.body.removeChild(uf),{minX:df,minY:gf,maxX:df+Ef,maxY:gf+Rf}};class b3{constructor(xo){mo(this,"getAnnotationAt",(uf,df,gf)=>{const Ef=gf?5/gf:5,Rf=this.spatial_index.search({minX:uf-Ef,minY:df-Ef,maxX:uf+Ef,maxY:df+Ef}).map(Vf=>Vf.annotation);if(Rf.length>0)return Rf.sort((Vf,Qf)=>cP(Vf,this.env.image)-cP(Qf,this.env.image)),Rf[0]}),mo(this,"getAnnotationsIntersecting",uf=>this.spatial_index.search(uf).map(df=>df.annotation)),mo(this,"insert",uf=>{(Array.isArray(uf)?uf:[uf]).forEach(df=>{this.spatial_index.insert(uo(yn({},dP(df)),{annotation:df}))})}),mo(this,"remove",uf=>{const df=uo(yn({},dP(uf)),{annotation:uf});this.spatial_index.remove(df,(gf,Ef)=>gf.annotation.id===Ef.annotation.id)}),this.env=xo,this.spatial_index=new f3}}const $3=(go,xo)=>{const uf=KO(xo,".a9s-annotation")?xo:xo.querySelector(".a9s-annotation"),{canvas:df}=go.drawer,gf=df.getBoundingClientRect(),Ef=df.width/gf.width,Rf=df.height/gf.height,Vf=uf.getBoundingClientRect(),Qf=Vf.x-gf.x,ep=Vf.y-gf.y,{width:Jf,height:mp}=Vf,Tp=document.createElement("CANVAS"),Pp=Tp.getContext("2d");Tp.width=Jf,Tp.height=mp,Pp.drawImage(df,Qf*Ef,ep*Rf,Jf*Ef,mp*Rf,0,0,Jf,mp);const tg=go.viewport.viewportToImageCoordinates(Vf.x,Vf.y),gg=go.viewport.viewportToImageZoom(go.viewport.getZoom());return{snippet:Tp,transform:fg=>{const Tg=tg.x+fg[0]/Ef/gg,Rg=tg.y+fg[1]/Rf/gg;return[Tg,Rg]}}},_3=QO();class fP extends Z1{constructor(xo){super(),mo(this,"_getShapeAt",df=>{const gf=Qf=>{const ep=this.svg.createSVGPoint();if(window.TouchEvent&&Qf instanceof TouchEvent){const Jf=this.svg.getBoundingClientRect(),mp=Qf.touches[0],Tp=mp.clientX-Jf.x,Pp=mp.clientY-Jf.y,{left:tg,top:gg}=this.svg.getBoundingClientRect();return ep.x=Tp+tg,ep.y=Pp+gg,ep.matrixTransform(this.g.getScreenCTM().inverse())}else return ep.x=Qf.offsetX,ep.y=Qf.offsetY,ep.matrixTransform(this.g.getCTM().inverse())},{x:Ef,y:Rf}=gf(df),Vf=this.store.getAnnotationAt(Ef,Rf,this.currentScale());if(Vf)return this.findShape(Vf)}),mo(this,"_initDrawingTools",df=>{this.tools=new s3(this.g,this.config,this.env),this.tools.on("complete",this.onDrawingComplete);let gf=!1;this.mouseTracker=new yf.default.MouseTracker({element:this.svg,pressHandler:Ef=>{this.tools.current.isDrawing||(this.tools.current.start(Ef.originalEvent,this.drawOnSingleClick&&!this.hoveredShape),df||this.scaleTool(this.tools.current))},moveHandler:Ef=>{if(this.tools.current.isDrawing){const{x:Rf,y:Vf}=this.tools.current.getSVGPoint(Ef.originalEvent);this.tools.current.onMouseMove(Rf,Vf,Ef.originalEvent),gf||(this.emit("startSelection",{x:Rf,y:Vf}),gf=!0)}},releaseHandler:Ef=>{if(this.tools.current.isDrawing){const{x:Rf,y:Vf}=this.tools.current.getSVGPoint(Ef.originalEvent);this.tools.current.onMouseUp(Rf,Vf,Ef.originalEvent)}gf=!1}}).setTracking(!1),this.onKeyDown&&document.removeEventListener("keydown",this.onKeyDown),this.onKeyUp&&document.removeEventListener("keydown",this.onKeyDown),this.onKeyDown=Ef=>{Ef.which===16&&!this.selectedShape&&this.mouseTracker.setTracking(!this.readOnly)},this.onKeyUp=Ef=>{Ef.which===16&&!this.tools.current.isDrawing&&this.mouseTracker.setTracking(!1)},document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp)}),mo(this,"_initMouseEvents",()=>{let df=this.viewer.gestureSettingsByDeviceType("mouse").clickToZoom;this.svg.addEventListener("mousemove",Rf=>{var Vf,Qf;if(!((Vf=this.tools)!=null&&Vf.current.isDrawing)&&!Rf.target.closest(".a9s-annotation.editable.selected")){const ep=this._getShapeAt(Rf);if((ep==null?void 0:ep.annotation)!==((Qf=this.hoveredShape)==null?void 0:Qf.annotation)){if(this.hoveredShape){this.viewer.gestureSettingsByDeviceType("mouse").clickToZoom=df;const Jf=this.hoveredShape.element||this.hoveredShape;zA(Jf,"hover"),this.emit("mouseLeaveAnnotation",this.hoveredShape.annotation,this.hoveredShape)}ep&&(df=this.viewer.gestureSettingsByDeviceType("mouse").clickToZoom,this.viewer.gestureSettingsByDeviceType("mouse").clickToZoom=!1,yx(ep,"hover"),this.emit("mouseEnterAnnotation",ep.annotation,ep))}this.hoveredShape=ep}});let gf=null;new yf.default.MouseTracker({element:this.viewer.canvas,pressHandler:()=>{gf=new Date().getTime()}}),this.svg.addEventListener("mousedown",()=>{gf=new Date().getTime()});const Ef=Rf=>{var Vf;if(!((Vf=this.tools.current)!=null&&Vf.isDrawing||this.disableSelect)&&new Date().getTime()-gf<250){const Qf=Rf.target.closest(".a9s-annotation.editable.selected")?this.selectedShape:this._getShapeAt(Rf);Qf?this.selectShape(Qf):Qf||(this.deselect(),this.emit("select",{}))}this.disableSelect&&this.emit("clickAnnotation",this.hoveredShape.annotation,this.hoveredShape)};this.svg.addEventListener("click",Ef),this.svg.addEventListener("touchstart",Ef)}),mo(this,"_refreshNonScalingAnnotations",()=>{const df=this.currentScale();Array.from(this.svg.querySelectorAll(".a9s-non-scaling")).forEach(gf=>gf.setAttribute("transform",`scale(${1/df})`))}),mo(this,"addAnnotation",(df,gf)=>{const Ef=gf||this.g,Rf=oI(df,this.env.image);return yx(Rf,"a9s-annotation"),Rf.setAttribute("data-id",df.id),Rf.annotation=df,Ef.appendChild(Rf),kC(Rf,df,this.formatter),this.scaleFormatterElements(Rf),Rf}),mo(this,"addDrawingTool",df=>this.tools.registerTool(df)),mo(this,"addOrUpdateAnnotation",(df,gf)=>{var Ef,Rf;(((Ef=this.selectedShape)==null?void 0:Ef.annotation)===df||((Rf=this.selectedShape)==null?void 0:Rf.annotation)==gf)&&this.deselect(),gf&&this.removeAnnotation(df),this.removeAnnotation(df);const Vf=this.addAnnotation(df);KO(Vf,"a9s-non-scaling")&&Vf.setAttribute("transform",`scale(${1/this.currentScale()})`),this.store.insert(df)}),mo(this,"currentScale",()=>{const df=this.viewer.viewport.getContainerSize().x;return this.viewer.viewport.getZoom(!0)*df/this.viewer.world.getContentFactor()}),mo(this,"deselect",()=>{var df;if((df=this.tools)==null||df.current.stop(),this.selectedShape){const{annotation:gf}=this.selectedShape;if(this.selectedShape.destroy&&(this.selectedShape.mouseTracker.destroy(),this.selectedShape.destroy(),!gf.isSelection)){const Ef=this.addAnnotation(gf);KO(Ef,"a9s-non-scaling")&&Ef.setAttribute("transform",`scale(${1/this.currentScale()})`)}this.selectedShape=null}}),mo(this,"destroy",()=>{this.deselect(),this.svg.parentNode.removeChild(this.svg)}),mo(this,"findShape",df=>{const gf=df!=null&&df.id?df.id:df;return this.g.querySelector(`.a9s-annotation[data-id="${gf}"]`)}),mo(this,"fitBounds",(df,gf)=>{const Ef=this.findShape(df);if(Ef){const{x:Rf,y:Vf,width:Qf,height:ep}=Ef.getBBox(),Jf=this.viewer.viewport.imageToViewportRectangle(Rf,Vf,Qf,ep);this.viewer.viewport.fitBounds(Jf,gf)}}),mo(this,"getAnnotations",()=>Array.from(this.g.querySelectorAll(".a9s-annotation")).map(df=>df.annotation)),mo(this,"getSelectedImageSnippet",()=>{var df;if(this.selectedShape){const gf=(df=this.selectedShape.element)!=null?df:this.selectedShape;return $3(this.viewer,gf)}}),mo(this,"init",df=>{this.deselect(),Array.from(this.g.querySelectorAll(".a9s-annotation")).forEach(gf=>this.g.removeChild(gf)),console.time("Took"),console.log("Drawing..."),this.loaded||(this.g.style.display="none"),df.forEach(gf=>this.addAnnotation(gf)),console.log("Indexing..."),this.store.insert(df),console.timeEnd("Took"),this.resize()}),mo(this,"listDrawingTools",()=>this.tools.listTools()),mo(this,"overrideId",(df,gf)=>{const Ef=this.findShape(df);Ef.setAttribute("data-id",gf);const{annotation:Rf}=Ef,Vf=Rf.clone({id:gf});return Ef.annotation=Vf,this.store.remove(Rf),this.store.insert(Vf),Vf}),mo(this,"panTo",(df,gf)=>{const Ef=this.findShape(df);if(Ef){const{top:Rf,left:Vf,width:Qf,height:ep}=Ef.getBoundingClientRect(),Jf=Vf+Qf/2+window.scrollX,mp=Rf+ep/2+window.scrollY,Tp=this.viewer.viewport.windowToViewportCoordinates(new yf.default.Point(Jf,mp));this.viewer.viewport.panTo(Tp,gf)}}),mo(this,"removeAnnotation",df=>{var gf,Ef;const Rf=df.type?df.id:df;((gf=this.selectedShape)==null?void 0:gf.annotation.id)===Rf&&this.deselect();const Vf=this.findShape(df);if(Vf){const{annotation:Qf}=Vf;((Ef=this.selectedShape)==null?void 0:Ef.annotation)===Qf&&this.deselect(),Vf.parentNode.removeChild(Vf),this.store.remove(Qf)}}),mo(this,"removeDrawingTool",df=>{var gf;return(gf=this.tools)==null?void 0:gf.unregisterTool(df)}),mo(this,"scaleFormatterElements",df=>{const gf=1/this.currentScale();if(df){const Ef=df.querySelector(".a9s-formatter-el");Ef&&Ef.firstChild.setAttribute("transform",`scale(${gf})`)}else Array.from(this.g.querySelectorAll(".a9s-formatter-el")).forEach(Ef=>Ef.firstChild.setAttribute("transform",`scale(${gf})`))}),mo(this,"scaleTool",df=>{if(df){const gf=1/this.currentScale();df.scale=gf,df.onScaleChanged&&df.onScaleChanged(gf)}}),mo(this,"selectAnnotation",(df,gf)=>{this.selectedShape&&this.deselect();const Ef=this.findShape(df);if(Ef){this.selectShape(Ef,gf);const Rf=this.selectedShape.element?this.selectedShape.element:this.selectedShape;return{annotation:Ef.annotation,element:Rf}}else this.deselect()}),mo(this,"selectShape",(df,gf)=>{var Ef;if(!gf&&!df.annotation.isSelection&&this.emit("clickAnnotation",df.annotation,df),((Ef=this.selectedShape)==null?void 0:Ef.annotation)===df.annotation)return;this.selectedShape&&this.selectedShape.annotation!==df.annotation&&this.deselect();const{annotation:Rf}=df;if(this.readOnly||Rf.readOnly||this.headless)this.selectedShape=df,gf||this.emit("select",{annotation:Rf,element:df,skipEvent:gf});else{const Vf=this.tools.forAnnotation(Rf);if(Vf){setTimeout(()=>{df.parentNode.removeChild(df),gf||this.emit("select",{annotation:Rf,element:this.selectedShape.element})},1),this.selectedShape=Vf.createEditableShape(Rf),this.scaleTool(this.selectedShape),this.scaleFormatterElements(this.selectedShape.element),this.selectedShape.element.annotation=Rf;const Qf=new yf.default.MouseTracker({element:this.svg}).setTracking(!0);this.selectedShape.element.addEventListener("mouseenter",()=>{this.hoveredShape=this.selectedShape,Qf.setTracking(!0)}),this.selectedShape.element.addEventListener("mouseleave",()=>{this.hoveredShape=null,Qf.setTracking(!1)}),this.selectedShape.mouseTracker=Qf,this.selectedShape.on("update",ep=>this.emit("updateTarget",this.selectedShape.element,ep))}else this.selectedShape=df,gf||this.emit("select",{annotation:Rf,element:this.selectedShape})}}),mo(this,"setDrawingEnabled",df=>{var gf;return(gf=this.mouseTracker)==null?void 0:gf.setTracking(df&&!this.readOnly)}),mo(this,"setDrawingTool",df=>{var gf;this.tools&&((gf=this.tools.current)==null||gf.stop(),this.tools.setCurrent(df))}),mo(this,"setVisible",df=>{df?this.svg.style.display=null:(this.deselect(),this.svg.style.display="none")}),mo(this,"stopDrawing",()=>{var df,gf;return(gf=(df=this.tools)==null?void 0:df.current)==null?void 0:gf.stop()}),this.viewer=xo.viewer,this.config=xo.config,this.env=xo.env,this.readOnly=xo.config.readOnly,this.headless=xo.config.headless,this.formatter=xo.config.formatter,this.disableSelect=xo.disableSelect,this.drawOnSingleClick=xo.config.drawOnSingleClick,this.svg=document.createElementNS(wv,"svg"),_3?(this.svg.setAttribute("class","a9s-annotationlayer a9s-osd-annotationlayer touch"),YA(this.svg)):this.svg.setAttribute("class","a9s-annotationlayer a9s-osd-annotationlayer"),this.g=document.createElementNS(wv,"g"),this.svg.appendChild(this.g),this.viewer.canvas.appendChild(this.svg),this.viewer.addHandler("animation",()=>this.resize()),this.viewer.addHandler("rotate",()=>this.resize()),this.viewer.addHandler("resize",()=>this.resize()),this.viewer.addHandler("flip",()=>this.resize()),this.loaded=!1;const uf=()=>{const{x:df,y:gf}=this.viewer.world.getItemAt(0).source.dimensions;this.env.image={src:this.viewer.world.getItemAt(0).source["@id"]||new URL(this.viewer.world.getItemAt(0).source.url,document.baseURI).href,naturalWidth:df,naturalHeight:gf},xo.config.crosshair&&(this.crosshair=new l3(this.g,df,gf),yx(this.svg,"has-crosshair")),this.loaded=!0,this.g.style.display="inline",this.resize()};this.viewer.addHandler("open",uf),this.viewer.world.addHandler("add-item",uf),this.viewer.world.getItemAt(0)&&uf(),this.store=new b3(this.env),this.selectedShape=null,this.hoveredShape=null,this._initMouseEvents()}resize(){var xo;const uf=this.viewer.viewport.getFlip(),df=this.viewer.viewport.pixelFromPoint(new yf.default.Point(0,0),!0);uf&&(df.x=this.viewer.viewport._containerInnerSize.x-df.x);const gf=this.currentScale(),Ef=uf?-gf:gf,Rf=this.viewer.viewport.getRotation();this.g.setAttribute("transform",`translate(${df.x}, ${df.y}) scale(${Ef}, ${gf}) rotate(${Rf})`),this._refreshNonScalingAnnotations(),this.scaleFormatterElements(),this.selectedShape&&(this.selectedShape.element?(this.scaleTool(this.selectedShape),this.emit("viewportChange",this.selectedShape.element)):this.emit("viewportChange",this.selectedShape)),(xo=this.tools)!=null&&xo.current.isDrawing&&this.scaleTool(this.tools.current)}}class w3 extends fP{constructor(xo){super(xo),mo(this,"onDrawingComplete",uf=>{this.selectShape(uf),this.emit("createSelection",uf.annotation),this.mouseTracker.setTracking(!1)}),this._initDrawingTools()}}const lI=go=>{const xo=go.viewport.viewportToImageRectangle(go.viewport.getBounds(!0)),uf=go.viewport.getContainerSize().x,df=go.viewport.getZoom(!0)*uf/go.world.getContentFactor();return{extent:xo,scale:df}},x3=go=>{var xo;const uf=go.targets[0];return uf?Array.isArray(uf.selector)?uf.selector[0].type:(xo=uf.selector)==null?void 0:xo.type:null},pP=(go,xo)=>{const{extent:uf,scale:df}=lI(go),{selector:gf}=xo,Ef=C2.create({target:xo});if(gf.type==="SvgSelector"){const Rf=UE(Ef),Vf=Rf.nodeName.toLowerCase();let Qf=null;if(Vf==="polygon")Qf=E3(Rf,uf,df);else if(Vf==="circle")Qf=S3(Rf,uf,df);else if(Vf==="ellipse")Qf=T3(Rf,uf,df);else if(Vf==="path")Qf=k3(Rf,uf,df);else throw`Unsupported SVG shape type: ${Vf}`;let ep=Qf.outerHTML||new XMLSerializer().serializeToString(Qf);return ep=ep.replace(` xmlns="${wv}"`,""),uo(yn({},xo),{selector:{type:"SvgSelector",value:`${ep}`}})}else if(gf.type==="FragmentSelector"){const{x:Rf,y:Vf,w:Qf,h:ep}=O2(Ef),Jf=uf.x+Rf/df,mp=uf.y+Vf/df,Tp=Qf/df,Pp=ep/df;return ET(Jf,mp,Tp,Pp)}else throw`Unsupported selector type: ${gf.type}`},E3=(go,xo,uf)=>{const df=Array.from(go.points).map(gf=>{const Ef=xo.x+gf.x/uf,Rf=xo.y+gf.y/uf;return Ef+","+Rf}).join(" ");return go.setAttribute("points",df),go},S3=(go,xo,uf)=>{const df=parseFloat(go.getAttribute("cx")),gf=parseFloat(go.getAttribute("cy")),Ef=parseFloat(go.getAttribute("r"));return go.setAttribute("cx",xo.x+df/uf),go.setAttribute("cy",xo.y+gf/uf),go.setAttribute("r",Ef/uf),go},T3=(go,xo,uf)=>{const df=parseFloat(go.getAttribute("cx")),gf=parseFloat(go.getAttribute("cy")),Ef=parseFloat(go.getAttribute("rx")),Rf=parseFloat(go.getAttribute("ry"));return go.setAttribute("cx",xo.x+df/uf),go.setAttribute("cy",xo.y+gf/uf),go.setAttribute("rx",Ef/uf),go.setAttribute("ry",Rf/uf),go},k3=(go,xo,uf)=>{const df=go.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(gf=>gf.trim()).map(gf=>{const Ef=gf.substring(0,1);if(Ef.toLowerCase()==="z")return Ef;{const Rf=gf.substring(1).split(" ").map(Jf=>parseFloat(Jf.trim())),Vf=Ef===Ef.toUpperCase(),Qf=Vf?xo.x+Rf[0]/uf:Rf[0]/uf,ep=Vf?xo.y+Rf[1]/uf:Rf[1]/uf;return Ef+" "+Qf+" "+ep}}).join(" ");return go.setAttribute("d",df),go},gP=(go,xo)=>{const{extent:uf,scale:df}=lI(go),gf=xo.selector("FragmentSelector");if(xo.selector("SvgSelector")){const Ef=UE(xo),Rf=Ef.nodeName.toLowerCase();let Vf=null;if(Rf==="polygon")Vf=C3(Ef,uf,df);else if(Rf==="circle")Vf=O3(Ef,uf,df);else if(Rf==="ellipse")Vf=I3(Ef,uf,df);else if(Rf==="path")Vf=P3(Ef,uf,df);else throw`Unsupported SVG shape type: ${Rf}`;let Qf=Vf.outerHTML||new XMLSerializer().serializeToString(Vf);Qf=Qf.replace(` xmlns="${wv}"`,"");const ep={selector:{type:"SvgSelector",value:`${Qf}`}};return xo.clone({target:ep})}else if(gf){const{x:Ef,y:Rf,w:Vf,h:Qf}=O2(xo),ep=(Ef-uf.x)*df,Jf=(Rf-uf.y)*df,mp=ET(ep,Jf,Vf*df,Qf*df);return xo.clone({target:mp})}},C3=(go,xo,uf)=>{const df=Array.from(go.points).map(gf=>{const Ef=uf*(gf.x-xo.x),Rf=uf*(gf.y-xo.y);return Ef+","+Rf}).join(" ");return go.setAttribute("points",df),go},O3=(go,xo,uf)=>{const df=go.getAttribute("cx"),gf=go.getAttribute("cy"),Ef=go.getAttribute("r");return go.setAttribute("cx",uf*(df-xo.x)),go.setAttribute("cy",uf*(gf-xo.y)),go.setAttribute("r",Ef*uf),go},I3=(go,xo,uf)=>{const df=go.getAttribute("cx"),gf=go.getAttribute("cy"),Ef=go.getAttribute("rx"),Rf=go.getAttribute("ry");return go.setAttribute("cx",uf*(df-xo.x)),go.setAttribute("cy",uf*(gf-xo.y)),go.setAttribute("rx",Ef*uf),go.setAttribute("ry",Rf*uf),go},P3=(go,xo,uf)=>{const df=go.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(gf=>gf.trim()).map(gf=>{const Ef=gf.substring(0,1);if(Ef.toLowerCase()==="z")return Ef;{const Rf=gf.substring(1).split(" ").filter(Jf=>Jf).map(Jf=>parseFloat(Jf.trim())),Vf=Ef===Ef.toUpperCase(),Qf=Vf?uf*(Rf[0]-xo.x):uf*Rf[0],ep=Vf?uf*(Rf[1]-xo.y):uf*Rf[1];return Ef+" "+Qf+" "+ep}}).join(" ");return go.setAttribute("d",df),go},mP=(go,xo)=>{const{extent:uf,scale:df}=lI(go),gf=x3(xo.annotation);if(gf==="FragmentSelector")A3(xo,uf,df);else if(gf==="SvgSelector")R3(xo,uf,df);else throw`Unsupported selector type type: ${gf}`},A3=(go,xo,uf)=>{const{x:df,y:gf,w:Ef,h:Rf}=O2(go.annotation),Vf=go.querySelector(".a9s-outer"),Qf=go.querySelector(".a9s-inner"),ep=uf*(df-xo.x),Jf=uf*(gf-xo.y);Ef===0&&Rf===0?[Vf,Qf].forEach(mp=>{mp.setAttribute("cx",ep),mp.setAttribute("cy",Jf)}):[Vf,Qf].forEach(mp=>{mp.setAttribute("x",ep),mp.setAttribute("y",Jf),mp.setAttribute("width",Ef*uf),mp.setAttribute("height",Rf*uf)})},R3=(go,xo,uf)=>{const df=UE(go.annotation),gf=df.nodeName.toLowerCase();if(gf==="polygon")N3(go,df,xo,uf);else if(gf==="circle")M3(go,df,xo,uf);else if(gf==="ellipse")D3(go,df,xo,uf);else if(gf==="path")L3(go,df,xo,uf);else throw`Unsupported SVG shape type: ${gf}`},N3=(go,xo,uf,df)=>{const gf=Array.from(xo.points).map(Ef=>{const Rf=df*(Ef.x-uf.x),Vf=df*(Ef.y-uf.y);return Rf+","+Vf}).join(" ");go.querySelector(".a9s-outer").setAttribute("points",gf),go.querySelector(".a9s-inner").setAttribute("points",gf)},M3=(go,xo,uf,df)=>{const gf=df*(xo.getAttribute("cx")-uf.x),Ef=df*(xo.getAttribute("cy")-uf.y),Rf=df*xo.getAttribute("r"),Vf=go.querySelector(".a9s-outer");Vf.setAttribute("cx",gf),Vf.setAttribute("cy",Ef),Vf.setAttribute("r",Rf);const Qf=go.querySelector(".a9s-inner");Qf.setAttribute("cx",gf),Qf.setAttribute("cy",Ef),Qf.setAttribute("r",Rf)},D3=(go,xo,uf,df)=>{const gf=df*(xo.getAttribute("cx")-uf.x),Ef=df*(xo.getAttribute("cy")-uf.y),Rf=df*xo.getAttribute("rx"),Vf=df*xo.getAttribute("ry"),Qf=go.querySelector(".a9s-outer");Qf.setAttribute("cx",gf),Qf.setAttribute("cy",Ef),Qf.setAttribute("rx",Rf),Qf.setAttribute("ry",Vf);const ep=go.querySelector(".a9s-inner");ep.setAttribute("cx",gf),ep.setAttribute("cy",Ef),ep.setAttribute("rx",Rf),ep.setAttribute("ry",Vf)},L3=(go,xo,uf,df)=>{const gf=xo.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(Ef=>Ef.trim()).map(Ef=>{const Rf=Ef.substring(0,1);if(Rf.toLowerCase()==="z")return Rf;{const Vf=Ef.substring(1).split(" ").filter(mp=>mp).map(mp=>parseFloat(mp.trim())),Qf=Rf===Rf.toUpperCase(),ep=Qf?df*(Vf[0]-uf.x):df*Vf[0],Jf=Qf?df*(Vf[1]-uf.y):df*Vf[1];return Rf+" "+ep+" "+Jf}}).join(" ");go.querySelector(".a9s-inner").setAttribute("d",gf),go.querySelector(".a9s-outer").setAttribute("d",gf)},F3=QO();class B3 extends fP{constructor(xo){super(xo),mo(this,"onDrawingComplete",uf=>{const df=uf.annotation.clone({target:pP(this.viewer,uf.annotation.target)});uf.annotation=df,this.selectShape(uf),this.emit("createSelection",uf.annotation),this.mouseTracker.setTracking(!1)}),mo(this,"addAnnotation",(uf,df)=>{const gf=df||this.g,Ef=oI(uf,this.env.image);return yx(Ef,"a9s-annotation"),Ef.setAttribute("data-id",uf.id),Ef.annotation=uf,mP(this.viewer,Ef),gf.appendChild(Ef),kC(Ef,uf,this.formatter),Ef}),mo(this,"_getShapeAt",uf=>{const df=Qf=>{if(F3){const ep=this.svg.getBoundingClientRect(),Jf=Qf.clientX-ep.x,mp=Qf.clientY-ep.y;return new yf.default.Point(Jf,mp)}else return new yf.default.Point(Qf.offsetX,Qf.offsetY)},gf=this.viewer.viewport.viewerElementToViewportCoordinates(df(uf)),{x:Ef,y:Rf}=this.viewer.viewport.viewportToImageCoordinates(gf.x,gf.y),Vf=this.store.getAnnotationAt(Ef,Rf,this.currentScale());if(Vf)return this.findShape(Vf)}),mo(this,"selectShape",(uf,df)=>{var gf;if(!df&&!uf.annotation.isSelection&&this.emit("clickAnnotation",uf.annotation,uf),((gf=this.selectedShape)==null?void 0:gf.annotation)===uf.annotation)return;this.selectedShape&&this.selectedShape.annotation!==uf.annotation&&this.deselect(!0);const{annotation:Ef}=uf;if(this.readOnly||Ef.readOnly||this.headless)this.selectedShape=uf,df||this.emit("select",{annotation:Ef,element:uf,skipEvent:df});else{setTimeout(()=>{uf.parentNode.removeChild(uf),df||this.emit("select",{annotation:Ef,element:this.selectedShape.element})},1);const Rf=this.tools.forAnnotation(Ef);this.selectedShape=Rf.createEditableShape(Ef),this.selectedShape.element.annotation=Ef;const Vf=gP(this.viewer,Ef);this.selectedShape.updateState(Vf);const Qf=new yf.default.MouseTracker({element:this.svg}).setTracking(!0);this.selectedShape.element.addEventListener("mouseenter",ep=>Qf.setTracking(!0)),this.selectedShape.element.addEventListener("mouseleave",ep=>Qf.setTracking(!1)),this.selectedShape.mouseTracker=Qf,this.selectedShape.on("update",ep=>{const Jf=pP(this.viewer,ep);this.selectedShape.element.annotation=this.selectedShape.annotation.clone({target:Jf}),this.emit("updateTarget",this.selectedShape.element,Jf)})}}),this._initDrawingTools(!0)}resize(){const xo=this.viewer.viewport.getBounds(!0),{x:uf,y:df,width:gf,height:Ef}=this.viewer.viewport.viewportToImageRectangle(xo),Rf={minX:uf,minY:df,maxX:uf+gf,maxY:df+Ef},Vf=new Set(this.store.getAnnotationsIntersecting(Rf).map(Qf=>Qf.id));if(Vf.size>0&&Array.from(this.g.querySelectorAll(".a9s-annotation:not(.selected)")).forEach(Qf=>{Vf.has(Qf.annotation.id)?(Qf.removeAttribute("visibility"),mP(this.viewer,Qf)):Qf.hasAttribute("visibility")||Qf.setAttribute("visibility","hidden")}),this.selectedShape)if(this.selectedShape.element){const Qf=gP(this.viewer,this.selectedShape.element.annotation);this.selectedShape.updateState&&this.selectedShape.updateState(Qf),this.emit("viewportChange",this.selectedShape.element)}else this.emit("viewportChange",this.selectedShape)}}class j3 extends rp{constructor(xo){super(xo),mo(this,"clearState",uf=>this.setState({selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,beforeHeadlessModify:null},uf)),mo(this,"forwardEvent",(uf,df)=>{this.annotationLayer.on(uf,(gf,Ef)=>{this.props[df](gf.clone(),Ef)})}),mo(this,"escapeKeyCancel",uf=>{if(uf.which===27){this.annotationLayer.stopDrawing();const{selectedAnnotation:df}=this.state;df&&(this.cancelSelected(),this.props.onCancelSelected(df))}}),mo(this,"handleStartSelect",uf=>this.props.onSelectionStarted(uf)),mo(this,"handleSelect",(uf,df)=>{this.state.editorDisabled?this.onHeadlessSelect(uf,df):this.onNormalSelect(uf,df)}),mo(this,"onNormalSelect",(uf,df)=>{const{annotation:gf,element:Ef}=uf;if(gf){const Rf=()=>{this.setState({selectedAnnotation:gf,selectedDOMElement:Ef,modifiedTarget:null},()=>{df||(gf.isSelection?this.props.onSelectionCreated(gf.clone()):this.props.onAnnotationSelected(gf.clone(),Ef))})},{selectedAnnotation:Vf}=this.state;Vf&&!Vf.isEqual(gf)?this.clearState(()=>{this.props.onCancelSelected(Vf),Rf()}):Rf()}else{const{selectedAnnotation:Rf}=this.state;Rf?this.clearState(()=>this.props.onCancelSelected(Rf)):this.clearState()}}),mo(this,"onHeadlessSelect",(uf,df)=>{this.saveSelected().then(()=>{this.onNormalSelect(uf,df)})}),mo(this,"handleUpdateTarget",(uf,df)=>{this.setState({selectedDOMElement:uf,modifiedTarget:df});const gf=JSON.parse(JSON.stringify(df));this.props.onSelectionTargetChanged(gf)}),mo(this,"handleViewportChange",uf=>this.setState({selectedDOMElement:uf})),mo(this,"overrideAnnotationId",uf=>df=>{const{id:gf}=uf;this.state.selectedAnnotation?this.setState({selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null},()=>{this.annotationLayer.overrideId(gf,df)}):this.annotationLayer.overrideId(gf,df)}),mo(this,"onCreateOrUpdateAnnotation",(uf,df)=>(gf,Ef)=>{let Rf=gf.isSelection?gf.toAnnotation():gf;Rf=this.state.modifiedTarget?Rf.clone({target:this.state.modifiedTarget}):Rf.clone(),this.clearState(()=>{this.annotationLayer.deselect(),this.annotationLayer.addOrUpdateAnnotation(Rf,Ef),Ef?this.props[uf](Rf,Ef.clone()):this.props[uf](Rf,this.overrideAnnotationId(gf)),df&&df()})}),mo(this,"onDeleteAnnotation",uf=>{this.clearState(),this.annotationLayer.removeAnnotation(uf),this.props.onAnnotationDeleted(uf)}),mo(this,"onCancelAnnotation",(uf,df)=>{this.state.editorDisabled||this.annotationLayer.deselect(),this.props.onCancelSelected(uf),this.clearState(df)}),mo(this,"addAnnotation",uf=>{var df;uf.id===((df=this.state.selectedAnnotation)==null?void 0:df.id)&&(this.annotationLayer.deselect(),this.clearState()),this.annotationLayer.addOrUpdateAnnotation(uf.clone())}),mo(this,"addDrawingTool",uf=>this.annotationLayer.addDrawingTool(uf)),mo(this,"cancelSelected",()=>new Promise(uf=>{this.annotationLayer.deselect(),this.state.selectedAnnotation?this.clearState(uf):uf()})),mo(this,"fitBounds",(uf,df)=>this.annotationLayer.fitBounds(uf,df)),mo(this,"getAnnotationById",uf=>{var df;return(df=this.annotationLayer.findShape(uf))==null?void 0:df.annotation}),mo(this,"getAnnotations",()=>this.annotationLayer.getAnnotations().map(uf=>uf.clone())),mo(this,"getSelected",()=>{var uf;if(this.state.selectedAnnotation)return this.state.editorDisabled?this.state.selectedAnnotation:(uf=this._editor.current)==null?void 0:uf.getCurrentAnnotation()}),mo(this,"getSelectedImageSnippet",()=>this.annotationLayer.getSelectedImageSnippet()),mo(this,"listDrawingTools",()=>this.annotationLayer.listDrawingTools()),mo(this,"panTo",(uf,df)=>this.annotationLayer.panTo(uf,df)),mo(this,"removeAnnotation",uf=>this.annotationLayer.removeAnnotation(uf)),mo(this,"removeDrawingTool",uf=>this.annotationLayer.removeDrawingTool(uf)),mo(this,"saveSelected",()=>new Promise(uf=>{const df=this.state.selectedAnnotation;if(df)if(df.isSelection)df.bodies.length>0||this.props.config.allowEmpty?this.onCreateOrUpdateAnnotation("onAnnotationCreated",uf)(df,df):(this.annotationLayer.deselect(),uf());else{const{beforeHeadlessModify:gf,modifiedTarget:Ef}=this.state;gf?this.onCreateOrUpdateAnnotation("onAnnotationUpdated",uf)(df,gf):Ef?this.onCreateOrUpdateAnnotation("onAnnotationUpdated",uf)(df,df):this.onCancelAnnotation(df,uf)}else uf()})),mo(this,"selectAnnotation",uf=>{const df=this.annotationLayer.selectAnnotation(uf,!0);if(df)return this.handleSelect(df,!0),df.annotation.clone();this.clearState()}),mo(this,"setAnnotations",uf=>this.annotationLayer.init(uf.map(df=>df.clone()))),mo(this,"setDrawingEnabled",uf=>this.annotationLayer.setDrawingEnabled(uf)),mo(this,"setDrawingTool",uf=>this.annotationLayer.setDrawingTool(uf)),mo(this,"setVisible",uf=>{this.annotationLayer.setVisible(uf),uf||this.clearState()}),mo(this,"updateSelected",(uf,df)=>new Promise(gf=>{this.state.selectedAnnotation&&(df?this.state.selectedAnnotation.isSelection?this.onCreateOrUpdateAnnotation("onAnnotationCreated",gf)(uf):this.onCreateOrUpdateAnnotation("onAnnotationUpdated",gf)(uf,this.state.selectedAnnotation):this.setState({selectedAnnotation:uf,beforeHeadlessModify:this.state.beforeHeadlessModify||this.state.selectedAnnotation},gf))})),this.state={selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,readOnly:xo.config.readOnly,editorDisabled:xo.config.disableEditor,widgets:xo.config.widgets,beforeHeadlessModify:null},this._editor=Zg.createRef()}componentDidMount(){this.annotationLayer=this.props.config.gigapixelMode?new B3(this.props):new w3(this.props),this.annotationLayer.on("startSelection",this.handleStartSelect),this.annotationLayer.on("select",this.handleSelect),this.annotationLayer.on("updateTarget",this.handleUpdateTarget),this.annotationLayer.on("viewportChange",this.handleViewportChange),this.forwardEvent("mouseEnterAnnotation","onMouseEnterAnnotation"),this.forwardEvent("mouseLeaveAnnotation","onMouseLeaveAnnotation"),this.forwardEvent("clickAnnotation","onClickAnnotation"),document.addEventListener("keyup",this.escapeKeyCancel)}componentWillUnmount(){this.annotationLayer.destroy(),document.removeEventListener("keyup",this.escapeKeyCancel)}get disableEditor(){return this.state.editorDisabled}set disableEditor(xo){this.setState({editorDisabled:xo},()=>{xo?document.addEventListener("keyup",this.escapeKeyCancel):document.removeEventListener("keyup",this.escapeKeyCancel)})}get disableSelect(){return this.annotationLayer.disableSelect}set disableSelect(xo){this.annotationLayer.disableSelect=xo}get readOnly(){return this.state.readOnly}set readOnly(xo){this.annotationLayer.readOnly=xo,this.setState({readOnly:xo})}get widgets(){return this.state.widgets}set widgets(xo){this.setState({widgets:xo})}render(){var xo;const uf=this.state.selectedAnnotation&&!this.state.editorDisabled,df=this.state.readOnly||((xo=this.state.selectedAnnotation)==null?void 0:xo.readOnly);return uf&&kf(AA,{ref:this._editor,detachable:!0,wrapperEl:this.props.wrapperEl,annotation:this.state.selectedAnnotation,modifiedTarget:this.state.modifiedTarget,selectedElement:this.state.selectedDOMElement,readOnly:df,allowEmpty:this.props.config.allowEmpty,widgets:this.state.widgets,env:this.props.env,onAnnotationCreated:this.onCreateOrUpdateAnnotation("onAnnotationCreated"),onAnnotationUpdated:this.onCreateOrUpdateAnnotation("onAnnotationUpdated"),onAnnotationDeleted:this.onDeleteAnnotation,onCancel:this.onCancelAnnotation})}}class z3{constructor(xo,uf){mo(this,"handleAnnotationCreated",(gf,Ef)=>this._emitter.emit("createAnnotation",gf.underlying,Ef)),mo(this,"handleAnnotationDeleted",gf=>this._emitter.emit("deleteAnnotation",gf.underlying)),mo(this,"handleAnnotationSelected",(gf,Ef)=>this._emitter.emit("selectAnnotation",gf.underlying,Ef)),mo(this,"handleAnnotationUpdated",(gf,Ef)=>this._emitter.emit("updateAnnotation",gf.underlying,Ef.underlying)),mo(this,"handleCancelSelected",gf=>this._emitter.emit("cancelSelected",gf.underlying)),mo(this,"handleClickAnnotation",(gf,Ef)=>this._emitter.emit("clickAnnotation",gf.underlying,Ef)),mo(this,"handleSelectionCreated",gf=>this._emitter.emit("createSelection",gf.underlying)),mo(this,"handleSelectionStarted",gf=>this._emitter.emit("startSelection",gf)),mo(this,"handleSelectionTargetChanged",gf=>this._emitter.emit("changeSelectionTarget",gf)),mo(this,"handleMouseEnterAnnotation",(gf,Ef)=>this._emitter.emit("mouseEnterAnnotation",gf.underlying,Ef)),mo(this,"handleMouseLeaveAnnotation",(gf,Ef)=>this._emitter.emit("mouseLeaveAnnotation",gf.underlying,Ef)),mo(this,"_wrap",gf=>(gf==null?void 0:gf.type)==="Annotation"?new C2(gf):gf),mo(this,"addAnnotation",gf=>this._app.current.addAnnotation(new C2(gf))),mo(this,"addDrawingTool",gf=>this._app.current.addDrawingTool(gf)),mo(this,"cancelSelected",()=>this._app.current.cancelSelected()),mo(this,"clearAnnotations",()=>this.setAnnotations([])),mo(this,"clearAuthInfo",()=>this._env.user=null),mo(this,"destroy",()=>Zg.unmountComponentAtNode(this.appContainerEl)),mo(this,"fitBounds",(gf,Ef)=>this._app.current.fitBounds(this._wrap(gf),Ef)),mo(this,"getAnnotationById",gf=>{const Ef=this._app.current.getAnnotationById(gf);return Ef==null?void 0:Ef.underlying}),mo(this,"getAnnotations",()=>this._app.current.getAnnotations().map(gf=>gf.underlying)),mo(this,"getSelected",()=>{const gf=this._app.current.getSelected();return gf==null?void 0:gf.underlying}),mo(this,"getSelectedImageSnippet",()=>this._app.current.getSelectedImageSnippet()),mo(this,"listDrawingTools",()=>this._app.current.listDrawingTools()),mo(this,"loadAnnotations",gf=>fetch(gf).then(Ef=>Ef.json()).then(Ef=>(this.setAnnotations(Ef),Ef))),mo(this,"off",(gf,Ef)=>this._emitter.off(gf,Ef)),mo(this,"on",(gf,Ef)=>this._emitter.on(gf,Ef)),mo(this,"once",(gf,Ef)=>this._emitter.once(gf,Ef)),mo(this,"panTo",(gf,Ef)=>this._app.current.panTo(this._wrap(gf),Ef)),mo(this,"removeAnnotation",gf=>this._app.current.removeAnnotation(this._wrap(gf))),mo(this,"removeDrawingTool",gf=>this._app.current.removeDrawingTool(gf)),mo(this,"saveSelected",()=>this._app.current.saveSelected()),mo(this,"selectAnnotation",gf=>{const Ef=this._app.current.selectAnnotation(this._wrap(gf));return Ef==null?void 0:Ef.underlying}),mo(this,"setAnnotations",gf=>{const Ef=(gf||[]).map(Rf=>new C2(Rf));this._app.current.setAnnotations(Ef)}),mo(this,"setAuthInfo",gf=>this._env.user=gf),mo(this,"setDrawingEnabled",gf=>this._app.current.setDrawingEnabled(gf)),mo(this,"setDrawingTool",gf=>this._app.current.setDrawingTool(gf)),mo(this,"setServerTime",gf=>this._env.setServerTime(gf)),mo(this,"setVisible",gf=>this._app.current.setVisible(gf)),mo(this,"updateSelected",(gf,Ef)=>{let Rf=null;gf.type==="Annotation"?Rf=new C2(gf):gf.type==="Selection"&&(Rf=new xT(gf.target,gf.body)),Rf&&this._app.current.updateSelected(Rf,Ef)});const df=uf||{};this._app=Zg.createRef(),this._emitter=new Z1,this._env=BA(),this._element=xo.element,window.getComputedStyle(this._element).getPropertyValue("position")==="static"&&(this._element.style.position="relative"),jA(df.locale,df.messages),this.appContainerEl=document.createElement("DIV"),this._element.appendChild(this.appContainerEl),Zg.render(kf(j3,{ref:this._app,viewer:xo,wrapperEl:this._element,config:df,env:this._env,onSelectionStarted:this.handleSelectionStarted,onSelectionCreated:this.handleSelectionCreated,onSelectionTargetChanged:this.handleSelectionTargetChanged,onAnnotationCreated:this.handleAnnotationCreated,onAnnotationSelected:this.handleAnnotationSelected,onAnnotationUpdated:this.handleAnnotationUpdated,onAnnotationDeleted:this.handleAnnotationDeleted,onCancelSelected:this.handleCancelSelected,onClickAnnotation:this.handleClickAnnotation,onMouseEnterAnnotation:this.handleMouseEnterAnnotation,onMouseLeaveAnnotation:this.handleMouseLeaveAnnotation}),this.appContainerEl)}get disableEditor(){return this._app.current.disableEditor}set disableEditor(xo){this._app.current.disableEditor=xo}get disableSelect(){return this._app.current.disableSelect}set disableSelect(xo){this._app.current.disableSelect=xo}get readOnly(){return this._app.current.readOnly}set readOnly(xo){this._app.current.readOnly=xo}get widgets(){return this._app.current.widgets}set widgets(xo){this._app.current.widgets=xo}}var H3=(go,xo)=>new z3(go,xo);return H3})})(openseadragonAnnotorious_min);var openseadragonAnnotorious_minExports=openseadragonAnnotorious_min.exports;const Annotorious=getDefaultExportFromCjs$3(openseadragonAnnotorious_minExports);class GithubClient{constructor(W){this._shas={},this.authToken=W}b64EncodeUnicode(W){return btoa(encodeURIComponent(W).replace(/%([0-9A-F]{2})/g,function(q,K){return String.fromCharCode(parseInt(K,16))}))}b64DecodeUnicode(W){return decodeURIComponent(Array.prototype.map.call(atob(W),function(q){return"%"+("00"+q.charCodeAt(0).toString(16)).slice(-2)}).join(""))}user(){return fetch("https://api.github.com/user",{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}}).then(W=>W.json())}async isCollaborator(W,q,K){let X=`https://api.github.com/repos/${W}/${q}/collaborators/${K}`,tt=await fetch(X,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}});return tt.ok&&tt.status===204}organizations(){return fetch("https://api.github.com/user/orgs",{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}}).then(W=>W.json())}repos(W="",q=""){let K=W?`users/${W}`:q?`orgs/${q}`:"user";return fetch(`https://api.github.com/${K}/repos?per_page=100`,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}}).then(X=>X.json())}async createRepository({org:W=null,name:q="",description:K="",auto_init:X=!0}){let tt=W?`https://api.github.com/orgs/${W}/repos`:"https://api.github.com/user/repos",rt=await fetch(tt,{method:"POST",body:JSON.stringify({name:q,description:K,auto_init:X}),headers:{Authorization:`Token ${this.authToken}`}});return{status:rt.status,statusText:rt.statusText}}branches(W,q){return fetch(`https://api.github.com/repos/${W}/${q}/branches`,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${this.authToken}`}}).then(K=>K.json())}async getFile(W,q,K,X){var ut;let tt=((ut=window.config)==null?void 0:ut.source)||{};W=W||tt.owner,q=q||tt.repository,X=X||tt.branch;let rt=`https://api.github.com/repos/${W}/${q}/contents/${K}?ref=${X}`,ot=this.authToken?await fetch(rt,{headers:{Authorization:`Token ${this.authToken}`}}):await fetch(rt);return ot.status===200?(ot=await ot.json(),{sha:ot.sha,content:JSON.parse(decodeURIComponent(escape(atob(ot.content))))}):ot.status===403||ot.status===401?(rt=`https://raw.githubusercontent.com/${W}/${q}/${X}/${K}`,ot=await fetch(rt),ot.ok?(ot=await ot.json(),{sha:null,content:ot}):null):null}async getSha(W,q,K,X){let tt=`https://api.github.com/repos/${W}/${q}/contents/${K}`;X&&(tt+=`?ref=${X}`);let rt=await fetch(tt,{headers:{Authorization:`Token ${this.authToken}`}});return rt.ok&&(rt=await rt.json()),rt.sha}async putFile(W,q,K,X,tt,rt=!1,ot=""){let ut=`https://api.github.com/repos/${W}/${q}/contents/${K}`,yn=`${W}/${q}/${tt}/${K}`;ot=ot||this._shas[yn]||await this.getSha(W,q,K,tt);let uo={message:"API commit",content:rt?btoa(X):this.b64EncodeUnicode(X)};tt&&(uo.branch=tt),ot&&(uo.sha=ot);let po=await fetch(ut,{method:"PUT",body:JSON.stringify(uo),headers:{Authorization:`Token ${this.authToken}`}});return po.ok&&(ot=(await po.json()).content.sha,this._shas[yn]=ot),{status:po.status,statusText:po.statusText,sha:ot}}async deleteFile(W,q,K,X,tt=""){tt=tt||await this.getSha(W,q,K,X);let rt=`https://api.github.com/repos/${W}/${q}/contents/${K}`,ut=await fetch(rt,{method:"DELETE",body:JSON.stringify({message:"API commit",sha:tt}),headers:{Authorization:`Token ${this.authToken}`}});ut=await ut.json()}async defaultBranch(W,q){let K=null,X=`https://api.github.com/repos/${W}/${q}`,tt=await fetch(X,{headers:{Authorization:`Token ${this.authToken}`}});return tt.ok&&(tt=await tt.json(),K=tt.default_branch),K}async dirlist(W,q,K,X){var yn;K=K||"",X=X||await this.defaultBranch(W,q);let tt=[],rt=`https://api.github.com/repos/${W}/${q}/git/trees/${X}`,ot={Authorization:`Token ${this.authToken}`,Accept:"application/vnd.github.v3+json","If-None-Match":""},ut=K.split("/").filter(uo=>uo);for(let uo=0;uolf.path===ut[uo]):null;if(rt=wo?wo.url:null,!rt)break}if(rt){let uo=await fetch(rt,{headers:ot});tt=((uo.ok?await uo.json():{}).tree||[]).map(mo=>({name:mo.path,sha:mo.sha,type:mo.type==="tree"?"dir":"file"}))}return tt}async fullPath(W,q,K,X,tt=!1){let rt=K.split("/").filter(uo=>uo),ot=rt[rt.length-1],ut=await this.dirlist(W,q,rt.join("/"),X);if(ut.length===0&&(rt.pop(),ut=await this.dirlist(W,q,rt.join("/"),X)),!tt){let uo=[ot,`${ot}.md`,"README.md"];for(let po=0;pomo.type==="file"&&mo.name===uo[po])){rt.push(uo[po]);break}}return rt.join("/")}async userCanUpdateRepo(W,q){return this.user().then(K=>K.login).then(K=>q?this.isCollaborator(W,q,K):!1)}}class Annotator{constructor(W,q="",K=!1){this.ref="main",this.imageId="",this.sha="",this.visible=!1,this.ghAuthToken="",this.selected=null,this.osd=W,this.base=q;let[X,tt,...rt]=this.base.split("/");this.acct=X,this.repo=tt,this.basePath=rt.join("/"),this.annotorious=Annotorious(W,{readOnly:!K}),this.annotorious.on("createAnnotation",async ot=>this.createAnnotation(ot)),this.annotorious.on("updateAnnotation",async ot=>this.updateAnnotation(ot)),this.annotorious.on("deleteAnnotation",async ot=>this.deleteAnnotation(ot)),this.annotorious.on("selectAnnotation",async ot=>this.onSelect(ot)),this.setVisible(!0),this.ghAuthToken=localStorage.getItem("gh-auth-token")||"",this.ghClient=new GithubClient(this.ghAuthToken)}async loadAnnotations(W){this.imageId=W,this.setVisible(!1);let q=[],K=await this.ghClient.getFile(this.acct,this.repo,`${this.basePath}/${this.imageId}.json`,this.ref);return K!=null&&K.content&&(q=K.content,this.sha=K.sha),this.annotorious.setAnnotations(q),this.annotorious.readOnly&&q.forEach(X=>{let tt=this.annoEl(X.id);tt&&(tt.addEventListener("mouseenter",()=>this.select(X.id)),tt.addEventListener("mouseleave",()=>this.deselect()),tt.addEventListener("click",()=>navigator.clipboard.writeText(X.id)))}),q}setVisible(W){this.visible=W;let q=this.osd.element.querySelector(".a9s-annotationlayer");q&&(q.style.visibility=this.visible?"visible":"hidden",q.style.display=this.visible?"inline":"none"),Array.from(this.osd.element.querySelectorAll(".a9s-annotation")).forEach(K=>K.style.visibility=this.visible?"visible":"hidden")}toggleVisibility(W){W&&W.stopPropagation(),this.setVisible(!this.visible)}onSelect(W){this.selected=W.id,navigator.clipboard&&navigator.clipboard.writeText(this.selected)}annoEl(W){return this.osd.element.querySelector(`[data-id="${W}"]`)}getAnnotation(W){return this.annotorious.getAnnotations().find(q=>q.id===W)}getAnnotationRegion(W){return this.getAnnotation(W).target.selector.value.replace(/xywh=pixel:/g,"")}select(W){if(W!==this.selected){if(this.setVisible(!0),this.selected=W,this.osd.element.querySelectorAll(".a9s-annotation").forEach(q=>{q.dataset.id===W?(q.style.visibility="visible",q.classList.add("selected"),this.annotorious.selectAnnotation(W)):q.style.visibility="hidden"}),this.selected){let q=this.annoEl(W);q&&(q.style.visibility="visible")}}else this.setVisible(!1),this.deselect()}deselect(){Array.from(this.osd.element.querySelectorAll(".a9s-annotation")).forEach(W=>W.style.visibility=this.visible?"visible":"hidden"),this.annotorious.cancelSelected(),this.selected=void 0}async saveAnnotations(){let W=JSON.stringify(this.annotorious.getAnnotations(),null,2);await this.ghClient.putFile(this.acct,this.repo,`${this.basePath}${this.basePath?"/":""}${this.imageId}.json`,W,this.ref,!1,this.sha)}async createAnnotation(W){W.id=sha256(W.id).slice(0,8),W.target.id=this.imageId,this.saveAnnotations(),navigator.clipboard&&navigator.clipboard.writeText(W.id)}async updateAnnotation(W){W.target.id=this.imageId,this.saveAnnotations(),navigator.clipboard&&navigator.clipboard.writeText(W.id)}async deleteAnnotation(W){this.saveAnnotations()}}const _hoisted_1$g=["src"],_hoisted_2$d=["aria-label","alt"],_hoisted_3$c=["innerHTML"],_hoisted_4$b={class:"status"},_hoisted_5$9={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_6$8=createBaseVNode("path",{d:"M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"},null,-1),_hoisted_7$6=[_hoisted_6$8],_hoisted_8$5={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_9$6=createBaseVNode("path",{d:"M441 58.9L453.1 71c9.4 9.4 9.4 24.6 0 33.9L424 134.1 377.9 88 407 58.9c9.4-9.4 24.6-9.4 33.9 0zM209.8 256.2L344 121.9 390.1 168 255.8 302.2c-2.9 2.9-6.5 5-10.4 6.1l-58.5 16.7 16.7-58.5c1.1-3.9 3.2-7.5 6.1-10.4zM373.1 25L175.8 222.2c-8.7 8.7-15 19.4-18.3 31.1l-28.6 100c-2.4 8.4-.1 17.4 6.1 23.6s15.2 8.5 23.6 6.1l100-28.6c11.8-3.4 22.5-9.7 31.1-18.3L487 138.9c28.1-28.1 28.1-73.7 0-101.8L474.9 25C446.8-3.1 401.2-3.1 373.1 25zM88 64C39.4 64 0 103.4 0 152V424c0 48.6 39.4 88 88 88H360c48.6 0 88-39.4 88-88V312c0-13.3-10.7-24-24-24s-24 10.7-24 24V424c0 22.1-17.9 40-40 40H88c-22.1 0-40-17.9-40-40V152c0-22.1 17.9-40 40-40H200c13.3 0 24-10.7 24-24s-10.7-24-24-24H88z"},null,-1),_hoisted_10$6=[_hoisted_9$6],_hoisted_11$6={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_12$6=createBaseVNode("path",{d:"M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"},null,-1),_hoisted_13$6=[_hoisted_12$6],_hoisted_14$5={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_15$4=createBaseVNode("path",{d:"M441 58.9L453.1 71c9.4 9.4 9.4 24.6 0 33.9L424 134.1 377.9 88 407 58.9c9.4-9.4 24.6-9.4 33.9 0zM209.8 256.2L344 121.9 390.1 168 255.8 302.2c-2.9 2.9-6.5 5-10.4 6.1l-58.5 16.7 16.7-58.5c1.1-3.9 3.2-7.5 6.1-10.4zM373.1 25L175.8 222.2c-8.7 8.7-15 19.4-18.3 31.1l-28.6 100c-2.4 8.4-.1 17.4 6.1 23.6s15.2 8.5 23.6 6.1l100-28.6c11.8-3.4 22.5-9.7 31.1-18.3L487 138.9c28.1-28.1 28.1-73.7 0-101.8L474.9 25C446.8-3.1 401.2-3.1 373.1 25zM88 64C39.4 64 0 103.4 0 152V424c0 48.6 39.4 88 88 88H360c48.6 0 88-39.4 88-88V312c0-13.3-10.7-24-24-24s-24 10.7-24 24V424c0 22.1-17.9 40-40 40H88c-22.1 0-40-17.9-40-40V152c0-22.1 17.9-40 40-40H200c13.3 0 24-10.7 24-24s-10.7-24-24-24H88z"},null,-1),_hoisted_16$4=[_hoisted_15$4],_hoisted_17$4={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},_hoisted_18$4=createBaseVNode("path",{d:"M160 368c26.5 0 48 21.5 48 48v16l72.5-54.4c8.3-6.2 18.4-9.6 28.8-9.6H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H64c-8.8 0-16 7.2-16 16V352c0 8.8 7.2 16 16 16h96zm48 124l-.2 .2-5.1 3.8-17.1 12.8c-4.8 3.6-11.3 4.2-16.8 1.5s-8.8-8.2-8.8-14.3V474.7v-6.4V468v-4V416H112 64c-35.3 0-64-28.7-64-64V64C0 28.7 28.7 0 64 0H448c35.3 0 64 28.7 64 64V352c0 35.3-28.7 64-64 64H309.3L208 492z"},null,-1),_hoisted_19$3=[_hoisted_18$4],_hoisted_20$3={variant:"primary",pill:""},_hoisted_21$3=["manifest","caption","description","annoid"],_sfc_main$i=defineComponent({__name:"Image.ce",props:{active:{type:Boolean,default:!1},base:{type:String},caption:{type:String},data:{type:String},fit:{type:String,default:"contain"},format:{type:String},height:{type:Number},manifest:{type:String},noCaption:{type:Boolean,default:!1},options:{type:String},refresh:{type:Boolean,default:!1},region:{type:String},repoIsWritable:{type:Boolean,default:!1},quality:{type:String},rotate:{type:Number},rotation:{type:String},seq:{type:Number,default:1},size:{type:String},slot:{type:String},src:{type:String},static:{type:Boolean,default:!1},width:{type:Number},zoomOnScroll:{type:Boolean,default:!1},attribution:{type:String},description:{type:String},label:{type:String},license:{type:String},owner:{type:String},summary:{type:String},title:{type:String},url:{type:String}},setup(F){const W=F,q=ref(),K=computed(()=>{var Of,qf;return(qf=(Of=q.value)==null?void 0:Of.getRootNode())==null?void 0:qf.host}),X=computed(()=>{var Of;return(Of=q==null?void 0:q.value)==null?void 0:Of.parentNode});watch$1(X,Of=>{Of.children[1].classList.remove("sticky")}),watch$1(W,()=>{ip()});const tt=self.window,rt=ref(tt.config||{}),ot=computed(()=>{var Of;if((Of=rt.value.source)!=null&&Of.owner)return rt.value.source;if(W.base){let[qf,cp,hp,...$p]=W.base.split("/");return{owner:qf,repository:cp,branch:hp,dir:$p?`/${$p.join("/")}/`:"/"}}return null}),ut=computed(()=>{var Of,qf,cp,hp;return`https://raw.githubusercontent.com/${(Of=ot.value)==null?void 0:Of.owner}/${(qf=ot.value)==null?void 0:qf.repository}/${(cp=ot.value)==null?void 0:cp.branch}/${(hp=ot.value)==null?void 0:hp.dir.replace(/\/(README|index)\.md$/,"")}`}),yn=ref(null),uo=ref(),po=computed(()=>{var _p;let Of=yf.value[vf.value]&&ap({type:"Annotation",motivation:"painting"},yf.value[vf.value],lf.value[vf.value].seq||1).body;if(!Of)return"";let qf,[cp,hp,$p,...Vp]=((_p=W.options)==null?void 0:_p.split("/"))||[],[bp,Ep]=Vp;return cp=W.region||cp||"full",hp=W.size?W.size:hp||(Lf.value?kf.value?`${Lf.value},${kf.value}`:`${Lf.value},`:kf.value?`,${kf.value}`:"400,"),$p=W.rotation||$p||"0",bp=W.quality||bp||"default",Ep=W.format||Ep||"jpg",qf=`${Of.service[0].id||Of.service[0]["@id"]}/${cp}/${hp}/${$p}/${bp}.${Ep}`,qf}),mo=computed(()=>{let Of=new URLSearchParams(tt.location.search).get("refresh");return W.refresh||Of==="true"||Of===""}),wo=ref(0);watch$1(wo,()=>{Np(),wo.value>0&&(!cf.value.length||W.static)&&Df(),wo.value>0&&!Nf.value&&jp()});const lf=ref([]);watch$1(lf,async Of=>{yf.value=await Promise.all(Of.map(qf=>qf.src||qf.manifest?getManifest(qf.src||qf.manifest,mo.value):fetch(`https://${iiifServer}/manifest/${mo.value?"?refresh":""}`,{method:"POST",body:JSON.stringify(Object.fromEntries(Object.entries(qf).filter(([cp,hp])=>["attribution","caption","description","fit","label","license","summary","title","url"].includes(cp)).map(([cp,hp])=>(cp==="url"&&hp.indexOf("http")<0&&(hp=hp.indexOf("wc:")===0?mwImage(hp.slice(3),0):hp.indexOf("gh:")===0?`${ut.value}/${hp.slice(3)}`:`${ut.value}/${hp}`),[cp,hp]))))}).then(cp=>cp.json()))).then(qf=>qf.flat().filter(cp=>cp))});const yf=ref([]),cf=computed(()=>yf.value.map((Of,qf)=>{var hp;let cp=(hp=ap({type:"Annotation",motivation:"painting"},Of,lf.value[qf].seq||1))==null?void 0:hp.body;return cp.service?`${cp.service[0].id||cp.service[0]["@id"]}/info.json`:{url:cp.id,type:"image",buildPyramid:!0}}));watch$1(cf,Of=>{var qf;(qf=Nf.value)==null||qf.open(Of)});const vf=ref(0),_f=computed(()=>yf.value[vf.value]&&ap({type:"Annotation",motivation:"painting"},yf.value[vf.value],lf.value[vf.value].seq||1).body),$f=computed(()=>{var Of;return _f.value&&sha256(decodeURIComponent((Of=_f.value.id)==null?void 0:Of.split("/").pop().toLowerCase().replace(".jpeg",".jpg"))).slice(0,8)});watch$1($f,async Of=>Cf.value=uo.value?await uo.value.loadAnnotations(Of)||[]:0);const xf=ref(!1),Af=ref(!1);watch$1(Af,()=>uo.value.setVisible(Af.value));const Cf=ref([]);function Pf(){Af.value=!Af.value}const Bf=computed(()=>_f.value&&{width:_f.value.width,height:_f.value.height}),Hf=computed(()=>{var Of,qf;return Number(((((Of=Bf.value)==null?void 0:Of.width)||1)/(((qf=Bf.value)==null?void 0:qf.height)||1)).toFixed(4))});watch$1(Hf,()=>{Np()});function Df(){function Of(cp){var bp;let hp=[];cp=cp.replace(/”/g,'"').replace(/”/g,'"'),(bp=cp==null?void 0:cp.match(/[^\s"]+|"([^"]*)"/gmi))==null||bp.filter(Ep=>Ep).forEach(Ep=>{hp.length>0&&hp[hp.length-1].indexOf("=")===hp[hp.length-1].length-1?hp[hp.length-1]=`${hp[hp.length-1]}${Ep}`:hp.push(Ep)});let $p={},Vp=["src","caption","options","fit","rotate","seq"];return hp.filter(Ep=>Ep!=="image").forEach((Ep,_p)=>{if(Ep.indexOf("=")>0){let Mp=Ep.indexOf("="),Yp=Ep.slice(0,Mp),ug=Ep.slice(Mp+1);$p[Yp]=ug[0]==='"'?ug.slice(1,-1):ug}else $p[Vp[_p]]=Ep[0]==='"'?Ep.slice(1,-1):Ep}),$p}function qf(){let cp=new Set(["attribution","caption","description","fit","label","license","manifest","noCaption","region","rotate","seq","src","summary","title","url"]),hp=W.src||W.url||W.manifest?Object.fromEntries(Object.entries(W).filter(([Vp,bp])=>cp.has(Vp)&&bp)):null,$p=hp?[hp]:[];Array.from(K.value.querySelectorAll("li")).map(Vp=>Of(Vp.textContent||"")).filter(Vp=>Vp.src||Vp.manifest||Vp.url).forEach((Vp,bp)=>$p.push({...Vp,idx:bp})),$p.forEach(Vp=>{Vp.src&&Vp.src.indexOf("http")<0&&(/^[\w-]+:/.test(Vp.src)||(Vp.src=`gh:${ot.value.owner}/${ot.value.repository}${ot.value.dir}/${Vp.src}`))}),lf.value=$p}new MutationObserver(cp=>{for(let hp of cp)hp.type==="childList"&&qf()}).observe(K.value,{childList:!0,subtree:!0,characterData:!0}),qf()}watch$1(yn,()=>{var Of;yn.value&&!Lf.value&&(new ResizeObserver(()=>{var qf;wo.value=((qf=yn.value)==null?void 0:qf.clientWidth)||wo.value}).observe(yn.value),wo.value=(Of=yn.value)==null?void 0:Of.clientWidth)});const Lf=ref(0);watch$1(Lf,Of=>{var qf;(qf=q.value)==null||qf.setAttribute("style",`width: ${W.width}px; margin: auto;`),wo.value=Of});const kf=ref(0);watch$1(kf,Of=>{K.value.style.height=Of?`${Of}px`:"unset",vp(),setTimeout(()=>{var qf,cp;return(cp=(qf=Nf.value)==null?void 0:qf.viewport)==null?void 0:cp.goHome(!1)},250)});const Nf=ref(),Yf=computed(()=>{var Of,qf,cp;return W.caption||yf.value[vf.value]&&((cp=(qf=(Of=yf.value[vf.value])==null?void 0:Of.label)==null?void 0:qf.en)==null?void 0:cp[0])}),Gf=ref(),rp=ref(!1);function ip(){W.active&&!rp.value&&(rp.value=!0),Lf.value=W.width||0,kf.value=W.height||0}onMounted(()=>{ip()});function ap(Of,qf,cp=1){const hp=yp(Of,qf);return hp.length>=cp?hp[cp-1]:null}function yp(Of,qf,cp=[]){if(cp=cp||[],qf!=null&&qf.items)for(let hp=0;hp$p[bp]&&$p[bp]!==Ep)?cp.push($p):yp(Of,$p,cp)}return cp}function vp(){var Of,qf,cp,hp;(Of=yn.value)!=null&&Of.clientWidth&&(kf.value?(qf=yn.value)==null||qf.setAttribute("style","flex: 1 1 0%; position: relative"):(hp=yn.value)==null||hp.setAttribute("style",`height: ${Number(((cp=yn.value)==null?void 0:cp.clientWidth)/Hf.value).toFixed(0)}px;`))}function Np(){vp(),setTimeout(()=>{var Of,qf;return(qf=(Of=Nf.value)==null?void 0:Of.viewport)==null?void 0:qf.goHome(!1)},250)}function jp(){var bp,Ep,_p,Mp,Yp;if(Nf.value||!yn.value)return;vp();const Of={element:yn.value,prefixUrl:"https://openseadragon.github.io/openseadragon/images/",homeFillsViewer:W.fit==="cover",maxZoomPixelRatio:10,sequenceMode:!0,showReferenceStrip:!0};Nf.value=OpenSeadragon(Of),Nf.value.addHandler("viewport-change",()=>kp()),Nf.value.addHandler("page",ug=>{vf.value=ug.page}),Nf.value.world.addHandler("add-item",ug=>{let hg=lf.value[vf.value];if(hg!=null&&hg.rotate&&ug.item.setRotation(parseInt(hg.rotate),!0),hg!=null&&hg.region&&Nf.value){let xg=Dp(hg.region,Nf.value);setTimeout(()=>{var kg;return(kg=Nf.value)==null?void 0:kg.viewport.fitBounds(xg,!1)},100)}}),Ip(),Jp(),setTimeout(()=>Lp(),500),cf.value.length&&((bp=Nf.value)==null||bp.open(cf.value));let qf=(Ep=ot.value)==null?void 0:Ep.owner,cp=(_p=ot.value)==null?void 0:_p.repository,hp,$p=(Mp=ot.value)==null?void 0:Mp.dir.split("/").filter(ug=>ug),Vp=(Yp=new URL(location.href).searchParams.get("source"))==null?void 0:Yp.split("/").filter(ug=>ug).filter(ug=>!/\.md$/.test(ug));Vp&&([qf,cp,hp,...$p]=Vp),uo.value=new Annotator(Nf.value,`${qf}/${cp}${$p!=null&&$p.length?"/":""}${($p||[]).join("/")}`,W.repoIsWritable),$f.value&&uo.value.loadAnnotations($f.value).then(ug=>Cf.value=ug)}function Ip(){W.zoomOnScroll||new OpenSeadragonViewerInputHook({viewer:Nf.value,hooks:[{tracker:"viewer",handler:"scrollHandler",hookHandler:Of=>{var qf;return!((qf=Nf.value)!=null&&qf.isFullPage())&&!Of.originalEvent.ctrlKey&&(Of.preventDefaultAction=!0,Of.stopHandlers=!0),!0}}]})}function Jp(){var qf;let Of=(qf=K.value)==null?void 0:qf.parentElement;for(;Of;)Array.from(Of.querySelectorAll("a")).filter(cp=>cp.href!=="javascript:;").forEach(async cp=>{var bp;let $p=new URL(cp.href).pathname.split("/").filter(Ep=>Ep).map(Ep=>Ep.toLowerCase()).map(Ep=>Ep==="zoomto"?"zoom":Ep),Vp=$p.indexOf("zoom");if(Vp>=0){let Ep=/^(pct:|pixel:|px:)?[-+\d.]+,[-+\d.]+,[-+\d.]+,[-+\d.]+$/.test($p[Vp+1])?$p[Vp+1]:"",_p=$p.slice(Vp+1).find(kg=>kg.length===8&&/^[0-9a-f]+$/.test(kg)),Mp=$p.slice(Vp+2).filter(kg=>kg==="click"||kg==="mouseover")[0]||"click",Yp=$p.slice(Vp+2).filter(kg=>kg!=="click"&&kg!=="mouseover"&&kg!==_p)[0],ug,hg,xg=cp.parentElement;for(;xg&&!hg;)hg=xg.dataset.id,xg=xg.parentElement;if(hg){let kg=(bp=K.value)==null?void 0:bp.dataset.id;if(kg&&kg!==hg)return}if(Yp&&(ug=document.getElementById(Yp),!ug)||(ug=ng(cp,"ve-image"),ug!==K.value))return;cp.classList.add("zoom"),cp.href="javascript:;",Ep&&cp.setAttribute("data-region",Ep),_p&&cp.setAttribute("data-annoid",_p),cp.addEventListener(Mp,kg=>{var Rp,Fp;let Dg=cp,lm=Dg.getAttribute("data-region")||((Rp=Dg==null?void 0:Dg.parentElement)==null?void 0:Rp.getAttribute("data-region")),Bp=Dg.getAttribute("data-annoId")||((Fp=Dg==null?void 0:Dg.parentElement)==null?void 0:Fp.getAttribute("data-annoId"));lm&&vg(lm),Bp&&uo.value.select(Bp)})}}),Of=Of.parentElement}function ng(Of,qf){let cp,hp=Of.parentElement;for(;hp&&!cp;)cp=hp.querySelector(qf),hp=hp.parentElement;return cp}let og="";function vg(Of){var cp,hp;Of=Of.replace(/^zoom\|/i,"");const qf=Of==null?void 0:Of.match(/^(?(pct:|pixel:|px:)?[+-\d.]+,[+-\d.]+,[+-\d.]+,[+-\d.]+)?$/);if(qf){let $p=(cp=qf==null?void 0:qf.groups)==null?void 0:cp.region;if($p){if(og===$p)(hp=Nf.value)==null||hp.viewport.goHome(),og="";else if(og=$p,Nf.value){let Vp=Dp($p,Nf.value);Nf.value.viewport.fitBounds(Vp,!1)}}}}function Dp(Of,qf){let cp;const hp=Of.split(":");let[$p,Vp,bp,Ep]=hp[hp.length-1].split(",").map(Mp=>parseInt(Mp));const _p=qf.world.getItemAt(0).getContentSize();return hp.length===2&&(hp[0]==="pct"||hp[0]==="percent")&&($p=Math.round(_p.x*$p/100),Vp=Math.round(_p.y*Vp/100),bp=Math.round(_p.x*bp/100),Ep=Math.round(_p.y*Ep/100)),cp=qf.viewport.imageToViewportRectangle($p,Vp,bp,Ep),cp}function Lp(){var qf,cp;const Of=(qf=Nf.value)==null?void 0:qf.world.getItemAt(0);if(Of){let hp=(cp=Nf.value)==null?void 0:cp.viewport.getBounds();const $p=hp?Of.viewportToImageRectangle(hp):null;Gf.value=$p?`${Math.ceil($p.x)},${Math.ceil($p.y)},${Math.ceil($p.width)},${Math.ceil($p.height)}`:""}}let xp=null;function kp(){xp!==null&&(clearTimeout(xp),xp=null),xp=tt.setTimeout(()=>Lp(),100)}function lp(Of){navigator.clipboard&&navigator.clipboard.writeText(Of)}return(Of,qf)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:q,class:"image"},[F.static&&po.value?(openBlock(),createElementBlock("img",{key:0,src:po.value,style:{width:"100%"}},null,8,_hoisted_1$g)):cf.value?(openBlock(),createElementBlock("div",{key:1,ref_key:"osdEl",ref:yn,class:normalizeClass(xf.value?"osd edit":"osd view"),id:"osd",role:"img","aria-label":Yf.value,alt:Yf.value},[Gf.value?(openBlock(),createElementBlock("div",{key:0,class:"coords",innerHTML:Gf.value,onClick:qf[0]||(qf[0]=cp=>lp(Gf.value||""))},null,8,_hoisted_3$c)):createCommentVNode("",!0)],10,_hoisted_2$d)):createCommentVNode("",!0),createBaseVNode("div",_hoisted_4$b,[Cf.value.length===0&&F.repoIsWritable?(openBlock(),createElementBlock("div",{key:0,class:"annotations-indicator",onClick:Pf},[Af.value?(openBlock(),createElementBlock("svg",_hoisted_5$9,_hoisted_7$6)):(openBlock(),createElementBlock("svg",_hoisted_8$5,_hoisted_10$6))])):Cf.value.length>0?(openBlock(),createElementBlock("div",{key:1,class:"annotations-indicator",onClick:Pf},[F.repoIsWritable&&Af.value?(openBlock(),createElementBlock("svg",_hoisted_11$6,_hoisted_13$6)):F.repoIsWritable?(openBlock(),createElementBlock("svg",_hoisted_14$5,_hoisted_16$4)):(openBlock(),createElementBlock("svg",_hoisted_17$4,_hoisted_19$3)),createBaseVNode("sl-badge",_hoisted_20$3,toDisplayString(Cf.value.length),1)])):createCommentVNode("",!0),yf.value.length&&!F.noCaption?(openBlock(),createElementBlock("ve-caption",{key:2,manifest:yf.value[vf.value],caption:Yf.value,description:F.src&&F.description,annoid:$f.value},null,8,_hoisted_21$3)):createCommentVNode("",!0)])],512))}}),_style_0$g=`.r6o-editor{top:0;left:0;margin-left:-19px}.a9s-annotationlayer{position:absolute;top:0;left:0;width:100%;height:100%;outline:none;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none}.a9s-annotationlayer.no-cursor,.a9s-annotationlayer.no-cursor *{cursor:none!important}.a9s-crosshair line{stroke-width:1px;stroke:#00000080;pointer-events:none;vector-effect:non-scaling-stroke;shape-rendering:crispEdges}.a9s-selection-mask{stroke:none;fill:transparent;pointer-events:none}.a9s-annotation rect,.a9s-annotation circle,.a9s-annotation ellipse,.a9s-annotation path,.a9s-annotation polygon,.a9s-annotation line,.a9s-selection rect,.a9s-selection circle,.a9s-selection ellipse,.a9s-selection path,.a9s-selection polygon,.a9s-selection line{fill:transparent;cursor:pointer;vector-effect:non-scaling-stroke}.a9s-annotation .a9s-inner,.a9s-selection .a9s-inner{stroke:#fff;stroke-width:1px;fill:transparent}.a9s-annotation .a9s-inner:hover,.a9s-selection .a9s-inner:hover{stroke:#fff000}.a9s-annotation .a9s-outer,.a9s-selection .a9s-outer{stroke:#000000b3;stroke-width:3px;fill:none}.a9s-annotation .a9s-formatter-el,.a9s-selection .a9s-formatter-el{overflow:visible}.a9s-annotation.a9s-point .a9s-inner{display:none}.a9s-annotation.a9s-point .a9s-outer{stroke:#5a5a5a;stroke-width:1.5px;fill:#ffffff80}.a9s-annotation.a9s-point .a9s-outer:hover{fill:#fff000}.a9s-annotation.selected .a9s-inner,.a9s-selection .a9s-inner{stroke:#fff000}.a9s-annotation.editable .a9s-inner{stroke:#fff000;cursor:move!important}.a9s-annotation.editable .a9s-inner:hover{fill:#fff0001a}.a9s-handle{cursor:move}.a9s-handle .a9s-handle-inner{stroke:#fff000;fill:#000}.a9s-handle .a9s-handle-outer{stroke:#000;fill:#fff}.a9s-handle:hover .a9s-handle-inner{fill:#fff000}.r6o-btn{background-color:#4483c4;border:1px solid #4483c4;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-block;font-size:14px;margin:0;outline:none;text-decoration:none;white-space:nowrap;padding:6px 18px;min-width:70px;vertical-align:middle;border-radius:2px}.r6o-btn *{vertical-align:middle;cursor:pointer}.r6o-btn .r6o-icon{margin-right:4px}.r6o-btn:disabled{border-color:#a3c2e2!important;background-color:#a3c2e2!important}.r6o-btn:hover{background-color:#4f92d7;border-color:#4f92d7}.r6o-btn.outline{border:1px solid #4483c4;color:#4483c4;background-color:transparent;text-shadow:none}.r6o-autocomplete{display:inline;position:relative}.r6o-autocomplete div[role=combobox]{display:inline}.r6o-autocomplete input{outline:none;border:none;width:80px;height:100%;line-height:14px;white-space:pre;box-sizing:border-box;background-color:transparent;font-size:14px;color:#3f3f3f}.r6o-autocomplete ul{position:absolute;margin:0;padding:0;list-style-type:none;background-color:#fff;border-radius:3px;border:1px solid #d6d7d9;box-sizing:border-box;box-shadow:0 0 20px #00000040}.r6o-autocomplete ul:empty{display:none}.r6o-autocomplete li{box-sizing:border-box;padding:2px 12px;width:100%;cursor:pointer}.r6o-editable-text{max-height:120px;overflow:auto;outline:none;min-height:2em;font-size:14px;font-family:Lato,sans-serif}.r6o-editable-text:empty:not(:focus):before{content:attr(data-placeholder);color:#c2c2c2}.r6o-widget.comment{font-size:14px;min-height:3em;background-color:#fff;position:relative}.r6o-widget.comment .r6o-editable-text,.r6o-widget.comment .r6o-readonly-comment{padding:10px;width:100%;box-sizing:border-box;outline:none;border:none;background-color:transparent;resize:none}.r6o-widget.comment .r6o-readonly-comment{white-space:pre-line}.r6o-widget.comment .r6o-editable-text::-webkit-input-placeholder{color:#c2c2c2}.r6o-widget.comment .r6o-editable-text::-moz-placeholder{color:#c2c2c2}.r6o-widget.comment .r6o-editable-text:-moz-placeholder{color:#c2c2c2}.r6o-widget.comment .r6o-editable-text:-ms-input-placeholder{color:#c2c2c2}.r6o-widget.comment .r6o-lastmodified{border:1px solid #e5e5e5;display:inline-block;border-radius:2px;margin:0 10px 8px;padding:4px 5px;line-height:100%;font-size:12px}.r6o-widget.comment .r6o-lastmodified .r6o-lastmodified-at{color:#757575;padding-left:3px}.r6o-widget.comment .r6o-arrow-down{position:absolute;height:20px;width:20px;top:9px;right:9px;line-height:22px;background-color:#fff;text-align:center;-webkit-font-smoothing:antialiased;border:1px solid #e5e5e5;cursor:pointer;border-radius:1px}.r6o-widget.comment .r6o-arrow-down.r6o-menu-open{border-color:#4483c4}.r6o-widget.comment .r6o-comment-dropdown-menu{position:absolute;top:32px;right:8px;background-color:#fff;border:1px solid #e5e5e5;list-style-type:none;margin:0;padding:5px 0;z-index:9999;box-shadow:0 2px 4px #0003}.r6o-widget.comment .r6o-comment-dropdown-menu li{padding:0 15px;cursor:pointer}.r6o-widget.comment .r6o-comment-dropdown-menu li:hover{background-color:#ecf0f1}.r6o-widget.comment .r6o-purposedropdown{position:relative;z-index:2}.r6o-widget.comment.editable{background-color:#ecf0f1}.r6o-widget.r6o-tag:empty{display:none}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.r6o-widget.tag .r6o-taglist li{height:27px}.r6o-widget.tag .r6o-taglist li .r6o-delete-wrapper .r6o-delete{position:relative;top:-4px}}.r6o-widget.r6o-tag{background-color:#ecf0f1;border-bottom:1px solid #e5e5e5;padding:1px 3px;display:flex}.r6o-widget.r6o-tag ul{margin:0;padding:0;list-style-type:none;z-index:1}.r6o-widget.r6o-tag ul.r6o-taglist{flex:0;white-space:nowrap}.r6o-widget.r6o-tag ul.r6o-taglist li{display:inline-block;margin:1px 1px 1px 0;padding:0;vertical-align:middle;overflow:hidden;font-size:12px;background-color:#fff;border:1px solid #d6d7d9;cursor:pointer;position:relative;line-height:180%;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;border-radius:2px;box-shadow:0 0 4px #0000001a}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-label{padding:2px 8px;display:inline-block}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-wrapper{display:inline-block;padding:2px 0;color:#fff;width:0;height:100%;background-color:#4483c4;-webkit-border-top-right-radius:2px;-webkit-border-bottom-right-radius:2px;-khtml-border-radius-topright:2px;-khtml-border-radius-bottomright:2px;-moz-border-radius-topright:2px;-moz-border-radius-bottomright:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-wrapper .r6o-delete{padding:2px 6px}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-wrapper svg{vertical-align:text-top}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-enter-active{width:24px;transition:width .2s}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-enter-done,.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-exit{width:24px}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-exit-active{width:0;transition:width .2s}.r6o-widget.r6o-tag .r6o-autocomplete{flex:1;position:relative}.r6o-widget.r6o-tag .r6o-autocomplete li{font-size:14px}.r6o-widget.r6o-tag input{width:100%;padding:0 3px;min-width:80px;outline:none;border:none;line-height:170%;background-color:transparent;color:#3f3f3f}.r6o-widget.r6o-tag input::-webkit-input-placeholder{color:#c2c2c2}.r6o-widget.r6o-tag input::-moz-placeholder{color:#c2c2c2}.r6o-widget.r6o-tag input:-moz-placeholder{color:#c2c2c2}.r6o-widget.r6o-tag input:-ms-input-placeholder{color:#c2c2c2}.r6o-editor{position:absolute;z-index:99999;width:400px;color:#3f3f3f;opacity:0;font-family:Lato,sans-serif;font-size:17px;line-height:27px;transition:opacity .2s ease-in}.r6o-editor .r6o-arrow{position:absolute;overflow:hidden;top:-12px;left:12px;width:28px;height:12px;display:none}.r6o-editor .r6o-arrow:after{content:"";position:absolute;top:5px;left:5px;width:18px;height:18px;background-color:#fff;-webkit-backface-visibility:hidden;transform:rotate(45deg)}.r6o-editor .r6o-editor-inner{background-color:#fff;border-radius:2px;box-shadow:2px 2px 42px #0006}.r6o-editor .r6o-editor-inner .r6o-widget:first-child{-webkit-border-top-left-radius:2px;-webkit-border-top-right-radius:2px;-khtml-border-radius-topleft:2px;-khtml-border-radius-topright:2px;-moz-border-radius-topleft:2px;-moz-border-radius-topright:2px;border-top-left-radius:2px;border-top-right-radius:2px}.r6o-editor .r6o-editor-inner .r6o-widget{border-bottom:1px solid #e5e5e5}.r6o-editor .r6o-footer{position:relative;text-align:right;padding:8px 0}.r6o-editor .r6o-footer .r6o-btn{margin-right:8px}.r6o-editor .r6o-footer .r6o-btn.delete-annotation{position:absolute;top:7px;left:7px;background-color:transparent;border:none;color:#4483c4;width:32px;height:32px;min-width:0;border-radius:100%;padding:0;display:flex;justify-content:center;align-items:center;transition:all .1s ease-in}.r6o-editor .r6o-footer .r6o-btn.delete-annotation:hover{color:#fff;background-color:#ef352c}@media (max-width: 640px){.r6o-editor{width:260px}}.r6o-editor.r6o-arrow-top .r6o-arrow{display:block}.r6o-editor.r6o-arrow-right{margin-left:8px}.r6o-editor.r6o-arrow-right .r6o-arrow{left:auto;right:12px}.r6o-editor.r6o-arrow-bottom .r6o-arrow{display:block;top:auto;bottom:-12px}.r6o-editor.r6o-arrow-bottom .r6o-arrow:after{top:-11px;box-shadow:none}.r6o-editor.pushed .r6o-arrow,.r6o-editor.dragged .r6o-arrow{display:none}.r6o-editor .r6o-draggable{cursor:move}.r6o-purposedropdown{width:150px;display:inline-block}.r6o-noselect{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.a9s-annotation.hover .a9s-inner{stroke:#fff000}.a9s-annotation:not(.hover):hover .a9s-inner{stroke:#fff}.image{display:flex;flex-direction:column;box-shadow:0 2px 4px #00000080!important}.osd{position:relative;width:100%;background-color:#000}.coords{opacity:0;position:absolute;bottom:0;right:0;background-color:#fff;border:1px solid #ccc;padding:.5em;z-index:10;transition:all .5s ease-out}.coords:hover{opacity:1;cursor:copy}.status{display:flex;align-items:center;gap:.2em;background-color:#fff}.annotations-indicator{display:flex;position:relative;width:1.8em;padding:.5em;cursor:pointer}.annotations-indicator svg{width:1.3em;height:1.3em}.annotations-indicator sl-badge{position:absolute;top:0;right:0}.r6o-readonly-comment{display:inline;padding:0!important;line-height:1!important}.view .r6o-editor,.view .r6o-editor-inner,.view .r6o-widget{display:inline-block;min-height:unset!important;min-width:200px;font-size:1em;line-height:1.2;border-bottom:none}.view .r6o-widget.comment{padding:10px}.r6o-tag,.comment.editable:nth-of-type(2){display:none!important}.edit .r6o-editor{width:216px}svg.a9s-annotationlayer .a9s-selection .a9s-inner,svg.a9s-annotationlayer .a9s-annotation .a9s-inner{stroke-width:3;stroke:#ff0}.a9s-selection-mask{stroke:none;fill:#0006;pointer-events:none} `,Image$3=_export_sfc(_sfc_main$i,[["styles",[_style_0$g]]]),_hoisted_1$f=["innerHTML"],_hoisted_2$c=createBaseVNode("div",{slot:"trigger",style:{display:"flex","flex-direction":"column"}},[createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"})])],-1),_hoisted_3$b={class:"details"},_hoisted_4$a=["innerHTML"],_hoisted_5$8=["innerHTML"],_hoisted_6$7=["innerHTML"],_hoisted_7$5=["innerHTML"],_hoisted_8$4={key:2,class:"photo-details"},_hoisted_9$5={key:3,class:"photo-details"},_hoisted_10$5={slot:"trigger",style:{cursor:"pointer"}},_hoisted_11$5=["innerHTML"],_hoisted_12$5={class:"location",style:{width:"200px"}},_hoisted_13$5=["center"],_hoisted_14$4=["textContent"],_sfc_main$h=defineComponent({__name:"Caption.ce",props:{annoid:{type:String},caption:{type:String},description:{type:String},language:{type:String,default:"en"},manifest:{type:Object},src:{type:String}},setup(F){const W=F,q=ref(null),K=ref(null);watch$1(K,()=>{var cf;(cf=K.value)==null||cf.addEventListener("sl-hide",vf=>{vf.stopPropagation(),vf.preventDefault()})});const X=ref(),tt=computed(()=>{var cf;return(cf=X.value)!=null&&cf.metadata?Object.fromEntries(X.value.metadata.map(vf=>[(vf.label.en||vf.label.none||Object.keys(vf.label)[0])[0],(vf.value.en||vf.value.none||Object.keys(vf.value)[0])[0]])):{}}),rt=computed(()=>{var cf;return(cf=X.value)!=null&&cf.label?(X.value.label[W.language]||X.value.label.none||X.value.label.en||Object.values(X.value.label)[0])[0]:null}),ot=computed(()=>{var cf;return(cf=X.value)!=null&&cf.summary?(X.value.summary[W.language]||X.value.summary.none||X.value.summary.en||Object.values(X.value.summary)[0])[0]:null}),ut=computed(()=>{var cf;return(cf=X.value)==null?void 0:cf.requiredStatement}),yn=computed(()=>{if(!ut.value)return null;if(ut.value.label&&ut.value.value){let cf=ut.value?wo(ut.value.label,W.language):"";return(cf?ut.value.label[cf][0].toLowerCase():"")==="attribution"?ut.value.value[wo(ut.value.value,cf)][0]:null}else{let cf=Object.keys(ut.value).find(vf=>vf.toLowerCase()==="attribution");return cf?Array.isArray(ut.value[cf])?ut.value[cf].join(", "):ut.value[cf]:null}}),uo=computed(()=>{var cf;return[tt.value.camera,tt.value.exposure,(cf=tt.value.mode)==null?void 0:cf.split(",").map(vf=>lf(vf.trim()).replace(/[_-]/," ")).join(", ")].filter(vf=>vf).join(", ")}),po=computed(()=>{var cf;return(cf=X.value)==null?void 0:cf.navPlace}),mo=computed(()=>{var cf,vf;return(vf=(cf=po.value)==null?void 0:cf.features[0])==null?void 0:vf.geometry.coordinates.join(",")});watch$1(W,()=>{W.manifest?X.value=W.manifest:W.src&&getManifest(W.src).then(cf=>X.value=cf)});function wo(cf,vf=W.language){return cf[W.language]?vf:cf.none?"none":cf.en?"en":Object.keys(cf)[0]}function lf(cf){return cf[0].toUpperCase()+cf.slice(1).toLowerCase()}onMounted(()=>{W.manifest?X.value=W.manifest:W.src&&getManifest(W.src).then(cf=>X.value=cf)});function yf(cf){return cf?marked.parse(cf).slice(3,-5):""}return(cf,vf)=>(openBlock(),createElementBlock("div",{class:"caption",ref_key:"root",ref:q},[createBaseVNode("div",{class:"label clamp",innerHTML:yf(F.caption||rt.value)},null,8,_hoisted_1$f),createBaseVNode("sl-dropdown",{ref_key:"details",ref:K,distance:"12",skidding:"-30",style:{"align-self":"flex-start"}},[_hoisted_2$c,createBaseVNode("div",_hoisted_3$b,[createBaseVNode("div",{class:"label",innerHTML:yf(rt.value||F.caption)},null,8,_hoisted_4$a),W.description?(openBlock(),createElementBlock("div",{key:0,class:"summary",innerHTML:yf(W.description)},null,8,_hoisted_5$8)):createCommentVNode("",!0),createBaseVNode("div",{class:"summary",innerHTML:yf(ot.value||"")},null,8,_hoisted_6$7),yn.value?(openBlock(),createElementBlock("div",{key:1,class:"attribution",innerHTML:yn.value},null,8,_hoisted_7$5)):createCommentVNode("",!0),uo.value?(openBlock(),createElementBlock("div",_hoisted_8$4,toDisplayString(uo.value),1)):createCommentVNode("",!0),tt.value.size?(openBlock(),createElementBlock("div",_hoisted_9$5,toDisplayString(tt.value.size),1)):createCommentVNode("",!0),mo.value?(openBlock(),createElementBlock("sl-dropdown",{key:4,ref_key:"details",ref:K,distance:"12",skidding:"-30",placement:"top"},[createBaseVNode("div",_hoisted_10$5,[createBaseVNode("span",{innerHTML:mo.value},null,8,_hoisted_11$5)]),createBaseVNode("div",_hoisted_12$5,[mo.value?(openBlock(),createElementBlock("ve-map",{key:0,center:mo.value,zoom:"6",marker:""},null,8,_hoisted_13$5)):createCommentVNode("",!0)])],512)):createCommentVNode("",!0),F.annoid?(openBlock(),createElementBlock("div",{key:5,class:"annoid",textContent:toDisplayString(F.annoid)},null,8,_hoisted_14$4)):createCommentVNode("",!0)])],512)],512))}}),_style_0$f=`.caption{display:flex;align-items:center;gap:1em;padding:.5em}.label{font-size:.9em;font-weight:450;line-height:1.1}.details .label{font-size:1.1em;font-weight:500;line-height:1.1}.clamp{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.summary{font-size:1em;font-weight:400;line-height:1.2}.photo-details,.attribution{font-size:.8em;font-weight:400}.details,.location{display:flex;flex-direction:column;gap:.5em;background-color:#fff;padding:.5em;box-shadow:#32325d40 0 6px 12px -2px,#0000004d 0 3px 7px -3px;border:1px solid #ccc;border-radius:3px;max-width:300px}sl-dropdown svg{width:1em;height:1em;cursor:pointer;fill:#a9a9a9}sl-dropdown svg:hover{fill:#333}.annoid{font-size:.8em;font-weight:400;color:#666} `,Caption=_export_sfc(_sfc_main$h,[["styles",[_style_0$f]]]),_hoisted_1$e=["innerHTML"],_hoisted_2$b=["innerHTML"],_sfc_main$g=defineComponent({__name:"InfoCard.ce",props:{data:{type:String},description:{type:String},dialogWidth:{type:String,default:"100vw"},image:{type:String},href:{type:String},label:{type:String}},setup(F){const W=F;function q(){}const K=ref(null),X=computed(()=>{var wo,lf;return(lf=(wo=K.value)==null?void 0:wo.getRootNode())==null?void 0:lf.host});computed(()=>{var wo;return(wo=K==null?void 0:K.value)==null?void 0:wo.parentNode});const tt=computed(()=>W.data?JSON.parse(W.data):{});computed(()=>tt.value.id);const rt=computed(()=>tt.value.label||W.label),ot=computed(()=>tt.value.description||W.description),ut=computed(()=>tt.value.image||W.image);computed(()=>tt.value.href||W.href);const yn=computed(()=>ut.value&&`url('${ut.value}')`),uo=computed(()=>{var wo;return`${((wo=X.value)==null?void 0:wo.clientWidth)*.33}px`});let po;const mo=ref(!1);return watch$1(mo,()=>{po.open=mo.value}),(wo,lf)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:K,id:"card",class:"card"},[createBaseVNode("div",{class:"label",innerHTML:rt.value},null,8,_hoisted_1$e),createBaseVNode("div",{class:"description",innerHTML:ot.value},null,8,_hoisted_2$b),createBaseVNode("div",{class:"image",style:normalizeStyle({backgroundImage:yn.value,width:uo.value}),onClick:q},null,4)],512))}}),_style_0$e=`*{box-sizing:border-box}:host{display:inline-block;width:100%}.card{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto auto 1fr auto;border-radius:6px;min-height:80px;max-height:100px;overflow-y:hidden;background-color:#fff;box-shadow:#32325d40 0 6px 12px -2px,#0000004d 0 3px 7px -3px}.label,.description,.summary,.links{margin:6px;font-size:1rem}.label{grid-area:1 / 1 / 2 / 2;font-size:130%;font-weight:700}.description{grid-area:2 / 1 / 3 / 2;font-size:110%;font-weight:400;height:100%}.summary{grid-area:3 / 1 / 4 / 2;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6;overflow:hidden;line-height:1.2rem;font-weight:300}.spacer{grid-area:4 / 1 / 5 / 2;height:100%}.links{grid-area:5 / 1 / 6 / 2}.image{grid-area:1 / 2 / 6 / 3;height:100%;max-height:100px;-o-object-fit:cover;object-fit:cover;background-repeat:no-repeat;background-size:cover;background-position:center}.logo img{height:24px;margin-right:12px;cursor:pointer}sl-dialog::part(panel){max-width:unset;max-height:unset;height:100dvh}sl-dialog::part(overlay){--sl-overlay-background-color: rgba(100, 100, 100, .8)}sl-dialog::part(footer){background-color:#64646480} -`,InfoCard=_export_sfc(_sfc_main$g,[["styles",[_style_0$e]]]),_hoisted_1$d=["active"],_hoisted_2$a=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},[createBaseVNode("path",{d:"M0 80C0 53.5 21.5 32 48 32h96c26.5 0 48 21.5 48 48V96H384V80c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H432c-26.5 0-48-21.5-48-48V160H192v16c0 1.7-.1 3.4-.3 5L272 288h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H272c-26.5 0-48-21.5-48-48V336c0-1.7 .1-3.4 .3-5L144 224H48c-26.5 0-48-21.5-48-48V80z"})],-1),_hoisted_3$a=[_hoisted_2$a],_hoisted_4$9=["active"],_hoisted_5$7=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"})],-1),_hoisted_6$6=[_hoisted_5$7],_hoisted_7$4=["active"],_hoisted_8$3=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},[createBaseVNode("path",{d:"M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"})],-1),_hoisted_9$4=[_hoisted_8$3],_hoisted_10$4=["active"],_hoisted_11$4=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},[createBaseVNode("path",{d:"M160 32c-35.3 0-64 28.7-64 64V320c0 35.3 28.7 64 64 64H512c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H160zM396 138.7l96 144c4.9 7.4 5.4 16.8 1.2 24.6S480.9 320 472 320H328 280 200c-9.2 0-17.6-5.3-21.6-13.6s-2.9-18.2 2.9-25.4l64-80c4.6-5.7 11.4-9 18.7-9s14.2 3.3 18.7 9l17.3 21.6 56-84C360.5 132 368 128 376 128s15.5 4 20 10.7zM192 128a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM48 120c0-13.3-10.7-24-24-24S0 106.7 0 120V344c0 75.1 60.9 136 136 136H456c13.3 0 24-10.7 24-24s-10.7-24-24-24H136c-48.6 0-88-39.4-88-88V120z"})],-1),_hoisted_12$4=[_hoisted_11$4],_hoisted_13$4={key:4,slot:"nav",panel:"timelinejs"},_hoisted_14$3=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M75 75L41 41C25.9 25.9 0 36.6 0 57.9V168c0 13.3 10.7 24 24 24H134.1c21.4 0 32.1-25.9 17-41l-30.8-30.8C155 85.5 203 64 256 64c106 0 192 86 192 192s-86 192-192 192c-40.8 0-78.6-12.7-109.7-34.4c-14.5-10.1-34.4-6.6-44.6 7.9s-6.6 34.4 7.9 44.6C151.2 495 201.7 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C185.3 0 121.3 28.7 75 75zm181 53c-13.3 0-24 10.7-24 24V256c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65V152c0-13.3-10.7-24-24-24z"})],-1),_hoisted_15$3=[_hoisted_14$3],_hoisted_16$3=["active"],_hoisted_17$3=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},[createBaseVNode("path",{d:"M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128zM559.1 99.8c10.4 5.6 16.9 16.4 16.9 28.2V384c0 11.8-6.5 22.6-16.9 28.2s-23 5-32.9-1.6l-96-64L416 337.1V320 192 174.9l14.2-9.5 96-64c9.8-6.5 22.4-7.2 32.9-1.6z"})],-1),_hoisted_18$3=[_hoisted_17$3],_hoisted_19$2=["active"],_hoisted_20$2=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M512 32c0 113.6-84.6 207.5-194.2 222c-7.1-53.4-30.6-101.6-65.3-139.3C290.8 46.3 364 0 448 0h32c17.7 0 32 14.3 32 32zM0 96C0 78.3 14.3 64 32 64H64c123.7 0 224 100.3 224 224v32V480c0 17.7-14.3 32-32 32s-32-14.3-32-32V320C100.3 320 0 219.7 0 96z"})],-1),_hoisted_21$2=[_hoisted_20$2],_hoisted_22$2=["active"],_hoisted_23$2=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512"},[createBaseVNode("path",{d:"M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z"})],-1),_hoisted_24$2=[_hoisted_23$2],_hoisted_25$2={key:8,slot:"nav",panel:"data"},_hoisted_26$2=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zm64 0v64h64V96H64zm384 0H192v64H448V96zM64 224v64h64V224H64zm384 0H192v64H448V224zM64 352v64h64V352H64zm384 0H192v64H448V352z"})],-1),_hoisted_27$2=[_hoisted_26$2],_hoisted_28$2=["caption","fit","height","zoom-on-scroll"],_hoisted_29$1=["textContent"],_hoisted_30$1={key:10,name:"map"},_hoisted_31$1=["entities","basemaps","caption","center","height","prefer-geojson","title","zoom"],_hoisted_32$1=["textContent"],_hoisted_33$1={key:11,name:"compare"},_hoisted_34$1=["height"],_hoisted_35$1=["textContent"],_hoisted_36$1=["source","height"],_hoisted_37$1=["src","height"],_hoisted_38$1=["allow","allowfullscreen","allowtransparency","caption","frameborder","height","name","referrerpolicy","src"],_hoisted_39$1=["height","eid","qid","jpid","wdid","taxonName","caption","max"],_hoisted_40$1=["height","url"],_hoisted_41$1={key:0},_hoisted_42$1=createBaseVNode("h1",null,"Params:",-1),_hoisted_43$1=["innerHTML"],_hoisted_44$1={key:1},_hoisted_45$1=createBaseVNode("h1",null,"Entities:",-1),_hoisted_46$1=["innerHTML"],_sfc_main$f=defineComponent({__name:"Juncture1Viewers.ce",props:{breakpoint:{type:Number,default:800},dataId:{type:String},entities:{type:String}},setup(F){const W=F,q=ref(null),K=computed(()=>{var Af,Bf;return(Bf=(Af=q.value)==null?void 0:Af.getRootNode())==null?void 0:Bf.host}),X=ref(null),tt=location.hostname==="localhost"?"dev":"prod",rt=computed(()=>yn.value>=W.breakpoint),ot=ref();watch$1(K,()=>Pf());function ut(){var Af,Bf,Hf;if(rt.value){let Df=(Af=K.value.parentElement)==null?void 0:Af.clientHeight,Lf=((Hf=(Bf=X.value)==null?void 0:Bf.querySelector("sl-tab"))==null?void 0:Hf.clientHeight)||36;uo.value=Df-Lf}else uo.value=void 0}const yn=ref(document.body.getBoundingClientRect().width);watch$1(yn,()=>{ut()}),onMounted(()=>{W.entities&&getEntityData(W.entities.split(" ")).then(Af=>ot.value=Af),ut(),new ResizeObserver(()=>{yn.value=document.body.getBoundingClientRect().width}).observe(document.body),new ResizeObserver(()=>{ut()}).observe(K.value.parentElement)});const uo=ref(),po=ref([]),mo=computed(()=>po.value.filter(Af=>Af["ve-compare"]!==void 0).map(Af=>toRaw(Af))),wo=computed(()=>po.value.filter(Af=>Af["ve-d3plus-ring-network"]||Af["ve-vis-network"]!==void 0).map(Af=>toRaw(Af))),lf=computed(()=>po.value.filter(Af=>Af["ve-iframe"]!==void 0).map(Af=>toRaw(Af))),yf=computed(()=>po.value.filter(Af=>Af["ve-image"]!==void 0).map(Af=>toRaw(Af))),cf=computed(()=>po.value.filter(Af=>Af["ve-map"]!==void 0).map(Af=>toRaw(Af))),vf=computed(()=>po.value.filter(Af=>Af["ve-map-layer"]!==void 0||Af["ve-map-marker"]!==void 0).map(Af=>toRaw(Af))),_f=computed(()=>po.value.filter(Af=>Af["ve-plant-specimen"]!==void 0).map(Af=>toRaw(Af))),$f=computed(()=>po.value.filter(Af=>Af["ve-knightlab-timeline"]!==void 0).map(Af=>toRaw(Af))),wf=computed(()=>po.value.filter(Af=>Af["ve-video"]!==void 0).map(Af=>toRaw(Af)));function Pf(){function Af(){po.value=Array.from(K.value.querySelectorAll("param")).map((Bf,Hf)=>({...Object.fromEntries(Array.from(Bf.attributes).map(Df=>[Df.name,Df.value])),idx:Hf}))}Af(),new MutationObserver(Bf=>{for(let Hf of Bf)Hf.type==="childList"&&Af()}).observe(K.value,{childList:!0,subtree:!0})}function Cf(Af){return Object.entries(Af).map(([Bf,Hf])=>`${Bf}="${Hf}"`).join(" ")}return(Af,Bf)=>{var Hf,Df;return openBlock(),createElementBlock("div",{ref_key:"root",ref:q,id:"main"},[createBaseVNode("sl-tab-group",{ref_key:"tabs",ref:X},[wo.value.length?(openBlock(),createElementBlock("sl-tab",{key:0,slot:"nav",panel:"diagrams",active:wo.value[0].idx===0},_hoisted_3$a,8,_hoisted_1$d)):createCommentVNode("",!0),yf.value.length?(openBlock(),createElementBlock("sl-tab",{key:1,slot:"nav",panel:"image",active:yf.value[0].idx===0},_hoisted_6$6,8,_hoisted_4$9)):createCommentVNode("",!0),cf.value.length?(openBlock(),createElementBlock("sl-tab",{key:2,slot:"nav",panel:"map",active:cf.value[0].idx===0},_hoisted_9$4,8,_hoisted_7$4)):createCommentVNode("",!0),mo.value.length?(openBlock(),createElementBlock("sl-tab",{key:3,slot:"nav",panel:"compare",active:mo.value[0].idx===0},_hoisted_12$4,8,_hoisted_10$4)):createCommentVNode("",!0),$f.value.length?(openBlock(),createElementBlock("sl-tab",_hoisted_13$4,_hoisted_15$3)):createCommentVNode("",!0),wf.value.length?(openBlock(),createElementBlock("sl-tab",{key:5,slot:"nav",panel:"videos",active:wf.value[0].idx===0},_hoisted_18$3,8,_hoisted_16$3)):createCommentVNode("",!0),_f.value.length?(openBlock(),createElementBlock("sl-tab",{key:6,slot:"nav",panel:"plantSpecimens",active:_f.value[0].idx===0},_hoisted_21$2,8,_hoisted_19$2)):createCommentVNode("",!0),lf.value.length?(openBlock(),createElementBlock("sl-tab",{key:7,slot:"nav",panel:"iframes",active:lf.value[0].idx===0},_hoisted_24$2,8,_hoisted_22$2)):createCommentVNode("",!0),unref(tt)==="dev"?(openBlock(),createElementBlock("sl-tab",_hoisted_25$2,_hoisted_27$2)):createCommentVNode("",!0),yf.value.length?(openBlock(),createElementBlock("sl-tab-panel",{key:9,name:"image",style:normalizeStyle(`height:${uo.value}px`)},[createBaseVNode("ve-image",{caption:(Hf=yf.value[0])==null?void 0:Hf.caption,fit:(Df=yf.value[0])==null?void 0:Df.fit,height:uo.value,"zoom-on-scroll":rt.value?"":null},[createBaseVNode("ul",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(yf.value,(Lf,kf)=>(openBlock(),createElementBlock("li",{key:`image-${kf}`,textContent:toDisplayString(Cf(Lf))},null,8,_hoisted_29$1))),128))])],8,_hoisted_28$2)],4)):createCommentVNode("",!0),cf.value.length?(openBlock(),createElementBlock("sl-tab-panel",_hoisted_30$1,[createBaseVNode("ve-map",{entities:W.entities,basemaps:cf.value[0].basemaps||cf.value[0].basemap,caption:cf.value[0].caption,center:cf.value[0].center,height:uo.value,"prefer-geojson":cf.value[0]["prefer-geojson"]===""?"":null,title:cf.value[0].title,zoom:cf.value[0].zoom},[createBaseVNode("ul",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(vf.value,(Lf,kf)=>(openBlock(),createElementBlock("li",{key:`map-layer-${kf}`,textContent:toDisplayString(Cf(Lf))},null,8,_hoisted_32$1))),128))])],8,_hoisted_31$1)])):createCommentVNode("",!0),mo.value.length?(openBlock(),createElementBlock("sl-tab-panel",_hoisted_33$1,[createBaseVNode("ve-compare",{height:uo.value},[createBaseVNode("ul",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(mo.value,(Lf,kf)=>(openBlock(),createElementBlock("li",{key:`compare-${kf}`,textContent:toDisplayString(Cf(Lf))},null,8,_hoisted_35$1))),128))])],8,_hoisted_34$1)])):createCommentVNode("",!0),$f.value.length?(openBlock(),createElementBlock("sl-tab-panel",{key:12,name:"timelinejs",style:normalizeStyle({height:`${uo.value}px`})},[createBaseVNode("ve-knightlab-timeline",{source:$f.value[0].source,height:uo.value},null,8,_hoisted_36$1)],4)):createCommentVNode("",!0),wf.value.length?(openBlock(),createElementBlock("sl-tab-panel",{key:13,name:"videos",style:normalizeStyle({height:`${uo.value}px`})},[createBaseVNode("ve-video",{src:`https://www.youtube.com/watch?v=${wf.value[0].id||wf.value[0].vid}`,height:uo.value},null,8,_hoisted_37$1)],4)):createCommentVNode("",!0),lf.value.length?(openBlock(),createElementBlock("sl-tab-panel",{key:14,name:"iframes",style:normalizeStyle({height:`${uo.value||500}px`})},[createBaseVNode("ve-iframe",{allow:lf.value[0].allow,allowfullscreen:lf.value[0].allowfullscreen,allowtransparency:lf.value[0].allowtransparency,caption:lf.value[0].caption,frameborder:lf.value[0].frameborder,height:uo.value,name:lf.value[0].name,referrerpolicy:lf.value[0].referrerpolicy,src:lf.value[0].src},null,8,_hoisted_38$1)],4)):createCommentVNode("",!0),_f.value.length?(openBlock(),createElementBlock("sl-tab-panel",{key:15,name:"plantSpecimens",style:normalizeStyle({height:`${uo.value}px`})},[createBaseVNode("ve-plant-specimen",{height:uo.value,eid:_f.value[0].eid,qid:_f.value[0].qid,jpid:_f.value[0].jpid,wdid:_f.value[0].wdid,taxonName:_f.value[0].taxonName,caption:_f.value[0].caption,max:_f.value[0].max},null,8,_hoisted_39$1)],4)):createCommentVNode("",!0),wo.value.length?(openBlock(),createElementBlock("sl-tab-panel",{key:16,name:"diagrams",style:normalizeStyle({height:`${uo.value}px`})},[createBaseVNode("ve-visjs",{height:uo.value,url:wo.value[0].url},null,8,_hoisted_40$1)],4)):createCommentVNode("",!0),createBaseVNode("sl-tab-panel",{name:"data",style:normalizeStyle({height:`${uo.value}px`,backgroundColor:"white",overflowY:"scroll"})},[po.value?(openBlock(),createElementBlock("div",_hoisted_41$1,[_hoisted_42$1,(openBlock(!0),createElementBlock(Fragment,null,renderList(po.value,(Lf,kf)=>(openBlock(),createElementBlock("pre",{key:`param-${kf}`,innerHTML:JSON.stringify(Lf,null,2)},null,8,_hoisted_43$1))),128))])):createCommentVNode("",!0),ot.value?(openBlock(),createElementBlock("div",_hoisted_44$1,[_hoisted_45$1,createBaseVNode("pre",null,toDisplayString(Object.keys(ot.value).join(" ")),1),(openBlock(!0),createElementBlock(Fragment,null,renderList(ot.value,(Lf,kf)=>(openBlock(),createElementBlock("pre",{key:kf,innerHTML:JSON.stringify(Lf,null,2)},null,8,_hoisted_46$1))),128))])):createCommentVNode("",!0)],4)],512)],512)}}}),_style_0$d=`:host{display:block;height:100%;border:1px solid red}#main{background-color:#000}sl-tab-group::part(tabs){background-color:#ddd}sl-tab-panel::part(base){padding:0}sl-tab::part(base){padding:.5em}h1{font-size:1em}svg{width:20px;height:20px}pre{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;overflow-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto} +`,InfoCard=_export_sfc(_sfc_main$g,[["styles",[_style_0$e]]]),_hoisted_1$d=["active"],_hoisted_2$a=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},[createBaseVNode("path",{d:"M0 80C0 53.5 21.5 32 48 32h96c26.5 0 48 21.5 48 48V96H384V80c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H432c-26.5 0-48-21.5-48-48V160H192v16c0 1.7-.1 3.4-.3 5L272 288h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H272c-26.5 0-48-21.5-48-48V336c0-1.7 .1-3.4 .3-5L144 224H48c-26.5 0-48-21.5-48-48V80z"})],-1),_hoisted_3$a=[_hoisted_2$a],_hoisted_4$9=["active"],_hoisted_5$7=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"})],-1),_hoisted_6$6=[_hoisted_5$7],_hoisted_7$4=["active"],_hoisted_8$3=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},[createBaseVNode("path",{d:"M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"})],-1),_hoisted_9$4=[_hoisted_8$3],_hoisted_10$4=["active"],_hoisted_11$4=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},[createBaseVNode("path",{d:"M160 32c-35.3 0-64 28.7-64 64V320c0 35.3 28.7 64 64 64H512c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H160zM396 138.7l96 144c4.9 7.4 5.4 16.8 1.2 24.6S480.9 320 472 320H328 280 200c-9.2 0-17.6-5.3-21.6-13.6s-2.9-18.2 2.9-25.4l64-80c4.6-5.7 11.4-9 18.7-9s14.2 3.3 18.7 9l17.3 21.6 56-84C360.5 132 368 128 376 128s15.5 4 20 10.7zM192 128a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM48 120c0-13.3-10.7-24-24-24S0 106.7 0 120V344c0 75.1 60.9 136 136 136H456c13.3 0 24-10.7 24-24s-10.7-24-24-24H136c-48.6 0-88-39.4-88-88V120z"})],-1),_hoisted_12$4=[_hoisted_11$4],_hoisted_13$4={key:4,slot:"nav",panel:"timelinejs"},_hoisted_14$3=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M75 75L41 41C25.9 25.9 0 36.6 0 57.9V168c0 13.3 10.7 24 24 24H134.1c21.4 0 32.1-25.9 17-41l-30.8-30.8C155 85.5 203 64 256 64c106 0 192 86 192 192s-86 192-192 192c-40.8 0-78.6-12.7-109.7-34.4c-14.5-10.1-34.4-6.6-44.6 7.9s-6.6 34.4 7.9 44.6C151.2 495 201.7 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C185.3 0 121.3 28.7 75 75zm181 53c-13.3 0-24 10.7-24 24V256c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65V152c0-13.3-10.7-24-24-24z"})],-1),_hoisted_15$3=[_hoisted_14$3],_hoisted_16$3=["active"],_hoisted_17$3=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},[createBaseVNode("path",{d:"M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128zM559.1 99.8c10.4 5.6 16.9 16.4 16.9 28.2V384c0 11.8-6.5 22.6-16.9 28.2s-23 5-32.9-1.6l-96-64L416 337.1V320 192 174.9l14.2-9.5 96-64c9.8-6.5 22.4-7.2 32.9-1.6z"})],-1),_hoisted_18$3=[_hoisted_17$3],_hoisted_19$2=["active"],_hoisted_20$2=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M512 32c0 113.6-84.6 207.5-194.2 222c-7.1-53.4-30.6-101.6-65.3-139.3C290.8 46.3 364 0 448 0h32c17.7 0 32 14.3 32 32zM0 96C0 78.3 14.3 64 32 64H64c123.7 0 224 100.3 224 224v32V480c0 17.7-14.3 32-32 32s-32-14.3-32-32V320C100.3 320 0 219.7 0 96z"})],-1),_hoisted_21$2=[_hoisted_20$2],_hoisted_22$2=["active"],_hoisted_23$2=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512"},[createBaseVNode("path",{d:"M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z"})],-1),_hoisted_24$2=[_hoisted_23$2],_hoisted_25$2={key:8,slot:"nav",panel:"data"},_hoisted_26$2=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[createBaseVNode("path",{d:"M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zm64 0v64h64V96H64zm384 0H192v64H448V96zM64 224v64h64V224H64zm384 0H192v64H448V224zM64 352v64h64V352H64zm384 0H192v64H448V352z"})],-1),_hoisted_27$2=[_hoisted_26$2],_hoisted_28$2=["caption","fit","height","zoom-on-scroll"],_hoisted_29$1=["textContent"],_hoisted_30$1={key:10,name:"map"},_hoisted_31$1=["entities","basemaps","caption","center","height","prefer-geojson","title","zoom"],_hoisted_32$1=["textContent"],_hoisted_33$1={key:11,name:"compare"},_hoisted_34$1=["height"],_hoisted_35$1=["textContent"],_hoisted_36$1=["source","height"],_hoisted_37$1=["src","height"],_hoisted_38$1=["allow","allowfullscreen","allowtransparency","caption","frameborder","height","name","referrerpolicy","src"],_hoisted_39$1=["height","eid","qid","jpid","wdid","taxonName","caption","max"],_hoisted_40$1=["height","url"],_hoisted_41$1={key:0},_hoisted_42$1=createBaseVNode("h1",null,"Params:",-1),_hoisted_43$1=["innerHTML"],_hoisted_44$1={key:1},_hoisted_45$1=createBaseVNode("h1",null,"Entities:",-1),_hoisted_46$1=["innerHTML"],_sfc_main$f=defineComponent({__name:"Juncture1Viewers.ce",props:{breakpoint:{type:Number,default:800},dataId:{type:String},entities:{type:String}},setup(F){const W=F,q=ref(null),K=computed(()=>{var Pf,Bf;return(Bf=(Pf=q.value)==null?void 0:Pf.getRootNode())==null?void 0:Bf.host}),X=ref(null),tt=location.hostname==="localhost"?"dev":"prod",rt=computed(()=>yn.value>=W.breakpoint),ot=ref();watch$1(K,()=>Af());function ut(){var Pf,Bf,Hf;if(rt.value){let Df=(Pf=K.value.parentElement)==null?void 0:Pf.clientHeight,Lf=((Hf=(Bf=X.value)==null?void 0:Bf.querySelector("sl-tab"))==null?void 0:Hf.clientHeight)||36;uo.value=Df-Lf}else uo.value=void 0}const yn=ref(document.body.getBoundingClientRect().width);watch$1(yn,()=>{ut()}),onMounted(()=>{W.entities&&getEntityData(W.entities.split(" ")).then(Pf=>ot.value=Pf),ut(),new ResizeObserver(()=>{yn.value=document.body.getBoundingClientRect().width}).observe(document.body),new ResizeObserver(()=>{ut()}).observe(K.value.parentElement)});const uo=ref(),po=ref([]),mo=computed(()=>po.value.filter(Pf=>Pf["ve-compare"]!==void 0).map(Pf=>toRaw(Pf))),wo=computed(()=>po.value.filter(Pf=>Pf["ve-d3plus-ring-network"]||Pf["ve-vis-network"]!==void 0).map(Pf=>toRaw(Pf))),lf=computed(()=>po.value.filter(Pf=>Pf["ve-iframe"]!==void 0).map(Pf=>toRaw(Pf))),yf=computed(()=>po.value.filter(Pf=>Pf["ve-image"]!==void 0).map(Pf=>toRaw(Pf))),cf=computed(()=>po.value.filter(Pf=>Pf["ve-map"]!==void 0).map(Pf=>toRaw(Pf))),vf=computed(()=>po.value.filter(Pf=>Pf["ve-map-layer"]!==void 0||Pf["ve-map-marker"]!==void 0).map(Pf=>toRaw(Pf))),_f=computed(()=>po.value.filter(Pf=>Pf["ve-plant-specimen"]!==void 0).map(Pf=>toRaw(Pf))),$f=computed(()=>po.value.filter(Pf=>Pf["ve-knightlab-timeline"]!==void 0).map(Pf=>toRaw(Pf))),xf=computed(()=>po.value.filter(Pf=>Pf["ve-video"]!==void 0).map(Pf=>toRaw(Pf)));function Af(){function Pf(){po.value=Array.from(K.value.querySelectorAll("param")).map((Bf,Hf)=>({...Object.fromEntries(Array.from(Bf.attributes).map(Df=>[Df.name,Df.value])),idx:Hf}))}Pf(),new MutationObserver(Bf=>{for(let Hf of Bf)Hf.type==="childList"&&Pf()}).observe(K.value,{childList:!0,subtree:!0})}function Cf(Pf){return Object.entries(Pf).map(([Bf,Hf])=>`${Bf}="${Hf}"`).join(" ")}return(Pf,Bf)=>{var Hf,Df;return openBlock(),createElementBlock("div",{ref_key:"root",ref:q,id:"main"},[createBaseVNode("sl-tab-group",{ref_key:"tabs",ref:X},[wo.value.length?(openBlock(),createElementBlock("sl-tab",{key:0,slot:"nav",panel:"diagrams",active:wo.value[0].idx===0},_hoisted_3$a,8,_hoisted_1$d)):createCommentVNode("",!0),yf.value.length?(openBlock(),createElementBlock("sl-tab",{key:1,slot:"nav",panel:"image",active:yf.value[0].idx===0},_hoisted_6$6,8,_hoisted_4$9)):createCommentVNode("",!0),cf.value.length?(openBlock(),createElementBlock("sl-tab",{key:2,slot:"nav",panel:"map",active:cf.value[0].idx===0},_hoisted_9$4,8,_hoisted_7$4)):createCommentVNode("",!0),mo.value.length?(openBlock(),createElementBlock("sl-tab",{key:3,slot:"nav",panel:"compare",active:mo.value[0].idx===0},_hoisted_12$4,8,_hoisted_10$4)):createCommentVNode("",!0),$f.value.length?(openBlock(),createElementBlock("sl-tab",_hoisted_13$4,_hoisted_15$3)):createCommentVNode("",!0),xf.value.length?(openBlock(),createElementBlock("sl-tab",{key:5,slot:"nav",panel:"videos",active:xf.value[0].idx===0},_hoisted_18$3,8,_hoisted_16$3)):createCommentVNode("",!0),_f.value.length?(openBlock(),createElementBlock("sl-tab",{key:6,slot:"nav",panel:"plantSpecimens",active:_f.value[0].idx===0},_hoisted_21$2,8,_hoisted_19$2)):createCommentVNode("",!0),lf.value.length?(openBlock(),createElementBlock("sl-tab",{key:7,slot:"nav",panel:"iframes",active:lf.value[0].idx===0},_hoisted_24$2,8,_hoisted_22$2)):createCommentVNode("",!0),unref(tt)==="dev"?(openBlock(),createElementBlock("sl-tab",_hoisted_25$2,_hoisted_27$2)):createCommentVNode("",!0),yf.value.length?(openBlock(),createElementBlock("sl-tab-panel",{key:9,name:"image",style:normalizeStyle(`height:${uo.value}px`)},[createBaseVNode("ve-image",{caption:(Hf=yf.value[0])==null?void 0:Hf.caption,fit:(Df=yf.value[0])==null?void 0:Df.fit,height:uo.value,"zoom-on-scroll":rt.value?"":null},[createBaseVNode("ul",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(yf.value,(Lf,kf)=>(openBlock(),createElementBlock("li",{key:`image-${kf}`,textContent:toDisplayString(Cf(Lf))},null,8,_hoisted_29$1))),128))])],8,_hoisted_28$2)],4)):createCommentVNode("",!0),cf.value.length?(openBlock(),createElementBlock("sl-tab-panel",_hoisted_30$1,[createBaseVNode("ve-map",{entities:W.entities,basemaps:cf.value[0].basemaps||cf.value[0].basemap,caption:cf.value[0].caption,center:cf.value[0].center,height:uo.value,"prefer-geojson":cf.value[0]["prefer-geojson"]===""?"":null,title:cf.value[0].title,zoom:cf.value[0].zoom},[createBaseVNode("ul",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(vf.value,(Lf,kf)=>(openBlock(),createElementBlock("li",{key:`map-layer-${kf}`,textContent:toDisplayString(Cf(Lf))},null,8,_hoisted_32$1))),128))])],8,_hoisted_31$1)])):createCommentVNode("",!0),mo.value.length?(openBlock(),createElementBlock("sl-tab-panel",_hoisted_33$1,[createBaseVNode("ve-compare",{height:uo.value},[createBaseVNode("ul",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(mo.value,(Lf,kf)=>(openBlock(),createElementBlock("li",{key:`compare-${kf}`,textContent:toDisplayString(Cf(Lf))},null,8,_hoisted_35$1))),128))])],8,_hoisted_34$1)])):createCommentVNode("",!0),$f.value.length?(openBlock(),createElementBlock("sl-tab-panel",{key:12,name:"timelinejs",style:normalizeStyle({height:`${uo.value}px`})},[createBaseVNode("ve-knightlab-timeline",{source:$f.value[0].source,height:uo.value},null,8,_hoisted_36$1)],4)):createCommentVNode("",!0),xf.value.length?(openBlock(),createElementBlock("sl-tab-panel",{key:13,name:"videos",style:normalizeStyle({height:`${uo.value}px`})},[createBaseVNode("ve-video",{src:`https://www.youtube.com/watch?v=${xf.value[0].id||xf.value[0].vid}`,height:uo.value},null,8,_hoisted_37$1)],4)):createCommentVNode("",!0),lf.value.length?(openBlock(),createElementBlock("sl-tab-panel",{key:14,name:"iframes",style:normalizeStyle({height:`${uo.value||500}px`})},[createBaseVNode("ve-iframe",{allow:lf.value[0].allow,allowfullscreen:lf.value[0].allowfullscreen,allowtransparency:lf.value[0].allowtransparency,caption:lf.value[0].caption,frameborder:lf.value[0].frameborder,height:uo.value,name:lf.value[0].name,referrerpolicy:lf.value[0].referrerpolicy,src:lf.value[0].src},null,8,_hoisted_38$1)],4)):createCommentVNode("",!0),_f.value.length?(openBlock(),createElementBlock("sl-tab-panel",{key:15,name:"plantSpecimens",style:normalizeStyle({height:`${uo.value}px`})},[createBaseVNode("ve-plant-specimen",{height:uo.value,eid:_f.value[0].eid,qid:_f.value[0].qid,jpid:_f.value[0].jpid,wdid:_f.value[0].wdid,taxonName:_f.value[0].taxonName,caption:_f.value[0].caption,max:_f.value[0].max},null,8,_hoisted_39$1)],4)):createCommentVNode("",!0),wo.value.length?(openBlock(),createElementBlock("sl-tab-panel",{key:16,name:"diagrams",style:normalizeStyle({height:`${uo.value}px`})},[createBaseVNode("ve-visjs",{height:uo.value,url:wo.value[0].url},null,8,_hoisted_40$1)],4)):createCommentVNode("",!0),createBaseVNode("sl-tab-panel",{name:"data",style:normalizeStyle({height:`${uo.value}px`,backgroundColor:"white",overflowY:"scroll"})},[po.value?(openBlock(),createElementBlock("div",_hoisted_41$1,[_hoisted_42$1,(openBlock(!0),createElementBlock(Fragment,null,renderList(po.value,(Lf,kf)=>(openBlock(),createElementBlock("pre",{key:`param-${kf}`,innerHTML:JSON.stringify(Lf,null,2)},null,8,_hoisted_43$1))),128))])):createCommentVNode("",!0),ot.value?(openBlock(),createElementBlock("div",_hoisted_44$1,[_hoisted_45$1,createBaseVNode("pre",null,toDisplayString(Object.keys(ot.value).join(" ")),1),(openBlock(!0),createElementBlock(Fragment,null,renderList(ot.value,(Lf,kf)=>(openBlock(),createElementBlock("pre",{key:kf,innerHTML:JSON.stringify(Lf,null,2)},null,8,_hoisted_46$1))),128))])):createCommentVNode("",!0)],4)],512)],512)}}}),_style_0$d=`:host{display:block;height:100%;border:1px solid red}#main{background-color:#000}sl-tab-group::part(tabs){background-color:#ddd}sl-tab-panel::part(base){padding:0}sl-tab::part(base){padding:.5em}h1{font-size:1em}svg{width:20px;height:20px}pre{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;overflow-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto} `,Juncture1Viewers=_export_sfc(_sfc_main$f,[["styles",[_style_0$d]]]),_hoisted_1$c=["panel","active"],_hoisted_2$9=["innerHTML"],_hoisted_3$9=["name"],_sfc_main$e=defineComponent({__name:"Juncture1ViewersSlots.ce",props:{viewers:{type:String}},setup(F){var rt;const W=F,q=ref(null),K=computed(()=>{var ot,ut;return(ut=(ot=q.value)==null?void 0:ot.getRootNode())==null?void 0:ut.host});watch$1(K,ot=>{ot&&new ResizeObserver(()=>{Array.from(ot.children).forEach(ut=>{document.body.clientWidth>800&&ut.setAttribute("height",`${ot.clientHeight-64}`)})}).observe(ot.parentElement)});const X=ref((rt=W.viewers)==null?void 0:rt.split(" ")),tt={"ve-compare":'',"ve-iframe":'',"ve-image":'',"ve-gallery":'',"ve-knightlab-timeline":'',"ve-map":'',"ve-video":'',"ve-plant-specimen":'',"ve-visjs":'',data:''};return onMounted(()=>{new MutationObserver(ot=>{for(let ut of ot)if(ut.type==="attributes"&&ut.attributeName==="class"){let yn=ut.target.classList.contains("active");Array.from(K.value.children).forEach(uo=>{yn?uo.setAttribute("active",""):uo.removeAttribute("active")})}}).observe(K.value.parentElement,{attributes:!0})}),(ot,ut)=>(openBlock(),createElementBlock("sl-tab-group",{ref_key:"tabs",ref:q},[(openBlock(!0),createElementBlock(Fragment,null,renderList(X.value,(yn,uo)=>(openBlock(),createElementBlock("sl-tab",{key:`nav-${uo}`,slot:"nav",panel:yn,active:uo===0},[(openBlock(),createElementBlock("svg",{innerHTML:tt[yn]},null,8,_hoisted_2$9))],8,_hoisted_1$c))),128)),(openBlock(!0),createElementBlock(Fragment,null,renderList(X.value,(yn,uo)=>(openBlock(),createElementBlock("sl-tab-panel",{key:`panel-${uo}`,name:yn},[renderSlot(ot.$slots,yn)],8,_hoisted_3$9))),128))],512))}}),_style_0$c=`:host{display:block;height:100%;background-color:#fff}svg{width:20px;height:20px} `,Juncture1ViewersSlots=_export_sfc(_sfc_main$e,[["styles",[_style_0$c]]]),_hoisted_1$b=["src"],_sfc_main$d=defineComponent({__name:"KnightlabTimeline.ce",props:{hashBookmark:{type:Boolean,default:!1},initialZoom:{type:Number,default:1},height:{type:Number,default:650},source:{type:String},timenavPosition:{type:String,default:"bottom"}},setup(F){const W=F;watch$1(W,()=>{rt()});const q=ref(null),K=computed(()=>{var ot,ut;return(ut=(ot=q.value)==null?void 0:ot.getRootNode())==null?void 0:ut.host}),X=ref(0);watch$1(X,()=>rt()),watch$1(K,ot=>{ot.parentElement.clientHeight?X.value=ot.parentElement.clientHeight:new ResizeObserver(()=>X.value=ot.parentElement.clientHeight).observe(ot.parentElement)});const tt=ref(0);function rt(){tt.value=W.height<=X.value?W.height:X.value}return(ot,ut)=>(openBlock(),createElementBlock("div",{class:"main",ref_key:"main",ref:q,style:normalizeStyle({height:`${tt.value}px`})},[createBaseVNode("iframe",{src:`https://cdn.knightlab.com/libs/timeline3/latest/embed/index.html?source=${F.source}&font=Default&lang=en&timenav_position=${F.timenavPosition}&hash_bookmark=${F.hashBookmark}&initial_zoom=${F.initialZoom}&height=${tt.value}`,width:"100%",height:"100%",webkitallowfullscreen:"",mozallowfullscreen:"",allowfullscreen:"",frameborder:"0"},` `,8,_hoisted_1$b)],4))}}),_style_0$b=`.main{display:flex} -`,KnightlabTimeline=_export_sfc(_sfc_main$d,[["styles",[_style_0$b]]]),_withScopeId=F=>(pushScopeId("data-v-65e736fe"),F=F(),popScopeId(),F),_hoisted_1$a={class:"main"},_hoisted_2$8=["src"],_hoisted_3$8=["innerHTML"],_hoisted_4$8=["innerHTML"],_hoisted_5$6=["href","innerHTML"],_hoisted_6$5={class:"links"},_hoisted_7$3={class:"detail"},_hoisted_8$2={key:0,class:"provider"},_hoisted_9$3=_withScopeId(()=>createBaseVNode("span",{class:"label"},"provider",-1)),_hoisted_10$3={key:0,style:{display:"flex","align-items":"center"}},_hoisted_11$3=["src"],_hoisted_12$3=["href","innerHTML"],_hoisted_13$3={key:1},_hoisted_14$2=["src"],_hoisted_15$2=["href","innerHTML"],_hoisted_16$2={key:1,class:"requiredStatement"},_hoisted_17$2=["innerHTML"],_hoisted_18$2={key:2,class:"rights"},_hoisted_19$1=_withScopeId(()=>createBaseVNode("span",{class:"label"},"Reuse rights",-1)),_hoisted_20$1=["href","innerHTML"],_hoisted_21$1={key:3,class:"metadata"},_hoisted_22$1=_withScopeId(()=>createBaseVNode("span",{class:"label"},"metadata",-1)),_hoisted_23$1=["innerHTML"],_hoisted_24$1=["innerHTML"],_hoisted_25$1={key:1},_hoisted_26$1=["innerHTML"],_hoisted_27$1={key:4,class:"navDate"},_hoisted_28$1=_withScopeId(()=>createBaseVNode("span",{class:"label"},"navDate",-1)),_hoisted_29=["innerHTML"],_hoisted_30={key:5,class:"homepage"},_hoisted_31=_withScopeId(()=>createBaseVNode("span",{class:"label"},"homepage",-1)),_hoisted_32=["href","innerHTML"],_hoisted_33={key:6,class:"seeAlso"},_hoisted_34=_withScopeId(()=>createBaseVNode("span",{class:"label"},"seeAlso",-1)),_hoisted_35=["href","innerHTML"],_hoisted_36={key:7,class:"logo"},_hoisted_37=_withScopeId(()=>createBaseVNode("span",{class:"label"},"logo",-1)),_hoisted_38=["href","innerHTML"],_hoisted_39={key:8,class:"imageData"},_hoisted_40=_withScopeId(()=>createBaseVNode("span",{class:"label"},"source",-1)),_hoisted_41=["href","innerHTML"],_hoisted_42=_withScopeId(()=>createBaseVNode("span",{class:"label"},"format",-1)),_hoisted_43=["innerHTML"],_hoisted_44=_withScopeId(()=>createBaseVNode("span",{class:"label"},"width",-1)),_hoisted_45=["innerHTML"],_hoisted_46=_withScopeId(()=>createBaseVNode("span",{class:"label"},"height",-1)),_hoisted_47=["innerHTML"],_sfc_main$c=defineComponent({__name:"Manifest.ce",props:{manifest:{type:Object,required:!0}},setup(F){const W=F;watch$1(W,()=>K.value=W.manifest);const q=ref(null),K=ref(null),X=ref(null);watch$1(K,()=>X.value=ut(K.value));const tt=computed(()=>X.value&&uo(X.value));onMounted(()=>rt());function rt(){typeof W.manifest=="object"?K.value=W.manifest:getManifest(W.manifest).then(po=>K.value=po)}function ot(po,mo="en"){return typeof po=="object"&&!Array.isArray(po)?po[mo]||po.none||po[Object.keys(po).sort()[0]]:po}function ut(po){let mo={};if(mo.id=ot(po.id),mo.label=ot(po.label),po.summary&&(mo.summary=ot(po.summary)),po.rights&&(mo.rights=po.rights),po.thumbnail&&(mo.thumbnail=po.thumbnail[0].id||po.thumbnail),po.metadata){mo.metadata=po.metadata.map(yf=>({label:ot(yf.label)[0],value:ot(yf.value)}));let wo=mo.metadata.find(yf=>yf.label=="source_url");mo.sourceUrl=wo?wo.value[0]:null;let lf=mo.metadata.find(yf=>yf.label==="depicts");lf&&(mo.depicts=lf.value)}if(po.provider&&(mo.provider=po.provider.map(wo=>{let lf={label:ot(wo.label),href:wo.id};return wo.logo&&(lf.logo={src:wo.logo[0].id}),lf})),po.logo&&(mo.logo=po.logo.map(wo=>{let lf={src:typeof wo=="object"?wo.id||wo["@id"]:wo};return typeof wo=="object"&&(wo.width&&(lf.width=wo.width),wo.height&&(lf.height=wo.height)),lf})),mo.imageData=getItemInfo(po),mo.service=mo.imageData.service&&`${(mo.imageData.service[0].id||mo.imageData.service[0]["@id"]).replace(/\/info\.json$/,"")}/info.json`,po.requiredStatement){let wo=po.requiredStatement;mo.requiredStatement={label:ot(wo.label),value:ot(wo.value)}}return po.homepage&&(mo.homepage={label:po.homepage.label?ot(po.homepage.label):po.homepage.id,href:po.homepage.id}),po.seeAlso&&(mo.seeAlso=po.seeAlso.map(wo=>({label:wo.label?ot(wo.label):wo.id,href:wo.id}))),mo}function yn(po){navigator.clipboard&&navigator.clipboard.writeText(po)}function uo(po){let mo={cc:{badgeWidth:88,badgeHeight:31,badgeTemplate:'https://licensebuttons.net/l/${this.rightsCode}${this.rightsCode === "publicdomain" ? "" : "/"+this.version}/${this.badgeWidth}x${this.badgeHeight}.png'},rs:{badgeTemplate:"https://rightsstatements.org/files/buttons/${this.rightsCode}.white.svg",backgroundColor:"318ac7"}};const wo=function(wf,Pf){return new Function("return `"+wf+"`;").call(Pf)};let lf=po.rights||"",yf="",[cf,vf,_f,$f]=lf.split("/").slice(2);return cf==="creativecommons.org"?(_f=_f==="zero"?"publicdomain":_f,yf=``):cf==="rightsstatements.org"&&(yf=`

`),yf}return(po,mo)=>{var wo,lf,yf,cf,vf,_f,$f,wf,Pf,Cf,Af,Bf,Hf,Df,Lf;return openBlock(),createElementBlock("div",{ref_key:"root",ref:q,class:"manifest"},[createBaseVNode("div",_hoisted_1$a,[createBaseVNode("img",{class:"thumbnail",src:(wo=X.value)==null?void 0:wo.thumbnail},null,8,_hoisted_2$8),createBaseVNode("div",{class:"label",innerHTML:(lf=X.value)==null?void 0:lf.label},null,8,_hoisted_3$8),(yf=X.value)!=null&&yf.summary?(openBlock(),createElementBlock("div",{key:0,class:"summary",innerHTML:(cf=X.value)==null?void 0:cf.summary},null,8,_hoisted_4$8)):createCommentVNode("",!0),(vf=X.value)!=null&&vf.rights?(openBlock(),createElementBlock("a",{key:1,href:(_f=X.value)==null?void 0:_f.rights,innerHTML:tt.value},null,8,_hoisted_5$6)):createCommentVNode("",!0),createBaseVNode("div",_hoisted_6$5,[createBaseVNode("img",{src:"https://v3.juncture-digital.org/images/iiif.png",class:"iiif",alt:"IIIF manifest icon",onClick:mo[0]||(mo[0]=kf=>yn(K.value.id))})])]),createBaseVNode("div",_hoisted_7$3,[($f=X.value)!=null&&$f.provider?(openBlock(),createElementBlock("div",_hoisted_8$2,[_hoisted_9$3,X.value.provider.length===1?(openBlock(),createElementBlock("div",_hoisted_10$3,[X.value.provider[0].logo?(openBlock(),createElementBlock("img",{key:0,class:"logo",src:X.value.provider[0].logo.src},null,8,_hoisted_11$3)):createCommentVNode("",!0),createBaseVNode("a",{class:"value",href:X.value.provider[0].href,innerHTML:X.value.provider[0].label},null,8,_hoisted_12$3)])):(openBlock(),createElementBlock("ul",_hoisted_13$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(X.value.provider,(kf,Nf)=>(openBlock(),createElementBlock("li",{key:`provider-${Nf}`},[kf.logo?(openBlock(),createElementBlock("img",{key:0,class:"logo",src:kf.logo.src},null,8,_hoisted_14$2)):createCommentVNode("",!0),createBaseVNode("a",{class:"value",href:kf.href,innerHTML:kf.label},null,8,_hoisted_15$2)]))),128))]))])):createCommentVNode("",!0),(wf=X.value)!=null&&wf.requiredStatement?(openBlock(),createElementBlock("div",_hoisted_16$2,[createBaseVNode("span",{class:"value",innerHTML:X.value.requiredStatement.value},null,8,_hoisted_17$2)])):createCommentVNode("",!0),(Pf=X.value)!=null&&Pf.rights?(openBlock(),createElementBlock("div",_hoisted_18$2,[_hoisted_19$1,createBaseVNode("a",{class:"value",href:X.value.rights,innerHTML:X.value.rights},null,8,_hoisted_20$1)])):createCommentVNode("",!0),(Cf=X.value)!=null&&Cf.metadata?(openBlock(),createElementBlock("div",_hoisted_21$1,[_hoisted_22$1,createBaseVNode("ul",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(X.value.metadata,(kf,Nf)=>(openBlock(),createElementBlock("li",{key:`md-${Nf}`},[createBaseVNode("span",{class:"label",innerHTML:kf.label},null,8,_hoisted_23$1),kf.value.length===1?(openBlock(),createElementBlock("span",{key:0,class:"value",innerHTML:kf.value[0]},null,8,_hoisted_24$1)):(openBlock(),createElementBlock("ul",_hoisted_25$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(kf.value,Yf=>(openBlock(),createElementBlock("li",{class:"value",innerHTML:Yf},null,8,_hoisted_26$1))),256))]))]))),128))])])):createCommentVNode("",!0),(Af=X.value)!=null&&Af.navDate?(openBlock(),createElementBlock("div",_hoisted_27$1,[_hoisted_28$1,createBaseVNode("span",{class:"value",innerHTML:X.value.navDate},null,8,_hoisted_29)])):createCommentVNode("",!0),(Bf=X.value)!=null&&Bf.homepage?(openBlock(),createElementBlock("div",_hoisted_30,[_hoisted_31,createBaseVNode("a",{class:"value",href:X.value.homepage.href,innerHTML:X.value.homepage.label},null,8,_hoisted_32)])):createCommentVNode("",!0),(Hf=X.value)!=null&&Hf.seeAlso?(openBlock(),createElementBlock("div",_hoisted_33,[_hoisted_34,createBaseVNode("a",{class:"value",href:X.value.seeAlso[0].href,innerHTML:X.value.seeAlso[0].label},null,8,_hoisted_35)])):createCommentVNode("",!0),(Df=X.value)!=null&&Df.logo?(openBlock(),createElementBlock("div",_hoisted_36,[_hoisted_37,createBaseVNode("a",{class:"value",href:X.value.logo[0].src,innerHTML:X.value.logo[0].src},null,8,_hoisted_38)])):createCommentVNode("",!0),(Lf=X.value)!=null&&Lf.imageData?(openBlock(),createElementBlock("div",_hoisted_39,[createBaseVNode("div",null,[_hoisted_40,createBaseVNode("a",{class:"value",href:X.value.imageData.id,innerHTML:X.value.imageData.id.split("/").pop()},null,8,_hoisted_41)]),createBaseVNode("div",null,[_hoisted_42,createBaseVNode("span",{class:"value",innerHTML:X.value.imageData.format},null,8,_hoisted_43)]),createBaseVNode("div",null,[_hoisted_44,createBaseVNode("span",{class:"value",innerHTML:X.value.imageData.width},null,8,_hoisted_45)]),createBaseVNode("div",null,[_hoisted_46,createBaseVNode("span",{class:"value",innerHTML:X.value.imageData.height},null,8,_hoisted_47)])])):createCommentVNode("",!0)])],512)}}}),_style_0$a=`*[data-v-65e736fe]{box-sizing:border-box}.manifest[data-v-65e736fe]{width:100%;height:100%;overflow-y:scroll;background-color:#fff;font-size:.8em}.main[data-v-65e736fe],.detail[data-v-65e736fe]{display:flow-root;margin:6px}.main>*[data-v-65e736fe]{margin-bottom:6px}.detail>div[data-v-65e736fe]{margin-top:12px}.main .label[data-v-65e736fe]{font-size:1.2em;font-weight:700}.thumbnail[data-v-65e736fe]{float:left;max-width:45%;max-height:200px;margin:0 6px 6px 0}.links[data-v-65e736fe]{margin-top:6px}img.iiif[data-v-65e736fe]{height:24px;cursor:copy}ul[data-v-65e736fe]{list-style:none;padding-left:12px;margin-top:0}.detail .label[data-v-65e736fe]{font-size:1.1em;font-weight:700;min-width:80px;margin-right:6px}.detail .label[data-v-65e736fe]:after{content:":"}.detail .value[data-v-65e736fe],.main .label[data-v-65e736fe]{white-space:pre-wrap;overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}.logo[data-v-65e736fe]{padding-right:6px}img.logo[data-v-65e736fe]{height:40px}.manifest-id[data-v-65e736fe],.manifest-label[data-v-65e736fe],.summary[data-v-65e736fe],.provider[data-v-65e736fe],.rights[data-v-65e736fe],.service[data-v-65e736fe],.imageData div[data-v-65e736fe],.thumbnail[data-v-65e736fe]{display:flex;align-items:flex-start}.metadata>ul[data-v-65e736fe],.requiredStatement ul[data-v-65e736fe]{padding-left:24px}.metadata ul li[data-v-65e736fe],.requiredStatement ul li[data-v-65e736fe]{display:flex}.metadata ul ul[data-v-65e736fe]{padding-left:0}a[data-v-65e736fe]:link,a[data-v-65e736fe]:visited{color:#00e} -`,Manifest=_export_sfc(_sfc_main$c,[["styles",[_style_0$a]],["__scopeId","data-v-65e736fe"]]);var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start$1="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(F,W){return F.concat([W+"-"+start$1,W+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(F,W){return F.concat([W,W+"-"+start$1,W+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(F){return F?(F.nodeName||"").toLowerCase():null}function getWindow(F){if(F==null)return window;if(F.toString()!=="[object Window]"){var W=F.ownerDocument;return W&&W.defaultView||window}return F}function isElement(F){var W=getWindow(F).Element;return F instanceof W||F instanceof Element}function isHTMLElement(F){var W=getWindow(F).HTMLElement;return F instanceof W||F instanceof HTMLElement}function isShadowRoot(F){if(typeof ShadowRoot>"u")return!1;var W=getWindow(F).ShadowRoot;return F instanceof W||F instanceof ShadowRoot}function applyStyles(F){var W=F.state;Object.keys(W.elements).forEach(function(q){var K=W.styles[q]||{},X=W.attributes[q]||{},tt=W.elements[q];!isHTMLElement(tt)||!getNodeName(tt)||(Object.assign(tt.style,K),Object.keys(X).forEach(function(rt){var ot=X[rt];ot===!1?tt.removeAttribute(rt):tt.setAttribute(rt,ot===!0?"":ot)}))})}function effect$2(F){var W=F.state,q={popper:{position:W.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(W.elements.popper.style,q.popper),W.styles=q,W.elements.arrow&&Object.assign(W.elements.arrow.style,q.arrow),function(){Object.keys(W.elements).forEach(function(K){var X=W.elements[K],tt=W.attributes[K]||{},rt=Object.keys(W.styles.hasOwnProperty(K)?W.styles[K]:q[K]),ot=rt.reduce(function(ut,yn){return ut[yn]="",ut},{});!isHTMLElement(X)||!getNodeName(X)||(Object.assign(X.style,ot),Object.keys(tt).forEach(function(ut){X.removeAttribute(ut)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(F){return F.split("-")[0]}var max$8=Math.max,min$7=Math.min,round$4=Math.round;function getUAString(){var F=navigator.userAgentData;return F!=null&&F.brands&&Array.isArray(F.brands)?F.brands.map(function(W){return W.brand+"/"+W.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(F,W,q){W===void 0&&(W=!1),q===void 0&&(q=!1);var K=F.getBoundingClientRect(),X=1,tt=1;W&&isHTMLElement(F)&&(X=F.offsetWidth>0&&round$4(K.width)/F.offsetWidth||1,tt=F.offsetHeight>0&&round$4(K.height)/F.offsetHeight||1);var rt=isElement(F)?getWindow(F):window,ot=rt.visualViewport,ut=!isLayoutViewport()&&q,yn=(K.left+(ut&&ot?ot.offsetLeft:0))/X,uo=(K.top+(ut&&ot?ot.offsetTop:0))/tt,po=K.width/X,mo=K.height/tt;return{width:po,height:mo,top:uo,right:yn+po,bottom:uo+mo,left:yn,x:yn,y:uo}}function getLayoutRect(F){var W=getBoundingClientRect(F),q=F.offsetWidth,K=F.offsetHeight;return Math.abs(W.width-q)<=1&&(q=W.width),Math.abs(W.height-K)<=1&&(K=W.height),{x:F.offsetLeft,y:F.offsetTop,width:q,height:K}}function contains(F,W){var q=W.getRootNode&&W.getRootNode();if(F.contains(W))return!0;if(q&&isShadowRoot(q)){var K=W;do{if(K&&F.isSameNode(K))return!0;K=K.parentNode||K.host}while(K)}return!1}function getComputedStyle$1(F){return getWindow(F).getComputedStyle(F)}function isTableElement(F){return["table","td","th"].indexOf(getNodeName(F))>=0}function getDocumentElement(F){return((isElement(F)?F.ownerDocument:F.document)||window.document).documentElement}function getParentNode(F){return getNodeName(F)==="html"?F:F.assignedSlot||F.parentNode||(isShadowRoot(F)?F.host:null)||getDocumentElement(F)}function getTrueOffsetParent(F){return!isHTMLElement(F)||getComputedStyle$1(F).position==="fixed"?null:F.offsetParent}function getContainingBlock(F){var W=/firefox/i.test(getUAString()),q=/Trident/i.test(getUAString());if(q&&isHTMLElement(F)){var K=getComputedStyle$1(F);if(K.position==="fixed")return null}var X=getParentNode(F);for(isShadowRoot(X)&&(X=X.host);isHTMLElement(X)&&["html","body"].indexOf(getNodeName(X))<0;){var tt=getComputedStyle$1(X);if(tt.transform!=="none"||tt.perspective!=="none"||tt.contain==="paint"||["transform","perspective"].indexOf(tt.willChange)!==-1||W&&tt.willChange==="filter"||W&&tt.filter&&tt.filter!=="none")return X;X=X.parentNode}return null}function getOffsetParent(F){for(var W=getWindow(F),q=getTrueOffsetParent(F);q&&isTableElement(q)&&getComputedStyle$1(q).position==="static";)q=getTrueOffsetParent(q);return q&&(getNodeName(q)==="html"||getNodeName(q)==="body"&&getComputedStyle$1(q).position==="static")?W:q||getContainingBlock(F)||W}function getMainAxisFromPlacement(F){return["top","bottom"].indexOf(F)>=0?"x":"y"}function within(F,W,q){return max$8(F,min$7(W,q))}function withinMaxClamp(F,W,q){var K=within(F,W,q);return K>q?q:K}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(F){return Object.assign({},getFreshSideObject(),F)}function expandToHashMap(F,W){return W.reduce(function(q,K){return q[K]=F,q},{})}var toPaddingObject=function F(W,q){return W=typeof W=="function"?W(Object.assign({},q.rects,{placement:q.placement})):W,mergePaddingObject(typeof W!="number"?W:expandToHashMap(W,basePlacements))};function arrow(F){var W,q=F.state,K=F.name,X=F.options,tt=q.elements.arrow,rt=q.modifiersData.popperOffsets,ot=getBasePlacement(q.placement),ut=getMainAxisFromPlacement(ot),yn=[left,right].indexOf(ot)>=0,uo=yn?"height":"width";if(!(!tt||!rt)){var po=toPaddingObject(X.padding,q),mo=getLayoutRect(tt),wo=ut==="y"?top:left,lf=ut==="y"?bottom:right,yf=q.rects.reference[uo]+q.rects.reference[ut]-rt[ut]-q.rects.popper[uo],cf=rt[ut]-q.rects.reference[ut],vf=getOffsetParent(tt),_f=vf?ut==="y"?vf.clientHeight||0:vf.clientWidth||0:0,$f=yf/2-cf/2,wf=po[wo],Pf=_f-mo[uo]-po[lf],Cf=_f/2-mo[uo]/2+$f,Af=within(wf,Cf,Pf),Bf=ut;q.modifiersData[K]=(W={},W[Bf]=Af,W.centerOffset=Af-Cf,W)}}function effect$1(F){var W=F.state,q=F.options,K=q.element,X=K===void 0?"[data-popper-arrow]":K;X!=null&&(typeof X=="string"&&(X=W.elements.popper.querySelector(X),!X)||contains(W.elements.popper,X)&&(W.elements.arrow=X))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(F){return F.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(F,W){var q=F.x,K=F.y,X=W.devicePixelRatio||1;return{x:round$4(q*X)/X||0,y:round$4(K*X)/X||0}}function mapToStyles(F){var W,q=F.popper,K=F.popperRect,X=F.placement,tt=F.variation,rt=F.offsets,ot=F.position,ut=F.gpuAcceleration,yn=F.adaptive,uo=F.roundOffsets,po=F.isFixed,mo=rt.x,wo=mo===void 0?0:mo,lf=rt.y,yf=lf===void 0?0:lf,cf=typeof uo=="function"?uo({x:wo,y:yf}):{x:wo,y:yf};wo=cf.x,yf=cf.y;var vf=rt.hasOwnProperty("x"),_f=rt.hasOwnProperty("y"),$f=left,wf=top,Pf=window;if(yn){var Cf=getOffsetParent(q),Af="clientHeight",Bf="clientWidth";if(Cf===getWindow(q)&&(Cf=getDocumentElement(q),getComputedStyle$1(Cf).position!=="static"&&ot==="absolute"&&(Af="scrollHeight",Bf="scrollWidth")),Cf=Cf,X===top||(X===left||X===right)&&tt===end){wf=bottom;var Hf=po&&Cf===Pf&&Pf.visualViewport?Pf.visualViewport.height:Cf[Af];yf-=Hf-K.height,yf*=ut?1:-1}if(X===left||(X===top||X===bottom)&&tt===end){$f=right;var Df=po&&Cf===Pf&&Pf.visualViewport?Pf.visualViewport.width:Cf[Bf];wo-=Df-K.width,wo*=ut?1:-1}}var Lf=Object.assign({position:ot},yn&&unsetSides),kf=uo===!0?roundOffsetsByDPR({x:wo,y:yf},getWindow(q)):{x:wo,y:yf};if(wo=kf.x,yf=kf.y,ut){var Nf;return Object.assign({},Lf,(Nf={},Nf[wf]=_f?"0":"",Nf[$f]=vf?"0":"",Nf.transform=(Pf.devicePixelRatio||1)<=1?"translate("+wo+"px, "+yf+"px)":"translate3d("+wo+"px, "+yf+"px, 0)",Nf))}return Object.assign({},Lf,(W={},W[wf]=_f?yf+"px":"",W[$f]=vf?wo+"px":"",W.transform="",W))}function computeStyles(F){var W=F.state,q=F.options,K=q.gpuAcceleration,X=K===void 0?!0:K,tt=q.adaptive,rt=tt===void 0?!0:tt,ot=q.roundOffsets,ut=ot===void 0?!0:ot,yn={placement:getBasePlacement(W.placement),variation:getVariation(W.placement),popper:W.elements.popper,popperRect:W.rects.popper,gpuAcceleration:X,isFixed:W.options.strategy==="fixed"};W.modifiersData.popperOffsets!=null&&(W.styles.popper=Object.assign({},W.styles.popper,mapToStyles(Object.assign({},yn,{offsets:W.modifiersData.popperOffsets,position:W.options.strategy,adaptive:rt,roundOffsets:ut})))),W.modifiersData.arrow!=null&&(W.styles.arrow=Object.assign({},W.styles.arrow,mapToStyles(Object.assign({},yn,{offsets:W.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:ut})))),W.attributes.popper=Object.assign({},W.attributes.popper,{"data-popper-placement":W.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(F){var W=F.state,q=F.instance,K=F.options,X=K.scroll,tt=X===void 0?!0:X,rt=K.resize,ot=rt===void 0?!0:rt,ut=getWindow(W.elements.popper),yn=[].concat(W.scrollParents.reference,W.scrollParents.popper);return tt&&yn.forEach(function(uo){uo.addEventListener("scroll",q.update,passive)}),ot&&ut.addEventListener("resize",q.update,passive),function(){tt&&yn.forEach(function(uo){uo.removeEventListener("scroll",q.update,passive)}),ot&&ut.removeEventListener("resize",q.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function F(){},effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(F){return F.replace(/left|right|bottom|top/g,function(W){return hash$1[W]})}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(F){return F.replace(/start|end/g,function(W){return hash[W]})}function getWindowScroll(F){var W=getWindow(F),q=W.pageXOffset,K=W.pageYOffset;return{scrollLeft:q,scrollTop:K}}function getWindowScrollBarX(F){return getBoundingClientRect(getDocumentElement(F)).left+getWindowScroll(F).scrollLeft}function getViewportRect(F,W){var q=getWindow(F),K=getDocumentElement(F),X=q.visualViewport,tt=K.clientWidth,rt=K.clientHeight,ot=0,ut=0;if(X){tt=X.width,rt=X.height;var yn=isLayoutViewport();(yn||!yn&&W==="fixed")&&(ot=X.offsetLeft,ut=X.offsetTop)}return{width:tt,height:rt,x:ot+getWindowScrollBarX(F),y:ut}}function getDocumentRect(F){var W,q=getDocumentElement(F),K=getWindowScroll(F),X=(W=F.ownerDocument)==null?void 0:W.body,tt=max$8(q.scrollWidth,q.clientWidth,X?X.scrollWidth:0,X?X.clientWidth:0),rt=max$8(q.scrollHeight,q.clientHeight,X?X.scrollHeight:0,X?X.clientHeight:0),ot=-K.scrollLeft+getWindowScrollBarX(F),ut=-K.scrollTop;return getComputedStyle$1(X||q).direction==="rtl"&&(ot+=max$8(q.clientWidth,X?X.clientWidth:0)-tt),{width:tt,height:rt,x:ot,y:ut}}function isScrollParent(F){var W=getComputedStyle$1(F),q=W.overflow,K=W.overflowX,X=W.overflowY;return/auto|scroll|overlay|hidden/.test(q+X+K)}function getScrollParent(F){return["html","body","#document"].indexOf(getNodeName(F))>=0?F.ownerDocument.body:isHTMLElement(F)&&isScrollParent(F)?F:getScrollParent(getParentNode(F))}function listScrollParents(F,W){var q;W===void 0&&(W=[]);var K=getScrollParent(F),X=K===((q=F.ownerDocument)==null?void 0:q.body),tt=getWindow(K),rt=X?[tt].concat(tt.visualViewport||[],isScrollParent(K)?K:[]):K,ot=W.concat(rt);return X?ot:ot.concat(listScrollParents(getParentNode(rt)))}function rectToClientRect(F){return Object.assign({},F,{left:F.x,top:F.y,right:F.x+F.width,bottom:F.y+F.height})}function getInnerBoundingClientRect(F,W){var q=getBoundingClientRect(F,!1,W==="fixed");return q.top=q.top+F.clientTop,q.left=q.left+F.clientLeft,q.bottom=q.top+F.clientHeight,q.right=q.left+F.clientWidth,q.width=F.clientWidth,q.height=F.clientHeight,q.x=q.left,q.y=q.top,q}function getClientRectFromMixedType(F,W,q){return W===viewport?rectToClientRect(getViewportRect(F,q)):isElement(W)?getInnerBoundingClientRect(W,q):rectToClientRect(getDocumentRect(getDocumentElement(F)))}function getClippingParents(F){var W=listScrollParents(getParentNode(F)),q=["absolute","fixed"].indexOf(getComputedStyle$1(F).position)>=0,K=q&&isHTMLElement(F)?getOffsetParent(F):F;return isElement(K)?W.filter(function(X){return isElement(X)&&contains(X,K)&&getNodeName(X)!=="body"}):[]}function getClippingRect(F,W,q,K){var X=W==="clippingParents"?getClippingParents(F):[].concat(W),tt=[].concat(X,[q]),rt=tt[0],ot=tt.reduce(function(ut,yn){var uo=getClientRectFromMixedType(F,yn,K);return ut.top=max$8(uo.top,ut.top),ut.right=min$7(uo.right,ut.right),ut.bottom=min$7(uo.bottom,ut.bottom),ut.left=max$8(uo.left,ut.left),ut},getClientRectFromMixedType(F,rt,K));return ot.width=ot.right-ot.left,ot.height=ot.bottom-ot.top,ot.x=ot.left,ot.y=ot.top,ot}function computeOffsets(F){var W=F.reference,q=F.element,K=F.placement,X=K?getBasePlacement(K):null,tt=K?getVariation(K):null,rt=W.x+W.width/2-q.width/2,ot=W.y+W.height/2-q.height/2,ut;switch(X){case top:ut={x:rt,y:W.y-q.height};break;case bottom:ut={x:rt,y:W.y+W.height};break;case right:ut={x:W.x+W.width,y:ot};break;case left:ut={x:W.x-q.width,y:ot};break;default:ut={x:W.x,y:W.y}}var yn=X?getMainAxisFromPlacement(X):null;if(yn!=null){var uo=yn==="y"?"height":"width";switch(tt){case start$1:ut[yn]=ut[yn]-(W[uo]/2-q[uo]/2);break;case end:ut[yn]=ut[yn]+(W[uo]/2-q[uo]/2);break}}return ut}function detectOverflow(F,W){W===void 0&&(W={});var q=W,K=q.placement,X=K===void 0?F.placement:K,tt=q.strategy,rt=tt===void 0?F.strategy:tt,ot=q.boundary,ut=ot===void 0?clippingParents:ot,yn=q.rootBoundary,uo=yn===void 0?viewport:yn,po=q.elementContext,mo=po===void 0?popper:po,wo=q.altBoundary,lf=wo===void 0?!1:wo,yf=q.padding,cf=yf===void 0?0:yf,vf=mergePaddingObject(typeof cf!="number"?cf:expandToHashMap(cf,basePlacements)),_f=mo===popper?reference:popper,$f=F.rects.popper,wf=F.elements[lf?_f:mo],Pf=getClippingRect(isElement(wf)?wf:wf.contextElement||getDocumentElement(F.elements.popper),ut,uo,rt),Cf=getBoundingClientRect(F.elements.reference),Af=computeOffsets({reference:Cf,element:$f,strategy:"absolute",placement:X}),Bf=rectToClientRect(Object.assign({},$f,Af)),Hf=mo===popper?Bf:Cf,Df={top:Pf.top-Hf.top+vf.top,bottom:Hf.bottom-Pf.bottom+vf.bottom,left:Pf.left-Hf.left+vf.left,right:Hf.right-Pf.right+vf.right},Lf=F.modifiersData.offset;if(mo===popper&&Lf){var kf=Lf[X];Object.keys(Df).forEach(function(Nf){var Yf=[right,bottom].indexOf(Nf)>=0?1:-1,Gf=[top,bottom].indexOf(Nf)>=0?"y":"x";Df[Nf]+=kf[Gf]*Yf})}return Df}function computeAutoPlacement(F,W){W===void 0&&(W={});var q=W,K=q.placement,X=q.boundary,tt=q.rootBoundary,rt=q.padding,ot=q.flipVariations,ut=q.allowedAutoPlacements,yn=ut===void 0?placements:ut,uo=getVariation(K),po=uo?ot?variationPlacements:variationPlacements.filter(function(lf){return getVariation(lf)===uo}):basePlacements,mo=po.filter(function(lf){return yn.indexOf(lf)>=0});mo.length===0&&(mo=po);var wo=mo.reduce(function(lf,yf){return lf[yf]=detectOverflow(F,{placement:yf,boundary:X,rootBoundary:tt,padding:rt})[getBasePlacement(yf)],lf},{});return Object.keys(wo).sort(function(lf,yf){return wo[lf]-wo[yf]})}function getExpandedFallbackPlacements(F){if(getBasePlacement(F)===auto)return[];var W=getOppositePlacement(F);return[getOppositeVariationPlacement(F),W,getOppositeVariationPlacement(W)]}function flip(F){var W=F.state,q=F.options,K=F.name;if(!W.modifiersData[K]._skip){for(var X=q.mainAxis,tt=X===void 0?!0:X,rt=q.altAxis,ot=rt===void 0?!0:rt,ut=q.fallbackPlacements,yn=q.padding,uo=q.boundary,po=q.rootBoundary,mo=q.altBoundary,wo=q.flipVariations,lf=wo===void 0?!0:wo,yf=q.allowedAutoPlacements,cf=W.options.placement,vf=getBasePlacement(cf),_f=vf===cf,$f=ut||(_f||!lf?[getOppositePlacement(cf)]:getExpandedFallbackPlacements(cf)),wf=[cf].concat($f).reduce(function(Jp,ng){return Jp.concat(getBasePlacement(ng)===auto?computeAutoPlacement(W,{placement:ng,boundary:uo,rootBoundary:po,padding:yn,flipVariations:lf,allowedAutoPlacements:yf}):ng)},[]),Pf=W.rects.reference,Cf=W.rects.popper,Af=new Map,Bf=!0,Hf=wf[0],Df=0;Df=0,Gf=Yf?"width":"height",rp=detectOverflow(W,{placement:Lf,boundary:uo,rootBoundary:po,altBoundary:mo,padding:yn}),ip=Yf?Nf?right:left:Nf?bottom:top;Pf[Gf]>Cf[Gf]&&(ip=getOppositePlacement(ip));var ap=getOppositePlacement(ip),yp=[];if(tt&&yp.push(rp[kf]<=0),ot&&yp.push(rp[ip]<=0,rp[ap]<=0),yp.every(function(Jp){return Jp})){Hf=Lf,Bf=!1;break}Af.set(Lf,yp)}if(Bf)for(var vp=lf?3:1,Np=function(ng){var og=wf.find(function(vg){var Dp=Af.get(vg);if(Dp)return Dp.slice(0,ng).every(function(Lp){return Lp})});if(og)return Hf=og,"break"},jp=vp;jp>0;jp--){var Ip=Np(jp);if(Ip==="break")break}W.placement!==Hf&&(W.modifiersData[K]._skip=!0,W.placement=Hf,W.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(F,W,q){return q===void 0&&(q={x:0,y:0}),{top:F.top-W.height-q.y,right:F.right-W.width+q.x,bottom:F.bottom-W.height+q.y,left:F.left-W.width-q.x}}function isAnySideFullyClipped(F){return[top,right,bottom,left].some(function(W){return F[W]>=0})}function hide(F){var W=F.state,q=F.name,K=W.rects.reference,X=W.rects.popper,tt=W.modifiersData.preventOverflow,rt=detectOverflow(W,{elementContext:"reference"}),ot=detectOverflow(W,{altBoundary:!0}),ut=getSideOffsets(rt,K),yn=getSideOffsets(ot,X,tt),uo=isAnySideFullyClipped(ut),po=isAnySideFullyClipped(yn);W.modifiersData[q]={referenceClippingOffsets:ut,popperEscapeOffsets:yn,isReferenceHidden:uo,hasPopperEscaped:po},W.attributes.popper=Object.assign({},W.attributes.popper,{"data-popper-reference-hidden":uo,"data-popper-escaped":po})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(F,W,q){var K=getBasePlacement(F),X=[left,top].indexOf(K)>=0?-1:1,tt=typeof q=="function"?q(Object.assign({},W,{placement:F})):q,rt=tt[0],ot=tt[1];return rt=rt||0,ot=(ot||0)*X,[left,right].indexOf(K)>=0?{x:ot,y:rt}:{x:rt,y:ot}}function offset$1(F){var W=F.state,q=F.options,K=F.name,X=q.offset,tt=X===void 0?[0,0]:X,rt=placements.reduce(function(uo,po){return uo[po]=distanceAndSkiddingToXY(po,W.rects,tt),uo},{}),ot=rt[W.placement],ut=ot.x,yn=ot.y;W.modifiersData.popperOffsets!=null&&(W.modifiersData.popperOffsets.x+=ut,W.modifiersData.popperOffsets.y+=yn),W.modifiersData[K]=rt}const offset$2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset$1};function popperOffsets(F){var W=F.state,q=F.name;W.modifiersData[q]=computeOffsets({reference:W.rects.reference,element:W.rects.popper,strategy:"absolute",placement:W.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(F){return F==="x"?"y":"x"}function preventOverflow(F){var W=F.state,q=F.options,K=F.name,X=q.mainAxis,tt=X===void 0?!0:X,rt=q.altAxis,ot=rt===void 0?!1:rt,ut=q.boundary,yn=q.rootBoundary,uo=q.altBoundary,po=q.padding,mo=q.tether,wo=mo===void 0?!0:mo,lf=q.tetherOffset,yf=lf===void 0?0:lf,cf=detectOverflow(W,{boundary:ut,rootBoundary:yn,padding:po,altBoundary:uo}),vf=getBasePlacement(W.placement),_f=getVariation(W.placement),$f=!_f,wf=getMainAxisFromPlacement(vf),Pf=getAltAxis(wf),Cf=W.modifiersData.popperOffsets,Af=W.rects.reference,Bf=W.rects.popper,Hf=typeof yf=="function"?yf(Object.assign({},W.rects,{placement:W.placement})):yf,Df=typeof Hf=="number"?{mainAxis:Hf,altAxis:Hf}:Object.assign({mainAxis:0,altAxis:0},Hf),Lf=W.modifiersData.offset?W.modifiersData.offset[W.placement]:null,kf={x:0,y:0};if(Cf){if(tt){var Nf,Yf=wf==="y"?top:left,Gf=wf==="y"?bottom:right,rp=wf==="y"?"height":"width",ip=Cf[wf],ap=ip+cf[Yf],yp=ip-cf[Gf],vp=wo?-Bf[rp]/2:0,Np=_f===start$1?Af[rp]:Bf[rp],jp=_f===start$1?-Bf[rp]:-Af[rp],Ip=W.elements.arrow,Jp=wo&&Ip?getLayoutRect(Ip):{width:0,height:0},ng=W.modifiersData["arrow#persistent"]?W.modifiersData["arrow#persistent"].padding:getFreshSideObject(),og=ng[Yf],vg=ng[Gf],Dp=within(0,Af[rp],Jp[rp]),Lp=$f?Af[rp]/2-vp-Dp-og-Df.mainAxis:Np-Dp-og-Df.mainAxis,xp=$f?-Af[rp]/2+vp+Dp+vg+Df.mainAxis:jp+Dp+vg+Df.mainAxis,kp=W.elements.arrow&&getOffsetParent(W.elements.arrow),lp=kp?wf==="y"?kp.clientTop||0:kp.clientLeft||0:0,Of=(Nf=Lf==null?void 0:Lf[wf])!=null?Nf:0,qf=ip+Lp-Of-lp,cp=ip+xp-Of,hp=within(wo?min$7(ap,qf):ap,ip,wo?max$8(yp,cp):yp);Cf[wf]=hp,kf[wf]=hp-ip}if(ot){var $p,Vp=wf==="x"?top:left,bp=wf==="x"?bottom:right,Ep=Cf[Pf],_p=Pf==="y"?"height":"width",Mp=Ep+cf[Vp],Yp=Ep-cf[bp],ug=[top,left].indexOf(vf)!==-1,hg=($p=Lf==null?void 0:Lf[Pf])!=null?$p:0,xg=ug?Mp:Ep-Af[_p]-Bf[_p]-hg+Df.altAxis,kg=ug?Ep+Af[_p]+Bf[_p]-hg-Df.altAxis:Yp,Dg=wo&&ug?withinMaxClamp(xg,Ep,kg):within(wo?xg:Mp,Ep,wo?kg:Yp);Cf[Pf]=Dg,kf[Pf]=Dg-Ep}W.modifiersData[K]=kf}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(F){return{scrollLeft:F.scrollLeft,scrollTop:F.scrollTop}}function getNodeScroll(F){return F===getWindow(F)||!isHTMLElement(F)?getWindowScroll(F):getHTMLElementScroll(F)}function isElementScaled(F){var W=F.getBoundingClientRect(),q=round$4(W.width)/F.offsetWidth||1,K=round$4(W.height)/F.offsetHeight||1;return q!==1||K!==1}function getCompositeRect(F,W,q){q===void 0&&(q=!1);var K=isHTMLElement(W),X=isHTMLElement(W)&&isElementScaled(W),tt=getDocumentElement(W),rt=getBoundingClientRect(F,X,q),ot={scrollLeft:0,scrollTop:0},ut={x:0,y:0};return(K||!K&&!q)&&((getNodeName(W)!=="body"||isScrollParent(tt))&&(ot=getNodeScroll(W)),isHTMLElement(W)?(ut=getBoundingClientRect(W,!0),ut.x+=W.clientLeft,ut.y+=W.clientTop):tt&&(ut.x=getWindowScrollBarX(tt))),{x:rt.left+ot.scrollLeft-ut.x,y:rt.top+ot.scrollTop-ut.y,width:rt.width,height:rt.height}}function order(F){var W=new Map,q=new Set,K=[];F.forEach(function(tt){W.set(tt.name,tt)});function X(tt){q.add(tt.name);var rt=[].concat(tt.requires||[],tt.requiresIfExists||[]);rt.forEach(function(ot){if(!q.has(ot)){var ut=W.get(ot);ut&&X(ut)}}),K.push(tt)}return F.forEach(function(tt){q.has(tt.name)||X(tt)}),K}function orderModifiers(F){var W=order(F);return modifierPhases.reduce(function(q,K){return q.concat(W.filter(function(X){return X.phase===K}))},[])}function debounce(F){var W;return function(){return W||(W=new Promise(function(q){Promise.resolve().then(function(){W=void 0,q(F())})})),W}}function mergeByName(F){var W=F.reduce(function(q,K){var X=q[K.name];return q[K.name]=X?Object.assign({},X,K,{options:Object.assign({},X.options,K.options),data:Object.assign({},X.data,K.data)}):K,q},{});return Object.keys(W).map(function(q){return W[q]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var F=arguments.length,W=new Array(F),q=0;q(pushScopeId("data-v-65e736fe"),F=F(),popScopeId(),F),_hoisted_1$a={class:"main"},_hoisted_2$8=["src"],_hoisted_3$8=["innerHTML"],_hoisted_4$8=["innerHTML"],_hoisted_5$6=["href","innerHTML"],_hoisted_6$5={class:"links"},_hoisted_7$3={class:"detail"},_hoisted_8$2={key:0,class:"provider"},_hoisted_9$3=_withScopeId(()=>createBaseVNode("span",{class:"label"},"provider",-1)),_hoisted_10$3={key:0,style:{display:"flex","align-items":"center"}},_hoisted_11$3=["src"],_hoisted_12$3=["href","innerHTML"],_hoisted_13$3={key:1},_hoisted_14$2=["src"],_hoisted_15$2=["href","innerHTML"],_hoisted_16$2={key:1,class:"requiredStatement"},_hoisted_17$2=["innerHTML"],_hoisted_18$2={key:2,class:"rights"},_hoisted_19$1=_withScopeId(()=>createBaseVNode("span",{class:"label"},"Reuse rights",-1)),_hoisted_20$1=["href","innerHTML"],_hoisted_21$1={key:3,class:"metadata"},_hoisted_22$1=_withScopeId(()=>createBaseVNode("span",{class:"label"},"metadata",-1)),_hoisted_23$1=["innerHTML"],_hoisted_24$1=["innerHTML"],_hoisted_25$1={key:1},_hoisted_26$1=["innerHTML"],_hoisted_27$1={key:4,class:"navDate"},_hoisted_28$1=_withScopeId(()=>createBaseVNode("span",{class:"label"},"navDate",-1)),_hoisted_29=["innerHTML"],_hoisted_30={key:5,class:"homepage"},_hoisted_31=_withScopeId(()=>createBaseVNode("span",{class:"label"},"homepage",-1)),_hoisted_32=["href","innerHTML"],_hoisted_33={key:6,class:"seeAlso"},_hoisted_34=_withScopeId(()=>createBaseVNode("span",{class:"label"},"seeAlso",-1)),_hoisted_35=["href","innerHTML"],_hoisted_36={key:7,class:"logo"},_hoisted_37=_withScopeId(()=>createBaseVNode("span",{class:"label"},"logo",-1)),_hoisted_38=["href","innerHTML"],_hoisted_39={key:8,class:"imageData"},_hoisted_40=_withScopeId(()=>createBaseVNode("span",{class:"label"},"source",-1)),_hoisted_41=["href","innerHTML"],_hoisted_42=_withScopeId(()=>createBaseVNode("span",{class:"label"},"format",-1)),_hoisted_43=["innerHTML"],_hoisted_44=_withScopeId(()=>createBaseVNode("span",{class:"label"},"width",-1)),_hoisted_45=["innerHTML"],_hoisted_46=_withScopeId(()=>createBaseVNode("span",{class:"label"},"height",-1)),_hoisted_47=["innerHTML"],_sfc_main$c=defineComponent({__name:"Manifest.ce",props:{manifest:{type:Object,required:!0}},setup(F){const W=F;watch$1(W,()=>K.value=W.manifest);const q=ref(null),K=ref(null),X=ref(null);watch$1(K,()=>X.value=ut(K.value));const tt=computed(()=>X.value&&uo(X.value));onMounted(()=>rt());function rt(){typeof W.manifest=="object"?K.value=W.manifest:getManifest(W.manifest).then(po=>K.value=po)}function ot(po,mo="en"){return typeof po=="object"&&!Array.isArray(po)?po[mo]||po.none||po[Object.keys(po).sort()[0]]:po}function ut(po){let mo={};if(mo.id=ot(po.id),mo.label=ot(po.label),po.summary&&(mo.summary=ot(po.summary)),po.rights&&(mo.rights=po.rights),po.thumbnail&&(mo.thumbnail=po.thumbnail[0].id||po.thumbnail),po.metadata){mo.metadata=po.metadata.map(yf=>({label:ot(yf.label)[0],value:ot(yf.value)}));let wo=mo.metadata.find(yf=>yf.label=="source_url");mo.sourceUrl=wo?wo.value[0]:null;let lf=mo.metadata.find(yf=>yf.label==="depicts");lf&&(mo.depicts=lf.value)}if(po.provider&&(mo.provider=po.provider.map(wo=>{let lf={label:ot(wo.label),href:wo.id};return wo.logo&&(lf.logo={src:wo.logo[0].id}),lf})),po.logo&&(mo.logo=po.logo.map(wo=>{let lf={src:typeof wo=="object"?wo.id||wo["@id"]:wo};return typeof wo=="object"&&(wo.width&&(lf.width=wo.width),wo.height&&(lf.height=wo.height)),lf})),mo.imageData=getItemInfo(po),mo.service=mo.imageData.service&&`${(mo.imageData.service[0].id||mo.imageData.service[0]["@id"]).replace(/\/info\.json$/,"")}/info.json`,po.requiredStatement){let wo=po.requiredStatement;mo.requiredStatement={label:ot(wo.label),value:ot(wo.value)}}return po.homepage&&(mo.homepage={label:po.homepage.label?ot(po.homepage.label):po.homepage.id,href:po.homepage.id}),po.seeAlso&&(mo.seeAlso=po.seeAlso.map(wo=>({label:wo.label?ot(wo.label):wo.id,href:wo.id}))),mo}function yn(po){navigator.clipboard&&navigator.clipboard.writeText(po)}function uo(po){let mo={cc:{badgeWidth:88,badgeHeight:31,badgeTemplate:'https://licensebuttons.net/l/${this.rightsCode}${this.rightsCode === "publicdomain" ? "" : "/"+this.version}/${this.badgeWidth}x${this.badgeHeight}.png'},rs:{badgeTemplate:"https://rightsstatements.org/files/buttons/${this.rightsCode}.white.svg",backgroundColor:"318ac7"}};const wo=function(xf,Af){return new Function("return `"+xf+"`;").call(Af)};let lf=po.rights||"",yf="",[cf,vf,_f,$f]=lf.split("/").slice(2);return cf==="creativecommons.org"?(_f=_f==="zero"?"publicdomain":_f,yf=``):cf==="rightsstatements.org"&&(yf=`
`),yf}return(po,mo)=>{var wo,lf,yf,cf,vf,_f,$f,xf,Af,Cf,Pf,Bf,Hf,Df,Lf;return openBlock(),createElementBlock("div",{ref_key:"root",ref:q,class:"manifest"},[createBaseVNode("div",_hoisted_1$a,[createBaseVNode("img",{class:"thumbnail",src:(wo=X.value)==null?void 0:wo.thumbnail},null,8,_hoisted_2$8),createBaseVNode("div",{class:"label",innerHTML:(lf=X.value)==null?void 0:lf.label},null,8,_hoisted_3$8),(yf=X.value)!=null&&yf.summary?(openBlock(),createElementBlock("div",{key:0,class:"summary",innerHTML:(cf=X.value)==null?void 0:cf.summary},null,8,_hoisted_4$8)):createCommentVNode("",!0),(vf=X.value)!=null&&vf.rights?(openBlock(),createElementBlock("a",{key:1,href:(_f=X.value)==null?void 0:_f.rights,innerHTML:tt.value},null,8,_hoisted_5$6)):createCommentVNode("",!0),createBaseVNode("div",_hoisted_6$5,[createBaseVNode("img",{src:"https://v3.juncture-digital.org/images/iiif.png",class:"iiif",alt:"IIIF manifest icon",onClick:mo[0]||(mo[0]=kf=>yn(K.value.id))})])]),createBaseVNode("div",_hoisted_7$3,[($f=X.value)!=null&&$f.provider?(openBlock(),createElementBlock("div",_hoisted_8$2,[_hoisted_9$3,X.value.provider.length===1?(openBlock(),createElementBlock("div",_hoisted_10$3,[X.value.provider[0].logo?(openBlock(),createElementBlock("img",{key:0,class:"logo",src:X.value.provider[0].logo.src},null,8,_hoisted_11$3)):createCommentVNode("",!0),createBaseVNode("a",{class:"value",href:X.value.provider[0].href,innerHTML:X.value.provider[0].label},null,8,_hoisted_12$3)])):(openBlock(),createElementBlock("ul",_hoisted_13$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(X.value.provider,(kf,Nf)=>(openBlock(),createElementBlock("li",{key:`provider-${Nf}`},[kf.logo?(openBlock(),createElementBlock("img",{key:0,class:"logo",src:kf.logo.src},null,8,_hoisted_14$2)):createCommentVNode("",!0),createBaseVNode("a",{class:"value",href:kf.href,innerHTML:kf.label},null,8,_hoisted_15$2)]))),128))]))])):createCommentVNode("",!0),(xf=X.value)!=null&&xf.requiredStatement?(openBlock(),createElementBlock("div",_hoisted_16$2,[createBaseVNode("span",{class:"value",innerHTML:X.value.requiredStatement.value},null,8,_hoisted_17$2)])):createCommentVNode("",!0),(Af=X.value)!=null&&Af.rights?(openBlock(),createElementBlock("div",_hoisted_18$2,[_hoisted_19$1,createBaseVNode("a",{class:"value",href:X.value.rights,innerHTML:X.value.rights},null,8,_hoisted_20$1)])):createCommentVNode("",!0),(Cf=X.value)!=null&&Cf.metadata?(openBlock(),createElementBlock("div",_hoisted_21$1,[_hoisted_22$1,createBaseVNode("ul",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(X.value.metadata,(kf,Nf)=>(openBlock(),createElementBlock("li",{key:`md-${Nf}`},[createBaseVNode("span",{class:"label",innerHTML:kf.label},null,8,_hoisted_23$1),kf.value.length===1?(openBlock(),createElementBlock("span",{key:0,class:"value",innerHTML:kf.value[0]},null,8,_hoisted_24$1)):(openBlock(),createElementBlock("ul",_hoisted_25$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(kf.value,Yf=>(openBlock(),createElementBlock("li",{class:"value",innerHTML:Yf},null,8,_hoisted_26$1))),256))]))]))),128))])])):createCommentVNode("",!0),(Pf=X.value)!=null&&Pf.navDate?(openBlock(),createElementBlock("div",_hoisted_27$1,[_hoisted_28$1,createBaseVNode("span",{class:"value",innerHTML:X.value.navDate},null,8,_hoisted_29)])):createCommentVNode("",!0),(Bf=X.value)!=null&&Bf.homepage?(openBlock(),createElementBlock("div",_hoisted_30,[_hoisted_31,createBaseVNode("a",{class:"value",href:X.value.homepage.href,innerHTML:X.value.homepage.label},null,8,_hoisted_32)])):createCommentVNode("",!0),(Hf=X.value)!=null&&Hf.seeAlso?(openBlock(),createElementBlock("div",_hoisted_33,[_hoisted_34,createBaseVNode("a",{class:"value",href:X.value.seeAlso[0].href,innerHTML:X.value.seeAlso[0].label},null,8,_hoisted_35)])):createCommentVNode("",!0),(Df=X.value)!=null&&Df.logo?(openBlock(),createElementBlock("div",_hoisted_36,[_hoisted_37,createBaseVNode("a",{class:"value",href:X.value.logo[0].src,innerHTML:X.value.logo[0].src},null,8,_hoisted_38)])):createCommentVNode("",!0),(Lf=X.value)!=null&&Lf.imageData?(openBlock(),createElementBlock("div",_hoisted_39,[createBaseVNode("div",null,[_hoisted_40,createBaseVNode("a",{class:"value",href:X.value.imageData.id,innerHTML:X.value.imageData.id.split("/").pop()},null,8,_hoisted_41)]),createBaseVNode("div",null,[_hoisted_42,createBaseVNode("span",{class:"value",innerHTML:X.value.imageData.format},null,8,_hoisted_43)]),createBaseVNode("div",null,[_hoisted_44,createBaseVNode("span",{class:"value",innerHTML:X.value.imageData.width},null,8,_hoisted_45)]),createBaseVNode("div",null,[_hoisted_46,createBaseVNode("span",{class:"value",innerHTML:X.value.imageData.height},null,8,_hoisted_47)])])):createCommentVNode("",!0)])],512)}}}),_style_0$a=`*[data-v-65e736fe]{box-sizing:border-box}.manifest[data-v-65e736fe]{width:100%;height:100%;overflow-y:scroll;background-color:#fff;font-size:.8em}.main[data-v-65e736fe],.detail[data-v-65e736fe]{display:flow-root;margin:6px}.main>*[data-v-65e736fe]{margin-bottom:6px}.detail>div[data-v-65e736fe]{margin-top:12px}.main .label[data-v-65e736fe]{font-size:1.2em;font-weight:700}.thumbnail[data-v-65e736fe]{float:left;max-width:45%;max-height:200px;margin:0 6px 6px 0}.links[data-v-65e736fe]{margin-top:6px}img.iiif[data-v-65e736fe]{height:24px;cursor:copy}ul[data-v-65e736fe]{list-style:none;padding-left:12px;margin-top:0}.detail .label[data-v-65e736fe]{font-size:1.1em;font-weight:700;min-width:80px;margin-right:6px}.detail .label[data-v-65e736fe]:after{content:":"}.detail .value[data-v-65e736fe],.main .label[data-v-65e736fe]{white-space:pre-wrap;overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}.logo[data-v-65e736fe]{padding-right:6px}img.logo[data-v-65e736fe]{height:40px}.manifest-id[data-v-65e736fe],.manifest-label[data-v-65e736fe],.summary[data-v-65e736fe],.provider[data-v-65e736fe],.rights[data-v-65e736fe],.service[data-v-65e736fe],.imageData div[data-v-65e736fe],.thumbnail[data-v-65e736fe]{display:flex;align-items:flex-start}.metadata>ul[data-v-65e736fe],.requiredStatement ul[data-v-65e736fe]{padding-left:24px}.metadata ul li[data-v-65e736fe],.requiredStatement ul li[data-v-65e736fe]{display:flex}.metadata ul ul[data-v-65e736fe]{padding-left:0}a[data-v-65e736fe]:link,a[data-v-65e736fe]:visited{color:#00e} +`,Manifest=_export_sfc(_sfc_main$c,[["styles",[_style_0$a]],["__scopeId","data-v-65e736fe"]]);var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start$1="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(F,W){return F.concat([W+"-"+start$1,W+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(F,W){return F.concat([W,W+"-"+start$1,W+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(F){return F?(F.nodeName||"").toLowerCase():null}function getWindow(F){if(F==null)return window;if(F.toString()!=="[object Window]"){var W=F.ownerDocument;return W&&W.defaultView||window}return F}function isElement(F){var W=getWindow(F).Element;return F instanceof W||F instanceof Element}function isHTMLElement(F){var W=getWindow(F).HTMLElement;return F instanceof W||F instanceof HTMLElement}function isShadowRoot(F){if(typeof ShadowRoot>"u")return!1;var W=getWindow(F).ShadowRoot;return F instanceof W||F instanceof ShadowRoot}function applyStyles(F){var W=F.state;Object.keys(W.elements).forEach(function(q){var K=W.styles[q]||{},X=W.attributes[q]||{},tt=W.elements[q];!isHTMLElement(tt)||!getNodeName(tt)||(Object.assign(tt.style,K),Object.keys(X).forEach(function(rt){var ot=X[rt];ot===!1?tt.removeAttribute(rt):tt.setAttribute(rt,ot===!0?"":ot)}))})}function effect$2(F){var W=F.state,q={popper:{position:W.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(W.elements.popper.style,q.popper),W.styles=q,W.elements.arrow&&Object.assign(W.elements.arrow.style,q.arrow),function(){Object.keys(W.elements).forEach(function(K){var X=W.elements[K],tt=W.attributes[K]||{},rt=Object.keys(W.styles.hasOwnProperty(K)?W.styles[K]:q[K]),ot=rt.reduce(function(ut,yn){return ut[yn]="",ut},{});!isHTMLElement(X)||!getNodeName(X)||(Object.assign(X.style,ot),Object.keys(tt).forEach(function(ut){X.removeAttribute(ut)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(F){return F.split("-")[0]}var max$8=Math.max,min$7=Math.min,round$4=Math.round;function getUAString(){var F=navigator.userAgentData;return F!=null&&F.brands&&Array.isArray(F.brands)?F.brands.map(function(W){return W.brand+"/"+W.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(F,W,q){W===void 0&&(W=!1),q===void 0&&(q=!1);var K=F.getBoundingClientRect(),X=1,tt=1;W&&isHTMLElement(F)&&(X=F.offsetWidth>0&&round$4(K.width)/F.offsetWidth||1,tt=F.offsetHeight>0&&round$4(K.height)/F.offsetHeight||1);var rt=isElement(F)?getWindow(F):window,ot=rt.visualViewport,ut=!isLayoutViewport()&&q,yn=(K.left+(ut&&ot?ot.offsetLeft:0))/X,uo=(K.top+(ut&&ot?ot.offsetTop:0))/tt,po=K.width/X,mo=K.height/tt;return{width:po,height:mo,top:uo,right:yn+po,bottom:uo+mo,left:yn,x:yn,y:uo}}function getLayoutRect(F){var W=getBoundingClientRect(F),q=F.offsetWidth,K=F.offsetHeight;return Math.abs(W.width-q)<=1&&(q=W.width),Math.abs(W.height-K)<=1&&(K=W.height),{x:F.offsetLeft,y:F.offsetTop,width:q,height:K}}function contains(F,W){var q=W.getRootNode&&W.getRootNode();if(F.contains(W))return!0;if(q&&isShadowRoot(q)){var K=W;do{if(K&&F.isSameNode(K))return!0;K=K.parentNode||K.host}while(K)}return!1}function getComputedStyle$1(F){return getWindow(F).getComputedStyle(F)}function isTableElement(F){return["table","td","th"].indexOf(getNodeName(F))>=0}function getDocumentElement(F){return((isElement(F)?F.ownerDocument:F.document)||window.document).documentElement}function getParentNode(F){return getNodeName(F)==="html"?F:F.assignedSlot||F.parentNode||(isShadowRoot(F)?F.host:null)||getDocumentElement(F)}function getTrueOffsetParent(F){return!isHTMLElement(F)||getComputedStyle$1(F).position==="fixed"?null:F.offsetParent}function getContainingBlock(F){var W=/firefox/i.test(getUAString()),q=/Trident/i.test(getUAString());if(q&&isHTMLElement(F)){var K=getComputedStyle$1(F);if(K.position==="fixed")return null}var X=getParentNode(F);for(isShadowRoot(X)&&(X=X.host);isHTMLElement(X)&&["html","body"].indexOf(getNodeName(X))<0;){var tt=getComputedStyle$1(X);if(tt.transform!=="none"||tt.perspective!=="none"||tt.contain==="paint"||["transform","perspective"].indexOf(tt.willChange)!==-1||W&&tt.willChange==="filter"||W&&tt.filter&&tt.filter!=="none")return X;X=X.parentNode}return null}function getOffsetParent(F){for(var W=getWindow(F),q=getTrueOffsetParent(F);q&&isTableElement(q)&&getComputedStyle$1(q).position==="static";)q=getTrueOffsetParent(q);return q&&(getNodeName(q)==="html"||getNodeName(q)==="body"&&getComputedStyle$1(q).position==="static")?W:q||getContainingBlock(F)||W}function getMainAxisFromPlacement(F){return["top","bottom"].indexOf(F)>=0?"x":"y"}function within(F,W,q){return max$8(F,min$7(W,q))}function withinMaxClamp(F,W,q){var K=within(F,W,q);return K>q?q:K}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(F){return Object.assign({},getFreshSideObject(),F)}function expandToHashMap(F,W){return W.reduce(function(q,K){return q[K]=F,q},{})}var toPaddingObject=function F(W,q){return W=typeof W=="function"?W(Object.assign({},q.rects,{placement:q.placement})):W,mergePaddingObject(typeof W!="number"?W:expandToHashMap(W,basePlacements))};function arrow(F){var W,q=F.state,K=F.name,X=F.options,tt=q.elements.arrow,rt=q.modifiersData.popperOffsets,ot=getBasePlacement(q.placement),ut=getMainAxisFromPlacement(ot),yn=[left,right].indexOf(ot)>=0,uo=yn?"height":"width";if(!(!tt||!rt)){var po=toPaddingObject(X.padding,q),mo=getLayoutRect(tt),wo=ut==="y"?top:left,lf=ut==="y"?bottom:right,yf=q.rects.reference[uo]+q.rects.reference[ut]-rt[ut]-q.rects.popper[uo],cf=rt[ut]-q.rects.reference[ut],vf=getOffsetParent(tt),_f=vf?ut==="y"?vf.clientHeight||0:vf.clientWidth||0:0,$f=yf/2-cf/2,xf=po[wo],Af=_f-mo[uo]-po[lf],Cf=_f/2-mo[uo]/2+$f,Pf=within(xf,Cf,Af),Bf=ut;q.modifiersData[K]=(W={},W[Bf]=Pf,W.centerOffset=Pf-Cf,W)}}function effect$1(F){var W=F.state,q=F.options,K=q.element,X=K===void 0?"[data-popper-arrow]":K;X!=null&&(typeof X=="string"&&(X=W.elements.popper.querySelector(X),!X)||contains(W.elements.popper,X)&&(W.elements.arrow=X))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(F){return F.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(F,W){var q=F.x,K=F.y,X=W.devicePixelRatio||1;return{x:round$4(q*X)/X||0,y:round$4(K*X)/X||0}}function mapToStyles(F){var W,q=F.popper,K=F.popperRect,X=F.placement,tt=F.variation,rt=F.offsets,ot=F.position,ut=F.gpuAcceleration,yn=F.adaptive,uo=F.roundOffsets,po=F.isFixed,mo=rt.x,wo=mo===void 0?0:mo,lf=rt.y,yf=lf===void 0?0:lf,cf=typeof uo=="function"?uo({x:wo,y:yf}):{x:wo,y:yf};wo=cf.x,yf=cf.y;var vf=rt.hasOwnProperty("x"),_f=rt.hasOwnProperty("y"),$f=left,xf=top,Af=window;if(yn){var Cf=getOffsetParent(q),Pf="clientHeight",Bf="clientWidth";if(Cf===getWindow(q)&&(Cf=getDocumentElement(q),getComputedStyle$1(Cf).position!=="static"&&ot==="absolute"&&(Pf="scrollHeight",Bf="scrollWidth")),Cf=Cf,X===top||(X===left||X===right)&&tt===end){xf=bottom;var Hf=po&&Cf===Af&&Af.visualViewport?Af.visualViewport.height:Cf[Pf];yf-=Hf-K.height,yf*=ut?1:-1}if(X===left||(X===top||X===bottom)&&tt===end){$f=right;var Df=po&&Cf===Af&&Af.visualViewport?Af.visualViewport.width:Cf[Bf];wo-=Df-K.width,wo*=ut?1:-1}}var Lf=Object.assign({position:ot},yn&&unsetSides),kf=uo===!0?roundOffsetsByDPR({x:wo,y:yf},getWindow(q)):{x:wo,y:yf};if(wo=kf.x,yf=kf.y,ut){var Nf;return Object.assign({},Lf,(Nf={},Nf[xf]=_f?"0":"",Nf[$f]=vf?"0":"",Nf.transform=(Af.devicePixelRatio||1)<=1?"translate("+wo+"px, "+yf+"px)":"translate3d("+wo+"px, "+yf+"px, 0)",Nf))}return Object.assign({},Lf,(W={},W[xf]=_f?yf+"px":"",W[$f]=vf?wo+"px":"",W.transform="",W))}function computeStyles(F){var W=F.state,q=F.options,K=q.gpuAcceleration,X=K===void 0?!0:K,tt=q.adaptive,rt=tt===void 0?!0:tt,ot=q.roundOffsets,ut=ot===void 0?!0:ot,yn={placement:getBasePlacement(W.placement),variation:getVariation(W.placement),popper:W.elements.popper,popperRect:W.rects.popper,gpuAcceleration:X,isFixed:W.options.strategy==="fixed"};W.modifiersData.popperOffsets!=null&&(W.styles.popper=Object.assign({},W.styles.popper,mapToStyles(Object.assign({},yn,{offsets:W.modifiersData.popperOffsets,position:W.options.strategy,adaptive:rt,roundOffsets:ut})))),W.modifiersData.arrow!=null&&(W.styles.arrow=Object.assign({},W.styles.arrow,mapToStyles(Object.assign({},yn,{offsets:W.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:ut})))),W.attributes.popper=Object.assign({},W.attributes.popper,{"data-popper-placement":W.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(F){var W=F.state,q=F.instance,K=F.options,X=K.scroll,tt=X===void 0?!0:X,rt=K.resize,ot=rt===void 0?!0:rt,ut=getWindow(W.elements.popper),yn=[].concat(W.scrollParents.reference,W.scrollParents.popper);return tt&&yn.forEach(function(uo){uo.addEventListener("scroll",q.update,passive)}),ot&&ut.addEventListener("resize",q.update,passive),function(){tt&&yn.forEach(function(uo){uo.removeEventListener("scroll",q.update,passive)}),ot&&ut.removeEventListener("resize",q.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function F(){},effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(F){return F.replace(/left|right|bottom|top/g,function(W){return hash$1[W]})}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(F){return F.replace(/start|end/g,function(W){return hash[W]})}function getWindowScroll(F){var W=getWindow(F),q=W.pageXOffset,K=W.pageYOffset;return{scrollLeft:q,scrollTop:K}}function getWindowScrollBarX(F){return getBoundingClientRect(getDocumentElement(F)).left+getWindowScroll(F).scrollLeft}function getViewportRect(F,W){var q=getWindow(F),K=getDocumentElement(F),X=q.visualViewport,tt=K.clientWidth,rt=K.clientHeight,ot=0,ut=0;if(X){tt=X.width,rt=X.height;var yn=isLayoutViewport();(yn||!yn&&W==="fixed")&&(ot=X.offsetLeft,ut=X.offsetTop)}return{width:tt,height:rt,x:ot+getWindowScrollBarX(F),y:ut}}function getDocumentRect(F){var W,q=getDocumentElement(F),K=getWindowScroll(F),X=(W=F.ownerDocument)==null?void 0:W.body,tt=max$8(q.scrollWidth,q.clientWidth,X?X.scrollWidth:0,X?X.clientWidth:0),rt=max$8(q.scrollHeight,q.clientHeight,X?X.scrollHeight:0,X?X.clientHeight:0),ot=-K.scrollLeft+getWindowScrollBarX(F),ut=-K.scrollTop;return getComputedStyle$1(X||q).direction==="rtl"&&(ot+=max$8(q.clientWidth,X?X.clientWidth:0)-tt),{width:tt,height:rt,x:ot,y:ut}}function isScrollParent(F){var W=getComputedStyle$1(F),q=W.overflow,K=W.overflowX,X=W.overflowY;return/auto|scroll|overlay|hidden/.test(q+X+K)}function getScrollParent(F){return["html","body","#document"].indexOf(getNodeName(F))>=0?F.ownerDocument.body:isHTMLElement(F)&&isScrollParent(F)?F:getScrollParent(getParentNode(F))}function listScrollParents(F,W){var q;W===void 0&&(W=[]);var K=getScrollParent(F),X=K===((q=F.ownerDocument)==null?void 0:q.body),tt=getWindow(K),rt=X?[tt].concat(tt.visualViewport||[],isScrollParent(K)?K:[]):K,ot=W.concat(rt);return X?ot:ot.concat(listScrollParents(getParentNode(rt)))}function rectToClientRect(F){return Object.assign({},F,{left:F.x,top:F.y,right:F.x+F.width,bottom:F.y+F.height})}function getInnerBoundingClientRect(F,W){var q=getBoundingClientRect(F,!1,W==="fixed");return q.top=q.top+F.clientTop,q.left=q.left+F.clientLeft,q.bottom=q.top+F.clientHeight,q.right=q.left+F.clientWidth,q.width=F.clientWidth,q.height=F.clientHeight,q.x=q.left,q.y=q.top,q}function getClientRectFromMixedType(F,W,q){return W===viewport?rectToClientRect(getViewportRect(F,q)):isElement(W)?getInnerBoundingClientRect(W,q):rectToClientRect(getDocumentRect(getDocumentElement(F)))}function getClippingParents(F){var W=listScrollParents(getParentNode(F)),q=["absolute","fixed"].indexOf(getComputedStyle$1(F).position)>=0,K=q&&isHTMLElement(F)?getOffsetParent(F):F;return isElement(K)?W.filter(function(X){return isElement(X)&&contains(X,K)&&getNodeName(X)!=="body"}):[]}function getClippingRect(F,W,q,K){var X=W==="clippingParents"?getClippingParents(F):[].concat(W),tt=[].concat(X,[q]),rt=tt[0],ot=tt.reduce(function(ut,yn){var uo=getClientRectFromMixedType(F,yn,K);return ut.top=max$8(uo.top,ut.top),ut.right=min$7(uo.right,ut.right),ut.bottom=min$7(uo.bottom,ut.bottom),ut.left=max$8(uo.left,ut.left),ut},getClientRectFromMixedType(F,rt,K));return ot.width=ot.right-ot.left,ot.height=ot.bottom-ot.top,ot.x=ot.left,ot.y=ot.top,ot}function computeOffsets(F){var W=F.reference,q=F.element,K=F.placement,X=K?getBasePlacement(K):null,tt=K?getVariation(K):null,rt=W.x+W.width/2-q.width/2,ot=W.y+W.height/2-q.height/2,ut;switch(X){case top:ut={x:rt,y:W.y-q.height};break;case bottom:ut={x:rt,y:W.y+W.height};break;case right:ut={x:W.x+W.width,y:ot};break;case left:ut={x:W.x-q.width,y:ot};break;default:ut={x:W.x,y:W.y}}var yn=X?getMainAxisFromPlacement(X):null;if(yn!=null){var uo=yn==="y"?"height":"width";switch(tt){case start$1:ut[yn]=ut[yn]-(W[uo]/2-q[uo]/2);break;case end:ut[yn]=ut[yn]+(W[uo]/2-q[uo]/2);break}}return ut}function detectOverflow(F,W){W===void 0&&(W={});var q=W,K=q.placement,X=K===void 0?F.placement:K,tt=q.strategy,rt=tt===void 0?F.strategy:tt,ot=q.boundary,ut=ot===void 0?clippingParents:ot,yn=q.rootBoundary,uo=yn===void 0?viewport:yn,po=q.elementContext,mo=po===void 0?popper:po,wo=q.altBoundary,lf=wo===void 0?!1:wo,yf=q.padding,cf=yf===void 0?0:yf,vf=mergePaddingObject(typeof cf!="number"?cf:expandToHashMap(cf,basePlacements)),_f=mo===popper?reference:popper,$f=F.rects.popper,xf=F.elements[lf?_f:mo],Af=getClippingRect(isElement(xf)?xf:xf.contextElement||getDocumentElement(F.elements.popper),ut,uo,rt),Cf=getBoundingClientRect(F.elements.reference),Pf=computeOffsets({reference:Cf,element:$f,strategy:"absolute",placement:X}),Bf=rectToClientRect(Object.assign({},$f,Pf)),Hf=mo===popper?Bf:Cf,Df={top:Af.top-Hf.top+vf.top,bottom:Hf.bottom-Af.bottom+vf.bottom,left:Af.left-Hf.left+vf.left,right:Hf.right-Af.right+vf.right},Lf=F.modifiersData.offset;if(mo===popper&&Lf){var kf=Lf[X];Object.keys(Df).forEach(function(Nf){var Yf=[right,bottom].indexOf(Nf)>=0?1:-1,Gf=[top,bottom].indexOf(Nf)>=0?"y":"x";Df[Nf]+=kf[Gf]*Yf})}return Df}function computeAutoPlacement(F,W){W===void 0&&(W={});var q=W,K=q.placement,X=q.boundary,tt=q.rootBoundary,rt=q.padding,ot=q.flipVariations,ut=q.allowedAutoPlacements,yn=ut===void 0?placements:ut,uo=getVariation(K),po=uo?ot?variationPlacements:variationPlacements.filter(function(lf){return getVariation(lf)===uo}):basePlacements,mo=po.filter(function(lf){return yn.indexOf(lf)>=0});mo.length===0&&(mo=po);var wo=mo.reduce(function(lf,yf){return lf[yf]=detectOverflow(F,{placement:yf,boundary:X,rootBoundary:tt,padding:rt})[getBasePlacement(yf)],lf},{});return Object.keys(wo).sort(function(lf,yf){return wo[lf]-wo[yf]})}function getExpandedFallbackPlacements(F){if(getBasePlacement(F)===auto)return[];var W=getOppositePlacement(F);return[getOppositeVariationPlacement(F),W,getOppositeVariationPlacement(W)]}function flip(F){var W=F.state,q=F.options,K=F.name;if(!W.modifiersData[K]._skip){for(var X=q.mainAxis,tt=X===void 0?!0:X,rt=q.altAxis,ot=rt===void 0?!0:rt,ut=q.fallbackPlacements,yn=q.padding,uo=q.boundary,po=q.rootBoundary,mo=q.altBoundary,wo=q.flipVariations,lf=wo===void 0?!0:wo,yf=q.allowedAutoPlacements,cf=W.options.placement,vf=getBasePlacement(cf),_f=vf===cf,$f=ut||(_f||!lf?[getOppositePlacement(cf)]:getExpandedFallbackPlacements(cf)),xf=[cf].concat($f).reduce(function(Jp,ng){return Jp.concat(getBasePlacement(ng)===auto?computeAutoPlacement(W,{placement:ng,boundary:uo,rootBoundary:po,padding:yn,flipVariations:lf,allowedAutoPlacements:yf}):ng)},[]),Af=W.rects.reference,Cf=W.rects.popper,Pf=new Map,Bf=!0,Hf=xf[0],Df=0;Df=0,Gf=Yf?"width":"height",rp=detectOverflow(W,{placement:Lf,boundary:uo,rootBoundary:po,altBoundary:mo,padding:yn}),ip=Yf?Nf?right:left:Nf?bottom:top;Af[Gf]>Cf[Gf]&&(ip=getOppositePlacement(ip));var ap=getOppositePlacement(ip),yp=[];if(tt&&yp.push(rp[kf]<=0),ot&&yp.push(rp[ip]<=0,rp[ap]<=0),yp.every(function(Jp){return Jp})){Hf=Lf,Bf=!1;break}Pf.set(Lf,yp)}if(Bf)for(var vp=lf?3:1,Np=function(ng){var og=xf.find(function(vg){var Dp=Pf.get(vg);if(Dp)return Dp.slice(0,ng).every(function(Lp){return Lp})});if(og)return Hf=og,"break"},jp=vp;jp>0;jp--){var Ip=Np(jp);if(Ip==="break")break}W.placement!==Hf&&(W.modifiersData[K]._skip=!0,W.placement=Hf,W.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(F,W,q){return q===void 0&&(q={x:0,y:0}),{top:F.top-W.height-q.y,right:F.right-W.width+q.x,bottom:F.bottom-W.height+q.y,left:F.left-W.width-q.x}}function isAnySideFullyClipped(F){return[top,right,bottom,left].some(function(W){return F[W]>=0})}function hide(F){var W=F.state,q=F.name,K=W.rects.reference,X=W.rects.popper,tt=W.modifiersData.preventOverflow,rt=detectOverflow(W,{elementContext:"reference"}),ot=detectOverflow(W,{altBoundary:!0}),ut=getSideOffsets(rt,K),yn=getSideOffsets(ot,X,tt),uo=isAnySideFullyClipped(ut),po=isAnySideFullyClipped(yn);W.modifiersData[q]={referenceClippingOffsets:ut,popperEscapeOffsets:yn,isReferenceHidden:uo,hasPopperEscaped:po},W.attributes.popper=Object.assign({},W.attributes.popper,{"data-popper-reference-hidden":uo,"data-popper-escaped":po})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(F,W,q){var K=getBasePlacement(F),X=[left,top].indexOf(K)>=0?-1:1,tt=typeof q=="function"?q(Object.assign({},W,{placement:F})):q,rt=tt[0],ot=tt[1];return rt=rt||0,ot=(ot||0)*X,[left,right].indexOf(K)>=0?{x:ot,y:rt}:{x:rt,y:ot}}function offset$1(F){var W=F.state,q=F.options,K=F.name,X=q.offset,tt=X===void 0?[0,0]:X,rt=placements.reduce(function(uo,po){return uo[po]=distanceAndSkiddingToXY(po,W.rects,tt),uo},{}),ot=rt[W.placement],ut=ot.x,yn=ot.y;W.modifiersData.popperOffsets!=null&&(W.modifiersData.popperOffsets.x+=ut,W.modifiersData.popperOffsets.y+=yn),W.modifiersData[K]=rt}const offset$2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset$1};function popperOffsets(F){var W=F.state,q=F.name;W.modifiersData[q]=computeOffsets({reference:W.rects.reference,element:W.rects.popper,strategy:"absolute",placement:W.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(F){return F==="x"?"y":"x"}function preventOverflow(F){var W=F.state,q=F.options,K=F.name,X=q.mainAxis,tt=X===void 0?!0:X,rt=q.altAxis,ot=rt===void 0?!1:rt,ut=q.boundary,yn=q.rootBoundary,uo=q.altBoundary,po=q.padding,mo=q.tether,wo=mo===void 0?!0:mo,lf=q.tetherOffset,yf=lf===void 0?0:lf,cf=detectOverflow(W,{boundary:ut,rootBoundary:yn,padding:po,altBoundary:uo}),vf=getBasePlacement(W.placement),_f=getVariation(W.placement),$f=!_f,xf=getMainAxisFromPlacement(vf),Af=getAltAxis(xf),Cf=W.modifiersData.popperOffsets,Pf=W.rects.reference,Bf=W.rects.popper,Hf=typeof yf=="function"?yf(Object.assign({},W.rects,{placement:W.placement})):yf,Df=typeof Hf=="number"?{mainAxis:Hf,altAxis:Hf}:Object.assign({mainAxis:0,altAxis:0},Hf),Lf=W.modifiersData.offset?W.modifiersData.offset[W.placement]:null,kf={x:0,y:0};if(Cf){if(tt){var Nf,Yf=xf==="y"?top:left,Gf=xf==="y"?bottom:right,rp=xf==="y"?"height":"width",ip=Cf[xf],ap=ip+cf[Yf],yp=ip-cf[Gf],vp=wo?-Bf[rp]/2:0,Np=_f===start$1?Pf[rp]:Bf[rp],jp=_f===start$1?-Bf[rp]:-Pf[rp],Ip=W.elements.arrow,Jp=wo&&Ip?getLayoutRect(Ip):{width:0,height:0},ng=W.modifiersData["arrow#persistent"]?W.modifiersData["arrow#persistent"].padding:getFreshSideObject(),og=ng[Yf],vg=ng[Gf],Dp=within(0,Pf[rp],Jp[rp]),Lp=$f?Pf[rp]/2-vp-Dp-og-Df.mainAxis:Np-Dp-og-Df.mainAxis,xp=$f?-Pf[rp]/2+vp+Dp+vg+Df.mainAxis:jp+Dp+vg+Df.mainAxis,kp=W.elements.arrow&&getOffsetParent(W.elements.arrow),lp=kp?xf==="y"?kp.clientTop||0:kp.clientLeft||0:0,Of=(Nf=Lf==null?void 0:Lf[xf])!=null?Nf:0,qf=ip+Lp-Of-lp,cp=ip+xp-Of,hp=within(wo?min$7(ap,qf):ap,ip,wo?max$8(yp,cp):yp);Cf[xf]=hp,kf[xf]=hp-ip}if(ot){var $p,Vp=xf==="x"?top:left,bp=xf==="x"?bottom:right,Ep=Cf[Af],_p=Af==="y"?"height":"width",Mp=Ep+cf[Vp],Yp=Ep-cf[bp],ug=[top,left].indexOf(vf)!==-1,hg=($p=Lf==null?void 0:Lf[Af])!=null?$p:0,xg=ug?Mp:Ep-Pf[_p]-Bf[_p]-hg+Df.altAxis,kg=ug?Ep+Pf[_p]+Bf[_p]-hg-Df.altAxis:Yp,Dg=wo&&ug?withinMaxClamp(xg,Ep,kg):within(wo?xg:Mp,Ep,wo?kg:Yp);Cf[Af]=Dg,kf[Af]=Dg-Ep}W.modifiersData[K]=kf}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(F){return{scrollLeft:F.scrollLeft,scrollTop:F.scrollTop}}function getNodeScroll(F){return F===getWindow(F)||!isHTMLElement(F)?getWindowScroll(F):getHTMLElementScroll(F)}function isElementScaled(F){var W=F.getBoundingClientRect(),q=round$4(W.width)/F.offsetWidth||1,K=round$4(W.height)/F.offsetHeight||1;return q!==1||K!==1}function getCompositeRect(F,W,q){q===void 0&&(q=!1);var K=isHTMLElement(W),X=isHTMLElement(W)&&isElementScaled(W),tt=getDocumentElement(W),rt=getBoundingClientRect(F,X,q),ot={scrollLeft:0,scrollTop:0},ut={x:0,y:0};return(K||!K&&!q)&&((getNodeName(W)!=="body"||isScrollParent(tt))&&(ot=getNodeScroll(W)),isHTMLElement(W)?(ut=getBoundingClientRect(W,!0),ut.x+=W.clientLeft,ut.y+=W.clientTop):tt&&(ut.x=getWindowScrollBarX(tt))),{x:rt.left+ot.scrollLeft-ut.x,y:rt.top+ot.scrollTop-ut.y,width:rt.width,height:rt.height}}function order(F){var W=new Map,q=new Set,K=[];F.forEach(function(tt){W.set(tt.name,tt)});function X(tt){q.add(tt.name);var rt=[].concat(tt.requires||[],tt.requiresIfExists||[]);rt.forEach(function(ot){if(!q.has(ot)){var ut=W.get(ot);ut&&X(ut)}}),K.push(tt)}return F.forEach(function(tt){q.has(tt.name)||X(tt)}),K}function orderModifiers(F){var W=order(F);return modifierPhases.reduce(function(q,K){return q.concat(W.filter(function(X){return X.phase===K}))},[])}function debounce(F){var W;return function(){return W||(W=new Promise(function(q){Promise.resolve().then(function(){W=void 0,q(F())})})),W}}function mergeByName(F){var W=F.reduce(function(q,K){var X=q[K.name];return q[K.name]=X?Object.assign({},X,K,{options:Object.assign({},X.options,K.options),data:Object.assign({},X.data,K.data)}):K,q},{});return Object.keys(W).map(function(q){return W[q]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var F=arguments.length,W=new Array(F),q=0;q"u"||!L||!L.Mixin)){yo=$f(yo)?yo:[yo];for(var pf=0;pf0?Math.floor(yo):Math.ceil(yo)};ap.prototype={clone:function(){return new ap(this.x,this.y)},add:function(yo){return this.clone()._add(vp(yo))},_add:function(yo){return this.x+=yo.x,this.y+=yo.y,this},subtract:function(yo){return this.clone()._subtract(vp(yo))},_subtract:function(yo){return this.x-=yo.x,this.y-=yo.y,this},divideBy:function(yo){return this.clone()._divideBy(yo)},_divideBy:function(yo){return this.x/=yo,this.y/=yo,this},multiplyBy:function(yo){return this.clone()._multiplyBy(yo)},_multiplyBy:function(yo){return this.x*=yo,this.y*=yo,this},scaleBy:function(yo){return new ap(this.x*yo.x,this.y*yo.y)},unscaleBy:function(yo){return new ap(this.x/yo.x,this.y/yo.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=yp(this.x),this.y=yp(this.y),this},distanceTo:function(yo){yo=vp(yo);var pf=yo.x-this.x,Tf=yo.y-this.y;return Math.sqrt(pf*pf+Tf*Tf)},equals:function(yo){return yo=vp(yo),yo.x===this.x&&yo.y===this.y},contains:function(yo){return yo=vp(yo),Math.abs(yo.x)<=Math.abs(this.x)&&Math.abs(yo.y)<=Math.abs(this.y)},toString:function(){return"Point("+mo(this.x)+", "+mo(this.y)+")"}};function vp(yo,pf,Tf){return yo instanceof ap?yo:$f(yo)?new ap(yo[0],yo[1]):yo==null?yo:typeof yo=="object"&&"x"in yo&&"y"in yo?new ap(yo.x,yo.y):new ap(yo,pf,Tf)}function Np(yo,pf){if(yo)for(var Tf=pf?[yo,pf]:yo,Ff=0,Zf=Tf.length;Ff=this.min.x&&Tf.x<=this.max.x&&pf.y>=this.min.y&&Tf.y<=this.max.y},intersects:function(yo){yo=jp(yo);var pf=this.min,Tf=this.max,Ff=yo.min,Zf=yo.max,fp=Zf.x>=pf.x&&Ff.x<=Tf.x,Cp=Zf.y>=pf.y&&Ff.y<=Tf.y;return fp&&Cp},overlaps:function(yo){yo=jp(yo);var pf=this.min,Tf=this.max,Ff=yo.min,Zf=yo.max,fp=Zf.x>pf.x&&Ff.xpf.y&&Ff.y=pf.lat&&Zf.lat<=Tf.lat&&Ff.lng>=pf.lng&&Zf.lng<=Tf.lng},intersects:function(yo){yo=Jp(yo);var pf=this._southWest,Tf=this._northEast,Ff=yo.getSouthWest(),Zf=yo.getNorthEast(),fp=Zf.lat>=pf.lat&&Ff.lat<=Tf.lat,Cp=Zf.lng>=pf.lng&&Ff.lng<=Tf.lng;return fp&&Cp},overlaps:function(yo){yo=Jp(yo);var pf=this._southWest,Tf=this._northEast,Ff=yo.getSouthWest(),Zf=yo.getNorthEast(),fp=Zf.lat>pf.lat&&Ff.latpf.lng&&Ff.lng1,Hg=function(){var yo=!1;try{var pf=Object.defineProperty({},"passive",{get:function(){yo=!0}});window.addEventListener("testPassiveEventSupport",po,pf),window.removeEventListener("testPassiveEventSupport",po,pf)}catch{}return yo}(),Iy=function(){return!!document.createElement("canvas").getContext}(),py=!!(document.createElementNS&&cp("svg").createSVGRect),Yy=!!py&&function(){var yo=document.createElement("div");return yo.innerHTML="",(yo.firstChild&&yo.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Yb=!py&&function(){try{var yo=document.createElement("div");yo.innerHTML='';var pf=yo.firstChild;return pf.style.behavior="url(#default#VML)",pf&&typeof pf.adj=="object"}catch{return!1}}(),p0=navigator.platform.indexOf("Mac")===0,_b=navigator.platform.indexOf("Linux")===0;function Fy(yo){return navigator.userAgent.toLowerCase().indexOf(yo)>=0}var qg={ie:Vp,ielt9:bp,edge:Ep,webkit:_p,android:Mp,android23:Yp,androidStock:hg,opera:xg,chrome:kg,gecko:Dg,safari:lm,phantom:Bp,opera12:Rp,win:Fp,ie3d:Op,webkit3d:Kp,gecko3d:Kf,any3d:Xf,mobile:gp,mobileWebkit:wp,mobileWebkit3d:dg,msPointer:mg,pointer:pg,touch:Cg,touchNative:wg,mobileOpera:Bg,mobileGecko:Xg,retina:mm,passiveEvents:Hg,canvas:Iy,svg:py,vml:Yb,inlineSvg:Yy,mac:p0,linux:_b},E1=qg.msPointer?"MSPointerDown":"pointerdown",A$=qg.msPointer?"MSPointerMove":"pointermove",qv=qg.msPointer?"MSPointerUp":"pointerup",H0=qg.msPointer?"MSPointerCancel":"pointercancel",wb={touchstart:E1,touchmove:A$,touchend:qv,touchcancel:H0},R$={touchstart:By,touchmove:Cv,touchend:Cv,touchcancel:Cv},g0={},m_=!1;function Jg(yo,pf,Tf){return pf==="touchstart"&&Py(),R$[pf]?(Tf=R$[pf].bind(this,Tf),yo.addEventListener(wb[pf],Tf,!1),Tf):(console.warn("wrong event specified:",pf),po)}function Hp(yo,pf,Tf){if(!wb[pf]){console.warn("wrong event specified:",pf);return}yo.removeEventListener(wb[pf],Tf,!1)}function Eg(yo){g0[yo.pointerId]=yo}function Gg(yo){g0[yo.pointerId]&&(g0[yo.pointerId]=yo)}function yv(yo){delete g0[yo.pointerId]}function Py(){m_||(document.addEventListener(E1,Eg,!0),document.addEventListener(A$,Gg,!0),document.addEventListener(qv,yv,!0),document.addEventListener(H0,yv,!0),m_=!0)}function Cv(yo,pf){if(pf.pointerType!==(pf.MSPOINTER_TYPE_MOUSE||"mouse")){pf.touches=[];for(var Tf in g0)pf.touches.push(g0[Tf]);pf.changedTouches=[pf],yo(pf)}}function By(yo,pf){pf.MSPOINTER_TYPE_TOUCH&&pf.pointerType===pf.MSPOINTER_TYPE_TOUCH&&ty(pf),Cv(yo,pf)}function S1(yo){var pf={},Tf,Ff;for(Ff in yo)Tf=yo[Ff],pf[Ff]=Tf&&Tf.bind?Tf.bind(yo):Tf;return yo=pf,pf.type="dblclick",pf.detail=2,pf.isTrusted=!1,pf._simulated=!0,pf}var T1=200;function jy(yo,pf){yo.addEventListener("dblclick",pf);var Tf=0,Ff;function Zf(fp){if(fp.detail!==1){Ff=fp.detail;return}if(!(fp.pointerType==="mouse"||fp.sourceCapabilities&&!fp.sourceCapabilities.firesTouchEvents)){var Cp=Sx(fp);if(!(Cp.some(function(sg){return sg instanceof HTMLLabelElement&&sg.attributes.for})&&!Cp.some(function(sg){return sg instanceof HTMLInputElement||sg instanceof HTMLSelectElement}))){var Zp=Date.now();Zp-Tf<=T1?(Ff++,Ff===2&&pf(S1(fp))):Ff=1,Tf=Zp}}}return yo.addEventListener("click",Zf),{dblclick:pf,simDblclick:Zf}}function cw(yo,pf){yo.removeEventListener("dblclick",pf.dblclick),yo.removeEventListener("click",pf.simDblclick)}var xb=v_(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),N$=v_(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),$x=N$==="webkitTransition"||N$==="OTransition"?N$+"End":"transitionend";function _x(yo){return typeof yo=="string"?document.getElementById(yo):yo}function Kb(yo,pf){var Tf=yo.style[pf]||yo.currentStyle&&yo.currentStyle[pf];if((!Tf||Tf==="auto")&&document.defaultView){var Ff=document.defaultView.getComputedStyle(yo,null);Tf=Ff?Ff[pf]:null}return Tf==="auto"?null:Tf}function dv(yo,pf,Tf){var Ff=document.createElement(yo);return Ff.className=pf||"",Tf&&Tf.appendChild(Ff),Ff}function Ov(yo){var pf=yo.parentNode;pf&&pf.removeChild(yo)}function Xb(yo){for(;yo.firstChild;)yo.removeChild(yo.firstChild)}function Y1(yo){var pf=yo.parentNode;pf&&pf.lastChild!==yo&&pf.appendChild(yo)}function K1(yo){var pf=yo.parentNode;pf&&pf.firstChild!==yo&&pf.insertBefore(yo,pf.firstChild)}function Zb(yo,pf){if(yo.classList!==void 0)return yo.classList.contains(pf);var Tf=Zg(yo);return Tf.length>0&&new RegExp("(^|\\s)"+pf+"(\\s|$)").test(Tf)}function Tm(yo,pf){if(yo.classList!==void 0)for(var Tf=lf(pf),Ff=0,Zf=Tf.length;Ff0?2*window.devicePixelRatio:1;function R2(yo){return qg.edge?yo.wheelDeltaY/2:yo.deltaY&&yo.deltaMode===0?-yo.deltaY/qE:yo.deltaY&&yo.deltaMode===1?-yo.deltaY*20:yo.deltaY&&yo.deltaMode===2?-yo.deltaY*60:yo.deltaX||yo.deltaZ?0:yo.wheelDelta?(yo.wheelDeltaY||yo.wheelDelta)/2:yo.detail&&Math.abs(yo.detail)<32765?-yo.detail*20:yo.detail?yo.detail/-32765*60:0}function V0(yo,pf){var Tf=pf.relatedTarget;if(!Tf)return!0;try{for(;Tf&&Tf!==yo;)Tf=Tf.parentNode}catch{return!1}return Tf!==yo}var r0={__proto__:null,on:xm,off:um,stopPropagation:e$,disableScrollPropagation:Ex,disableClickPropagation:U0,preventDefault:ty,stop:Sb,getPropagationPath:Sx,getMousePosition:A2,getWheelDelta:R2,isExternalTarget:V0,addListener:xm,removeListener:um},pw=ip.extend({run:function(yo,pf,Tf,Ff){this.stop(),this._el=yo,this._inProgress=!0,this._duration=Tf||.25,this._easeOutPower=1/Math.max(Ff||.5,.2),this._startPos=Iv(yo),this._offset=pf.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=Lf(this._animate,this),this._step()},_step:function(yo){var pf=+new Date-this._startTime,Tf=this._duration*1e3;pfthis.options.maxZoom)?this.setZoom(yo):this},panInsideBounds:function(yo,pf){this._enforcingBounds=!0;var Tf=this.getCenter(),Ff=this._limitCenter(Tf,this._zoom,Jp(yo));return Tf.equals(Ff)||this.panTo(Ff,pf),this._enforcingBounds=!1,this},panInside:function(yo,pf){pf=pf||{};var Tf=vp(pf.paddingTopLeft||pf.padding||[0,0]),Ff=vp(pf.paddingBottomRight||pf.padding||[0,0]),Zf=this.project(this.getCenter()),fp=this.project(yo),Cp=this.getPixelBounds(),Zp=jp([Cp.min.add(Tf),Cp.max.subtract(Ff)]),sg=Zp.getSize();if(!Zp.contains(fp)){this._enforcingBounds=!0;var yg=fp.subtract(Zp.getCenter()),Lg=Zp.extend(fp).getSize().subtract(sg);Zf.x+=yg.x<0?-Lg.x:Lg.x,Zf.y+=yg.y<0?-Lg.y:Lg.y,this.panTo(this.unproject(Zf),pf),this._enforcingBounds=!1}return this},invalidateSize:function(yo){if(!this._loaded)return this;yo=X({animate:!1,pan:!0},yo===!0?{animate:!0}:yo);var pf=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var Tf=this.getSize(),Ff=pf.divideBy(2).round(),Zf=Tf.divideBy(2).round(),fp=Ff.subtract(Zf);return!fp.x&&!fp.y?this:(yo.animate&&yo.pan?this.panBy(fp):(yo.pan&&this._rawPanBy(fp),this.fire("move"),yo.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(rt(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:pf,newSize:Tf}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(yo){if(yo=this._locateOptions=X({timeout:1e4,watch:!1},yo),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var pf=rt(this._handleGeolocationResponse,this),Tf=rt(this._handleGeolocationError,this);return yo.watch?this._locationWatchId=navigator.geolocation.watchPosition(pf,Tf,yo):navigator.geolocation.getCurrentPosition(pf,Tf,yo),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(yo){if(this._container._leaflet_id){var pf=yo.code,Tf=yo.message||(pf===1?"permission denied":pf===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:pf,message:"Geolocation error: "+Tf+"."})}},_handleGeolocationResponse:function(yo){if(this._container._leaflet_id){var pf=yo.coords.latitude,Tf=yo.coords.longitude,Ff=new ng(pf,Tf),Zf=Ff.toBounds(yo.coords.accuracy*2),fp=this._locateOptions;if(fp.setView){var Cp=this.getBoundsZoom(Zf);this.setView(Ff,fp.maxZoom?Math.min(Cp,fp.maxZoom):Cp)}var Zp={latlng:Ff,bounds:Zf,timestamp:yo.timestamp};for(var sg in yo.coords)typeof yo.coords[sg]=="number"&&(Zp[sg]=yo.coords[sg]);this.fire("locationfound",Zp)}},addHandler:function(yo,pf){if(!pf)return this;var Tf=this[yo]=new pf(this);return this._handlers.push(Tf),this.options[yo]&&Tf.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Ov(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(kf(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var yo;for(yo in this._layers)this._layers[yo].remove();for(yo in this._panes)Ov(this._panes[yo]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(yo,pf){var Tf="leaflet-pane"+(yo?" leaflet-"+yo.replace("Pane","")+"-pane":""),Ff=dv("div",Tf,pf||this._mapPane);return yo&&(this._panes[yo]=Ff),Ff},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var yo=this.getPixelBounds(),pf=this.unproject(yo.getBottomLeft()),Tf=this.unproject(yo.getTopRight());return new Ip(pf,Tf)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(yo,pf,Tf){yo=Jp(yo),Tf=vp(Tf||[0,0]);var Ff=this.getZoom()||0,Zf=this.getMinZoom(),fp=this.getMaxZoom(),Cp=yo.getNorthWest(),Zp=yo.getSouthEast(),sg=this.getSize().subtract(Tf),yg=jp(this.project(Zp,Ff),this.project(Cp,Ff)).getSize(),Lg=qg.any3d?this.options.zoomSnap:1,hm=sg.x/yg.x,Im=sg.y/yg.y,Ky=pf?Math.max(hm,Im):Math.min(hm,Im);return Ff=this.getScaleZoom(Ky,Ff),Lg&&(Ff=Math.round(Ff/(Lg/100))*(Lg/100),Ff=pf?Math.ceil(Ff/Lg)*Lg:Math.floor(Ff/Lg)*Lg),Math.max(Zf,Math.min(fp,Ff))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new ap(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(yo,pf){var Tf=this._getTopLeftPoint(yo,pf);return new Np(Tf,Tf.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(yo){return this.options.crs.getProjectedBounds(yo===void 0?this.getZoom():yo)},getPane:function(yo){return typeof yo=="string"?this._panes[yo]:yo},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(yo,pf){var Tf=this.options.crs;return pf=pf===void 0?this._zoom:pf,Tf.scale(yo)/Tf.scale(pf)},getScaleZoom:function(yo,pf){var Tf=this.options.crs;pf=pf===void 0?this._zoom:pf;var Ff=Tf.zoom(yo*Tf.scale(pf));return isNaN(Ff)?1/0:Ff},project:function(yo,pf){return pf=pf===void 0?this._zoom:pf,this.options.crs.latLngToPoint(og(yo),pf)},unproject:function(yo,pf){return pf=pf===void 0?this._zoom:pf,this.options.crs.pointToLatLng(vp(yo),pf)},layerPointToLatLng:function(yo){var pf=vp(yo).add(this.getPixelOrigin());return this.unproject(pf)},latLngToLayerPoint:function(yo){var pf=this.project(og(yo))._round();return pf._subtract(this.getPixelOrigin())},wrapLatLng:function(yo){return this.options.crs.wrapLatLng(og(yo))},wrapLatLngBounds:function(yo){return this.options.crs.wrapLatLngBounds(Jp(yo))},distance:function(yo,pf){return this.options.crs.distance(og(yo),og(pf))},containerPointToLayerPoint:function(yo){return vp(yo).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(yo){return vp(yo).add(this._getMapPanePos())},containerPointToLatLng:function(yo){var pf=this.containerPointToLayerPoint(vp(yo));return this.layerPointToLatLng(pf)},latLngToContainerPoint:function(yo){return this.layerPointToContainerPoint(this.latLngToLayerPoint(og(yo)))},mouseEventToContainerPoint:function(yo){return A2(yo,this._container)},mouseEventToLayerPoint:function(yo){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(yo))},mouseEventToLatLng:function(yo){return this.layerPointToLatLng(this.mouseEventToLayerPoint(yo))},_initContainer:function(yo){var pf=this._container=_x(yo);if(pf){if(pf._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");xm(pf,"scroll",this._onScroll,this),this._containerId=ut(pf)},_initLayout:function(){var yo=this._container;this._fadeAnimated=this.options.fadeAnimation&&qg.any3d,Tm(yo,"leaflet-container"+(qg.touch?" leaflet-touch":"")+(qg.retina?" leaflet-retina":"")+(qg.ielt9?" leaflet-oldie":"")+(qg.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var pf=Kb(yo,"position");pf!=="absolute"&&pf!=="relative"&&pf!=="fixed"&&pf!=="sticky"&&(yo.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var yo=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Yv(this._mapPane,new ap(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Tm(yo.markerPane,"leaflet-zoom-hide"),Tm(yo.shadowPane,"leaflet-zoom-hide"))},_resetView:function(yo,pf,Tf){Yv(this._mapPane,new ap(0,0));var Ff=!this._loaded;this._loaded=!0,pf=this._limitZoom(pf),this.fire("viewprereset");var Zf=this._zoom!==pf;this._moveStart(Zf,Tf)._move(yo,pf)._moveEnd(Zf),this.fire("viewreset"),Ff&&this.fire("load")},_moveStart:function(yo,pf){return yo&&this.fire("zoomstart"),pf||this.fire("movestart"),this},_move:function(yo,pf,Tf,Ff){pf===void 0&&(pf=this._zoom);var Zf=this._zoom!==pf;return this._zoom=pf,this._lastCenter=yo,this._pixelOrigin=this._getNewPixelOrigin(yo),Ff?Tf&&Tf.pinch&&this.fire("zoom",Tf):((Zf||Tf&&Tf.pinch)&&this.fire("zoom",Tf),this.fire("move",Tf)),this},_moveEnd:function(yo){return yo&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return kf(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(yo){Yv(this._mapPane,this._getMapPanePos().subtract(yo))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(yo){this._targets={},this._targets[ut(this._container)]=this;var pf=yo?um:xm;pf(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&pf(window,"resize",this._onResize,this),qg.any3d&&this.options.transform3DLimit&&(yo?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){kf(this._resizeRequest),this._resizeRequest=Lf(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var yo=this._getMapPanePos();Math.max(Math.abs(yo.x),Math.abs(yo.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(yo,pf){for(var Tf=[],Ff,Zf=pf==="mouseout"||pf==="mouseover",fp=yo.target||yo.srcElement,Cp=!1;fp;){if(Ff=this._targets[ut(fp)],Ff&&(pf==="click"||pf==="preclick")&&this._draggableMoved(Ff)){Cp=!0;break}if(Ff&&Ff.listens(pf,!0)&&(Zf&&!V0(fp,yo)||(Tf.push(Ff),Zf))||fp===this._container)break;fp=fp.parentNode}return!Tf.length&&!Cp&&!Zf&&this.listens(pf,!0)&&(Tf=[this]),Tf},_isClickDisabled:function(yo){for(;yo&&yo!==this._container;){if(yo._leaflet_disable_click)return!0;yo=yo.parentNode}},_handleDOMEvent:function(yo){var pf=yo.target||yo.srcElement;if(!(!this._loaded||pf._leaflet_disable_events||yo.type==="click"&&this._isClickDisabled(pf))){var Tf=yo.type;Tf==="mousedown"&&fw(pf),this._fireDOMEvent(yo,Tf)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(yo,pf,Tf){if(yo.type==="click"){var Ff=X({},yo);Ff.type="preclick",this._fireDOMEvent(Ff,Ff.type,Tf)}var Zf=this._findEventTargets(yo,pf);if(Tf){for(var fp=[],Cp=0;Cp0?Math.round(yo-pf)/2:Math.max(0,Math.ceil(yo))-Math.max(0,Math.floor(pf))},_limitZoom:function(yo){var pf=this.getMinZoom(),Tf=this.getMaxZoom(),Ff=qg.any3d?this.options.zoomSnap:1;return Ff&&(yo=Math.round(yo/Ff)*Ff),Math.max(pf,Math.min(Tf,yo))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){cm(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(yo,pf){var Tf=this._getCenterOffset(yo)._trunc();return(pf&&pf.animate)!==!0&&!this.getSize().contains(Tf)?!1:(this.panBy(Tf,pf),!0)},_createAnimProxy:function(){var yo=this._proxy=dv("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(yo),this.on("zoomanim",function(pf){var Tf=xb,Ff=this._proxy.style[Tf];X1(this._proxy,this.project(pf.center,pf.zoom),this.getZoomScale(pf.zoom,1)),Ff===this._proxy.style[Tf]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Ov(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var yo=this.getCenter(),pf=this.getZoom();X1(this._proxy,this.project(yo,pf),this.getZoomScale(pf,1))},_catchTransitionEnd:function(yo){this._animatingZoom&&yo.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(yo,pf,Tf){if(this._animatingZoom)return!0;if(Tf=Tf||{},!this._zoomAnimated||Tf.animate===!1||this._nothingToAnimate()||Math.abs(pf-this._zoom)>this.options.zoomAnimationThreshold)return!1;var Ff=this.getZoomScale(pf),Zf=this._getCenterOffset(yo)._divideBy(1-1/Ff);return Tf.animate!==!0&&!this.getSize().contains(Zf)?!1:(Lf(function(){this._moveStart(!0,Tf.noMoveStart||!1)._animateZoom(yo,pf,!0)},this),!0)},_animateZoom:function(yo,pf,Tf,Ff){this._mapPane&&(Tf&&(this._animatingZoom=!0,this._animateToCenter=yo,this._animateToZoom=pf,Tm(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:yo,zoom:pf,noUpdate:Ff}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(rt(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&cm(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function YE(yo,pf){return new lv(yo,pf)}var m0=Yf.extend({options:{position:"topright"},initialize:function(yo){yf(this,yo)},getPosition:function(){return this.options.position},setPosition:function(yo){var pf=this._map;return pf&&pf.removeControl(this),this.options.position=yo,pf&&pf.addControl(this),this},getContainer:function(){return this._container},addTo:function(yo){this.remove(),this._map=yo;var pf=this._container=this.onAdd(yo),Tf=this.getPosition(),Ff=yo._controlCorners[Tf];return Tm(pf,"leaflet-control"),Tf.indexOf("bottom")!==-1?Ff.insertBefore(pf,Ff.firstChild):Ff.appendChild(pf),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Ov(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(yo){this._map&&yo&&yo.screenX>0&&yo.screenY>0&&this._map.getContainer().focus()}}),F$=function(yo){return new m0(yo)};lv.include({addControl:function(yo){return yo.addTo(this),this},removeControl:function(yo){return yo.remove(),this},_initControlPos:function(){var yo=this._controlCorners={},pf="leaflet-",Tf=this._controlContainer=dv("div",pf+"control-container",this._container);function Ff(Zf,fp){var Cp=pf+Zf+" "+pf+fp;yo[Zf+fp]=dv("div",Cp,Tf)}Ff("top","left"),Ff("top","right"),Ff("bottom","left"),Ff("bottom","right")},_clearControlPos:function(){for(var yo in this._controlCorners)Ov(this._controlCorners[yo]);Ov(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var __=m0.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(yo,pf,Tf,Ff){return Tf1,this._baseLayersList.style.display=yo?"":"none"),this._separator.style.display=pf&&yo?"":"none",this},_onLayerChange:function(yo){this._handlingClick||this._update();var pf=this._getLayer(ut(yo.target)),Tf=pf.overlay?yo.type==="add"?"overlayadd":"overlayremove":yo.type==="add"?"baselayerchange":null;Tf&&this._map.fire(Tf,pf)},_createRadioElement:function(yo,pf){var Tf='",Ff=document.createElement("div");return Ff.innerHTML=Tf,Ff.firstChild},_addItem:function(yo){var pf=document.createElement("label"),Tf=this._map.hasLayer(yo.layer),Ff;yo.overlay?(Ff=document.createElement("input"),Ff.type="checkbox",Ff.className="leaflet-control-layers-selector",Ff.defaultChecked=Tf):Ff=this._createRadioElement("leaflet-base-layers_"+ut(this),Tf),this._layerControlInputs.push(Ff),Ff.layerId=ut(yo.layer),xm(Ff,"click",this._onInputClick,this);var Zf=document.createElement("span");Zf.innerHTML=" "+yo.name;var fp=document.createElement("span");pf.appendChild(fp),fp.appendChild(Ff),fp.appendChild(Zf);var Cp=yo.overlay?this._overlaysList:this._baseLayersList;return Cp.appendChild(pf),this._checkDisabledLayers(),pf},_onInputClick:function(){if(!this._preventClick){var yo=this._layerControlInputs,pf,Tf,Ff=[],Zf=[];this._handlingClick=!0;for(var fp=yo.length-1;fp>=0;fp--)pf=yo[fp],Tf=this._getLayer(pf.layerId).layer,pf.checked?Ff.push(Tf):pf.checked||Zf.push(Tf);for(fp=0;fp=0;Zf--)pf=yo[Zf],Tf=this._getLayer(pf.layerId).layer,pf.disabled=Tf.options.minZoom!==void 0&&FfTf.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var yo=this._section;this._preventClick=!0,xm(yo,"click",ty),this.expand();var pf=this;setTimeout(function(){um(yo,"click",ty),pf._preventClick=!1})}}),w_=function(yo,pf,Tf){return new __(yo,pf,Tf)},x_=m0.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(yo){var pf="leaflet-control-zoom",Tf=dv("div",pf+" leaflet-bar"),Ff=this.options;return this._zoomInButton=this._createButton(Ff.zoomInText,Ff.zoomInTitle,pf+"-in",Tf,this._zoomIn),this._zoomOutButton=this._createButton(Ff.zoomOutText,Ff.zoomOutTitle,pf+"-out",Tf,this._zoomOut),this._updateDisabled(),yo.on("zoomend zoomlevelschange",this._updateDisabled,this),Tf},onRemove:function(yo){yo.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(yo){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(yo.shiftKey?3:1))},_createButton:function(yo,pf,Tf,Ff,Zf){var fp=dv("a",Tf,Ff);return fp.innerHTML=yo,fp.href="#",fp.title=pf,fp.setAttribute("role","button"),fp.setAttribute("aria-label",pf),U0(fp),xm(fp,"click",Sb),xm(fp,"click",Zf,this),xm(fp,"click",this._refocusOnMap,this),fp},_updateDisabled:function(){var yo=this._map,pf="leaflet-disabled";cm(this._zoomInButton,pf),cm(this._zoomOutButton,pf),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||yo._zoom===yo.getMinZoom())&&(Tm(this._zoomOutButton,pf),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||yo._zoom===yo.getMaxZoom())&&(Tm(this._zoomInButton,pf),this._zoomInButton.setAttribute("aria-disabled","true"))}});lv.mergeOptions({zoomControl:!0}),lv.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new x_,this.addControl(this.zoomControl))});var KE=function(yo){return new x_(yo)},N2=m0.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(yo){var pf="leaflet-control-scale",Tf=dv("div",pf),Ff=this.options;return this._addScales(Ff,pf+"-line",Tf),yo.on(Ff.updateWhenIdle?"moveend":"move",this._update,this),yo.whenReady(this._update,this),Tf},onRemove:function(yo){yo.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(yo,pf,Tf){yo.metric&&(this._mScale=dv("div",pf,Tf)),yo.imperial&&(this._iScale=dv("div",pf,Tf))},_update:function(){var yo=this._map,pf=yo.getSize().y/2,Tf=yo.distance(yo.containerPointToLatLng([0,pf]),yo.containerPointToLatLng([this.options.maxWidth,pf]));this._updateScales(Tf)},_updateScales:function(yo){this.options.metric&&yo&&this._updateMetric(yo),this.options.imperial&&yo&&this._updateImperial(yo)},_updateMetric:function(yo){var pf=this._getRoundNum(yo),Tf=pf<1e3?pf+" m":pf/1e3+" km";this._updateScale(this._mScale,Tf,pf/yo)},_updateImperial:function(yo){var pf=yo*3.2808399,Tf,Ff,Zf;pf>5280?(Tf=pf/5280,Ff=this._getRoundNum(Tf),this._updateScale(this._iScale,Ff+" mi",Ff/Tf)):(Zf=this._getRoundNum(pf),this._updateScale(this._iScale,Zf+" ft",Zf/pf))},_updateScale:function(yo,pf,Tf){yo.style.width=Math.round(this.options.maxWidth*Tf)+"px",yo.innerHTML=pf},_getRoundNum:function(yo){var pf=Math.pow(10,(Math.floor(yo)+"").length-1),Tf=yo/pf;return Tf=Tf>=10?10:Tf>=5?5:Tf>=3?3:Tf>=2?2:1,pf*Tf}}),M2=function(yo){return new N2(yo)},Tx='',gw=m0.extend({options:{position:"bottomright",prefix:'
'+(qg.inlineSvg?Tx+" ":"")+"Leaflet"},initialize:function(yo){yf(this,yo),this._attributions={}},onAdd:function(yo){yo.attributionControl=this,this._container=dv("div","leaflet-control-attribution"),U0(this._container);for(var pf in yo._layers)yo._layers[pf].getAttribution&&this.addAttribution(yo._layers[pf].getAttribution());return this._update(),yo.on("layeradd",this._addAttribution,this),this._container},onRemove:function(yo){yo.off("layeradd",this._addAttribution,this)},_addAttribution:function(yo){yo.layer.getAttribution&&(this.addAttribution(yo.layer.getAttribution()),yo.layer.once("remove",function(){this.removeAttribution(yo.layer.getAttribution())},this))},setPrefix:function(yo){return this.options.prefix=yo,this._update(),this},addAttribution:function(yo){return yo?(this._attributions[yo]||(this._attributions[yo]=0),this._attributions[yo]++,this._update(),this):this},removeAttribution:function(yo){return yo?(this._attributions[yo]&&(this._attributions[yo]--,this._update()),this):this},_update:function(){if(this._map){var yo=[];for(var pf in this._attributions)this._attributions[pf]&&yo.push(pf);var Tf=[];this.options.prefix&&Tf.push(this.options.prefix),yo.length&&Tf.push(yo.join(", ")),this._container.innerHTML=Tf.join(' ')}}});lv.mergeOptions({attributionControl:!0}),lv.addInitHook(function(){this.options.attributionControl&&new gw().addTo(this)});var D2=function(yo){return new gw(yo)};m0.Layers=__,m0.Zoom=x_,m0.Scale=N2,m0.Attribution=gw,F$.layers=w_,F$.zoom=KE,F$.scale=M2,F$.attribution=D2;var $y=Yf.extend({initialize:function(yo){this._map=yo},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});$y.addTo=function(yo,pf){return yo.addHandler(pf,this),this};var kx={Events:rp},k1=qg.touch?"touchstart mousedown":"mousedown",n1=ip.extend({options:{clickTolerance:3},initialize:function(yo,pf,Tf,Ff){yf(this,Ff),this._element=yo,this._dragStartTarget=pf||yo,this._preventOutline=Tf},enable:function(){this._enabled||(xm(this._dragStartTarget,k1,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(n1._dragging===this&&this.finishDrag(!0),um(this._dragStartTarget,k1,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(yo){if(this._enabled&&(this._moved=!1,!Zb(this._element,"leaflet-zoom-anim"))){if(yo.touches&&yo.touches.length!==1){n1._dragging===this&&this.finishDrag();return}if(!(n1._dragging||yo.shiftKey||yo.which!==1&&yo.button!==1&&!yo.touches)&&(n1._dragging=this,this._preventOutline&&fw(this._element),Jb(),Z1(),!this._moving)){this.fire("down");var pf=yo.touches?yo.touches[0]:yo,Tf=b_(this._element);this._startPoint=new ap(pf.clientX,pf.clientY),this._startPos=Iv(this._element),this._parentScale=L$(Tf);var Ff=yo.type==="mousedown";xm(document,Ff?"mousemove":"touchmove",this._onMove,this),xm(document,Ff?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(yo){if(this._enabled){if(yo.touches&&yo.touches.length>1){this._moved=!0;return}var pf=yo.touches&&yo.touches.length===1?yo.touches[0]:yo,Tf=new ap(pf.clientX,pf.clientY)._subtract(this._startPoint);!Tf.x&&!Tf.y||Math.abs(Tf.x)+Math.abs(Tf.y)fp&&(Cp=Zp,fp=sg);fp>Tf&&(pf[Cp]=1,n0(yo,pf,Tf,Ff,Cp),n0(yo,pf,Tf,Cp,Zf))}function j$(yo,pf){for(var Tf=[yo[0]],Ff=1,Zf=0,fp=yo.length;Ffpf&&(Tf.push(yo[Ff]),Zf=Ff);return Zfpf.max.x&&(Tf|=2),yo.ypf.max.y&&(Tf|=8),Tf}function Cx(yo,pf){var Tf=pf.x-yo.x,Ff=pf.y-yo.y;return Tf*Tf+Ff*Ff}function T_(yo,pf,Tf,Ff){var Zf=pf.x,fp=pf.y,Cp=Tf.x-Zf,Zp=Tf.y-fp,sg=Cp*Cp+Zp*Zp,yg;return sg>0&&(yg=((yo.x-Zf)*Cp+(yo.y-fp)*Zp)/sg,yg>1?(Zf=Tf.x,fp=Tf.y):yg>0&&(Zf+=Cp*yg,fp+=Zp*yg)),Cp=yo.x-Zf,Zp=yo.y-fp,Ff?Cp*Cp+Zp*Zp:new ap(Zf,fp)}function zy(yo){return!$f(yo[0])||typeof yo[0][0]!="object"&&typeof yo[0][0]<"u"}function B2(yo){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),zy(yo)}function gy(yo,pf){var Tf,Ff,Zf,fp,Cp,Zp,sg,yg;if(!yo||yo.length===0)throw new Error("latlngs not passed");zy(yo)||(console.warn("latlngs are not flat! Only the first ring will be used"),yo=yo[0]);var Lg=og([0,0]),hm=Jp(yo),Im=hm.getNorthWest().distanceTo(hm.getSouthWest())*hm.getNorthEast().distanceTo(hm.getNorthWest());Im<1700&&(Lg=mw(yo));var Ky=yo.length,ry=[];for(Tf=0;TfFf){sg=(fp-Ff)/Zf,yg=[Zp.x-sg*(Zp.x-Cp.x),Zp.y-sg*(Zp.y-Cp.y)];break}var i0=pf.unproject(vp(yg));return og([i0.lat+Lg.lat,i0.lng+Lg.lng])}var C1={__proto__:null,simplify:S_,pointToSegmentDistance:vw,closestPointOnSegment:B$,clipSegment:F2,_getEdgeIntersection:yw,_getBitCode:t$,_sqClosestPointOnSegment:T_,isFlat:zy,_flat:B2,polylineCenter:gy},r$={project:function(yo){return new ap(yo.lng,yo.lat)},unproject:function(yo){return new ng(yo.y,yo.x)},bounds:new Np([-180,-90],[180,90])},n$={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Np([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(yo){var pf=Math.PI/180,Tf=this.R,Ff=yo.lat*pf,Zf=this.R_MINOR/Tf,fp=Math.sqrt(1-Zf*Zf),Cp=fp*Math.sin(Ff),Zp=Math.tan(Math.PI/4-Ff/2)/Math.pow((1-Cp)/(1+Cp),fp/2);return Ff=-Tf*Math.log(Math.max(Zp,1e-10)),new ap(yo.lng*pf*Tf,Ff)},unproject:function(yo){for(var pf=180/Math.PI,Tf=this.R,Ff=this.R_MINOR/Tf,Zf=Math.sqrt(1-Ff*Ff),fp=Math.exp(-yo.y/Tf),Cp=Math.PI/2-2*Math.atan(fp),Zp=0,sg=.1,yg;Zp<15&&Math.abs(sg)>1e-7;Zp++)yg=Zf*Math.sin(Cp),yg=Math.pow((1-yg)/(1+yg),Zf/2),sg=Math.PI/2-2*Math.atan(fp*yg)-Cp,Cp+=sg;return new ng(Cp*pf,yo.x*pf/Tf)}},z$={__proto__:null,LonLat:r$,Mercator:n$,SphericalMercator:xp},bw=X({},Dp,{code:"EPSG:3395",projection:n$,transformation:function(){var yo=.5/(Math.PI*n$.R);return lp(yo,.5,-yo,.5)}()}),Ay=X({},Dp,{code:"EPSG:4326",projection:r$,transformation:lp(1/180,1,-1/180,.5)}),Ox=X({},vg,{projection:r$,transformation:lp(1,0,-1,0),scale:function(yo){return Math.pow(2,yo)},zoom:function(yo){return Math.log(yo)/Math.LN2},distance:function(yo,pf){var Tf=pf.lng-yo.lng,Ff=pf.lat-yo.lat;return Math.sqrt(Tf*Tf+Ff*Ff)},infinite:!0});vg.Earth=Dp,vg.EPSG3395=bw,vg.EPSG3857=Of,vg.EPSG900913=qf,vg.EPSG4326=Ay,vg.Simple=Ox;var xv=ip.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(yo){return yo.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(yo){return yo&&yo.removeLayer(this),this},getPane:function(yo){return this._map.getPane(yo?this.options[yo]||yo:this.options.pane)},addInteractiveTarget:function(yo){return this._map._targets[ut(yo)]=this,this},removeInteractiveTarget:function(yo){return delete this._map._targets[ut(yo)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(yo){var pf=yo.target;if(pf.hasLayer(this)){if(this._map=pf,this._zoomAnimated=pf._zoomAnimated,this.getEvents){var Tf=this.getEvents();pf.on(Tf,this),this.once("remove",function(){pf.off(Tf,this)},this)}this.onAdd(pf),this.fire("add"),pf.fire("layeradd",{layer:this})}}});lv.include({addLayer:function(yo){if(!yo._layerAdd)throw new Error("The provided object is not a Layer.");var pf=ut(yo);return this._layers[pf]?this:(this._layers[pf]=yo,yo._mapToAdd=this,yo.beforeAdd&&yo.beforeAdd(this),this.whenReady(yo._layerAdd,yo),this)},removeLayer:function(yo){var pf=ut(yo);return this._layers[pf]?(this._loaded&&yo.onRemove(this),delete this._layers[pf],this._loaded&&(this.fire("layerremove",{layer:yo}),yo.fire("remove")),yo._map=yo._mapToAdd=null,this):this},hasLayer:function(yo){return ut(yo)in this._layers},eachLayer:function(yo,pf){for(var Tf in this._layers)yo.call(pf,this._layers[Tf]);return this},_addLayers:function(yo){yo=yo?$f(yo)?yo:[yo]:[];for(var pf=0,Tf=yo.length;pfthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&pf[0]instanceof ng&&pf[0].equals(pf[Tf-1])&&pf.pop(),pf},_setLatLngs:function(yo){eb.prototype._setLatLngs.call(this,yo),zy(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return zy(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var yo=this._renderer._bounds,pf=this.options.weight,Tf=new ap(pf,pf);if(yo=new Np(yo.min.subtract(Tf),yo.max.add(Tf)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(yo))){if(this.options.noClip){this._parts=this._rings;return}for(var Ff=0,Zf=this._rings.length,fp;Ffyo.y!=Zf.y>yo.y&&yo.x<(Zf.x-Ff.x)*(yo.y-Ff.y)/(Zf.y-Ff.y)+Ff.x&&(pf=!pf);return pf||eb.prototype._containsPoint.call(this,yo,!0)}});function QE(yo,pf){return new V$(yo,pf)}var Mv=_y.extend({initialize:function(yo,pf){yf(this,pf),this._layers={},yo&&this.addData(yo)},addData:function(yo){var pf=$f(yo)?yo:yo.features,Tf,Ff,Zf;if(pf){for(Tf=0,Ff=pf.length;Tf0&&Zf.push(Zf[0].slice()),Zf}function a$(yo,pf){return yo.feature?X({},yo.feature,{geometry:pf}):C_(pf)}function C_(yo){return yo.type==="Feature"||yo.type==="FeatureCollection"?yo:{type:"Feature",properties:{},geometry:yo}}var O_={toGeoJSON:function(yo){return a$(this,{type:"Point",coordinates:O1(this.getLatLng(),yo)})}};i$.include(O_),ww.include(O_),_w.include(O_),eb.include({toGeoJSON:function(yo){var pf=!zy(this._latlngs),Tf=o$(this._latlngs,pf?1:0,!1,yo);return a$(this,{type:(pf?"Multi":"")+"LineString",coordinates:Tf})}}),V$.include({toGeoJSON:function(yo){var pf=!zy(this._latlngs),Tf=pf&&!zy(this._latlngs[0]),Ff=o$(this._latlngs,Tf?2:pf?1:0,!0,yo);return pf||(Ff=[Ff]),a$(this,{type:(Tf?"Multi":"")+"Polygon",coordinates:Ff})}}),I0.include({toMultiPoint:function(yo){var pf=[];return this.eachLayer(function(Tf){pf.push(Tf.toGeoJSON(yo).geometry.coordinates)}),a$(this,{type:"MultiPoint",coordinates:pf})},toGeoJSON:function(yo){var pf=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(pf==="MultiPoint")return this.toMultiPoint(yo);var Tf=pf==="GeometryCollection",Ff=[];return this.eachLayer(function(Zf){if(Zf.toGeoJSON){var fp=Zf.toGeoJSON(yo);if(Tf)Ff.push(fp.geometry);else{var Cp=C_(fp);Cp.type==="FeatureCollection"?Ff.push.apply(Ff,Cp.features):Ff.push(Cp)}}}),Tf?a$(this,{geometries:Ff,type:"GeometryCollection"}):{type:"FeatureCollection",features:Ff}}});function Ew(yo,pf){return new Mv(yo,pf)}var eS=Ew,tb=xv.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(yo,pf,Tf){this._url=yo,this._bounds=Jp(pf),yf(this,Tf)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Tm(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Ov(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(yo){return this.options.opacity=yo,this._image&&this._updateOpacity(),this},setStyle:function(yo){return yo.opacity&&this.setOpacity(yo.opacity),this},bringToFront:function(){return this._map&&Y1(this._image),this},bringToBack:function(){return this._map&&K1(this._image),this},setUrl:function(yo){return this._url=yo,this._image&&(this._image.src=yo),this},setBounds:function(yo){return this._bounds=Jp(yo),this._map&&this._reset(),this},getEvents:function(){var yo={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(yo.zoomanim=this._animateZoom),yo},setZIndex:function(yo){return this.options.zIndex=yo,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var yo=this._url.tagName==="IMG",pf=this._image=yo?this._url:dv("img");if(Tm(pf,"leaflet-image-layer"),this._zoomAnimated&&Tm(pf,"leaflet-zoom-animated"),this.options.className&&Tm(pf,this.options.className),pf.onselectstart=po,pf.onmousemove=po,pf.onload=rt(this.fire,this,"load"),pf.onerror=rt(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(pf.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),yo){this._url=pf.src;return}pf.src=this._url,pf.alt=this.options.alt},_animateZoom:function(yo){var pf=this._map.getZoomScale(yo.zoom),Tf=this._map._latLngBoundsToNewLayerBounds(this._bounds,yo.zoom,yo.center).min;X1(this._image,Tf,pf)},_reset:function(){var yo=this._image,pf=new Np(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),Tf=pf.getSize();Yv(yo,pf.min),yo.style.width=Tf.x+"px",yo.style.height=Tf.y+"px"},_updateOpacity:function(){_m(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var yo=this.options.errorOverlayUrl;yo&&this._url!==yo&&(this._url=yo,this._image.src=yo)},getCenter:function(){return this._bounds.getCenter()}}),tS=function(yo,pf,Tf){return new tb(yo,pf,Tf)},Ax=tb.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var yo=this._url.tagName==="VIDEO",pf=this._image=yo?this._url:dv("video");if(Tm(pf,"leaflet-image-layer"),this._zoomAnimated&&Tm(pf,"leaflet-zoom-animated"),this.options.className&&Tm(pf,this.options.className),pf.onselectstart=po,pf.onmousemove=po,pf.onloadeddata=rt(this.fire,this,"load"),yo){for(var Tf=pf.getElementsByTagName("source"),Ff=[],Zf=0;Zf0?Ff:[pf.src];return}$f(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(pf.style,"objectFit")&&(pf.style.objectFit="fill"),pf.autoplay=!!this.options.autoplay,pf.loop=!!this.options.loop,pf.muted=!!this.options.muted,pf.playsInline=!!this.options.playsInline;for(var fp=0;fpZf?(pf.height=Zf+"px",Tm(yo,fp)):cm(yo,fp),this._containerWidth=this._container.offsetWidth},_animateZoom:function(yo){var pf=this._map._latLngToNewLayerPoint(this._latlng,yo.zoom,yo.center),Tf=this._getAnchor();Yv(this._container,pf.add(Tf))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var yo=this._map,pf=parseInt(Kb(this._container,"marginBottom"),10)||0,Tf=this._container.offsetHeight+pf,Ff=this._containerWidth,Zf=new ap(this._containerLeft,-Tf-this._containerBottom);Zf._add(Iv(this._container));var fp=yo.layerPointToContainerPoint(Zf),Cp=vp(this.options.autoPanPadding),Zp=vp(this.options.autoPanPaddingTopLeft||Cp),sg=vp(this.options.autoPanPaddingBottomRight||Cp),yg=yo.getSize(),Lg=0,hm=0;fp.x+Ff+sg.x>yg.x&&(Lg=fp.x+Ff-yg.x+sg.x),fp.x-Lg-Zp.x<0&&(Lg=fp.x-Zp.x),fp.y+Tf+sg.y>yg.y&&(hm=fp.y+Tf-yg.y+sg.y),fp.y-hm-Zp.y<0&&(hm=fp.y-Zp.y),(Lg||hm)&&(this.options.keepInView&&(this._autopanning=!0),yo.fire("autopanstart").panBy([Lg,hm]))}},_getAnchor:function(){return vp(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),I1=function(yo,pf){return new G$(yo,pf)};lv.mergeOptions({closePopupOnClick:!0}),lv.include({openPopup:function(yo,pf,Tf){return this._initOverlay(G$,yo,pf,Tf).openOn(this),this},closePopup:function(yo){return yo=arguments.length?yo:this._popup,yo&&yo.close(),this}}),xv.include({bindPopup:function(yo,pf){return this._popup=this._initOverlay(G$,this._popup,yo,pf),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(yo){return this._popup&&(this instanceof _y||(this._popup._source=this),this._popup._prepareOpen(yo||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(yo){return this._popup&&this._popup.setContent(yo),this},getPopup:function(){return this._popup},_openPopup:function(yo){if(!(!this._popup||!this._map)){Sb(yo);var pf=yo.layer||yo.target;if(this._popup._source===pf&&!(pf instanceof Q1)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(yo.latlng);return}this._popup._source=pf,this.openPopup(yo.latlng)}},_movePopup:function(yo){this._popup.setLatLng(yo.latlng)},_onKeyPress:function(yo){yo.originalEvent.keyCode===13&&this._openPopup(yo)}});var Tb=Dv.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(yo){Dv.prototype.onAdd.call(this,yo),this.setOpacity(this.options.opacity),yo.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(yo){Dv.prototype.onRemove.call(this,yo),yo.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var yo=Dv.prototype.getEvents.call(this);return this.options.permanent||(yo.preclick=this.close),yo},_initLayout:function(){var yo="leaflet-tooltip",pf=yo+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=dv("div",pf),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+ut(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(yo){var pf,Tf,Ff=this._map,Zf=this._container,fp=Ff.latLngToContainerPoint(Ff.getCenter()),Cp=Ff.layerPointToContainerPoint(yo),Zp=this.options.direction,sg=Zf.offsetWidth,yg=Zf.offsetHeight,Lg=vp(this.options.offset),hm=this._getAnchor();Zp==="top"?(pf=sg/2,Tf=yg):Zp==="bottom"?(pf=sg/2,Tf=0):Zp==="center"?(pf=sg/2,Tf=yg/2):Zp==="right"?(pf=0,Tf=yg/2):Zp==="left"?(pf=sg,Tf=yg/2):Cp.xthis.options.maxZoom||TfFf?this._retainParent(Zf,fp,Cp,Ff):!1)},_retainChildren:function(yo,pf,Tf,Ff){for(var Zf=2*yo;Zf<2*yo+2;Zf++)for(var fp=2*pf;fp<2*pf+2;fp++){var Cp=new ap(Zf,fp);Cp.z=Tf+1;var Zp=this._tileCoordsToKey(Cp),sg=this._tiles[Zp];if(sg&&sg.active){sg.retain=!0;continue}else sg&&sg.loaded&&(sg.retain=!0);Tf+1this.options.maxZoom||this.options.minZoom!==void 0&&Zf1){this._setView(yo,Tf);return}for(var hm=Zf.min.y;hm<=Zf.max.y;hm++)for(var Im=Zf.min.x;Im<=Zf.max.x;Im++){var Ky=new ap(Im,hm);if(Ky.z=this._tileZoom,!!this._isValidTile(Ky)){var ry=this._tiles[this._tileCoordsToKey(Ky)];ry?ry.current=!0:Cp.push(Ky)}}if(Cp.sort(function(i0,Ob){return i0.distanceTo(fp)-Ob.distanceTo(fp)}),Cp.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Xy=document.createDocumentFragment();for(Im=0;ImTf.max.x)||!pf.wrapLat&&(yo.yTf.max.y))return!1}if(!this.options.bounds)return!0;var Ff=this._tileCoordsToBounds(yo);return Jp(this.options.bounds).overlaps(Ff)},_keyToBounds:function(yo){return this._tileCoordsToBounds(this._keyToTileCoords(yo))},_tileCoordsToNwSe:function(yo){var pf=this._map,Tf=this.getTileSize(),Ff=yo.scaleBy(Tf),Zf=Ff.add(Tf),fp=pf.unproject(Ff,yo.z),Cp=pf.unproject(Zf,yo.z);return[fp,Cp]},_tileCoordsToBounds:function(yo){var pf=this._tileCoordsToNwSe(yo),Tf=new Ip(pf[0],pf[1]);return this.options.noWrap||(Tf=this._map.wrapLatLngBounds(Tf)),Tf},_tileCoordsToKey:function(yo){return yo.x+":"+yo.y+":"+yo.z},_keyToTileCoords:function(yo){var pf=yo.split(":"),Tf=new ap(+pf[0],+pf[1]);return Tf.z=+pf[2],Tf},_removeTile:function(yo){var pf=this._tiles[yo];pf&&(Ov(pf.el),delete this._tiles[yo],this.fire("tileunload",{tile:pf.el,coords:this._keyToTileCoords(yo)}))},_initTile:function(yo){Tm(yo,"leaflet-tile");var pf=this.getTileSize();yo.style.width=pf.x+"px",yo.style.height=pf.y+"px",yo.onselectstart=po,yo.onmousemove=po,qg.ielt9&&this.options.opacity<1&&_m(yo,this.options.opacity)},_addTile:function(yo,pf){var Tf=this._getTilePos(yo),Ff=this._tileCoordsToKey(yo),Zf=this.createTile(this._wrapCoords(yo),rt(this._tileReady,this,yo));this._initTile(Zf),this.createTile.length<2&&Lf(rt(this._tileReady,this,yo,null,Zf)),Yv(Zf,Tf),this._tiles[Ff]={el:Zf,coords:yo,current:!0},pf.appendChild(Zf),this.fire("tileloadstart",{tile:Zf,coords:yo})},_tileReady:function(yo,pf,Tf){pf&&this.fire("tileerror",{error:pf,tile:Tf,coords:yo});var Ff=this._tileCoordsToKey(yo);Tf=this._tiles[Ff],Tf&&(Tf.loaded=+new Date,this._map._fadeAnimated?(_m(Tf.el,0),kf(this._fadeFrame),this._fadeFrame=Lf(this._updateOpacity,this)):(Tf.active=!0,this._pruneTiles()),pf||(Tm(Tf.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:Tf.el,coords:yo})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),qg.ielt9||!this._map._fadeAnimated?Lf(this._pruneTiles,this):setTimeout(rt(this._pruneTiles,this),250)))},_getTilePos:function(yo){return yo.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(yo){var pf=new ap(this._wrapX?uo(yo.x,this._wrapX):yo.x,this._wrapY?uo(yo.y,this._wrapY):yo.y);return pf.z=yo.z,pf},_pxBoundsToTileRange:function(yo){var pf=this.getTileSize();return new Np(yo.min.unscaleBy(pf).floor(),yo.max.unscaleBy(pf).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var yo in this._tiles)if(!this._tiles[yo].loaded)return!1;return!0}});function U2(yo){return new I_(yo)}var kb=I_.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(yo,pf){this._url=yo,pf=yf(this,pf),pf.detectRetina&&qg.retina&&pf.maxZoom>0?(pf.tileSize=Math.floor(pf.tileSize/2),pf.zoomReverse?(pf.zoomOffset--,pf.minZoom=Math.min(pf.maxZoom,pf.minZoom+1)):(pf.zoomOffset++,pf.maxZoom=Math.max(pf.minZoom,pf.maxZoom-1)),pf.minZoom=Math.max(0,pf.minZoom)):pf.zoomReverse?pf.minZoom=Math.min(pf.maxZoom,pf.minZoom):pf.maxZoom=Math.max(pf.minZoom,pf.maxZoom),typeof pf.subdomains=="string"&&(pf.subdomains=pf.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(yo,pf){return this._url===yo&&pf===void 0&&(pf=!0),this._url=yo,pf||this.redraw(),this},createTile:function(yo,pf){var Tf=document.createElement("img");return xm(Tf,"load",rt(this._tileOnLoad,this,pf,Tf)),xm(Tf,"error",rt(this._tileOnError,this,pf,Tf)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(Tf.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(Tf.referrerPolicy=this.options.referrerPolicy),Tf.alt="",Tf.src=this.getTileUrl(yo),Tf},getTileUrl:function(yo){var pf={r:qg.retina?"@2x":"",s:this._getSubdomain(yo),x:yo.x,y:yo.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var Tf=this._globalTileRange.max.y-yo.y;this.options.tms&&(pf.y=Tf),pf["-y"]=Tf}return _f(this._url,X(pf,this.options))},_tileOnLoad:function(yo,pf){qg.ielt9?setTimeout(rt(yo,this,null,pf),0):yo(null,pf)},_tileOnError:function(yo,pf,Tf){var Ff=this.options.errorTileUrl;Ff&&pf.getAttribute("src")!==Ff&&(pf.src=Ff),yo(Tf,pf)},_onTileRemove:function(yo){yo.tile.onload=null},_getZoomForUrl:function(){var yo=this._tileZoom,pf=this.options.maxZoom,Tf=this.options.zoomReverse,Ff=this.options.zoomOffset;return Tf&&(yo=pf-yo),yo+Ff},_getSubdomain:function(yo){var pf=Math.abs(yo.x+yo.y)%this.options.subdomains.length;return this.options.subdomains[pf]},_abortLoading:function(){var yo,pf;for(yo in this._tiles)if(this._tiles[yo].coords.z!==this._tileZoom&&(pf=this._tiles[yo].el,pf.onload=po,pf.onerror=po,!pf.complete)){pf.src=Pf;var Tf=this._tiles[yo].coords;Ov(pf),delete this._tiles[yo],this.fire("tileabort",{tile:pf,coords:Tf})}},_removeTile:function(yo){var pf=this._tiles[yo];if(pf)return pf.el.setAttribute("src",Pf),I_.prototype._removeTile.call(this,yo)},_tileReady:function(yo,pf,Tf){if(!(!this._map||Tf&&Tf.getAttribute("src")===Pf))return I_.prototype._tileReady.call(this,yo,pf,Tf)}});function P_(yo,pf){return new kb(yo,pf)}var W$=kb.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(yo,pf){this._url=yo;var Tf=X({},this.defaultWmsParams);for(var Ff in pf)Ff in this.options||(Tf[Ff]=pf[Ff]);pf=yf(this,pf);var Zf=pf.detectRetina&&qg.retina?2:1,fp=this.getTileSize();Tf.width=fp.x*Zf,Tf.height=fp.y*Zf,this.wmsParams=Tf},onAdd:function(yo){this._crs=this.options.crs||yo.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var pf=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[pf]=this._crs.code,kb.prototype.onAdd.call(this,yo)},getTileUrl:function(yo){var pf=this._tileCoordsToNwSe(yo),Tf=this._crs,Ff=jp(Tf.project(pf[0]),Tf.project(pf[1])),Zf=Ff.min,fp=Ff.max,Cp=(this._wmsVersion>=1.3&&this._crs===Ay?[Zf.y,Zf.x,fp.y,fp.x]:[Zf.x,Zf.y,fp.x,fp.y]).join(","),Zp=kb.prototype.getTileUrl.call(this,yo);return Zp+cf(this.wmsParams,Zp,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Cp},setParams:function(yo,pf){return X(this.wmsParams,yo),pf||this.redraw(),this}});function Nx(yo,pf){return new W$(yo,pf)}kb.WMS=W$,P_.wms=Nx;var a1=xv.extend({options:{padding:.1},initialize:function(yo){yf(this,yo),ut(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Tm(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var yo={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(yo.zoomanim=this._onAnimZoom),yo},_onAnimZoom:function(yo){this._updateTransform(yo.center,yo.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(yo,pf){var Tf=this._map.getZoomScale(pf,this._zoom),Ff=this._map.getSize().multiplyBy(.5+this.options.padding),Zf=this._map.project(this._center,pf),fp=Ff.multiplyBy(-Tf).add(Zf).subtract(this._map._getNewPixelOrigin(yo,pf));qg.any3d?X1(this._container,fp,Tf):Yv(this._container,fp)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var yo in this._layers)this._layers[yo]._reset()},_onZoomEnd:function(){for(var yo in this._layers)this._layers[yo]._project()},_updatePaths:function(){for(var yo in this._layers)this._layers[yo]._update()},_update:function(){var yo=this.options.padding,pf=this._map.getSize(),Tf=this._map.containerPointToLayerPoint(pf.multiplyBy(-yo)).round();this._bounds=new Np(Tf,Tf.add(pf.multiplyBy(1+yo*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),kw=a1.extend({options:{tolerance:0},getEvents:function(){var yo=a1.prototype.getEvents.call(this);return yo.viewprereset=this._onViewPreReset,yo},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){a1.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var yo=this._container=document.createElement("canvas");xm(yo,"mousemove",this._onMouseMove,this),xm(yo,"click dblclick mousedown mouseup contextmenu",this._onClick,this),xm(yo,"mouseout",this._handleMouseOut,this),yo._leaflet_disable_events=!0,this._ctx=yo.getContext("2d")},_destroyContainer:function(){kf(this._redrawRequest),delete this._ctx,Ov(this._container),um(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var yo;this._redrawBounds=null;for(var pf in this._layers)yo=this._layers[pf],yo._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){a1.prototype._update.call(this);var yo=this._bounds,pf=this._container,Tf=yo.getSize(),Ff=qg.retina?2:1;Yv(pf,yo.min),pf.width=Ff*Tf.x,pf.height=Ff*Tf.y,pf.style.width=Tf.x+"px",pf.style.height=Tf.y+"px",qg.retina&&this._ctx.scale(2,2),this._ctx.translate(-yo.min.x,-yo.min.y),this.fire("update")}},_reset:function(){a1.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(yo){this._updateDashArray(yo),this._layers[ut(yo)]=yo;var pf=yo._order={layer:yo,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=pf),this._drawLast=pf,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(yo){this._requestRedraw(yo)},_removePath:function(yo){var pf=yo._order,Tf=pf.next,Ff=pf.prev;Tf?Tf.prev=Ff:this._drawLast=Ff,Ff?Ff.next=Tf:this._drawFirst=Tf,delete yo._order,delete this._layers[ut(yo)],this._requestRedraw(yo)},_updatePath:function(yo){this._extendRedrawBounds(yo),yo._project(),yo._update(),this._requestRedraw(yo)},_updateStyle:function(yo){this._updateDashArray(yo),this._requestRedraw(yo)},_updateDashArray:function(yo){if(typeof yo.options.dashArray=="string"){var pf=yo.options.dashArray.split(/[, ]+/),Tf=[],Ff,Zf;for(Zf=0;Zf')}}catch{}return function(yo){return document.createElement("<"+yo+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),$0={_initContainer:function(){this._container=dv("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(a1.prototype._update.call(this),this.fire("update"))},_initPath:function(yo){var pf=yo._container=Cb("shape");Tm(pf,"leaflet-vml-shape "+(this.options.className||"")),pf.coordsize="1 1",yo._path=Cb("path"),pf.appendChild(yo._path),this._updateStyle(yo),this._layers[ut(yo)]=yo},_addPath:function(yo){var pf=yo._container;this._container.appendChild(pf),yo.options.interactive&&yo.addInteractiveTarget(pf)},_removePath:function(yo){var pf=yo._container;Ov(pf),yo.removeInteractiveTarget(pf),delete this._layers[ut(yo)]},_updateStyle:function(yo){var pf=yo._stroke,Tf=yo._fill,Ff=yo.options,Zf=yo._container;Zf.stroked=!!Ff.stroke,Zf.filled=!!Ff.fill,Ff.stroke?(pf||(pf=yo._stroke=Cb("stroke")),Zf.appendChild(pf),pf.weight=Ff.weight+"px",pf.color=Ff.color,pf.opacity=Ff.opacity,Ff.dashArray?pf.dashStyle=$f(Ff.dashArray)?Ff.dashArray.join(" "):Ff.dashArray.replace(/( *, *)/g," "):pf.dashStyle="",pf.endcap=Ff.lineCap.replace("butt","flat"),pf.joinstyle=Ff.lineJoin):pf&&(Zf.removeChild(pf),yo._stroke=null),Ff.fill?(Tf||(Tf=yo._fill=Cb("fill")),Zf.appendChild(Tf),Tf.color=Ff.fillColor||Ff.color,Tf.opacity=Ff.fillOpacity):Tf&&(Zf.removeChild(Tf),yo._fill=null)},_updateCircle:function(yo){var pf=yo._point.round(),Tf=Math.round(yo._radius),Ff=Math.round(yo._radiusY||Tf);this._setPath(yo,yo._empty()?"M0 0":"AL "+pf.x+","+pf.y+" "+Tf+","+Ff+" 0,"+65535*360)},_setPath:function(yo,pf){yo._path.v=pf},_bringToFront:function(yo){Y1(yo._container)},_bringToBack:function(yo){K1(yo._container)}},Ow=qg.vml?Cb:cp,q$=a1.extend({_initContainer:function(){this._container=Ow("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ow("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Ov(this._container),um(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){a1.prototype._update.call(this);var yo=this._bounds,pf=yo.getSize(),Tf=this._container;(!this._svgSize||!this._svgSize.equals(pf))&&(this._svgSize=pf,Tf.setAttribute("width",pf.x),Tf.setAttribute("height",pf.y)),Yv(Tf,yo.min),Tf.setAttribute("viewBox",[yo.min.x,yo.min.y,pf.x,pf.y].join(" ")),this.fire("update")}},_initPath:function(yo){var pf=yo._path=Ow("path");yo.options.className&&Tm(pf,yo.options.className),yo.options.interactive&&Tm(pf,"leaflet-interactive"),this._updateStyle(yo),this._layers[ut(yo)]=yo},_addPath:function(yo){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(yo._path),yo.addInteractiveTarget(yo._path)},_removePath:function(yo){Ov(yo._path),yo.removeInteractiveTarget(yo._path),delete this._layers[ut(yo)]},_updatePath:function(yo){yo._project(),yo._update()},_updateStyle:function(yo){var pf=yo._path,Tf=yo.options;pf&&(Tf.stroke?(pf.setAttribute("stroke",Tf.color),pf.setAttribute("stroke-opacity",Tf.opacity),pf.setAttribute("stroke-width",Tf.weight),pf.setAttribute("stroke-linecap",Tf.lineCap),pf.setAttribute("stroke-linejoin",Tf.lineJoin),Tf.dashArray?pf.setAttribute("stroke-dasharray",Tf.dashArray):pf.removeAttribute("stroke-dasharray"),Tf.dashOffset?pf.setAttribute("stroke-dashoffset",Tf.dashOffset):pf.removeAttribute("stroke-dashoffset")):pf.setAttribute("stroke","none"),Tf.fill?(pf.setAttribute("fill",Tf.fillColor||Tf.color),pf.setAttribute("fill-opacity",Tf.fillOpacity),pf.setAttribute("fill-rule",Tf.fillRule||"evenodd")):pf.setAttribute("fill","none"))},_updatePoly:function(yo,pf){this._setPath(yo,hp(yo._parts,pf))},_updateCircle:function(yo){var pf=yo._point,Tf=Math.max(Math.round(yo._radius),1),Ff=Math.max(Math.round(yo._radiusY),1)||Tf,Zf="a"+Tf+","+Ff+" 0 1,0 ",fp=yo._empty()?"M0 0":"M"+(pf.x-Tf)+","+pf.y+Zf+Tf*2+",0 "+Zf+-Tf*2+",0 ";this._setPath(yo,fp)},_setPath:function(yo,pf){yo._path.setAttribute("d",pf)},_bringToFront:function(yo){Y1(yo._path)},_bringToBack:function(yo){K1(yo._path)}});qg.vml&&q$.include($0);function Mx(yo){return qg.svg||qg.vml?new q$(yo):null}lv.include({getRenderer:function(yo){var pf=yo.options.renderer||this._getPaneRenderer(yo.options.pane)||this.options.renderer||this._renderer;return pf||(pf=this._renderer=this._createRenderer()),this.hasLayer(pf)||this.addLayer(pf),pf},_getPaneRenderer:function(yo){if(yo==="overlayPane"||yo===void 0)return!1;var pf=this._paneRenderers[yo];return pf===void 0&&(pf=this._createRenderer({pane:yo}),this._paneRenderers[yo]=pf),pf},_createRenderer:function(yo){return this.options.preferCanvas&&Cw(yo)||Mx(yo)}});var Iw=V$.extend({initialize:function(yo,pf){V$.prototype.initialize.call(this,this._boundsToLatLngs(yo),pf)},setBounds:function(yo){return this.setLatLngs(this._boundsToLatLngs(yo))},_boundsToLatLngs:function(yo){return yo=Jp(yo),[yo.getSouthWest(),yo.getNorthWest(),yo.getNorthEast(),yo.getSouthEast()]}});function V2(yo,pf){return new Iw(yo,pf)}q$.create=Ow,q$.pointsToPath=hp,Mv.geometryToLayer=xw,Mv.coordsToLatLng=y0,Mv.coordsToLatLngs=b0,Mv.latLngToCoords=O1,Mv.latLngsToCoords=o$,Mv.getFeature=a$,Mv.asFeature=C_,lv.mergeOptions({boxZoom:!0});var Pw=$y.extend({initialize:function(yo){this._map=yo,this._container=yo._container,this._pane=yo._panes.overlayPane,this._resetStateTimeout=0,yo.on("unload",this._destroy,this)},addHooks:function(){xm(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){um(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Ov(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(yo){if(!yo.shiftKey||yo.which!==1&&yo.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Z1(),Jb(),this._startPoint=this._map.mouseEventToContainerPoint(yo),xm(document,{contextmenu:Sb,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(yo){this._moved||(this._moved=!0,this._box=dv("div","leaflet-zoom-box",this._container),Tm(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(yo);var pf=new Np(this._point,this._startPoint),Tf=pf.getSize();Yv(this._box,pf.min),this._box.style.width=Tf.x+"px",this._box.style.height=Tf.y+"px"},_finish:function(){this._moved&&(Ov(this._box),cm(this._container,"leaflet-crosshair")),J1(),D$(),um(document,{contextmenu:Sb,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(yo){if(!(yo.which!==1&&yo.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(rt(this._resetState,this),0);var pf=new Ip(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(pf).fire("boxzoomend",{boxZoomBounds:pf})}},_onKeyDown:function(yo){yo.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});lv.addInitHook("addHandler","boxZoom",Pw),lv.mergeOptions({doubleClickZoom:!0});var Y$=$y.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(yo){var pf=this._map,Tf=pf.getZoom(),Ff=pf.options.zoomDelta,Zf=yo.originalEvent.shiftKey?Tf-Ff:Tf+Ff;pf.options.doubleClickZoom==="center"?pf.setZoom(Zf):pf.setZoomAround(yo.containerPoint,Zf)}});lv.addInitHook("addHandler","doubleClickZoom",Y$),lv.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var A_=$y.extend({addHooks:function(){if(!this._draggable){var yo=this._map;this._draggable=new n1(yo._mapPane,yo._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),yo.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),yo.on("zoomend",this._onZoomEnd,this),yo.whenReady(this._onZoomEnd,this))}Tm(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){cm(this._map._container,"leaflet-grab"),cm(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var yo=this._map;if(yo._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var pf=Jp(this._map.options.maxBounds);this._offsetLimit=jp(this._map.latLngToContainerPoint(pf.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(pf.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;yo.fire("movestart").fire("dragstart"),yo.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(yo){if(this._map.options.inertia){var pf=this._lastTime=+new Date,Tf=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(Tf),this._times.push(pf),this._prunePositions(pf)}this._map.fire("move",yo).fire("drag",yo)},_prunePositions:function(yo){for(;this._positions.length>1&&yo-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var yo=this._map.getSize().divideBy(2),pf=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=pf.subtract(yo).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(yo,pf){return yo-(yo-pf)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var yo=this._draggable._newPos.subtract(this._draggable._startPos),pf=this._offsetLimit;yo.xpf.max.x&&(yo.x=this._viscousLimit(yo.x,pf.max.x)),yo.y>pf.max.y&&(yo.y=this._viscousLimit(yo.y,pf.max.y)),this._draggable._newPos=this._draggable._startPos.add(yo)}},_onPreDragWrap:function(){var yo=this._worldWidth,pf=Math.round(yo/2),Tf=this._initialWorldOffset,Ff=this._draggable._newPos.x,Zf=(Ff-pf+Tf)%yo+pf-Tf,fp=(Ff+pf+Tf)%yo-pf-Tf,Cp=Math.abs(Zf+Tf)0?fp:-fp))-pf;this._delta=0,this._startTime=null,Cp&&(yo.options.scrollWheelZoom==="center"?yo.setZoom(pf+Cp):yo.setZoomAround(this._lastMousePos,pf+Cp))}});lv.addInitHook("addHandler","scrollWheelZoom",s$);var rS=600;lv.mergeOptions({tapHold:qg.touchNative&&qg.safari&&qg.mobile,tapTolerance:15});var Dx=$y.extend({addHooks:function(){xm(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){um(this._map._container,"touchstart",this._onDown,this)},_onDown:function(yo){if(clearTimeout(this._holdTimeout),yo.touches.length===1){var pf=yo.touches[0];this._startPos=this._newPos=new ap(pf.clientX,pf.clientY),this._holdTimeout=setTimeout(rt(function(){this._cancel(),this._isTapValid()&&(xm(document,"touchend",ty),xm(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",pf))},this),rS),xm(document,"touchend touchcancel contextmenu",this._cancel,this),xm(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function yo(){um(document,"touchend",ty),um(document,"touchend touchcancel",yo)},_cancel:function(){clearTimeout(this._holdTimeout),um(document,"touchend touchcancel contextmenu",this._cancel,this),um(document,"touchmove",this._onMove,this)},_onMove:function(yo){var pf=yo.touches[0];this._newPos=new ap(pf.clientX,pf.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(yo,pf){var Tf=new MouseEvent(yo,{bubbles:!0,cancelable:!0,view:window,screenX:pf.screenX,screenY:pf.screenY,clientX:pf.clientX,clientY:pf.clientY});Tf._simulated=!0,pf.target.dispatchEvent(Tf)}});lv.addInitHook("addHandler","tapHold",Dx),lv.mergeOptions({touchZoom:qg.touch,bounceAtZoomLimits:!0});var K$=$y.extend({addHooks:function(){Tm(this._map._container,"leaflet-touch-zoom"),xm(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){cm(this._map._container,"leaflet-touch-zoom"),um(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(yo){var pf=this._map;if(!(!yo.touches||yo.touches.length!==2||pf._animatingZoom||this._zooming)){var Tf=pf.mouseEventToContainerPoint(yo.touches[0]),Ff=pf.mouseEventToContainerPoint(yo.touches[1]);this._centerPoint=pf.getSize()._divideBy(2),this._startLatLng=pf.containerPointToLatLng(this._centerPoint),pf.options.touchZoom!=="center"&&(this._pinchStartLatLng=pf.containerPointToLatLng(Tf.add(Ff)._divideBy(2))),this._startDist=Tf.distanceTo(Ff),this._startZoom=pf.getZoom(),this._moved=!1,this._zooming=!0,pf._stop(),xm(document,"touchmove",this._onTouchMove,this),xm(document,"touchend touchcancel",this._onTouchEnd,this),ty(yo)}},_onTouchMove:function(yo){if(!(!yo.touches||yo.touches.length!==2||!this._zooming)){var pf=this._map,Tf=pf.mouseEventToContainerPoint(yo.touches[0]),Ff=pf.mouseEventToContainerPoint(yo.touches[1]),Zf=Tf.distanceTo(Ff)/this._startDist;if(this._zoom=pf.getScaleZoom(Zf,this._startZoom),!pf.options.bounceAtZoomLimits&&(this._zoompf.getMaxZoom()&&Zf>1)&&(this._zoom=pf._limitZoom(this._zoom)),pf.options.touchZoom==="center"){if(this._center=this._startLatLng,Zf===1)return}else{var fp=Tf._add(Ff)._divideBy(2)._subtract(this._centerPoint);if(Zf===1&&fp.x===0&&fp.y===0)return;this._center=pf.unproject(pf.project(this._pinchStartLatLng,this._zoom).subtract(fp),this._zoom)}this._moved||(pf._moveStart(!0,!1),this._moved=!0),kf(this._animRequest);var Cp=rt(pf._move,pf,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Lf(Cp,this,!0),ty(yo)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,kf(this._animRequest),um(document,"touchmove",this._onTouchMove,this),um(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});lv.addInitHook("addHandler","touchZoom",K$),lv.BoxZoom=Pw,lv.DoubleClickZoom=Y$,lv.Drag=A_,lv.Keyboard=G2,lv.ScrollWheelZoom=s$,lv.TapHold=Dx,lv.TouchZoom=K$,q.Bounds=Np,q.Browser=qg,q.CRS=vg,q.Canvas=kw,q.Circle=ww,q.CircleMarker=_w,q.Class=Yf,q.Control=m0,q.DivIcon=Rx,q.DivOverlay=Dv,q.DomEvent=r0,q.DomUtil=Qb,q.Draggable=n1,q.Evented=ip,q.FeatureGroup=_y,q.GeoJSON=Mv,q.GridLayer=I_,q.Handler=$y,q.Icon=o1,q.ImageOverlay=tb,q.LatLng=ng,q.LatLngBounds=Ip,q.Layer=xv,q.LayerGroup=I0,q.LineUtil=C1,q.Map=lv,q.Marker=i$,q.Mixin=kx,q.Path=Q1,q.Point=ap,q.PolyUtil=XE,q.Polygon=V$,q.Polyline=eb,q.Popup=G$,q.PosAnimation=pw,q.Projection=z$,q.Rectangle=Iw,q.Renderer=a1,q.SVG=q$,q.SVGOverlay=zv,q.TileLayer=kb,q.Tooltip=Tb,q.Transformation=kp,q.Util=Nf,q.VideoOverlay=Ax,q.bind=rt,q.bounds=jp,q.canvas=Cw,q.circle=JE,q.circleMarker=ZE,q.control=F$,q.divIcon=Tw,q.extend=X,q.featureGroup=my,q.geoJSON=Ew,q.geoJson=eS,q.gridLayer=U2,q.icon=j2,q.imageOverlay=tS,q.latLng=og,q.latLngBounds=Jp,q.layerGroup=H$,q.map=YE,q.marker=Ix,q.point=vp,q.polygon=QE,q.polyline=Px,q.popup=I1,q.rectangle=V2,q.setOptions=yf,q.stamp=ut,q.svg=Mx,q.svgOverlay=z2,q.tileLayer=P_,q.tooltip=H2,q.transformation=lp,q.version=K,q.videoOverlay=Sw;var X$=window.L;q.noConflict=function(){return window.L=X$,this},window.L=q})})(leafletSrc,leafletSrc.exports);var leafletSrcExports=leafletSrc.exports;const L$2=getDefaultExportFromCjs$3(leafletSrcExports);var leafletGestureHandling_min={exports:{}};(function(F,W){(function(q,K){K(W)})(commonjsGlobal$3,function(q){var K={ar:{touch:"استخدم إصبعين لتحريك الخريطة",scroll:"‏استخدم ctrl + scroll لتصغير/تكبير الخريطة",scrollMac:"يمكنك استخدام ⌘ + التمرير لتكبير/تصغير الخريطة"},bg:{touch:"Използвайте два пръста, за да преместите картата",scroll:"Задръжте бутона Ctrl натиснат, докато превъртате, за да промените мащаба на картата",scrollMac:"Задръжте бутона ⌘ натиснат, докато превъртате, за да промените мащаба на картата"},bn:{touch:"মানচিত্রটিকে সরাতে দুটি আঙ্গুল ব্যবহার করুন",scroll:"ম্যাপ জুম করতে ctrl + scroll ব্যবহার করুন",scrollMac:"ম্যাপে জুম করতে ⌘ বোতাম টিপে স্ক্রল করুন"},ca:{touch:"Fes servir dos dits per moure el mapa",scroll:"Prem la tecla Control mentre et desplaces per apropar i allunyar el mapa",scrollMac:"Prem la tecla ⌘ mentre et desplaces per apropar i allunyar el mapa"},cs:{touch:"K posunutí mapy použijte dva prsty",scroll:"Velikost zobrazení mapy změňte podržením klávesy Ctrl a posouváním kolečka myši",scrollMac:"Velikost zobrazení mapy změníte podržením klávesy ⌘ a posunutím kolečka myši / touchpadu"},da:{touch:"Brug to fingre til at flytte kortet",scroll:"Brug ctrl + rullefunktionen til at zoome ind og ud på kortet",scrollMac:"Brug ⌘ + rullefunktionen til at zoome ind og ud på kortet"},de:{touch:"Verschieben der Karte mit zwei Fingern",scroll:"Verwende Strg+Scrollen zum Zoomen der Karte",scrollMac:"⌘"},el:{touch:"Χρησιμοποιήστε δύο δάχτυλα για μετακίνηση στον χάρτη",scroll:"Χρησιμοποιήστε το πλήκτρο Ctrl και κύλιση, για να μεγεθύνετε τον χάρτη",scrollMac:"Χρησιμοποιήστε το πλήκτρο ⌘ + κύλιση για εστίαση στον χάρτη"},en:{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},"en-AU":{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},"en-GB":{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},es:{touch:"Para mover el mapa, utiliza dos dedos",scroll:"Mantén pulsada la tecla Ctrl mientras te desplazas para acercar o alejar el mapa",scrollMac:"Mantén pulsada la tecla ⌘ mientras te desplazas para acercar o alejar el mapa"},eu:{touch:"Erabili bi hatz mapa mugitzeko",scroll:"Mapan zooma aplikatzeko, sakatu Ktrl eta egin gora edo behera",scrollMac:"Eduki sakatuta ⌘ eta egin gora eta behera mapa handitu eta txikitzeko"},fa:{touch:"برای حرکت دادن نقشه از دو انگشت استفاده کنید.",scroll:"‏برای بزرگ‌نمایی نقشه از ctrl + scroll استفاده کنید",scrollMac:"برای بزرگ‌نمایی نقشه، از ⌘ + پیمایش استفاده کنید."},fi:{touch:"Siirrä karttaa kahdella sormella.",scroll:"Zoomaa karttaa painamalla Ctrl-painiketta ja vierittämällä.",scrollMac:"Zoomaa karttaa pitämällä painike ⌘ painettuna ja vierittämällä."},fil:{touch:"Gumamit ng dalawang daliri upang iusog ang mapa",scroll:"Gamitin ang ctrl + scroll upang i-zoom ang mapa",scrollMac:"Gamitin ang ⌘ + scroll upang i-zoom ang mapa"},fr:{touch:"Utilisez deux doigts pour déplacer la carte",scroll:"Vous pouvez zoomer sur la carte à l'aide de CTRL+Molette de défilement",scrollMac:"Vous pouvez zoomer sur la carte à l'aide de ⌘+Molette de défilement"},gl:{touch:"Utiliza dous dedos para mover o mapa",scroll:"Preme Ctrl mentres te desprazas para ampliar o mapa",scrollMac:"Preme ⌘ e desprázate para ampliar o mapa"},gu:{touch:"નકશો ખસેડવા બે આંગળીઓનો ઉપયોગ કરો",scroll:"નકશાને ઝૂમ કરવા માટે ctrl + સ્ક્રોલનો ઉપયોગ કરો",scrollMac:"નકશાને ઝૂમ કરવા ⌘ + સ્ક્રોલનો ઉપયોગ કરો"},hi:{touch:"मैप एक जगह से दूसरी जगह ले जाने के लिए दो उंगलियों का इस्तेमाल करें",scroll:"मैप को ज़ूम करने के लिए ctrl + स्क्रोल का उपयोग करें",scrollMac:"मैप को ज़ूम करने के लिए ⌘ + स्क्रोल का उपयोग करें"},hr:{touch:"Pomičite kartu pomoću dva prsta",scroll:"Upotrijebite Ctrl i klizač miša da biste zumirali kartu",scrollMac:"Upotrijebite gumb ⌘ dok se pomičete za zumiranje karte"},hu:{touch:"Két ujjal mozgassa a térképet",scroll:"A térkép a ctrl + görgetés használatával nagyítható",scrollMac:"A térkép a ⌘ + görgetés használatával nagyítható"},id:{touch:"Gunakan dua jari untuk menggerakkan peta",scroll:"Gunakan ctrl + scroll untuk memperbesar atau memperkecil peta",scrollMac:"Gunakan ⌘ + scroll untuk memperbesar atau memperkecil peta"},it:{touch:"Utilizza due dita per spostare la mappa",scroll:"Utilizza CTRL + scorrimento per eseguire lo zoom della mappa",scrollMac:"Utilizza ⌘ + scorrimento per eseguire lo zoom della mappa"},iw:{touch:"הזז את המפה באמצעות שתי אצבעות",scroll:"‏אפשר לשנות את מרחק התצוגה במפה באמצעות מקש ctrl וגלילה",scrollMac:"אפשר לשנות את מרחק התצוגה במפה באמצעות מקש ⌘ וגלילה"},ja:{touch:"地図を移動させるには指 2 本で操作します",scroll:"地図をズームするには、Ctrl キーを押しながらスクロールしてください",scrollMac:"地図をズームするには、⌘ キーを押しながらスクロールしてください"},kn:{touch:"Use two fingers to move the map",scroll:"Use Ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},ko:{touch:"지도를 움직이려면 두 손가락을 사용하세요.",scroll:"지도를 확대/축소하려면 Ctrl을 누른 채 스크롤하세요.",scrollMac:"지도를 확대하려면 ⌘ + 스크롤 사용"},lt:{touch:"Perkelkite žemėlapį dviem pirštais",scroll:"Slinkite nuspaudę klavišą „Ctrl“, kad pakeistumėte žemėlapio mastelį",scrollMac:"Paspauskite klavišą ⌘ ir slinkite, kad priartintumėte žemėlapį"},lv:{touch:"Lai pārvietotu karti, bīdiet to ar diviem pirkstiem",scroll:"Kartes tālummaiņai izmantojiet ctrl + ritināšanu",scrollMac:"Lai veiktu kartes tālummaiņu, izmantojiet ⌘ + ritināšanu"},ml:{touch:"മാപ്പ് നീക്കാൻ രണ്ട് വിരലുകൾ ഉപയോഗിക്കുക",scroll:"കൺട്രോൾ + സ്‌ക്രോൾ ഉപയോഗിച്ച് ‌മാപ്പ് ‌സൂം ചെയ്യുക",scrollMac:"⌘ + സ്‌ക്രോൾ ഉപയോഗിച്ച് ‌മാപ്പ് ‌സൂം ചെയ്യുക"},mr:{touch:"नकाशा हलविण्यासाठी दोन बोटे वापरा",scroll:"नकाशा झूम करण्यासाठी ctrl + scroll वापरा",scrollMac:"नकाशावर झूम करण्यासाठी ⌘ + स्क्रोल वापरा"},nl:{touch:"Gebruik twee vingers om de kaart te verplaatsen",scroll:"Gebruik Ctrl + scrollen om in- en uit te zoomen op de kaart",scrollMac:"Gebruik ⌘ + scrollen om in en uit te zoomen op de kaart"},no:{touch:"Bruk to fingre for å flytte kartet",scroll:"Hold ctrl-tasten inne og rull for å zoome på kartet",scrollMac:"Hold inne ⌘-tasten og rull for å zoome på kartet"},pl:{touch:"Przesuń mapę dwoma palcami",scroll:"Naciśnij CTRL i przewiń, by przybliżyć mapę",scrollMac:"Naciśnij ⌘ i przewiń, by przybliżyć mapę"},pt:{touch:"Use dois dedos para mover o mapa",scroll:"Pressione Ctrl e role a tela simultaneamente para aplicar zoom no mapa",scrollMac:"Use ⌘ e role a tela simultaneamente para aplicar zoom no mapa"},"pt-BR":{touch:"Use dois dedos para mover o mapa",scroll:"Pressione Ctrl e role a tela simultaneamente para aplicar zoom no mapa",scrollMac:"Use ⌘ e role a tela simultaneamente para aplicar zoom no mapa"},"pt-PT":{touch:"Utilize dois dedos para mover o mapa",scroll:"Utilizar ctrl + deslocar para aumentar/diminuir zoom do mapa",scrollMac:"Utilize ⌘ + deslocar para aumentar/diminuir o zoom do mapa"},ro:{touch:"Folosiți două degete pentru a deplasa harta",scroll:"Apăsați tasta ctrl și derulați simultan pentru a mări harta",scrollMac:"Folosiți ⌘ și derulați pentru a mări/micșora harta"},ru:{touch:"Чтобы переместить карту, проведите по ней двумя пальцами",scroll:"Чтобы изменить масштаб, прокручивайте карту, удерживая клавишу Ctrl.",scrollMac:"Чтобы изменить масштаб, нажмите ⌘ + прокрутка"},sk:{touch:"Mapu môžete posunúť dvoma prstami",scroll:"Ak chcete priblížiť mapu, stlačte kláves ctrl a posúvajte",scrollMac:"Ak chcete priblížiť mapu, stlačte kláves ⌘ a posúvajte kolieskom myši"},sl:{touch:"Premaknite zemljevid z dvema prstoma",scroll:"Zemljevid povečate tako, da držite tipko Ctrl in vrtite kolesce na miški",scrollMac:"Uporabite ⌘ + funkcijo pomika, da povečate ali pomanjšate zemljevid"},sr:{touch:"Мапу померајте помоћу два прста",scroll:"Притисните ctrl тастер док померате да бисте зумирали мапу",scrollMac:"Притисните тастер ⌘ док померате да бисте зумирали мапу"},sv:{touch:"Använd två fingrar för att flytta kartan",scroll:"Använd ctrl + rulla för att zooma kartan",scrollMac:"Använd ⌘ + rulla för att zooma på kartan"},ta:{touch:"மேப்பை நகர்த்த இரண்டு விரல்களைப் பயன்படுத்தவும்",scroll:"மேப்பை பெரிதாக்கி/சிறிதாக்கிப் பார்க்க, ctrl பட்டனைப் பிடித்தபடி, மேலே/கீழே ஸ்க்ரால் செய்யவும்",scrollMac:"மேப்பை பெரிதாக்கி/சிறிதாக்கிப் பார்க்க, ⌘ பட்டனைப் பிடித்தபடி, மேலே/கீழே ஸ்க்ரால் செய்யவும்"},te:{touch:"మ్యాప్‌ని తరలించడం కోసం రెండు వేళ్లను ఉపయోగించండి",scroll:"మ్యాప్‌ని జూమ్ చేయడానికి ctrl బటన్‌ను నొక్కి ఉంచి, స్క్రోల్ చేయండి",scrollMac:"మ్యాప్ జూమ్ చేయాలంటే ⌘ + స్క్రోల్ ఉపయోగించండి"},th:{touch:"ใช้ 2 นิ้วเพื่อเลื่อนแผนที่",scroll:"กด Ctrl ค้างไว้ แล้วเลื่อนหน้าจอเพื่อซูมแผนที่",scrollMac:"กด ⌘ แล้วเลื่อนหน้าจอเพื่อซูมแผนที่"},tl:{touch:"Gumamit ng dalawang daliri upang iusog ang mapa",scroll:"Gamitin ang ctrl + scroll upang i-zoom ang mapa",scrollMac:"Gamitin ang ⌘ + scroll upang i-zoom ang mapa"},tr:{touch:"Haritada gezinmek için iki parmağınızı kullanın",scroll:"Haritayı yakınlaştırmak için ctrl + kaydırma kombinasyonunu kullanın",scrollMac:"Haritayı yakınlaştırmak için ⌘ tuşuna basıp ekranı kaydırın"},uk:{touch:"Переміщуйте карту двома пальцями",scroll:"Щоб змінювати масштаб карти, прокручуйте коліщатко миші, утримуючи клавішу Ctrl",scrollMac:"Щоб змінити масштаб карти, використовуйте ⌘ + прокручування"},vi:{touch:"Sử dụng hai ngón tay để di chuyển bản đồ",scroll:"Sử dụng ctrl + cuộn để thu phóng bản đồ",scrollMac:"Sử dụng ⌘ + cuộn để thu phóng bản đồ"},"zh-CN":{touch:"使用双指移动地图",scroll:"按住 Ctrl 并滚动鼠标滚轮才可缩放地图",scrollMac:"按住 ⌘ 并滚动鼠标滚轮才可缩放地图"},"zh-TW":{touch:"同時以兩指移動地圖",scroll:"按住 ctrl 鍵加上捲動滑鼠可以縮放地圖",scrollMac:"按 ⌘ 加上滾動捲軸可以縮放地圖"}};L.Map.mergeOptions({gestureHandlingOptions:{text:{},duration:1e3}});var X=!1,tt=L.Handler.extend({addHooks:function(){this._handleTouch=this._handleTouch.bind(this),this._setupPluginOptions(),this._setLanguageContent(),this._disableInteractions(),this._map._container.addEventListener("touchstart",this._handleTouch),this._map._container.addEventListener("touchmove",this._handleTouch),this._map._container.addEventListener("touchend",this._handleTouch),this._map._container.addEventListener("touchcancel",this._handleTouch),this._map._container.addEventListener("click",this._handleTouch),L.DomEvent.on(this._map._container,"wheel",this._handleScroll,this),L.DomEvent.on(this._map,"mouseover",this._handleMouseOver,this),L.DomEvent.on(this._map,"mouseout",this._handleMouseOut,this),L.DomEvent.on(this._map,"movestart",this._handleDragging,this),L.DomEvent.on(this._map,"move",this._handleDragging,this),L.DomEvent.on(this._map,"moveend",this._handleDragging,this)},removeHooks:function(){this._enableInteractions(),this._map._container.removeEventListener("touchstart",this._handleTouch),this._map._container.removeEventListener("touchmove",this._handleTouch),this._map._container.removeEventListener("touchend",this._handleTouch),this._map._container.removeEventListener("touchcancel",this._handleTouch),this._map._container.removeEventListener("click",this._handleTouch),L.DomEvent.off(this._map._container,"wheel",this._handleScroll,this),L.DomEvent.off(this._map,"mouseover",this._handleMouseOver,this),L.DomEvent.off(this._map,"mouseout",this._handleMouseOut,this),L.DomEvent.off(this._map,"movestart",this._handleDragging,this),L.DomEvent.off(this._map,"move",this._handleDragging,this),L.DomEvent.off(this._map,"moveend",this._handleDragging,this)},_handleDragging:function(rt){rt.type=="movestart"||rt.type=="move"?X=!0:rt.type=="moveend"&&(X=!1)},_disableInteractions:function(){this._map.dragging.disable(),this._map.scrollWheelZoom.disable(),this._map.tap&&this._map.tap.disable()},_enableInteractions:function(){this._map.dragging.enable(),this._map.scrollWheelZoom.enable(),this._map.tap&&this._map.tap.enable()},_setupPluginOptions:function(){this._map.options.gestureHandlingText&&(this._map.options.gestureHandlingOptions.text=this._map.options.gestureHandlingText)},_setLanguageContent:function(){var rt;if(this._map.options.gestureHandlingOptions&&this._map.options.gestureHandlingOptions.text&&this._map.options.gestureHandlingOptions.text.touch&&this._map.options.gestureHandlingOptions.text.scroll&&this._map.options.gestureHandlingOptions.text.scrollMac)rt=this._map.options.gestureHandlingOptions.text;else{var ot=this._getUserLanguage();ot||(ot="en"),K[ot]&&(rt=K[ot]),rt||ot.indexOf("-")===-1||(ot=ot.split("-")[0],rt=K[ot]),rt||(rt=K[ot="en"])}var ut=!1;0<=navigator.platform.toUpperCase().indexOf("MAC")&&(ut=!0);var yn=rt.scroll;ut&&(yn=rt.scrollMac),this._map._container.setAttribute("data-gesture-handling-touch-content",rt.touch),this._map._container.setAttribute("data-gesture-handling-scroll-content",yn)},_getUserLanguage:function(){return navigator.languages?navigator.languages[0]:navigator.language||navigator.userLanguage},_handleTouch:function(rt){for(var ot=["leaflet-control-minimap","leaflet-interactive","leaflet-popup-content","leaflet-popup-content-wrapper","leaflet-popup-close-button","leaflet-control-zoom-in","leaflet-control-zoom-out"],ut=!1,yn=0;yn{ot=ot.target.value;const ut=this._getLayer(q.layerId).layer;ut._url===void 0||ut.setOpacity(Number(ot/100))});const K=document.createElement("span");K.innerHTML=" "+F.name;const X=document.createElement("div"),tt=document.createElement("div");W.appendChild(X),X.appendChild(K),W.appendChild(tt),tt.appendChild(q),(F.overlay?this._overlaysList:this._baseLayersList).appendChild(W)}}),L.control.opacity=function(F,W){return new L.Control.Opacity(F,W)};(function(F,W){typeof exports=="object"&&typeof module<"u"?W(exports):typeof define=="function"&&define.amd?define(["exports"],W):W((F=typeof globalThis<"u"?globalThis:F||self).turf={})})(globalThis,function(F){var W=63710088e-1,q={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260511392e-6,inches:39.37*W,kilometers:6371.0088,kilometres:6371.0088,meters:W,metres:W,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:W/1852,radians:1,yards:6967335223679999e-9},K={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/W,yards:1.0936133},X={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function tt(nt,at,wt){wt===void 0&&(wt={});var lo={type:"Feature"};return(wt.id===0||wt.id)&&(lo.id=wt.id),wt.bbox&&(lo.bbox=wt.bbox),lo.properties=at||{},lo.geometry=nt,lo}function rt(nt,at,wt){switch(nt){case"Point":return ot(at).geometry;case"LineString":return po(at).geometry;case"Polygon":return yn(at).geometry;case"MultiPoint":return yf(at).geometry;case"MultiLineString":return lf(at).geometry;case"MultiPolygon":return cf(at).geometry;default:throw new Error(nt+" is invalid")}}function ot(nt,at,wt){if(wt===void 0&&(wt={}),!nt)throw new Error("coordinates is required");if(!Array.isArray(nt))throw new Error("coordinates must be an Array");if(nt.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Lf(nt[0])||!Lf(nt[1]))throw new Error("coordinates must contain numbers");return tt({type:"Point",coordinates:nt},at,wt)}function ut(nt,at,wt){return wt===void 0&&(wt={}),wo(nt.map(function(lo){return ot(lo,at)}),wt)}function yn(nt,at,wt){wt===void 0&&(wt={});for(var lo=0,fo=nt;lo=0))throw new Error("precision must be a positive number");var wt=Math.pow(10,at||0);return Math.round(nt*wt)/wt}function $f(nt,at){at===void 0&&(at="kilometers");var wt=q[at];if(!wt)throw new Error(at+" units is invalid");return nt*wt}function wf(nt,at){at===void 0&&(at="kilometers");var wt=q[at];if(!wt)throw new Error(at+" units is invalid");return nt/wt}function Pf(nt,at){return Af(wf(nt,at))}function Cf(nt){var at=nt%360;return at<0&&(at+=360),at}function Af(nt){return 180*(nt%(2*Math.PI))/Math.PI}function Bf(nt){return nt%360*Math.PI/180}function Hf(nt,at,wt){if(at===void 0&&(at="kilometers"),wt===void 0&&(wt="kilometers"),!(nt>=0))throw new Error("length must be a positive number");return $f(wf(nt,at),wt)}function Df(nt,at,wt){if(at===void 0&&(at="meters"),wt===void 0&&(wt="kilometers"),!(nt>=0))throw new Error("area must be a positive number");var lo=X[at];if(!lo)throw new Error("invalid original units");var fo=X[wt];if(!fo)throw new Error("invalid final units");return nt/lo*fo}function Lf(nt){return!isNaN(nt)&&nt!==null&&!Array.isArray(nt)}function kf(nt){return!!nt&&nt.constructor===Object}function Nf(nt){if(!nt)throw new Error("bbox is required");if(!Array.isArray(nt))throw new Error("bbox must be an Array");if(nt.length!==4&&nt.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");nt.forEach(function(at){if(!Lf(at))throw new Error("bbox must only contain numbers")})}function Yf(nt){if(!nt)throw new Error("id is required");if(["string","number"].indexOf(typeof nt)===-1)throw new Error("id must be a number or a string")}var Gf=Object.freeze({__proto__:null,earthRadius:W,factors:q,unitsFactors:K,areaFactors:X,feature:tt,geometry:rt,point:ot,points:ut,polygon:yn,polygons:uo,lineString:po,lineStrings:mo,featureCollection:wo,multiLineString:lf,multiPoint:yf,multiPolygon:cf,geometryCollection:vf,round:_f,radiansToLength:$f,lengthToRadians:wf,lengthToDegrees:Pf,bearingToAzimuth:Cf,radiansToDegrees:Af,degreesToRadians:Bf,convertLength:Hf,convertArea:Df,isNumber:Lf,isObject:kf,validateBBox:Nf,validateId:Yf});function rp(nt,at,wt){if(nt!==null)for(var lo,fo,vo,ls,ff,mf,bf,Sf,xf=0,If=0,jf=nt.type,zf=jf==="FeatureCollection",Wf=jf==="Feature",Mf=zf?nt.features.length:1,np=0;npmf||zf>bf||Wf>Sf)return ff=xf,mf=lo,bf=zf,Sf=Wf,void(vo=0);var Mf=po([ff,xf],wt.properties);if(at(Mf,lo,fo,Wf,vo)===!1)return!1;vo++,ff=xf})!==!1&&void 0}}})}function Dp(nt,at,wt){var lo=wt,fo=!1;return vg(nt,function(vo,ls,ff,mf,bf){lo=fo===!1&&wt===void 0?vo:at(lo,vo,ls,ff,mf,bf),fo=!0}),lo}function Lp(nt,at){if(!nt)throw new Error("geojson is required");ng(nt,function(wt,lo,fo){if(wt.geometry!==null){var vo=wt.geometry.type,ls=wt.geometry.coordinates;switch(vo){case"LineString":if(at(wt,lo,fo,0,0)===!1)return!1;break;case"Polygon":for(var ff=0;ffwt[0]&&(at[0]=wt[0]),at[1]>wt[1]&&(at[1]=wt[1]),at[2]=2&&!Array.isArray(nt[0])&&!Array.isArray(nt[1]))return nt;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function hp(nt){if(Array.isArray(nt))return nt;if(nt.type==="Feature"){if(nt.geometry!==null)return nt.geometry.coordinates}else if(nt.coordinates)return nt.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function $p(nt){if(nt.length>1&&Lf(nt[0])&&Lf(nt[1]))return!0;if(Array.isArray(nt[0])&&nt[0].length)return $p(nt[0]);throw new Error("coordinates must only contain numbers")}function Vp(nt,at,wt){if(!at||!wt)throw new Error("type and name required");if(!nt||nt.type!==at)throw new Error("Invalid input to "+wt+": must be a "+at+", given "+nt.type)}function bp(nt,at,wt){if(!nt)throw new Error("No feature passed");if(!wt)throw new Error(".featureOf() requires a name");if(!nt||nt.type!=="Feature"||!nt.geometry)throw new Error("Invalid input to "+wt+", Feature with geometry required");if(!nt.geometry||nt.geometry.type!==at)throw new Error("Invalid input to "+wt+": must be a "+at+", given "+nt.geometry.type)}function Ep(nt,at,wt){if(!nt)throw new Error("No featureCollection passed");if(!wt)throw new Error(".collectionOf() requires a name");if(!nt||nt.type!=="FeatureCollection")throw new Error("Invalid input to "+wt+", FeatureCollection required");for(var lo=0,fo=nt.features;lo"u"||!L||!L.Mixin)){yo=$f(yo)?yo:[yo];for(var pf=0;pf0?Math.floor(yo):Math.ceil(yo)};ap.prototype={clone:function(){return new ap(this.x,this.y)},add:function(yo){return this.clone()._add(vp(yo))},_add:function(yo){return this.x+=yo.x,this.y+=yo.y,this},subtract:function(yo){return this.clone()._subtract(vp(yo))},_subtract:function(yo){return this.x-=yo.x,this.y-=yo.y,this},divideBy:function(yo){return this.clone()._divideBy(yo)},_divideBy:function(yo){return this.x/=yo,this.y/=yo,this},multiplyBy:function(yo){return this.clone()._multiplyBy(yo)},_multiplyBy:function(yo){return this.x*=yo,this.y*=yo,this},scaleBy:function(yo){return new ap(this.x*yo.x,this.y*yo.y)},unscaleBy:function(yo){return new ap(this.x/yo.x,this.y/yo.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=yp(this.x),this.y=yp(this.y),this},distanceTo:function(yo){yo=vp(yo);var pf=yo.x-this.x,Tf=yo.y-this.y;return Math.sqrt(pf*pf+Tf*Tf)},equals:function(yo){return yo=vp(yo),yo.x===this.x&&yo.y===this.y},contains:function(yo){return yo=vp(yo),Math.abs(yo.x)<=Math.abs(this.x)&&Math.abs(yo.y)<=Math.abs(this.y)},toString:function(){return"Point("+mo(this.x)+", "+mo(this.y)+")"}};function vp(yo,pf,Tf){return yo instanceof ap?yo:$f(yo)?new ap(yo[0],yo[1]):yo==null?yo:typeof yo=="object"&&"x"in yo&&"y"in yo?new ap(yo.x,yo.y):new ap(yo,pf,Tf)}function Np(yo,pf){if(yo)for(var Tf=pf?[yo,pf]:yo,Ff=0,Zf=Tf.length;Ff=this.min.x&&Tf.x<=this.max.x&&pf.y>=this.min.y&&Tf.y<=this.max.y},intersects:function(yo){yo=jp(yo);var pf=this.min,Tf=this.max,Ff=yo.min,Zf=yo.max,fp=Zf.x>=pf.x&&Ff.x<=Tf.x,Cp=Zf.y>=pf.y&&Ff.y<=Tf.y;return fp&&Cp},overlaps:function(yo){yo=jp(yo);var pf=this.min,Tf=this.max,Ff=yo.min,Zf=yo.max,fp=Zf.x>pf.x&&Ff.xpf.y&&Ff.y=pf.lat&&Zf.lat<=Tf.lat&&Ff.lng>=pf.lng&&Zf.lng<=Tf.lng},intersects:function(yo){yo=Jp(yo);var pf=this._southWest,Tf=this._northEast,Ff=yo.getSouthWest(),Zf=yo.getNorthEast(),fp=Zf.lat>=pf.lat&&Ff.lat<=Tf.lat,Cp=Zf.lng>=pf.lng&&Ff.lng<=Tf.lng;return fp&&Cp},overlaps:function(yo){yo=Jp(yo);var pf=this._southWest,Tf=this._northEast,Ff=yo.getSouthWest(),Zf=yo.getNorthEast(),fp=Zf.lat>pf.lat&&Ff.latpf.lng&&Ff.lng1,Hg=function(){var yo=!1;try{var pf=Object.defineProperty({},"passive",{get:function(){yo=!0}});window.addEventListener("testPassiveEventSupport",po,pf),window.removeEventListener("testPassiveEventSupport",po,pf)}catch{}return yo}(),Iy=function(){return!!document.createElement("canvas").getContext}(),py=!!(document.createElementNS&&cp("svg").createSVGRect),Yy=!!py&&function(){var yo=document.createElement("div");return yo.innerHTML="",(yo.firstChild&&yo.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Yb=!py&&function(){try{var yo=document.createElement("div");yo.innerHTML='';var pf=yo.firstChild;return pf.style.behavior="url(#default#VML)",pf&&typeof pf.adj=="object"}catch{return!1}}(),p0=navigator.platform.indexOf("Mac")===0,_b=navigator.platform.indexOf("Linux")===0;function Fy(yo){return navigator.userAgent.toLowerCase().indexOf(yo)>=0}var qg={ie:Vp,ielt9:bp,edge:Ep,webkit:_p,android:Mp,android23:Yp,androidStock:hg,opera:xg,chrome:kg,gecko:Dg,safari:lm,phantom:Bp,opera12:Rp,win:Fp,ie3d:Op,webkit3d:Kp,gecko3d:Kf,any3d:Xf,mobile:gp,mobileWebkit:wp,mobileWebkit3d:dg,msPointer:mg,pointer:pg,touch:Cg,touchNative:wg,mobileOpera:Bg,mobileGecko:Xg,retina:mm,passiveEvents:Hg,canvas:Iy,svg:py,vml:Yb,inlineSvg:Yy,mac:p0,linux:_b},E1=qg.msPointer?"MSPointerDown":"pointerdown",A$=qg.msPointer?"MSPointerMove":"pointermove",qv=qg.msPointer?"MSPointerUp":"pointerup",H0=qg.msPointer?"MSPointerCancel":"pointercancel",wb={touchstart:E1,touchmove:A$,touchend:qv,touchcancel:H0},R$={touchstart:By,touchmove:Cv,touchend:Cv,touchcancel:Cv},g0={},m_=!1;function Jg(yo,pf,Tf){return pf==="touchstart"&&Py(),R$[pf]?(Tf=R$[pf].bind(this,Tf),yo.addEventListener(wb[pf],Tf,!1),Tf):(console.warn("wrong event specified:",pf),po)}function Hp(yo,pf,Tf){if(!wb[pf]){console.warn("wrong event specified:",pf);return}yo.removeEventListener(wb[pf],Tf,!1)}function Eg(yo){g0[yo.pointerId]=yo}function Gg(yo){g0[yo.pointerId]&&(g0[yo.pointerId]=yo)}function yv(yo){delete g0[yo.pointerId]}function Py(){m_||(document.addEventListener(E1,Eg,!0),document.addEventListener(A$,Gg,!0),document.addEventListener(qv,yv,!0),document.addEventListener(H0,yv,!0),m_=!0)}function Cv(yo,pf){if(pf.pointerType!==(pf.MSPOINTER_TYPE_MOUSE||"mouse")){pf.touches=[];for(var Tf in g0)pf.touches.push(g0[Tf]);pf.changedTouches=[pf],yo(pf)}}function By(yo,pf){pf.MSPOINTER_TYPE_TOUCH&&pf.pointerType===pf.MSPOINTER_TYPE_TOUCH&&ty(pf),Cv(yo,pf)}function S1(yo){var pf={},Tf,Ff;for(Ff in yo)Tf=yo[Ff],pf[Ff]=Tf&&Tf.bind?Tf.bind(yo):Tf;return yo=pf,pf.type="dblclick",pf.detail=2,pf.isTrusted=!1,pf._simulated=!0,pf}var T1=200;function jy(yo,pf){yo.addEventListener("dblclick",pf);var Tf=0,Ff;function Zf(fp){if(fp.detail!==1){Ff=fp.detail;return}if(!(fp.pointerType==="mouse"||fp.sourceCapabilities&&!fp.sourceCapabilities.firesTouchEvents)){var Cp=Sx(fp);if(!(Cp.some(function(sg){return sg instanceof HTMLLabelElement&&sg.attributes.for})&&!Cp.some(function(sg){return sg instanceof HTMLInputElement||sg instanceof HTMLSelectElement}))){var Zp=Date.now();Zp-Tf<=T1?(Ff++,Ff===2&&pf(S1(fp))):Ff=1,Tf=Zp}}}return yo.addEventListener("click",Zf),{dblclick:pf,simDblclick:Zf}}function cw(yo,pf){yo.removeEventListener("dblclick",pf.dblclick),yo.removeEventListener("click",pf.simDblclick)}var xb=v_(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),N$=v_(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),$x=N$==="webkitTransition"||N$==="OTransition"?N$+"End":"transitionend";function _x(yo){return typeof yo=="string"?document.getElementById(yo):yo}function Kb(yo,pf){var Tf=yo.style[pf]||yo.currentStyle&&yo.currentStyle[pf];if((!Tf||Tf==="auto")&&document.defaultView){var Ff=document.defaultView.getComputedStyle(yo,null);Tf=Ff?Ff[pf]:null}return Tf==="auto"?null:Tf}function dv(yo,pf,Tf){var Ff=document.createElement(yo);return Ff.className=pf||"",Tf&&Tf.appendChild(Ff),Ff}function Ov(yo){var pf=yo.parentNode;pf&&pf.removeChild(yo)}function Xb(yo){for(;yo.firstChild;)yo.removeChild(yo.firstChild)}function Y1(yo){var pf=yo.parentNode;pf&&pf.lastChild!==yo&&pf.appendChild(yo)}function K1(yo){var pf=yo.parentNode;pf&&pf.firstChild!==yo&&pf.insertBefore(yo,pf.firstChild)}function Zb(yo,pf){if(yo.classList!==void 0)return yo.classList.contains(pf);var Tf=Zg(yo);return Tf.length>0&&new RegExp("(^|\\s)"+pf+"(\\s|$)").test(Tf)}function Tm(yo,pf){if(yo.classList!==void 0)for(var Tf=lf(pf),Ff=0,Zf=Tf.length;Ff0?2*window.devicePixelRatio:1;function R2(yo){return qg.edge?yo.wheelDeltaY/2:yo.deltaY&&yo.deltaMode===0?-yo.deltaY/qE:yo.deltaY&&yo.deltaMode===1?-yo.deltaY*20:yo.deltaY&&yo.deltaMode===2?-yo.deltaY*60:yo.deltaX||yo.deltaZ?0:yo.wheelDelta?(yo.wheelDeltaY||yo.wheelDelta)/2:yo.detail&&Math.abs(yo.detail)<32765?-yo.detail*20:yo.detail?yo.detail/-32765*60:0}function V0(yo,pf){var Tf=pf.relatedTarget;if(!Tf)return!0;try{for(;Tf&&Tf!==yo;)Tf=Tf.parentNode}catch{return!1}return Tf!==yo}var r0={__proto__:null,on:xm,off:um,stopPropagation:e$,disableScrollPropagation:Ex,disableClickPropagation:U0,preventDefault:ty,stop:Sb,getPropagationPath:Sx,getMousePosition:A2,getWheelDelta:R2,isExternalTarget:V0,addListener:xm,removeListener:um},pw=ip.extend({run:function(yo,pf,Tf,Ff){this.stop(),this._el=yo,this._inProgress=!0,this._duration=Tf||.25,this._easeOutPower=1/Math.max(Ff||.5,.2),this._startPos=Iv(yo),this._offset=pf.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=Lf(this._animate,this),this._step()},_step:function(yo){var pf=+new Date-this._startTime,Tf=this._duration*1e3;pfthis.options.maxZoom)?this.setZoom(yo):this},panInsideBounds:function(yo,pf){this._enforcingBounds=!0;var Tf=this.getCenter(),Ff=this._limitCenter(Tf,this._zoom,Jp(yo));return Tf.equals(Ff)||this.panTo(Ff,pf),this._enforcingBounds=!1,this},panInside:function(yo,pf){pf=pf||{};var Tf=vp(pf.paddingTopLeft||pf.padding||[0,0]),Ff=vp(pf.paddingBottomRight||pf.padding||[0,0]),Zf=this.project(this.getCenter()),fp=this.project(yo),Cp=this.getPixelBounds(),Zp=jp([Cp.min.add(Tf),Cp.max.subtract(Ff)]),sg=Zp.getSize();if(!Zp.contains(fp)){this._enforcingBounds=!0;var yg=fp.subtract(Zp.getCenter()),Lg=Zp.extend(fp).getSize().subtract(sg);Zf.x+=yg.x<0?-Lg.x:Lg.x,Zf.y+=yg.y<0?-Lg.y:Lg.y,this.panTo(this.unproject(Zf),pf),this._enforcingBounds=!1}return this},invalidateSize:function(yo){if(!this._loaded)return this;yo=X({animate:!1,pan:!0},yo===!0?{animate:!0}:yo);var pf=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var Tf=this.getSize(),Ff=pf.divideBy(2).round(),Zf=Tf.divideBy(2).round(),fp=Ff.subtract(Zf);return!fp.x&&!fp.y?this:(yo.animate&&yo.pan?this.panBy(fp):(yo.pan&&this._rawPanBy(fp),this.fire("move"),yo.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(rt(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:pf,newSize:Tf}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(yo){if(yo=this._locateOptions=X({timeout:1e4,watch:!1},yo),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var pf=rt(this._handleGeolocationResponse,this),Tf=rt(this._handleGeolocationError,this);return yo.watch?this._locationWatchId=navigator.geolocation.watchPosition(pf,Tf,yo):navigator.geolocation.getCurrentPosition(pf,Tf,yo),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(yo){if(this._container._leaflet_id){var pf=yo.code,Tf=yo.message||(pf===1?"permission denied":pf===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:pf,message:"Geolocation error: "+Tf+"."})}},_handleGeolocationResponse:function(yo){if(this._container._leaflet_id){var pf=yo.coords.latitude,Tf=yo.coords.longitude,Ff=new ng(pf,Tf),Zf=Ff.toBounds(yo.coords.accuracy*2),fp=this._locateOptions;if(fp.setView){var Cp=this.getBoundsZoom(Zf);this.setView(Ff,fp.maxZoom?Math.min(Cp,fp.maxZoom):Cp)}var Zp={latlng:Ff,bounds:Zf,timestamp:yo.timestamp};for(var sg in yo.coords)typeof yo.coords[sg]=="number"&&(Zp[sg]=yo.coords[sg]);this.fire("locationfound",Zp)}},addHandler:function(yo,pf){if(!pf)return this;var Tf=this[yo]=new pf(this);return this._handlers.push(Tf),this.options[yo]&&Tf.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Ov(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(kf(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var yo;for(yo in this._layers)this._layers[yo].remove();for(yo in this._panes)Ov(this._panes[yo]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(yo,pf){var Tf="leaflet-pane"+(yo?" leaflet-"+yo.replace("Pane","")+"-pane":""),Ff=dv("div",Tf,pf||this._mapPane);return yo&&(this._panes[yo]=Ff),Ff},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var yo=this.getPixelBounds(),pf=this.unproject(yo.getBottomLeft()),Tf=this.unproject(yo.getTopRight());return new Ip(pf,Tf)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(yo,pf,Tf){yo=Jp(yo),Tf=vp(Tf||[0,0]);var Ff=this.getZoom()||0,Zf=this.getMinZoom(),fp=this.getMaxZoom(),Cp=yo.getNorthWest(),Zp=yo.getSouthEast(),sg=this.getSize().subtract(Tf),yg=jp(this.project(Zp,Ff),this.project(Cp,Ff)).getSize(),Lg=qg.any3d?this.options.zoomSnap:1,hm=sg.x/yg.x,Im=sg.y/yg.y,Ky=pf?Math.max(hm,Im):Math.min(hm,Im);return Ff=this.getScaleZoom(Ky,Ff),Lg&&(Ff=Math.round(Ff/(Lg/100))*(Lg/100),Ff=pf?Math.ceil(Ff/Lg)*Lg:Math.floor(Ff/Lg)*Lg),Math.max(Zf,Math.min(fp,Ff))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new ap(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(yo,pf){var Tf=this._getTopLeftPoint(yo,pf);return new Np(Tf,Tf.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(yo){return this.options.crs.getProjectedBounds(yo===void 0?this.getZoom():yo)},getPane:function(yo){return typeof yo=="string"?this._panes[yo]:yo},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(yo,pf){var Tf=this.options.crs;return pf=pf===void 0?this._zoom:pf,Tf.scale(yo)/Tf.scale(pf)},getScaleZoom:function(yo,pf){var Tf=this.options.crs;pf=pf===void 0?this._zoom:pf;var Ff=Tf.zoom(yo*Tf.scale(pf));return isNaN(Ff)?1/0:Ff},project:function(yo,pf){return pf=pf===void 0?this._zoom:pf,this.options.crs.latLngToPoint(og(yo),pf)},unproject:function(yo,pf){return pf=pf===void 0?this._zoom:pf,this.options.crs.pointToLatLng(vp(yo),pf)},layerPointToLatLng:function(yo){var pf=vp(yo).add(this.getPixelOrigin());return this.unproject(pf)},latLngToLayerPoint:function(yo){var pf=this.project(og(yo))._round();return pf._subtract(this.getPixelOrigin())},wrapLatLng:function(yo){return this.options.crs.wrapLatLng(og(yo))},wrapLatLngBounds:function(yo){return this.options.crs.wrapLatLngBounds(Jp(yo))},distance:function(yo,pf){return this.options.crs.distance(og(yo),og(pf))},containerPointToLayerPoint:function(yo){return vp(yo).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(yo){return vp(yo).add(this._getMapPanePos())},containerPointToLatLng:function(yo){var pf=this.containerPointToLayerPoint(vp(yo));return this.layerPointToLatLng(pf)},latLngToContainerPoint:function(yo){return this.layerPointToContainerPoint(this.latLngToLayerPoint(og(yo)))},mouseEventToContainerPoint:function(yo){return A2(yo,this._container)},mouseEventToLayerPoint:function(yo){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(yo))},mouseEventToLatLng:function(yo){return this.layerPointToLatLng(this.mouseEventToLayerPoint(yo))},_initContainer:function(yo){var pf=this._container=_x(yo);if(pf){if(pf._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");xm(pf,"scroll",this._onScroll,this),this._containerId=ut(pf)},_initLayout:function(){var yo=this._container;this._fadeAnimated=this.options.fadeAnimation&&qg.any3d,Tm(yo,"leaflet-container"+(qg.touch?" leaflet-touch":"")+(qg.retina?" leaflet-retina":"")+(qg.ielt9?" leaflet-oldie":"")+(qg.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var pf=Kb(yo,"position");pf!=="absolute"&&pf!=="relative"&&pf!=="fixed"&&pf!=="sticky"&&(yo.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var yo=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Yv(this._mapPane,new ap(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Tm(yo.markerPane,"leaflet-zoom-hide"),Tm(yo.shadowPane,"leaflet-zoom-hide"))},_resetView:function(yo,pf,Tf){Yv(this._mapPane,new ap(0,0));var Ff=!this._loaded;this._loaded=!0,pf=this._limitZoom(pf),this.fire("viewprereset");var Zf=this._zoom!==pf;this._moveStart(Zf,Tf)._move(yo,pf)._moveEnd(Zf),this.fire("viewreset"),Ff&&this.fire("load")},_moveStart:function(yo,pf){return yo&&this.fire("zoomstart"),pf||this.fire("movestart"),this},_move:function(yo,pf,Tf,Ff){pf===void 0&&(pf=this._zoom);var Zf=this._zoom!==pf;return this._zoom=pf,this._lastCenter=yo,this._pixelOrigin=this._getNewPixelOrigin(yo),Ff?Tf&&Tf.pinch&&this.fire("zoom",Tf):((Zf||Tf&&Tf.pinch)&&this.fire("zoom",Tf),this.fire("move",Tf)),this},_moveEnd:function(yo){return yo&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return kf(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(yo){Yv(this._mapPane,this._getMapPanePos().subtract(yo))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(yo){this._targets={},this._targets[ut(this._container)]=this;var pf=yo?um:xm;pf(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&pf(window,"resize",this._onResize,this),qg.any3d&&this.options.transform3DLimit&&(yo?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){kf(this._resizeRequest),this._resizeRequest=Lf(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var yo=this._getMapPanePos();Math.max(Math.abs(yo.x),Math.abs(yo.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(yo,pf){for(var Tf=[],Ff,Zf=pf==="mouseout"||pf==="mouseover",fp=yo.target||yo.srcElement,Cp=!1;fp;){if(Ff=this._targets[ut(fp)],Ff&&(pf==="click"||pf==="preclick")&&this._draggableMoved(Ff)){Cp=!0;break}if(Ff&&Ff.listens(pf,!0)&&(Zf&&!V0(fp,yo)||(Tf.push(Ff),Zf))||fp===this._container)break;fp=fp.parentNode}return!Tf.length&&!Cp&&!Zf&&this.listens(pf,!0)&&(Tf=[this]),Tf},_isClickDisabled:function(yo){for(;yo&&yo!==this._container;){if(yo._leaflet_disable_click)return!0;yo=yo.parentNode}},_handleDOMEvent:function(yo){var pf=yo.target||yo.srcElement;if(!(!this._loaded||pf._leaflet_disable_events||yo.type==="click"&&this._isClickDisabled(pf))){var Tf=yo.type;Tf==="mousedown"&&fw(pf),this._fireDOMEvent(yo,Tf)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(yo,pf,Tf){if(yo.type==="click"){var Ff=X({},yo);Ff.type="preclick",this._fireDOMEvent(Ff,Ff.type,Tf)}var Zf=this._findEventTargets(yo,pf);if(Tf){for(var fp=[],Cp=0;Cp0?Math.round(yo-pf)/2:Math.max(0,Math.ceil(yo))-Math.max(0,Math.floor(pf))},_limitZoom:function(yo){var pf=this.getMinZoom(),Tf=this.getMaxZoom(),Ff=qg.any3d?this.options.zoomSnap:1;return Ff&&(yo=Math.round(yo/Ff)*Ff),Math.max(pf,Math.min(Tf,yo))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){cm(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(yo,pf){var Tf=this._getCenterOffset(yo)._trunc();return(pf&&pf.animate)!==!0&&!this.getSize().contains(Tf)?!1:(this.panBy(Tf,pf),!0)},_createAnimProxy:function(){var yo=this._proxy=dv("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(yo),this.on("zoomanim",function(pf){var Tf=xb,Ff=this._proxy.style[Tf];X1(this._proxy,this.project(pf.center,pf.zoom),this.getZoomScale(pf.zoom,1)),Ff===this._proxy.style[Tf]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Ov(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var yo=this.getCenter(),pf=this.getZoom();X1(this._proxy,this.project(yo,pf),this.getZoomScale(pf,1))},_catchTransitionEnd:function(yo){this._animatingZoom&&yo.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(yo,pf,Tf){if(this._animatingZoom)return!0;if(Tf=Tf||{},!this._zoomAnimated||Tf.animate===!1||this._nothingToAnimate()||Math.abs(pf-this._zoom)>this.options.zoomAnimationThreshold)return!1;var Ff=this.getZoomScale(pf),Zf=this._getCenterOffset(yo)._divideBy(1-1/Ff);return Tf.animate!==!0&&!this.getSize().contains(Zf)?!1:(Lf(function(){this._moveStart(!0,Tf.noMoveStart||!1)._animateZoom(yo,pf,!0)},this),!0)},_animateZoom:function(yo,pf,Tf,Ff){this._mapPane&&(Tf&&(this._animatingZoom=!0,this._animateToCenter=yo,this._animateToZoom=pf,Tm(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:yo,zoom:pf,noUpdate:Ff}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(rt(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&cm(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function YE(yo,pf){return new lv(yo,pf)}var m0=Yf.extend({options:{position:"topright"},initialize:function(yo){yf(this,yo)},getPosition:function(){return this.options.position},setPosition:function(yo){var pf=this._map;return pf&&pf.removeControl(this),this.options.position=yo,pf&&pf.addControl(this),this},getContainer:function(){return this._container},addTo:function(yo){this.remove(),this._map=yo;var pf=this._container=this.onAdd(yo),Tf=this.getPosition(),Ff=yo._controlCorners[Tf];return Tm(pf,"leaflet-control"),Tf.indexOf("bottom")!==-1?Ff.insertBefore(pf,Ff.firstChild):Ff.appendChild(pf),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Ov(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(yo){this._map&&yo&&yo.screenX>0&&yo.screenY>0&&this._map.getContainer().focus()}}),F$=function(yo){return new m0(yo)};lv.include({addControl:function(yo){return yo.addTo(this),this},removeControl:function(yo){return yo.remove(),this},_initControlPos:function(){var yo=this._controlCorners={},pf="leaflet-",Tf=this._controlContainer=dv("div",pf+"control-container",this._container);function Ff(Zf,fp){var Cp=pf+Zf+" "+pf+fp;yo[Zf+fp]=dv("div",Cp,Tf)}Ff("top","left"),Ff("top","right"),Ff("bottom","left"),Ff("bottom","right")},_clearControlPos:function(){for(var yo in this._controlCorners)Ov(this._controlCorners[yo]);Ov(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var __=m0.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(yo,pf,Tf,Ff){return Tf1,this._baseLayersList.style.display=yo?"":"none"),this._separator.style.display=pf&&yo?"":"none",this},_onLayerChange:function(yo){this._handlingClick||this._update();var pf=this._getLayer(ut(yo.target)),Tf=pf.overlay?yo.type==="add"?"overlayadd":"overlayremove":yo.type==="add"?"baselayerchange":null;Tf&&this._map.fire(Tf,pf)},_createRadioElement:function(yo,pf){var Tf='",Ff=document.createElement("div");return Ff.innerHTML=Tf,Ff.firstChild},_addItem:function(yo){var pf=document.createElement("label"),Tf=this._map.hasLayer(yo.layer),Ff;yo.overlay?(Ff=document.createElement("input"),Ff.type="checkbox",Ff.className="leaflet-control-layers-selector",Ff.defaultChecked=Tf):Ff=this._createRadioElement("leaflet-base-layers_"+ut(this),Tf),this._layerControlInputs.push(Ff),Ff.layerId=ut(yo.layer),xm(Ff,"click",this._onInputClick,this);var Zf=document.createElement("span");Zf.innerHTML=" "+yo.name;var fp=document.createElement("span");pf.appendChild(fp),fp.appendChild(Ff),fp.appendChild(Zf);var Cp=yo.overlay?this._overlaysList:this._baseLayersList;return Cp.appendChild(pf),this._checkDisabledLayers(),pf},_onInputClick:function(){if(!this._preventClick){var yo=this._layerControlInputs,pf,Tf,Ff=[],Zf=[];this._handlingClick=!0;for(var fp=yo.length-1;fp>=0;fp--)pf=yo[fp],Tf=this._getLayer(pf.layerId).layer,pf.checked?Ff.push(Tf):pf.checked||Zf.push(Tf);for(fp=0;fp=0;Zf--)pf=yo[Zf],Tf=this._getLayer(pf.layerId).layer,pf.disabled=Tf.options.minZoom!==void 0&&FfTf.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var yo=this._section;this._preventClick=!0,xm(yo,"click",ty),this.expand();var pf=this;setTimeout(function(){um(yo,"click",ty),pf._preventClick=!1})}}),w_=function(yo,pf,Tf){return new __(yo,pf,Tf)},x_=m0.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(yo){var pf="leaflet-control-zoom",Tf=dv("div",pf+" leaflet-bar"),Ff=this.options;return this._zoomInButton=this._createButton(Ff.zoomInText,Ff.zoomInTitle,pf+"-in",Tf,this._zoomIn),this._zoomOutButton=this._createButton(Ff.zoomOutText,Ff.zoomOutTitle,pf+"-out",Tf,this._zoomOut),this._updateDisabled(),yo.on("zoomend zoomlevelschange",this._updateDisabled,this),Tf},onRemove:function(yo){yo.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(yo){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(yo.shiftKey?3:1))},_createButton:function(yo,pf,Tf,Ff,Zf){var fp=dv("a",Tf,Ff);return fp.innerHTML=yo,fp.href="#",fp.title=pf,fp.setAttribute("role","button"),fp.setAttribute("aria-label",pf),U0(fp),xm(fp,"click",Sb),xm(fp,"click",Zf,this),xm(fp,"click",this._refocusOnMap,this),fp},_updateDisabled:function(){var yo=this._map,pf="leaflet-disabled";cm(this._zoomInButton,pf),cm(this._zoomOutButton,pf),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||yo._zoom===yo.getMinZoom())&&(Tm(this._zoomOutButton,pf),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||yo._zoom===yo.getMaxZoom())&&(Tm(this._zoomInButton,pf),this._zoomInButton.setAttribute("aria-disabled","true"))}});lv.mergeOptions({zoomControl:!0}),lv.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new x_,this.addControl(this.zoomControl))});var KE=function(yo){return new x_(yo)},N2=m0.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(yo){var pf="leaflet-control-scale",Tf=dv("div",pf),Ff=this.options;return this._addScales(Ff,pf+"-line",Tf),yo.on(Ff.updateWhenIdle?"moveend":"move",this._update,this),yo.whenReady(this._update,this),Tf},onRemove:function(yo){yo.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(yo,pf,Tf){yo.metric&&(this._mScale=dv("div",pf,Tf)),yo.imperial&&(this._iScale=dv("div",pf,Tf))},_update:function(){var yo=this._map,pf=yo.getSize().y/2,Tf=yo.distance(yo.containerPointToLatLng([0,pf]),yo.containerPointToLatLng([this.options.maxWidth,pf]));this._updateScales(Tf)},_updateScales:function(yo){this.options.metric&&yo&&this._updateMetric(yo),this.options.imperial&&yo&&this._updateImperial(yo)},_updateMetric:function(yo){var pf=this._getRoundNum(yo),Tf=pf<1e3?pf+" m":pf/1e3+" km";this._updateScale(this._mScale,Tf,pf/yo)},_updateImperial:function(yo){var pf=yo*3.2808399,Tf,Ff,Zf;pf>5280?(Tf=pf/5280,Ff=this._getRoundNum(Tf),this._updateScale(this._iScale,Ff+" mi",Ff/Tf)):(Zf=this._getRoundNum(pf),this._updateScale(this._iScale,Zf+" ft",Zf/pf))},_updateScale:function(yo,pf,Tf){yo.style.width=Math.round(this.options.maxWidth*Tf)+"px",yo.innerHTML=pf},_getRoundNum:function(yo){var pf=Math.pow(10,(Math.floor(yo)+"").length-1),Tf=yo/pf;return Tf=Tf>=10?10:Tf>=5?5:Tf>=3?3:Tf>=2?2:1,pf*Tf}}),M2=function(yo){return new N2(yo)},Tx='',gw=m0.extend({options:{position:"bottomright",prefix:''+(qg.inlineSvg?Tx+" ":"")+"Leaflet"},initialize:function(yo){yf(this,yo),this._attributions={}},onAdd:function(yo){yo.attributionControl=this,this._container=dv("div","leaflet-control-attribution"),U0(this._container);for(var pf in yo._layers)yo._layers[pf].getAttribution&&this.addAttribution(yo._layers[pf].getAttribution());return this._update(),yo.on("layeradd",this._addAttribution,this),this._container},onRemove:function(yo){yo.off("layeradd",this._addAttribution,this)},_addAttribution:function(yo){yo.layer.getAttribution&&(this.addAttribution(yo.layer.getAttribution()),yo.layer.once("remove",function(){this.removeAttribution(yo.layer.getAttribution())},this))},setPrefix:function(yo){return this.options.prefix=yo,this._update(),this},addAttribution:function(yo){return yo?(this._attributions[yo]||(this._attributions[yo]=0),this._attributions[yo]++,this._update(),this):this},removeAttribution:function(yo){return yo?(this._attributions[yo]&&(this._attributions[yo]--,this._update()),this):this},_update:function(){if(this._map){var yo=[];for(var pf in this._attributions)this._attributions[pf]&&yo.push(pf);var Tf=[];this.options.prefix&&Tf.push(this.options.prefix),yo.length&&Tf.push(yo.join(", ")),this._container.innerHTML=Tf.join(' ')}}});lv.mergeOptions({attributionControl:!0}),lv.addInitHook(function(){this.options.attributionControl&&new gw().addTo(this)});var D2=function(yo){return new gw(yo)};m0.Layers=__,m0.Zoom=x_,m0.Scale=N2,m0.Attribution=gw,F$.layers=w_,F$.zoom=KE,F$.scale=M2,F$.attribution=D2;var $y=Yf.extend({initialize:function(yo){this._map=yo},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});$y.addTo=function(yo,pf){return yo.addHandler(pf,this),this};var kx={Events:rp},k1=qg.touch?"touchstart mousedown":"mousedown",n1=ip.extend({options:{clickTolerance:3},initialize:function(yo,pf,Tf,Ff){yf(this,Ff),this._element=yo,this._dragStartTarget=pf||yo,this._preventOutline=Tf},enable:function(){this._enabled||(xm(this._dragStartTarget,k1,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(n1._dragging===this&&this.finishDrag(!0),um(this._dragStartTarget,k1,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(yo){if(this._enabled&&(this._moved=!1,!Zb(this._element,"leaflet-zoom-anim"))){if(yo.touches&&yo.touches.length!==1){n1._dragging===this&&this.finishDrag();return}if(!(n1._dragging||yo.shiftKey||yo.which!==1&&yo.button!==1&&!yo.touches)&&(n1._dragging=this,this._preventOutline&&fw(this._element),Jb(),Z1(),!this._moving)){this.fire("down");var pf=yo.touches?yo.touches[0]:yo,Tf=b_(this._element);this._startPoint=new ap(pf.clientX,pf.clientY),this._startPos=Iv(this._element),this._parentScale=L$(Tf);var Ff=yo.type==="mousedown";xm(document,Ff?"mousemove":"touchmove",this._onMove,this),xm(document,Ff?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(yo){if(this._enabled){if(yo.touches&&yo.touches.length>1){this._moved=!0;return}var pf=yo.touches&&yo.touches.length===1?yo.touches[0]:yo,Tf=new ap(pf.clientX,pf.clientY)._subtract(this._startPoint);!Tf.x&&!Tf.y||Math.abs(Tf.x)+Math.abs(Tf.y)fp&&(Cp=Zp,fp=sg);fp>Tf&&(pf[Cp]=1,n0(yo,pf,Tf,Ff,Cp),n0(yo,pf,Tf,Cp,Zf))}function j$(yo,pf){for(var Tf=[yo[0]],Ff=1,Zf=0,fp=yo.length;Ffpf&&(Tf.push(yo[Ff]),Zf=Ff);return Zfpf.max.x&&(Tf|=2),yo.ypf.max.y&&(Tf|=8),Tf}function Cx(yo,pf){var Tf=pf.x-yo.x,Ff=pf.y-yo.y;return Tf*Tf+Ff*Ff}function T_(yo,pf,Tf,Ff){var Zf=pf.x,fp=pf.y,Cp=Tf.x-Zf,Zp=Tf.y-fp,sg=Cp*Cp+Zp*Zp,yg;return sg>0&&(yg=((yo.x-Zf)*Cp+(yo.y-fp)*Zp)/sg,yg>1?(Zf=Tf.x,fp=Tf.y):yg>0&&(Zf+=Cp*yg,fp+=Zp*yg)),Cp=yo.x-Zf,Zp=yo.y-fp,Ff?Cp*Cp+Zp*Zp:new ap(Zf,fp)}function zy(yo){return!$f(yo[0])||typeof yo[0][0]!="object"&&typeof yo[0][0]<"u"}function B2(yo){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),zy(yo)}function gy(yo,pf){var Tf,Ff,Zf,fp,Cp,Zp,sg,yg;if(!yo||yo.length===0)throw new Error("latlngs not passed");zy(yo)||(console.warn("latlngs are not flat! Only the first ring will be used"),yo=yo[0]);var Lg=og([0,0]),hm=Jp(yo),Im=hm.getNorthWest().distanceTo(hm.getSouthWest())*hm.getNorthEast().distanceTo(hm.getNorthWest());Im<1700&&(Lg=mw(yo));var Ky=yo.length,ry=[];for(Tf=0;TfFf){sg=(fp-Ff)/Zf,yg=[Zp.x-sg*(Zp.x-Cp.x),Zp.y-sg*(Zp.y-Cp.y)];break}var i0=pf.unproject(vp(yg));return og([i0.lat+Lg.lat,i0.lng+Lg.lng])}var C1={__proto__:null,simplify:S_,pointToSegmentDistance:vw,closestPointOnSegment:B$,clipSegment:F2,_getEdgeIntersection:yw,_getBitCode:t$,_sqClosestPointOnSegment:T_,isFlat:zy,_flat:B2,polylineCenter:gy},r$={project:function(yo){return new ap(yo.lng,yo.lat)},unproject:function(yo){return new ng(yo.y,yo.x)},bounds:new Np([-180,-90],[180,90])},n$={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Np([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(yo){var pf=Math.PI/180,Tf=this.R,Ff=yo.lat*pf,Zf=this.R_MINOR/Tf,fp=Math.sqrt(1-Zf*Zf),Cp=fp*Math.sin(Ff),Zp=Math.tan(Math.PI/4-Ff/2)/Math.pow((1-Cp)/(1+Cp),fp/2);return Ff=-Tf*Math.log(Math.max(Zp,1e-10)),new ap(yo.lng*pf*Tf,Ff)},unproject:function(yo){for(var pf=180/Math.PI,Tf=this.R,Ff=this.R_MINOR/Tf,Zf=Math.sqrt(1-Ff*Ff),fp=Math.exp(-yo.y/Tf),Cp=Math.PI/2-2*Math.atan(fp),Zp=0,sg=.1,yg;Zp<15&&Math.abs(sg)>1e-7;Zp++)yg=Zf*Math.sin(Cp),yg=Math.pow((1-yg)/(1+yg),Zf/2),sg=Math.PI/2-2*Math.atan(fp*yg)-Cp,Cp+=sg;return new ng(Cp*pf,yo.x*pf/Tf)}},z$={__proto__:null,LonLat:r$,Mercator:n$,SphericalMercator:xp},bw=X({},Dp,{code:"EPSG:3395",projection:n$,transformation:function(){var yo=.5/(Math.PI*n$.R);return lp(yo,.5,-yo,.5)}()}),Ay=X({},Dp,{code:"EPSG:4326",projection:r$,transformation:lp(1/180,1,-1/180,.5)}),Ox=X({},vg,{projection:r$,transformation:lp(1,0,-1,0),scale:function(yo){return Math.pow(2,yo)},zoom:function(yo){return Math.log(yo)/Math.LN2},distance:function(yo,pf){var Tf=pf.lng-yo.lng,Ff=pf.lat-yo.lat;return Math.sqrt(Tf*Tf+Ff*Ff)},infinite:!0});vg.Earth=Dp,vg.EPSG3395=bw,vg.EPSG3857=Of,vg.EPSG900913=qf,vg.EPSG4326=Ay,vg.Simple=Ox;var xv=ip.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(yo){return yo.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(yo){return yo&&yo.removeLayer(this),this},getPane:function(yo){return this._map.getPane(yo?this.options[yo]||yo:this.options.pane)},addInteractiveTarget:function(yo){return this._map._targets[ut(yo)]=this,this},removeInteractiveTarget:function(yo){return delete this._map._targets[ut(yo)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(yo){var pf=yo.target;if(pf.hasLayer(this)){if(this._map=pf,this._zoomAnimated=pf._zoomAnimated,this.getEvents){var Tf=this.getEvents();pf.on(Tf,this),this.once("remove",function(){pf.off(Tf,this)},this)}this.onAdd(pf),this.fire("add"),pf.fire("layeradd",{layer:this})}}});lv.include({addLayer:function(yo){if(!yo._layerAdd)throw new Error("The provided object is not a Layer.");var pf=ut(yo);return this._layers[pf]?this:(this._layers[pf]=yo,yo._mapToAdd=this,yo.beforeAdd&&yo.beforeAdd(this),this.whenReady(yo._layerAdd,yo),this)},removeLayer:function(yo){var pf=ut(yo);return this._layers[pf]?(this._loaded&&yo.onRemove(this),delete this._layers[pf],this._loaded&&(this.fire("layerremove",{layer:yo}),yo.fire("remove")),yo._map=yo._mapToAdd=null,this):this},hasLayer:function(yo){return ut(yo)in this._layers},eachLayer:function(yo,pf){for(var Tf in this._layers)yo.call(pf,this._layers[Tf]);return this},_addLayers:function(yo){yo=yo?$f(yo)?yo:[yo]:[];for(var pf=0,Tf=yo.length;pfthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&pf[0]instanceof ng&&pf[0].equals(pf[Tf-1])&&pf.pop(),pf},_setLatLngs:function(yo){eb.prototype._setLatLngs.call(this,yo),zy(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return zy(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var yo=this._renderer._bounds,pf=this.options.weight,Tf=new ap(pf,pf);if(yo=new Np(yo.min.subtract(Tf),yo.max.add(Tf)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(yo))){if(this.options.noClip){this._parts=this._rings;return}for(var Ff=0,Zf=this._rings.length,fp;Ffyo.y!=Zf.y>yo.y&&yo.x<(Zf.x-Ff.x)*(yo.y-Ff.y)/(Zf.y-Ff.y)+Ff.x&&(pf=!pf);return pf||eb.prototype._containsPoint.call(this,yo,!0)}});function QE(yo,pf){return new V$(yo,pf)}var Mv=_y.extend({initialize:function(yo,pf){yf(this,pf),this._layers={},yo&&this.addData(yo)},addData:function(yo){var pf=$f(yo)?yo:yo.features,Tf,Ff,Zf;if(pf){for(Tf=0,Ff=pf.length;Tf0&&Zf.push(Zf[0].slice()),Zf}function a$(yo,pf){return yo.feature?X({},yo.feature,{geometry:pf}):C_(pf)}function C_(yo){return yo.type==="Feature"||yo.type==="FeatureCollection"?yo:{type:"Feature",properties:{},geometry:yo}}var O_={toGeoJSON:function(yo){return a$(this,{type:"Point",coordinates:O1(this.getLatLng(),yo)})}};i$.include(O_),ww.include(O_),_w.include(O_),eb.include({toGeoJSON:function(yo){var pf=!zy(this._latlngs),Tf=o$(this._latlngs,pf?1:0,!1,yo);return a$(this,{type:(pf?"Multi":"")+"LineString",coordinates:Tf})}}),V$.include({toGeoJSON:function(yo){var pf=!zy(this._latlngs),Tf=pf&&!zy(this._latlngs[0]),Ff=o$(this._latlngs,Tf?2:pf?1:0,!0,yo);return pf||(Ff=[Ff]),a$(this,{type:(Tf?"Multi":"")+"Polygon",coordinates:Ff})}}),I0.include({toMultiPoint:function(yo){var pf=[];return this.eachLayer(function(Tf){pf.push(Tf.toGeoJSON(yo).geometry.coordinates)}),a$(this,{type:"MultiPoint",coordinates:pf})},toGeoJSON:function(yo){var pf=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(pf==="MultiPoint")return this.toMultiPoint(yo);var Tf=pf==="GeometryCollection",Ff=[];return this.eachLayer(function(Zf){if(Zf.toGeoJSON){var fp=Zf.toGeoJSON(yo);if(Tf)Ff.push(fp.geometry);else{var Cp=C_(fp);Cp.type==="FeatureCollection"?Ff.push.apply(Ff,Cp.features):Ff.push(Cp)}}}),Tf?a$(this,{geometries:Ff,type:"GeometryCollection"}):{type:"FeatureCollection",features:Ff}}});function Ew(yo,pf){return new Mv(yo,pf)}var eS=Ew,tb=xv.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(yo,pf,Tf){this._url=yo,this._bounds=Jp(pf),yf(this,Tf)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Tm(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Ov(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(yo){return this.options.opacity=yo,this._image&&this._updateOpacity(),this},setStyle:function(yo){return yo.opacity&&this.setOpacity(yo.opacity),this},bringToFront:function(){return this._map&&Y1(this._image),this},bringToBack:function(){return this._map&&K1(this._image),this},setUrl:function(yo){return this._url=yo,this._image&&(this._image.src=yo),this},setBounds:function(yo){return this._bounds=Jp(yo),this._map&&this._reset(),this},getEvents:function(){var yo={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(yo.zoomanim=this._animateZoom),yo},setZIndex:function(yo){return this.options.zIndex=yo,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var yo=this._url.tagName==="IMG",pf=this._image=yo?this._url:dv("img");if(Tm(pf,"leaflet-image-layer"),this._zoomAnimated&&Tm(pf,"leaflet-zoom-animated"),this.options.className&&Tm(pf,this.options.className),pf.onselectstart=po,pf.onmousemove=po,pf.onload=rt(this.fire,this,"load"),pf.onerror=rt(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(pf.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),yo){this._url=pf.src;return}pf.src=this._url,pf.alt=this.options.alt},_animateZoom:function(yo){var pf=this._map.getZoomScale(yo.zoom),Tf=this._map._latLngBoundsToNewLayerBounds(this._bounds,yo.zoom,yo.center).min;X1(this._image,Tf,pf)},_reset:function(){var yo=this._image,pf=new Np(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),Tf=pf.getSize();Yv(yo,pf.min),yo.style.width=Tf.x+"px",yo.style.height=Tf.y+"px"},_updateOpacity:function(){_m(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var yo=this.options.errorOverlayUrl;yo&&this._url!==yo&&(this._url=yo,this._image.src=yo)},getCenter:function(){return this._bounds.getCenter()}}),tS=function(yo,pf,Tf){return new tb(yo,pf,Tf)},Ax=tb.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var yo=this._url.tagName==="VIDEO",pf=this._image=yo?this._url:dv("video");if(Tm(pf,"leaflet-image-layer"),this._zoomAnimated&&Tm(pf,"leaflet-zoom-animated"),this.options.className&&Tm(pf,this.options.className),pf.onselectstart=po,pf.onmousemove=po,pf.onloadeddata=rt(this.fire,this,"load"),yo){for(var Tf=pf.getElementsByTagName("source"),Ff=[],Zf=0;Zf0?Ff:[pf.src];return}$f(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(pf.style,"objectFit")&&(pf.style.objectFit="fill"),pf.autoplay=!!this.options.autoplay,pf.loop=!!this.options.loop,pf.muted=!!this.options.muted,pf.playsInline=!!this.options.playsInline;for(var fp=0;fpZf?(pf.height=Zf+"px",Tm(yo,fp)):cm(yo,fp),this._containerWidth=this._container.offsetWidth},_animateZoom:function(yo){var pf=this._map._latLngToNewLayerPoint(this._latlng,yo.zoom,yo.center),Tf=this._getAnchor();Yv(this._container,pf.add(Tf))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var yo=this._map,pf=parseInt(Kb(this._container,"marginBottom"),10)||0,Tf=this._container.offsetHeight+pf,Ff=this._containerWidth,Zf=new ap(this._containerLeft,-Tf-this._containerBottom);Zf._add(Iv(this._container));var fp=yo.layerPointToContainerPoint(Zf),Cp=vp(this.options.autoPanPadding),Zp=vp(this.options.autoPanPaddingTopLeft||Cp),sg=vp(this.options.autoPanPaddingBottomRight||Cp),yg=yo.getSize(),Lg=0,hm=0;fp.x+Ff+sg.x>yg.x&&(Lg=fp.x+Ff-yg.x+sg.x),fp.x-Lg-Zp.x<0&&(Lg=fp.x-Zp.x),fp.y+Tf+sg.y>yg.y&&(hm=fp.y+Tf-yg.y+sg.y),fp.y-hm-Zp.y<0&&(hm=fp.y-Zp.y),(Lg||hm)&&(this.options.keepInView&&(this._autopanning=!0),yo.fire("autopanstart").panBy([Lg,hm]))}},_getAnchor:function(){return vp(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),I1=function(yo,pf){return new G$(yo,pf)};lv.mergeOptions({closePopupOnClick:!0}),lv.include({openPopup:function(yo,pf,Tf){return this._initOverlay(G$,yo,pf,Tf).openOn(this),this},closePopup:function(yo){return yo=arguments.length?yo:this._popup,yo&&yo.close(),this}}),xv.include({bindPopup:function(yo,pf){return this._popup=this._initOverlay(G$,this._popup,yo,pf),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(yo){return this._popup&&(this instanceof _y||(this._popup._source=this),this._popup._prepareOpen(yo||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(yo){return this._popup&&this._popup.setContent(yo),this},getPopup:function(){return this._popup},_openPopup:function(yo){if(!(!this._popup||!this._map)){Sb(yo);var pf=yo.layer||yo.target;if(this._popup._source===pf&&!(pf instanceof Q1)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(yo.latlng);return}this._popup._source=pf,this.openPopup(yo.latlng)}},_movePopup:function(yo){this._popup.setLatLng(yo.latlng)},_onKeyPress:function(yo){yo.originalEvent.keyCode===13&&this._openPopup(yo)}});var Tb=Dv.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(yo){Dv.prototype.onAdd.call(this,yo),this.setOpacity(this.options.opacity),yo.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(yo){Dv.prototype.onRemove.call(this,yo),yo.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var yo=Dv.prototype.getEvents.call(this);return this.options.permanent||(yo.preclick=this.close),yo},_initLayout:function(){var yo="leaflet-tooltip",pf=yo+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=dv("div",pf),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+ut(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(yo){var pf,Tf,Ff=this._map,Zf=this._container,fp=Ff.latLngToContainerPoint(Ff.getCenter()),Cp=Ff.layerPointToContainerPoint(yo),Zp=this.options.direction,sg=Zf.offsetWidth,yg=Zf.offsetHeight,Lg=vp(this.options.offset),hm=this._getAnchor();Zp==="top"?(pf=sg/2,Tf=yg):Zp==="bottom"?(pf=sg/2,Tf=0):Zp==="center"?(pf=sg/2,Tf=yg/2):Zp==="right"?(pf=0,Tf=yg/2):Zp==="left"?(pf=sg,Tf=yg/2):Cp.xthis.options.maxZoom||TfFf?this._retainParent(Zf,fp,Cp,Ff):!1)},_retainChildren:function(yo,pf,Tf,Ff){for(var Zf=2*yo;Zf<2*yo+2;Zf++)for(var fp=2*pf;fp<2*pf+2;fp++){var Cp=new ap(Zf,fp);Cp.z=Tf+1;var Zp=this._tileCoordsToKey(Cp),sg=this._tiles[Zp];if(sg&&sg.active){sg.retain=!0;continue}else sg&&sg.loaded&&(sg.retain=!0);Tf+1this.options.maxZoom||this.options.minZoom!==void 0&&Zf1){this._setView(yo,Tf);return}for(var hm=Zf.min.y;hm<=Zf.max.y;hm++)for(var Im=Zf.min.x;Im<=Zf.max.x;Im++){var Ky=new ap(Im,hm);if(Ky.z=this._tileZoom,!!this._isValidTile(Ky)){var ry=this._tiles[this._tileCoordsToKey(Ky)];ry?ry.current=!0:Cp.push(Ky)}}if(Cp.sort(function(i0,Ob){return i0.distanceTo(fp)-Ob.distanceTo(fp)}),Cp.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Xy=document.createDocumentFragment();for(Im=0;ImTf.max.x)||!pf.wrapLat&&(yo.yTf.max.y))return!1}if(!this.options.bounds)return!0;var Ff=this._tileCoordsToBounds(yo);return Jp(this.options.bounds).overlaps(Ff)},_keyToBounds:function(yo){return this._tileCoordsToBounds(this._keyToTileCoords(yo))},_tileCoordsToNwSe:function(yo){var pf=this._map,Tf=this.getTileSize(),Ff=yo.scaleBy(Tf),Zf=Ff.add(Tf),fp=pf.unproject(Ff,yo.z),Cp=pf.unproject(Zf,yo.z);return[fp,Cp]},_tileCoordsToBounds:function(yo){var pf=this._tileCoordsToNwSe(yo),Tf=new Ip(pf[0],pf[1]);return this.options.noWrap||(Tf=this._map.wrapLatLngBounds(Tf)),Tf},_tileCoordsToKey:function(yo){return yo.x+":"+yo.y+":"+yo.z},_keyToTileCoords:function(yo){var pf=yo.split(":"),Tf=new ap(+pf[0],+pf[1]);return Tf.z=+pf[2],Tf},_removeTile:function(yo){var pf=this._tiles[yo];pf&&(Ov(pf.el),delete this._tiles[yo],this.fire("tileunload",{tile:pf.el,coords:this._keyToTileCoords(yo)}))},_initTile:function(yo){Tm(yo,"leaflet-tile");var pf=this.getTileSize();yo.style.width=pf.x+"px",yo.style.height=pf.y+"px",yo.onselectstart=po,yo.onmousemove=po,qg.ielt9&&this.options.opacity<1&&_m(yo,this.options.opacity)},_addTile:function(yo,pf){var Tf=this._getTilePos(yo),Ff=this._tileCoordsToKey(yo),Zf=this.createTile(this._wrapCoords(yo),rt(this._tileReady,this,yo));this._initTile(Zf),this.createTile.length<2&&Lf(rt(this._tileReady,this,yo,null,Zf)),Yv(Zf,Tf),this._tiles[Ff]={el:Zf,coords:yo,current:!0},pf.appendChild(Zf),this.fire("tileloadstart",{tile:Zf,coords:yo})},_tileReady:function(yo,pf,Tf){pf&&this.fire("tileerror",{error:pf,tile:Tf,coords:yo});var Ff=this._tileCoordsToKey(yo);Tf=this._tiles[Ff],Tf&&(Tf.loaded=+new Date,this._map._fadeAnimated?(_m(Tf.el,0),kf(this._fadeFrame),this._fadeFrame=Lf(this._updateOpacity,this)):(Tf.active=!0,this._pruneTiles()),pf||(Tm(Tf.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:Tf.el,coords:yo})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),qg.ielt9||!this._map._fadeAnimated?Lf(this._pruneTiles,this):setTimeout(rt(this._pruneTiles,this),250)))},_getTilePos:function(yo){return yo.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(yo){var pf=new ap(this._wrapX?uo(yo.x,this._wrapX):yo.x,this._wrapY?uo(yo.y,this._wrapY):yo.y);return pf.z=yo.z,pf},_pxBoundsToTileRange:function(yo){var pf=this.getTileSize();return new Np(yo.min.unscaleBy(pf).floor(),yo.max.unscaleBy(pf).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var yo in this._tiles)if(!this._tiles[yo].loaded)return!1;return!0}});function U2(yo){return new I_(yo)}var kb=I_.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(yo,pf){this._url=yo,pf=yf(this,pf),pf.detectRetina&&qg.retina&&pf.maxZoom>0?(pf.tileSize=Math.floor(pf.tileSize/2),pf.zoomReverse?(pf.zoomOffset--,pf.minZoom=Math.min(pf.maxZoom,pf.minZoom+1)):(pf.zoomOffset++,pf.maxZoom=Math.max(pf.minZoom,pf.maxZoom-1)),pf.minZoom=Math.max(0,pf.minZoom)):pf.zoomReverse?pf.minZoom=Math.min(pf.maxZoom,pf.minZoom):pf.maxZoom=Math.max(pf.minZoom,pf.maxZoom),typeof pf.subdomains=="string"&&(pf.subdomains=pf.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(yo,pf){return this._url===yo&&pf===void 0&&(pf=!0),this._url=yo,pf||this.redraw(),this},createTile:function(yo,pf){var Tf=document.createElement("img");return xm(Tf,"load",rt(this._tileOnLoad,this,pf,Tf)),xm(Tf,"error",rt(this._tileOnError,this,pf,Tf)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(Tf.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(Tf.referrerPolicy=this.options.referrerPolicy),Tf.alt="",Tf.src=this.getTileUrl(yo),Tf},getTileUrl:function(yo){var pf={r:qg.retina?"@2x":"",s:this._getSubdomain(yo),x:yo.x,y:yo.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var Tf=this._globalTileRange.max.y-yo.y;this.options.tms&&(pf.y=Tf),pf["-y"]=Tf}return _f(this._url,X(pf,this.options))},_tileOnLoad:function(yo,pf){qg.ielt9?setTimeout(rt(yo,this,null,pf),0):yo(null,pf)},_tileOnError:function(yo,pf,Tf){var Ff=this.options.errorTileUrl;Ff&&pf.getAttribute("src")!==Ff&&(pf.src=Ff),yo(Tf,pf)},_onTileRemove:function(yo){yo.tile.onload=null},_getZoomForUrl:function(){var yo=this._tileZoom,pf=this.options.maxZoom,Tf=this.options.zoomReverse,Ff=this.options.zoomOffset;return Tf&&(yo=pf-yo),yo+Ff},_getSubdomain:function(yo){var pf=Math.abs(yo.x+yo.y)%this.options.subdomains.length;return this.options.subdomains[pf]},_abortLoading:function(){var yo,pf;for(yo in this._tiles)if(this._tiles[yo].coords.z!==this._tileZoom&&(pf=this._tiles[yo].el,pf.onload=po,pf.onerror=po,!pf.complete)){pf.src=Af;var Tf=this._tiles[yo].coords;Ov(pf),delete this._tiles[yo],this.fire("tileabort",{tile:pf,coords:Tf})}},_removeTile:function(yo){var pf=this._tiles[yo];if(pf)return pf.el.setAttribute("src",Af),I_.prototype._removeTile.call(this,yo)},_tileReady:function(yo,pf,Tf){if(!(!this._map||Tf&&Tf.getAttribute("src")===Af))return I_.prototype._tileReady.call(this,yo,pf,Tf)}});function P_(yo,pf){return new kb(yo,pf)}var W$=kb.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(yo,pf){this._url=yo;var Tf=X({},this.defaultWmsParams);for(var Ff in pf)Ff in this.options||(Tf[Ff]=pf[Ff]);pf=yf(this,pf);var Zf=pf.detectRetina&&qg.retina?2:1,fp=this.getTileSize();Tf.width=fp.x*Zf,Tf.height=fp.y*Zf,this.wmsParams=Tf},onAdd:function(yo){this._crs=this.options.crs||yo.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var pf=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[pf]=this._crs.code,kb.prototype.onAdd.call(this,yo)},getTileUrl:function(yo){var pf=this._tileCoordsToNwSe(yo),Tf=this._crs,Ff=jp(Tf.project(pf[0]),Tf.project(pf[1])),Zf=Ff.min,fp=Ff.max,Cp=(this._wmsVersion>=1.3&&this._crs===Ay?[Zf.y,Zf.x,fp.y,fp.x]:[Zf.x,Zf.y,fp.x,fp.y]).join(","),Zp=kb.prototype.getTileUrl.call(this,yo);return Zp+cf(this.wmsParams,Zp,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Cp},setParams:function(yo,pf){return X(this.wmsParams,yo),pf||this.redraw(),this}});function Nx(yo,pf){return new W$(yo,pf)}kb.WMS=W$,P_.wms=Nx;var a1=xv.extend({options:{padding:.1},initialize:function(yo){yf(this,yo),ut(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Tm(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var yo={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(yo.zoomanim=this._onAnimZoom),yo},_onAnimZoom:function(yo){this._updateTransform(yo.center,yo.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(yo,pf){var Tf=this._map.getZoomScale(pf,this._zoom),Ff=this._map.getSize().multiplyBy(.5+this.options.padding),Zf=this._map.project(this._center,pf),fp=Ff.multiplyBy(-Tf).add(Zf).subtract(this._map._getNewPixelOrigin(yo,pf));qg.any3d?X1(this._container,fp,Tf):Yv(this._container,fp)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var yo in this._layers)this._layers[yo]._reset()},_onZoomEnd:function(){for(var yo in this._layers)this._layers[yo]._project()},_updatePaths:function(){for(var yo in this._layers)this._layers[yo]._update()},_update:function(){var yo=this.options.padding,pf=this._map.getSize(),Tf=this._map.containerPointToLayerPoint(pf.multiplyBy(-yo)).round();this._bounds=new Np(Tf,Tf.add(pf.multiplyBy(1+yo*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),kw=a1.extend({options:{tolerance:0},getEvents:function(){var yo=a1.prototype.getEvents.call(this);return yo.viewprereset=this._onViewPreReset,yo},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){a1.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var yo=this._container=document.createElement("canvas");xm(yo,"mousemove",this._onMouseMove,this),xm(yo,"click dblclick mousedown mouseup contextmenu",this._onClick,this),xm(yo,"mouseout",this._handleMouseOut,this),yo._leaflet_disable_events=!0,this._ctx=yo.getContext("2d")},_destroyContainer:function(){kf(this._redrawRequest),delete this._ctx,Ov(this._container),um(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var yo;this._redrawBounds=null;for(var pf in this._layers)yo=this._layers[pf],yo._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){a1.prototype._update.call(this);var yo=this._bounds,pf=this._container,Tf=yo.getSize(),Ff=qg.retina?2:1;Yv(pf,yo.min),pf.width=Ff*Tf.x,pf.height=Ff*Tf.y,pf.style.width=Tf.x+"px",pf.style.height=Tf.y+"px",qg.retina&&this._ctx.scale(2,2),this._ctx.translate(-yo.min.x,-yo.min.y),this.fire("update")}},_reset:function(){a1.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(yo){this._updateDashArray(yo),this._layers[ut(yo)]=yo;var pf=yo._order={layer:yo,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=pf),this._drawLast=pf,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(yo){this._requestRedraw(yo)},_removePath:function(yo){var pf=yo._order,Tf=pf.next,Ff=pf.prev;Tf?Tf.prev=Ff:this._drawLast=Ff,Ff?Ff.next=Tf:this._drawFirst=Tf,delete yo._order,delete this._layers[ut(yo)],this._requestRedraw(yo)},_updatePath:function(yo){this._extendRedrawBounds(yo),yo._project(),yo._update(),this._requestRedraw(yo)},_updateStyle:function(yo){this._updateDashArray(yo),this._requestRedraw(yo)},_updateDashArray:function(yo){if(typeof yo.options.dashArray=="string"){var pf=yo.options.dashArray.split(/[, ]+/),Tf=[],Ff,Zf;for(Zf=0;Zf')}}catch{}return function(yo){return document.createElement("<"+yo+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),$0={_initContainer:function(){this._container=dv("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(a1.prototype._update.call(this),this.fire("update"))},_initPath:function(yo){var pf=yo._container=Cb("shape");Tm(pf,"leaflet-vml-shape "+(this.options.className||"")),pf.coordsize="1 1",yo._path=Cb("path"),pf.appendChild(yo._path),this._updateStyle(yo),this._layers[ut(yo)]=yo},_addPath:function(yo){var pf=yo._container;this._container.appendChild(pf),yo.options.interactive&&yo.addInteractiveTarget(pf)},_removePath:function(yo){var pf=yo._container;Ov(pf),yo.removeInteractiveTarget(pf),delete this._layers[ut(yo)]},_updateStyle:function(yo){var pf=yo._stroke,Tf=yo._fill,Ff=yo.options,Zf=yo._container;Zf.stroked=!!Ff.stroke,Zf.filled=!!Ff.fill,Ff.stroke?(pf||(pf=yo._stroke=Cb("stroke")),Zf.appendChild(pf),pf.weight=Ff.weight+"px",pf.color=Ff.color,pf.opacity=Ff.opacity,Ff.dashArray?pf.dashStyle=$f(Ff.dashArray)?Ff.dashArray.join(" "):Ff.dashArray.replace(/( *, *)/g," "):pf.dashStyle="",pf.endcap=Ff.lineCap.replace("butt","flat"),pf.joinstyle=Ff.lineJoin):pf&&(Zf.removeChild(pf),yo._stroke=null),Ff.fill?(Tf||(Tf=yo._fill=Cb("fill")),Zf.appendChild(Tf),Tf.color=Ff.fillColor||Ff.color,Tf.opacity=Ff.fillOpacity):Tf&&(Zf.removeChild(Tf),yo._fill=null)},_updateCircle:function(yo){var pf=yo._point.round(),Tf=Math.round(yo._radius),Ff=Math.round(yo._radiusY||Tf);this._setPath(yo,yo._empty()?"M0 0":"AL "+pf.x+","+pf.y+" "+Tf+","+Ff+" 0,"+65535*360)},_setPath:function(yo,pf){yo._path.v=pf},_bringToFront:function(yo){Y1(yo._container)},_bringToBack:function(yo){K1(yo._container)}},Ow=qg.vml?Cb:cp,q$=a1.extend({_initContainer:function(){this._container=Ow("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ow("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Ov(this._container),um(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){a1.prototype._update.call(this);var yo=this._bounds,pf=yo.getSize(),Tf=this._container;(!this._svgSize||!this._svgSize.equals(pf))&&(this._svgSize=pf,Tf.setAttribute("width",pf.x),Tf.setAttribute("height",pf.y)),Yv(Tf,yo.min),Tf.setAttribute("viewBox",[yo.min.x,yo.min.y,pf.x,pf.y].join(" ")),this.fire("update")}},_initPath:function(yo){var pf=yo._path=Ow("path");yo.options.className&&Tm(pf,yo.options.className),yo.options.interactive&&Tm(pf,"leaflet-interactive"),this._updateStyle(yo),this._layers[ut(yo)]=yo},_addPath:function(yo){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(yo._path),yo.addInteractiveTarget(yo._path)},_removePath:function(yo){Ov(yo._path),yo.removeInteractiveTarget(yo._path),delete this._layers[ut(yo)]},_updatePath:function(yo){yo._project(),yo._update()},_updateStyle:function(yo){var pf=yo._path,Tf=yo.options;pf&&(Tf.stroke?(pf.setAttribute("stroke",Tf.color),pf.setAttribute("stroke-opacity",Tf.opacity),pf.setAttribute("stroke-width",Tf.weight),pf.setAttribute("stroke-linecap",Tf.lineCap),pf.setAttribute("stroke-linejoin",Tf.lineJoin),Tf.dashArray?pf.setAttribute("stroke-dasharray",Tf.dashArray):pf.removeAttribute("stroke-dasharray"),Tf.dashOffset?pf.setAttribute("stroke-dashoffset",Tf.dashOffset):pf.removeAttribute("stroke-dashoffset")):pf.setAttribute("stroke","none"),Tf.fill?(pf.setAttribute("fill",Tf.fillColor||Tf.color),pf.setAttribute("fill-opacity",Tf.fillOpacity),pf.setAttribute("fill-rule",Tf.fillRule||"evenodd")):pf.setAttribute("fill","none"))},_updatePoly:function(yo,pf){this._setPath(yo,hp(yo._parts,pf))},_updateCircle:function(yo){var pf=yo._point,Tf=Math.max(Math.round(yo._radius),1),Ff=Math.max(Math.round(yo._radiusY),1)||Tf,Zf="a"+Tf+","+Ff+" 0 1,0 ",fp=yo._empty()?"M0 0":"M"+(pf.x-Tf)+","+pf.y+Zf+Tf*2+",0 "+Zf+-Tf*2+",0 ";this._setPath(yo,fp)},_setPath:function(yo,pf){yo._path.setAttribute("d",pf)},_bringToFront:function(yo){Y1(yo._path)},_bringToBack:function(yo){K1(yo._path)}});qg.vml&&q$.include($0);function Mx(yo){return qg.svg||qg.vml?new q$(yo):null}lv.include({getRenderer:function(yo){var pf=yo.options.renderer||this._getPaneRenderer(yo.options.pane)||this.options.renderer||this._renderer;return pf||(pf=this._renderer=this._createRenderer()),this.hasLayer(pf)||this.addLayer(pf),pf},_getPaneRenderer:function(yo){if(yo==="overlayPane"||yo===void 0)return!1;var pf=this._paneRenderers[yo];return pf===void 0&&(pf=this._createRenderer({pane:yo}),this._paneRenderers[yo]=pf),pf},_createRenderer:function(yo){return this.options.preferCanvas&&Cw(yo)||Mx(yo)}});var Iw=V$.extend({initialize:function(yo,pf){V$.prototype.initialize.call(this,this._boundsToLatLngs(yo),pf)},setBounds:function(yo){return this.setLatLngs(this._boundsToLatLngs(yo))},_boundsToLatLngs:function(yo){return yo=Jp(yo),[yo.getSouthWest(),yo.getNorthWest(),yo.getNorthEast(),yo.getSouthEast()]}});function V2(yo,pf){return new Iw(yo,pf)}q$.create=Ow,q$.pointsToPath=hp,Mv.geometryToLayer=xw,Mv.coordsToLatLng=y0,Mv.coordsToLatLngs=b0,Mv.latLngToCoords=O1,Mv.latLngsToCoords=o$,Mv.getFeature=a$,Mv.asFeature=C_,lv.mergeOptions({boxZoom:!0});var Pw=$y.extend({initialize:function(yo){this._map=yo,this._container=yo._container,this._pane=yo._panes.overlayPane,this._resetStateTimeout=0,yo.on("unload",this._destroy,this)},addHooks:function(){xm(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){um(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Ov(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(yo){if(!yo.shiftKey||yo.which!==1&&yo.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Z1(),Jb(),this._startPoint=this._map.mouseEventToContainerPoint(yo),xm(document,{contextmenu:Sb,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(yo){this._moved||(this._moved=!0,this._box=dv("div","leaflet-zoom-box",this._container),Tm(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(yo);var pf=new Np(this._point,this._startPoint),Tf=pf.getSize();Yv(this._box,pf.min),this._box.style.width=Tf.x+"px",this._box.style.height=Tf.y+"px"},_finish:function(){this._moved&&(Ov(this._box),cm(this._container,"leaflet-crosshair")),J1(),D$(),um(document,{contextmenu:Sb,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(yo){if(!(yo.which!==1&&yo.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(rt(this._resetState,this),0);var pf=new Ip(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(pf).fire("boxzoomend",{boxZoomBounds:pf})}},_onKeyDown:function(yo){yo.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});lv.addInitHook("addHandler","boxZoom",Pw),lv.mergeOptions({doubleClickZoom:!0});var Y$=$y.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(yo){var pf=this._map,Tf=pf.getZoom(),Ff=pf.options.zoomDelta,Zf=yo.originalEvent.shiftKey?Tf-Ff:Tf+Ff;pf.options.doubleClickZoom==="center"?pf.setZoom(Zf):pf.setZoomAround(yo.containerPoint,Zf)}});lv.addInitHook("addHandler","doubleClickZoom",Y$),lv.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var A_=$y.extend({addHooks:function(){if(!this._draggable){var yo=this._map;this._draggable=new n1(yo._mapPane,yo._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),yo.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),yo.on("zoomend",this._onZoomEnd,this),yo.whenReady(this._onZoomEnd,this))}Tm(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){cm(this._map._container,"leaflet-grab"),cm(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var yo=this._map;if(yo._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var pf=Jp(this._map.options.maxBounds);this._offsetLimit=jp(this._map.latLngToContainerPoint(pf.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(pf.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;yo.fire("movestart").fire("dragstart"),yo.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(yo){if(this._map.options.inertia){var pf=this._lastTime=+new Date,Tf=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(Tf),this._times.push(pf),this._prunePositions(pf)}this._map.fire("move",yo).fire("drag",yo)},_prunePositions:function(yo){for(;this._positions.length>1&&yo-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var yo=this._map.getSize().divideBy(2),pf=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=pf.subtract(yo).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(yo,pf){return yo-(yo-pf)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var yo=this._draggable._newPos.subtract(this._draggable._startPos),pf=this._offsetLimit;yo.xpf.max.x&&(yo.x=this._viscousLimit(yo.x,pf.max.x)),yo.y>pf.max.y&&(yo.y=this._viscousLimit(yo.y,pf.max.y)),this._draggable._newPos=this._draggable._startPos.add(yo)}},_onPreDragWrap:function(){var yo=this._worldWidth,pf=Math.round(yo/2),Tf=this._initialWorldOffset,Ff=this._draggable._newPos.x,Zf=(Ff-pf+Tf)%yo+pf-Tf,fp=(Ff+pf+Tf)%yo-pf-Tf,Cp=Math.abs(Zf+Tf)0?fp:-fp))-pf;this._delta=0,this._startTime=null,Cp&&(yo.options.scrollWheelZoom==="center"?yo.setZoom(pf+Cp):yo.setZoomAround(this._lastMousePos,pf+Cp))}});lv.addInitHook("addHandler","scrollWheelZoom",s$);var rS=600;lv.mergeOptions({tapHold:qg.touchNative&&qg.safari&&qg.mobile,tapTolerance:15});var Dx=$y.extend({addHooks:function(){xm(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){um(this._map._container,"touchstart",this._onDown,this)},_onDown:function(yo){if(clearTimeout(this._holdTimeout),yo.touches.length===1){var pf=yo.touches[0];this._startPos=this._newPos=new ap(pf.clientX,pf.clientY),this._holdTimeout=setTimeout(rt(function(){this._cancel(),this._isTapValid()&&(xm(document,"touchend",ty),xm(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",pf))},this),rS),xm(document,"touchend touchcancel contextmenu",this._cancel,this),xm(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function yo(){um(document,"touchend",ty),um(document,"touchend touchcancel",yo)},_cancel:function(){clearTimeout(this._holdTimeout),um(document,"touchend touchcancel contextmenu",this._cancel,this),um(document,"touchmove",this._onMove,this)},_onMove:function(yo){var pf=yo.touches[0];this._newPos=new ap(pf.clientX,pf.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(yo,pf){var Tf=new MouseEvent(yo,{bubbles:!0,cancelable:!0,view:window,screenX:pf.screenX,screenY:pf.screenY,clientX:pf.clientX,clientY:pf.clientY});Tf._simulated=!0,pf.target.dispatchEvent(Tf)}});lv.addInitHook("addHandler","tapHold",Dx),lv.mergeOptions({touchZoom:qg.touch,bounceAtZoomLimits:!0});var K$=$y.extend({addHooks:function(){Tm(this._map._container,"leaflet-touch-zoom"),xm(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){cm(this._map._container,"leaflet-touch-zoom"),um(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(yo){var pf=this._map;if(!(!yo.touches||yo.touches.length!==2||pf._animatingZoom||this._zooming)){var Tf=pf.mouseEventToContainerPoint(yo.touches[0]),Ff=pf.mouseEventToContainerPoint(yo.touches[1]);this._centerPoint=pf.getSize()._divideBy(2),this._startLatLng=pf.containerPointToLatLng(this._centerPoint),pf.options.touchZoom!=="center"&&(this._pinchStartLatLng=pf.containerPointToLatLng(Tf.add(Ff)._divideBy(2))),this._startDist=Tf.distanceTo(Ff),this._startZoom=pf.getZoom(),this._moved=!1,this._zooming=!0,pf._stop(),xm(document,"touchmove",this._onTouchMove,this),xm(document,"touchend touchcancel",this._onTouchEnd,this),ty(yo)}},_onTouchMove:function(yo){if(!(!yo.touches||yo.touches.length!==2||!this._zooming)){var pf=this._map,Tf=pf.mouseEventToContainerPoint(yo.touches[0]),Ff=pf.mouseEventToContainerPoint(yo.touches[1]),Zf=Tf.distanceTo(Ff)/this._startDist;if(this._zoom=pf.getScaleZoom(Zf,this._startZoom),!pf.options.bounceAtZoomLimits&&(this._zoompf.getMaxZoom()&&Zf>1)&&(this._zoom=pf._limitZoom(this._zoom)),pf.options.touchZoom==="center"){if(this._center=this._startLatLng,Zf===1)return}else{var fp=Tf._add(Ff)._divideBy(2)._subtract(this._centerPoint);if(Zf===1&&fp.x===0&&fp.y===0)return;this._center=pf.unproject(pf.project(this._pinchStartLatLng,this._zoom).subtract(fp),this._zoom)}this._moved||(pf._moveStart(!0,!1),this._moved=!0),kf(this._animRequest);var Cp=rt(pf._move,pf,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Lf(Cp,this,!0),ty(yo)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,kf(this._animRequest),um(document,"touchmove",this._onTouchMove,this),um(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});lv.addInitHook("addHandler","touchZoom",K$),lv.BoxZoom=Pw,lv.DoubleClickZoom=Y$,lv.Drag=A_,lv.Keyboard=G2,lv.ScrollWheelZoom=s$,lv.TapHold=Dx,lv.TouchZoom=K$,q.Bounds=Np,q.Browser=qg,q.CRS=vg,q.Canvas=kw,q.Circle=ww,q.CircleMarker=_w,q.Class=Yf,q.Control=m0,q.DivIcon=Rx,q.DivOverlay=Dv,q.DomEvent=r0,q.DomUtil=Qb,q.Draggable=n1,q.Evented=ip,q.FeatureGroup=_y,q.GeoJSON=Mv,q.GridLayer=I_,q.Handler=$y,q.Icon=o1,q.ImageOverlay=tb,q.LatLng=ng,q.LatLngBounds=Ip,q.Layer=xv,q.LayerGroup=I0,q.LineUtil=C1,q.Map=lv,q.Marker=i$,q.Mixin=kx,q.Path=Q1,q.Point=ap,q.PolyUtil=XE,q.Polygon=V$,q.Polyline=eb,q.Popup=G$,q.PosAnimation=pw,q.Projection=z$,q.Rectangle=Iw,q.Renderer=a1,q.SVG=q$,q.SVGOverlay=zv,q.TileLayer=kb,q.Tooltip=Tb,q.Transformation=kp,q.Util=Nf,q.VideoOverlay=Ax,q.bind=rt,q.bounds=jp,q.canvas=Cw,q.circle=JE,q.circleMarker=ZE,q.control=F$,q.divIcon=Tw,q.extend=X,q.featureGroup=my,q.geoJSON=Ew,q.geoJson=eS,q.gridLayer=U2,q.icon=j2,q.imageOverlay=tS,q.latLng=og,q.latLngBounds=Jp,q.layerGroup=H$,q.map=YE,q.marker=Ix,q.point=vp,q.polygon=QE,q.polyline=Px,q.popup=I1,q.rectangle=V2,q.setOptions=yf,q.stamp=ut,q.svg=Mx,q.svgOverlay=z2,q.tileLayer=P_,q.tooltip=H2,q.transformation=lp,q.version=K,q.videoOverlay=Sw;var X$=window.L;q.noConflict=function(){return window.L=X$,this},window.L=q})}(leafletSrc,leafletSrc.exports)),leafletSrc.exports}var leafletSrcExports=requireLeafletSrc();const L$2=getDefaultExportFromCjs$3(leafletSrcExports);var leafletGestureHandling_min={exports:{}};(function(F,W){(function(q,K){K(W)})(commonjsGlobal$3,function(q){var K={ar:{touch:"استخدم إصبعين لتحريك الخريطة",scroll:"‏استخدم ctrl + scroll لتصغير/تكبير الخريطة",scrollMac:"يمكنك استخدام ⌘ + التمرير لتكبير/تصغير الخريطة"},bg:{touch:"Използвайте два пръста, за да преместите картата",scroll:"Задръжте бутона Ctrl натиснат, докато превъртате, за да промените мащаба на картата",scrollMac:"Задръжте бутона ⌘ натиснат, докато превъртате, за да промените мащаба на картата"},bn:{touch:"মানচিত্রটিকে সরাতে দুটি আঙ্গুল ব্যবহার করুন",scroll:"ম্যাপ জুম করতে ctrl + scroll ব্যবহার করুন",scrollMac:"ম্যাপে জুম করতে ⌘ বোতাম টিপে স্ক্রল করুন"},ca:{touch:"Fes servir dos dits per moure el mapa",scroll:"Prem la tecla Control mentre et desplaces per apropar i allunyar el mapa",scrollMac:"Prem la tecla ⌘ mentre et desplaces per apropar i allunyar el mapa"},cs:{touch:"K posunutí mapy použijte dva prsty",scroll:"Velikost zobrazení mapy změňte podržením klávesy Ctrl a posouváním kolečka myši",scrollMac:"Velikost zobrazení mapy změníte podržením klávesy ⌘ a posunutím kolečka myši / touchpadu"},da:{touch:"Brug to fingre til at flytte kortet",scroll:"Brug ctrl + rullefunktionen til at zoome ind og ud på kortet",scrollMac:"Brug ⌘ + rullefunktionen til at zoome ind og ud på kortet"},de:{touch:"Verschieben der Karte mit zwei Fingern",scroll:"Verwende Strg+Scrollen zum Zoomen der Karte",scrollMac:"⌘"},el:{touch:"Χρησιμοποιήστε δύο δάχτυλα για μετακίνηση στον χάρτη",scroll:"Χρησιμοποιήστε το πλήκτρο Ctrl και κύλιση, για να μεγεθύνετε τον χάρτη",scrollMac:"Χρησιμοποιήστε το πλήκτρο ⌘ + κύλιση για εστίαση στον χάρτη"},en:{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},"en-AU":{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},"en-GB":{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},es:{touch:"Para mover el mapa, utiliza dos dedos",scroll:"Mantén pulsada la tecla Ctrl mientras te desplazas para acercar o alejar el mapa",scrollMac:"Mantén pulsada la tecla ⌘ mientras te desplazas para acercar o alejar el mapa"},eu:{touch:"Erabili bi hatz mapa mugitzeko",scroll:"Mapan zooma aplikatzeko, sakatu Ktrl eta egin gora edo behera",scrollMac:"Eduki sakatuta ⌘ eta egin gora eta behera mapa handitu eta txikitzeko"},fa:{touch:"برای حرکت دادن نقشه از دو انگشت استفاده کنید.",scroll:"‏برای بزرگ‌نمایی نقشه از ctrl + scroll استفاده کنید",scrollMac:"برای بزرگ‌نمایی نقشه، از ⌘ + پیمایش استفاده کنید."},fi:{touch:"Siirrä karttaa kahdella sormella.",scroll:"Zoomaa karttaa painamalla Ctrl-painiketta ja vierittämällä.",scrollMac:"Zoomaa karttaa pitämällä painike ⌘ painettuna ja vierittämällä."},fil:{touch:"Gumamit ng dalawang daliri upang iusog ang mapa",scroll:"Gamitin ang ctrl + scroll upang i-zoom ang mapa",scrollMac:"Gamitin ang ⌘ + scroll upang i-zoom ang mapa"},fr:{touch:"Utilisez deux doigts pour déplacer la carte",scroll:"Vous pouvez zoomer sur la carte à l'aide de CTRL+Molette de défilement",scrollMac:"Vous pouvez zoomer sur la carte à l'aide de ⌘+Molette de défilement"},gl:{touch:"Utiliza dous dedos para mover o mapa",scroll:"Preme Ctrl mentres te desprazas para ampliar o mapa",scrollMac:"Preme ⌘ e desprázate para ampliar o mapa"},gu:{touch:"નકશો ખસેડવા બે આંગળીઓનો ઉપયોગ કરો",scroll:"નકશાને ઝૂમ કરવા માટે ctrl + સ્ક્રોલનો ઉપયોગ કરો",scrollMac:"નકશાને ઝૂમ કરવા ⌘ + સ્ક્રોલનો ઉપયોગ કરો"},hi:{touch:"मैप एक जगह से दूसरी जगह ले जाने के लिए दो उंगलियों का इस्तेमाल करें",scroll:"मैप को ज़ूम करने के लिए ctrl + स्क्रोल का उपयोग करें",scrollMac:"मैप को ज़ूम करने के लिए ⌘ + स्क्रोल का उपयोग करें"},hr:{touch:"Pomičite kartu pomoću dva prsta",scroll:"Upotrijebite Ctrl i klizač miša da biste zumirali kartu",scrollMac:"Upotrijebite gumb ⌘ dok se pomičete za zumiranje karte"},hu:{touch:"Két ujjal mozgassa a térképet",scroll:"A térkép a ctrl + görgetés használatával nagyítható",scrollMac:"A térkép a ⌘ + görgetés használatával nagyítható"},id:{touch:"Gunakan dua jari untuk menggerakkan peta",scroll:"Gunakan ctrl + scroll untuk memperbesar atau memperkecil peta",scrollMac:"Gunakan ⌘ + scroll untuk memperbesar atau memperkecil peta"},it:{touch:"Utilizza due dita per spostare la mappa",scroll:"Utilizza CTRL + scorrimento per eseguire lo zoom della mappa",scrollMac:"Utilizza ⌘ + scorrimento per eseguire lo zoom della mappa"},iw:{touch:"הזז את המפה באמצעות שתי אצבעות",scroll:"‏אפשר לשנות את מרחק התצוגה במפה באמצעות מקש ctrl וגלילה",scrollMac:"אפשר לשנות את מרחק התצוגה במפה באמצעות מקש ⌘ וגלילה"},ja:{touch:"地図を移動させるには指 2 本で操作します",scroll:"地図をズームするには、Ctrl キーを押しながらスクロールしてください",scrollMac:"地図をズームするには、⌘ キーを押しながらスクロールしてください"},kn:{touch:"Use two fingers to move the map",scroll:"Use Ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},ko:{touch:"지도를 움직이려면 두 손가락을 사용하세요.",scroll:"지도를 확대/축소하려면 Ctrl을 누른 채 스크롤하세요.",scrollMac:"지도를 확대하려면 ⌘ + 스크롤 사용"},lt:{touch:"Perkelkite žemėlapį dviem pirštais",scroll:"Slinkite nuspaudę klavišą „Ctrl“, kad pakeistumėte žemėlapio mastelį",scrollMac:"Paspauskite klavišą ⌘ ir slinkite, kad priartintumėte žemėlapį"},lv:{touch:"Lai pārvietotu karti, bīdiet to ar diviem pirkstiem",scroll:"Kartes tālummaiņai izmantojiet ctrl + ritināšanu",scrollMac:"Lai veiktu kartes tālummaiņu, izmantojiet ⌘ + ritināšanu"},ml:{touch:"മാപ്പ് നീക്കാൻ രണ്ട് വിരലുകൾ ഉപയോഗിക്കുക",scroll:"കൺട്രോൾ + സ്‌ക്രോൾ ഉപയോഗിച്ച് ‌മാപ്പ് ‌സൂം ചെയ്യുക",scrollMac:"⌘ + സ്‌ക്രോൾ ഉപയോഗിച്ച് ‌മാപ്പ് ‌സൂം ചെയ്യുക"},mr:{touch:"नकाशा हलविण्यासाठी दोन बोटे वापरा",scroll:"नकाशा झूम करण्यासाठी ctrl + scroll वापरा",scrollMac:"नकाशावर झूम करण्यासाठी ⌘ + स्क्रोल वापरा"},nl:{touch:"Gebruik twee vingers om de kaart te verplaatsen",scroll:"Gebruik Ctrl + scrollen om in- en uit te zoomen op de kaart",scrollMac:"Gebruik ⌘ + scrollen om in en uit te zoomen op de kaart"},no:{touch:"Bruk to fingre for å flytte kartet",scroll:"Hold ctrl-tasten inne og rull for å zoome på kartet",scrollMac:"Hold inne ⌘-tasten og rull for å zoome på kartet"},pl:{touch:"Przesuń mapę dwoma palcami",scroll:"Naciśnij CTRL i przewiń, by przybliżyć mapę",scrollMac:"Naciśnij ⌘ i przewiń, by przybliżyć mapę"},pt:{touch:"Use dois dedos para mover o mapa",scroll:"Pressione Ctrl e role a tela simultaneamente para aplicar zoom no mapa",scrollMac:"Use ⌘ e role a tela simultaneamente para aplicar zoom no mapa"},"pt-BR":{touch:"Use dois dedos para mover o mapa",scroll:"Pressione Ctrl e role a tela simultaneamente para aplicar zoom no mapa",scrollMac:"Use ⌘ e role a tela simultaneamente para aplicar zoom no mapa"},"pt-PT":{touch:"Utilize dois dedos para mover o mapa",scroll:"Utilizar ctrl + deslocar para aumentar/diminuir zoom do mapa",scrollMac:"Utilize ⌘ + deslocar para aumentar/diminuir o zoom do mapa"},ro:{touch:"Folosiți două degete pentru a deplasa harta",scroll:"Apăsați tasta ctrl și derulați simultan pentru a mări harta",scrollMac:"Folosiți ⌘ și derulați pentru a mări/micșora harta"},ru:{touch:"Чтобы переместить карту, проведите по ней двумя пальцами",scroll:"Чтобы изменить масштаб, прокручивайте карту, удерживая клавишу Ctrl.",scrollMac:"Чтобы изменить масштаб, нажмите ⌘ + прокрутка"},sk:{touch:"Mapu môžete posunúť dvoma prstami",scroll:"Ak chcete priblížiť mapu, stlačte kláves ctrl a posúvajte",scrollMac:"Ak chcete priblížiť mapu, stlačte kláves ⌘ a posúvajte kolieskom myši"},sl:{touch:"Premaknite zemljevid z dvema prstoma",scroll:"Zemljevid povečate tako, da držite tipko Ctrl in vrtite kolesce na miški",scrollMac:"Uporabite ⌘ + funkcijo pomika, da povečate ali pomanjšate zemljevid"},sr:{touch:"Мапу померајте помоћу два прста",scroll:"Притисните ctrl тастер док померате да бисте зумирали мапу",scrollMac:"Притисните тастер ⌘ док померате да бисте зумирали мапу"},sv:{touch:"Använd två fingrar för att flytta kartan",scroll:"Använd ctrl + rulla för att zooma kartan",scrollMac:"Använd ⌘ + rulla för att zooma på kartan"},ta:{touch:"மேப்பை நகர்த்த இரண்டு விரல்களைப் பயன்படுத்தவும்",scroll:"மேப்பை பெரிதாக்கி/சிறிதாக்கிப் பார்க்க, ctrl பட்டனைப் பிடித்தபடி, மேலே/கீழே ஸ்க்ரால் செய்யவும்",scrollMac:"மேப்பை பெரிதாக்கி/சிறிதாக்கிப் பார்க்க, ⌘ பட்டனைப் பிடித்தபடி, மேலே/கீழே ஸ்க்ரால் செய்யவும்"},te:{touch:"మ్యాప్‌ని తరలించడం కోసం రెండు వేళ్లను ఉపయోగించండి",scroll:"మ్యాప్‌ని జూమ్ చేయడానికి ctrl బటన్‌ను నొక్కి ఉంచి, స్క్రోల్ చేయండి",scrollMac:"మ్యాప్ జూమ్ చేయాలంటే ⌘ + స్క్రోల్ ఉపయోగించండి"},th:{touch:"ใช้ 2 นิ้วเพื่อเลื่อนแผนที่",scroll:"กด Ctrl ค้างไว้ แล้วเลื่อนหน้าจอเพื่อซูมแผนที่",scrollMac:"กด ⌘ แล้วเลื่อนหน้าจอเพื่อซูมแผนที่"},tl:{touch:"Gumamit ng dalawang daliri upang iusog ang mapa",scroll:"Gamitin ang ctrl + scroll upang i-zoom ang mapa",scrollMac:"Gamitin ang ⌘ + scroll upang i-zoom ang mapa"},tr:{touch:"Haritada gezinmek için iki parmağınızı kullanın",scroll:"Haritayı yakınlaştırmak için ctrl + kaydırma kombinasyonunu kullanın",scrollMac:"Haritayı yakınlaştırmak için ⌘ tuşuna basıp ekranı kaydırın"},uk:{touch:"Переміщуйте карту двома пальцями",scroll:"Щоб змінювати масштаб карти, прокручуйте коліщатко миші, утримуючи клавішу Ctrl",scrollMac:"Щоб змінити масштаб карти, використовуйте ⌘ + прокручування"},vi:{touch:"Sử dụng hai ngón tay để di chuyển bản đồ",scroll:"Sử dụng ctrl + cuộn để thu phóng bản đồ",scrollMac:"Sử dụng ⌘ + cuộn để thu phóng bản đồ"},"zh-CN":{touch:"使用双指移动地图",scroll:"按住 Ctrl 并滚动鼠标滚轮才可缩放地图",scrollMac:"按住 ⌘ 并滚动鼠标滚轮才可缩放地图"},"zh-TW":{touch:"同時以兩指移動地圖",scroll:"按住 ctrl 鍵加上捲動滑鼠可以縮放地圖",scrollMac:"按 ⌘ 加上滾動捲軸可以縮放地圖"}};L.Map.mergeOptions({gestureHandlingOptions:{text:{},duration:1e3}});var X=!1,tt=L.Handler.extend({addHooks:function(){this._handleTouch=this._handleTouch.bind(this),this._setupPluginOptions(),this._setLanguageContent(),this._disableInteractions(),this._map._container.addEventListener("touchstart",this._handleTouch),this._map._container.addEventListener("touchmove",this._handleTouch),this._map._container.addEventListener("touchend",this._handleTouch),this._map._container.addEventListener("touchcancel",this._handleTouch),this._map._container.addEventListener("click",this._handleTouch),L.DomEvent.on(this._map._container,"wheel",this._handleScroll,this),L.DomEvent.on(this._map,"mouseover",this._handleMouseOver,this),L.DomEvent.on(this._map,"mouseout",this._handleMouseOut,this),L.DomEvent.on(this._map,"movestart",this._handleDragging,this),L.DomEvent.on(this._map,"move",this._handleDragging,this),L.DomEvent.on(this._map,"moveend",this._handleDragging,this)},removeHooks:function(){this._enableInteractions(),this._map._container.removeEventListener("touchstart",this._handleTouch),this._map._container.removeEventListener("touchmove",this._handleTouch),this._map._container.removeEventListener("touchend",this._handleTouch),this._map._container.removeEventListener("touchcancel",this._handleTouch),this._map._container.removeEventListener("click",this._handleTouch),L.DomEvent.off(this._map._container,"wheel",this._handleScroll,this),L.DomEvent.off(this._map,"mouseover",this._handleMouseOver,this),L.DomEvent.off(this._map,"mouseout",this._handleMouseOut,this),L.DomEvent.off(this._map,"movestart",this._handleDragging,this),L.DomEvent.off(this._map,"move",this._handleDragging,this),L.DomEvent.off(this._map,"moveend",this._handleDragging,this)},_handleDragging:function(rt){rt.type=="movestart"||rt.type=="move"?X=!0:rt.type=="moveend"&&(X=!1)},_disableInteractions:function(){this._map.dragging.disable(),this._map.scrollWheelZoom.disable(),this._map.tap&&this._map.tap.disable()},_enableInteractions:function(){this._map.dragging.enable(),this._map.scrollWheelZoom.enable(),this._map.tap&&this._map.tap.enable()},_setupPluginOptions:function(){this._map.options.gestureHandlingText&&(this._map.options.gestureHandlingOptions.text=this._map.options.gestureHandlingText)},_setLanguageContent:function(){var rt;if(this._map.options.gestureHandlingOptions&&this._map.options.gestureHandlingOptions.text&&this._map.options.gestureHandlingOptions.text.touch&&this._map.options.gestureHandlingOptions.text.scroll&&this._map.options.gestureHandlingOptions.text.scrollMac)rt=this._map.options.gestureHandlingOptions.text;else{var ot=this._getUserLanguage();ot||(ot="en"),K[ot]&&(rt=K[ot]),rt||ot.indexOf("-")===-1||(ot=ot.split("-")[0],rt=K[ot]),rt||(rt=K[ot="en"])}var ut=!1;0<=navigator.platform.toUpperCase().indexOf("MAC")&&(ut=!0);var yn=rt.scroll;ut&&(yn=rt.scrollMac),this._map._container.setAttribute("data-gesture-handling-touch-content",rt.touch),this._map._container.setAttribute("data-gesture-handling-scroll-content",yn)},_getUserLanguage:function(){return navigator.languages?navigator.languages[0]:navigator.language||navigator.userLanguage},_handleTouch:function(rt){for(var ot=["leaflet-control-minimap","leaflet-interactive","leaflet-popup-content","leaflet-popup-content-wrapper","leaflet-popup-close-button","leaflet-control-zoom-in","leaflet-control-zoom-out"],ut=!1,yn=0;yn{ot=ot.target.value;const ut=this._getLayer(q.layerId).layer;ut._url===void 0||ut.setOpacity(Number(ot/100))});const K=document.createElement("span");K.innerHTML=" "+F.name;const X=document.createElement("div"),tt=document.createElement("div");W.appendChild(X),X.appendChild(K),W.appendChild(tt),tt.appendChild(q),(F.overlay?this._overlaysList:this._baseLayersList).appendChild(W)}}),L.control.opacity=function(F,W){return new L.Control.Opacity(F,W)};(function(F,W){typeof exports=="object"&&typeof module<"u"?W(exports):typeof define=="function"&&define.amd?define(["exports"],W):W((F=typeof globalThis<"u"?globalThis:F||self).turf={})})(globalThis,function(F){var W=63710088e-1,q={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260511392e-6,inches:39.37*W,kilometers:6371.0088,kilometres:6371.0088,meters:W,metres:W,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:W/1852,radians:1,yards:6967335223679999e-9},K={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/W,yards:1.0936133},X={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function tt(nt,at,wt){wt===void 0&&(wt={});var lo={type:"Feature"};return(wt.id===0||wt.id)&&(lo.id=wt.id),wt.bbox&&(lo.bbox=wt.bbox),lo.properties=at||{},lo.geometry=nt,lo}function rt(nt,at,wt){switch(nt){case"Point":return ot(at).geometry;case"LineString":return po(at).geometry;case"Polygon":return yn(at).geometry;case"MultiPoint":return yf(at).geometry;case"MultiLineString":return lf(at).geometry;case"MultiPolygon":return cf(at).geometry;default:throw new Error(nt+" is invalid")}}function ot(nt,at,wt){if(wt===void 0&&(wt={}),!nt)throw new Error("coordinates is required");if(!Array.isArray(nt))throw new Error("coordinates must be an Array");if(nt.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Lf(nt[0])||!Lf(nt[1]))throw new Error("coordinates must contain numbers");return tt({type:"Point",coordinates:nt},at,wt)}function ut(nt,at,wt){return wt===void 0&&(wt={}),wo(nt.map(function(lo){return ot(lo,at)}),wt)}function yn(nt,at,wt){wt===void 0&&(wt={});for(var lo=0,fo=nt;lo=0))throw new Error("precision must be a positive number");var wt=Math.pow(10,at||0);return Math.round(nt*wt)/wt}function $f(nt,at){at===void 0&&(at="kilometers");var wt=q[at];if(!wt)throw new Error(at+" units is invalid");return nt*wt}function xf(nt,at){at===void 0&&(at="kilometers");var wt=q[at];if(!wt)throw new Error(at+" units is invalid");return nt/wt}function Af(nt,at){return Pf(xf(nt,at))}function Cf(nt){var at=nt%360;return at<0&&(at+=360),at}function Pf(nt){return 180*(nt%(2*Math.PI))/Math.PI}function Bf(nt){return nt%360*Math.PI/180}function Hf(nt,at,wt){if(at===void 0&&(at="kilometers"),wt===void 0&&(wt="kilometers"),!(nt>=0))throw new Error("length must be a positive number");return $f(xf(nt,at),wt)}function Df(nt,at,wt){if(at===void 0&&(at="meters"),wt===void 0&&(wt="kilometers"),!(nt>=0))throw new Error("area must be a positive number");var lo=X[at];if(!lo)throw new Error("invalid original units");var fo=X[wt];if(!fo)throw new Error("invalid final units");return nt/lo*fo}function Lf(nt){return!isNaN(nt)&&nt!==null&&!Array.isArray(nt)}function kf(nt){return!!nt&&nt.constructor===Object}function Nf(nt){if(!nt)throw new Error("bbox is required");if(!Array.isArray(nt))throw new Error("bbox must be an Array");if(nt.length!==4&&nt.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");nt.forEach(function(at){if(!Lf(at))throw new Error("bbox must only contain numbers")})}function Yf(nt){if(!nt)throw new Error("id is required");if(["string","number"].indexOf(typeof nt)===-1)throw new Error("id must be a number or a string")}var Gf=Object.freeze({__proto__:null,earthRadius:W,factors:q,unitsFactors:K,areaFactors:X,feature:tt,geometry:rt,point:ot,points:ut,polygon:yn,polygons:uo,lineString:po,lineStrings:mo,featureCollection:wo,multiLineString:lf,multiPoint:yf,multiPolygon:cf,geometryCollection:vf,round:_f,radiansToLength:$f,lengthToRadians:xf,lengthToDegrees:Af,bearingToAzimuth:Cf,radiansToDegrees:Pf,degreesToRadians:Bf,convertLength:Hf,convertArea:Df,isNumber:Lf,isObject:kf,validateBBox:Nf,validateId:Yf});function rp(nt,at,wt){if(nt!==null)for(var lo,fo,vo,ls,ff,mf,bf,Sf,wf=0,If=0,jf=nt.type,zf=jf==="FeatureCollection",Wf=jf==="Feature",Mf=zf?nt.features.length:1,np=0;npmf||zf>bf||Wf>Sf)return ff=wf,mf=lo,bf=zf,Sf=Wf,void(vo=0);var Mf=po([ff,wf],wt.properties);if(at(Mf,lo,fo,Wf,vo)===!1)return!1;vo++,ff=wf})!==!1&&void 0}}})}function Dp(nt,at,wt){var lo=wt,fo=!1;return vg(nt,function(vo,ls,ff,mf,bf){lo=fo===!1&&wt===void 0?vo:at(lo,vo,ls,ff,mf,bf),fo=!0}),lo}function Lp(nt,at){if(!nt)throw new Error("geojson is required");ng(nt,function(wt,lo,fo){if(wt.geometry!==null){var vo=wt.geometry.type,ls=wt.geometry.coordinates;switch(vo){case"LineString":if(at(wt,lo,fo,0,0)===!1)return!1;break;case"Polygon":for(var ff=0;ffwt[0]&&(at[0]=wt[0]),at[1]>wt[1]&&(at[1]=wt[1]),at[2]=2&&!Array.isArray(nt[0])&&!Array.isArray(nt[1]))return nt;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function hp(nt){if(Array.isArray(nt))return nt;if(nt.type==="Feature"){if(nt.geometry!==null)return nt.geometry.coordinates}else if(nt.coordinates)return nt.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function $p(nt){if(nt.length>1&&Lf(nt[0])&&Lf(nt[1]))return!0;if(Array.isArray(nt[0])&&nt[0].length)return $p(nt[0]);throw new Error("coordinates must only contain numbers")}function Vp(nt,at,wt){if(!at||!wt)throw new Error("type and name required");if(!nt||nt.type!==at)throw new Error("Invalid input to "+wt+": must be a "+at+", given "+nt.type)}function bp(nt,at,wt){if(!nt)throw new Error("No feature passed");if(!wt)throw new Error(".featureOf() requires a name");if(!nt||nt.type!=="Feature"||!nt.geometry)throw new Error("Invalid input to "+wt+", Feature with geometry required");if(!nt.geometry||nt.geometry.type!==at)throw new Error("Invalid input to "+wt+": must be a "+at+", given "+nt.geometry.type)}function Ep(nt,at,wt){if(!nt)throw new Error("No featureCollection passed");if(!wt)throw new Error(".collectionOf() requires a name");if(!nt||nt.type!=="FeatureCollection")throw new Error("Invalid input to "+wt+", FeatureCollection required");for(var lo=0,fo=nt.features;lo. - */function Rp(nt,at,wt){wt=wt||{};for(var lo=Object.keys(lm),fo=0;fo=0&&Mg>=0&&Mg=0;tp--)if(Math.abs(bf[tp][0][0]-pp)<=xf&&Math.abs(bf[tp][0][1]-Uf)<=xf){for(var op=Mf.path.length-2;op>=0;--op)bf[tp].unshift(Mf.path[op]);np=!0;break}}np||(bf[Sf++]=Mf.path)}var up})}),bf}(function(mf,bf){for(var Sf=mf.length-1,xf=mf[0].length-1,If={rows:Sf,cols:xf,cells:[]},jf=0;jf=bf?8:0,Wf|=np>=bf?4:0,Wf|=pp>=bf?2:0;var tp,op,up,sp,Qp=!1;if((Wf|=Uf>=bf?1:0)===5||Wf===10){var Ap=(Mf+np+pp+Uf)/4;Wf===5&&Apwt;){if(lo-wt>600){var vo=lo-wt+1,ls=at-wt+1,ff=Math.log(vo),mf=.5*Math.exp(2*ff/3),bf=.5*Math.sqrt(ff*mf*(vo-mf)/vo)*(ls-vo/2<0?-1:1);mg(nt,at,Math.max(wt,Math.floor(at-ls*mf/vo+bf)),Math.min(lo,Math.floor(at+(vo-ls)*mf/vo+bf)),fo)}var Sf=nt[at],xf=wt,If=lo;for(pg(nt,wt,at),fo(nt[lo],Sf)>0&&pg(nt,wt,lo);xf0;)If--}fo(nt[wt],Sf)===0?pg(nt,wt,If):pg(nt,++If,lo),If<=at&&(wt=If+1),at<=If&&(lo=If-1)}}function pg(nt,at,wt){var lo=nt[at];nt[at]=nt[wt],nt[wt]=lo}function wg(nt,at){return ntat?1:0}gp.default=wp;var Cg=Xg,Bg=Xg;function Xg(nt,at){if(!(this instanceof Xg))return new Xg(nt,at);this._maxEntries=Math.max(4,nt||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),at&&this._initFormat(at),this.clear()}function mm(nt,at,wt){if(!wt)return at.indexOf(nt);for(var lo=0;lo=nt.minX&&at.maxY>=nt.minY}function E1(nt){return{children:nt,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function A$(nt,at,wt,lo,fo){for(var vo,ls=[at,wt];ls.length;)(wt=ls.pop())-(at=ls.pop())<=lo||(vo=at+Math.ceil((wt-at)/lo/2)*lo,gp(nt,vo,at,wt,fo),ls.push(at,vo,vo,wt))}function qv(nt){var at={exports:{}};return nt(at,at.exports),at.exports}Xg.prototype={all:function(){return this._all(this.data,[])},search:function(nt){var at=this.data,wt=[],lo=this.toBBox;if(!qg(nt,at))return wt;for(var fo,vo,ls,ff,mf=[];at;){for(fo=0,vo=at.children.length;fo=0&&vo[at].children.length>this._maxEntries;)this._split(vo,at),at--;this._adjustParentBBoxes(fo,vo,at)},_split:function(nt,at){var wt=nt[at],lo=wt.children.length,fo=this._minEntries;this._chooseSplitAxis(wt,fo,lo);var vo=this._chooseSplitIndex(wt,fo,lo),ls=E1(wt.children.splice(vo,wt.children.length-vo));ls.height=wt.height,ls.leaf=wt.leaf,Hg(wt,this.toBBox),Hg(ls,this.toBBox),at?nt[at-1].children.push(ls):this._splitRoot(wt,ls)},_splitRoot:function(nt,at){this.data=E1([nt,at]),this.data.height=nt.height+1,this.data.leaf=!1,Hg(this.data,this.toBBox)},_chooseSplitIndex:function(nt,at,wt){var lo,fo,vo,ls,ff,mf,bf,Sf,xf,If,jf,zf,Wf,Mf;for(mf=bf=1/0,lo=at;lo<=wt-at;lo++)fo=Iy(nt,0,lo,this.toBBox),vo=Iy(nt,lo,wt,this.toBBox),xf=fo,If=vo,jf=void 0,zf=void 0,Wf=void 0,Mf=void 0,jf=Math.max(xf.minX,If.minX),zf=Math.max(xf.minY,If.minY),Wf=Math.min(xf.maxX,If.maxX),Mf=Math.min(xf.maxY,If.maxY),ls=Math.max(0,Wf-jf)*Math.max(0,Mf-zf),ff=p0(fo)+p0(vo),ls=at;fo--)vo=nt.children[fo],py(mf,nt.leaf?ls(vo):vo),bf+=_b(mf);return bf},_adjustParentBBoxes:function(nt,at,wt){for(var lo=wt;lo>=0;lo--)py(at[lo],nt)},_condense:function(nt){for(var at,wt=nt.length-1;wt>=0;wt--)nt[wt].children.length===0?wt>0?(at=nt[wt-1].children).splice(at.indexOf(nt[wt]),1):this.clear():Hg(nt[wt],this.toBBox)},_initFormat:function(nt){var at=["return a"," - b",";"];this.compareMinX=new Function("a","b",at.join(nt[0])),this.compareMinY=new Function("a","b",at.join(nt[1])),this.toBBox=new Function("a","return {minX: a"+nt[0]+", minY: a"+nt[1]+", maxX: a"+nt[2]+", maxY: a"+nt[3]+"};")}},Cg.default=Bg;var H0=function(nt,at,wt){var lo=nt*at,fo=wb*nt,vo=fo-(fo-nt),ls=nt-vo,ff=wb*at,mf=ff-(ff-at),bf=at-mf,Sf=ls*bf-(lo-vo*mf-ls*mf-vo*bf);return wt?(wt[0]=Sf,wt[1]=lo,wt):[Sf,lo]},wb=+(Math.pow(2,27)+1),R$=function(nt,at){var wt=0|nt.length,lo=0|at.length;if(wt===1&&lo===1)return function(up,sp){var Qp=up+sp,Ap=Qp-up,rg=up-(Qp-Ap)+(sp-Ap);return rg?[rg,Qp]:[Qp]}(nt[0],at[0]);var fo,vo,ls=new Array(wt+lo),ff=0,mf=0,bf=0,Sf=Math.abs,xf=nt[mf],If=Sf(xf),jf=at[bf],zf=Sf(jf);If=lo?(fo=xf,(mf+=1)=lo?(fo=xf,(mf+=1)>1;return["sum(",wt(bf.slice(0,Sf)),",",wt(bf.slice(Sf)),")"].join("")}function lo(bf){if(bf.length===2)return[["sum(prod(",bf[0][0],",",bf[1][1],"),prod(-",bf[0][1],",",bf[1][0],"))"].join("")];for(var Sf=[],xf=0;xf0){if(zf<=0)return Wf;If=jf+zf}else{if(!(jf<0)||zf>=0)return Wf;If=-(jf+zf)}var Mf=33306690738754716e-32*If;return Wf>=Mf||Wf<=-Mf?Wf:vo(bf,Sf,xf)},function(bf,Sf,xf,If){var jf=bf[0]-If[0],zf=Sf[0]-If[0],Wf=xf[0]-If[0],Mf=bf[1]-If[1],np=Sf[1]-If[1],pp=xf[1]-If[1],Uf=bf[2]-If[2],tp=Sf[2]-If[2],op=xf[2]-If[2],up=zf*pp,sp=Wf*np,Qp=Wf*Mf,Ap=jf*pp,rg=jf*np,zp=zf*Mf,lg=Uf*(up-sp)+tp*(Qp-Ap)+op*(rg-zp),qp=7771561172376103e-31*((Math.abs(up)+Math.abs(sp))*Math.abs(Uf)+(Math.abs(Qp)+Math.abs(Ap))*Math.abs(tp)+(Math.abs(rg)+Math.abs(zp))*Math.abs(op));return lg>qp||-lg>qp?lg:ls(bf,Sf,xf,If)}];function mf(bf){var Sf=ff[bf.length];return Sf||(Sf=ff[bf.length]=fo(bf.length)),Sf.apply(void 0,bf)}(function(){for(;ff.length<=5;)ff.push(fo(ff.length));for(var bf=[],Sf=["slow"],xf=0;xf<=5;++xf)bf.push("a"+xf),Sf.push("o"+xf);var If=["function getOrientation(",bf.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(xf=2;xf<=5;++xf)If.push("case ",xf,":return o",xf,"(",bf.slice(0,xf).join(),");");If.push("}var s=new Array(arguments.length);for(var i=0;i1&&Gg(nt[vo[bf-2]],nt[vo[bf-1]],mf)<=0;)bf-=1,vo.pop();for(vo.push(ff),bf=ls.length;bf>1&&Gg(nt[ls[bf-2]],nt[ls[bf-1]],mf)>=0;)bf-=1,ls.pop();ls.push(ff)}wt=new Array(ls.length+vo.length-2);for(var Sf=0,xf=(lo=0,vo.length);lo0;--If)wt[Sf++]=ls[If];return wt},Gg=Hp[3],yv=Cv,Py=Cv;function Cv(nt,at){if(!(this instanceof Cv))return new Cv(nt,at);if(this.data=nt||[],this.length=this.data.length,this.compare=at||By,this.length>0)for(var wt=(this.length>>1)-1;wt>=0;wt--)this._down(wt)}function By(nt,at){return ntat?1:0}Cv.prototype={push:function(nt){this.data.push(nt),this.length++,this._up(this.length-1)},pop:function(){if(this.length!==0){var nt=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),nt}},peek:function(){return this.data[0]},_up:function(nt){for(var at=this.data,wt=this.compare,lo=at[nt];nt>0;){var fo=nt-1>>1,vo=at[fo];if(wt(lo,vo)>=0)break;at[nt]=vo,nt=fo}at[nt]=lo},_down:function(nt){for(var at=this.data,wt=this.compare,lo=this.length>>1,fo=at[nt];nt=0)break;at[nt]=ff,nt=vo}at[nt]=fo}},yv.default=Py;var S1=function(nt,at){for(var wt=nt[0],lo=nt[1],fo=!1,vo=0,ls=at.length-1;volo!=Sf>lo&&wt<(bf-ff)*(lo-mf)/(Sf-mf)+ff&&(fo=!fo)}return fo},T1=Hp[3],jy=xb,cw=xb;function xb(nt,at,wt){at=Math.max(0,at===void 0?2:at),wt=wt||0;for(var lo,fo=function(pp){for(var Uf=pp[0],tp=pp[0],op=pp[0],up=pp[0],sp=0;spop[0]&&(op=Qp),Qp[1]up[1]&&(up=Qp)}var Ap=[Uf,tp,op,up],rg=Ap.slice();for(sp=0;spvo||ff.push({node:Sf,dist:xf})}for(;ff.length&&!ff.peek().node.children;){var If=ff.pop(),jf=If.node,zf=K1(jf,at,wt),Wf=K1(jf,lo,fo);if(If.dist=at.minX&&nt[0]<=at.maxX&&nt[1]>=at.minY&&nt[1]<=at.maxY}function dv(nt,at,wt){for(var lo,fo,vo,ls,ff=Math.min(nt[0],at[0]),mf=Math.min(nt[1],at[1]),bf=Math.max(nt[0],at[0]),Sf=Math.max(nt[1],at[1]),xf=wt.search({minX:ff,minY:mf,maxX:bf,maxY:Sf}),If=0;If0!=T1(lo,fo,ls)>0&&T1(vo,ls,lo)>0!=T1(vo,ls,fo)>0)return!1;return!0}function Ov(nt){var at=nt.p,wt=nt.next.p;return nt.minX=Math.min(at[0],wt[0]),nt.minY=Math.min(at[1],wt[1]),nt.maxX=Math.max(at[0],wt[0]),nt.maxY=Math.max(at[1],wt[1]),nt}function Xb(nt,at){var wt={p:nt,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return at?(wt.next=at.next,wt.prev=at,at.next.prev=wt,at.next=wt):(wt.prev=wt,wt.next=wt),wt}function Y1(nt,at){var wt=nt[0]-at[0],lo=nt[1]-at[1];return wt*wt+lo*lo}function K1(nt,at,wt){var lo=at[0],fo=at[1],vo=wt[0]-lo,ls=wt[1]-fo;if(vo!==0||ls!==0){var ff=((nt[0]-lo)*vo+(nt[1]-fo)*ls)/(vo*vo+ls*ls);ff>1?(lo=wt[0],fo=wt[1]):ff>0&&(lo+=vo*ff,fo+=ls*ff)}return(vo=nt[0]-lo)*vo+(ls=nt[1]-fo)*ls}function Zb(nt,at,wt,lo,fo,vo,ls,ff){var mf,bf,Sf,xf,If=wt-nt,jf=lo-at,zf=ls-fo,Wf=ff-vo,Mf=nt-fo,np=at-vo,pp=If*If+jf*jf,Uf=If*zf+jf*Wf,tp=zf*zf+Wf*Wf,op=If*Mf+jf*np,up=zf*Mf+Wf*np,sp=pp*tp-Uf*Uf,Qp=sp,Ap=sp;sp===0?(bf=0,Qp=1,xf=up,Ap=tp):(xf=pp*up-Uf*op,(bf=Uf*up-tp*op)<0?(bf=0,xf=up,Ap=tp):bf>Qp&&(bf=Qp,xf=up+Uf,Ap=tp)),xf<0?(xf=0,-op<0?bf=0:-op>pp?bf=Qp:(bf=-op,Qp=pp)):xf>Ap&&(xf=Ap,-op+Uf<0?bf=0:-op+Uf>pp?bf=Qp:(bf=-op+Uf,Qp=pp));var rg=(1-(Sf=xf===0?0:xf/Ap))*fo+Sf*ls-((1-(mf=bf===0?0:bf/Qp))*nt+mf*wt),zp=(1-Sf)*vo+Sf*ff-((1-mf)*at+mf*lo);return rg*rg+zp*zp}function Tm(nt,at){at===void 0&&(at={}),at.concavity=at.concavity||1/0;var wt=[];if(rp(nt,function(fo){wt.push([fo[0],fo[1]])}),!wt.length)return null;var lo=jy(wt,at.concavity);return lo.length>3?yn([lo]):null}function cm(nt,at,wt){if(wt===void 0&&(wt={}),!nt)throw new Error("point is required");if(!at)throw new Error("polygon is required");var lo=cp(nt),fo=_p(at),vo=fo.type,ls=at.bbox,ff=fo.coordinates;if(ls&&function(If,jf){return jf[0]<=If[0]&&jf[1]<=If[1]&&jf[2]>=If[0]&&jf[3]>=If[1]}(lo,ls)===!1)return!1;vo==="Polygon"&&(ff=[ff]);for(var mf=!1,bf=0;bfnt[1]!=bf>nt[1]&&nt[0]<(mf-ls)*(nt[1]-ff)/(bf-ff)+ls&&(lo=!lo)}return lo}function Zg(nt,at){var wt=[];return vp(nt,function(lo){var fo=!1;if(lo.geometry.type==="Point")Ip(at,function(ls){cm(lo,ls)&&(fo=!0)}),fo&&wt.push(lo);else{if(lo.geometry.type!=="MultiPoint")throw new Error("Input geometry must be a Point or MultiPoint");var vo=[];Ip(at,function(ls){rp(lo,function(ff){cm(ff,ls)&&(fo=!0,vo.push(ff))})}),fo&&wt.push(yf(vo))}}),wo(wt)}function _m(nt,at,wt){wt===void 0&&(wt={});var lo=cp(nt),fo=cp(at),vo=Bf(fo[1]-lo[1]),ls=Bf(fo[0]-lo[0]),ff=Bf(lo[1]),mf=Bf(fo[1]),bf=Math.pow(Math.sin(vo/2),2)+Math.pow(Math.sin(ls/2),2)*Math.cos(ff)*Math.cos(mf);return $f(2*Math.atan2(Math.sqrt(bf),Math.sqrt(1-bf)),wt.units)}function Eb(nt,at){var wt=!1;return wo(function(lo){if(lo.length<3)return[];lo.sort(X1);for(var fo,vo,ls,ff,mf,bf,Sf=lo.length-1,xf=lo[Sf].x,If=lo[0].x,jf=lo[Sf].y,zf=jf,Wf=1e-12;Sf--;)lo[Sf].yzf&&(zf=lo[Sf].y);var Mf,np=If-xf,pp=zf-jf,Uf=np>pp?np:pp,tp=.5*(If+xf),op=.5*(zf+jf),up=[new v_({__sentinel:!0,x:tp-20*Uf,y:op-Uf},{__sentinel:!0,x:tp,y:op+20*Uf},{__sentinel:!0,x:tp+20*Uf,y:op-Uf})],sp=[],Qp=[];for(Sf=lo.length;Sf--;){for(Qp.length=0,Mf=up.length;Mf--;)(np=lo[Sf].x-up[Mf].x)>0&&np*np>up[Mf].r?(sp.push(up[Mf]),up.splice(Mf,1)):np*np+(pp=lo[Sf].y-up[Mf].y)*pp>up[Mf].r||(Qp.push(up[Mf].a,up[Mf].b,up[Mf].b,up[Mf].c,up[Mf].c,up[Mf].a),up.splice(Mf,1));for(Yv(Qp),Mf=Qp.length;Mf;)vo=Qp[--Mf],fo=Qp[--Mf],ls=lo[Sf],ff=vo.x-fo.x,mf=vo.y-fo.y,bf=2*(ff*(ls.y-vo.y)-mf*(ls.x-vo.x)),Math.abs(bf)>Wf&&up.push(new v_(fo,vo,ls))}for(Array.prototype.push.apply(sp,up),Sf=sp.length;Sf--;)(sp[Sf].a.__sentinel||sp[Sf].b.__sentinel||sp[Sf].c.__sentinel)&&sp.splice(Sf,1);return sp}(nt.features.map(function(lo){var fo={x:lo.geometry.coordinates[0],y:lo.geometry.coordinates[1]};return at?fo.z=lo.properties[at]:lo.geometry.coordinates.length===3&&(wt=!0,fo.z=lo.geometry.coordinates[2]),fo})).map(function(lo){var fo=[lo.a.x,lo.a.y],vo=[lo.b.x,lo.b.y],ls=[lo.c.x,lo.c.y],ff={};return wt?(fo.push(lo.a.z),vo.push(lo.b.z),ls.push(lo.c.z)):ff={a:lo.a.z,b:lo.b.z,c:lo.c.z},yn([[fo,vo,ls,fo]],ff)}))}jy.default=cw;var v_=function(nt,at,wt){this.a=nt,this.b=at,this.c=wt;var lo,fo,vo=at.x-nt.x,ls=at.y-nt.y,ff=wt.x-nt.x,mf=wt.y-nt.y,bf=vo*(nt.x+at.x)+ls*(nt.y+at.y),Sf=ff*(nt.x+wt.x)+mf*(nt.y+wt.y),xf=2*(vo*(wt.y-at.y)-ls*(wt.x-at.x));this.x=(mf*bf-ls*Sf)/xf,this.y=(vo*Sf-ff*bf)/xf,lo=this.x-nt.x,fo=this.y-nt.y,this.r=lo*lo+fo*fo};function X1(nt,at){return at.x-nt.x}function Yv(nt){var at,wt,lo,fo,vo,ls=nt.length;e:for(;ls;)for(wt=nt[--ls],at=nt[--ls],lo=ls;lo;)if(vo=nt[--lo],at===(fo=nt[--lo])&&wt===vo||at===vo&&wt===fo){nt.splice(ls,2),nt.splice(lo,2),ls-=2;continue e}}function Iv(nt){if(!nt)throw new Error("geojson is required");switch(nt.type){case"Feature":return Z1(nt);case"FeatureCollection":return function(at){var wt={type:"FeatureCollection"};return Object.keys(at).forEach(function(lo){switch(lo){case"type":case"features":return;default:wt[lo]=at[lo]}}),wt.features=at.features.map(function(lo){return Z1(lo)}),wt}(nt);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return M$(nt);default:throw new Error("unknown GeoJSON type")}}function Z1(nt){var at={type:"Feature"};return Object.keys(nt).forEach(function(wt){switch(wt){case"type":case"properties":case"geometry":return;default:at[wt]=nt[wt]}}),at.properties=J1(nt.properties),at.geometry=M$(nt.geometry),at}function J1(nt){var at={};return nt&&Object.keys(nt).forEach(function(wt){var lo=nt[wt];typeof lo=="object"?lo===null?at[wt]=null:Array.isArray(lo)?at[wt]=lo.map(function(fo){return fo}):at[wt]=J1(lo):at[wt]=lo}),at}function M$(nt){var at={type:nt.type};return nt.bbox&&(at.bbox=nt.bbox),nt.type==="GeometryCollection"?(at.geometries=nt.geometries.map(function(wt){return M$(wt)}),at):(at.coordinates=t1(nt.coordinates),at)}function t1(nt){var at=nt;return typeof at[0]!="object"?at.slice():at.map(function(wt){return t1(wt)})}function Jb(nt,at){if(at===void 0&&(at={}),!kf(at=at||{}))throw new Error("options is invalid");var wt=at.mutate;if(Mp(nt)!=="FeatureCollection")throw new Error("geojson must be a FeatureCollection");if(!nt.features.length)throw new Error("geojson is empty");wt!==!1&&wt!==void 0||(nt=Iv(nt));var lo=[],fo=xp(nt,function(vo,ls){var ff=function(mf,bf){var Sf,xf=mf.geometry.coordinates,If=bf.geometry.coordinates,jf=D$(xf[0]),zf=D$(xf[xf.length-1]),Wf=D$(If[0]),Mf=D$(If[If.length-1]);if(jf===Mf)Sf=If.concat(xf.slice(1));else if(Wf===zf)Sf=xf.concat(If.slice(1));else if(jf===Wf)Sf=xf.slice(1).reverse().concat(If);else{if(zf!==Mf)return null;Sf=xf.concat(If.reverse().slice(1))}return po(Sf)}(vo,ls);return ff||(lo.push(vo),ls)});return fo&&lo.push(fo),lo.length?lo.length===1?lo[0]:lf(lo.map(function(vo){return vo.coordinates})):null}function D$(nt){return nt[0].toString()+","+nt[1].toString()}function hw(nt){return nt}function dw(nt,at){var wt=function(bf){if(bf==null)return hw;var Sf,xf,If=bf.scale[0],jf=bf.scale[1],zf=bf.translate[0],Wf=bf.translate[1];return function(Mf,np){np||(Sf=xf=0);var pp=2,Uf=Mf.length,tp=new Array(Uf);for(tp[0]=(Sf+=Mf[0])*If+zf,tp[1]=(xf+=Mf[1])*jf+Wf;pp1)for(var Sf,xf,If=1,jf=ls(bf[0]);Ifjf&&(xf=bf[0],bf[0]=bf[If],bf[If]=xf,jf=Sf);return bf}).filter(function(ff){return ff.length>0})}}var b_=Object.prototype.hasOwnProperty;function L$(nt,at,wt,lo,fo,vo){arguments.length===3&&(lo=vo=Array,fo=null);for(var ls=new lo(nt=1<=nt)throw new Error("full hashmap");np=ls[Mf=Mf+1&mf]}return ls[Mf]=zf,ff[Mf]=Wf,Wf}function xf(zf,Wf){for(var Mf=at(zf)&mf,np=ls[Mf],pp=0;np!=fo;){if(wt(np,zf))return ff[Mf];if(++pp>=nt)throw new Error("full hashmap");np=ls[Mf=Mf+1&mf]}return ls[Mf]=zf,ff[Mf]=Wf,Wf}function If(zf,Wf){for(var Mf=at(zf)&mf,np=ls[Mf],pp=0;np!=fo;){if(wt(np,zf))return ff[Mf];if(++pp>=nt)break;np=ls[Mf=Mf+1&mf]}return Wf}function jf(){for(var zf=[],Wf=0,Mf=ls.length;Wf>7^um[2]^um[3])}function wx(nt){var at,wt,lo,fo,vo=nt.coordinates,ls=nt.lines,ff=nt.rings,mf=function(){for(var Ap=L$(1.4*vo.length,op,up,Int32Array,-1,Int32Array),rg=new Int32Array(vo.length),zp=0,lg=vo.length;zp=0){var Wp=xf[zp];qp===rg&&Wp===lg||qp===lg&&Wp===rg||(++jf,If[zp]=1)}else Sf[zp]=rg,xf[zp]=lg}}function op(Ap){return O0(vo[Ap])}function up(Ap,rg){return Qb(vo[Ap],vo[rg])}bf=Sf=xf=null;var sp,Qp=function(Ap,rg,zp,lg,qp){arguments.length===3&&(lg=Array,qp=null);for(var Wp=new lg(Ap=1<=Ap)throw new Error("full hashset");bm=Wp[_g=_g+1&Up]}return Wp[_g]=Ug,!0}function cg(Ug){for(var _g=rg(Ug)&Up,bm=Wp[_g],Mg=0;bm!=qp;){if(zp(bm,Ug))return!0;if(++Mg>=Ap)break;bm=Wp[_g=_g+1&Up]}return!1}function Sp(){for(var Ug=[],_g=0,bm=Wp.length;_g>1);atWf&&(Wf=Qp),ApMf&&(Mf=Ap)}function tp(sp){sp.forEach(Uf)}function op(sp){sp.forEach(tp)}for(var up in If)np(If[up]);return Wf>=jf&&Mf>=zf?[jf,zf,Wf,Mf]:void 0}(nt=e$(nt)),lo=at>0&&wt&&function(If,jf,zf){var Wf=jf[0],Mf=jf[1],np=jf[2],pp=jf[3],Uf=np-Wf?(zf-1)/(np-Wf):1,tp=pp-Mf?(zf-1)/(pp-Mf):1;function op(qp){return[Math.round((qp[0]-Wf)*Uf),Math.round((qp[1]-Mf)*tp)]}function up(qp,Wp){for(var Up,ig,Xp,cg,Sp,Ug=-1,_g=0,bm=qp.length,Mg=new Array(bm);++Ug2&&lv(wt[fo-3],wt[fo-1],wt[fo-2])&&wt.splice(wt.length-2,1))}if(wt.push(at[at.length-1]),fo=wt.length,pw(at[0],at[at.length-1])&&fo<4)throw new Error("invalid polygon");return lv(wt[fo-3],wt[fo-1],wt[fo-2])&&wt.splice(wt.length-2,1),wt}function pw(nt,at){return nt[0]===at[0]&&nt[1]===at[1]}function lv(nt,at,wt){var lo=wt[0],fo=wt[1],vo=nt[0],ls=nt[1],ff=at[0],mf=at[1],bf=ff-vo,Sf=mf-ls;return(lo-vo)*Sf-(fo-ls)*bf===0&&(Math.abs(bf)>=Math.abs(Sf)?bf>0?vo<=lo&&lo<=ff:ff<=lo&&lo<=vo:Sf>0?ls<=fo&&fo<=mf:mf<=fo&&fo<=ls)}function YE(nt,at,wt){var lo=at.x,fo=at.y,vo=wt.x-lo,ls=wt.y-fo;if(vo!==0||ls!==0){var ff=((nt.x-lo)*vo+(nt.y-fo)*ls)/(vo*vo+ls*ls);ff>1?(lo=wt.x,fo=wt.y):ff>0&&(lo+=vo*ff,fo+=ls*ff)}return(vo=nt.x-lo)*vo+(ls=nt.y-fo)*ls}function m0(nt,at,wt,lo,fo){for(var vo,ls=lo,ff=at+1;ffls&&(vo=ff,ls=mf)}ls>lo&&(vo-at>1&&m0(nt,at,vo,lo,fo),fo.push(nt[vo]),wt-vo>1&&m0(nt,vo,wt,lo,fo))}function F$(nt,at){var wt=nt.length-1,lo=[nt[0]];return m0(nt,0,wt,at,lo),lo.push(nt[wt]),lo}function __(nt,at,wt){if(nt.length<=2)return nt;var lo=at!==void 0?at*at:1;return nt=F$(nt=wt?nt:function(fo,vo){for(var ls,ff,mf,bf,Sf,xf=fo[0],If=[xf],jf=1,zf=fo.length;jfvo&&(If.push(ls),xf=ls);return xf!==ls&&If.push(ls),If}(nt,lo),lo)}function w_(nt,at,wt){return __(nt.map(function(lo){return{x:lo[0],y:lo[1],z:lo[2]}}),at,wt).map(function(lo){return lo.z?[lo.x,lo.y,lo.z]:[lo.x,lo.y]})}function x_(nt,at,wt){return nt.map(function(lo){var fo=lo.map(function(ls){return{x:ls[0],y:ls[1]}});if(fo.length<4)throw new Error("invalid polygon");for(var vo=__(fo,at,wt).map(function(ls){return[ls.x,ls.y]});!KE(vo);)vo=__(fo,at-=.01*at,wt).map(function(ls){return[ls.x,ls.y]});return vo[vo.length-1][0]===vo[0][0]&&vo[vo.length-1][1]===vo[0][1]||vo.push(vo[0]),vo})}function KE(nt){return!(nt.length<3)&&!(nt.length===3&&nt[2][0]===nt[0][0]&&nt[2][1]===nt[0][1])}var N2=function(){function nt(at){this.points=at.points||[],this.duration=at.duration||1e4,this.sharpness=at.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=at.stepLength||60,this.length=this.points.length,this.delay=0;for(var wt=0;wtat&&(wt.push(fo),lo=vo)}return wt},nt.prototype.vector=function(at){var wt=this.pos(at+10),lo=this.pos(at-10);return{angle:180*Math.atan2(wt.y-lo.y,wt.x-lo.x)/3.14,speed:Math.sqrt((lo.x-wt.x)*(lo.x-wt.x)+(lo.y-wt.y)*(lo.y-wt.y)+(lo.z-wt.z)*(lo.z-wt.z))}},nt.prototype.pos=function(at){var wt=at-this.delay;wt<0&&(wt=0),wt>this.duration&&(wt=this.duration-1);var lo=wt/this.duration;if(lo>=1)return this.points[this.length-1];var fo=Math.floor((this.points.length-1)*lo);return function(vo,ls,ff,mf,bf){var Sf=function(xf){var If=xf*xf;return[If*xf,3*If*(1-xf),3*xf*(1-xf)*(1-xf),(1-xf)*(1-xf)*(1-xf)]}(vo);return{x:bf.x*Sf[0]+mf.x*Sf[1]+ff.x*Sf[2]+ls.x*Sf[3],y:bf.y*Sf[0]+mf.y*Sf[1]+ff.y*Sf[2]+ls.y*Sf[3],z:bf.z*Sf[0]+mf.z*Sf[1]+ff.z*Sf[2]+ls.z*Sf[3]}}((this.length-1)*lo-fo,this.points[fo],this.controls[fo][1],this.controls[fo+1][0],this.points[fo+1])},nt}();function M2(nt,at){at===void 0&&(at={});for(var wt=at.resolution||1e4,lo=at.sharpness||.85,fo=[],vo=_p(nt).coordinates.map(function(bf){return{x:bf[0],y:bf[1]}}),ls=new N2({duration:wt,points:vo,sharpness:lo}),ff=function(bf){var Sf=ls.pos(bf);Math.floor(bf/100)%2==0&&fo.push([Sf.x,Sf.y])},mf=0;mf=_m(nt.slice(0,2),[at,fo])){var vo=(wt+fo)/2;return[at,vo-(lo-at)/2,lo,vo+(lo-at)/2]}var ls=(at+lo)/2;return[ls-(fo-wt)/2,wt,ls+(fo-wt)/2,fo]}function $y(nt,at,wt,lo){lo===void 0&&(lo={});var fo=cp(nt),vo=Bf(fo[0]),ls=Bf(fo[1]),ff=Bf(wt),mf=wf(at,lo.units),bf=Math.asin(Math.sin(ls)*Math.cos(mf)+Math.cos(ls)*Math.sin(mf)*Math.cos(ff));return ot([Af(vo+Math.atan2(Math.sin(ff)*Math.sin(mf)*Math.cos(ls),Math.cos(mf)-Math.sin(ls)*Math.sin(bf))),Af(bf)],lo.properties)}function kx(nt,at,wt){wt===void 0&&(wt={});for(var lo=wt.steps||64,fo=wt.properties?wt.properties:!Array.isArray(nt)&&nt.type==="Feature"&&nt.properties?nt.properties:{},vo=[],ls=0;ls80*wt){lo=vo=nt[0],fo=ls=nt[1];for(var zf=wt;zfvo&&(vo=ff),mf>ls&&(ls=mf);bf=(bf=Math.max(vo-lo,ls-fo))!==0?1/bf:0}return v0(If,jf,wt,lo,fo,bf),jf}function vw(nt,at,wt,lo,fo){var vo,ls;if(fo===xv(nt,at,wt,lo)>0)for(vo=at;vo=at;vo-=lo)ls=bw(vo,nt[vo],nt[vo+1],ls);return ls&&C1(ls,ls.next)&&(Ay(ls),ls=ls.next),ls}function B$(nt,at){if(!nt)return nt;at||(at=nt);var wt,lo=nt;do if(wt=!1,lo.steiner||!C1(lo,lo.next)&&gy(lo.prev,lo,lo.next)!==0)lo=lo.next;else{if(Ay(lo),(lo=at=lo.prev)===lo.next)break;wt=!0}while(wt||lo!==at);return at}function v0(nt,at,wt,lo,fo,vo,ls){if(nt){!ls&&vo&&function(Sf,xf,If,jf){var zf=Sf;do zf.z===null&&(zf.z=Cx(zf.x,zf.y,xf,If,jf)),zf.prevZ=zf.prev,zf.nextZ=zf.next,zf=zf.next;while(zf!==Sf);zf.prevZ.nextZ=null,zf.prevZ=null,function(Wf){var Mf,np,pp,Uf,tp,op,up,sp,Qp=1;do{for(np=Wf,Wf=null,tp=null,op=0;np;){for(op++,pp=np,up=0,Mf=0;Mf0||sp>0&&pp;)up!==0&&(sp===0||!pp||np.z<=pp.z)?(Uf=np,np=np.nextZ,up--):(Uf=pp,pp=pp.nextZ,sp--),tp?tp.nextZ=Uf:Wf=Uf,Uf.prevZ=tp,tp=Uf;np=pp}tp.nextZ=null,Qp*=2}while(op>1)}(zf)}(nt,lo,fo,vo);for(var ff,mf,bf=nt;nt.prev!==nt.next;)if(ff=nt.prev,mf=nt.next,vo?j$(nt,lo,fo,vo):n0(nt))at.push(ff.i/wt),at.push(nt.i/wt),at.push(mf.i/wt),Ay(nt),nt=mf.next,bf=mf.next;else if((nt=mf)===bf){ls?ls===1?v0(nt=L2(nt,at,wt),at,wt,lo,fo,vo,2):ls===2&&F2(nt,at,wt,lo,fo,vo):v0(B$(nt),at,wt,lo,fo,vo,1);break}}}function n0(nt){var at=nt.prev,wt=nt,lo=nt.next;if(gy(at,wt,lo)>=0)return!1;for(var fo=nt.next.next;fo!==nt.prev;){if(zy(at.x,at.y,wt.x,wt.y,lo.x,lo.y,fo.x,fo.y)&&gy(fo.prev,fo,fo.next)>=0)return!1;fo=fo.next}return!0}function j$(nt,at,wt,lo){var fo=nt.prev,vo=nt,ls=nt.next;if(gy(fo,vo,ls)>=0)return!1;for(var ff=fo.xvo.x?fo.x>ls.x?fo.x:ls.x:vo.x>ls.x?vo.x:ls.x,Sf=fo.y>vo.y?fo.y>ls.y?fo.y:ls.y:vo.y>ls.y?vo.y:ls.y,xf=Cx(ff,mf,at,wt,lo),If=Cx(bf,Sf,at,wt,lo),jf=nt.prevZ,zf=nt.nextZ;jf&&jf.z>=xf&&zf&&zf.z<=If;){if(jf!==nt.prev&&jf!==nt.next&&zy(fo.x,fo.y,vo.x,vo.y,ls.x,ls.y,jf.x,jf.y)&&gy(jf.prev,jf,jf.next)>=0||(jf=jf.prevZ,zf!==nt.prev&&zf!==nt.next&&zy(fo.x,fo.y,vo.x,vo.y,ls.x,ls.y,zf.x,zf.y)&&gy(zf.prev,zf,zf.next)>=0))return!1;zf=zf.nextZ}for(;jf&&jf.z>=xf;){if(jf!==nt.prev&&jf!==nt.next&&zy(fo.x,fo.y,vo.x,vo.y,ls.x,ls.y,jf.x,jf.y)&&gy(jf.prev,jf,jf.next)>=0)return!1;jf=jf.prevZ}for(;zf&&zf.z<=If;){if(zf!==nt.prev&&zf!==nt.next&&zy(fo.x,fo.y,vo.x,vo.y,ls.x,ls.y,zf.x,zf.y)&&gy(zf.prev,zf,zf.next)>=0)return!1;zf=zf.nextZ}return!0}function L2(nt,at,wt){var lo=nt;do{var fo=lo.prev,vo=lo.next.next;!C1(fo,vo)&&r$(fo,lo,lo.next,vo)&&n$(fo,vo)&&n$(vo,fo)&&(at.push(fo.i/wt),at.push(lo.i/wt),at.push(vo.i/wt),Ay(lo),Ay(lo.next),lo=nt=vo),lo=lo.next}while(lo!==nt);return lo}function F2(nt,at,wt,lo,fo,vo){var ls=nt;do{for(var ff=ls.next.next;ff!==ls.prev;){if(ls.i!==ff.i&&B2(ls,ff)){var mf=z$(ls,ff);return ls=B$(ls,ls.next),mf=B$(mf,mf.next),v0(ls,at,wt,lo,fo,vo),void v0(mf,at,wt,lo,fo,vo)}ff=ff.next}ls=ls.next}while(ls!==nt)}function yw(nt,at){return nt.x-at.x}function t$(nt,at){if(at=function(lo,fo){var vo,ls=fo,ff=lo.x,mf=lo.y,bf=-1/0;do{if(mf<=ls.y&&mf>=ls.next.y&&ls.next.y!==ls.y){var Sf=ls.x+(mf-ls.y)*(ls.next.x-ls.x)/(ls.next.y-ls.y);if(Sf<=ff&&Sf>bf){if(bf=Sf,Sf===ff){if(mf===ls.y)return ls;if(mf===ls.next.y)return ls.next}vo=ls.x=ls.x&&ls.x>=jf&&ff!==ls.x&&zy(mfvo.x)&&n$(ls,lo)&&(vo=ls,Wf=xf),ls=ls.next;return vo}(nt,at)){var wt=z$(at,nt);B$(wt,wt.next)}}function Cx(nt,at,wt,lo,fo){return(nt=1431655765&((nt=858993459&((nt=252645135&((nt=16711935&((nt=32767*(nt-wt)*fo)|nt<<8))|nt<<4))|nt<<2))|nt<<1))|(at=1431655765&((at=858993459&((at=252645135&((at=16711935&((at=32767*(at-lo)*fo)|at<<8))|at<<4))|at<<2))|at<<1))<<1}function T_(nt){var at=nt,wt=nt;do at.x=0&&(nt-ls)*(lo-ff)-(wt-ls)*(at-ff)>=0&&(wt-ls)*(vo-ff)-(fo-ls)*(lo-ff)>=0}function B2(nt,at){return nt.next.i!==at.i&&nt.prev.i!==at.i&&!function(wt,lo){var fo=wt;do{if(fo.i!==wt.i&&fo.next.i!==wt.i&&fo.i!==lo.i&&fo.next.i!==lo.i&&r$(fo,fo.next,wt,lo))return!0;fo=fo.next}while(fo!==wt);return!1}(nt,at)&&n$(nt,at)&&n$(at,nt)&&function(wt,lo){var fo=wt,vo=!1,ls=(wt.x+lo.x)/2,ff=(wt.y+lo.y)/2;do fo.y>ff!=fo.next.y>ff&&fo.next.y!==fo.y&&ls<(fo.next.x-fo.x)*(ff-fo.y)/(fo.next.y-fo.y)+fo.x&&(vo=!vo),fo=fo.next;while(fo!==wt);return vo}(nt,at)}function gy(nt,at,wt){return(at.y-nt.y)*(wt.x-at.x)-(at.x-nt.x)*(wt.y-at.y)}function C1(nt,at){return nt.x===at.x&&nt.y===at.y}function r$(nt,at,wt,lo){return!!(C1(nt,at)&&C1(wt,lo)||C1(nt,lo)&&C1(wt,at))||gy(nt,at,wt)>0!=gy(nt,at,lo)>0&&gy(wt,lo,nt)>0!=gy(wt,lo,at)>0}function n$(nt,at){return gy(nt.prev,nt,nt.next)<0?gy(nt,at,nt.next)>=0&&gy(nt,nt.prev,at)>=0:gy(nt,at,nt.prev)<0||gy(nt,nt.next,at)<0}function z$(nt,at){var wt=new Ox(nt.i,nt.x,nt.y),lo=new Ox(at.i,at.x,at.y),fo=nt.next,vo=at.prev;return nt.next=at,at.prev=nt,wt.next=fo,fo.prev=wt,lo.next=wt,wt.prev=lo,vo.next=lo,lo.prev=vo,lo}function bw(nt,at,wt,lo){var fo=new Ox(nt,at,wt);return lo?(fo.next=lo.next,fo.prev=lo,lo.next.prev=fo,lo.next=fo):(fo.prev=fo,fo.next=fo),fo}function Ay(nt){nt.next.prev=nt.prev,nt.prev.next=nt.next,nt.prevZ&&(nt.prevZ.nextZ=nt.nextZ),nt.nextZ&&(nt.nextZ.prevZ=nt.prevZ)}function Ox(nt,at,wt){this.i=nt,this.x=at,this.y=wt,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function xv(nt,at,wt,lo){for(var fo=0,vo=at,ls=wt-lo;vo0&&(Sf+=ff[xf-1].length,bf.holes.push(Sf))}return bf}(nt),wt=mw(at.vertices,at.holes,2),lo=[],fo=[];wt.forEach(function(ff,mf){var bf=wt[mf];fo.push([at.vertices[2*bf],at.vertices[2*bf+1]])});for(var vo=0;vopp?Mf:pp,np>Uf?np:Uf]}(xf,If),Sf.push(jf),If}),Sf})(ff,lo.properties).forEach(function(mf){mf.id=fo.length,fo.push(mf)})})}})(wt,at)}),wo(at)}S_.deviation=function(nt,at,wt,lo){var fo=at&&at.length,vo=fo?at[0]*wt:nt.length,ls=Math.abs(xv(nt,0,vo,wt));if(fo)for(var ff=0,mf=at.length;ff0&&(lo+=nt[fo-1].length,wt.holes.push(lo))}return wt},mw.default=XE;var my=qv(function(nt,at){function wt(zf,Wf,Mf){Mf===void 0&&(Mf={});var np={type:"Feature"};return(Mf.id===0||Mf.id)&&(np.id=Mf.id),Mf.bbox&&(np.bbox=Mf.bbox),np.properties=Wf||{},np.geometry=zf,np}function lo(zf,Wf,Mf){if(Mf===void 0&&(Mf={}),!zf)throw new Error("coordinates is required");if(!Array.isArray(zf))throw new Error("coordinates must be an Array");if(zf.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!jf(zf[0])||!jf(zf[1]))throw new Error("coordinates must contain numbers");return wt({type:"Point",coordinates:zf},Wf,Mf)}function fo(zf,Wf,Mf){Mf===void 0&&(Mf={});for(var np=0,pp=zf;np=0))throw new Error("precision must be a positive number");var Mf=Math.pow(10,Wf||0);return Math.round(zf*Mf)/Mf},at.radiansToLength=Sf,at.lengthToRadians=xf,at.lengthToDegrees=function(zf,Wf){return If(xf(zf,Wf))},at.bearingToAzimuth=function(zf){var Wf=zf%360;return Wf<0&&(Wf+=360),Wf},at.radiansToDegrees=If,at.degreesToRadians=function(zf){return zf%360*Math.PI/180},at.convertLength=function(zf,Wf,Mf){if(Wf===void 0&&(Wf="kilometers"),Mf===void 0&&(Mf="kilometers"),!(zf>=0))throw new Error("length must be a positive number");return Sf(xf(zf,Wf),Mf)},at.convertArea=function(zf,Wf,Mf){if(Wf===void 0&&(Wf="meters"),Mf===void 0&&(Mf="kilometers"),!(zf>=0))throw new Error("area must be a positive number");var np=at.areaFactors[Wf];if(!np)throw new Error("invalid original units");var pp=at.areaFactors[Mf];if(!pp)throw new Error("invalid final units");return zf/np*pp},at.isNumber=jf,at.isObject=function(zf){return!!zf&&zf.constructor===Object},at.validateBBox=function(zf){if(!zf)throw new Error("bbox is required");if(!Array.isArray(zf))throw new Error("bbox must be an Array");if(zf.length!==4&&zf.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");zf.forEach(function(Wf){if(!jf(Wf))throw new Error("bbox must only contain numbers")})},at.validateId=function(zf){if(!zf)throw new Error("id is required");if(["string","number"].indexOf(typeof zf)===-1)throw new Error("id must be a number or a string")}});function o1(nt,at,wt){if(nt!==null)for(var lo,fo,vo,ls,ff,mf,bf,Sf,xf=0,If=0,jf=nt.type,zf=jf==="FeatureCollection",Wf=jf==="Feature",Mf=zf?nt.features.length:1,np=0;npmf||zf>bf||Wf>Sf)return ff=xf,mf=lo,bf=zf,Sf=Wf,void(vo=0);var Mf=my.lineString([ff,xf],wt.properties);if(at(Mf,lo,fo,Wf,vo)===!1)return!1;vo++,ff=xf})!==!1&&void 0}}})}function Q1(nt,at){if(!nt)throw new Error("geojson is required");i$(nt,function(wt,lo,fo){if(wt.geometry!==null){var vo=wt.geometry.type,ls=wt.geometry.coordinates;switch(vo){case"LineString":if(at(wt,lo,fo,0,0)===!1)return!1;break;case"Polygon":for(var ff=0;ffwt[0]&&(at[0]=wt[0]),at[1]>wt[1]&&(at[1]=wt[1]),at[2] line1 must only contain 2 coordinates");if(lo.length!==2)throw new Error(" line2 must only contain 2 coordinates");var fo=wt[0][0],vo=wt[0][1],ls=wt[1][0],ff=wt[1][1],mf=lo[0][0],bf=lo[0][1],Sf=lo[1][0],xf=lo[1][1],If=(xf-bf)*(ls-fo)-(Sf-mf)*(ff-vo),jf=(Sf-mf)*(vo-bf)-(xf-bf)*(fo-mf),zf=(ls-fo)*(vo-bf)-(ff-vo)*(fo-mf);if(If===0)return null;var Wf=jf/If,Mf=zf/If;return Wf>=0&&Wf<=1&&Mf>=0&&Mf<=1?ot([fo+Wf*(ls-fo),vo+Wf*(ff-vo)]):null}function I1(nt,at,wt){wt===void 0&&(wt={});var lo=ot([1/0,1/0],{dist:1/0}),fo=0;return ng(nt,function(vo){for(var ls=hp(vo),ff=0;ff0&&((Mf=Wf.features[0]).properties.dist=_m(at,Mf,wt),Mf.properties.location=fo+_m(mf,Mf,wt)),mf.properties.dist180?-360:lo[0]-fo[0]>180?360:0,Hf(function(vo,ls,ff){var mf=ff=ff===void 0?W:Number(ff),bf=vo[1]*Math.PI/180,Sf=ls[1]*Math.PI/180,xf=Sf-bf,If=Math.abs(ls[0]-vo[0])*Math.PI/180;If>Math.PI&&(If-=2*Math.PI);var jf=Math.log(Math.tan(Sf/2+Math.PI/4)/Math.tan(bf/2+Math.PI/4)),zf=Math.abs(jf)>1e-11?xf/jf:Math.cos(bf);return Math.sqrt(xf*xf+zf*zf*If*If)*mf}(lo,fo),"meters",wt.units)}function H2(nt,at,wt){if(wt===void 0&&(wt={}),wt.method||(wt.method="geodesic"),wt.units||(wt.units="kilometers"),!nt)throw new Error("pt is required");if(Array.isArray(nt)?nt=ot(nt):nt.type==="Point"?nt=tt(nt):bp(nt,"Point","point"),!at)throw new Error("line is required");Array.isArray(at)?at=po(at):at.type==="LineString"?at=tt(at):bp(at,"LineString","line");var lo=1/0,fo=nt.geometry.coordinates;return vg(at,function(vo){var ls=vo.geometry.coordinates[0],ff=vo.geometry.coordinates[1],mf=function(bf,Sf,xf,If){var jf=[xf[0]-Sf[0],xf[1]-Sf[1]],zf=Rx([bf[0]-Sf[0],bf[1]-Sf[1]],jf);if(zf<=0)return Tw(bf,Sf,{method:If.method,units:"degrees"});var Wf=Rx(jf,jf);if(Wf<=zf)return Tw(bf,xf,{method:If.method,units:"degrees"});var Mf=zf/Wf,np=[Sf[0]+Mf*jf[0],Sf[1]+Mf*jf[1]];return Tw(bf,np,{method:If.method,units:"degrees"})}(fo,ls,ff,wt);mf=0&&bf<=1&&(If.onLine1=!0),Sf>=0&&Sf<=1&&(If.onLine2=!0),!(!If.onLine1||!If.onLine2)&&[If.x,If.y])}function U2(nt){for(var at=function(If){return If.type!=="FeatureCollection"?If.type!=="Feature"?wo([tt(If)]):wo([If]):If}(nt),wt=n1(at),lo=!1,fo=0;!lo&&fo0){at+=Math.abs(a1(nt[0]));for(var wt=1;wt2){for(ls=0;ls=Sf&&xf===fo.length-1);xf++){if(Sf>at&&vo.length===0){if(!(ls=at-Sf))return vo.push(fo[xf]),po(vo);ff=k1(fo[xf],fo[xf-1])-180,mf=$y(fo[xf],ls,ff,lo),vo.push(mf.geometry.coordinates)}if(Sf>=wt)return(ls=wt-Sf)?(ff=k1(fo[xf],fo[xf-1])-180,mf=$y(fo[xf],ls,ff,lo),vo.push(mf.geometry.coordinates),po(vo)):(vo.push(fo[xf]),po(vo));if(Sf>=at&&vo.push(fo[xf]),xf===fo.length-1)return po(vo);Sf+=_m(fo[xf],fo[xf+1],lo)}if(Sffo)return!1}else if(jf!==0)return!1;return lo?lo==="start"?Math.abs(xf)>=Math.abs(If)?xf>0?ff0?mf=Math.abs(If)?xf>0?ff<=vo&&vo0?mf<=ls&&ls=Math.abs(If)?xf>0?ff0?mf=Math.abs(If)?xf>0?ff<=vo&&vo<=bf:bf<=vo&&vo<=ff:If>0?mf<=ls&&ls<=Sf:Sf<=ls&&ls<=mf}function q$(nt,at){var wt=_p(nt),lo=_p(at),fo=wt.type,vo=lo.type;switch(fo){case"Point":switch(vo){case"MultiPoint":return function(ls,ff){var mf,bf=!1;for(mf=0;mfat[0])&&!(nt[2]at[1])&&!(nt[3] is required");if(typeof wt!="number")throw new Error(" must be a number");if(typeof lo!="number")throw new Error(" must be a number");fo!==!1&&fo!==void 0||(nt=JSON.parse(JSON.stringify(nt)));var vo=Math.pow(10,wt);return rp(nt,function(ls){(function(ff,mf,bf){ff.length>bf&&ff.splice(bf,ff.length);for(var Sf=0;Sf=1||tp<=0||op>=1||op<=0))){var zp=rg,lg=!vo[zp];lg&&(vo[zp]=!0),at?fo.push(at(rg,Mf,np,up,sp,tp,pp,Uf,Qp,Ap,op,lg)):fo.push(rg)}}function Wf(Mf,np){var pp,Uf,tp,op,up=lo[Mf][np],sp=lo[Mf][np+1];return up[0]xf[em.isect].coord?-1:1}),mf=[];tp.length>0;){var Ap=tp.pop(),rg=Ap.isect,zp=Ap.parent,lg=Ap.winding,qp=mf.length,Wp=[xf[rg].coord],Up=rg;if(xf[rg].ringAndEdge1Walkable)var ig=xf[rg].ringAndEdge1,Xp=xf[rg].nxtIsectAlongRingAndEdge1;else ig=xf[rg].ringAndEdge2,Xp=xf[rg].nxtIsectAlongRingAndEdge2;for(;!pf(xf[rg].coord,xf[Xp].coord);){Wp.push(xf[Xp].coord);var cg=void 0;for(lo=0;lo1)for(em=0;em=0==at}function yo(nt){for(var at=0,wt=0;wt1&&wt.push(po(bf)),wo(wt)}function hm(nt,at){if(!at.features.length)throw new Error("lines must contain features");if(at.features.length===1)return at.features[0];var wt,lo=1/0;return vp(at,function(fo){var vo=I1(fo,nt).properties.dist;voSf&&If.push($y(nt,at,Sf,fo).geometry.coordinates),po(If,mf)}function ry(nt){var at=nt%360;return at<0&&(at+=360),at}function Xy(nt,at){at===void 0&&(at={});var wt=_p(nt);switch(at.properties||nt.type!=="Feature"||(at.properties=nt.properties),wt.type){case"Polygon":return i0(wt,at);case"MultiPolygon":return function(lo,fo){fo===void 0&&(fo={});var vo=_p(lo).coordinates,ls=fo.properties?fo.properties:lo.type==="Feature"?lo.properties:{},ff=[];return vo.forEach(function(mf){ff.push(Ob(mf,ls))}),wo(ff)}(wt,at);default:throw new Error("invalid poly")}}function i0(nt,at){return at===void 0&&(at={}),Ob(_p(nt).coordinates,at.properties?at.properties:nt.type==="Feature"?nt.properties:{})}function Ob(nt,at){return nt.length>1?lf(nt,at):po(nt[0],at)}function W2(nt,at){var wt,lo,fo;at===void 0&&(at={});var vo=at.properties,ls=(wt=at.autoComplete)===null||wt===void 0||wt,ff=(lo=at.orderCoords)===null||lo===void 0||lo;switch((fo=at.mutate)!==null&&fo!==void 0&&fo||(nt=Iv(nt)),nt.type){case"FeatureCollection":var mf=[];return nt.features.forEach(function(bf){mf.push(hp(Lx(bf,{},ls,ff)))}),cf(mf,vo);default:return Lx(nt,vo,ls,ff)}}function Lx(nt,at,wt,lo){at=at||(nt.type==="Feature"?nt.properties:{});var fo=_p(nt),vo=fo.coordinates,ls=fo.type;if(!vo.length)throw new Error("line must contain coordinates");switch(ls){case"LineString":return wt&&(vo=l$(vo)),yn([vo],at);case"MultiLineString":var ff=[],mf=0;return vo.forEach(function(bf){if(wt&&(bf=l$(bf)),lo){var Sf=function(xf){var If=xf[0],jf=xf[1],zf=xf[2],Wf=xf[3];return Math.abs(If-zf)*Math.abs(jf-Wf)}(qf(po(bf)));Sf>mf?(ff.unshift(bf),mf=Sf):ff.push(bf)}else ff.push(bf)}),yn(ff,at);default:throw new Error("geometry type "+ls+" is not supported")}}function l$(nt){var at=nt[0],wt=at[0],lo=at[1],fo=nt[nt.length-1],vo=fo[0],ls=fo[1];return wt===vo&&lo===ls||nt.push(at),nt}function c$(nt,at){var wt,lo,fo,vo,ls,ff,mf;for(lo=1;lo<=8;lo*=2){for(wt=[],vo=!(rb(fo=nt[nt.length-1],at)&lo),ls=0;lsat[2]&&(wt|=2),nt[1]at[3]&&(wt|=8),wt}function ny(nt,at){for(var wt=[],lo=0,fo=nt;lo0&&(vo[0][0]===vo[vo.length-1][0]&&vo[0][1]===vo[vo.length-1][1]||vo.push(vo[0]),vo.length>=4&&wt.push(vo))}return wt}sg.prototype.interpolate=function(nt){var at=Math.sin((1-nt)*this.g)/Math.sin(this.g),wt=Math.sin(nt*this.g)/Math.sin(this.g),lo=at*Math.cos(this.start.y)*Math.cos(this.start.x)+wt*Math.cos(this.end.y)*Math.cos(this.end.x),fo=at*Math.cos(this.start.y)*Math.sin(this.start.x)+wt*Math.cos(this.end.y)*Math.sin(this.end.x),vo=at*Math.sin(this.start.y)+wt*Math.sin(this.end.y),ls=Zf*Math.atan2(vo,Math.sqrt(Math.pow(lo,2)+Math.pow(fo,2)));return[Zf*Math.atan2(fo,lo),ls]},sg.prototype.Arc=function(nt,at){var wt=[];if(!nt||nt<=2)wt.push([this.start.lon,this.start.lat]),wt.push([this.end.lon,this.end.lat]);else for(var lo=1/(nt-1),fo=0;foIf&&(Wf>Sf&&zfSf&&Wfmf&&(mf=Mf)}var np=[];if(ff&&mf0&&Math.abs(tp-wt[Uf-1][0])>If){var op=parseFloat(wt[Uf-1][0]),up=parseFloat(wt[Uf-1][1]),sp=parseFloat(wt[Uf][0]),Qp=parseFloat(wt[Uf][1]);if(op>-180&&op-180&&wt[Uf-1][0]Sf&&op<180&&sp===-180&&Uf+1Sf&&wt[Uf-1][0]<180){pp.push([180,wt[Uf][1]]),Uf++,pp.push([wt[Uf][0],wt[Uf][1]]);continue}if(opSf){var Ap=op;op=sp,sp=Ap;var rg=up;up=Qp,Qp=rg}if(op>Sf&&sp=180&&opSf?180:-180,lg]),(pp=[]).push([wt[Uf-1][0]>Sf?-180:180,lg]),np.push(pp)}else pp=[],np.push(pp);pp.push([tp,wt[Uf][1]])}else pp.push([wt[Uf][0],wt[Uf][1]])}}else{var qp=[];np.push(qp);for(var Wp=0;Wp=0;xf--)if(jf[xf]!=zf[xf])return!1;for(xf=jf.length-1;xf>=0;xf--)if(If=jf[xf],!wt(mf[If],bf[If],Sf))return!1;return typeof mf==typeof bf}(vo,ls,ff))};function lo(vo){return vo==null}function fo(vo){return!(!vo||typeof vo!="object"||typeof vo.length!="number")&&typeof vo.copy=="function"&&typeof vo.slice=="function"&&!(vo.length>0&&typeof vo[0]!="number")}});function Aw(nt,at,wt){if(wt===void 0&&(wt={}),!kf(wt=wt||{}))throw new Error("options is invalid");var lo,fo=wt.tolerance||0,vo=[],ls=zv(),ff=_y(nt);return ls.load(ff),vg(at,function(mf){var bf=!1;mf&&(vp(ls.search(mf),function(Sf){if(bf===!1){var xf=hp(mf).sort(),If=hp(Sf).sort();Z$(xf,If)||(fo===0?$0(xf[0],Sf)&&$0(xf[1],Sf):I1(Sf,xf[0]).properties.dist<=fo&&I1(Sf,xf[1]).properties.dist<=fo)?(bf=!0,lo=lo?N_(lo,mf):mf):(fo===0?$0(If[0],mf)&&$0(If[1],mf):I1(mf,If[0]).properties.dist<=fo&&I1(mf,If[1]).properties.dist<=fo)&&(lo=lo?N_(lo,Sf):Sf)}}),bf===!1&&lo&&(vo.push(lo),lo=void 0))}),lo&&vo.push(lo),wo(vo)}function N_(nt,at){var wt=hp(at),lo=hp(nt),fo=lo[0],vo=lo[lo.length-1],ls=nt.geometry.coordinates;return Z$(wt[0],fo)?ls.unshift(wt[1]):Z$(wt[0],vo)?ls.push(wt[1]):Z$(wt[1],fo)?ls.unshift(wt[0]):Z$(wt[1],vo)&&ls.push(wt[0]),nt}function Rw(nt){var at=nt%360;return at<0&&(at+=360),at}function u$(nt,at,wt){var lo;return wt===void 0&&(wt={}),(lo=wt.final?nS(cp(at),cp(nt)):nS(cp(nt),cp(at)))>180?-(360-lo):lo}function nS(nt,at){var wt=Bf(nt[1]),lo=Bf(at[1]),fo=Bf(at[0]-nt[0]);fo>Math.PI&&(fo-=2*Math.PI),fo<-Math.PI&&(fo+=2*Math.PI);var vo=Math.log(Math.tan(lo/2+Math.PI/4)/Math.tan(wt/2+Math.PI/4));return(Af(Math.atan2(fo,vo))+360)%360}function Nw(nt,at,wt,lo){lo===void 0&&(lo={});var fo=at<0,vo=Hf(Math.abs(at),lo.units,"meters");fo&&(vo=-Math.abs(vo));var ls=cp(nt),ff=function(mf,bf,Sf,xf){xf=xf===void 0?W:Number(xf);var If=bf/xf,jf=mf[0]*Math.PI/180,zf=Bf(mf[1]),Wf=Bf(Sf),Mf=If*Math.cos(Wf),np=zf+Mf;Math.abs(np)>Math.PI/2&&(np=np>0?Math.PI-np:-Math.PI-np);var pp=Math.log(Math.tan(np/2+Math.PI/4)/Math.tan(zf/2+Math.PI/4)),Uf=Math.abs(pp)>1e-11?Mf/pp:Math.cos(zf),tp=If*Math.sin(Wf)/Uf;return[(180*(jf+tp)/Math.PI+540)%360-180,180*np/Math.PI]}(ls,vo,wt);return ff[0]+=ff[0]-ls[0]>180?-360:ls[0]-ff[0]>180?360:0,ot(ff,lo.properties)}function iS(nt,at,wt,lo,fo,vo){for(var ls=0;ls0?h$(at,ff,fo)<0||(fo=ff):wt>0&&lo<=0&&(mv(at,ff,vo)||(vo=ff)),wt=lo}return[fo,vo]}function mv(nt,at,wt){return h$(nt,at,wt)>0}function h$(nt,at,wt){return(at[0]-nt[0])*(wt[1]-nt[1])-(wt[0]-nt[0])*(at[1]-nt[1])}function Bx(nt){for(var at,wt,lo=hp(nt),fo=0,vo=1;vo0}function d$(nt,at){switch(nt.type==="Feature"?nt.geometry.type:nt.type){case"GeometryCollection":return Ip(nt,function(wt){d$(wt,at)}),nt;case"LineString":return Y2(hp(nt),at),nt;case"Polygon":return J$(hp(nt),at),nt;case"MultiLineString":return hp(nt).forEach(function(wt){Y2(wt,at)}),nt;case"MultiPolygon":return hp(nt).forEach(function(wt){J$(wt,at)}),nt;case"Point":case"MultiPoint":return nt}}function Y2(nt,at){Bx(nt)===at&&nt.reverse()}function J$(nt,at){Bx(nt[0])!==at&&nt[0].reverse();for(var wt=1;wtMf?128:64,Uf|=opMf?32:16,Uf|=upMf?8:4;var Qp=+(Uf|=spMf?2:1),Ap=0;if(Uf===17||Uf===18||Uf===33||Uf===34||Uf===38||Uf===68||Uf===72||Uf===98||Uf===102||Uf===132||Uf===136||Uf===137||Uf===152||Uf===153){var rg=(tp+op+up+sp)/4;Ap=rg>Mf?2:rg0?(Uf=156,Ap=4):Uf=152:Uf===33?Ap>0?(Uf=139,Ap=4):Uf=137:Uf===72?Ap>0?(Uf=99,Ap=4):Uf=98:Uf===132&&(Ap>0?(Uf=39,Ap=4):Uf=38)}if(Uf!=0&&Uf!=170){var zp,lg,qp,Wp,Up,ig,Xp,cg;zp=lg=qp=Wp=Up=ig=Xp=cg=.5;var Sp=[];Uf===1?(qp=1-dp(xf,up,sp),cg=1-dp(xf,tp,sp),Sp.push(Yg[Uf])):Uf===169?(qp=dp(Mf,sp,up),cg=dp(Mf,sp,tp),Sp.push(Yg[Uf])):Uf===4?(ig=1-dp(xf,op,up),Wp=dp(xf,sp,up),Sp.push(Fg[Uf])):Uf===166?(ig=dp(Mf,up,op),Wp=1-dp(Mf,up,sp),Sp.push(Fg[Uf])):Uf===16?(Up=dp(xf,up,op),lg=dp(xf,tp,op),Sp.push(jg[Uf])):Uf===154?(Up=1-dp(Mf,op,up),lg=1-dp(Mf,op,tp),Sp.push(jg[Uf])):Uf===64?(Xp=dp(xf,sp,tp),zp=1-dp(xf,op,tp),Sp.push(rm[Uf])):Uf===106?(Xp=1-dp(Mf,tp,sp),zp=dp(Mf,tp,op),Sp.push(rm[Uf])):Uf===168?(Wp=dp(Mf,sp,up),qp=dp(xf,sp,up),cg=dp(xf,sp,tp),Xp=dp(Mf,sp,tp),Sp.push(Qg[Uf]),Sp.push(Yg[Uf])):Uf===2?(Wp=1-dp(xf,up,sp),qp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(xf,tp,sp),Sp.push(Qg[Uf]),Sp.push(Yg[Uf])):Uf===162?(Up=dp(Mf,up,op),ig=dp(xf,up,op),Wp=1-dp(xf,up,sp),qp=1-dp(Mf,up,sp),Sp.push(Qg[Uf]),Sp.push(Yg[Uf])):Uf===8?(Up=1-dp(xf,op,up),ig=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(xf,sp,up),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===138?(Up=1-dp(xf,op,up),ig=1-dp(Mf,op,up),zp=1-dp(Mf,op,tp),lg=1-dp(xf,op,tp),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===32?(Up=dp(Mf,up,op),ig=dp(xf,up,op),zp=dp(xf,tp,op),lg=dp(Mf,tp,op),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===42?(cg=1-dp(Mf,tp,sp),Xp=1-dp(xf,tp,sp),zp=dp(xf,tp,op),lg=dp(Mf,tp,op),Sp.push(om[Uf]),Sp.push(rm[Uf])):Uf===128&&(cg=dp(xf,sp,tp),Xp=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(xf,op,tp),Sp.push(om[Uf]),Sp.push(rm[Uf])),Uf===5?(ig=1-dp(xf,op,up),cg=1-dp(xf,tp,sp),Sp.push(Fg[Uf])):Uf===165?(ig=dp(Mf,up,op),cg=dp(Mf,sp,tp),Sp.push(Fg[Uf])):Uf===20?(Wp=dp(xf,sp,up),lg=dp(xf,tp,op),Sp.push(Qg[Uf])):Uf===150?(Wp=1-dp(Mf,up,sp),lg=1-dp(Mf,op,tp),Sp.push(Qg[Uf])):Uf===80?(Up=dp(xf,up,op),Xp=dp(xf,sp,tp),Sp.push(jg[Uf])):Uf===90?(Up=1-dp(Mf,op,up),Xp=1-dp(Mf,tp,sp),Sp.push(jg[Uf])):Uf===65?(qp=1-dp(xf,up,sp),zp=1-dp(xf,op,tp),Sp.push(Yg[Uf])):Uf===105?(qp=dp(Mf,sp,up),zp=dp(Mf,tp,op),Sp.push(Yg[Uf])):Uf===160?(Up=dp(Mf,up,op),ig=dp(xf,up,op),cg=dp(xf,sp,tp),Xp=dp(Mf,sp,tp),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===10?(Up=1-dp(xf,op,up),ig=1-dp(Mf,op,up),cg=1-dp(Mf,tp,sp),Xp=1-dp(xf,tp,sp),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===130?(Wp=1-dp(xf,up,sp),qp=1-dp(Mf,up,sp),zp=1-dp(Mf,op,tp),lg=1-dp(xf,op,tp),Sp.push(Qg[Uf]),Sp.push(Yg[Uf])):Uf===40?(Wp=dp(Mf,sp,up),qp=dp(xf,sp,up),zp=dp(xf,tp,op),lg=dp(Mf,tp,op),Sp.push(Qg[Uf]),Sp.push(Yg[Uf])):Uf===101?(ig=dp(Mf,up,op),zp=dp(Mf,tp,op),Sp.push(Fg[Uf])):Uf===69?(ig=1-dp(xf,op,up),zp=1-dp(xf,op,tp),Sp.push(Fg[Uf])):Uf===149?(cg=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp),Sp.push(om[Uf])):Uf===21?(cg=1-dp(xf,tp,sp),lg=dp(xf,tp,op),Sp.push(om[Uf])):Uf===86?(Wp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),Sp.push(Qg[Uf])):Uf===84?(Wp=dp(xf,sp,up),Xp=dp(xf,sp,tp),Sp.push(Qg[Uf])):Uf===89?(Up=1-dp(Mf,op,up),qp=dp(Mf,sp,up),Sp.push(Yg[Uf])):Uf===81?(Up=dp(xf,up,op),qp=1-dp(xf,up,sp),Sp.push(Yg[Uf])):Uf===96?(Up=dp(Mf,up,op),ig=dp(xf,up,op),Xp=dp(xf,sp,tp),zp=dp(Mf,tp,op),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===74?(Up=1-dp(xf,op,up),ig=1-dp(Mf,op,up),Xp=1-dp(Mf,tp,sp),zp=1-dp(xf,op,tp),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===24?(Up=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(xf,sp,up),lg=dp(xf,tp,op),Sp.push(jg[Uf]),Sp.push(Yg[Uf])):Uf===146?(Up=dp(xf,up,op),Wp=1-dp(xf,up,sp),qp=1-dp(Mf,up,sp),lg=1-dp(Mf,op,tp),Sp.push(jg[Uf]),Sp.push(Yg[Uf])):Uf===6?(ig=1-dp(xf,op,up),Wp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(xf,tp,sp),Sp.push(Fg[Uf]),Sp.push(Qg[Uf])):Uf===164?(ig=dp(Mf,up,op),Wp=dp(xf,sp,up),cg=dp(xf,sp,tp),Xp=dp(Mf,sp,tp),Sp.push(Fg[Uf]),Sp.push(Qg[Uf])):Uf===129?(qp=1-dp(xf,up,sp),cg=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(xf,op,tp),Sp.push(Yg[Uf]),Sp.push(om[Uf])):Uf===41?(qp=dp(Mf,sp,up),cg=1-dp(xf,tp,sp),zp=dp(xf,tp,op),lg=dp(Mf,tp,op),Sp.push(Yg[Uf]),Sp.push(om[Uf])):Uf===66?(Wp=1-dp(xf,up,sp),qp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),zp=1-dp(xf,op,tp),Sp.push(Qg[Uf]),Sp.push(Yg[Uf])):Uf===104?(Wp=dp(Mf,sp,up),qp=dp(xf,sp,up),Xp=dp(xf,sp,tp),zp=dp(Mf,tp,op),Sp.push(Yg[Uf]),Sp.push(nv[Uf])):Uf===144?(Up=dp(xf,up,op),cg=dp(xf,sp,tp),Xp=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp),Sp.push(jg[Uf]),Sp.push(rm[Uf])):Uf===26?(Up=1-dp(Mf,op,up),cg=1-dp(Mf,tp,sp),Xp=1-dp(xf,tp,sp),lg=dp(xf,tp,op),Sp.push(jg[Uf]),Sp.push(rm[Uf])):Uf===36?(ig=dp(Mf,up,op),Wp=dp(xf,sp,up),zp=dp(xf,tp,op),lg=dp(Mf,tp,op),Sp.push(Fg[Uf]),Sp.push(Qg[Uf])):Uf===134?(ig=1-dp(xf,op,up),Wp=1-dp(Mf,up,sp),zp=1-dp(Mf,op,tp),lg=1-dp(xf,op,tp),Sp.push(Fg[Uf]),Sp.push(Qg[Uf])):Uf===9?(Up=1-dp(xf,op,up),ig=1-dp(Mf,op,up),qp=dp(Mf,sp,up),cg=1-dp(xf,tp,sp),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===161?(Up=dp(Mf,up,op),ig=dp(xf,up,op),qp=1-dp(xf,up,sp),cg=dp(Mf,sp,tp),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===37?(ig=dp(Mf,up,op),cg=1-dp(xf,tp,sp),zp=dp(xf,tp,op),lg=dp(Mf,tp,op),Sp.push(Fg[Uf]),Sp.push(om[Uf])):Uf===133?(ig=1-dp(xf,op,up),cg=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(xf,op,tp),Sp.push(Fg[Uf]),Sp.push(om[Uf])):Uf===148?(Wp=dp(xf,sp,up),cg=dp(xf,sp,tp),Xp=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp),Sp.push(Qg[Uf]),Sp.push(rm[Uf])):Uf===22?(Wp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(xf,tp,sp),lg=dp(xf,tp,op),Sp.push(Qg[Uf]),Sp.push(rm[Uf])):Uf===82?(Up=dp(xf,up,op),Wp=1-dp(xf,up,sp),qp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),Sp.push(jg[Uf]),Sp.push(Yg[Uf])):Uf===88?(Up=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(xf,sp,up),Xp=dp(xf,sp,tp),Sp.push(jg[Uf]),Sp.push(Yg[Uf])):Uf===73?(Up=1-dp(xf,op,up),ig=1-dp(Mf,op,up),qp=dp(Mf,sp,up),zp=1-dp(xf,op,tp),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===97?(Up=dp(Mf,up,op),ig=dp(xf,up,op),qp=1-dp(xf,up,sp),zp=dp(Mf,tp,op),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===145?(Up=dp(xf,up,op),qp=1-dp(xf,up,sp),cg=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp),Sp.push(jg[Uf]),Sp.push(om[Uf])):Uf===25?(Up=1-dp(Mf,op,up),qp=dp(Mf,sp,up),cg=1-dp(xf,tp,sp),lg=dp(xf,tp,op),Sp.push(jg[Uf]),Sp.push(om[Uf])):Uf===70?(ig=1-dp(xf,op,up),Wp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),zp=1-dp(xf,op,tp),Sp.push(Fg[Uf]),Sp.push(Qg[Uf])):Uf===100?(ig=dp(Mf,up,op),Wp=dp(xf,sp,up),Xp=dp(xf,sp,tp),zp=dp(Mf,tp,op),Sp.push(Fg[Uf]),Sp.push(Qg[Uf])):Uf===34?(Ap===0?(Up=1-dp(xf,op,up),ig=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(xf,sp,up),cg=dp(xf,sp,tp),Xp=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(xf,op,tp)):(Up=dp(Mf,up,op),ig=dp(xf,up,op),Wp=1-dp(xf,up,sp),qp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(xf,tp,sp),zp=dp(xf,tp,op),lg=dp(Mf,tp,op)),Sp.push(jg[Uf]),Sp.push(Fg[Uf]),Sp.push(om[Uf]),Sp.push(rm[Uf])):Uf===35?(Ap===4?(Up=1-dp(xf,op,up),ig=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(xf,sp,up),cg=dp(xf,sp,tp),Xp=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(xf,op,tp)):(Up=dp(Mf,up,op),ig=dp(xf,up,op),Wp=1-dp(xf,up,sp),qp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(xf,tp,sp),zp=dp(xf,tp,op),lg=dp(Mf,tp,op)),Sp.push(jg[Uf]),Sp.push(Fg[Uf]),Sp.push(Yg[Uf]),Sp.push(rm[Uf])):Uf===136?(Ap===0?(Up=dp(Mf,up,op),ig=dp(xf,up,op),Wp=1-dp(xf,up,sp),qp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(xf,tp,sp),zp=dp(xf,tp,op),lg=dp(Mf,tp,op)):(Up=1-dp(xf,op,up),ig=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(xf,sp,up),cg=dp(xf,sp,tp),Xp=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(xf,op,tp)),Sp.push(jg[Uf]),Sp.push(Fg[Uf]),Sp.push(om[Uf]),Sp.push(rm[Uf])):Uf===153?(Ap===0?(Up=dp(xf,up,op),qp=1-dp(xf,up,sp),cg=1-dp(xf,tp,sp),lg=dp(xf,tp,op)):(Up=1-dp(Mf,op,up),qp=dp(Mf,sp,up),cg=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp)),Sp.push(jg[Uf]),Sp.push(Yg[Uf])):Uf===102?(Ap===0?(ig=1-dp(xf,op,up),Wp=dp(xf,sp,up),Xp=dp(xf,sp,tp),zp=1-dp(xf,op,tp)):(ig=dp(Mf,up,op),Wp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),zp=dp(Mf,tp,op)),Sp.push(Fg[Uf]),Sp.push(rm[Uf])):Uf===155?(Ap===4?(Up=dp(xf,up,op),qp=1-dp(xf,up,sp),cg=1-dp(xf,tp,sp),lg=dp(xf,tp,op)):(Up=1-dp(Mf,op,up),qp=dp(Mf,sp,up),cg=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp)),Sp.push(jg[Uf]),Sp.push(om[Uf])):Uf===103?(Ap===4?(ig=1-dp(xf,op,up),Wp=dp(xf,sp,up),Xp=dp(xf,sp,tp),zp=1-dp(xf,op,tp)):(ig=dp(Mf,up,op),Wp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),zp=dp(Mf,tp,op)),Sp.push(Fg[Uf]),Sp.push(Qg[Uf])):Uf===152?(Ap===0?(Up=dp(xf,up,op),Wp=1-dp(xf,up,sp),qp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(xf,tp,sp),lg=dp(xf,tp,op)):(Up=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(xf,sp,up),cg=dp(xf,sp,tp),Xp=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp)),Sp.push(jg[Uf]),Sp.push(Qg[Uf]),Sp.push(Yg[Uf])):Uf===156?(Ap===4?(Up=dp(xf,up,op),Wp=1-dp(xf,up,sp),qp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(xf,tp,sp),lg=dp(xf,tp,op)):(Up=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(xf,sp,up),cg=dp(xf,sp,tp),Xp=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp)),Sp.push(jg[Uf]),Sp.push(Yg[Uf]),Sp.push(rm[Uf])):Uf===137?(Ap===0?(Up=dp(Mf,up,op),ig=dp(xf,up,op),qp=1-dp(xf,up,sp),cg=1-dp(xf,tp,sp),zp=dp(xf,tp,op),lg=dp(Mf,tp,op)):(Up=1-dp(xf,op,up),ig=1-dp(Mf,op,up),qp=dp(Mf,sp,up),cg=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(xf,op,tp)),Sp.push(jg[Uf]),Sp.push(Fg[Uf]),Sp.push(Yg[Uf])):Uf===139?(Ap===4?(Up=dp(Mf,up,op),ig=dp(xf,up,op),qp=1-dp(xf,up,sp),cg=1-dp(xf,tp,sp),zp=dp(xf,tp,op),lg=dp(Mf,tp,op)):(Up=1-dp(xf,op,up),ig=1-dp(Mf,op,up),qp=dp(Mf,sp,up),cg=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(xf,op,tp)),Sp.push(jg[Uf]),Sp.push(Fg[Uf]),Sp.push(om[Uf])):Uf===98?(Ap===0?(Up=1-dp(xf,op,up),ig=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(xf,sp,up),Xp=dp(xf,sp,tp),zp=1-dp(xf,op,tp)):(Up=dp(Mf,up,op),ig=dp(xf,up,op),Wp=1-dp(xf,up,sp),qp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),zp=dp(Mf,tp,op)),Sp.push(jg[Uf]),Sp.push(Fg[Uf]),Sp.push(rm[Uf])):Uf===99?(Ap===4?(Up=1-dp(xf,op,up),ig=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(xf,sp,up),Xp=dp(xf,sp,tp),zp=1-dp(xf,op,tp)):(Up=dp(Mf,up,op),ig=dp(xf,up,op),Wp=1-dp(xf,up,sp),qp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),zp=dp(Mf,tp,op)),Sp.push(jg[Uf]),Sp.push(Fg[Uf]),Sp.push(Yg[Uf])):Uf===38?(Ap===0?(ig=1-dp(xf,op,up),Wp=dp(xf,sp,up),cg=dp(xf,sp,tp),Xp=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(xf,op,tp)):(ig=dp(Mf,up,op),Wp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(xf,tp,sp),zp=dp(xf,tp,op),lg=dp(Mf,tp,op)),Sp.push(Fg[Uf]),Sp.push(om[Uf]),Sp.push(rm[Uf])):Uf===39?(Ap===4?(ig=1-dp(xf,op,up),Wp=dp(xf,sp,up),cg=dp(xf,sp,tp),Xp=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(xf,op,tp)):(ig=dp(Mf,up,op),Wp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(xf,tp,sp),zp=dp(xf,tp,op),lg=dp(Mf,tp,op)),Sp.push(Fg[Uf]),Sp.push(Qg[Uf]),Sp.push(rm[Uf])):Uf===85&&(Up=1,ig=0,Wp=1,qp=0,cg=0,Xp=1,zp=0,lg=1),(zp<0||zp>1||lg<0||lg>1||Up<0||Up>1||Wp<0||Wp>1||cg<0||cg>1||Xp<0||Xp>1)&&console.log("MarchingSquaresJS-isoBands: "+Uf+" "+Qp+" "+tp+","+op+","+up+","+sp+" "+Ap+" "+zp+" "+lg+" "+Up+" "+ig+" "+Wp+" "+qp+" "+cg+" "+Xp),Wf.cells[np][pp]={cval:Uf,cval_real:Qp,flipped:Ap,topleft:zp,topright:lg,righttop:Up,rightbottom:ig,bottomright:Wp,bottomleft:qp,leftbottom:cg,lefttop:Xp,edges:Sp}}}}}return Wf}(nt,at,wt);return P1.polygons?(P1.verbose&&console.log("MarchingSquaresJS-isoBands: returning single polygons for each grid cell"),mf=function(Sf){var xf=[],If=0;return Sf.cells.forEach(function(jf,zf){jf.forEach(function(Wf,Mf){if(Wf!==void 0){var np=Ig[Wf.cval](Wf);typeof np=="object"&&fS(np)?typeof np[0]=="object"&&fS(np[0])?typeof np[0][0]=="object"&&fS(np[0][0])?np.forEach(function(pp){pp.forEach(function(Uf){Uf[0]+=Mf,Uf[1]+=zf}),xf[If++]=pp}):(np.forEach(function(pp){pp[0]+=Mf,pp[1]+=zf}),xf[If++]=np):console.log("MarchingSquaresJS-isoBands: bandcell polygon with malformed coordinates"):console.log("MarchingSquaresJS-isoBands: bandcell polygon with null coordinates")}})}),xf}(bf)):(P1.verbose&&console.log("MarchingSquaresJS-isoBands: returning polygon paths for entire data grid"),mf=function(Sf){for(var xf=[],If=Sf.rows,jf=Sf.cols,zf=[],Wf=0;Wf0){var np=jx(Sf.cells[Wf][Mf]),pp=null,Uf=Mf,tp=Wf;np!==null&&zf.push([np.p[0]+Uf,np.p[1]+tp]);do{if((pp=FC(Sf.cells[tp][Uf],np.x,np.y,np.o))===null)break;if(zf.push([pp.p[0]+Uf,pp.p[1]+tp]),Uf+=pp.x,np=pp,(tp+=pp.y)<0||tp>=If||Uf<0||Uf>=jf||Sf.cells[tp][Uf]===void 0){var op=LC(Sf,Uf-=pp.x,tp-=pp.y,pp.x,pp.y,pp.o);if(op===null)break;op.path.forEach(function(up){zf.push(up)}),Uf=op.i,tp=op.j,np=op}}while(Sf.cells[tp][Uf]!==void 0&&Sf.cells[tp][Uf].edges.length>0);xf.push(zf),zf=[],Sf.cells[Wf][Mf].edges.length>0&&Mf--}return xf}(bf)),typeof P1.successCallback=="function"&&P1.successCallback(mf),mf}var vy=64,ib=16,km=[],Gm=[],Fm=[],Pm=[],Am=[],Wm=[],qm=[],Bm=[],Rm=[],Ym=[],Km=[],Xm=[],Zm=[],sm=[],jm=[],zm=[],Jm=[],Em=[],Qm=[],ev=[],tv=[],Nm=[],rv=[],Hm=[];qm[85]=Ym[85]=-1,Bm[85]=Km[85]=0,Rm[85]=Xm[85]=1,Qm[85]=Nm[85]=1,ev[85]=rv[85]=0,tv[85]=Hm[85]=1,km[85]=Pm[85]=0,Gm[85]=Am[85]=-1,Fm[85]=jm[85]=0,zm[85]=Zm[85]=0,Jm[85]=sm[85]=1,Wm[85]=Em[85]=1,Nm[1]=Nm[169]=0,rv[1]=rv[169]=-1,Hm[1]=Hm[169]=0,Zm[1]=Zm[169]=-1,sm[1]=sm[169]=0,jm[1]=jm[169]=0,Ym[4]=Ym[166]=0,Km[4]=Km[166]=-1,Xm[4]=Xm[166]=1,zm[4]=zm[166]=1,Jm[4]=Jm[166]=0,Em[4]=Em[166]=0,qm[16]=qm[154]=0,Bm[16]=Bm[154]=1,Rm[16]=Rm[154]=1,Pm[16]=Pm[154]=1,Am[16]=Am[154]=0,Wm[16]=Wm[154]=1,Qm[64]=Qm[106]=0,ev[64]=ev[106]=1,tv[64]=tv[106]=0,km[64]=km[106]=-1,Gm[64]=Gm[106]=0,Fm[64]=Fm[106]=1,Qm[2]=Qm[168]=0,ev[2]=ev[168]=-1,tv[2]=tv[168]=1,Nm[2]=Nm[168]=0,rv[2]=rv[168]=-1,Hm[2]=Hm[168]=0,Zm[2]=Zm[168]=-1,sm[2]=sm[168]=0,jm[2]=jm[168]=0,zm[2]=zm[168]=-1,Jm[2]=Jm[168]=0,Em[2]=Em[168]=1,qm[8]=qm[162]=0,Bm[8]=Bm[162]=-1,Rm[8]=Rm[162]=0,Ym[8]=Ym[162]=0,Km[8]=Km[162]=-1,Xm[8]=Xm[162]=1,Zm[8]=Zm[162]=1,sm[8]=sm[162]=0,jm[8]=jm[162]=1,zm[8]=zm[162]=1,Jm[8]=Jm[162]=0,Em[8]=Em[162]=0,qm[32]=qm[138]=0,Bm[32]=Bm[138]=1,Rm[32]=Rm[138]=1,Ym[32]=Ym[138]=0,Km[32]=Km[138]=1,Xm[32]=Xm[138]=0,km[32]=km[138]=1,Gm[32]=Gm[138]=0,Fm[32]=Fm[138]=0,Pm[32]=Pm[138]=1,Am[32]=Am[138]=0,Wm[32]=Wm[138]=1,Nm[128]=Nm[42]=0,rv[128]=rv[42]=1,Hm[128]=Hm[42]=1,Qm[128]=Qm[42]=0,ev[128]=ev[42]=1,tv[128]=tv[42]=0,km[128]=km[42]=-1,Gm[128]=Gm[42]=0,Fm[128]=Fm[42]=1,Pm[128]=Pm[42]=-1,Am[128]=Am[42]=0,Wm[128]=Wm[42]=0,Ym[5]=Ym[165]=-1,Km[5]=Km[165]=0,Xm[5]=Xm[165]=0,Nm[5]=Nm[165]=1,rv[5]=rv[165]=0,Hm[5]=Hm[165]=0,zm[20]=zm[150]=0,Jm[20]=Jm[150]=1,Em[20]=Em[150]=1,Pm[20]=Pm[150]=0,Am[20]=Am[150]=-1,Wm[20]=Wm[150]=1,qm[80]=qm[90]=-1,Bm[80]=Bm[90]=0,Rm[80]=Rm[90]=1,Qm[80]=Qm[90]=1,ev[80]=ev[90]=0,tv[80]=tv[90]=1,Zm[65]=Zm[105]=0,sm[65]=sm[105]=1,jm[65]=jm[105]=0,km[65]=km[105]=0,Gm[65]=Gm[105]=-1,Fm[65]=Fm[105]=0,qm[160]=qm[10]=-1,Bm[160]=Bm[10]=0,Rm[160]=Rm[10]=1,Ym[160]=Ym[10]=-1,Km[160]=Km[10]=0,Xm[160]=Xm[10]=0,Nm[160]=Nm[10]=1,rv[160]=rv[10]=0,Hm[160]=Hm[10]=0,Qm[160]=Qm[10]=1,ev[160]=ev[10]=0,tv[160]=tv[10]=1,zm[130]=zm[40]=0,Jm[130]=Jm[40]=1,Em[130]=Em[40]=1,Zm[130]=Zm[40]=0,sm[130]=sm[40]=1,jm[130]=jm[40]=0,km[130]=km[40]=0,Gm[130]=Gm[40]=-1,Fm[130]=Fm[40]=0,Pm[130]=Pm[40]=0,Am[130]=Am[40]=-1,Wm[130]=Wm[40]=1,Ym[37]=Ym[133]=0,Km[37]=Km[133]=1,Xm[37]=Xm[133]=1,Nm[37]=Nm[133]=0,rv[37]=rv[133]=1,Hm[37]=Hm[133]=0,km[37]=km[133]=-1,Gm[37]=Gm[133]=0,Fm[37]=Fm[133]=0,Pm[37]=Pm[133]=1,Am[37]=Am[133]=0,Wm[37]=Wm[133]=0,zm[148]=zm[22]=-1,Jm[148]=Jm[22]=0,Em[148]=Em[22]=0,Nm[148]=Nm[22]=0,rv[148]=rv[22]=-1,Hm[148]=Hm[22]=1,Qm[148]=Qm[22]=0,ev[148]=ev[22]=1,tv[148]=tv[22]=1,Pm[148]=Pm[22]=-1,Am[148]=Am[22]=0,Wm[148]=Wm[22]=1,qm[82]=qm[88]=0,Bm[82]=Bm[88]=-1,Rm[82]=Rm[88]=1,zm[82]=zm[88]=1,Jm[82]=Jm[88]=0,Em[82]=Em[88]=1,Zm[82]=Zm[88]=-1,sm[82]=sm[88]=0,jm[82]=jm[88]=1,Qm[82]=Qm[88]=0,ev[82]=ev[88]=-1,tv[82]=tv[88]=0,qm[73]=qm[97]=0,Bm[73]=Bm[97]=1,Rm[73]=Rm[97]=0,Ym[73]=Ym[97]=0,Km[73]=Km[97]=-1,Xm[73]=Xm[97]=0,Zm[73]=Zm[97]=1,sm[73]=sm[97]=0,jm[73]=jm[97]=0,km[73]=km[97]=1,Gm[73]=Gm[97]=0,Fm[73]=Fm[97]=1,qm[145]=qm[25]=0,Bm[145]=Bm[25]=-1,Rm[145]=Rm[25]=0,Zm[145]=Zm[25]=1,sm[145]=sm[25]=0,jm[145]=jm[25]=1,Nm[145]=Nm[25]=0,rv[145]=rv[25]=1,Hm[145]=Hm[25]=1,Pm[145]=Pm[25]=-1,Am[145]=Am[25]=0,Wm[145]=Wm[25]=0,Ym[70]=Ym[100]=0,Km[70]=Km[100]=1,Xm[70]=Xm[100]=0,zm[70]=zm[100]=-1,Jm[70]=Jm[100]=0,Em[70]=Em[100]=1,Qm[70]=Qm[100]=0,ev[70]=ev[100]=-1,tv[70]=tv[100]=1,km[70]=km[100]=1,Gm[70]=Gm[100]=0,Fm[70]=Fm[100]=0,Ym[101]=Ym[69]=0,Km[101]=Km[69]=1,Xm[101]=Xm[69]=0,km[101]=km[69]=1,Gm[101]=Gm[69]=0,Fm[101]=Fm[69]=0,Nm[149]=Nm[21]=0,rv[149]=rv[21]=1,Hm[149]=Hm[21]=1,Pm[149]=Pm[21]=-1,Am[149]=Am[21]=0,Wm[149]=Wm[21]=0,zm[86]=zm[84]=-1,Jm[86]=Jm[84]=0,Em[86]=Em[84]=1,Qm[86]=Qm[84]=0,ev[86]=ev[84]=-1,tv[86]=tv[84]=1,qm[89]=qm[81]=0,Bm[89]=Bm[81]=-1,Rm[89]=Rm[81]=0,Zm[89]=Zm[81]=1,sm[89]=sm[81]=0,jm[89]=jm[81]=1,qm[96]=qm[74]=0,Bm[96]=Bm[74]=1,Rm[96]=Rm[74]=0,Ym[96]=Ym[74]=-1,Km[96]=Km[74]=0,Xm[96]=Xm[74]=1,Qm[96]=Qm[74]=1,ev[96]=ev[74]=0,tv[96]=tv[74]=0,km[96]=km[74]=1,Gm[96]=Gm[74]=0,Fm[96]=Fm[74]=1,qm[24]=qm[146]=0,Bm[24]=Bm[146]=-1,Rm[24]=Rm[146]=1,zm[24]=zm[146]=1,Jm[24]=Jm[146]=0,Em[24]=Em[146]=1,Zm[24]=Zm[146]=0,sm[24]=sm[146]=1,jm[24]=jm[146]=1,Pm[24]=Pm[146]=0,Am[24]=Am[146]=-1,Wm[24]=Wm[146]=0,Ym[6]=Ym[164]=-1,Km[6]=Km[164]=0,Xm[6]=Xm[164]=1,zm[6]=zm[164]=-1,Jm[6]=Jm[164]=0,Em[6]=Em[164]=0,Nm[6]=Nm[164]=0,rv[6]=rv[164]=-1,Hm[6]=Hm[164]=1,Qm[6]=Qm[164]=1,ev[6]=ev[164]=0,tv[6]=tv[164]=0,Zm[129]=Zm[41]=0,sm[129]=sm[41]=1,jm[129]=jm[41]=1,Nm[129]=Nm[41]=0,rv[129]=rv[41]=1,Hm[129]=Hm[41]=0,km[129]=km[41]=-1,Gm[129]=Gm[41]=0,Fm[129]=Fm[41]=0,Pm[129]=Pm[41]=0,Am[129]=Am[41]=-1,Wm[129]=Wm[41]=0,zm[66]=zm[104]=0,Jm[66]=Jm[104]=1,Em[66]=Em[104]=0,Zm[66]=Zm[104]=-1,sm[66]=sm[104]=0,jm[66]=jm[104]=1,Qm[66]=Qm[104]=0,ev[66]=ev[104]=-1,tv[66]=tv[104]=0,km[66]=km[104]=0,Gm[66]=Gm[104]=-1,Fm[66]=Fm[104]=1,qm[144]=qm[26]=-1,Bm[144]=Bm[26]=0,Rm[144]=Rm[26]=0,Nm[144]=Nm[26]=1,rv[144]=rv[26]=0,Hm[144]=Hm[26]=1,Qm[144]=Qm[26]=0,ev[144]=ev[26]=1,tv[144]=tv[26]=1,Pm[144]=Pm[26]=-1,Am[144]=Am[26]=0,Wm[144]=Wm[26]=1,Ym[36]=Ym[134]=0,Km[36]=Km[134]=1,Xm[36]=Xm[134]=1,zm[36]=zm[134]=0,Jm[36]=Jm[134]=1,Em[36]=Em[134]=0,km[36]=km[134]=0,Gm[36]=Gm[134]=-1,Fm[36]=Fm[134]=1,Pm[36]=Pm[134]=1,Am[36]=Am[134]=0,Wm[36]=Wm[134]=0,qm[9]=qm[161]=-1,Bm[9]=Bm[161]=0,Rm[9]=Rm[161]=0,Ym[9]=Ym[161]=0,Km[9]=Km[161]=-1,Xm[9]=Xm[161]=0,Zm[9]=Zm[161]=1,sm[9]=sm[161]=0,jm[9]=jm[161]=0,Nm[9]=Nm[161]=1,rv[9]=rv[161]=0,Hm[9]=Hm[161]=1,qm[136]=0,Bm[136]=1,Rm[136]=1,Ym[136]=0,Km[136]=1,Xm[136]=0,zm[136]=-1,Jm[136]=0,Em[136]=1,Zm[136]=-1,sm[136]=0,jm[136]=0,Nm[136]=0,rv[136]=-1,Hm[136]=0,Qm[136]=0,ev[136]=-1,tv[136]=1,km[136]=1,Gm[136]=0,Fm[136]=0,Pm[136]=1,Am[136]=0,Wm[136]=1,qm[34]=0,Bm[34]=-1,Rm[34]=0,Ym[34]=0,Km[34]=-1,Xm[34]=1,zm[34]=1,Jm[34]=0,Em[34]=0,Zm[34]=1,sm[34]=0,jm[34]=1,Nm[34]=0,rv[34]=1,Hm[34]=1,Qm[34]=0,ev[34]=1,tv[34]=0,km[34]=-1,Gm[34]=0,Fm[34]=1,Pm[34]=-1,Am[34]=0,Wm[34]=0,qm[35]=0,Bm[35]=1,Rm[35]=1,Ym[35]=0,Km[35]=-1,Xm[35]=1,zm[35]=1,Jm[35]=0,Em[35]=0,Zm[35]=-1,sm[35]=0,jm[35]=0,Nm[35]=0,rv[35]=-1,Hm[35]=0,Qm[35]=0,ev[35]=1,tv[35]=0,km[35]=-1,Gm[35]=0,Fm[35]=1,Pm[35]=1,Am[35]=0,Wm[35]=1,qm[153]=0,Bm[153]=1,Rm[153]=1,Zm[153]=-1,sm[153]=0,jm[153]=0,Nm[153]=0,rv[153]=-1,Hm[153]=0,Pm[153]=1,Am[153]=0,Wm[153]=1,Ym[102]=0,Km[102]=-1,Xm[102]=1,zm[102]=1,Jm[102]=0,Em[102]=0,Qm[102]=0,ev[102]=1,tv[102]=0,km[102]=-1,Gm[102]=0,Fm[102]=1,qm[155]=0,Bm[155]=-1,Rm[155]=0,Zm[155]=1,sm[155]=0,jm[155]=1,Nm[155]=0,rv[155]=1,Hm[155]=1,Pm[155]=-1,Am[155]=0,Wm[155]=0,Ym[103]=0,Km[103]=1,Xm[103]=0,zm[103]=-1,Jm[103]=0,Em[103]=1,Qm[103]=0,ev[103]=-1,tv[103]=1,km[103]=1,Gm[103]=0,Fm[103]=0,qm[152]=0,Bm[152]=1,Rm[152]=1,zm[152]=-1,Jm[152]=0,Em[152]=1,Zm[152]=-1,sm[152]=0,jm[152]=0,Nm[152]=0,rv[152]=-1,Hm[152]=0,Qm[152]=0,ev[152]=-1,tv[152]=1,Pm[152]=1,Am[152]=0,Wm[152]=1,qm[156]=0,Bm[156]=-1,Rm[156]=1,zm[156]=1,Jm[156]=0,Em[156]=1,Zm[156]=-1,sm[156]=0,jm[156]=0,Nm[156]=0,rv[156]=-1,Hm[156]=0,Qm[156]=0,ev[156]=1,tv[156]=1,Pm[156]=-1,Am[156]=0,Wm[156]=1,qm[137]=0,Bm[137]=1,Rm[137]=1,Ym[137]=0,Km[137]=1,Xm[137]=0,Zm[137]=-1,sm[137]=0,jm[137]=0,Nm[137]=0,rv[137]=-1,Hm[137]=0,km[137]=1,Gm[137]=0,Fm[137]=0,Pm[137]=1,Am[137]=0,Wm[137]=1,qm[139]=0,Bm[139]=1,Rm[139]=1,Ym[139]=0,Km[139]=-1,Xm[139]=0,Zm[139]=1,sm[139]=0,jm[139]=0,Nm[139]=0,rv[139]=1,Hm[139]=0,km[139]=-1,Gm[139]=0,Fm[139]=0,Pm[139]=1,Am[139]=0,Wm[139]=1,qm[98]=0,Bm[98]=-1,Rm[98]=0,Ym[98]=0,Km[98]=-1,Xm[98]=1,zm[98]=1,Jm[98]=0,Em[98]=0,Zm[98]=1,sm[98]=0,jm[98]=1,Qm[98]=0,ev[98]=1,tv[98]=0,km[98]=-1,Gm[98]=0,Fm[98]=1,qm[99]=0,Bm[99]=1,Rm[99]=0,Ym[99]=0,Km[99]=-1,Xm[99]=1,zm[99]=1,Jm[99]=0,Em[99]=0,Zm[99]=-1,sm[99]=0,jm[99]=1,Qm[99]=0,ev[99]=-1,tv[99]=0,km[99]=1,Gm[99]=0,Fm[99]=1,Ym[38]=0,Km[38]=-1,Xm[38]=1,zm[38]=1,Jm[38]=0,Em[38]=0,Nm[38]=0,rv[38]=1,Hm[38]=1,Qm[38]=0,ev[38]=1,tv[38]=0,km[38]=-1,Gm[38]=0,Fm[38]=1,Pm[38]=-1,Am[38]=0,Wm[38]=0,Ym[39]=0,Km[39]=1,Xm[39]=1,zm[39]=-1,Jm[39]=0,Em[39]=0,Nm[39]=0,rv[39]=-1,Hm[39]=1,Qm[39]=0,ev[39]=1,tv[39]=0,km[39]=-1,Gm[39]=0,Fm[39]=1,Pm[39]=1,Am[39]=0,Wm[39]=0;var aS=function(nt){return[[nt.bottomleft,0],[0,0],[0,nt.leftbottom]]},sS=function(nt){return[[1,nt.rightbottom],[1,0],[nt.bottomright,0]]},K2=function(nt){return[[nt.topright,1],[1,1],[1,nt.righttop]]},lS=function(nt){return[[0,nt.lefttop],[0,1],[nt.topleft,1]]},cS=function(nt){return[[nt.bottomright,0],[nt.bottomleft,0],[0,nt.leftbottom],[0,nt.lefttop]]},uS=function(nt){return[[nt.bottomright,0],[nt.bottomleft,0],[1,nt.righttop],[1,nt.rightbottom]]},hS=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[nt.topleft,1],[nt.topright,1]]},dS=function(nt){return[[0,nt.leftbottom],[0,nt.lefttop],[nt.topleft,1],[nt.topright,1]]},jg=[],Fg=[],Qg=[],Yg=[],om=[],rm=[],nv=[],Um=[];Yg[1]=om[1]=18,Yg[169]=om[169]=18,Qg[4]=Fg[4]=12,Qg[166]=Fg[166]=12,jg[16]=Um[16]=4,jg[154]=Um[154]=4,rm[64]=nv[64]=22,rm[106]=nv[106]=22,Qg[2]=rm[2]=17,Yg[2]=om[2]=18,Qg[168]=rm[168]=17,Yg[168]=om[168]=18,jg[8]=Yg[8]=9,Fg[8]=Qg[8]=12,jg[162]=Yg[162]=9,Fg[162]=Qg[162]=12,jg[32]=Um[32]=4,Fg[32]=nv[32]=1,jg[138]=Um[138]=4,Fg[138]=nv[138]=1,om[128]=Um[128]=21,rm[128]=nv[128]=22,om[42]=Um[42]=21,rm[42]=nv[42]=22,Fg[5]=om[5]=14,Fg[165]=om[165]=14,Qg[20]=Um[20]=6,Qg[150]=Um[150]=6,jg[80]=rm[80]=11,jg[90]=rm[90]=11,Yg[65]=nv[65]=3,Yg[105]=nv[105]=3,jg[160]=rm[160]=11,Fg[160]=om[160]=14,jg[10]=rm[10]=11,Fg[10]=om[10]=14,Qg[130]=Um[130]=6,Yg[130]=nv[130]=3,Qg[40]=Um[40]=6,Yg[40]=nv[40]=3,Fg[101]=nv[101]=1,Fg[69]=nv[69]=1,om[149]=Um[149]=21,om[21]=Um[21]=21,Qg[86]=rm[86]=17,Qg[84]=rm[84]=17,jg[89]=Yg[89]=9,jg[81]=Yg[81]=9,jg[96]=nv[96]=0,Fg[96]=rm[96]=15,jg[74]=nv[74]=0,Fg[74]=rm[74]=15,jg[24]=Qg[24]=8,Yg[24]=Um[24]=7,jg[146]=Qg[146]=8,Yg[146]=Um[146]=7,Fg[6]=rm[6]=15,Qg[6]=om[6]=16,Fg[164]=rm[164]=15,Qg[164]=om[164]=16,Yg[129]=Um[129]=7,om[129]=nv[129]=20,Yg[41]=Um[41]=7,om[41]=nv[41]=20,Qg[66]=nv[66]=2,Yg[66]=rm[66]=19,Qg[104]=nv[104]=2,Yg[104]=rm[104]=19,jg[144]=om[144]=10,rm[144]=Um[144]=23,jg[26]=om[26]=10,rm[26]=Um[26]=23,Fg[36]=Um[36]=5,Qg[36]=nv[36]=2,Fg[134]=Um[134]=5,Qg[134]=nv[134]=2,jg[9]=om[9]=10,Fg[9]=Yg[9]=13,jg[161]=om[161]=10,Fg[161]=Yg[161]=13,Fg[37]=Um[37]=5,om[37]=nv[37]=20,Fg[133]=Um[133]=5,om[133]=nv[133]=20,Qg[148]=om[148]=16,rm[148]=Um[148]=23,Qg[22]=om[22]=16,rm[22]=Um[22]=23,jg[82]=Qg[82]=8,Yg[82]=rm[82]=19,jg[88]=Qg[88]=8,Yg[88]=rm[88]=19,jg[73]=nv[73]=0,Fg[73]=Yg[73]=13,jg[97]=nv[97]=0,Fg[97]=Yg[97]=13,jg[145]=Yg[145]=9,om[145]=Um[145]=21,jg[25]=Yg[25]=9,om[25]=Um[25]=21,Fg[70]=nv[70]=1,Qg[70]=rm[70]=17,Fg[100]=nv[100]=1,Qg[100]=rm[100]=17,jg[34]=Yg[34]=9,Fg[34]=Qg[34]=12,om[34]=Um[34]=21,rm[34]=nv[34]=22,jg[136]=Um[136]=4,Fg[136]=nv[136]=1,Qg[136]=rm[136]=17,Yg[136]=om[136]=18,jg[35]=Um[35]=4,Fg[35]=Qg[35]=12,Yg[35]=om[35]=18,rm[35]=nv[35]=22,jg[153]=Um[153]=4,Yg[153]=om[153]=18,Fg[102]=Qg[102]=12,rm[102]=nv[102]=22,jg[155]=Yg[155]=9,om[155]=Um[155]=23,Fg[103]=nv[103]=1,Qg[103]=rm[103]=17,jg[152]=Um[152]=4,Qg[152]=rm[152]=17,Yg[152]=om[152]=18,jg[156]=Qg[156]=8,Yg[156]=om[156]=18,rm[156]=Um[156]=23,jg[137]=Um[137]=4,Fg[137]=nv[137]=1,Yg[137]=om[137]=18,jg[139]=Um[139]=4,Fg[139]=Yg[139]=13,om[139]=nv[139]=20,jg[98]=Yg[98]=9,Fg[98]=Qg[98]=12,rm[98]=nv[98]=22,jg[99]=nv[99]=0,Fg[99]=Qg[99]=12,Yg[99]=rm[99]=19,Fg[38]=Qg[38]=12,om[38]=Um[38]=21,rm[38]=nv[38]=22,Fg[39]=Um[39]=5,Qg[39]=om[39]=16,rm[39]=nv[39]=22;var Ig=[];function dp(nt,at,wt){return(nt-at)/(wt-at)}function fS(nt){return nt.constructor.toString().indexOf("Array")>-1}function LC(nt,at,wt,lo,fo,vo){for(var ls=nt.cells[wt][at],ff=ls.cval_real,mf=at+lo,bf=wt+fo,Sf=[],xf=!1;!xf;){if(nt.cells[bf]===void 0||nt.cells[bf][mf]===void 0)if(bf-=fo,mf-=lo,ff=(ls=nt.cells[bf][mf]).cval_real,fo===-1)if(vo===0)if(1&ff)Sf.push([mf,bf]),lo=-1,fo=0,vo=0;else{if(!(4&ff)){Sf.push([mf+ls.bottomright,bf]),lo=0,fo=1,vo=1,xf=!0;break}Sf.push([mf+1,bf]),lo=1,fo=0,vo=0}else{if(!(1&ff)){if(4&ff){Sf.push([mf+ls.bottomright,bf]),lo=0,fo=1,vo=1,xf=!0;break}Sf.push([mf+ls.bottomleft,bf]),lo=0,fo=1,vo=0,xf=!0;break}Sf.push([mf,bf]),lo=-1,fo=0,vo=0}else if(fo===1)if(vo===0){if(!(ff&ib)){if(ff&vy){Sf.push([mf+ls.topleft,bf+1]),lo=0,fo=-1,vo=0,xf=!0;break}Sf.push([mf+ls.topright,bf+1]),lo=0,fo=-1,vo=1,xf=!0;break}Sf.push([mf+1,bf+1]),lo=1,fo=0,vo=1}else Sf.push([mf+1,bf+1]),lo=1,fo=0,vo=1;else if(lo===-1)if(vo===0){if(!(ff&vy)){if(1&ff){Sf.push([mf,bf+ls.leftbottom]),lo=1,fo=0,vo=0,xf=!0;break}Sf.push([mf,bf+ls.lefttop]),lo=1,fo=0,vo=1,xf=!0;break}Sf.push([mf,bf+1]),lo=0,fo=1,vo=0}else{if(!(ff&vy)){console.log("MarchingSquaresJS-isoBands: wtf");break}Sf.push([mf,bf+1]),lo=0,fo=1,vo=0}else{if(lo!==1){console.log("MarchingSquaresJS-isoBands: we came from nowhere!");break}if(vo===0){if(!(4&ff)){Sf.push([mf+1,bf+ls.rightbottom]),lo=-1,fo=0,vo=0,xf=!0;break}Sf.push([mf+1,bf]),lo=0,fo=-1,vo=1}else{if(!(4&ff)){if(ff&ib){Sf.push([mf+1,bf+ls.righttop]),lo=-1,fo=0,vo=1;break}Sf.push([mf+1,bf+ls.rightbottom]),lo=-1,fo=0,vo=0,xf=!0;break}Sf.push([mf+1,bf]),lo=0,fo=-1,vo=1}}else if(ff=(ls=nt.cells[bf][mf]).cval_real,lo===-1)if(vo===0)if(nt.cells[bf-1]!==void 0&&nt.cells[bf-1][mf]!==void 0)lo=0,fo=-1,vo=1;else{if(!(1&ff)){Sf.push([mf+ls.bottomright,bf]),lo=0,fo=1,vo=1,xf=!0;break}Sf.push([mf,bf])}else{if(!(ff&vy)){console.log("MarchingSquaresJS-isoBands: found entry from top at "+mf+","+bf);break}console.log("MarchingSquaresJS-isoBands: proceeding in x-direction!")}else if(lo===1){if(vo===0){console.log("MarchingSquaresJS-isoBands: wtf");break}if(nt.cells[bf+1]!==void 0&&nt.cells[bf+1][mf]!==void 0)lo=0,fo=1,vo=0;else{if(!(ff&ib)){Sf.push([mf+ls.topleft,bf+1]),lo=0,fo=-1,vo=0,xf=!0;break}Sf.push([mf+1,bf+1]),lo=1,fo=0,vo=1}}else if(fo===-1){if(vo!==1){console.log("MarchingSquaresJS-isoBands: wtf");break}if(nt.cells[bf][mf+1]!==void 0)lo=1,fo=0,vo=1;else{if(!(4&ff)){Sf.push([mf+1,bf+ls.righttop]),lo=-1,fo=0,vo=1,xf=!0;break}Sf.push([mf+1,bf]),lo=0,fo=-1,vo=1}}else{if(fo!==1){console.log("MarchingSquaresJS-isoBands: where did we came from???");break}if(vo!==0){console.log("MarchingSquaresJS-isoBands: wtf");break}if(nt.cells[bf][mf-1]!==void 0)lo=-1,fo=0,vo=0;else{if(!(ff&vy)){Sf.push([mf,bf+ls.leftbottom]),lo=1,fo=0,vo=0,xf=!0;break}Sf.push([mf,bf+1]),lo=0,fo=1,vo=0}}if(bf+=fo,(mf+=lo)===at&&bf===wt)break}return{path:Sf,i:mf,j:bf,x:lo,y:fo,o:vo}}function jx(nt){if(nt.edges.length>0){var at=nt.edges[nt.edges.length-1],wt=nt.cval_real;switch(at){case 0:return wt&ib?{p:[1,nt.righttop],x:-1,y:0,o:1}:{p:[nt.topleft,1],x:0,y:-1,o:0};case 1:return 4&wt?{p:[nt.topleft,1],x:0,y:-1,o:0}:{p:[1,nt.rightbottom],x:-1,y:0,o:0};case 2:return 4&wt?{p:[nt.bottomright,0],x:0,y:1,o:1}:{p:[nt.topleft,1],x:0,y:-1,o:0};case 3:return 1&wt?{p:[nt.topleft,1],x:0,y:-1,o:0}:{p:[nt.bottomleft,0],x:0,y:1,o:0};case 4:return wt&ib?{p:[1,nt.righttop],x:-1,y:0,o:1}:{p:[nt.topright,1],x:0,y:-1,o:1};case 5:return 4&wt?{p:[nt.topright,1],x:0,y:-1,o:1}:{p:[1,nt.rightbottom],x:-1,y:0,o:0};case 6:return 4&wt?{p:[nt.bottomright,0],x:0,y:1,o:1}:{p:[nt.topright,1],x:0,y:-1,o:1};case 7:return 1&wt?{p:[nt.topright,1],x:0,y:-1,o:1}:{p:[nt.bottomleft,0],x:0,y:1,o:0};case 8:return 4&wt?{p:[nt.bottomright,0],x:0,y:1,o:1}:{p:[1,nt.righttop],x:-1,y:0,o:1};case 9:return 1&wt?{p:[1,nt.righttop],x:-1,y:0,o:1}:{p:[nt.bottomleft,0],x:0,y:1,o:0};case 10:return 1&wt?{p:[0,nt.leftbottom],x:1,y:0,o:0}:{p:[1,nt.righttop],x:-1,y:0,o:1};case 11:return wt&vy?{p:[1,nt.righttop],x:-1,y:0,o:1}:{p:[0,nt.lefttop],x:1,y:0,o:1};case 12:return 4&wt?{p:[nt.bottomright,0],x:0,y:1,o:1}:{p:[1,nt.rightbottom],x:-1,y:0,o:0};case 13:return 1&wt?{p:[1,nt.rightbottom],x:-1,y:0,o:0}:{p:[nt.bottomleft,0],x:0,y:1,o:0};case 14:return 1&wt?{p:[0,nt.leftbottom],x:1,y:0,o:0}:{p:[1,nt.rightbottom],x:-1,y:0,o:0};case 15:return wt&vy?{p:[1,nt.rightbottom],x:-1,y:0,o:0}:{p:[0,nt.lefttop],x:1,y:0,o:1};case 16:return 4&wt?{p:[nt.bottomright,0],x:0,y:1,o:1}:{p:[0,nt.leftbottom],x:1,y:0,o:0};case 17:return wt&vy?{p:[nt.bottomright,0],x:0,y:1,o:1}:{p:[0,nt.lefttop],x:1,y:0,o:1};case 18:return 1&wt?{p:[0,nt.leftbottom],x:1,y:0,o:0}:{p:[nt.bottomleft,0],x:0,y:1,o:0};case 19:return wt&vy?{p:[nt.bottomleft,0],x:0,y:1,o:0}:{p:[0,nt.lefttop],x:1,y:0,o:1};case 20:return wt&vy?{p:[nt.topleft,1],x:0,y:-1,o:0}:{p:[0,nt.leftbottom],x:1,y:0,o:0};case 21:return wt&ib?{p:[0,nt.leftbottom],x:1,y:0,o:0}:{p:[nt.topright,1],x:0,y:-1,o:1};case 22:return wt&vy?{p:[nt.topleft,1],x:0,y:-1,o:0}:{p:[0,nt.lefttop],x:1,y:0,o:1};case 23:return wt&ib?{p:[0,nt.lefttop],x:1,y:0,o:1}:{p:[nt.topright,1],x:0,y:-1,o:1};default:console.log("MarchingSquaresJS-isoBands: edge index out of range!"),console.log(nt)}}return null}function FC(nt,at,wt,lo){var fo,vo,ls,ff,mf,bf=nt.cval;switch(at){case-1:switch(lo){case 0:fo=Fg[bf],ls=Ym[bf],ff=Km[bf],mf=Xm[bf];break;default:fo=jg[bf],ls=qm[bf],ff=Bm[bf],mf=Rm[bf]}break;case 1:switch(lo){case 0:fo=om[bf],ls=Nm[bf],ff=rv[bf],mf=Hm[bf];break;default:fo=rm[bf],ls=Qm[bf],ff=ev[bf],mf=tv[bf]}break;default:switch(wt){case-1:switch(lo){case 0:fo=nv[bf],ls=km[bf],ff=Gm[bf],mf=Fm[bf];break;default:fo=Um[bf],ls=Pm[bf],ff=Am[bf],mf=Wm[bf]}break;case 1:switch(lo){case 0:fo=Yg[bf],ls=Zm[bf],ff=sm[bf],mf=jm[bf];break;default:fo=Qg[bf],ls=zm[bf],ff=Jm[bf],mf=Em[bf]}}}if(vo=nt.edges.indexOf(fo),nt.edges[vo]===void 0)return null;switch(function(Sf,xf){delete Sf.edges[xf];for(var If=xf+1;If0){var Sf=lo[mf-1],xf=pS(bf,Sf);xf!==!1&&(Sf[1]=xf,bf[0]=xf),ls.push(Sf[0]),mf===vo.length-2&&(ls.push(bf[0]),ls.push(bf[1]))}vo.length===2&&(ls.push(bf[0]),ls.push(bf[1]))}var If,jf,zf,Wf,Mf,np,pp,Uf}),po(ls,nt.properties)}function gS(nt,at,wt){var lo=at[0]-nt[0],fo=at[1]-nt[1],vo=wt[0]-at[0];return function(ls){return(ls>0)-(ls<0)||+ls}(lo*(wt[1]-at[1])-vo*fo)}function mS(nt,at){return at.geometry.coordinates[0].every(function(wt){return cm(ot(wt),nt)})}Ig[1]=Ig[169]=aS,Ig[4]=Ig[166]=sS,Ig[16]=Ig[154]=K2,Ig[64]=Ig[106]=lS,Ig[168]=Ig[2]=cS,Ig[162]=Ig[8]=uS,Ig[138]=Ig[32]=hS,Ig[42]=Ig[128]=dS,Ig[5]=Ig[165]=function(nt){return[[0,0],[0,nt.leftbottom],[1,nt.rightbottom],[1,0]]},Ig[20]=Ig[150]=function(nt){return[[1,0],[nt.bottomright,0],[nt.topright,1],[1,1]]},Ig[80]=Ig[90]=function(nt){return[[1,1],[1,nt.righttop],[0,nt.lefttop],[0,1]]},Ig[65]=Ig[105]=function(nt){return[[nt.bottomleft,0],[0,0],[0,1],[nt.topleft,1]]},Ig[160]=Ig[10]=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[0,nt.leftbottom],[0,nt.lefttop]]},Ig[130]=Ig[40]=function(nt){return[[nt.topleft,1],[nt.topright,1],[nt.bottomright,0],[nt.bottomleft,0]]},Ig[85]=function(){return[[0,0],[0,1],[1,1],[1,0]]},Ig[101]=Ig[69]=function(nt){return[[1,nt.rightbottom],[1,0],[0,0],[0,1],[nt.topleft,1]]},Ig[149]=Ig[21]=function(nt){return[[nt.topright,1],[1,1],[1,0],[0,0],[0,nt.leftbottom]]},Ig[86]=Ig[84]=function(nt){return[[1,0],[nt.bottomright,0],[0,nt.lefttop],[0,1],[1,1]]},Ig[89]=Ig[81]=function(nt){return[[1,1],[1,nt.righttop],[nt.bottomleft,0],[0,0],[0,1]]},Ig[96]=Ig[74]=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[0,nt.lefttop],[0,1],[nt.topleft,1]]},Ig[24]=Ig[146]=function(nt){return[[1,1],[1,nt.righttop],[nt.bottomright,0],[nt.bottomleft,0],[nt.topright,1]]},Ig[6]=Ig[164]=function(nt){return[[1,nt.rightbottom],[1,0],[nt.bottomright,0],[0,nt.leftbottom],[0,nt.lefttop]]},Ig[129]=Ig[41]=function(nt){return[[nt.topright,1],[nt.bottomleft,0],[0,0],[0,nt.leftbottom],[nt.topleft,1]]},Ig[66]=Ig[104]=function(nt){return[[nt.bottomright,0],[nt.bottomleft,0],[0,nt.lefttop],[0,1],[nt.topleft,1]]},Ig[144]=Ig[26]=function(nt){return[[1,1],[1,nt.righttop],[0,nt.leftbottom],[0,nt.lefttop],[nt.topright,1]]},Ig[36]=Ig[134]=function(nt){return[[1,nt.rightbottom],[1,0],[nt.bottomright,0],[nt.topleft,1],[nt.topright,1]]},Ig[9]=Ig[161]=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[nt.bottomleft,0],[0,0],[0,nt.leftbottom]]},Ig[37]=Ig[133]=function(nt){return[[1,nt.rightbottom],[1,0],[0,0],[0,nt.leftbottom],[nt.topleft,1],[nt.topright,1]]},Ig[148]=Ig[22]=function(nt){return[[1,1],[1,0],[nt.bottomright,0],[0,nt.leftbottom],[0,nt.lefttop],[nt.topright,1]]},Ig[82]=Ig[88]=function(nt){return[[1,1],[1,nt.righttop],[nt.bottomright,0],[nt.bottomleft,0],[0,nt.lefttop],[0,1]]},Ig[73]=Ig[97]=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[nt.bottomleft,0],[0,0],[0,1],[nt.topleft,1]]},Ig[145]=Ig[25]=function(nt){return[[1,1],[1,nt.righttop],[nt.bottomleft,0],[0,0],[0,nt.leftbottom],[nt.topright,1]]},Ig[70]=Ig[100]=function(nt){return[[1,nt.rightbottom],[1,0],[nt.bottomright,0],[0,nt.lefttop],[0,1],[nt.topleft,1]]},Ig[34]=function(nt){return[dS(nt),uS(nt)]},Ig[35]=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[nt.bottomright,0],[nt.bottomleft,0],[0,nt.leftbottom],[0,nt.lefttop],[nt.topleft,1],[nt.topright,1]]},Ig[136]=function(nt){return[hS(nt),cS(nt)]},Ig[153]=function(nt){return[K2(nt),aS(nt)]},Ig[102]=function(nt){return[sS(nt),lS(nt)]},Ig[155]=function(nt){return[[1,1],[1,nt.righttop],[nt.bottomleft,0],[0,0],[0,nt.leftbottom],[nt.topright,1]]},Ig[103]=function(nt){return[[1,nt.rightbottom],[1,0],[nt.bottomright,0],[0,nt.lefttop],[0,1],[nt.topleft,1]]},Ig[152]=function(nt){return[K2(nt),cS(nt)]},Ig[156]=function(nt){return[[1,1],[1,nt.righttop],[nt.bottomright,0],[nt.bottomleft,0],[0,nt.leftbottom],[0,nt.lefttop],[nt.topright,1]]},Ig[137]=function(nt){return[hS(nt),aS(nt)]},Ig[139]=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[nt.bottomleft,0],[0,0],[0,nt.leftbottom],[nt.topleft,1],[nt.topright,1]]},Ig[98]=function(nt){return[uS(nt),lS(nt)]},Ig[99]=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[nt.bottomright,0],[nt.bottomleft,0],[0,nt.lefttop],[0,1],[nt.topleft,1]]},Ig[38]=function(nt){return[sS(nt),dS(nt)]},Ig[39]=function(nt){return[[1,nt.rightbottom],[1,0],[nt.bottomright,0],[0,nt.leftbottom],[0,nt.lefttop],[nt.topleft,1],[nt.topright,1]]};var X2=function(){function nt(at){this.id=nt.buildId(at),this.coordinates=at,this.innerEdges=[],this.outerEdges=[],this.outerEdgesSorted=!1}return nt.buildId=function(at){return at.join(",")},nt.prototype.removeInnerEdge=function(at){this.innerEdges=this.innerEdges.filter(function(wt){return wt.from.id!==at.from.id})},nt.prototype.removeOuterEdge=function(at){this.outerEdges=this.outerEdges.filter(function(wt){return wt.to.id!==at.to.id})},nt.prototype.addOuterEdge=function(at){this.outerEdges.push(at),this.outerEdgesSorted=!1},nt.prototype.sortOuterEdges=function(){var at=this;this.outerEdgesSorted||(this.outerEdges.sort(function(wt,lo){var fo=wt.to,vo=lo.to;if(fo.coordinates[0]-at.coordinates[0]>=0&&vo.coordinates[0]-at.coordinates[0]<0)return 1;if(fo.coordinates[0]-at.coordinates[0]<0&&vo.coordinates[0]-at.coordinates[0]>=0)return-1;if(fo.coordinates[0]-at.coordinates[0]==0&&vo.coordinates[0]-at.coordinates[0]==0)return fo.coordinates[1]-at.coordinates[1]>=0||vo.coordinates[1]-at.coordinates[1]>=0?fo.coordinates[1]-vo.coordinates[1]:vo.coordinates[1]-fo.coordinates[1];var ls=gS(at.coordinates,fo.coordinates,vo.coordinates);return ls<0?1:ls>0?-1:Math.pow(fo.coordinates[0]-at.coordinates[0],2)+Math.pow(fo.coordinates[1]-at.coordinates[1],2)-(Math.pow(vo.coordinates[0]-at.coordinates[0],2)+Math.pow(vo.coordinates[1]-at.coordinates[1],2))}),this.outerEdgesSorted=!0)},nt.prototype.getOuterEdges=function(){return this.sortOuterEdges(),this.outerEdges},nt.prototype.getOuterEdge=function(at){return this.sortOuterEdges(),this.outerEdges[at]},nt.prototype.addInnerEdge=function(at){this.innerEdges.push(at)},nt}(),vS=function(){function nt(at,wt){this.from=at,this.to=wt,this.next=void 0,this.label=void 0,this.symetric=void 0,this.ring=void 0,this.from.addOuterEdge(this),this.to.addInnerEdge(this)}return nt.prototype.getSymetric=function(){return this.symetric||(this.symetric=new nt(this.to,this.from),this.symetric.symetric=this),this.symetric},nt.prototype.deleteEdge=function(){this.from.removeOuterEdge(this),this.to.removeInnerEdge(this)},nt.prototype.isEqual=function(at){return this.from.id===at.from.id&&this.to.id===at.to.id},nt.prototype.toString=function(){return"Edge { "+this.from.id+" -> "+this.to.id+" }"},nt.prototype.toLineString=function(){return po([this.from.coordinates,this.to.coordinates])},nt.prototype.compareTo=function(at){return gS(at.from.coordinates,at.to.coordinates,this.to.coordinates)},nt}(),o0=function(){function nt(){this.edges=[],this.polygon=void 0,this.envelope=void 0}return nt.prototype.push=function(at){this.edges.push(at),this.polygon=this.envelope=void 0},nt.prototype.get=function(at){return this.edges[at]},Object.defineProperty(nt.prototype,"length",{get:function(){return this.edges.length},enumerable:!0,configurable:!0}),nt.prototype.forEach=function(at){this.edges.forEach(at)},nt.prototype.map=function(at){return this.edges.map(at)},nt.prototype.some=function(at){return this.edges.some(at)},nt.prototype.isValid=function(){return!0},nt.prototype.isHole=function(){var at=this,wt=this.edges.reduce(function(ls,ff,mf){return ff.from.coordinates[1]>at.edges[ls].from.coordinates[1]&&(ls=mf),ls},0),lo=(wt===0?this.length:wt)-1,fo=(wt+1)%this.length,vo=gS(this.edges[lo].from.coordinates,this.edges[wt].from.coordinates,this.edges[fo].from.coordinates);return vo===0?this.edges[lo].from.coordinates[0]>this.edges[fo].from.coordinates[0]:vo>0},nt.prototype.toMultiPoint=function(){return yf(this.edges.map(function(at){return at.from.coordinates}))},nt.prototype.toPolygon=function(){if(this.polygon)return this.polygon;var at=this.edges.map(function(wt){return wt.from.coordinates});return at.push(this.edges[0].from.coordinates),this.polygon=yn([at])},nt.prototype.getEnvelope=function(){return this.envelope?this.envelope:this.envelope=gw(this.toPolygon())},nt.findEdgeRingContaining=function(at,wt){var lo,fo,vo=at.getEnvelope();return wt.forEach(function(ls){var ff,mf,bf,Sf,xf,If,jf=ls.getEnvelope();if(fo&&(lo=fo.getEnvelope()),mf=vo,bf=(ff=jf).geometry.coordinates[0].map(function(Uf){return Uf[0]}),Sf=ff.geometry.coordinates[0].map(function(Uf){return Uf[1]}),xf=mf.geometry.coordinates[0].map(function(Uf){return Uf[0]}),If=mf.geometry.coordinates[0].map(function(Uf){return Uf[1]}),(Math.max.apply(null,bf)!==Math.max.apply(null,xf)||Math.max.apply(null,Sf)!==Math.max.apply(null,If)||Math.min.apply(null,bf)!==Math.min.apply(null,xf)||Math.min.apply(null,Sf)!==Math.min.apply(null,If))&&mS(jf,vo)){for(var zf=at.map(function(Uf){return Uf.from.coordinates}),Wf=void 0,Mf=function(Uf){ls.some(function(tp){return op=Uf,up=tp.from.coordinates,op[0]===up[0]&&op[1]===up[1];var op,up})||(Wf=Uf)},np=0,pp=zf;np=0;--ls){var ff=vo[ls],mf=ff.symetric,bf=void 0,Sf=void 0;ff.label===wt&&(bf=ff),mf.label===wt&&(Sf=mf),bf&&Sf&&(Sf&&(fo=Sf),bf&&(fo&&(fo.next=bf,fo=void 0),lo||(lo=bf)))}fo&&(fo.next=lo)},nt.prototype._findLabeledEdgeRings=function(){var at=[],wt=0;return this.edges.forEach(function(lo){if(!(lo.label>=0)){at.push(lo);var fo=lo;do fo.label=wt,fo=fo.next;while(!lo.isEqual(fo));wt++}}),at},nt.prototype.getEdgeRings=function(){var at=this;this._computeNextCWEdges(),this.edges.forEach(function(lo){lo.label=void 0}),this._findLabeledEdgeRings().forEach(function(lo){at._findIntersectionNodes(lo).forEach(function(fo){at._computeNextCCWEdges(fo,lo.label)})});var wt=[];return this.edges.forEach(function(lo){lo.ring||wt.push(at._findEdgeRing(lo))}),wt},nt.prototype._findIntersectionNodes=function(at){var wt=[],lo=at,fo=function(){var vo=0;lo.from.getOuterEdges().forEach(function(ls){ls.label===at.label&&++vo}),vo>1&&wt.push(lo.from),lo=lo.next};do fo();while(!at.isEqual(lo));return wt},nt.prototype._findEdgeRing=function(at){var wt=at,lo=new o0;do lo.push(wt),wt.ring=lo,wt=wt.next;while(!at.isEqual(wt));return lo},nt.prototype.removeNode=function(at){var wt=this;at.getOuterEdges().forEach(function(lo){return wt.removeEdge(lo)}),at.innerEdges.forEach(function(lo){return wt.removeEdge(lo)}),delete this.nodes[at.id]},nt.prototype.removeEdge=function(at){this.edges=this.edges.filter(function(wt){return!wt.isEqual(at)}),at.deleteEdge()},nt}();function yS(nt,at){var wt=!0;return ng(nt,function(lo){ng(at,function(fo){if(wt===!1)return!1;wt=function(vo,ls){switch(vo.type){case"Point":switch(ls.type){case"Point":return ff=vo.coordinates,mf=ls.coordinates,!(ff[0]===mf[0]&&ff[1]===mf[1]);case"LineString":return!NT(ls,vo);case"Polygon":return!cm(vo,ls)}break;case"LineString":switch(ls.type){case"Point":return!NT(vo,ls);case"LineString":return!function(bf,Sf){return Dv(bf,Sf).features.length>0}(vo,ls);case"Polygon":return!Z2(ls,vo)}break;case"Polygon":switch(ls.type){case"Point":return!cm(ls,vo);case"LineString":return!Z2(vo,ls);case"Polygon":return!function(bf,Sf){for(var xf=0,If=bf.coordinates[0];xf0}(ls,vo)}}var ff,mf;return!1}(lo.geometry,fo.geometry)})}),wt}function NT(nt,at){for(var wt=0;wt0}function HC(nt,at,wt){var lo=wt[0]-nt[0],fo=wt[1]-nt[1],vo=at[0]-nt[0],ls=at[1]-nt[1];return lo*ls-fo*vo==0&&(Math.abs(vo)>=Math.abs(ls)?vo>0?nt[0]<=wt[0]&&wt[0]<=at[0]:at[0]<=wt[0]&&wt[0]<=nt[0]:ls>0?nt[1]<=wt[1]&&wt[1]<=at[1]:at[1]<=wt[1]&&wt[1]<=nt[1])}function MT(nt,at){return!(nt[0]>at[0])&&!(nt[2]at[1])&&!(nt[3]0}function $S(nt,at){for(var wt=!1,lo=!1,fo=nt.coordinates.length,vo=0;vo=Math.abs(ff)?ls>0?nt[0]<=wt[0]&&wt[0]<=at[0]:at[0]<=wt[0]&&wt[0]<=nt[0]:ff>0?nt[1]<=wt[1]&&wt[1]<=at[1]:at[1]<=wt[1]&&wt[1]<=nt[1]:Math.abs(ls)>=Math.abs(ff)?ls>0?nt[0]0?nt[1]=0&&(wt=[].concat(nt.slice(lo,nt.length),nt.slice(1,lo+1))),wt},Ib.prototype.comparePath=function(nt,at){var wt=this;return nt.every(function(lo,fo){return wt.compareCoord(lo,this[fo])},at)},Ib.prototype.comparePolygon=function(nt,at){if(this.compareLine(nt.coordinates[0],at.coordinates[0],1,!0)){var wt=nt.coordinates.slice(1,nt.coordinates.length),lo=at.coordinates.slice(1,at.coordinates.length),fo=this;return wt.every(function(vo){return this.some(function(ls){return fo.compareLine(vo,ls,1,!0)})},lo)}return!1},Ib.prototype.compareFeature=function(nt,at){return!(nt.id!==at.id||!this.objectComparator(nt.properties,at.properties)||!this.compareBBox(nt,at))&&this.compare(nt.geometry,at.geometry)},Ib.prototype.compareBBox=function(nt,at){return!!(!nt.bbox&&!at.bbox||nt.bbox&&at.bbox&&this.compareCoord(nt.bbox,at.bbox))},Ib.prototype.removePseudo=function(nt){return nt};var _S=Ib;function jT(nt,at){var wt=!1;return ng(nt,function(lo){ng(at,function(fo){if(wt===!0)return!0;wt=!yS(lo.geometry,fo.geometry)})}),wt}var GC=qv(function(nt){function at(wt,lo,fo,vo){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(wt,lo,fo,vo)}at.prototype.run=function(wt,lo,fo,vo){this._init(wt,lo,fo,vo);for(var ls=0;ls=this.minPts&&(lo=this._mergeArrays(lo,ls))}this._assigned[vo]!==1&&this._addToCluster(vo,wt)}},at.prototype._addToCluster=function(wt,lo){this.clusters[lo].push(wt),this._assigned[wt]=1},at.prototype._regionQuery=function(wt){for(var lo=[],fo=0;fo0){for(Sf=0;Sf=0);return wt},at.prototype.assign=function(){for(var wt,lo=!1,fo=this.dataset.length,vo=0;vols&&(fo=vo):lo=this.minPts)return vo},wt.prototype._regionQuery=function(lo,fo){fo=fo||this.epsilon;for(var vo=[],ls=0,ff=this.dataset.length;ls0;lo.length0;){var ff=nt[Math.floor(Math.random()*vo)],mf=ls?ff.join("_"):""+ff;wt[mf]||(wt[mf]=!0,lo.push(ff))}if(lo.length0,ls=nt[Math.floor(Math.random()*fo)];for(vo&&ls.join("_"),lo.push(ls);lo.length0,jf=[];if(wt)fo=wt=="kmrand"?HT(nt,at):wt=="kmpp"?XC(nt,at):wt;else for(var zf={};fo.length0;){var mf=ls.pop();if(mf===wt)return VT(mf);mf.closed=!0;for(var bf=nt.neighbors(mf),Sf=0,xf=bf.length;Sf0)){if(vo/=If,If<0){if(vo0){if(vo>xf)return;vo>Sf&&(Sf=vo)}if(vo=lo-mf,If||!(vo<0)){if(vo/=If,If<0){if(vo>xf)return;vo>Sf&&(Sf=vo)}else if(If>0){if(vo0)){if(vo/=jf,jf<0){if(vo0){if(vo>xf)return;vo>Sf&&(Sf=vo)}if(vo=fo-bf,jf||!(vo<0)){if(vo/=jf,jf<0){if(vo>xf)return;vo>Sf&&(Sf=vo)}else if(jf>0){if(vo0||xf<1)||(Sf>0&&(nt[0]=[mf+Sf*If,bf+Sf*jf]),xf<1&&(nt[1]=[mf+xf*If,bf+xf*jf]),!0)}}}}}function QC(nt,at,wt,lo,fo){var vo=nt[1];if(vo)return!0;var ls,ff,mf=nt[0],bf=nt.left,Sf=nt.right,xf=bf[0],If=bf[1],jf=Sf[0],zf=Sf[1],Wf=(xf+jf)/2,Mf=(If+zf)/2;if(zf===If){if(Wf=lo)return;if(xf>jf){if(mf){if(mf[1]>=fo)return}else mf=[Wf,wt];vo=[Wf,fo]}else{if(mf){if(mf[1]1)if(xf>jf){if(mf){if(mf[1]>=fo)return}else mf=[(wt-ff)/ls,wt];vo=[(fo-ff)/ls,fo]}else{if(mf){if(mf[1]=lo)return}else mf=[at,ls*at+ff];vo=[lo,ls*lo+ff]}else{if(mf){if(mf[0]0&&(this.content[0]=at,this.bubbleUp(0)),nt},remove:function(nt){var at=this.content.indexOf(nt),wt=this.content.pop();at!==this.content.length-1&&(this.content[at]=wt,this.scoreFunction(wt)0;){var wt=(nt+1>>1)-1,lo=this.content[wt];if(!(this.scoreFunction(at)=-oO)){var jf=mf*mf+bf*bf,zf=Sf*Sf+xf*xf,Wf=(xf*jf-bf*zf)/If,Mf=(mf*zf-Sf*jf)/If,np=XT.pop()||new tO;np.arc=nt,np.site=fo,np.x=Wf+ls,np.y=(np.cy=Mf+ff)+Math.sqrt(Wf*Wf+Mf*Mf),nt.circle=np;for(var pp=null,Uf=jw._;Uf;)if(np.yTv)ff=ff.L;else{if(!((fo=vo-iO(ff,ls))>Tv)){lo>-Tv?(at=ff.P,wt=ff):fo>-Tv?(at=ff,wt=ff.N):at=wt=ff;break}if(!ff.R){at=ff;break}ff=ff.R}(function(op){s1[op.index]={site:op,halfedges:[]}})(nt);var mf=QT(nt);if(Bw.insert(at,mf),at||wt){if(at===wt)return r_(at),wt=QT(at.site),Bw.insert(mf,wt),mf.edge=wt.edge=Lw(at.site,mf.site),M_(at),void M_(wt);if(wt){r_(at),r_(wt);var bf=at.site,Sf=bf[0],xf=bf[1],If=nt[0]-Sf,jf=nt[1]-xf,zf=wt.site,Wf=zf[0]-Sf,Mf=zf[1]-xf,np=2*(If*Mf-jf*Wf),pp=If*If+jf*jf,Uf=Wf*Wf+Mf*Mf,tp=[(Mf*pp-jf*Uf)/np+Sf,(If*Uf-Wf*pp)/np+xf];Fw(wt.edge,bf,zf,tp),mf.edge=Lw(bf,nt,null,tp),wt.edge=Lw(nt,zf,null,tp),M_(at),M_(wt)}else mf.edge=Lw(at.site,mf.site)}}function ek(nt,at){var wt=nt.site,lo=wt[0],fo=wt[1],vo=fo-at;if(!vo)return lo;var ls=nt.P;if(!ls)return-1/0;var ff=(wt=ls.site)[0],mf=wt[1],bf=mf-at;if(!bf)return ff;var Sf=ff-lo,xf=1/vo-1/bf,If=Sf/bf;return xf?(-If+Math.sqrt(If*If-2*xf*(Sf*Sf/(-2*bf)-mf+bf/2+fo-vo/2)))/xf+lo:(lo+ff)/2}function iO(nt,at){var wt=nt.N;if(wt)return ek(wt,at);var lo=nt.site;return lo[1]===at?lo[0]:1/0}var Bw,s1,jw,_0,Tv=1e-6,oO=1e-12;function tk(nt,at){return at[1]-nt[1]||at[0]-nt[0]}function IS(nt,at){var wt,lo,fo,vo=nt.sort(tk).pop();for(_0=[],s1=new Array(nt.length),Bw=new tE,jw=new tE;;)if(fo=CS,vo&&(!fo||vo[1]Tv||Math.abs(zf[0][1]-zf[1][1])>Tv)||delete _0[Wf]})(ls,ff,mf,bf),function(Sf,xf,If,jf){var zf,Wf,Mf,np,pp,Uf,tp,op,up,sp,Qp,Ap,rg=s1.length,zp=!0;for(zf=0;zfTv||Math.abs(Ap-up)>Tv)&&(pp.splice(np,0,_0.push(Pb(Mf,sp,Math.abs(Qp-Sf)Tv?[Sf,Math.abs(op-Sf)Tv?[Math.abs(up-jf)Tv?[If,Math.abs(op-If)Tv?[Math.abs(up-xf)=-270&&(zf=-zf),jf<-180&&jf>=-360&&(Wf=-Wf),vo==="degrees"){var Mf=zf*Math.cos(Sf)+Wf*Math.sin(Sf),np=Wf*Math.cos(Sf)-zf*Math.sin(Sf);zf=Mf,Wf=np}xf.push([zf+bf[0],Wf+bf[1]])}return xf.push(xf[0]),vo==="degrees"?yn([xf],mf):PT(yn([xf],mf),ls,{pivot:ff})}function nk(nt){var at=nt*Math.PI/180;return Math.tan(at)}function PS(nt,at){at===void 0&&(at={});var wt=0,lo=0,fo=0;return Ip(nt,function(vo,ls,ff){var mf=at.weight?ff==null?void 0:ff[at.weight]:void 0;if(!Lf(mf=mf??1))throw new Error("weight value must be a number for feature index "+ls);(mf=Number(mf))>0&&rp(vo,function(bf){wt+=bf[0]*mf,lo+=bf[1]*mf,fo+=mf})}),ot([wt/fo,lo/fo],at.properties,at)}function ik(nt,at,wt,lo,fo){var vo=lo.tolerance||.001,ls=0,ff=0,mf=0,bf=0;if(vp(wt,function(If){var jf,zf=(jf=If.properties)===null||jf===void 0?void 0:jf.weight,Wf=zf??1;if(!Lf(Wf=Number(Wf)))throw new Error("weight value must be a number");if(Wf>0){bf+=1;var Mf=Wf*_m(If,nt);Mf===0&&(Mf=1);var np=Wf/Mf;ls+=If.geometry.coordinates[0]*np,ff+=If.geometry.coordinates[1]*np,mf+=np}}),bf<1)throw new Error("no features to measure");var Sf=ls/mf,xf=ff/mf;return bf===1||fo===0||Math.abs(Sf-at[0])wt&&(wt=mf,lo=vo,at.push([]));var bf=vo-lo,Sf=nt.coordinates[mf][bf+1],xf=fo[0],If=fo[1],jf=Sf[0],zf=Sf[1];at[mf].push([.75*xf+.25*jf,.75*If+.25*zf]),at[mf].push([.25*xf+.75*jf,.25*If+.75*zf])},!0),at.forEach(function(fo){fo.push(fo[0])})}function lO(nt,at){var wt=0,lo=0,fo=0;rp(nt,function(vo,ls,ff,mf,bf){mf>fo&&(fo=mf,lo=ls,at.push([[]])),bf>wt&&(wt=bf,lo=ls,at[mf].push([]));var Sf=ls-lo,xf=nt.coordinates[mf][bf][Sf+1],If=vo[0],jf=vo[1],zf=xf[0],Wf=xf[1];at[mf][bf].push([.75*If+.25*zf,.75*jf+.25*Wf]),at[mf][bf].push([.25*If+.75*zf,.25*jf+.75*Wf])},!0),at.forEach(function(vo){vo.forEach(function(ls){ls.push(ls[0])})})}function cO(nt,at,wt){wt===void 0&&(wt=2);var lo=cp(nt),fo=cp(at),vo=lo[0]-fo[0],ls=lo[1]-fo[1];return wt===1?Math.abs(vo)+Math.abs(ls):Math.pow(Math.pow(vo,wt)+Math.pow(ls,wt),1/wt)}function ak(nt,at){var wt=(at=at||{}).threshold||1e4,lo=at.p||2,fo=at.binary||!1,vo=at.alpha||-1,ls=at.standardization||!1,ff=[];vp(nt,function(jf){ff.push(i1(jf))});for(var mf=[],bf=0;bf0?1:0}(nt[0]))*at,wt*Math.log(Math.tan(.25*Math.PI+.5*nt[1]*at))];return fo[0]>lo&&(fo[0]=lo),fo[0]<-lo&&(fo[0]=-lo),fo[1]>lo&&(fo[1]=lo),fo[1]<-lo&&(fo[1]=-lo),fo}function fk(nt){var at=180/Math.PI,wt=6378137;return[nt[0]*at/wt,(.5*Math.PI-2*Math.atan(Math.exp(-nt[1]/wt)))*at]}IS.prototype={constructor:IS,polygons:function(){var nt=this.edges;return this.cells.map(function(at){var wt=at.halfedges.map(function(lo){return KT(at,nt[lo])});return wt.data=at.site.data,wt})},triangles:function(){var nt=[],at=this.edges;return this.cells.forEach(function(wt,lo){if(vo=(fo=wt.halfedges).length)for(var fo,vo,ls,ff,mf,bf,Sf=wt.site,xf=-1,If=at[fo[vo-1]],jf=If.left===Sf?If.right:If.left;++xf=ff)return null;var mf=nt-fo.site[0],bf=at-fo.site[1],Sf=mf*mf+bf*bf;do fo=vo.cells[lo=ls],ls=null,fo.halfedges.forEach(function(xf){var If=vo.edges[xf],jf=If.left;if(jf!==fo.site&&jf||(jf=If.right)){var zf=nt-jf[0],Wf=at-jf[1],Mf=zf*zf+Wf*Wf;Mf0?bf+xf[Sf-1]:bf}),mf.forEach(function(bf){bf=2*bf*Math.PI/mf[mf.length-1];var Sf=Math.random();ff.push([Sf*(at.max_radial_length||10)*Math.sin(bf),Sf*(at.max_radial_length||10)*Math.cos(bf)])}),ff[ff.length-1]=ff[0],ff=ff.map((ls=qx(at.bbox),function(bf){return[bf[0]+ls[0],bf[1]+ls[1]]})),wt.push(yn([ff]))},fo=0;fo=0&&Mg>=0&&Mg=0;tp--)if(Math.abs(bf[tp][0][0]-pp)<=wf&&Math.abs(bf[tp][0][1]-Uf)<=wf){for(var op=Mf.path.length-2;op>=0;--op)bf[tp].unshift(Mf.path[op]);np=!0;break}}np||(bf[Sf++]=Mf.path)}var up})}),bf}(function(mf,bf){for(var Sf=mf.length-1,wf=mf[0].length-1,If={rows:Sf,cols:wf,cells:[]},jf=0;jf=bf?8:0,Wf|=np>=bf?4:0,Wf|=pp>=bf?2:0;var tp,op,up,sp,Qp=!1;if((Wf|=Uf>=bf?1:0)===5||Wf===10){var Ap=(Mf+np+pp+Uf)/4;Wf===5&&Apwt;){if(lo-wt>600){var vo=lo-wt+1,ls=at-wt+1,ff=Math.log(vo),mf=.5*Math.exp(2*ff/3),bf=.5*Math.sqrt(ff*mf*(vo-mf)/vo)*(ls-vo/2<0?-1:1);mg(nt,at,Math.max(wt,Math.floor(at-ls*mf/vo+bf)),Math.min(lo,Math.floor(at+(vo-ls)*mf/vo+bf)),fo)}var Sf=nt[at],wf=wt,If=lo;for(pg(nt,wt,at),fo(nt[lo],Sf)>0&&pg(nt,wt,lo);wf0;)If--}fo(nt[wt],Sf)===0?pg(nt,wt,If):pg(nt,++If,lo),If<=at&&(wt=If+1),at<=If&&(lo=If-1)}}function pg(nt,at,wt){var lo=nt[at];nt[at]=nt[wt],nt[wt]=lo}function wg(nt,at){return ntat?1:0}gp.default=wp;var Cg=Xg,Bg=Xg;function Xg(nt,at){if(!(this instanceof Xg))return new Xg(nt,at);this._maxEntries=Math.max(4,nt||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),at&&this._initFormat(at),this.clear()}function mm(nt,at,wt){if(!wt)return at.indexOf(nt);for(var lo=0;lo=nt.minX&&at.maxY>=nt.minY}function E1(nt){return{children:nt,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function A$(nt,at,wt,lo,fo){for(var vo,ls=[at,wt];ls.length;)(wt=ls.pop())-(at=ls.pop())<=lo||(vo=at+Math.ceil((wt-at)/lo/2)*lo,gp(nt,vo,at,wt,fo),ls.push(at,vo,vo,wt))}function qv(nt){var at={exports:{}};return nt(at,at.exports),at.exports}Xg.prototype={all:function(){return this._all(this.data,[])},search:function(nt){var at=this.data,wt=[],lo=this.toBBox;if(!qg(nt,at))return wt;for(var fo,vo,ls,ff,mf=[];at;){for(fo=0,vo=at.children.length;fo=0&&vo[at].children.length>this._maxEntries;)this._split(vo,at),at--;this._adjustParentBBoxes(fo,vo,at)},_split:function(nt,at){var wt=nt[at],lo=wt.children.length,fo=this._minEntries;this._chooseSplitAxis(wt,fo,lo);var vo=this._chooseSplitIndex(wt,fo,lo),ls=E1(wt.children.splice(vo,wt.children.length-vo));ls.height=wt.height,ls.leaf=wt.leaf,Hg(wt,this.toBBox),Hg(ls,this.toBBox),at?nt[at-1].children.push(ls):this._splitRoot(wt,ls)},_splitRoot:function(nt,at){this.data=E1([nt,at]),this.data.height=nt.height+1,this.data.leaf=!1,Hg(this.data,this.toBBox)},_chooseSplitIndex:function(nt,at,wt){var lo,fo,vo,ls,ff,mf,bf,Sf,wf,If,jf,zf,Wf,Mf;for(mf=bf=1/0,lo=at;lo<=wt-at;lo++)fo=Iy(nt,0,lo,this.toBBox),vo=Iy(nt,lo,wt,this.toBBox),wf=fo,If=vo,jf=void 0,zf=void 0,Wf=void 0,Mf=void 0,jf=Math.max(wf.minX,If.minX),zf=Math.max(wf.minY,If.minY),Wf=Math.min(wf.maxX,If.maxX),Mf=Math.min(wf.maxY,If.maxY),ls=Math.max(0,Wf-jf)*Math.max(0,Mf-zf),ff=p0(fo)+p0(vo),ls=at;fo--)vo=nt.children[fo],py(mf,nt.leaf?ls(vo):vo),bf+=_b(mf);return bf},_adjustParentBBoxes:function(nt,at,wt){for(var lo=wt;lo>=0;lo--)py(at[lo],nt)},_condense:function(nt){for(var at,wt=nt.length-1;wt>=0;wt--)nt[wt].children.length===0?wt>0?(at=nt[wt-1].children).splice(at.indexOf(nt[wt]),1):this.clear():Hg(nt[wt],this.toBBox)},_initFormat:function(nt){var at=["return a"," - b",";"];this.compareMinX=new Function("a","b",at.join(nt[0])),this.compareMinY=new Function("a","b",at.join(nt[1])),this.toBBox=new Function("a","return {minX: a"+nt[0]+", minY: a"+nt[1]+", maxX: a"+nt[2]+", maxY: a"+nt[3]+"};")}},Cg.default=Bg;var H0=function(nt,at,wt){var lo=nt*at,fo=wb*nt,vo=fo-(fo-nt),ls=nt-vo,ff=wb*at,mf=ff-(ff-at),bf=at-mf,Sf=ls*bf-(lo-vo*mf-ls*mf-vo*bf);return wt?(wt[0]=Sf,wt[1]=lo,wt):[Sf,lo]},wb=+(Math.pow(2,27)+1),R$=function(nt,at){var wt=0|nt.length,lo=0|at.length;if(wt===1&&lo===1)return function(up,sp){var Qp=up+sp,Ap=Qp-up,rg=up-(Qp-Ap)+(sp-Ap);return rg?[rg,Qp]:[Qp]}(nt[0],at[0]);var fo,vo,ls=new Array(wt+lo),ff=0,mf=0,bf=0,Sf=Math.abs,wf=nt[mf],If=Sf(wf),jf=at[bf],zf=Sf(jf);If=lo?(fo=wf,(mf+=1)=lo?(fo=wf,(mf+=1)>1;return["sum(",wt(bf.slice(0,Sf)),",",wt(bf.slice(Sf)),")"].join("")}function lo(bf){if(bf.length===2)return[["sum(prod(",bf[0][0],",",bf[1][1],"),prod(-",bf[0][1],",",bf[1][0],"))"].join("")];for(var Sf=[],wf=0;wf0){if(zf<=0)return Wf;If=jf+zf}else{if(!(jf<0)||zf>=0)return Wf;If=-(jf+zf)}var Mf=33306690738754716e-32*If;return Wf>=Mf||Wf<=-Mf?Wf:vo(bf,Sf,wf)},function(bf,Sf,wf,If){var jf=bf[0]-If[0],zf=Sf[0]-If[0],Wf=wf[0]-If[0],Mf=bf[1]-If[1],np=Sf[1]-If[1],pp=wf[1]-If[1],Uf=bf[2]-If[2],tp=Sf[2]-If[2],op=wf[2]-If[2],up=zf*pp,sp=Wf*np,Qp=Wf*Mf,Ap=jf*pp,rg=jf*np,zp=zf*Mf,lg=Uf*(up-sp)+tp*(Qp-Ap)+op*(rg-zp),qp=7771561172376103e-31*((Math.abs(up)+Math.abs(sp))*Math.abs(Uf)+(Math.abs(Qp)+Math.abs(Ap))*Math.abs(tp)+(Math.abs(rg)+Math.abs(zp))*Math.abs(op));return lg>qp||-lg>qp?lg:ls(bf,Sf,wf,If)}];function mf(bf){var Sf=ff[bf.length];return Sf||(Sf=ff[bf.length]=fo(bf.length)),Sf.apply(void 0,bf)}(function(){for(;ff.length<=5;)ff.push(fo(ff.length));for(var bf=[],Sf=["slow"],wf=0;wf<=5;++wf)bf.push("a"+wf),Sf.push("o"+wf);var If=["function getOrientation(",bf.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(wf=2;wf<=5;++wf)If.push("case ",wf,":return o",wf,"(",bf.slice(0,wf).join(),");");If.push("}var s=new Array(arguments.length);for(var i=0;i1&&Gg(nt[vo[bf-2]],nt[vo[bf-1]],mf)<=0;)bf-=1,vo.pop();for(vo.push(ff),bf=ls.length;bf>1&&Gg(nt[ls[bf-2]],nt[ls[bf-1]],mf)>=0;)bf-=1,ls.pop();ls.push(ff)}wt=new Array(ls.length+vo.length-2);for(var Sf=0,wf=(lo=0,vo.length);lo0;--If)wt[Sf++]=ls[If];return wt},Gg=Hp[3],yv=Cv,Py=Cv;function Cv(nt,at){if(!(this instanceof Cv))return new Cv(nt,at);if(this.data=nt||[],this.length=this.data.length,this.compare=at||By,this.length>0)for(var wt=(this.length>>1)-1;wt>=0;wt--)this._down(wt)}function By(nt,at){return ntat?1:0}Cv.prototype={push:function(nt){this.data.push(nt),this.length++,this._up(this.length-1)},pop:function(){if(this.length!==0){var nt=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),nt}},peek:function(){return this.data[0]},_up:function(nt){for(var at=this.data,wt=this.compare,lo=at[nt];nt>0;){var fo=nt-1>>1,vo=at[fo];if(wt(lo,vo)>=0)break;at[nt]=vo,nt=fo}at[nt]=lo},_down:function(nt){for(var at=this.data,wt=this.compare,lo=this.length>>1,fo=at[nt];nt=0)break;at[nt]=ff,nt=vo}at[nt]=fo}},yv.default=Py;var S1=function(nt,at){for(var wt=nt[0],lo=nt[1],fo=!1,vo=0,ls=at.length-1;volo!=Sf>lo&&wt<(bf-ff)*(lo-mf)/(Sf-mf)+ff&&(fo=!fo)}return fo},T1=Hp[3],jy=xb,cw=xb;function xb(nt,at,wt){at=Math.max(0,at===void 0?2:at),wt=wt||0;for(var lo,fo=function(pp){for(var Uf=pp[0],tp=pp[0],op=pp[0],up=pp[0],sp=0;spop[0]&&(op=Qp),Qp[1]up[1]&&(up=Qp)}var Ap=[Uf,tp,op,up],rg=Ap.slice();for(sp=0;spvo||ff.push({node:Sf,dist:wf})}for(;ff.length&&!ff.peek().node.children;){var If=ff.pop(),jf=If.node,zf=K1(jf,at,wt),Wf=K1(jf,lo,fo);if(If.dist=at.minX&&nt[0]<=at.maxX&&nt[1]>=at.minY&&nt[1]<=at.maxY}function dv(nt,at,wt){for(var lo,fo,vo,ls,ff=Math.min(nt[0],at[0]),mf=Math.min(nt[1],at[1]),bf=Math.max(nt[0],at[0]),Sf=Math.max(nt[1],at[1]),wf=wt.search({minX:ff,minY:mf,maxX:bf,maxY:Sf}),If=0;If0!=T1(lo,fo,ls)>0&&T1(vo,ls,lo)>0!=T1(vo,ls,fo)>0)return!1;return!0}function Ov(nt){var at=nt.p,wt=nt.next.p;return nt.minX=Math.min(at[0],wt[0]),nt.minY=Math.min(at[1],wt[1]),nt.maxX=Math.max(at[0],wt[0]),nt.maxY=Math.max(at[1],wt[1]),nt}function Xb(nt,at){var wt={p:nt,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return at?(wt.next=at.next,wt.prev=at,at.next.prev=wt,at.next=wt):(wt.prev=wt,wt.next=wt),wt}function Y1(nt,at){var wt=nt[0]-at[0],lo=nt[1]-at[1];return wt*wt+lo*lo}function K1(nt,at,wt){var lo=at[0],fo=at[1],vo=wt[0]-lo,ls=wt[1]-fo;if(vo!==0||ls!==0){var ff=((nt[0]-lo)*vo+(nt[1]-fo)*ls)/(vo*vo+ls*ls);ff>1?(lo=wt[0],fo=wt[1]):ff>0&&(lo+=vo*ff,fo+=ls*ff)}return(vo=nt[0]-lo)*vo+(ls=nt[1]-fo)*ls}function Zb(nt,at,wt,lo,fo,vo,ls,ff){var mf,bf,Sf,wf,If=wt-nt,jf=lo-at,zf=ls-fo,Wf=ff-vo,Mf=nt-fo,np=at-vo,pp=If*If+jf*jf,Uf=If*zf+jf*Wf,tp=zf*zf+Wf*Wf,op=If*Mf+jf*np,up=zf*Mf+Wf*np,sp=pp*tp-Uf*Uf,Qp=sp,Ap=sp;sp===0?(bf=0,Qp=1,wf=up,Ap=tp):(wf=pp*up-Uf*op,(bf=Uf*up-tp*op)<0?(bf=0,wf=up,Ap=tp):bf>Qp&&(bf=Qp,wf=up+Uf,Ap=tp)),wf<0?(wf=0,-op<0?bf=0:-op>pp?bf=Qp:(bf=-op,Qp=pp)):wf>Ap&&(wf=Ap,-op+Uf<0?bf=0:-op+Uf>pp?bf=Qp:(bf=-op+Uf,Qp=pp));var rg=(1-(Sf=wf===0?0:wf/Ap))*fo+Sf*ls-((1-(mf=bf===0?0:bf/Qp))*nt+mf*wt),zp=(1-Sf)*vo+Sf*ff-((1-mf)*at+mf*lo);return rg*rg+zp*zp}function Tm(nt,at){at===void 0&&(at={}),at.concavity=at.concavity||1/0;var wt=[];if(rp(nt,function(fo){wt.push([fo[0],fo[1]])}),!wt.length)return null;var lo=jy(wt,at.concavity);return lo.length>3?yn([lo]):null}function cm(nt,at,wt){if(wt===void 0&&(wt={}),!nt)throw new Error("point is required");if(!at)throw new Error("polygon is required");var lo=cp(nt),fo=_p(at),vo=fo.type,ls=at.bbox,ff=fo.coordinates;if(ls&&function(If,jf){return jf[0]<=If[0]&&jf[1]<=If[1]&&jf[2]>=If[0]&&jf[3]>=If[1]}(lo,ls)===!1)return!1;vo==="Polygon"&&(ff=[ff]);for(var mf=!1,bf=0;bfnt[1]!=bf>nt[1]&&nt[0]<(mf-ls)*(nt[1]-ff)/(bf-ff)+ls&&(lo=!lo)}return lo}function Zg(nt,at){var wt=[];return vp(nt,function(lo){var fo=!1;if(lo.geometry.type==="Point")Ip(at,function(ls){cm(lo,ls)&&(fo=!0)}),fo&&wt.push(lo);else{if(lo.geometry.type!=="MultiPoint")throw new Error("Input geometry must be a Point or MultiPoint");var vo=[];Ip(at,function(ls){rp(lo,function(ff){cm(ff,ls)&&(fo=!0,vo.push(ff))})}),fo&&wt.push(yf(vo))}}),wo(wt)}function _m(nt,at,wt){wt===void 0&&(wt={});var lo=cp(nt),fo=cp(at),vo=Bf(fo[1]-lo[1]),ls=Bf(fo[0]-lo[0]),ff=Bf(lo[1]),mf=Bf(fo[1]),bf=Math.pow(Math.sin(vo/2),2)+Math.pow(Math.sin(ls/2),2)*Math.cos(ff)*Math.cos(mf);return $f(2*Math.atan2(Math.sqrt(bf),Math.sqrt(1-bf)),wt.units)}function Eb(nt,at){var wt=!1;return wo(function(lo){if(lo.length<3)return[];lo.sort(X1);for(var fo,vo,ls,ff,mf,bf,Sf=lo.length-1,wf=lo[Sf].x,If=lo[0].x,jf=lo[Sf].y,zf=jf,Wf=1e-12;Sf--;)lo[Sf].yzf&&(zf=lo[Sf].y);var Mf,np=If-wf,pp=zf-jf,Uf=np>pp?np:pp,tp=.5*(If+wf),op=.5*(zf+jf),up=[new v_({__sentinel:!0,x:tp-20*Uf,y:op-Uf},{__sentinel:!0,x:tp,y:op+20*Uf},{__sentinel:!0,x:tp+20*Uf,y:op-Uf})],sp=[],Qp=[];for(Sf=lo.length;Sf--;){for(Qp.length=0,Mf=up.length;Mf--;)(np=lo[Sf].x-up[Mf].x)>0&&np*np>up[Mf].r?(sp.push(up[Mf]),up.splice(Mf,1)):np*np+(pp=lo[Sf].y-up[Mf].y)*pp>up[Mf].r||(Qp.push(up[Mf].a,up[Mf].b,up[Mf].b,up[Mf].c,up[Mf].c,up[Mf].a),up.splice(Mf,1));for(Yv(Qp),Mf=Qp.length;Mf;)vo=Qp[--Mf],fo=Qp[--Mf],ls=lo[Sf],ff=vo.x-fo.x,mf=vo.y-fo.y,bf=2*(ff*(ls.y-vo.y)-mf*(ls.x-vo.x)),Math.abs(bf)>Wf&&up.push(new v_(fo,vo,ls))}for(Array.prototype.push.apply(sp,up),Sf=sp.length;Sf--;)(sp[Sf].a.__sentinel||sp[Sf].b.__sentinel||sp[Sf].c.__sentinel)&&sp.splice(Sf,1);return sp}(nt.features.map(function(lo){var fo={x:lo.geometry.coordinates[0],y:lo.geometry.coordinates[1]};return at?fo.z=lo.properties[at]:lo.geometry.coordinates.length===3&&(wt=!0,fo.z=lo.geometry.coordinates[2]),fo})).map(function(lo){var fo=[lo.a.x,lo.a.y],vo=[lo.b.x,lo.b.y],ls=[lo.c.x,lo.c.y],ff={};return wt?(fo.push(lo.a.z),vo.push(lo.b.z),ls.push(lo.c.z)):ff={a:lo.a.z,b:lo.b.z,c:lo.c.z},yn([[fo,vo,ls,fo]],ff)}))}jy.default=cw;var v_=function(nt,at,wt){this.a=nt,this.b=at,this.c=wt;var lo,fo,vo=at.x-nt.x,ls=at.y-nt.y,ff=wt.x-nt.x,mf=wt.y-nt.y,bf=vo*(nt.x+at.x)+ls*(nt.y+at.y),Sf=ff*(nt.x+wt.x)+mf*(nt.y+wt.y),wf=2*(vo*(wt.y-at.y)-ls*(wt.x-at.x));this.x=(mf*bf-ls*Sf)/wf,this.y=(vo*Sf-ff*bf)/wf,lo=this.x-nt.x,fo=this.y-nt.y,this.r=lo*lo+fo*fo};function X1(nt,at){return at.x-nt.x}function Yv(nt){var at,wt,lo,fo,vo,ls=nt.length;e:for(;ls;)for(wt=nt[--ls],at=nt[--ls],lo=ls;lo;)if(vo=nt[--lo],at===(fo=nt[--lo])&&wt===vo||at===vo&&wt===fo){nt.splice(ls,2),nt.splice(lo,2),ls-=2;continue e}}function Iv(nt){if(!nt)throw new Error("geojson is required");switch(nt.type){case"Feature":return Z1(nt);case"FeatureCollection":return function(at){var wt={type:"FeatureCollection"};return Object.keys(at).forEach(function(lo){switch(lo){case"type":case"features":return;default:wt[lo]=at[lo]}}),wt.features=at.features.map(function(lo){return Z1(lo)}),wt}(nt);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return M$(nt);default:throw new Error("unknown GeoJSON type")}}function Z1(nt){var at={type:"Feature"};return Object.keys(nt).forEach(function(wt){switch(wt){case"type":case"properties":case"geometry":return;default:at[wt]=nt[wt]}}),at.properties=J1(nt.properties),at.geometry=M$(nt.geometry),at}function J1(nt){var at={};return nt&&Object.keys(nt).forEach(function(wt){var lo=nt[wt];typeof lo=="object"?lo===null?at[wt]=null:Array.isArray(lo)?at[wt]=lo.map(function(fo){return fo}):at[wt]=J1(lo):at[wt]=lo}),at}function M$(nt){var at={type:nt.type};return nt.bbox&&(at.bbox=nt.bbox),nt.type==="GeometryCollection"?(at.geometries=nt.geometries.map(function(wt){return M$(wt)}),at):(at.coordinates=t1(nt.coordinates),at)}function t1(nt){var at=nt;return typeof at[0]!="object"?at.slice():at.map(function(wt){return t1(wt)})}function Jb(nt,at){if(at===void 0&&(at={}),!kf(at=at||{}))throw new Error("options is invalid");var wt=at.mutate;if(Mp(nt)!=="FeatureCollection")throw new Error("geojson must be a FeatureCollection");if(!nt.features.length)throw new Error("geojson is empty");wt!==!1&&wt!==void 0||(nt=Iv(nt));var lo=[],fo=xp(nt,function(vo,ls){var ff=function(mf,bf){var Sf,wf=mf.geometry.coordinates,If=bf.geometry.coordinates,jf=D$(wf[0]),zf=D$(wf[wf.length-1]),Wf=D$(If[0]),Mf=D$(If[If.length-1]);if(jf===Mf)Sf=If.concat(wf.slice(1));else if(Wf===zf)Sf=wf.concat(If.slice(1));else if(jf===Wf)Sf=wf.slice(1).reverse().concat(If);else{if(zf!==Mf)return null;Sf=wf.concat(If.reverse().slice(1))}return po(Sf)}(vo,ls);return ff||(lo.push(vo),ls)});return fo&&lo.push(fo),lo.length?lo.length===1?lo[0]:lf(lo.map(function(vo){return vo.coordinates})):null}function D$(nt){return nt[0].toString()+","+nt[1].toString()}function hw(nt){return nt}function dw(nt,at){var wt=function(bf){if(bf==null)return hw;var Sf,wf,If=bf.scale[0],jf=bf.scale[1],zf=bf.translate[0],Wf=bf.translate[1];return function(Mf,np){np||(Sf=wf=0);var pp=2,Uf=Mf.length,tp=new Array(Uf);for(tp[0]=(Sf+=Mf[0])*If+zf,tp[1]=(wf+=Mf[1])*jf+Wf;pp1)for(var Sf,wf,If=1,jf=ls(bf[0]);Ifjf&&(wf=bf[0],bf[0]=bf[If],bf[If]=wf,jf=Sf);return bf}).filter(function(ff){return ff.length>0})}}var b_=Object.prototype.hasOwnProperty;function L$(nt,at,wt,lo,fo,vo){arguments.length===3&&(lo=vo=Array,fo=null);for(var ls=new lo(nt=1<=nt)throw new Error("full hashmap");np=ls[Mf=Mf+1&mf]}return ls[Mf]=zf,ff[Mf]=Wf,Wf}function wf(zf,Wf){for(var Mf=at(zf)&mf,np=ls[Mf],pp=0;np!=fo;){if(wt(np,zf))return ff[Mf];if(++pp>=nt)throw new Error("full hashmap");np=ls[Mf=Mf+1&mf]}return ls[Mf]=zf,ff[Mf]=Wf,Wf}function If(zf,Wf){for(var Mf=at(zf)&mf,np=ls[Mf],pp=0;np!=fo;){if(wt(np,zf))return ff[Mf];if(++pp>=nt)break;np=ls[Mf=Mf+1&mf]}return Wf}function jf(){for(var zf=[],Wf=0,Mf=ls.length;Wf>7^um[2]^um[3])}function wx(nt){var at,wt,lo,fo,vo=nt.coordinates,ls=nt.lines,ff=nt.rings,mf=function(){for(var Ap=L$(1.4*vo.length,op,up,Int32Array,-1,Int32Array),rg=new Int32Array(vo.length),zp=0,lg=vo.length;zp=0){var Wp=wf[zp];qp===rg&&Wp===lg||qp===lg&&Wp===rg||(++jf,If[zp]=1)}else Sf[zp]=rg,wf[zp]=lg}}function op(Ap){return O0(vo[Ap])}function up(Ap,rg){return Qb(vo[Ap],vo[rg])}bf=Sf=wf=null;var sp,Qp=function(Ap,rg,zp,lg,qp){arguments.length===3&&(lg=Array,qp=null);for(var Wp=new lg(Ap=1<=Ap)throw new Error("full hashset");bm=Wp[_g=_g+1&Up]}return Wp[_g]=Ug,!0}function cg(Ug){for(var _g=rg(Ug)&Up,bm=Wp[_g],Mg=0;bm!=qp;){if(zp(bm,Ug))return!0;if(++Mg>=Ap)break;bm=Wp[_g=_g+1&Up]}return!1}function Sp(){for(var Ug=[],_g=0,bm=Wp.length;_g>1);atWf&&(Wf=Qp),ApMf&&(Mf=Ap)}function tp(sp){sp.forEach(Uf)}function op(sp){sp.forEach(tp)}for(var up in If)np(If[up]);return Wf>=jf&&Mf>=zf?[jf,zf,Wf,Mf]:void 0}(nt=e$(nt)),lo=at>0&&wt&&function(If,jf,zf){var Wf=jf[0],Mf=jf[1],np=jf[2],pp=jf[3],Uf=np-Wf?(zf-1)/(np-Wf):1,tp=pp-Mf?(zf-1)/(pp-Mf):1;function op(qp){return[Math.round((qp[0]-Wf)*Uf),Math.round((qp[1]-Mf)*tp)]}function up(qp,Wp){for(var Up,ig,Xp,cg,Sp,Ug=-1,_g=0,bm=qp.length,Mg=new Array(bm);++Ug2&&lv(wt[fo-3],wt[fo-1],wt[fo-2])&&wt.splice(wt.length-2,1))}if(wt.push(at[at.length-1]),fo=wt.length,pw(at[0],at[at.length-1])&&fo<4)throw new Error("invalid polygon");return lv(wt[fo-3],wt[fo-1],wt[fo-2])&&wt.splice(wt.length-2,1),wt}function pw(nt,at){return nt[0]===at[0]&&nt[1]===at[1]}function lv(nt,at,wt){var lo=wt[0],fo=wt[1],vo=nt[0],ls=nt[1],ff=at[0],mf=at[1],bf=ff-vo,Sf=mf-ls;return(lo-vo)*Sf-(fo-ls)*bf===0&&(Math.abs(bf)>=Math.abs(Sf)?bf>0?vo<=lo&&lo<=ff:ff<=lo&&lo<=vo:Sf>0?ls<=fo&&fo<=mf:mf<=fo&&fo<=ls)}function YE(nt,at,wt){var lo=at.x,fo=at.y,vo=wt.x-lo,ls=wt.y-fo;if(vo!==0||ls!==0){var ff=((nt.x-lo)*vo+(nt.y-fo)*ls)/(vo*vo+ls*ls);ff>1?(lo=wt.x,fo=wt.y):ff>0&&(lo+=vo*ff,fo+=ls*ff)}return(vo=nt.x-lo)*vo+(ls=nt.y-fo)*ls}function m0(nt,at,wt,lo,fo){for(var vo,ls=lo,ff=at+1;ffls&&(vo=ff,ls=mf)}ls>lo&&(vo-at>1&&m0(nt,at,vo,lo,fo),fo.push(nt[vo]),wt-vo>1&&m0(nt,vo,wt,lo,fo))}function F$(nt,at){var wt=nt.length-1,lo=[nt[0]];return m0(nt,0,wt,at,lo),lo.push(nt[wt]),lo}function __(nt,at,wt){if(nt.length<=2)return nt;var lo=at!==void 0?at*at:1;return nt=F$(nt=wt?nt:function(fo,vo){for(var ls,ff,mf,bf,Sf,wf=fo[0],If=[wf],jf=1,zf=fo.length;jfvo&&(If.push(ls),wf=ls);return wf!==ls&&If.push(ls),If}(nt,lo),lo)}function w_(nt,at,wt){return __(nt.map(function(lo){return{x:lo[0],y:lo[1],z:lo[2]}}),at,wt).map(function(lo){return lo.z?[lo.x,lo.y,lo.z]:[lo.x,lo.y]})}function x_(nt,at,wt){return nt.map(function(lo){var fo=lo.map(function(ls){return{x:ls[0],y:ls[1]}});if(fo.length<4)throw new Error("invalid polygon");for(var vo=__(fo,at,wt).map(function(ls){return[ls.x,ls.y]});!KE(vo);)vo=__(fo,at-=.01*at,wt).map(function(ls){return[ls.x,ls.y]});return vo[vo.length-1][0]===vo[0][0]&&vo[vo.length-1][1]===vo[0][1]||vo.push(vo[0]),vo})}function KE(nt){return!(nt.length<3)&&!(nt.length===3&&nt[2][0]===nt[0][0]&&nt[2][1]===nt[0][1])}var N2=function(){function nt(at){this.points=at.points||[],this.duration=at.duration||1e4,this.sharpness=at.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=at.stepLength||60,this.length=this.points.length,this.delay=0;for(var wt=0;wtat&&(wt.push(fo),lo=vo)}return wt},nt.prototype.vector=function(at){var wt=this.pos(at+10),lo=this.pos(at-10);return{angle:180*Math.atan2(wt.y-lo.y,wt.x-lo.x)/3.14,speed:Math.sqrt((lo.x-wt.x)*(lo.x-wt.x)+(lo.y-wt.y)*(lo.y-wt.y)+(lo.z-wt.z)*(lo.z-wt.z))}},nt.prototype.pos=function(at){var wt=at-this.delay;wt<0&&(wt=0),wt>this.duration&&(wt=this.duration-1);var lo=wt/this.duration;if(lo>=1)return this.points[this.length-1];var fo=Math.floor((this.points.length-1)*lo);return function(vo,ls,ff,mf,bf){var Sf=function(wf){var If=wf*wf;return[If*wf,3*If*(1-wf),3*wf*(1-wf)*(1-wf),(1-wf)*(1-wf)*(1-wf)]}(vo);return{x:bf.x*Sf[0]+mf.x*Sf[1]+ff.x*Sf[2]+ls.x*Sf[3],y:bf.y*Sf[0]+mf.y*Sf[1]+ff.y*Sf[2]+ls.y*Sf[3],z:bf.z*Sf[0]+mf.z*Sf[1]+ff.z*Sf[2]+ls.z*Sf[3]}}((this.length-1)*lo-fo,this.points[fo],this.controls[fo][1],this.controls[fo+1][0],this.points[fo+1])},nt}();function M2(nt,at){at===void 0&&(at={});for(var wt=at.resolution||1e4,lo=at.sharpness||.85,fo=[],vo=_p(nt).coordinates.map(function(bf){return{x:bf[0],y:bf[1]}}),ls=new N2({duration:wt,points:vo,sharpness:lo}),ff=function(bf){var Sf=ls.pos(bf);Math.floor(bf/100)%2==0&&fo.push([Sf.x,Sf.y])},mf=0;mf=_m(nt.slice(0,2),[at,fo])){var vo=(wt+fo)/2;return[at,vo-(lo-at)/2,lo,vo+(lo-at)/2]}var ls=(at+lo)/2;return[ls-(fo-wt)/2,wt,ls+(fo-wt)/2,fo]}function $y(nt,at,wt,lo){lo===void 0&&(lo={});var fo=cp(nt),vo=Bf(fo[0]),ls=Bf(fo[1]),ff=Bf(wt),mf=xf(at,lo.units),bf=Math.asin(Math.sin(ls)*Math.cos(mf)+Math.cos(ls)*Math.sin(mf)*Math.cos(ff));return ot([Pf(vo+Math.atan2(Math.sin(ff)*Math.sin(mf)*Math.cos(ls),Math.cos(mf)-Math.sin(ls)*Math.sin(bf))),Pf(bf)],lo.properties)}function kx(nt,at,wt){wt===void 0&&(wt={});for(var lo=wt.steps||64,fo=wt.properties?wt.properties:!Array.isArray(nt)&&nt.type==="Feature"&&nt.properties?nt.properties:{},vo=[],ls=0;ls80*wt){lo=vo=nt[0],fo=ls=nt[1];for(var zf=wt;zfvo&&(vo=ff),mf>ls&&(ls=mf);bf=(bf=Math.max(vo-lo,ls-fo))!==0?1/bf:0}return v0(If,jf,wt,lo,fo,bf),jf}function vw(nt,at,wt,lo,fo){var vo,ls;if(fo===xv(nt,at,wt,lo)>0)for(vo=at;vo=at;vo-=lo)ls=bw(vo,nt[vo],nt[vo+1],ls);return ls&&C1(ls,ls.next)&&(Ay(ls),ls=ls.next),ls}function B$(nt,at){if(!nt)return nt;at||(at=nt);var wt,lo=nt;do if(wt=!1,lo.steiner||!C1(lo,lo.next)&&gy(lo.prev,lo,lo.next)!==0)lo=lo.next;else{if(Ay(lo),(lo=at=lo.prev)===lo.next)break;wt=!0}while(wt||lo!==at);return at}function v0(nt,at,wt,lo,fo,vo,ls){if(nt){!ls&&vo&&function(Sf,wf,If,jf){var zf=Sf;do zf.z===null&&(zf.z=Cx(zf.x,zf.y,wf,If,jf)),zf.prevZ=zf.prev,zf.nextZ=zf.next,zf=zf.next;while(zf!==Sf);zf.prevZ.nextZ=null,zf.prevZ=null,function(Wf){var Mf,np,pp,Uf,tp,op,up,sp,Qp=1;do{for(np=Wf,Wf=null,tp=null,op=0;np;){for(op++,pp=np,up=0,Mf=0;Mf0||sp>0&&pp;)up!==0&&(sp===0||!pp||np.z<=pp.z)?(Uf=np,np=np.nextZ,up--):(Uf=pp,pp=pp.nextZ,sp--),tp?tp.nextZ=Uf:Wf=Uf,Uf.prevZ=tp,tp=Uf;np=pp}tp.nextZ=null,Qp*=2}while(op>1)}(zf)}(nt,lo,fo,vo);for(var ff,mf,bf=nt;nt.prev!==nt.next;)if(ff=nt.prev,mf=nt.next,vo?j$(nt,lo,fo,vo):n0(nt))at.push(ff.i/wt),at.push(nt.i/wt),at.push(mf.i/wt),Ay(nt),nt=mf.next,bf=mf.next;else if((nt=mf)===bf){ls?ls===1?v0(nt=L2(nt,at,wt),at,wt,lo,fo,vo,2):ls===2&&F2(nt,at,wt,lo,fo,vo):v0(B$(nt),at,wt,lo,fo,vo,1);break}}}function n0(nt){var at=nt.prev,wt=nt,lo=nt.next;if(gy(at,wt,lo)>=0)return!1;for(var fo=nt.next.next;fo!==nt.prev;){if(zy(at.x,at.y,wt.x,wt.y,lo.x,lo.y,fo.x,fo.y)&&gy(fo.prev,fo,fo.next)>=0)return!1;fo=fo.next}return!0}function j$(nt,at,wt,lo){var fo=nt.prev,vo=nt,ls=nt.next;if(gy(fo,vo,ls)>=0)return!1;for(var ff=fo.xvo.x?fo.x>ls.x?fo.x:ls.x:vo.x>ls.x?vo.x:ls.x,Sf=fo.y>vo.y?fo.y>ls.y?fo.y:ls.y:vo.y>ls.y?vo.y:ls.y,wf=Cx(ff,mf,at,wt,lo),If=Cx(bf,Sf,at,wt,lo),jf=nt.prevZ,zf=nt.nextZ;jf&&jf.z>=wf&&zf&&zf.z<=If;){if(jf!==nt.prev&&jf!==nt.next&&zy(fo.x,fo.y,vo.x,vo.y,ls.x,ls.y,jf.x,jf.y)&&gy(jf.prev,jf,jf.next)>=0||(jf=jf.prevZ,zf!==nt.prev&&zf!==nt.next&&zy(fo.x,fo.y,vo.x,vo.y,ls.x,ls.y,zf.x,zf.y)&&gy(zf.prev,zf,zf.next)>=0))return!1;zf=zf.nextZ}for(;jf&&jf.z>=wf;){if(jf!==nt.prev&&jf!==nt.next&&zy(fo.x,fo.y,vo.x,vo.y,ls.x,ls.y,jf.x,jf.y)&&gy(jf.prev,jf,jf.next)>=0)return!1;jf=jf.prevZ}for(;zf&&zf.z<=If;){if(zf!==nt.prev&&zf!==nt.next&&zy(fo.x,fo.y,vo.x,vo.y,ls.x,ls.y,zf.x,zf.y)&&gy(zf.prev,zf,zf.next)>=0)return!1;zf=zf.nextZ}return!0}function L2(nt,at,wt){var lo=nt;do{var fo=lo.prev,vo=lo.next.next;!C1(fo,vo)&&r$(fo,lo,lo.next,vo)&&n$(fo,vo)&&n$(vo,fo)&&(at.push(fo.i/wt),at.push(lo.i/wt),at.push(vo.i/wt),Ay(lo),Ay(lo.next),lo=nt=vo),lo=lo.next}while(lo!==nt);return lo}function F2(nt,at,wt,lo,fo,vo){var ls=nt;do{for(var ff=ls.next.next;ff!==ls.prev;){if(ls.i!==ff.i&&B2(ls,ff)){var mf=z$(ls,ff);return ls=B$(ls,ls.next),mf=B$(mf,mf.next),v0(ls,at,wt,lo,fo,vo),void v0(mf,at,wt,lo,fo,vo)}ff=ff.next}ls=ls.next}while(ls!==nt)}function yw(nt,at){return nt.x-at.x}function t$(nt,at){if(at=function(lo,fo){var vo,ls=fo,ff=lo.x,mf=lo.y,bf=-1/0;do{if(mf<=ls.y&&mf>=ls.next.y&&ls.next.y!==ls.y){var Sf=ls.x+(mf-ls.y)*(ls.next.x-ls.x)/(ls.next.y-ls.y);if(Sf<=ff&&Sf>bf){if(bf=Sf,Sf===ff){if(mf===ls.y)return ls;if(mf===ls.next.y)return ls.next}vo=ls.x=ls.x&&ls.x>=jf&&ff!==ls.x&&zy(mfvo.x)&&n$(ls,lo)&&(vo=ls,Wf=wf),ls=ls.next;return vo}(nt,at)){var wt=z$(at,nt);B$(wt,wt.next)}}function Cx(nt,at,wt,lo,fo){return(nt=1431655765&((nt=858993459&((nt=252645135&((nt=16711935&((nt=32767*(nt-wt)*fo)|nt<<8))|nt<<4))|nt<<2))|nt<<1))|(at=1431655765&((at=858993459&((at=252645135&((at=16711935&((at=32767*(at-lo)*fo)|at<<8))|at<<4))|at<<2))|at<<1))<<1}function T_(nt){var at=nt,wt=nt;do at.x=0&&(nt-ls)*(lo-ff)-(wt-ls)*(at-ff)>=0&&(wt-ls)*(vo-ff)-(fo-ls)*(lo-ff)>=0}function B2(nt,at){return nt.next.i!==at.i&&nt.prev.i!==at.i&&!function(wt,lo){var fo=wt;do{if(fo.i!==wt.i&&fo.next.i!==wt.i&&fo.i!==lo.i&&fo.next.i!==lo.i&&r$(fo,fo.next,wt,lo))return!0;fo=fo.next}while(fo!==wt);return!1}(nt,at)&&n$(nt,at)&&n$(at,nt)&&function(wt,lo){var fo=wt,vo=!1,ls=(wt.x+lo.x)/2,ff=(wt.y+lo.y)/2;do fo.y>ff!=fo.next.y>ff&&fo.next.y!==fo.y&&ls<(fo.next.x-fo.x)*(ff-fo.y)/(fo.next.y-fo.y)+fo.x&&(vo=!vo),fo=fo.next;while(fo!==wt);return vo}(nt,at)}function gy(nt,at,wt){return(at.y-nt.y)*(wt.x-at.x)-(at.x-nt.x)*(wt.y-at.y)}function C1(nt,at){return nt.x===at.x&&nt.y===at.y}function r$(nt,at,wt,lo){return!!(C1(nt,at)&&C1(wt,lo)||C1(nt,lo)&&C1(wt,at))||gy(nt,at,wt)>0!=gy(nt,at,lo)>0&&gy(wt,lo,nt)>0!=gy(wt,lo,at)>0}function n$(nt,at){return gy(nt.prev,nt,nt.next)<0?gy(nt,at,nt.next)>=0&&gy(nt,nt.prev,at)>=0:gy(nt,at,nt.prev)<0||gy(nt,nt.next,at)<0}function z$(nt,at){var wt=new Ox(nt.i,nt.x,nt.y),lo=new Ox(at.i,at.x,at.y),fo=nt.next,vo=at.prev;return nt.next=at,at.prev=nt,wt.next=fo,fo.prev=wt,lo.next=wt,wt.prev=lo,vo.next=lo,lo.prev=vo,lo}function bw(nt,at,wt,lo){var fo=new Ox(nt,at,wt);return lo?(fo.next=lo.next,fo.prev=lo,lo.next.prev=fo,lo.next=fo):(fo.prev=fo,fo.next=fo),fo}function Ay(nt){nt.next.prev=nt.prev,nt.prev.next=nt.next,nt.prevZ&&(nt.prevZ.nextZ=nt.nextZ),nt.nextZ&&(nt.nextZ.prevZ=nt.prevZ)}function Ox(nt,at,wt){this.i=nt,this.x=at,this.y=wt,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function xv(nt,at,wt,lo){for(var fo=0,vo=at,ls=wt-lo;vo0&&(Sf+=ff[wf-1].length,bf.holes.push(Sf))}return bf}(nt),wt=mw(at.vertices,at.holes,2),lo=[],fo=[];wt.forEach(function(ff,mf){var bf=wt[mf];fo.push([at.vertices[2*bf],at.vertices[2*bf+1]])});for(var vo=0;vopp?Mf:pp,np>Uf?np:Uf]}(wf,If),Sf.push(jf),If}),Sf})(ff,lo.properties).forEach(function(mf){mf.id=fo.length,fo.push(mf)})})}})(wt,at)}),wo(at)}S_.deviation=function(nt,at,wt,lo){var fo=at&&at.length,vo=fo?at[0]*wt:nt.length,ls=Math.abs(xv(nt,0,vo,wt));if(fo)for(var ff=0,mf=at.length;ff0&&(lo+=nt[fo-1].length,wt.holes.push(lo))}return wt},mw.default=XE;var my=qv(function(nt,at){function wt(zf,Wf,Mf){Mf===void 0&&(Mf={});var np={type:"Feature"};return(Mf.id===0||Mf.id)&&(np.id=Mf.id),Mf.bbox&&(np.bbox=Mf.bbox),np.properties=Wf||{},np.geometry=zf,np}function lo(zf,Wf,Mf){if(Mf===void 0&&(Mf={}),!zf)throw new Error("coordinates is required");if(!Array.isArray(zf))throw new Error("coordinates must be an Array");if(zf.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!jf(zf[0])||!jf(zf[1]))throw new Error("coordinates must contain numbers");return wt({type:"Point",coordinates:zf},Wf,Mf)}function fo(zf,Wf,Mf){Mf===void 0&&(Mf={});for(var np=0,pp=zf;np=0))throw new Error("precision must be a positive number");var Mf=Math.pow(10,Wf||0);return Math.round(zf*Mf)/Mf},at.radiansToLength=Sf,at.lengthToRadians=wf,at.lengthToDegrees=function(zf,Wf){return If(wf(zf,Wf))},at.bearingToAzimuth=function(zf){var Wf=zf%360;return Wf<0&&(Wf+=360),Wf},at.radiansToDegrees=If,at.degreesToRadians=function(zf){return zf%360*Math.PI/180},at.convertLength=function(zf,Wf,Mf){if(Wf===void 0&&(Wf="kilometers"),Mf===void 0&&(Mf="kilometers"),!(zf>=0))throw new Error("length must be a positive number");return Sf(wf(zf,Wf),Mf)},at.convertArea=function(zf,Wf,Mf){if(Wf===void 0&&(Wf="meters"),Mf===void 0&&(Mf="kilometers"),!(zf>=0))throw new Error("area must be a positive number");var np=at.areaFactors[Wf];if(!np)throw new Error("invalid original units");var pp=at.areaFactors[Mf];if(!pp)throw new Error("invalid final units");return zf/np*pp},at.isNumber=jf,at.isObject=function(zf){return!!zf&&zf.constructor===Object},at.validateBBox=function(zf){if(!zf)throw new Error("bbox is required");if(!Array.isArray(zf))throw new Error("bbox must be an Array");if(zf.length!==4&&zf.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");zf.forEach(function(Wf){if(!jf(Wf))throw new Error("bbox must only contain numbers")})},at.validateId=function(zf){if(!zf)throw new Error("id is required");if(["string","number"].indexOf(typeof zf)===-1)throw new Error("id must be a number or a string")}});function o1(nt,at,wt){if(nt!==null)for(var lo,fo,vo,ls,ff,mf,bf,Sf,wf=0,If=0,jf=nt.type,zf=jf==="FeatureCollection",Wf=jf==="Feature",Mf=zf?nt.features.length:1,np=0;npmf||zf>bf||Wf>Sf)return ff=wf,mf=lo,bf=zf,Sf=Wf,void(vo=0);var Mf=my.lineString([ff,wf],wt.properties);if(at(Mf,lo,fo,Wf,vo)===!1)return!1;vo++,ff=wf})!==!1&&void 0}}})}function Q1(nt,at){if(!nt)throw new Error("geojson is required");i$(nt,function(wt,lo,fo){if(wt.geometry!==null){var vo=wt.geometry.type,ls=wt.geometry.coordinates;switch(vo){case"LineString":if(at(wt,lo,fo,0,0)===!1)return!1;break;case"Polygon":for(var ff=0;ffwt[0]&&(at[0]=wt[0]),at[1]>wt[1]&&(at[1]=wt[1]),at[2] line1 must only contain 2 coordinates");if(lo.length!==2)throw new Error(" line2 must only contain 2 coordinates");var fo=wt[0][0],vo=wt[0][1],ls=wt[1][0],ff=wt[1][1],mf=lo[0][0],bf=lo[0][1],Sf=lo[1][0],wf=lo[1][1],If=(wf-bf)*(ls-fo)-(Sf-mf)*(ff-vo),jf=(Sf-mf)*(vo-bf)-(wf-bf)*(fo-mf),zf=(ls-fo)*(vo-bf)-(ff-vo)*(fo-mf);if(If===0)return null;var Wf=jf/If,Mf=zf/If;return Wf>=0&&Wf<=1&&Mf>=0&&Mf<=1?ot([fo+Wf*(ls-fo),vo+Wf*(ff-vo)]):null}function I1(nt,at,wt){wt===void 0&&(wt={});var lo=ot([1/0,1/0],{dist:1/0}),fo=0;return ng(nt,function(vo){for(var ls=hp(vo),ff=0;ff0&&((Mf=Wf.features[0]).properties.dist=_m(at,Mf,wt),Mf.properties.location=fo+_m(mf,Mf,wt)),mf.properties.dist180?-360:lo[0]-fo[0]>180?360:0,Hf(function(vo,ls,ff){var mf=ff=ff===void 0?W:Number(ff),bf=vo[1]*Math.PI/180,Sf=ls[1]*Math.PI/180,wf=Sf-bf,If=Math.abs(ls[0]-vo[0])*Math.PI/180;If>Math.PI&&(If-=2*Math.PI);var jf=Math.log(Math.tan(Sf/2+Math.PI/4)/Math.tan(bf/2+Math.PI/4)),zf=Math.abs(jf)>1e-11?wf/jf:Math.cos(bf);return Math.sqrt(wf*wf+zf*zf*If*If)*mf}(lo,fo),"meters",wt.units)}function H2(nt,at,wt){if(wt===void 0&&(wt={}),wt.method||(wt.method="geodesic"),wt.units||(wt.units="kilometers"),!nt)throw new Error("pt is required");if(Array.isArray(nt)?nt=ot(nt):nt.type==="Point"?nt=tt(nt):bp(nt,"Point","point"),!at)throw new Error("line is required");Array.isArray(at)?at=po(at):at.type==="LineString"?at=tt(at):bp(at,"LineString","line");var lo=1/0,fo=nt.geometry.coordinates;return vg(at,function(vo){var ls=vo.geometry.coordinates[0],ff=vo.geometry.coordinates[1],mf=function(bf,Sf,wf,If){var jf=[wf[0]-Sf[0],wf[1]-Sf[1]],zf=Rx([bf[0]-Sf[0],bf[1]-Sf[1]],jf);if(zf<=0)return Tw(bf,Sf,{method:If.method,units:"degrees"});var Wf=Rx(jf,jf);if(Wf<=zf)return Tw(bf,wf,{method:If.method,units:"degrees"});var Mf=zf/Wf,np=[Sf[0]+Mf*jf[0],Sf[1]+Mf*jf[1]];return Tw(bf,np,{method:If.method,units:"degrees"})}(fo,ls,ff,wt);mf=0&&bf<=1&&(If.onLine1=!0),Sf>=0&&Sf<=1&&(If.onLine2=!0),!(!If.onLine1||!If.onLine2)&&[If.x,If.y])}function U2(nt){for(var at=function(If){return If.type!=="FeatureCollection"?If.type!=="Feature"?wo([tt(If)]):wo([If]):If}(nt),wt=n1(at),lo=!1,fo=0;!lo&&fo0){at+=Math.abs(a1(nt[0]));for(var wt=1;wt2){for(ls=0;ls=Sf&&wf===fo.length-1);wf++){if(Sf>at&&vo.length===0){if(!(ls=at-Sf))return vo.push(fo[wf]),po(vo);ff=k1(fo[wf],fo[wf-1])-180,mf=$y(fo[wf],ls,ff,lo),vo.push(mf.geometry.coordinates)}if(Sf>=wt)return(ls=wt-Sf)?(ff=k1(fo[wf],fo[wf-1])-180,mf=$y(fo[wf],ls,ff,lo),vo.push(mf.geometry.coordinates),po(vo)):(vo.push(fo[wf]),po(vo));if(Sf>=at&&vo.push(fo[wf]),wf===fo.length-1)return po(vo);Sf+=_m(fo[wf],fo[wf+1],lo)}if(Sffo)return!1}else if(jf!==0)return!1;return lo?lo==="start"?Math.abs(wf)>=Math.abs(If)?wf>0?ff0?mf=Math.abs(If)?wf>0?ff<=vo&&vo0?mf<=ls&&ls=Math.abs(If)?wf>0?ff0?mf=Math.abs(If)?wf>0?ff<=vo&&vo<=bf:bf<=vo&&vo<=ff:If>0?mf<=ls&&ls<=Sf:Sf<=ls&&ls<=mf}function q$(nt,at){var wt=_p(nt),lo=_p(at),fo=wt.type,vo=lo.type;switch(fo){case"Point":switch(vo){case"MultiPoint":return function(ls,ff){var mf,bf=!1;for(mf=0;mfat[0])&&!(nt[2]at[1])&&!(nt[3] is required");if(typeof wt!="number")throw new Error(" must be a number");if(typeof lo!="number")throw new Error(" must be a number");fo!==!1&&fo!==void 0||(nt=JSON.parse(JSON.stringify(nt)));var vo=Math.pow(10,wt);return rp(nt,function(ls){(function(ff,mf,bf){ff.length>bf&&ff.splice(bf,ff.length);for(var Sf=0;Sf=1||tp<=0||op>=1||op<=0))){var zp=rg,lg=!vo[zp];lg&&(vo[zp]=!0),at?fo.push(at(rg,Mf,np,up,sp,tp,pp,Uf,Qp,Ap,op,lg)):fo.push(rg)}}function Wf(Mf,np){var pp,Uf,tp,op,up=lo[Mf][np],sp=lo[Mf][np+1];return up[0]wf[em.isect].coord?-1:1}),mf=[];tp.length>0;){var Ap=tp.pop(),rg=Ap.isect,zp=Ap.parent,lg=Ap.winding,qp=mf.length,Wp=[wf[rg].coord],Up=rg;if(wf[rg].ringAndEdge1Walkable)var ig=wf[rg].ringAndEdge1,Xp=wf[rg].nxtIsectAlongRingAndEdge1;else ig=wf[rg].ringAndEdge2,Xp=wf[rg].nxtIsectAlongRingAndEdge2;for(;!pf(wf[rg].coord,wf[Xp].coord);){Wp.push(wf[Xp].coord);var cg=void 0;for(lo=0;lo1)for(em=0;em=0==at}function yo(nt){for(var at=0,wt=0;wt1&&wt.push(po(bf)),wo(wt)}function hm(nt,at){if(!at.features.length)throw new Error("lines must contain features");if(at.features.length===1)return at.features[0];var wt,lo=1/0;return vp(at,function(fo){var vo=I1(fo,nt).properties.dist;voSf&&If.push($y(nt,at,Sf,fo).geometry.coordinates),po(If,mf)}function ry(nt){var at=nt%360;return at<0&&(at+=360),at}function Xy(nt,at){at===void 0&&(at={});var wt=_p(nt);switch(at.properties||nt.type!=="Feature"||(at.properties=nt.properties),wt.type){case"Polygon":return i0(wt,at);case"MultiPolygon":return function(lo,fo){fo===void 0&&(fo={});var vo=_p(lo).coordinates,ls=fo.properties?fo.properties:lo.type==="Feature"?lo.properties:{},ff=[];return vo.forEach(function(mf){ff.push(Ob(mf,ls))}),wo(ff)}(wt,at);default:throw new Error("invalid poly")}}function i0(nt,at){return at===void 0&&(at={}),Ob(_p(nt).coordinates,at.properties?at.properties:nt.type==="Feature"?nt.properties:{})}function Ob(nt,at){return nt.length>1?lf(nt,at):po(nt[0],at)}function W2(nt,at){var wt,lo,fo;at===void 0&&(at={});var vo=at.properties,ls=(wt=at.autoComplete)===null||wt===void 0||wt,ff=(lo=at.orderCoords)===null||lo===void 0||lo;switch((fo=at.mutate)!==null&&fo!==void 0&&fo||(nt=Iv(nt)),nt.type){case"FeatureCollection":var mf=[];return nt.features.forEach(function(bf){mf.push(hp(Lx(bf,{},ls,ff)))}),cf(mf,vo);default:return Lx(nt,vo,ls,ff)}}function Lx(nt,at,wt,lo){at=at||(nt.type==="Feature"?nt.properties:{});var fo=_p(nt),vo=fo.coordinates,ls=fo.type;if(!vo.length)throw new Error("line must contain coordinates");switch(ls){case"LineString":return wt&&(vo=l$(vo)),yn([vo],at);case"MultiLineString":var ff=[],mf=0;return vo.forEach(function(bf){if(wt&&(bf=l$(bf)),lo){var Sf=function(wf){var If=wf[0],jf=wf[1],zf=wf[2],Wf=wf[3];return Math.abs(If-zf)*Math.abs(jf-Wf)}(qf(po(bf)));Sf>mf?(ff.unshift(bf),mf=Sf):ff.push(bf)}else ff.push(bf)}),yn(ff,at);default:throw new Error("geometry type "+ls+" is not supported")}}function l$(nt){var at=nt[0],wt=at[0],lo=at[1],fo=nt[nt.length-1],vo=fo[0],ls=fo[1];return wt===vo&&lo===ls||nt.push(at),nt}function c$(nt,at){var wt,lo,fo,vo,ls,ff,mf;for(lo=1;lo<=8;lo*=2){for(wt=[],vo=!(rb(fo=nt[nt.length-1],at)&lo),ls=0;lsat[2]&&(wt|=2),nt[1]at[3]&&(wt|=8),wt}function ny(nt,at){for(var wt=[],lo=0,fo=nt;lo0&&(vo[0][0]===vo[vo.length-1][0]&&vo[0][1]===vo[vo.length-1][1]||vo.push(vo[0]),vo.length>=4&&wt.push(vo))}return wt}sg.prototype.interpolate=function(nt){var at=Math.sin((1-nt)*this.g)/Math.sin(this.g),wt=Math.sin(nt*this.g)/Math.sin(this.g),lo=at*Math.cos(this.start.y)*Math.cos(this.start.x)+wt*Math.cos(this.end.y)*Math.cos(this.end.x),fo=at*Math.cos(this.start.y)*Math.sin(this.start.x)+wt*Math.cos(this.end.y)*Math.sin(this.end.x),vo=at*Math.sin(this.start.y)+wt*Math.sin(this.end.y),ls=Zf*Math.atan2(vo,Math.sqrt(Math.pow(lo,2)+Math.pow(fo,2)));return[Zf*Math.atan2(fo,lo),ls]},sg.prototype.Arc=function(nt,at){var wt=[];if(!nt||nt<=2)wt.push([this.start.lon,this.start.lat]),wt.push([this.end.lon,this.end.lat]);else for(var lo=1/(nt-1),fo=0;foIf&&(Wf>Sf&&zfSf&&Wfmf&&(mf=Mf)}var np=[];if(ff&&mf0&&Math.abs(tp-wt[Uf-1][0])>If){var op=parseFloat(wt[Uf-1][0]),up=parseFloat(wt[Uf-1][1]),sp=parseFloat(wt[Uf][0]),Qp=parseFloat(wt[Uf][1]);if(op>-180&&op-180&&wt[Uf-1][0]Sf&&op<180&&sp===-180&&Uf+1Sf&&wt[Uf-1][0]<180){pp.push([180,wt[Uf][1]]),Uf++,pp.push([wt[Uf][0],wt[Uf][1]]);continue}if(opSf){var Ap=op;op=sp,sp=Ap;var rg=up;up=Qp,Qp=rg}if(op>Sf&&sp=180&&opSf?180:-180,lg]),(pp=[]).push([wt[Uf-1][0]>Sf?-180:180,lg]),np.push(pp)}else pp=[],np.push(pp);pp.push([tp,wt[Uf][1]])}else pp.push([wt[Uf][0],wt[Uf][1]])}}else{var qp=[];np.push(qp);for(var Wp=0;Wp=0;wf--)if(jf[wf]!=zf[wf])return!1;for(wf=jf.length-1;wf>=0;wf--)if(If=jf[wf],!wt(mf[If],bf[If],Sf))return!1;return typeof mf==typeof bf}(vo,ls,ff))};function lo(vo){return vo==null}function fo(vo){return!(!vo||typeof vo!="object"||typeof vo.length!="number")&&typeof vo.copy=="function"&&typeof vo.slice=="function"&&!(vo.length>0&&typeof vo[0]!="number")}});function Aw(nt,at,wt){if(wt===void 0&&(wt={}),!kf(wt=wt||{}))throw new Error("options is invalid");var lo,fo=wt.tolerance||0,vo=[],ls=zv(),ff=_y(nt);return ls.load(ff),vg(at,function(mf){var bf=!1;mf&&(vp(ls.search(mf),function(Sf){if(bf===!1){var wf=hp(mf).sort(),If=hp(Sf).sort();Z$(wf,If)||(fo===0?$0(wf[0],Sf)&&$0(wf[1],Sf):I1(Sf,wf[0]).properties.dist<=fo&&I1(Sf,wf[1]).properties.dist<=fo)?(bf=!0,lo=lo?N_(lo,mf):mf):(fo===0?$0(If[0],mf)&&$0(If[1],mf):I1(mf,If[0]).properties.dist<=fo&&I1(mf,If[1]).properties.dist<=fo)&&(lo=lo?N_(lo,Sf):Sf)}}),bf===!1&&lo&&(vo.push(lo),lo=void 0))}),lo&&vo.push(lo),wo(vo)}function N_(nt,at){var wt=hp(at),lo=hp(nt),fo=lo[0],vo=lo[lo.length-1],ls=nt.geometry.coordinates;return Z$(wt[0],fo)?ls.unshift(wt[1]):Z$(wt[0],vo)?ls.push(wt[1]):Z$(wt[1],fo)?ls.unshift(wt[0]):Z$(wt[1],vo)&&ls.push(wt[0]),nt}function Rw(nt){var at=nt%360;return at<0&&(at+=360),at}function u$(nt,at,wt){var lo;return wt===void 0&&(wt={}),(lo=wt.final?nS(cp(at),cp(nt)):nS(cp(nt),cp(at)))>180?-(360-lo):lo}function nS(nt,at){var wt=Bf(nt[1]),lo=Bf(at[1]),fo=Bf(at[0]-nt[0]);fo>Math.PI&&(fo-=2*Math.PI),fo<-Math.PI&&(fo+=2*Math.PI);var vo=Math.log(Math.tan(lo/2+Math.PI/4)/Math.tan(wt/2+Math.PI/4));return(Pf(Math.atan2(fo,vo))+360)%360}function Nw(nt,at,wt,lo){lo===void 0&&(lo={});var fo=at<0,vo=Hf(Math.abs(at),lo.units,"meters");fo&&(vo=-Math.abs(vo));var ls=cp(nt),ff=function(mf,bf,Sf,wf){wf=wf===void 0?W:Number(wf);var If=bf/wf,jf=mf[0]*Math.PI/180,zf=Bf(mf[1]),Wf=Bf(Sf),Mf=If*Math.cos(Wf),np=zf+Mf;Math.abs(np)>Math.PI/2&&(np=np>0?Math.PI-np:-Math.PI-np);var pp=Math.log(Math.tan(np/2+Math.PI/4)/Math.tan(zf/2+Math.PI/4)),Uf=Math.abs(pp)>1e-11?Mf/pp:Math.cos(zf),tp=If*Math.sin(Wf)/Uf;return[(180*(jf+tp)/Math.PI+540)%360-180,180*np/Math.PI]}(ls,vo,wt);return ff[0]+=ff[0]-ls[0]>180?-360:ls[0]-ff[0]>180?360:0,ot(ff,lo.properties)}function iS(nt,at,wt,lo,fo,vo){for(var ls=0;ls0?h$(at,ff,fo)<0||(fo=ff):wt>0&&lo<=0&&(mv(at,ff,vo)||(vo=ff)),wt=lo}return[fo,vo]}function mv(nt,at,wt){return h$(nt,at,wt)>0}function h$(nt,at,wt){return(at[0]-nt[0])*(wt[1]-nt[1])-(wt[0]-nt[0])*(at[1]-nt[1])}function Bx(nt){for(var at,wt,lo=hp(nt),fo=0,vo=1;vo0}function d$(nt,at){switch(nt.type==="Feature"?nt.geometry.type:nt.type){case"GeometryCollection":return Ip(nt,function(wt){d$(wt,at)}),nt;case"LineString":return Y2(hp(nt),at),nt;case"Polygon":return J$(hp(nt),at),nt;case"MultiLineString":return hp(nt).forEach(function(wt){Y2(wt,at)}),nt;case"MultiPolygon":return hp(nt).forEach(function(wt){J$(wt,at)}),nt;case"Point":case"MultiPoint":return nt}}function Y2(nt,at){Bx(nt)===at&&nt.reverse()}function J$(nt,at){Bx(nt[0])!==at&&nt[0].reverse();for(var wt=1;wtMf?128:64,Uf|=opMf?32:16,Uf|=upMf?8:4;var Qp=+(Uf|=spMf?2:1),Ap=0;if(Uf===17||Uf===18||Uf===33||Uf===34||Uf===38||Uf===68||Uf===72||Uf===98||Uf===102||Uf===132||Uf===136||Uf===137||Uf===152||Uf===153){var rg=(tp+op+up+sp)/4;Ap=rg>Mf?2:rg0?(Uf=156,Ap=4):Uf=152:Uf===33?Ap>0?(Uf=139,Ap=4):Uf=137:Uf===72?Ap>0?(Uf=99,Ap=4):Uf=98:Uf===132&&(Ap>0?(Uf=39,Ap=4):Uf=38)}if(Uf!=0&&Uf!=170){var zp,lg,qp,Wp,Up,ig,Xp,cg;zp=lg=qp=Wp=Up=ig=Xp=cg=.5;var Sp=[];Uf===1?(qp=1-dp(wf,up,sp),cg=1-dp(wf,tp,sp),Sp.push(Yg[Uf])):Uf===169?(qp=dp(Mf,sp,up),cg=dp(Mf,sp,tp),Sp.push(Yg[Uf])):Uf===4?(ig=1-dp(wf,op,up),Wp=dp(wf,sp,up),Sp.push(Fg[Uf])):Uf===166?(ig=dp(Mf,up,op),Wp=1-dp(Mf,up,sp),Sp.push(Fg[Uf])):Uf===16?(Up=dp(wf,up,op),lg=dp(wf,tp,op),Sp.push(jg[Uf])):Uf===154?(Up=1-dp(Mf,op,up),lg=1-dp(Mf,op,tp),Sp.push(jg[Uf])):Uf===64?(Xp=dp(wf,sp,tp),zp=1-dp(wf,op,tp),Sp.push(rm[Uf])):Uf===106?(Xp=1-dp(Mf,tp,sp),zp=dp(Mf,tp,op),Sp.push(rm[Uf])):Uf===168?(Wp=dp(Mf,sp,up),qp=dp(wf,sp,up),cg=dp(wf,sp,tp),Xp=dp(Mf,sp,tp),Sp.push(Qg[Uf]),Sp.push(Yg[Uf])):Uf===2?(Wp=1-dp(wf,up,sp),qp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(wf,tp,sp),Sp.push(Qg[Uf]),Sp.push(Yg[Uf])):Uf===162?(Up=dp(Mf,up,op),ig=dp(wf,up,op),Wp=1-dp(wf,up,sp),qp=1-dp(Mf,up,sp),Sp.push(Qg[Uf]),Sp.push(Yg[Uf])):Uf===8?(Up=1-dp(wf,op,up),ig=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(wf,sp,up),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===138?(Up=1-dp(wf,op,up),ig=1-dp(Mf,op,up),zp=1-dp(Mf,op,tp),lg=1-dp(wf,op,tp),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===32?(Up=dp(Mf,up,op),ig=dp(wf,up,op),zp=dp(wf,tp,op),lg=dp(Mf,tp,op),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===42?(cg=1-dp(Mf,tp,sp),Xp=1-dp(wf,tp,sp),zp=dp(wf,tp,op),lg=dp(Mf,tp,op),Sp.push(om[Uf]),Sp.push(rm[Uf])):Uf===128&&(cg=dp(wf,sp,tp),Xp=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(wf,op,tp),Sp.push(om[Uf]),Sp.push(rm[Uf])),Uf===5?(ig=1-dp(wf,op,up),cg=1-dp(wf,tp,sp),Sp.push(Fg[Uf])):Uf===165?(ig=dp(Mf,up,op),cg=dp(Mf,sp,tp),Sp.push(Fg[Uf])):Uf===20?(Wp=dp(wf,sp,up),lg=dp(wf,tp,op),Sp.push(Qg[Uf])):Uf===150?(Wp=1-dp(Mf,up,sp),lg=1-dp(Mf,op,tp),Sp.push(Qg[Uf])):Uf===80?(Up=dp(wf,up,op),Xp=dp(wf,sp,tp),Sp.push(jg[Uf])):Uf===90?(Up=1-dp(Mf,op,up),Xp=1-dp(Mf,tp,sp),Sp.push(jg[Uf])):Uf===65?(qp=1-dp(wf,up,sp),zp=1-dp(wf,op,tp),Sp.push(Yg[Uf])):Uf===105?(qp=dp(Mf,sp,up),zp=dp(Mf,tp,op),Sp.push(Yg[Uf])):Uf===160?(Up=dp(Mf,up,op),ig=dp(wf,up,op),cg=dp(wf,sp,tp),Xp=dp(Mf,sp,tp),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===10?(Up=1-dp(wf,op,up),ig=1-dp(Mf,op,up),cg=1-dp(Mf,tp,sp),Xp=1-dp(wf,tp,sp),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===130?(Wp=1-dp(wf,up,sp),qp=1-dp(Mf,up,sp),zp=1-dp(Mf,op,tp),lg=1-dp(wf,op,tp),Sp.push(Qg[Uf]),Sp.push(Yg[Uf])):Uf===40?(Wp=dp(Mf,sp,up),qp=dp(wf,sp,up),zp=dp(wf,tp,op),lg=dp(Mf,tp,op),Sp.push(Qg[Uf]),Sp.push(Yg[Uf])):Uf===101?(ig=dp(Mf,up,op),zp=dp(Mf,tp,op),Sp.push(Fg[Uf])):Uf===69?(ig=1-dp(wf,op,up),zp=1-dp(wf,op,tp),Sp.push(Fg[Uf])):Uf===149?(cg=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp),Sp.push(om[Uf])):Uf===21?(cg=1-dp(wf,tp,sp),lg=dp(wf,tp,op),Sp.push(om[Uf])):Uf===86?(Wp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),Sp.push(Qg[Uf])):Uf===84?(Wp=dp(wf,sp,up),Xp=dp(wf,sp,tp),Sp.push(Qg[Uf])):Uf===89?(Up=1-dp(Mf,op,up),qp=dp(Mf,sp,up),Sp.push(Yg[Uf])):Uf===81?(Up=dp(wf,up,op),qp=1-dp(wf,up,sp),Sp.push(Yg[Uf])):Uf===96?(Up=dp(Mf,up,op),ig=dp(wf,up,op),Xp=dp(wf,sp,tp),zp=dp(Mf,tp,op),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===74?(Up=1-dp(wf,op,up),ig=1-dp(Mf,op,up),Xp=1-dp(Mf,tp,sp),zp=1-dp(wf,op,tp),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===24?(Up=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(wf,sp,up),lg=dp(wf,tp,op),Sp.push(jg[Uf]),Sp.push(Yg[Uf])):Uf===146?(Up=dp(wf,up,op),Wp=1-dp(wf,up,sp),qp=1-dp(Mf,up,sp),lg=1-dp(Mf,op,tp),Sp.push(jg[Uf]),Sp.push(Yg[Uf])):Uf===6?(ig=1-dp(wf,op,up),Wp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(wf,tp,sp),Sp.push(Fg[Uf]),Sp.push(Qg[Uf])):Uf===164?(ig=dp(Mf,up,op),Wp=dp(wf,sp,up),cg=dp(wf,sp,tp),Xp=dp(Mf,sp,tp),Sp.push(Fg[Uf]),Sp.push(Qg[Uf])):Uf===129?(qp=1-dp(wf,up,sp),cg=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(wf,op,tp),Sp.push(Yg[Uf]),Sp.push(om[Uf])):Uf===41?(qp=dp(Mf,sp,up),cg=1-dp(wf,tp,sp),zp=dp(wf,tp,op),lg=dp(Mf,tp,op),Sp.push(Yg[Uf]),Sp.push(om[Uf])):Uf===66?(Wp=1-dp(wf,up,sp),qp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),zp=1-dp(wf,op,tp),Sp.push(Qg[Uf]),Sp.push(Yg[Uf])):Uf===104?(Wp=dp(Mf,sp,up),qp=dp(wf,sp,up),Xp=dp(wf,sp,tp),zp=dp(Mf,tp,op),Sp.push(Yg[Uf]),Sp.push(nv[Uf])):Uf===144?(Up=dp(wf,up,op),cg=dp(wf,sp,tp),Xp=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp),Sp.push(jg[Uf]),Sp.push(rm[Uf])):Uf===26?(Up=1-dp(Mf,op,up),cg=1-dp(Mf,tp,sp),Xp=1-dp(wf,tp,sp),lg=dp(wf,tp,op),Sp.push(jg[Uf]),Sp.push(rm[Uf])):Uf===36?(ig=dp(Mf,up,op),Wp=dp(wf,sp,up),zp=dp(wf,tp,op),lg=dp(Mf,tp,op),Sp.push(Fg[Uf]),Sp.push(Qg[Uf])):Uf===134?(ig=1-dp(wf,op,up),Wp=1-dp(Mf,up,sp),zp=1-dp(Mf,op,tp),lg=1-dp(wf,op,tp),Sp.push(Fg[Uf]),Sp.push(Qg[Uf])):Uf===9?(Up=1-dp(wf,op,up),ig=1-dp(Mf,op,up),qp=dp(Mf,sp,up),cg=1-dp(wf,tp,sp),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===161?(Up=dp(Mf,up,op),ig=dp(wf,up,op),qp=1-dp(wf,up,sp),cg=dp(Mf,sp,tp),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===37?(ig=dp(Mf,up,op),cg=1-dp(wf,tp,sp),zp=dp(wf,tp,op),lg=dp(Mf,tp,op),Sp.push(Fg[Uf]),Sp.push(om[Uf])):Uf===133?(ig=1-dp(wf,op,up),cg=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(wf,op,tp),Sp.push(Fg[Uf]),Sp.push(om[Uf])):Uf===148?(Wp=dp(wf,sp,up),cg=dp(wf,sp,tp),Xp=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp),Sp.push(Qg[Uf]),Sp.push(rm[Uf])):Uf===22?(Wp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(wf,tp,sp),lg=dp(wf,tp,op),Sp.push(Qg[Uf]),Sp.push(rm[Uf])):Uf===82?(Up=dp(wf,up,op),Wp=1-dp(wf,up,sp),qp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),Sp.push(jg[Uf]),Sp.push(Yg[Uf])):Uf===88?(Up=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(wf,sp,up),Xp=dp(wf,sp,tp),Sp.push(jg[Uf]),Sp.push(Yg[Uf])):Uf===73?(Up=1-dp(wf,op,up),ig=1-dp(Mf,op,up),qp=dp(Mf,sp,up),zp=1-dp(wf,op,tp),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===97?(Up=dp(Mf,up,op),ig=dp(wf,up,op),qp=1-dp(wf,up,sp),zp=dp(Mf,tp,op),Sp.push(jg[Uf]),Sp.push(Fg[Uf])):Uf===145?(Up=dp(wf,up,op),qp=1-dp(wf,up,sp),cg=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp),Sp.push(jg[Uf]),Sp.push(om[Uf])):Uf===25?(Up=1-dp(Mf,op,up),qp=dp(Mf,sp,up),cg=1-dp(wf,tp,sp),lg=dp(wf,tp,op),Sp.push(jg[Uf]),Sp.push(om[Uf])):Uf===70?(ig=1-dp(wf,op,up),Wp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),zp=1-dp(wf,op,tp),Sp.push(Fg[Uf]),Sp.push(Qg[Uf])):Uf===100?(ig=dp(Mf,up,op),Wp=dp(wf,sp,up),Xp=dp(wf,sp,tp),zp=dp(Mf,tp,op),Sp.push(Fg[Uf]),Sp.push(Qg[Uf])):Uf===34?(Ap===0?(Up=1-dp(wf,op,up),ig=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(wf,sp,up),cg=dp(wf,sp,tp),Xp=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(wf,op,tp)):(Up=dp(Mf,up,op),ig=dp(wf,up,op),Wp=1-dp(wf,up,sp),qp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(wf,tp,sp),zp=dp(wf,tp,op),lg=dp(Mf,tp,op)),Sp.push(jg[Uf]),Sp.push(Fg[Uf]),Sp.push(om[Uf]),Sp.push(rm[Uf])):Uf===35?(Ap===4?(Up=1-dp(wf,op,up),ig=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(wf,sp,up),cg=dp(wf,sp,tp),Xp=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(wf,op,tp)):(Up=dp(Mf,up,op),ig=dp(wf,up,op),Wp=1-dp(wf,up,sp),qp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(wf,tp,sp),zp=dp(wf,tp,op),lg=dp(Mf,tp,op)),Sp.push(jg[Uf]),Sp.push(Fg[Uf]),Sp.push(Yg[Uf]),Sp.push(rm[Uf])):Uf===136?(Ap===0?(Up=dp(Mf,up,op),ig=dp(wf,up,op),Wp=1-dp(wf,up,sp),qp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(wf,tp,sp),zp=dp(wf,tp,op),lg=dp(Mf,tp,op)):(Up=1-dp(wf,op,up),ig=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(wf,sp,up),cg=dp(wf,sp,tp),Xp=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(wf,op,tp)),Sp.push(jg[Uf]),Sp.push(Fg[Uf]),Sp.push(om[Uf]),Sp.push(rm[Uf])):Uf===153?(Ap===0?(Up=dp(wf,up,op),qp=1-dp(wf,up,sp),cg=1-dp(wf,tp,sp),lg=dp(wf,tp,op)):(Up=1-dp(Mf,op,up),qp=dp(Mf,sp,up),cg=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp)),Sp.push(jg[Uf]),Sp.push(Yg[Uf])):Uf===102?(Ap===0?(ig=1-dp(wf,op,up),Wp=dp(wf,sp,up),Xp=dp(wf,sp,tp),zp=1-dp(wf,op,tp)):(ig=dp(Mf,up,op),Wp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),zp=dp(Mf,tp,op)),Sp.push(Fg[Uf]),Sp.push(rm[Uf])):Uf===155?(Ap===4?(Up=dp(wf,up,op),qp=1-dp(wf,up,sp),cg=1-dp(wf,tp,sp),lg=dp(wf,tp,op)):(Up=1-dp(Mf,op,up),qp=dp(Mf,sp,up),cg=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp)),Sp.push(jg[Uf]),Sp.push(om[Uf])):Uf===103?(Ap===4?(ig=1-dp(wf,op,up),Wp=dp(wf,sp,up),Xp=dp(wf,sp,tp),zp=1-dp(wf,op,tp)):(ig=dp(Mf,up,op),Wp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),zp=dp(Mf,tp,op)),Sp.push(Fg[Uf]),Sp.push(Qg[Uf])):Uf===152?(Ap===0?(Up=dp(wf,up,op),Wp=1-dp(wf,up,sp),qp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(wf,tp,sp),lg=dp(wf,tp,op)):(Up=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(wf,sp,up),cg=dp(wf,sp,tp),Xp=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp)),Sp.push(jg[Uf]),Sp.push(Qg[Uf]),Sp.push(Yg[Uf])):Uf===156?(Ap===4?(Up=dp(wf,up,op),Wp=1-dp(wf,up,sp),qp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(wf,tp,sp),lg=dp(wf,tp,op)):(Up=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(wf,sp,up),cg=dp(wf,sp,tp),Xp=dp(Mf,sp,tp),lg=1-dp(Mf,op,tp)),Sp.push(jg[Uf]),Sp.push(Yg[Uf]),Sp.push(rm[Uf])):Uf===137?(Ap===0?(Up=dp(Mf,up,op),ig=dp(wf,up,op),qp=1-dp(wf,up,sp),cg=1-dp(wf,tp,sp),zp=dp(wf,tp,op),lg=dp(Mf,tp,op)):(Up=1-dp(wf,op,up),ig=1-dp(Mf,op,up),qp=dp(Mf,sp,up),cg=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(wf,op,tp)),Sp.push(jg[Uf]),Sp.push(Fg[Uf]),Sp.push(Yg[Uf])):Uf===139?(Ap===4?(Up=dp(Mf,up,op),ig=dp(wf,up,op),qp=1-dp(wf,up,sp),cg=1-dp(wf,tp,sp),zp=dp(wf,tp,op),lg=dp(Mf,tp,op)):(Up=1-dp(wf,op,up),ig=1-dp(Mf,op,up),qp=dp(Mf,sp,up),cg=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(wf,op,tp)),Sp.push(jg[Uf]),Sp.push(Fg[Uf]),Sp.push(om[Uf])):Uf===98?(Ap===0?(Up=1-dp(wf,op,up),ig=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(wf,sp,up),Xp=dp(wf,sp,tp),zp=1-dp(wf,op,tp)):(Up=dp(Mf,up,op),ig=dp(wf,up,op),Wp=1-dp(wf,up,sp),qp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),zp=dp(Mf,tp,op)),Sp.push(jg[Uf]),Sp.push(Fg[Uf]),Sp.push(rm[Uf])):Uf===99?(Ap===4?(Up=1-dp(wf,op,up),ig=1-dp(Mf,op,up),Wp=dp(Mf,sp,up),qp=dp(wf,sp,up),Xp=dp(wf,sp,tp),zp=1-dp(wf,op,tp)):(Up=dp(Mf,up,op),ig=dp(wf,up,op),Wp=1-dp(wf,up,sp),qp=1-dp(Mf,up,sp),Xp=1-dp(Mf,tp,sp),zp=dp(Mf,tp,op)),Sp.push(jg[Uf]),Sp.push(Fg[Uf]),Sp.push(Yg[Uf])):Uf===38?(Ap===0?(ig=1-dp(wf,op,up),Wp=dp(wf,sp,up),cg=dp(wf,sp,tp),Xp=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(wf,op,tp)):(ig=dp(Mf,up,op),Wp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(wf,tp,sp),zp=dp(wf,tp,op),lg=dp(Mf,tp,op)),Sp.push(Fg[Uf]),Sp.push(om[Uf]),Sp.push(rm[Uf])):Uf===39?(Ap===4?(ig=1-dp(wf,op,up),Wp=dp(wf,sp,up),cg=dp(wf,sp,tp),Xp=dp(Mf,sp,tp),zp=1-dp(Mf,op,tp),lg=1-dp(wf,op,tp)):(ig=dp(Mf,up,op),Wp=1-dp(Mf,up,sp),cg=1-dp(Mf,tp,sp),Xp=1-dp(wf,tp,sp),zp=dp(wf,tp,op),lg=dp(Mf,tp,op)),Sp.push(Fg[Uf]),Sp.push(Qg[Uf]),Sp.push(rm[Uf])):Uf===85&&(Up=1,ig=0,Wp=1,qp=0,cg=0,Xp=1,zp=0,lg=1),(zp<0||zp>1||lg<0||lg>1||Up<0||Up>1||Wp<0||Wp>1||cg<0||cg>1||Xp<0||Xp>1)&&console.log("MarchingSquaresJS-isoBands: "+Uf+" "+Qp+" "+tp+","+op+","+up+","+sp+" "+Ap+" "+zp+" "+lg+" "+Up+" "+ig+" "+Wp+" "+qp+" "+cg+" "+Xp),Wf.cells[np][pp]={cval:Uf,cval_real:Qp,flipped:Ap,topleft:zp,topright:lg,righttop:Up,rightbottom:ig,bottomright:Wp,bottomleft:qp,leftbottom:cg,lefttop:Xp,edges:Sp}}}}}return Wf}(nt,at,wt);return P1.polygons?(P1.verbose&&console.log("MarchingSquaresJS-isoBands: returning single polygons for each grid cell"),mf=function(Sf){var wf=[],If=0;return Sf.cells.forEach(function(jf,zf){jf.forEach(function(Wf,Mf){if(Wf!==void 0){var np=Ig[Wf.cval](Wf);typeof np=="object"&&fS(np)?typeof np[0]=="object"&&fS(np[0])?typeof np[0][0]=="object"&&fS(np[0][0])?np.forEach(function(pp){pp.forEach(function(Uf){Uf[0]+=Mf,Uf[1]+=zf}),wf[If++]=pp}):(np.forEach(function(pp){pp[0]+=Mf,pp[1]+=zf}),wf[If++]=np):console.log("MarchingSquaresJS-isoBands: bandcell polygon with malformed coordinates"):console.log("MarchingSquaresJS-isoBands: bandcell polygon with null coordinates")}})}),wf}(bf)):(P1.verbose&&console.log("MarchingSquaresJS-isoBands: returning polygon paths for entire data grid"),mf=function(Sf){for(var wf=[],If=Sf.rows,jf=Sf.cols,zf=[],Wf=0;Wf0){var np=jx(Sf.cells[Wf][Mf]),pp=null,Uf=Mf,tp=Wf;np!==null&&zf.push([np.p[0]+Uf,np.p[1]+tp]);do{if((pp=FC(Sf.cells[tp][Uf],np.x,np.y,np.o))===null)break;if(zf.push([pp.p[0]+Uf,pp.p[1]+tp]),Uf+=pp.x,np=pp,(tp+=pp.y)<0||tp>=If||Uf<0||Uf>=jf||Sf.cells[tp][Uf]===void 0){var op=LC(Sf,Uf-=pp.x,tp-=pp.y,pp.x,pp.y,pp.o);if(op===null)break;op.path.forEach(function(up){zf.push(up)}),Uf=op.i,tp=op.j,np=op}}while(Sf.cells[tp][Uf]!==void 0&&Sf.cells[tp][Uf].edges.length>0);wf.push(zf),zf=[],Sf.cells[Wf][Mf].edges.length>0&&Mf--}return wf}(bf)),typeof P1.successCallback=="function"&&P1.successCallback(mf),mf}var vy=64,ib=16,km=[],Gm=[],Fm=[],Pm=[],Am=[],Wm=[],qm=[],Bm=[],Rm=[],Ym=[],Km=[],Xm=[],Zm=[],sm=[],jm=[],zm=[],Jm=[],Em=[],Qm=[],ev=[],tv=[],Nm=[],rv=[],Hm=[];qm[85]=Ym[85]=-1,Bm[85]=Km[85]=0,Rm[85]=Xm[85]=1,Qm[85]=Nm[85]=1,ev[85]=rv[85]=0,tv[85]=Hm[85]=1,km[85]=Pm[85]=0,Gm[85]=Am[85]=-1,Fm[85]=jm[85]=0,zm[85]=Zm[85]=0,Jm[85]=sm[85]=1,Wm[85]=Em[85]=1,Nm[1]=Nm[169]=0,rv[1]=rv[169]=-1,Hm[1]=Hm[169]=0,Zm[1]=Zm[169]=-1,sm[1]=sm[169]=0,jm[1]=jm[169]=0,Ym[4]=Ym[166]=0,Km[4]=Km[166]=-1,Xm[4]=Xm[166]=1,zm[4]=zm[166]=1,Jm[4]=Jm[166]=0,Em[4]=Em[166]=0,qm[16]=qm[154]=0,Bm[16]=Bm[154]=1,Rm[16]=Rm[154]=1,Pm[16]=Pm[154]=1,Am[16]=Am[154]=0,Wm[16]=Wm[154]=1,Qm[64]=Qm[106]=0,ev[64]=ev[106]=1,tv[64]=tv[106]=0,km[64]=km[106]=-1,Gm[64]=Gm[106]=0,Fm[64]=Fm[106]=1,Qm[2]=Qm[168]=0,ev[2]=ev[168]=-1,tv[2]=tv[168]=1,Nm[2]=Nm[168]=0,rv[2]=rv[168]=-1,Hm[2]=Hm[168]=0,Zm[2]=Zm[168]=-1,sm[2]=sm[168]=0,jm[2]=jm[168]=0,zm[2]=zm[168]=-1,Jm[2]=Jm[168]=0,Em[2]=Em[168]=1,qm[8]=qm[162]=0,Bm[8]=Bm[162]=-1,Rm[8]=Rm[162]=0,Ym[8]=Ym[162]=0,Km[8]=Km[162]=-1,Xm[8]=Xm[162]=1,Zm[8]=Zm[162]=1,sm[8]=sm[162]=0,jm[8]=jm[162]=1,zm[8]=zm[162]=1,Jm[8]=Jm[162]=0,Em[8]=Em[162]=0,qm[32]=qm[138]=0,Bm[32]=Bm[138]=1,Rm[32]=Rm[138]=1,Ym[32]=Ym[138]=0,Km[32]=Km[138]=1,Xm[32]=Xm[138]=0,km[32]=km[138]=1,Gm[32]=Gm[138]=0,Fm[32]=Fm[138]=0,Pm[32]=Pm[138]=1,Am[32]=Am[138]=0,Wm[32]=Wm[138]=1,Nm[128]=Nm[42]=0,rv[128]=rv[42]=1,Hm[128]=Hm[42]=1,Qm[128]=Qm[42]=0,ev[128]=ev[42]=1,tv[128]=tv[42]=0,km[128]=km[42]=-1,Gm[128]=Gm[42]=0,Fm[128]=Fm[42]=1,Pm[128]=Pm[42]=-1,Am[128]=Am[42]=0,Wm[128]=Wm[42]=0,Ym[5]=Ym[165]=-1,Km[5]=Km[165]=0,Xm[5]=Xm[165]=0,Nm[5]=Nm[165]=1,rv[5]=rv[165]=0,Hm[5]=Hm[165]=0,zm[20]=zm[150]=0,Jm[20]=Jm[150]=1,Em[20]=Em[150]=1,Pm[20]=Pm[150]=0,Am[20]=Am[150]=-1,Wm[20]=Wm[150]=1,qm[80]=qm[90]=-1,Bm[80]=Bm[90]=0,Rm[80]=Rm[90]=1,Qm[80]=Qm[90]=1,ev[80]=ev[90]=0,tv[80]=tv[90]=1,Zm[65]=Zm[105]=0,sm[65]=sm[105]=1,jm[65]=jm[105]=0,km[65]=km[105]=0,Gm[65]=Gm[105]=-1,Fm[65]=Fm[105]=0,qm[160]=qm[10]=-1,Bm[160]=Bm[10]=0,Rm[160]=Rm[10]=1,Ym[160]=Ym[10]=-1,Km[160]=Km[10]=0,Xm[160]=Xm[10]=0,Nm[160]=Nm[10]=1,rv[160]=rv[10]=0,Hm[160]=Hm[10]=0,Qm[160]=Qm[10]=1,ev[160]=ev[10]=0,tv[160]=tv[10]=1,zm[130]=zm[40]=0,Jm[130]=Jm[40]=1,Em[130]=Em[40]=1,Zm[130]=Zm[40]=0,sm[130]=sm[40]=1,jm[130]=jm[40]=0,km[130]=km[40]=0,Gm[130]=Gm[40]=-1,Fm[130]=Fm[40]=0,Pm[130]=Pm[40]=0,Am[130]=Am[40]=-1,Wm[130]=Wm[40]=1,Ym[37]=Ym[133]=0,Km[37]=Km[133]=1,Xm[37]=Xm[133]=1,Nm[37]=Nm[133]=0,rv[37]=rv[133]=1,Hm[37]=Hm[133]=0,km[37]=km[133]=-1,Gm[37]=Gm[133]=0,Fm[37]=Fm[133]=0,Pm[37]=Pm[133]=1,Am[37]=Am[133]=0,Wm[37]=Wm[133]=0,zm[148]=zm[22]=-1,Jm[148]=Jm[22]=0,Em[148]=Em[22]=0,Nm[148]=Nm[22]=0,rv[148]=rv[22]=-1,Hm[148]=Hm[22]=1,Qm[148]=Qm[22]=0,ev[148]=ev[22]=1,tv[148]=tv[22]=1,Pm[148]=Pm[22]=-1,Am[148]=Am[22]=0,Wm[148]=Wm[22]=1,qm[82]=qm[88]=0,Bm[82]=Bm[88]=-1,Rm[82]=Rm[88]=1,zm[82]=zm[88]=1,Jm[82]=Jm[88]=0,Em[82]=Em[88]=1,Zm[82]=Zm[88]=-1,sm[82]=sm[88]=0,jm[82]=jm[88]=1,Qm[82]=Qm[88]=0,ev[82]=ev[88]=-1,tv[82]=tv[88]=0,qm[73]=qm[97]=0,Bm[73]=Bm[97]=1,Rm[73]=Rm[97]=0,Ym[73]=Ym[97]=0,Km[73]=Km[97]=-1,Xm[73]=Xm[97]=0,Zm[73]=Zm[97]=1,sm[73]=sm[97]=0,jm[73]=jm[97]=0,km[73]=km[97]=1,Gm[73]=Gm[97]=0,Fm[73]=Fm[97]=1,qm[145]=qm[25]=0,Bm[145]=Bm[25]=-1,Rm[145]=Rm[25]=0,Zm[145]=Zm[25]=1,sm[145]=sm[25]=0,jm[145]=jm[25]=1,Nm[145]=Nm[25]=0,rv[145]=rv[25]=1,Hm[145]=Hm[25]=1,Pm[145]=Pm[25]=-1,Am[145]=Am[25]=0,Wm[145]=Wm[25]=0,Ym[70]=Ym[100]=0,Km[70]=Km[100]=1,Xm[70]=Xm[100]=0,zm[70]=zm[100]=-1,Jm[70]=Jm[100]=0,Em[70]=Em[100]=1,Qm[70]=Qm[100]=0,ev[70]=ev[100]=-1,tv[70]=tv[100]=1,km[70]=km[100]=1,Gm[70]=Gm[100]=0,Fm[70]=Fm[100]=0,Ym[101]=Ym[69]=0,Km[101]=Km[69]=1,Xm[101]=Xm[69]=0,km[101]=km[69]=1,Gm[101]=Gm[69]=0,Fm[101]=Fm[69]=0,Nm[149]=Nm[21]=0,rv[149]=rv[21]=1,Hm[149]=Hm[21]=1,Pm[149]=Pm[21]=-1,Am[149]=Am[21]=0,Wm[149]=Wm[21]=0,zm[86]=zm[84]=-1,Jm[86]=Jm[84]=0,Em[86]=Em[84]=1,Qm[86]=Qm[84]=0,ev[86]=ev[84]=-1,tv[86]=tv[84]=1,qm[89]=qm[81]=0,Bm[89]=Bm[81]=-1,Rm[89]=Rm[81]=0,Zm[89]=Zm[81]=1,sm[89]=sm[81]=0,jm[89]=jm[81]=1,qm[96]=qm[74]=0,Bm[96]=Bm[74]=1,Rm[96]=Rm[74]=0,Ym[96]=Ym[74]=-1,Km[96]=Km[74]=0,Xm[96]=Xm[74]=1,Qm[96]=Qm[74]=1,ev[96]=ev[74]=0,tv[96]=tv[74]=0,km[96]=km[74]=1,Gm[96]=Gm[74]=0,Fm[96]=Fm[74]=1,qm[24]=qm[146]=0,Bm[24]=Bm[146]=-1,Rm[24]=Rm[146]=1,zm[24]=zm[146]=1,Jm[24]=Jm[146]=0,Em[24]=Em[146]=1,Zm[24]=Zm[146]=0,sm[24]=sm[146]=1,jm[24]=jm[146]=1,Pm[24]=Pm[146]=0,Am[24]=Am[146]=-1,Wm[24]=Wm[146]=0,Ym[6]=Ym[164]=-1,Km[6]=Km[164]=0,Xm[6]=Xm[164]=1,zm[6]=zm[164]=-1,Jm[6]=Jm[164]=0,Em[6]=Em[164]=0,Nm[6]=Nm[164]=0,rv[6]=rv[164]=-1,Hm[6]=Hm[164]=1,Qm[6]=Qm[164]=1,ev[6]=ev[164]=0,tv[6]=tv[164]=0,Zm[129]=Zm[41]=0,sm[129]=sm[41]=1,jm[129]=jm[41]=1,Nm[129]=Nm[41]=0,rv[129]=rv[41]=1,Hm[129]=Hm[41]=0,km[129]=km[41]=-1,Gm[129]=Gm[41]=0,Fm[129]=Fm[41]=0,Pm[129]=Pm[41]=0,Am[129]=Am[41]=-1,Wm[129]=Wm[41]=0,zm[66]=zm[104]=0,Jm[66]=Jm[104]=1,Em[66]=Em[104]=0,Zm[66]=Zm[104]=-1,sm[66]=sm[104]=0,jm[66]=jm[104]=1,Qm[66]=Qm[104]=0,ev[66]=ev[104]=-1,tv[66]=tv[104]=0,km[66]=km[104]=0,Gm[66]=Gm[104]=-1,Fm[66]=Fm[104]=1,qm[144]=qm[26]=-1,Bm[144]=Bm[26]=0,Rm[144]=Rm[26]=0,Nm[144]=Nm[26]=1,rv[144]=rv[26]=0,Hm[144]=Hm[26]=1,Qm[144]=Qm[26]=0,ev[144]=ev[26]=1,tv[144]=tv[26]=1,Pm[144]=Pm[26]=-1,Am[144]=Am[26]=0,Wm[144]=Wm[26]=1,Ym[36]=Ym[134]=0,Km[36]=Km[134]=1,Xm[36]=Xm[134]=1,zm[36]=zm[134]=0,Jm[36]=Jm[134]=1,Em[36]=Em[134]=0,km[36]=km[134]=0,Gm[36]=Gm[134]=-1,Fm[36]=Fm[134]=1,Pm[36]=Pm[134]=1,Am[36]=Am[134]=0,Wm[36]=Wm[134]=0,qm[9]=qm[161]=-1,Bm[9]=Bm[161]=0,Rm[9]=Rm[161]=0,Ym[9]=Ym[161]=0,Km[9]=Km[161]=-1,Xm[9]=Xm[161]=0,Zm[9]=Zm[161]=1,sm[9]=sm[161]=0,jm[9]=jm[161]=0,Nm[9]=Nm[161]=1,rv[9]=rv[161]=0,Hm[9]=Hm[161]=1,qm[136]=0,Bm[136]=1,Rm[136]=1,Ym[136]=0,Km[136]=1,Xm[136]=0,zm[136]=-1,Jm[136]=0,Em[136]=1,Zm[136]=-1,sm[136]=0,jm[136]=0,Nm[136]=0,rv[136]=-1,Hm[136]=0,Qm[136]=0,ev[136]=-1,tv[136]=1,km[136]=1,Gm[136]=0,Fm[136]=0,Pm[136]=1,Am[136]=0,Wm[136]=1,qm[34]=0,Bm[34]=-1,Rm[34]=0,Ym[34]=0,Km[34]=-1,Xm[34]=1,zm[34]=1,Jm[34]=0,Em[34]=0,Zm[34]=1,sm[34]=0,jm[34]=1,Nm[34]=0,rv[34]=1,Hm[34]=1,Qm[34]=0,ev[34]=1,tv[34]=0,km[34]=-1,Gm[34]=0,Fm[34]=1,Pm[34]=-1,Am[34]=0,Wm[34]=0,qm[35]=0,Bm[35]=1,Rm[35]=1,Ym[35]=0,Km[35]=-1,Xm[35]=1,zm[35]=1,Jm[35]=0,Em[35]=0,Zm[35]=-1,sm[35]=0,jm[35]=0,Nm[35]=0,rv[35]=-1,Hm[35]=0,Qm[35]=0,ev[35]=1,tv[35]=0,km[35]=-1,Gm[35]=0,Fm[35]=1,Pm[35]=1,Am[35]=0,Wm[35]=1,qm[153]=0,Bm[153]=1,Rm[153]=1,Zm[153]=-1,sm[153]=0,jm[153]=0,Nm[153]=0,rv[153]=-1,Hm[153]=0,Pm[153]=1,Am[153]=0,Wm[153]=1,Ym[102]=0,Km[102]=-1,Xm[102]=1,zm[102]=1,Jm[102]=0,Em[102]=0,Qm[102]=0,ev[102]=1,tv[102]=0,km[102]=-1,Gm[102]=0,Fm[102]=1,qm[155]=0,Bm[155]=-1,Rm[155]=0,Zm[155]=1,sm[155]=0,jm[155]=1,Nm[155]=0,rv[155]=1,Hm[155]=1,Pm[155]=-1,Am[155]=0,Wm[155]=0,Ym[103]=0,Km[103]=1,Xm[103]=0,zm[103]=-1,Jm[103]=0,Em[103]=1,Qm[103]=0,ev[103]=-1,tv[103]=1,km[103]=1,Gm[103]=0,Fm[103]=0,qm[152]=0,Bm[152]=1,Rm[152]=1,zm[152]=-1,Jm[152]=0,Em[152]=1,Zm[152]=-1,sm[152]=0,jm[152]=0,Nm[152]=0,rv[152]=-1,Hm[152]=0,Qm[152]=0,ev[152]=-1,tv[152]=1,Pm[152]=1,Am[152]=0,Wm[152]=1,qm[156]=0,Bm[156]=-1,Rm[156]=1,zm[156]=1,Jm[156]=0,Em[156]=1,Zm[156]=-1,sm[156]=0,jm[156]=0,Nm[156]=0,rv[156]=-1,Hm[156]=0,Qm[156]=0,ev[156]=1,tv[156]=1,Pm[156]=-1,Am[156]=0,Wm[156]=1,qm[137]=0,Bm[137]=1,Rm[137]=1,Ym[137]=0,Km[137]=1,Xm[137]=0,Zm[137]=-1,sm[137]=0,jm[137]=0,Nm[137]=0,rv[137]=-1,Hm[137]=0,km[137]=1,Gm[137]=0,Fm[137]=0,Pm[137]=1,Am[137]=0,Wm[137]=1,qm[139]=0,Bm[139]=1,Rm[139]=1,Ym[139]=0,Km[139]=-1,Xm[139]=0,Zm[139]=1,sm[139]=0,jm[139]=0,Nm[139]=0,rv[139]=1,Hm[139]=0,km[139]=-1,Gm[139]=0,Fm[139]=0,Pm[139]=1,Am[139]=0,Wm[139]=1,qm[98]=0,Bm[98]=-1,Rm[98]=0,Ym[98]=0,Km[98]=-1,Xm[98]=1,zm[98]=1,Jm[98]=0,Em[98]=0,Zm[98]=1,sm[98]=0,jm[98]=1,Qm[98]=0,ev[98]=1,tv[98]=0,km[98]=-1,Gm[98]=0,Fm[98]=1,qm[99]=0,Bm[99]=1,Rm[99]=0,Ym[99]=0,Km[99]=-1,Xm[99]=1,zm[99]=1,Jm[99]=0,Em[99]=0,Zm[99]=-1,sm[99]=0,jm[99]=1,Qm[99]=0,ev[99]=-1,tv[99]=0,km[99]=1,Gm[99]=0,Fm[99]=1,Ym[38]=0,Km[38]=-1,Xm[38]=1,zm[38]=1,Jm[38]=0,Em[38]=0,Nm[38]=0,rv[38]=1,Hm[38]=1,Qm[38]=0,ev[38]=1,tv[38]=0,km[38]=-1,Gm[38]=0,Fm[38]=1,Pm[38]=-1,Am[38]=0,Wm[38]=0,Ym[39]=0,Km[39]=1,Xm[39]=1,zm[39]=-1,Jm[39]=0,Em[39]=0,Nm[39]=0,rv[39]=-1,Hm[39]=1,Qm[39]=0,ev[39]=1,tv[39]=0,km[39]=-1,Gm[39]=0,Fm[39]=1,Pm[39]=1,Am[39]=0,Wm[39]=0;var aS=function(nt){return[[nt.bottomleft,0],[0,0],[0,nt.leftbottom]]},sS=function(nt){return[[1,nt.rightbottom],[1,0],[nt.bottomright,0]]},K2=function(nt){return[[nt.topright,1],[1,1],[1,nt.righttop]]},lS=function(nt){return[[0,nt.lefttop],[0,1],[nt.topleft,1]]},cS=function(nt){return[[nt.bottomright,0],[nt.bottomleft,0],[0,nt.leftbottom],[0,nt.lefttop]]},uS=function(nt){return[[nt.bottomright,0],[nt.bottomleft,0],[1,nt.righttop],[1,nt.rightbottom]]},hS=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[nt.topleft,1],[nt.topright,1]]},dS=function(nt){return[[0,nt.leftbottom],[0,nt.lefttop],[nt.topleft,1],[nt.topright,1]]},jg=[],Fg=[],Qg=[],Yg=[],om=[],rm=[],nv=[],Um=[];Yg[1]=om[1]=18,Yg[169]=om[169]=18,Qg[4]=Fg[4]=12,Qg[166]=Fg[166]=12,jg[16]=Um[16]=4,jg[154]=Um[154]=4,rm[64]=nv[64]=22,rm[106]=nv[106]=22,Qg[2]=rm[2]=17,Yg[2]=om[2]=18,Qg[168]=rm[168]=17,Yg[168]=om[168]=18,jg[8]=Yg[8]=9,Fg[8]=Qg[8]=12,jg[162]=Yg[162]=9,Fg[162]=Qg[162]=12,jg[32]=Um[32]=4,Fg[32]=nv[32]=1,jg[138]=Um[138]=4,Fg[138]=nv[138]=1,om[128]=Um[128]=21,rm[128]=nv[128]=22,om[42]=Um[42]=21,rm[42]=nv[42]=22,Fg[5]=om[5]=14,Fg[165]=om[165]=14,Qg[20]=Um[20]=6,Qg[150]=Um[150]=6,jg[80]=rm[80]=11,jg[90]=rm[90]=11,Yg[65]=nv[65]=3,Yg[105]=nv[105]=3,jg[160]=rm[160]=11,Fg[160]=om[160]=14,jg[10]=rm[10]=11,Fg[10]=om[10]=14,Qg[130]=Um[130]=6,Yg[130]=nv[130]=3,Qg[40]=Um[40]=6,Yg[40]=nv[40]=3,Fg[101]=nv[101]=1,Fg[69]=nv[69]=1,om[149]=Um[149]=21,om[21]=Um[21]=21,Qg[86]=rm[86]=17,Qg[84]=rm[84]=17,jg[89]=Yg[89]=9,jg[81]=Yg[81]=9,jg[96]=nv[96]=0,Fg[96]=rm[96]=15,jg[74]=nv[74]=0,Fg[74]=rm[74]=15,jg[24]=Qg[24]=8,Yg[24]=Um[24]=7,jg[146]=Qg[146]=8,Yg[146]=Um[146]=7,Fg[6]=rm[6]=15,Qg[6]=om[6]=16,Fg[164]=rm[164]=15,Qg[164]=om[164]=16,Yg[129]=Um[129]=7,om[129]=nv[129]=20,Yg[41]=Um[41]=7,om[41]=nv[41]=20,Qg[66]=nv[66]=2,Yg[66]=rm[66]=19,Qg[104]=nv[104]=2,Yg[104]=rm[104]=19,jg[144]=om[144]=10,rm[144]=Um[144]=23,jg[26]=om[26]=10,rm[26]=Um[26]=23,Fg[36]=Um[36]=5,Qg[36]=nv[36]=2,Fg[134]=Um[134]=5,Qg[134]=nv[134]=2,jg[9]=om[9]=10,Fg[9]=Yg[9]=13,jg[161]=om[161]=10,Fg[161]=Yg[161]=13,Fg[37]=Um[37]=5,om[37]=nv[37]=20,Fg[133]=Um[133]=5,om[133]=nv[133]=20,Qg[148]=om[148]=16,rm[148]=Um[148]=23,Qg[22]=om[22]=16,rm[22]=Um[22]=23,jg[82]=Qg[82]=8,Yg[82]=rm[82]=19,jg[88]=Qg[88]=8,Yg[88]=rm[88]=19,jg[73]=nv[73]=0,Fg[73]=Yg[73]=13,jg[97]=nv[97]=0,Fg[97]=Yg[97]=13,jg[145]=Yg[145]=9,om[145]=Um[145]=21,jg[25]=Yg[25]=9,om[25]=Um[25]=21,Fg[70]=nv[70]=1,Qg[70]=rm[70]=17,Fg[100]=nv[100]=1,Qg[100]=rm[100]=17,jg[34]=Yg[34]=9,Fg[34]=Qg[34]=12,om[34]=Um[34]=21,rm[34]=nv[34]=22,jg[136]=Um[136]=4,Fg[136]=nv[136]=1,Qg[136]=rm[136]=17,Yg[136]=om[136]=18,jg[35]=Um[35]=4,Fg[35]=Qg[35]=12,Yg[35]=om[35]=18,rm[35]=nv[35]=22,jg[153]=Um[153]=4,Yg[153]=om[153]=18,Fg[102]=Qg[102]=12,rm[102]=nv[102]=22,jg[155]=Yg[155]=9,om[155]=Um[155]=23,Fg[103]=nv[103]=1,Qg[103]=rm[103]=17,jg[152]=Um[152]=4,Qg[152]=rm[152]=17,Yg[152]=om[152]=18,jg[156]=Qg[156]=8,Yg[156]=om[156]=18,rm[156]=Um[156]=23,jg[137]=Um[137]=4,Fg[137]=nv[137]=1,Yg[137]=om[137]=18,jg[139]=Um[139]=4,Fg[139]=Yg[139]=13,om[139]=nv[139]=20,jg[98]=Yg[98]=9,Fg[98]=Qg[98]=12,rm[98]=nv[98]=22,jg[99]=nv[99]=0,Fg[99]=Qg[99]=12,Yg[99]=rm[99]=19,Fg[38]=Qg[38]=12,om[38]=Um[38]=21,rm[38]=nv[38]=22,Fg[39]=Um[39]=5,Qg[39]=om[39]=16,rm[39]=nv[39]=22;var Ig=[];function dp(nt,at,wt){return(nt-at)/(wt-at)}function fS(nt){return nt.constructor.toString().indexOf("Array")>-1}function LC(nt,at,wt,lo,fo,vo){for(var ls=nt.cells[wt][at],ff=ls.cval_real,mf=at+lo,bf=wt+fo,Sf=[],wf=!1;!wf;){if(nt.cells[bf]===void 0||nt.cells[bf][mf]===void 0)if(bf-=fo,mf-=lo,ff=(ls=nt.cells[bf][mf]).cval_real,fo===-1)if(vo===0)if(1&ff)Sf.push([mf,bf]),lo=-1,fo=0,vo=0;else{if(!(4&ff)){Sf.push([mf+ls.bottomright,bf]),lo=0,fo=1,vo=1,wf=!0;break}Sf.push([mf+1,bf]),lo=1,fo=0,vo=0}else{if(!(1&ff)){if(4&ff){Sf.push([mf+ls.bottomright,bf]),lo=0,fo=1,vo=1,wf=!0;break}Sf.push([mf+ls.bottomleft,bf]),lo=0,fo=1,vo=0,wf=!0;break}Sf.push([mf,bf]),lo=-1,fo=0,vo=0}else if(fo===1)if(vo===0){if(!(ff&ib)){if(ff&vy){Sf.push([mf+ls.topleft,bf+1]),lo=0,fo=-1,vo=0,wf=!0;break}Sf.push([mf+ls.topright,bf+1]),lo=0,fo=-1,vo=1,wf=!0;break}Sf.push([mf+1,bf+1]),lo=1,fo=0,vo=1}else Sf.push([mf+1,bf+1]),lo=1,fo=0,vo=1;else if(lo===-1)if(vo===0){if(!(ff&vy)){if(1&ff){Sf.push([mf,bf+ls.leftbottom]),lo=1,fo=0,vo=0,wf=!0;break}Sf.push([mf,bf+ls.lefttop]),lo=1,fo=0,vo=1,wf=!0;break}Sf.push([mf,bf+1]),lo=0,fo=1,vo=0}else{if(!(ff&vy)){console.log("MarchingSquaresJS-isoBands: wtf");break}Sf.push([mf,bf+1]),lo=0,fo=1,vo=0}else{if(lo!==1){console.log("MarchingSquaresJS-isoBands: we came from nowhere!");break}if(vo===0){if(!(4&ff)){Sf.push([mf+1,bf+ls.rightbottom]),lo=-1,fo=0,vo=0,wf=!0;break}Sf.push([mf+1,bf]),lo=0,fo=-1,vo=1}else{if(!(4&ff)){if(ff&ib){Sf.push([mf+1,bf+ls.righttop]),lo=-1,fo=0,vo=1;break}Sf.push([mf+1,bf+ls.rightbottom]),lo=-1,fo=0,vo=0,wf=!0;break}Sf.push([mf+1,bf]),lo=0,fo=-1,vo=1}}else if(ff=(ls=nt.cells[bf][mf]).cval_real,lo===-1)if(vo===0)if(nt.cells[bf-1]!==void 0&&nt.cells[bf-1][mf]!==void 0)lo=0,fo=-1,vo=1;else{if(!(1&ff)){Sf.push([mf+ls.bottomright,bf]),lo=0,fo=1,vo=1,wf=!0;break}Sf.push([mf,bf])}else{if(!(ff&vy)){console.log("MarchingSquaresJS-isoBands: found entry from top at "+mf+","+bf);break}console.log("MarchingSquaresJS-isoBands: proceeding in x-direction!")}else if(lo===1){if(vo===0){console.log("MarchingSquaresJS-isoBands: wtf");break}if(nt.cells[bf+1]!==void 0&&nt.cells[bf+1][mf]!==void 0)lo=0,fo=1,vo=0;else{if(!(ff&ib)){Sf.push([mf+ls.topleft,bf+1]),lo=0,fo=-1,vo=0,wf=!0;break}Sf.push([mf+1,bf+1]),lo=1,fo=0,vo=1}}else if(fo===-1){if(vo!==1){console.log("MarchingSquaresJS-isoBands: wtf");break}if(nt.cells[bf][mf+1]!==void 0)lo=1,fo=0,vo=1;else{if(!(4&ff)){Sf.push([mf+1,bf+ls.righttop]),lo=-1,fo=0,vo=1,wf=!0;break}Sf.push([mf+1,bf]),lo=0,fo=-1,vo=1}}else{if(fo!==1){console.log("MarchingSquaresJS-isoBands: where did we came from???");break}if(vo!==0){console.log("MarchingSquaresJS-isoBands: wtf");break}if(nt.cells[bf][mf-1]!==void 0)lo=-1,fo=0,vo=0;else{if(!(ff&vy)){Sf.push([mf,bf+ls.leftbottom]),lo=1,fo=0,vo=0,wf=!0;break}Sf.push([mf,bf+1]),lo=0,fo=1,vo=0}}if(bf+=fo,(mf+=lo)===at&&bf===wt)break}return{path:Sf,i:mf,j:bf,x:lo,y:fo,o:vo}}function jx(nt){if(nt.edges.length>0){var at=nt.edges[nt.edges.length-1],wt=nt.cval_real;switch(at){case 0:return wt&ib?{p:[1,nt.righttop],x:-1,y:0,o:1}:{p:[nt.topleft,1],x:0,y:-1,o:0};case 1:return 4&wt?{p:[nt.topleft,1],x:0,y:-1,o:0}:{p:[1,nt.rightbottom],x:-1,y:0,o:0};case 2:return 4&wt?{p:[nt.bottomright,0],x:0,y:1,o:1}:{p:[nt.topleft,1],x:0,y:-1,o:0};case 3:return 1&wt?{p:[nt.topleft,1],x:0,y:-1,o:0}:{p:[nt.bottomleft,0],x:0,y:1,o:0};case 4:return wt&ib?{p:[1,nt.righttop],x:-1,y:0,o:1}:{p:[nt.topright,1],x:0,y:-1,o:1};case 5:return 4&wt?{p:[nt.topright,1],x:0,y:-1,o:1}:{p:[1,nt.rightbottom],x:-1,y:0,o:0};case 6:return 4&wt?{p:[nt.bottomright,0],x:0,y:1,o:1}:{p:[nt.topright,1],x:0,y:-1,o:1};case 7:return 1&wt?{p:[nt.topright,1],x:0,y:-1,o:1}:{p:[nt.bottomleft,0],x:0,y:1,o:0};case 8:return 4&wt?{p:[nt.bottomright,0],x:0,y:1,o:1}:{p:[1,nt.righttop],x:-1,y:0,o:1};case 9:return 1&wt?{p:[1,nt.righttop],x:-1,y:0,o:1}:{p:[nt.bottomleft,0],x:0,y:1,o:0};case 10:return 1&wt?{p:[0,nt.leftbottom],x:1,y:0,o:0}:{p:[1,nt.righttop],x:-1,y:0,o:1};case 11:return wt&vy?{p:[1,nt.righttop],x:-1,y:0,o:1}:{p:[0,nt.lefttop],x:1,y:0,o:1};case 12:return 4&wt?{p:[nt.bottomright,0],x:0,y:1,o:1}:{p:[1,nt.rightbottom],x:-1,y:0,o:0};case 13:return 1&wt?{p:[1,nt.rightbottom],x:-1,y:0,o:0}:{p:[nt.bottomleft,0],x:0,y:1,o:0};case 14:return 1&wt?{p:[0,nt.leftbottom],x:1,y:0,o:0}:{p:[1,nt.rightbottom],x:-1,y:0,o:0};case 15:return wt&vy?{p:[1,nt.rightbottom],x:-1,y:0,o:0}:{p:[0,nt.lefttop],x:1,y:0,o:1};case 16:return 4&wt?{p:[nt.bottomright,0],x:0,y:1,o:1}:{p:[0,nt.leftbottom],x:1,y:0,o:0};case 17:return wt&vy?{p:[nt.bottomright,0],x:0,y:1,o:1}:{p:[0,nt.lefttop],x:1,y:0,o:1};case 18:return 1&wt?{p:[0,nt.leftbottom],x:1,y:0,o:0}:{p:[nt.bottomleft,0],x:0,y:1,o:0};case 19:return wt&vy?{p:[nt.bottomleft,0],x:0,y:1,o:0}:{p:[0,nt.lefttop],x:1,y:0,o:1};case 20:return wt&vy?{p:[nt.topleft,1],x:0,y:-1,o:0}:{p:[0,nt.leftbottom],x:1,y:0,o:0};case 21:return wt&ib?{p:[0,nt.leftbottom],x:1,y:0,o:0}:{p:[nt.topright,1],x:0,y:-1,o:1};case 22:return wt&vy?{p:[nt.topleft,1],x:0,y:-1,o:0}:{p:[0,nt.lefttop],x:1,y:0,o:1};case 23:return wt&ib?{p:[0,nt.lefttop],x:1,y:0,o:1}:{p:[nt.topright,1],x:0,y:-1,o:1};default:console.log("MarchingSquaresJS-isoBands: edge index out of range!"),console.log(nt)}}return null}function FC(nt,at,wt,lo){var fo,vo,ls,ff,mf,bf=nt.cval;switch(at){case-1:switch(lo){case 0:fo=Fg[bf],ls=Ym[bf],ff=Km[bf],mf=Xm[bf];break;default:fo=jg[bf],ls=qm[bf],ff=Bm[bf],mf=Rm[bf]}break;case 1:switch(lo){case 0:fo=om[bf],ls=Nm[bf],ff=rv[bf],mf=Hm[bf];break;default:fo=rm[bf],ls=Qm[bf],ff=ev[bf],mf=tv[bf]}break;default:switch(wt){case-1:switch(lo){case 0:fo=nv[bf],ls=km[bf],ff=Gm[bf],mf=Fm[bf];break;default:fo=Um[bf],ls=Pm[bf],ff=Am[bf],mf=Wm[bf]}break;case 1:switch(lo){case 0:fo=Yg[bf],ls=Zm[bf],ff=sm[bf],mf=jm[bf];break;default:fo=Qg[bf],ls=zm[bf],ff=Jm[bf],mf=Em[bf]}}}if(vo=nt.edges.indexOf(fo),nt.edges[vo]===void 0)return null;switch(function(Sf,wf){delete Sf.edges[wf];for(var If=wf+1;If0){var Sf=lo[mf-1],wf=pS(bf,Sf);wf!==!1&&(Sf[1]=wf,bf[0]=wf),ls.push(Sf[0]),mf===vo.length-2&&(ls.push(bf[0]),ls.push(bf[1]))}vo.length===2&&(ls.push(bf[0]),ls.push(bf[1]))}var If,jf,zf,Wf,Mf,np,pp,Uf}),po(ls,nt.properties)}function gS(nt,at,wt){var lo=at[0]-nt[0],fo=at[1]-nt[1],vo=wt[0]-at[0];return function(ls){return(ls>0)-(ls<0)||+ls}(lo*(wt[1]-at[1])-vo*fo)}function mS(nt,at){return at.geometry.coordinates[0].every(function(wt){return cm(ot(wt),nt)})}Ig[1]=Ig[169]=aS,Ig[4]=Ig[166]=sS,Ig[16]=Ig[154]=K2,Ig[64]=Ig[106]=lS,Ig[168]=Ig[2]=cS,Ig[162]=Ig[8]=uS,Ig[138]=Ig[32]=hS,Ig[42]=Ig[128]=dS,Ig[5]=Ig[165]=function(nt){return[[0,0],[0,nt.leftbottom],[1,nt.rightbottom],[1,0]]},Ig[20]=Ig[150]=function(nt){return[[1,0],[nt.bottomright,0],[nt.topright,1],[1,1]]},Ig[80]=Ig[90]=function(nt){return[[1,1],[1,nt.righttop],[0,nt.lefttop],[0,1]]},Ig[65]=Ig[105]=function(nt){return[[nt.bottomleft,0],[0,0],[0,1],[nt.topleft,1]]},Ig[160]=Ig[10]=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[0,nt.leftbottom],[0,nt.lefttop]]},Ig[130]=Ig[40]=function(nt){return[[nt.topleft,1],[nt.topright,1],[nt.bottomright,0],[nt.bottomleft,0]]},Ig[85]=function(){return[[0,0],[0,1],[1,1],[1,0]]},Ig[101]=Ig[69]=function(nt){return[[1,nt.rightbottom],[1,0],[0,0],[0,1],[nt.topleft,1]]},Ig[149]=Ig[21]=function(nt){return[[nt.topright,1],[1,1],[1,0],[0,0],[0,nt.leftbottom]]},Ig[86]=Ig[84]=function(nt){return[[1,0],[nt.bottomright,0],[0,nt.lefttop],[0,1],[1,1]]},Ig[89]=Ig[81]=function(nt){return[[1,1],[1,nt.righttop],[nt.bottomleft,0],[0,0],[0,1]]},Ig[96]=Ig[74]=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[0,nt.lefttop],[0,1],[nt.topleft,1]]},Ig[24]=Ig[146]=function(nt){return[[1,1],[1,nt.righttop],[nt.bottomright,0],[nt.bottomleft,0],[nt.topright,1]]},Ig[6]=Ig[164]=function(nt){return[[1,nt.rightbottom],[1,0],[nt.bottomright,0],[0,nt.leftbottom],[0,nt.lefttop]]},Ig[129]=Ig[41]=function(nt){return[[nt.topright,1],[nt.bottomleft,0],[0,0],[0,nt.leftbottom],[nt.topleft,1]]},Ig[66]=Ig[104]=function(nt){return[[nt.bottomright,0],[nt.bottomleft,0],[0,nt.lefttop],[0,1],[nt.topleft,1]]},Ig[144]=Ig[26]=function(nt){return[[1,1],[1,nt.righttop],[0,nt.leftbottom],[0,nt.lefttop],[nt.topright,1]]},Ig[36]=Ig[134]=function(nt){return[[1,nt.rightbottom],[1,0],[nt.bottomright,0],[nt.topleft,1],[nt.topright,1]]},Ig[9]=Ig[161]=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[nt.bottomleft,0],[0,0],[0,nt.leftbottom]]},Ig[37]=Ig[133]=function(nt){return[[1,nt.rightbottom],[1,0],[0,0],[0,nt.leftbottom],[nt.topleft,1],[nt.topright,1]]},Ig[148]=Ig[22]=function(nt){return[[1,1],[1,0],[nt.bottomright,0],[0,nt.leftbottom],[0,nt.lefttop],[nt.topright,1]]},Ig[82]=Ig[88]=function(nt){return[[1,1],[1,nt.righttop],[nt.bottomright,0],[nt.bottomleft,0],[0,nt.lefttop],[0,1]]},Ig[73]=Ig[97]=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[nt.bottomleft,0],[0,0],[0,1],[nt.topleft,1]]},Ig[145]=Ig[25]=function(nt){return[[1,1],[1,nt.righttop],[nt.bottomleft,0],[0,0],[0,nt.leftbottom],[nt.topright,1]]},Ig[70]=Ig[100]=function(nt){return[[1,nt.rightbottom],[1,0],[nt.bottomright,0],[0,nt.lefttop],[0,1],[nt.topleft,1]]},Ig[34]=function(nt){return[dS(nt),uS(nt)]},Ig[35]=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[nt.bottomright,0],[nt.bottomleft,0],[0,nt.leftbottom],[0,nt.lefttop],[nt.topleft,1],[nt.topright,1]]},Ig[136]=function(nt){return[hS(nt),cS(nt)]},Ig[153]=function(nt){return[K2(nt),aS(nt)]},Ig[102]=function(nt){return[sS(nt),lS(nt)]},Ig[155]=function(nt){return[[1,1],[1,nt.righttop],[nt.bottomleft,0],[0,0],[0,nt.leftbottom],[nt.topright,1]]},Ig[103]=function(nt){return[[1,nt.rightbottom],[1,0],[nt.bottomright,0],[0,nt.lefttop],[0,1],[nt.topleft,1]]},Ig[152]=function(nt){return[K2(nt),cS(nt)]},Ig[156]=function(nt){return[[1,1],[1,nt.righttop],[nt.bottomright,0],[nt.bottomleft,0],[0,nt.leftbottom],[0,nt.lefttop],[nt.topright,1]]},Ig[137]=function(nt){return[hS(nt),aS(nt)]},Ig[139]=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[nt.bottomleft,0],[0,0],[0,nt.leftbottom],[nt.topleft,1],[nt.topright,1]]},Ig[98]=function(nt){return[uS(nt),lS(nt)]},Ig[99]=function(nt){return[[1,nt.righttop],[1,nt.rightbottom],[nt.bottomright,0],[nt.bottomleft,0],[0,nt.lefttop],[0,1],[nt.topleft,1]]},Ig[38]=function(nt){return[sS(nt),dS(nt)]},Ig[39]=function(nt){return[[1,nt.rightbottom],[1,0],[nt.bottomright,0],[0,nt.leftbottom],[0,nt.lefttop],[nt.topleft,1],[nt.topright,1]]};var X2=function(){function nt(at){this.id=nt.buildId(at),this.coordinates=at,this.innerEdges=[],this.outerEdges=[],this.outerEdgesSorted=!1}return nt.buildId=function(at){return at.join(",")},nt.prototype.removeInnerEdge=function(at){this.innerEdges=this.innerEdges.filter(function(wt){return wt.from.id!==at.from.id})},nt.prototype.removeOuterEdge=function(at){this.outerEdges=this.outerEdges.filter(function(wt){return wt.to.id!==at.to.id})},nt.prototype.addOuterEdge=function(at){this.outerEdges.push(at),this.outerEdgesSorted=!1},nt.prototype.sortOuterEdges=function(){var at=this;this.outerEdgesSorted||(this.outerEdges.sort(function(wt,lo){var fo=wt.to,vo=lo.to;if(fo.coordinates[0]-at.coordinates[0]>=0&&vo.coordinates[0]-at.coordinates[0]<0)return 1;if(fo.coordinates[0]-at.coordinates[0]<0&&vo.coordinates[0]-at.coordinates[0]>=0)return-1;if(fo.coordinates[0]-at.coordinates[0]==0&&vo.coordinates[0]-at.coordinates[0]==0)return fo.coordinates[1]-at.coordinates[1]>=0||vo.coordinates[1]-at.coordinates[1]>=0?fo.coordinates[1]-vo.coordinates[1]:vo.coordinates[1]-fo.coordinates[1];var ls=gS(at.coordinates,fo.coordinates,vo.coordinates);return ls<0?1:ls>0?-1:Math.pow(fo.coordinates[0]-at.coordinates[0],2)+Math.pow(fo.coordinates[1]-at.coordinates[1],2)-(Math.pow(vo.coordinates[0]-at.coordinates[0],2)+Math.pow(vo.coordinates[1]-at.coordinates[1],2))}),this.outerEdgesSorted=!0)},nt.prototype.getOuterEdges=function(){return this.sortOuterEdges(),this.outerEdges},nt.prototype.getOuterEdge=function(at){return this.sortOuterEdges(),this.outerEdges[at]},nt.prototype.addInnerEdge=function(at){this.innerEdges.push(at)},nt}(),vS=function(){function nt(at,wt){this.from=at,this.to=wt,this.next=void 0,this.label=void 0,this.symetric=void 0,this.ring=void 0,this.from.addOuterEdge(this),this.to.addInnerEdge(this)}return nt.prototype.getSymetric=function(){return this.symetric||(this.symetric=new nt(this.to,this.from),this.symetric.symetric=this),this.symetric},nt.prototype.deleteEdge=function(){this.from.removeOuterEdge(this),this.to.removeInnerEdge(this)},nt.prototype.isEqual=function(at){return this.from.id===at.from.id&&this.to.id===at.to.id},nt.prototype.toString=function(){return"Edge { "+this.from.id+" -> "+this.to.id+" }"},nt.prototype.toLineString=function(){return po([this.from.coordinates,this.to.coordinates])},nt.prototype.compareTo=function(at){return gS(at.from.coordinates,at.to.coordinates,this.to.coordinates)},nt}(),o0=function(){function nt(){this.edges=[],this.polygon=void 0,this.envelope=void 0}return nt.prototype.push=function(at){this.edges.push(at),this.polygon=this.envelope=void 0},nt.prototype.get=function(at){return this.edges[at]},Object.defineProperty(nt.prototype,"length",{get:function(){return this.edges.length},enumerable:!0,configurable:!0}),nt.prototype.forEach=function(at){this.edges.forEach(at)},nt.prototype.map=function(at){return this.edges.map(at)},nt.prototype.some=function(at){return this.edges.some(at)},nt.prototype.isValid=function(){return!0},nt.prototype.isHole=function(){var at=this,wt=this.edges.reduce(function(ls,ff,mf){return ff.from.coordinates[1]>at.edges[ls].from.coordinates[1]&&(ls=mf),ls},0),lo=(wt===0?this.length:wt)-1,fo=(wt+1)%this.length,vo=gS(this.edges[lo].from.coordinates,this.edges[wt].from.coordinates,this.edges[fo].from.coordinates);return vo===0?this.edges[lo].from.coordinates[0]>this.edges[fo].from.coordinates[0]:vo>0},nt.prototype.toMultiPoint=function(){return yf(this.edges.map(function(at){return at.from.coordinates}))},nt.prototype.toPolygon=function(){if(this.polygon)return this.polygon;var at=this.edges.map(function(wt){return wt.from.coordinates});return at.push(this.edges[0].from.coordinates),this.polygon=yn([at])},nt.prototype.getEnvelope=function(){return this.envelope?this.envelope:this.envelope=gw(this.toPolygon())},nt.findEdgeRingContaining=function(at,wt){var lo,fo,vo=at.getEnvelope();return wt.forEach(function(ls){var ff,mf,bf,Sf,wf,If,jf=ls.getEnvelope();if(fo&&(lo=fo.getEnvelope()),mf=vo,bf=(ff=jf).geometry.coordinates[0].map(function(Uf){return Uf[0]}),Sf=ff.geometry.coordinates[0].map(function(Uf){return Uf[1]}),wf=mf.geometry.coordinates[0].map(function(Uf){return Uf[0]}),If=mf.geometry.coordinates[0].map(function(Uf){return Uf[1]}),(Math.max.apply(null,bf)!==Math.max.apply(null,wf)||Math.max.apply(null,Sf)!==Math.max.apply(null,If)||Math.min.apply(null,bf)!==Math.min.apply(null,wf)||Math.min.apply(null,Sf)!==Math.min.apply(null,If))&&mS(jf,vo)){for(var zf=at.map(function(Uf){return Uf.from.coordinates}),Wf=void 0,Mf=function(Uf){ls.some(function(tp){return op=Uf,up=tp.from.coordinates,op[0]===up[0]&&op[1]===up[1];var op,up})||(Wf=Uf)},np=0,pp=zf;np=0;--ls){var ff=vo[ls],mf=ff.symetric,bf=void 0,Sf=void 0;ff.label===wt&&(bf=ff),mf.label===wt&&(Sf=mf),bf&&Sf&&(Sf&&(fo=Sf),bf&&(fo&&(fo.next=bf,fo=void 0),lo||(lo=bf)))}fo&&(fo.next=lo)},nt.prototype._findLabeledEdgeRings=function(){var at=[],wt=0;return this.edges.forEach(function(lo){if(!(lo.label>=0)){at.push(lo);var fo=lo;do fo.label=wt,fo=fo.next;while(!lo.isEqual(fo));wt++}}),at},nt.prototype.getEdgeRings=function(){var at=this;this._computeNextCWEdges(),this.edges.forEach(function(lo){lo.label=void 0}),this._findLabeledEdgeRings().forEach(function(lo){at._findIntersectionNodes(lo).forEach(function(fo){at._computeNextCCWEdges(fo,lo.label)})});var wt=[];return this.edges.forEach(function(lo){lo.ring||wt.push(at._findEdgeRing(lo))}),wt},nt.prototype._findIntersectionNodes=function(at){var wt=[],lo=at,fo=function(){var vo=0;lo.from.getOuterEdges().forEach(function(ls){ls.label===at.label&&++vo}),vo>1&&wt.push(lo.from),lo=lo.next};do fo();while(!at.isEqual(lo));return wt},nt.prototype._findEdgeRing=function(at){var wt=at,lo=new o0;do lo.push(wt),wt.ring=lo,wt=wt.next;while(!at.isEqual(wt));return lo},nt.prototype.removeNode=function(at){var wt=this;at.getOuterEdges().forEach(function(lo){return wt.removeEdge(lo)}),at.innerEdges.forEach(function(lo){return wt.removeEdge(lo)}),delete this.nodes[at.id]},nt.prototype.removeEdge=function(at){this.edges=this.edges.filter(function(wt){return!wt.isEqual(at)}),at.deleteEdge()},nt}();function yS(nt,at){var wt=!0;return ng(nt,function(lo){ng(at,function(fo){if(wt===!1)return!1;wt=function(vo,ls){switch(vo.type){case"Point":switch(ls.type){case"Point":return ff=vo.coordinates,mf=ls.coordinates,!(ff[0]===mf[0]&&ff[1]===mf[1]);case"LineString":return!NT(ls,vo);case"Polygon":return!cm(vo,ls)}break;case"LineString":switch(ls.type){case"Point":return!NT(vo,ls);case"LineString":return!function(bf,Sf){return Dv(bf,Sf).features.length>0}(vo,ls);case"Polygon":return!Z2(ls,vo)}break;case"Polygon":switch(ls.type){case"Point":return!cm(ls,vo);case"LineString":return!Z2(vo,ls);case"Polygon":return!function(bf,Sf){for(var wf=0,If=bf.coordinates[0];wf0}(ls,vo)}}var ff,mf;return!1}(lo.geometry,fo.geometry)})}),wt}function NT(nt,at){for(var wt=0;wt0}function HC(nt,at,wt){var lo=wt[0]-nt[0],fo=wt[1]-nt[1],vo=at[0]-nt[0],ls=at[1]-nt[1];return lo*ls-fo*vo==0&&(Math.abs(vo)>=Math.abs(ls)?vo>0?nt[0]<=wt[0]&&wt[0]<=at[0]:at[0]<=wt[0]&&wt[0]<=nt[0]:ls>0?nt[1]<=wt[1]&&wt[1]<=at[1]:at[1]<=wt[1]&&wt[1]<=nt[1])}function MT(nt,at){return!(nt[0]>at[0])&&!(nt[2]at[1])&&!(nt[3]0}function $S(nt,at){for(var wt=!1,lo=!1,fo=nt.coordinates.length,vo=0;vo=Math.abs(ff)?ls>0?nt[0]<=wt[0]&&wt[0]<=at[0]:at[0]<=wt[0]&&wt[0]<=nt[0]:ff>0?nt[1]<=wt[1]&&wt[1]<=at[1]:at[1]<=wt[1]&&wt[1]<=nt[1]:Math.abs(ls)>=Math.abs(ff)?ls>0?nt[0]0?nt[1]=0&&(wt=[].concat(nt.slice(lo,nt.length),nt.slice(1,lo+1))),wt},Ib.prototype.comparePath=function(nt,at){var wt=this;return nt.every(function(lo,fo){return wt.compareCoord(lo,this[fo])},at)},Ib.prototype.comparePolygon=function(nt,at){if(this.compareLine(nt.coordinates[0],at.coordinates[0],1,!0)){var wt=nt.coordinates.slice(1,nt.coordinates.length),lo=at.coordinates.slice(1,at.coordinates.length),fo=this;return wt.every(function(vo){return this.some(function(ls){return fo.compareLine(vo,ls,1,!0)})},lo)}return!1},Ib.prototype.compareFeature=function(nt,at){return!(nt.id!==at.id||!this.objectComparator(nt.properties,at.properties)||!this.compareBBox(nt,at))&&this.compare(nt.geometry,at.geometry)},Ib.prototype.compareBBox=function(nt,at){return!!(!nt.bbox&&!at.bbox||nt.bbox&&at.bbox&&this.compareCoord(nt.bbox,at.bbox))},Ib.prototype.removePseudo=function(nt){return nt};var _S=Ib;function jT(nt,at){var wt=!1;return ng(nt,function(lo){ng(at,function(fo){if(wt===!0)return!0;wt=!yS(lo.geometry,fo.geometry)})}),wt}var GC=qv(function(nt){function at(wt,lo,fo,vo){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(wt,lo,fo,vo)}at.prototype.run=function(wt,lo,fo,vo){this._init(wt,lo,fo,vo);for(var ls=0;ls=this.minPts&&(lo=this._mergeArrays(lo,ls))}this._assigned[vo]!==1&&this._addToCluster(vo,wt)}},at.prototype._addToCluster=function(wt,lo){this.clusters[lo].push(wt),this._assigned[wt]=1},at.prototype._regionQuery=function(wt){for(var lo=[],fo=0;fo0){for(Sf=0;Sf=0);return wt},at.prototype.assign=function(){for(var wt,lo=!1,fo=this.dataset.length,vo=0;vols&&(fo=vo):lo=this.minPts)return vo},wt.prototype._regionQuery=function(lo,fo){fo=fo||this.epsilon;for(var vo=[],ls=0,ff=this.dataset.length;ls0;lo.length0;){var ff=nt[Math.floor(Math.random()*vo)],mf=ls?ff.join("_"):""+ff;wt[mf]||(wt[mf]=!0,lo.push(ff))}if(lo.length0,ls=nt[Math.floor(Math.random()*fo)];for(vo&&ls.join("_"),lo.push(ls);lo.length0,jf=[];if(wt)fo=wt=="kmrand"?HT(nt,at):wt=="kmpp"?XC(nt,at):wt;else for(var zf={};fo.length0;){var mf=ls.pop();if(mf===wt)return VT(mf);mf.closed=!0;for(var bf=nt.neighbors(mf),Sf=0,wf=bf.length;Sf0)){if(vo/=If,If<0){if(vo0){if(vo>wf)return;vo>Sf&&(Sf=vo)}if(vo=lo-mf,If||!(vo<0)){if(vo/=If,If<0){if(vo>wf)return;vo>Sf&&(Sf=vo)}else if(If>0){if(vo0)){if(vo/=jf,jf<0){if(vo0){if(vo>wf)return;vo>Sf&&(Sf=vo)}if(vo=fo-bf,jf||!(vo<0)){if(vo/=jf,jf<0){if(vo>wf)return;vo>Sf&&(Sf=vo)}else if(jf>0){if(vo0||wf<1)||(Sf>0&&(nt[0]=[mf+Sf*If,bf+Sf*jf]),wf<1&&(nt[1]=[mf+wf*If,bf+wf*jf]),!0)}}}}}function QC(nt,at,wt,lo,fo){var vo=nt[1];if(vo)return!0;var ls,ff,mf=nt[0],bf=nt.left,Sf=nt.right,wf=bf[0],If=bf[1],jf=Sf[0],zf=Sf[1],Wf=(wf+jf)/2,Mf=(If+zf)/2;if(zf===If){if(Wf=lo)return;if(wf>jf){if(mf){if(mf[1]>=fo)return}else mf=[Wf,wt];vo=[Wf,fo]}else{if(mf){if(mf[1]1)if(wf>jf){if(mf){if(mf[1]>=fo)return}else mf=[(wt-ff)/ls,wt];vo=[(fo-ff)/ls,fo]}else{if(mf){if(mf[1]=lo)return}else mf=[at,ls*at+ff];vo=[lo,ls*lo+ff]}else{if(mf){if(mf[0]0&&(this.content[0]=at,this.bubbleUp(0)),nt},remove:function(nt){var at=this.content.indexOf(nt),wt=this.content.pop();at!==this.content.length-1&&(this.content[at]=wt,this.scoreFunction(wt)0;){var wt=(nt+1>>1)-1,lo=this.content[wt];if(!(this.scoreFunction(at)=-oO)){var jf=mf*mf+bf*bf,zf=Sf*Sf+wf*wf,Wf=(wf*jf-bf*zf)/If,Mf=(mf*zf-Sf*jf)/If,np=XT.pop()||new tO;np.arc=nt,np.site=fo,np.x=Wf+ls,np.y=(np.cy=Mf+ff)+Math.sqrt(Wf*Wf+Mf*Mf),nt.circle=np;for(var pp=null,Uf=jw._;Uf;)if(np.yTv)ff=ff.L;else{if(!((fo=vo-iO(ff,ls))>Tv)){lo>-Tv?(at=ff.P,wt=ff):fo>-Tv?(at=ff,wt=ff.N):at=wt=ff;break}if(!ff.R){at=ff;break}ff=ff.R}(function(op){s1[op.index]={site:op,halfedges:[]}})(nt);var mf=QT(nt);if(Bw.insert(at,mf),at||wt){if(at===wt)return r_(at),wt=QT(at.site),Bw.insert(mf,wt),mf.edge=wt.edge=Lw(at.site,mf.site),M_(at),void M_(wt);if(wt){r_(at),r_(wt);var bf=at.site,Sf=bf[0],wf=bf[1],If=nt[0]-Sf,jf=nt[1]-wf,zf=wt.site,Wf=zf[0]-Sf,Mf=zf[1]-wf,np=2*(If*Mf-jf*Wf),pp=If*If+jf*jf,Uf=Wf*Wf+Mf*Mf,tp=[(Mf*pp-jf*Uf)/np+Sf,(If*Uf-Wf*pp)/np+wf];Fw(wt.edge,bf,zf,tp),mf.edge=Lw(bf,nt,null,tp),wt.edge=Lw(nt,zf,null,tp),M_(at),M_(wt)}else mf.edge=Lw(at.site,mf.site)}}function ek(nt,at){var wt=nt.site,lo=wt[0],fo=wt[1],vo=fo-at;if(!vo)return lo;var ls=nt.P;if(!ls)return-1/0;var ff=(wt=ls.site)[0],mf=wt[1],bf=mf-at;if(!bf)return ff;var Sf=ff-lo,wf=1/vo-1/bf,If=Sf/bf;return wf?(-If+Math.sqrt(If*If-2*wf*(Sf*Sf/(-2*bf)-mf+bf/2+fo-vo/2)))/wf+lo:(lo+ff)/2}function iO(nt,at){var wt=nt.N;if(wt)return ek(wt,at);var lo=nt.site;return lo[1]===at?lo[0]:1/0}var Bw,s1,jw,_0,Tv=1e-6,oO=1e-12;function tk(nt,at){return at[1]-nt[1]||at[0]-nt[0]}function IS(nt,at){var wt,lo,fo,vo=nt.sort(tk).pop();for(_0=[],s1=new Array(nt.length),Bw=new tE,jw=new tE;;)if(fo=CS,vo&&(!fo||vo[1]Tv||Math.abs(zf[0][1]-zf[1][1])>Tv)||delete _0[Wf]})(ls,ff,mf,bf),function(Sf,wf,If,jf){var zf,Wf,Mf,np,pp,Uf,tp,op,up,sp,Qp,Ap,rg=s1.length,zp=!0;for(zf=0;zfTv||Math.abs(Ap-up)>Tv)&&(pp.splice(np,0,_0.push(Pb(Mf,sp,Math.abs(Qp-Sf)Tv?[Sf,Math.abs(op-Sf)Tv?[Math.abs(up-jf)Tv?[If,Math.abs(op-If)Tv?[Math.abs(up-wf)=-270&&(zf=-zf),jf<-180&&jf>=-360&&(Wf=-Wf),vo==="degrees"){var Mf=zf*Math.cos(Sf)+Wf*Math.sin(Sf),np=Wf*Math.cos(Sf)-zf*Math.sin(Sf);zf=Mf,Wf=np}wf.push([zf+bf[0],Wf+bf[1]])}return wf.push(wf[0]),vo==="degrees"?yn([wf],mf):PT(yn([wf],mf),ls,{pivot:ff})}function nk(nt){var at=nt*Math.PI/180;return Math.tan(at)}function PS(nt,at){at===void 0&&(at={});var wt=0,lo=0,fo=0;return Ip(nt,function(vo,ls,ff){var mf=at.weight?ff==null?void 0:ff[at.weight]:void 0;if(!Lf(mf=mf??1))throw new Error("weight value must be a number for feature index "+ls);(mf=Number(mf))>0&&rp(vo,function(bf){wt+=bf[0]*mf,lo+=bf[1]*mf,fo+=mf})}),ot([wt/fo,lo/fo],at.properties,at)}function ik(nt,at,wt,lo,fo){var vo=lo.tolerance||.001,ls=0,ff=0,mf=0,bf=0;if(vp(wt,function(If){var jf,zf=(jf=If.properties)===null||jf===void 0?void 0:jf.weight,Wf=zf??1;if(!Lf(Wf=Number(Wf)))throw new Error("weight value must be a number");if(Wf>0){bf+=1;var Mf=Wf*_m(If,nt);Mf===0&&(Mf=1);var np=Wf/Mf;ls+=If.geometry.coordinates[0]*np,ff+=If.geometry.coordinates[1]*np,mf+=np}}),bf<1)throw new Error("no features to measure");var Sf=ls/mf,wf=ff/mf;return bf===1||fo===0||Math.abs(Sf-at[0])wt&&(wt=mf,lo=vo,at.push([]));var bf=vo-lo,Sf=nt.coordinates[mf][bf+1],wf=fo[0],If=fo[1],jf=Sf[0],zf=Sf[1];at[mf].push([.75*wf+.25*jf,.75*If+.25*zf]),at[mf].push([.25*wf+.75*jf,.25*If+.75*zf])},!0),at.forEach(function(fo){fo.push(fo[0])})}function lO(nt,at){var wt=0,lo=0,fo=0;rp(nt,function(vo,ls,ff,mf,bf){mf>fo&&(fo=mf,lo=ls,at.push([[]])),bf>wt&&(wt=bf,lo=ls,at[mf].push([]));var Sf=ls-lo,wf=nt.coordinates[mf][bf][Sf+1],If=vo[0],jf=vo[1],zf=wf[0],Wf=wf[1];at[mf][bf].push([.75*If+.25*zf,.75*jf+.25*Wf]),at[mf][bf].push([.25*If+.75*zf,.25*jf+.75*Wf])},!0),at.forEach(function(vo){vo.forEach(function(ls){ls.push(ls[0])})})}function cO(nt,at,wt){wt===void 0&&(wt=2);var lo=cp(nt),fo=cp(at),vo=lo[0]-fo[0],ls=lo[1]-fo[1];return wt===1?Math.abs(vo)+Math.abs(ls):Math.pow(Math.pow(vo,wt)+Math.pow(ls,wt),1/wt)}function ak(nt,at){var wt=(at=at||{}).threshold||1e4,lo=at.p||2,fo=at.binary||!1,vo=at.alpha||-1,ls=at.standardization||!1,ff=[];vp(nt,function(jf){ff.push(i1(jf))});for(var mf=[],bf=0;bf0?1:0}(nt[0]))*at,wt*Math.log(Math.tan(.25*Math.PI+.5*nt[1]*at))];return fo[0]>lo&&(fo[0]=lo),fo[0]<-lo&&(fo[0]=-lo),fo[1]>lo&&(fo[1]=lo),fo[1]<-lo&&(fo[1]=-lo),fo}function fk(nt){var at=180/Math.PI,wt=6378137;return[nt[0]*at/wt,(.5*Math.PI-2*Math.atan(Math.exp(-nt[1]/wt)))*at]}IS.prototype={constructor:IS,polygons:function(){var nt=this.edges;return this.cells.map(function(at){var wt=at.halfedges.map(function(lo){return KT(at,nt[lo])});return wt.data=at.site.data,wt})},triangles:function(){var nt=[],at=this.edges;return this.cells.forEach(function(wt,lo){if(vo=(fo=wt.halfedges).length)for(var fo,vo,ls,ff,mf,bf,Sf=wt.site,wf=-1,If=at[fo[vo-1]],jf=If.left===Sf?If.right:If.left;++wf=ff)return null;var mf=nt-fo.site[0],bf=at-fo.site[1],Sf=mf*mf+bf*bf;do fo=vo.cells[lo=ls],ls=null,fo.halfedges.forEach(function(wf){var If=vo.edges[wf],jf=If.left;if(jf!==fo.site&&jf||(jf=If.right)){var zf=nt-jf[0],Wf=at-jf[1],Mf=zf*zf+Wf*Wf;Mf0?bf+wf[Sf-1]:bf}),mf.forEach(function(bf){bf=2*bf*Math.PI/mf[mf.length-1];var Sf=Math.random();ff.push([Sf*(at.max_radial_length||10)*Math.sin(bf),Sf*(at.max_radial_length||10)*Math.cos(bf)])}),ff[ff.length-1]=ff[0],ff=ff.map((ls=qx(at.bbox),function(bf){return[bf[0]+ls[0],bf[1]+ls[1]]})),wt.push(yn([ff]))},fo=0;foat?1:nt0)||at.right===null||wt(nt,at.right.key)>0&&(ff=at.right,at.right=ff.left,ff.left=at,(at=ff).right===null))break;fo.right=at,fo=at,at=at.right}}return fo.right=at.left,vo.left=at.right,at.left=lo.right,at.right=lo.left,at}function LS(nt,at,wt,lo){var fo=new n_(nt,at);if(wt===null)return fo.left=fo.right=null,fo;var vo=lo(nt,(wt=p$(nt,wt,lo)).key);return vo<0?(fo.left=wt.left,fo.right=wt,wt.left=null):vo>=0&&(fo.right=wt.right,fo.left=wt,wt.right=null),fo}function FS(nt,at,wt){var lo=null,fo=null;if(at){var vo=wt((at=p$(nt,at,wt)).key,nt);vo===0?(lo=at.left,fo=at.right):vo<0?(fo=at.right,at.right=null,lo=at):(lo=at.left,at.left=null,fo=at)}return{left:lo,right:fo}}function BS(nt,at,wt,lo,fo){if(nt){lo(at+(wt?"└── ":"├── ")+fo(nt)+` -`);var vo=at+(wt?" ":"│ ");nt.left&&BS(nt.left,vo,!1,lo,fo),nt.right&&BS(nt.right,vo,!0,lo,fo)}}var jS=function(){function nt(at){at===void 0&&(at=DS),this._root=null,this._size=0,this._comparator=at}return nt.prototype.insert=function(at,wt){return this._size++,this._root=LS(at,wt,this._root,this._comparator)},nt.prototype.add=function(at,wt){var lo=new n_(at,wt);this._root===null&&(lo.left=lo.right=null,this._size++,this._root=lo);var fo=this._comparator,vo=p$(at,this._root,fo),ls=fo(at,vo.key);return ls===0?this._root=vo:(ls<0?(lo.left=vo.left,lo.right=vo,vo.left=null):ls>0&&(lo.right=vo.right,lo.left=vo,vo.right=null),this._size++,this._root=lo),this._root},nt.prototype.remove=function(at){this._root=this._remove(at,this._root,this._comparator)},nt.prototype._remove=function(at,wt,lo){var fo;return wt===null?null:lo(at,(wt=p$(at,wt,lo)).key)===0?(wt.left===null?fo=wt.right:(fo=p$(at,wt.left,lo)).right=wt.right,this._size--,fo):wt},nt.prototype.pop=function(){var at=this._root;if(at){for(;at.left;)at=at.left;return this._root=p$(at.key,this._root,this._comparator),this._root=this._remove(at.key,this._root,this._comparator),{key:at.key,data:at.data}}return null},nt.prototype.findStatic=function(at){for(var wt=this._root,lo=this._comparator;wt;){var fo=lo(at,wt.key);if(fo===0)return wt;wt=fo<0?wt.left:wt.right}return null},nt.prototype.find=function(at){return this._root&&(this._root=p$(at,this._root,this._comparator),this._comparator(at,this._root.key)!==0)?null:this._root},nt.prototype.contains=function(at){for(var wt=this._root,lo=this._comparator;wt;){var fo=lo(at,wt.key);if(fo===0)return!0;wt=fo<0?wt.left:wt.right}return!1},nt.prototype.forEach=function(at,wt){for(var lo=this._root,fo=[],vo=!1;!vo;)lo!==null?(fo.push(lo),lo=lo.left):fo.length!==0?(lo=fo.pop(),at.call(wt,lo),lo=lo.right):vo=!0;return this},nt.prototype.range=function(at,wt,lo,fo){for(var vo=[],ls=this._comparator,ff=this._root;vo.length!==0||ff;)if(ff)vo.push(ff),ff=ff.left;else{if(ls((ff=vo.pop()).key,wt)>0)break;if(ls(ff.key,at)>=0&&lo.call(fo,ff))return this;ff=ff.right}return this},nt.prototype.keys=function(){var at=[];return this.forEach(function(wt){var lo=wt.key;return at.push(lo)}),at},nt.prototype.values=function(){var at=[];return this.forEach(function(wt){var lo=wt.data;return at.push(lo)}),at},nt.prototype.min=function(){return this._root?this.minNode(this._root).key:null},nt.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},nt.prototype.minNode=function(at){if(at===void 0&&(at=this._root),at)for(;at.left;)at=at.left;return at},nt.prototype.maxNode=function(at){if(at===void 0&&(at=this._root),at)for(;at.right;)at=at.right;return at},nt.prototype.at=function(at){for(var wt=this._root,lo=!1,fo=0,vo=[];!lo;)if(wt)vo.push(wt),wt=wt.left;else if(vo.length>0){if(wt=vo.pop(),fo===at)return wt;fo++,wt=wt.right}else lo=!0;return null},nt.prototype.next=function(at){var wt=this._root,lo=null;if(at.right){for(lo=at.right;lo.left;)lo=lo.left;return lo}for(var fo=this._comparator;wt;){var vo=fo(at.key,wt.key);if(vo===0)break;vo<0?(lo=wt,wt=wt.left):wt=wt.right}return lo},nt.prototype.prev=function(at){var wt=this._root,lo=null;if(at.left!==null){for(lo=at.left;lo.right;)lo=lo.right;return lo}for(var fo=this._comparator;wt;){var vo=fo(at.key,wt.key);if(vo===0)break;vo<0?wt=wt.left:(lo=wt,wt=wt.right)}return lo},nt.prototype.clear=function(){return this._root=null,this._size=0,this},nt.prototype.toList=function(){return function(at){for(var wt=at,lo=[],fo=!1,vo=new n_(null,null),ls=vo;!fo;)wt?(lo.push(wt),wt=wt.left):lo.length>0?wt=(wt=ls=ls.next=lo.pop()).right:fo=!0;return ls.next=null,vo.next}(this._root)},nt.prototype.load=function(at,wt,lo){wt===void 0&&(wt=[]),lo===void 0&&(lo=!1);var fo=at.length,vo=this._comparator;if(lo&&HS(at,wt,0,fo-1,vo),this._root===null)this._root=zS(at,wt,0,fo),this._size=fo;else{var ls=function(ff,mf,bf){for(var Sf=new n_(null,null),xf=Sf,If=ff,jf=mf;If!==null&&jf!==null;)bf(If.key,jf.key)<0?(xf.next=If,If=If.next):(xf.next=jf,jf=jf.next),xf=xf.next;return If!==null?xf.next=If:jf!==null&&(xf.next=jf),Sf.next}(this.toList(),function(ff,mf){for(var bf=new n_(null,null),Sf=bf,xf=0;xf0){var vo=wt+Math.floor(fo/2),ls=nt[vo],ff=at[vo],mf=new n_(ls,ff);return mf.left=zS(nt,at,wt,vo),mf.right=zS(nt,at,vo+1,lo),mf}return null}function oE(nt,at,wt){var lo=wt-at;if(lo>0){var fo=at+Math.floor(lo/2),vo=oE(nt,at,fo),ls=nt.head;return ls.left=vo,nt.head=nt.head.next,ls.right=oE(nt,fo+1,wt),ls}return null}function HS(nt,at,wt,lo,fo){if(!(wt>=lo)){for(var vo=nt[wt+lo>>1],ls=wt-1,ff=lo+1;;){do ls++;while(fo(nt[ls],vo)<0);do ff--;while(fo(nt[ff],vo)>0);if(ls>=ff)break;var mf=nt[ls];nt[ls]=nt[ff],nt[ff]=mf,mf=at[ls],at[ls]=at[ff],at[ff]=mf}HS(nt,at,wt,ff,fo),HS(nt,at,ff+1,lo,fo)}}function P0(nt,at){if(!(nt instanceof at))throw new TypeError("Cannot call a class as a function")}function US(nt,at){for(var wt=0;wtwt.x?1:at.ywt.y?1:0}}]),w0(nt,[{key:"link",value:function(at){if(at.point===this.point)throw new Error("Tried to link already linked events");for(var wt=at.point.events,lo=0,fo=wt.length;lo=0&&xf>=0?bfIf?-1:0:mf<0&&xf<0?bfIf?1:0:xfmf?1:0}}}]),nt}(),pO=0,cE=function(){function nt(at,wt,lo,fo){P0(this,nt),this.id=++pO,this.leftSE=at,at.segment=this,at.otherSE=wt,this.rightSE=wt,wt.segment=this,wt.otherSE=at,this.rings=lo,this.windings=fo}return w0(nt,null,[{key:"compare",value:function(at,wt){var lo=at.leftSE.point.x,fo=wt.leftSE.point.x,vo=at.rightSE.point.x,ls=wt.rightSE.point.x;if(lsff&&mf>bf)return-1;var xf=at.comparePoint(wt.leftSE.point);if(xf<0)return 1;if(xf>0)return-1;var If=wt.comparePoint(at.rightSE.point);return If!==0?If:-1}if(lo>fo){if(ffmf&&ff>Sf)return 1;var jf=wt.comparePoint(at.leftSE.point);if(jf!==0)return jf;var zf=at.comparePoint(wt.rightSE.point);return zf<0?1:zf>0?-1:1}if(ffmf)return 1;if(vols){var Mf=at.comparePoint(wt.rightSE.point);if(Mf<0)return 1;if(Mf>0)return-1}if(vo!==ls){var np=bf-ff,pp=vo-lo,Uf=Sf-mf,tp=ls-fo;if(np>pp&&Uftp)return-1}return vo>ls?1:voSf?1:at.idwt.id?1:0}}]),w0(nt,[{key:"replaceRightSE",value:function(at){this.rightSE=at,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var at=this.leftSE.point.y,wt=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:atwt?at:wt}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(at){return at.x===this.leftSE.point.x&&at.y===this.leftSE.point.y||at.x===this.rightSE.point.x&&at.y===this.rightSE.point.y}},{key:"comparePoint",value:function(at){if(this.isAnEndpoint(at))return 0;var wt=this.leftSE.point,lo=this.rightSE.point,fo=this.vector();if(wt.x===lo.x)return at.x===wt.x?0:at.x0&&ff.swapEvents(),Ab.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),lo&&(fo.checkForConsuming(),vo.checkForConsuming()),wt}},{key:"swapEvents",value:function(){var at=this.rightSE;this.rightSE=this.leftSE,this.leftSE=at,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var wt=0,lo=this.windings.length;wt0){var vo=wt;wt=lo,lo=vo}if(wt.prev===lo){var ls=wt;wt=lo,lo=ls}for(var ff=0,mf=lo.rings.length;ff0))throw new Error("Tried to create degenerate segment at [".concat(at.x,", ").concat(at.y,"]"));fo=wt,vo=at,ls=-1}return new nt(new Ab(fo,!0),new Ab(vo,!1),[lo],[ls])}}]),nt}(),kk=function(){function nt(at,wt,lo){if(P0(this,nt),!Array.isArray(at)||at.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=wt,this.isExterior=lo,this.segments=[],typeof at[0][0]!="number"||typeof at[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var fo=Kx.round(at[0][0],at[0][1]);this.bbox={ll:{x:fo.x,y:fo.y},ur:{x:fo.x,y:fo.y}};for(var vo=fo,ls=1,ff=at.length;lsthis.bbox.ur.x&&(this.bbox.ur.x=mf.x),mf.y>this.bbox.ur.y&&(this.bbox.ur.y=mf.y),vo=mf)}fo.x===vo.x&&fo.y===vo.y||this.segments.push(cE.fromRing(vo,fo,this))}return w0(nt,[{key:"getSweepEvents",value:function(){for(var at=[],wt=0,lo=this.segments.length;wtthis.bbox.ur.x&&(this.bbox.ur.x=vo.bbox.ur.x),vo.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=vo.bbox.ur.y),this.interiorRings.push(vo)}this.multiPoly=wt}return w0(nt,[{key:"getSweepEvents",value:function(){for(var at=this.exteriorRing.getSweepEvents(),wt=0,lo=this.interiorRings.length;wtthis.bbox.ur.x&&(this.bbox.ur.x=vo.bbox.ur.x),vo.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=vo.bbox.ur.y),this.polys.push(vo)}this.isSubject=wt}return w0(nt,[{key:"getSweepEvents",value:function(){for(var at=[],wt=0,lo=this.polys.length;wt0&&(at=fo)}for(var vo=at.segment.prevInResult(),ls=vo?vo.prevInResult():null;;){if(!vo)return null;if(!ls)return vo.ringOut;if(ls.ringOut!==vo.ringOut)return ls.ringOut.enclosingRing()!==vo.ringOut?vo.ringOut:vo.ringOut.enclosingRing();vo=ls.prevInResult(),ls=vo?vo.prevInResult():null}}}]),nt}(),Ik=function(){function nt(at){P0(this,nt),this.exteriorRing=at,at.poly=this,this.interiorRings=[]}return w0(nt,[{key:"addInterior",value:function(at){this.interiorRings.push(at),at.poly=this}},{key:"getGeom",value:function(){var at=[this.exteriorRing.getGeom()];if(at[0]===null)return null;for(var wt=0,lo=this.interiorRings.length;wt1&&arguments[1]!==void 0?arguments[1]:cE.compare;P0(this,nt),this.queue=at,this.tree=new jS(wt),this.segments=[]}return w0(nt,[{key:"process",value:function(at){var wt=at.segment,lo=[];if(at.consumedBy)return at.isLeft?this.queue.remove(at.otherSE):this.tree.remove(wt),lo;var fo=at.isLeft?this.tree.insert(wt):this.tree.find(wt);if(!fo)throw new Error("Unable to find segment #".concat(wt.id," ")+"[".concat(wt.leftSE.point.x,", ").concat(wt.leftSE.point.y,"] -> ")+"[".concat(wt.rightSE.point.x,", ").concat(wt.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var vo=fo,ls=fo,ff=void 0,mf=void 0;ff===void 0;)(vo=this.tree.prev(vo))===null?ff=null:vo.key.consumedBy===void 0&&(ff=vo.key);for(;mf===void 0;)(ls=this.tree.next(ls))===null?mf=null:ls.key.consumedBy===void 0&&(mf=ls.key);if(at.isLeft){var bf=null;if(ff){var Sf=ff.getIntersection(wt);if(Sf!==null&&(wt.isAnEndpoint(Sf)||(bf=Sf),!ff.isAnEndpoint(Sf)))for(var xf=this._splitSafely(ff,Sf),If=0,jf=xf.length;If0?(this.tree.remove(wt),lo.push(at)):(this.segments.push(wt),wt.prev=ff)}else{if(ff&&mf){var sp=ff.getIntersection(mf);if(sp!==null){if(!ff.isAnEndpoint(sp))for(var Qp=this._splitSafely(ff,sp),Ap=0,rg=Qp.length;ApPk)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var tp=new vO(zf),op=zf.size,up=zf.pop();up;){var sp=up.key;if(zf.size===op){var Qp=sp.segment;throw new Error("Unable to pop() ".concat(sp.isLeft?"left":"right"," SweepEvent ")+"[".concat(sp.point.x,", ").concat(sp.point.y,"] from segment #").concat(Qp.id," ")+"[".concat(Qp.leftSE.point.x,", ").concat(Qp.leftSE.point.y,"] -> ")+"[".concat(Qp.rightSE.point.x,", ").concat(Qp.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(zf.size>Pk)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(tp.segments.length>yO)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var Ap=tp.process(sp),rg=0,zp=Ap.length;rg1?at-1:0),lo=1;lo1?at-1:0),lo=1;lo1?at-1:0),lo=1;lo1?at-1:0),lo=1;loat.x?1:this.yat.y?1:0},Gp.prototype.clone=function(){},Gp.prototype.copy=function(){return new Gp(this)},Gp.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},Gp.prototype.distance3D=function(nt){var at=this.x-nt.x,wt=this.y-nt.y,lo=this.z-nt.z;return Math.sqrt(at*at+wt*wt+lo*lo)},Gp.prototype.distance=function(nt){var at=this.x-nt.x,wt=this.y-nt.y;return Math.sqrt(at*at+wt*wt)},Gp.prototype.hashCode=function(){var nt=17;return nt=37*(nt=37*nt+Gp.hashCode(this.x))+Gp.hashCode(this.y)},Gp.prototype.setCoordinate=function(nt){this.x=nt.x,this.y=nt.y,this.z=nt.z},Gp.prototype.interfaces_=function(){return[G0,Zx,W0]},Gp.prototype.getClass=function(){return Gp},Gp.hashCode=function(){if(arguments.length===1){var nt=arguments[0],at=dm.doubleToLongBits(nt);return Math.trunc((at^at)>>>32)}},L_.DimensionalComparator.get=function(){return v$},L_.serialVersionUID.get=function(){return 6683108902428367e3},L_.NULL_ORDINATE.get=function(){return dm.NaN},L_.X.get=function(){return 0},L_.Y.get=function(){return 1},L_.Z.get=function(){return 2},Object.defineProperties(Gp,L_);var v$=function(nt){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var at=arguments[0];if(at!==2&&at!==3)throw new Pv("only 2 or 3 dimensions may be specified");this._dimensionsToTest=at}}};v$.prototype.compare=function(nt,at){var wt=nt,lo=at,fo=v$.compare(wt.x,lo.x);if(fo!==0)return fo;var vo=v$.compare(wt.y,lo.y);return vo!==0?vo:this._dimensionsToTest<=2?0:v$.compare(wt.z,lo.z)},v$.prototype.interfaces_=function(){return[zw]},v$.prototype.getClass=function(){return v$},v$.compare=function(nt,at){return ntat?1:dm.isNaN(nt)?dm.isNaN(at)?0:-1:dm.isNaN(at)?1:0};var Hw=function(){};Hw.prototype.create=function(){},Hw.prototype.interfaces_=function(){return[]},Hw.prototype.getClass=function(){return Hw};var eg=function(){},Jx={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};eg.prototype.interfaces_=function(){return[]},eg.prototype.getClass=function(){return eg},eg.toLocationSymbol=function(nt){switch(nt){case eg.EXTERIOR:return"e";case eg.BOUNDARY:return"b";case eg.INTERIOR:return"i";case eg.NONE:return"-"}throw new Pv("Unknown location value: "+nt)},Jx.INTERIOR.get=function(){return 0},Jx.BOUNDARY.get=function(){return 1},Jx.EXTERIOR.get=function(){return 2},Jx.NONE.get=function(){return-1},Object.defineProperties(eg,Jx);var nm=function(nt,at){return nt.interfaces_&&nt.interfaces_().indexOf(at)>-1},A0=function(){},Rk={LOG_10:{configurable:!0}};A0.prototype.interfaces_=function(){return[]},A0.prototype.getClass=function(){return A0},A0.log10=function(nt){var at=Math.log(nt);return dm.isInfinite(at)||dm.isNaN(at)?at:at/A0.LOG_10},A0.min=function(nt,at,wt,lo){var fo=nt;return atwt?wt:nt}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var lo=arguments[0],fo=arguments[1],vo=arguments[2];return lovo?vo:lo}},A0.wrap=function(nt,at){return nt<0?at- -nt%at:nt%at},A0.max=function(){if(arguments.length===3){var nt=arguments[0],at=arguments[1],wt=arguments[2],lo=nt;return at>lo&&(lo=at),wt>lo&&(lo=wt),lo}if(arguments.length===4){var fo=arguments[0],vo=arguments[1],ls=arguments[2],ff=arguments[3],mf=fo;return vo>mf&&(mf=vo),ls>mf&&(mf=ls),ff>mf&&(mf=ff),mf}},A0.average=function(nt,at){return(nt+at)/2},Rk.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(A0,Rk);var A1=function(nt){this.str=nt};A1.prototype.append=function(nt){this.str+=nt},A1.prototype.setCharAt=function(nt,at){this.str=this.str.substr(0,nt)+at+this.str.substr(nt+1)},A1.prototype.toString=function(nt){return this.str};var R1=function(nt){this.value=nt};R1.prototype.intValue=function(){return this.value},R1.prototype.compareTo=function(nt){return this.valuent?1:0},R1.isNaN=function(nt){return Number.isNaN(nt)};var Qx=function(){};Qx.isWhitespace=function(nt){return nt<=32&&nt>=0||nt===127},Qx.toUpperCase=function(nt){return nt.toUpperCase()};var ag=function nt(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var at=arguments[0];this.init(at)}else if(arguments[0]instanceof nt){var wt=arguments[0];this.init(wt)}else if(typeof arguments[0]=="string"){var lo=arguments[0];nt.call(this,nt.parse(lo))}}else if(arguments.length===2){var fo=arguments[0],vo=arguments[1];this.init(fo,vo)}},l1={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};ag.prototype.le=function(nt){return(this._hi9?(Sf=!0,xf="9"):xf="0"+bf,ls.append(xf),wt=wt.subtract(ag.valueOf(bf)).multiply(ag.TEN),Sf&&wt.selfAdd(ag.TEN);var If=!0,jf=ag.magnitude(wt._hi);if(jf<0&&Math.abs(jf)>=ff-mf&&(If=!1),!If)break}return at[0]=lo,ls.toString()},ag.prototype.sqr=function(){return this.multiply(this)},ag.prototype.doubleValue=function(){return this._hi+this._lo},ag.prototype.subtract=function(){if(arguments[0]instanceof ag){var nt=arguments[0];return this.add(nt.negate())}if(typeof arguments[0]=="number"){var at=arguments[0];return this.add(-at)}},ag.prototype.equals=function(){if(arguments.length===1){var nt=arguments[0];return this._hi===nt._hi&&this._lo===nt._lo}},ag.prototype.isZero=function(){return this._hi===0&&this._lo===0},ag.prototype.selfSubtract=function(){if(arguments[0]instanceof ag){var nt=arguments[0];return this.isNaN()?this:this.selfAdd(-nt._hi,-nt._lo)}if(typeof arguments[0]=="number"){var at=arguments[0];return this.isNaN()?this:this.selfAdd(-at,0)}},ag.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},ag.prototype.min=function(nt){return this.le(nt)?this:nt},ag.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof ag){var nt=arguments[0];return this.selfDivide(nt._hi,nt._lo)}if(typeof arguments[0]=="number"){var at=arguments[0];return this.selfDivide(at,0)}}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1],fo=null,vo=null,ls=null,ff=null,mf=null,bf=null,Sf=null,xf=null;return mf=this._hi/wt,xf=(fo=(bf=ag.SPLIT*mf)-(fo=bf-mf))*(ls=(xf=ag.SPLIT*wt)-(ls=xf-wt))-(Sf=mf*wt)+fo*(ff=wt-ls)+(vo=mf-fo)*ls+vo*ff,xf=mf+(bf=(this._hi-Sf-xf+this._lo-mf*lo)/wt),this._hi=xf,this._lo=mf-xf+bf,this}},ag.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},ag.prototype.divide=function(){if(arguments[0]instanceof ag){var nt=arguments[0],at=null,wt=null,lo=null,fo=null,vo=null,ls=null,ff=null,mf=null;wt=(vo=this._hi/nt._hi)-(at=(ls=ag.SPLIT*vo)-(at=ls-vo)),mf=at*(lo=(mf=ag.SPLIT*nt._hi)-(lo=mf-nt._hi))-(ff=vo*nt._hi)+at*(fo=nt._hi-lo)+wt*lo+wt*fo;var bf=mf=vo+(ls=(this._hi-ff-mf+this._lo-vo*nt._lo)/nt._hi),Sf=vo-mf+ls;return new ag(bf,Sf)}if(typeof arguments[0]=="number"){var xf=arguments[0];return dm.isNaN(xf)?ag.createNaN():ag.copy(this).selfDivide(xf,0)}},ag.prototype.ge=function(nt){return(this._hi>nt._hi||this._hi===nt._hi)&&this._lo>=nt._lo},ag.prototype.pow=function(nt){if(nt===0)return ag.valueOf(1);var at=new ag(this),wt=ag.valueOf(1),lo=Math.abs(nt);if(lo>1)for(;lo>0;)lo%2==1&&wt.selfMultiply(at),(lo/=2)>0&&(at=at.sqr());else wt=at;return nt<0?wt.reciprocal():wt},ag.prototype.ceil=function(){if(this.isNaN())return ag.NaN;var nt=Math.ceil(this._hi),at=0;return nt===this._hi&&(at=Math.ceil(this._lo)),new ag(nt,at)},ag.prototype.compareTo=function(nt){var at=nt;return this._hiat._hi?1:this._loat._lo?1:0},ag.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},ag.prototype.setValue=function(){if(arguments[0]instanceof ag){var nt=arguments[0];return this.init(nt),this}if(typeof arguments[0]=="number"){var at=arguments[0];return this.init(at),this}},ag.prototype.max=function(nt){return this.ge(nt)?this:nt},ag.prototype.sqrt=function(){if(this.isZero())return ag.valueOf(0);if(this.isNegative())return ag.NaN;var nt=1/Math.sqrt(this._hi),at=this._hi*nt,wt=ag.valueOf(at),lo=this.subtract(wt.sqr())._hi*(.5*nt);return wt.add(lo)},ag.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof ag){var nt=arguments[0];return this.selfAdd(nt._hi,nt._lo)}if(typeof arguments[0]=="number"){var at=arguments[0],wt=null,lo=null,fo=null,vo=null,ls=null,ff=null;return vo=(fo=this._hi+at)-(ls=fo-this._hi),lo=(ff=(vo=at-ls+(this._hi-vo))+this._lo)+(fo-(wt=fo+ff)),this._hi=wt+lo,this._lo=lo+(wt-this._hi),this}}else if(arguments.length===2){var mf=arguments[0],bf=arguments[1],Sf=null,xf=null,If=null,jf=null,zf=null,Wf=null,Mf=null;jf=this._hi+mf,xf=this._lo+bf,zf=jf-(Wf=jf-this._hi),If=xf-(Mf=xf-this._lo);var np=(Sf=jf+(Wf=(zf=mf-Wf+(this._hi-zf))+xf))+(Wf=(If=bf-Mf+(this._lo-If))+(Wf+(jf-Sf))),pp=Wf+(Sf-np);return this._hi=np,this._lo=pp,this}},ag.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof ag){var nt=arguments[0];return this.selfMultiply(nt._hi,nt._lo)}if(typeof arguments[0]=="number"){var at=arguments[0];return this.selfMultiply(at,0)}}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1],fo=null,vo=null,ls=null,ff=null,mf=null,bf=null;fo=(mf=ag.SPLIT*this._hi)-this._hi,bf=ag.SPLIT*wt,fo=mf-fo,vo=this._hi-fo,ls=bf-wt;var Sf=(mf=this._hi*wt)+(bf=fo*(ls=bf-ls)-mf+fo*(ff=wt-ls)+vo*ls+vo*ff+(this._hi*lo+this._lo*wt)),xf=bf+(fo=mf-Sf);return this._hi=Sf,this._lo=xf,this}},ag.prototype.selfSqr=function(){return this.selfMultiply(this)},ag.prototype.floor=function(){if(this.isNaN())return ag.NaN;var nt=Math.floor(this._hi),at=0;return nt===this._hi&&(at=Math.floor(this._lo)),new ag(nt,at)},ag.prototype.negate=function(){return this.isNaN()?this:new ag(-this._hi,-this._lo)},ag.prototype.clone=function(){},ag.prototype.multiply=function(){if(arguments[0]instanceof ag){var nt=arguments[0];return nt.isNaN()?ag.createNaN():ag.copy(this).selfMultiply(nt)}if(typeof arguments[0]=="number"){var at=arguments[0];return dm.isNaN(at)?ag.createNaN():ag.copy(this).selfMultiply(at,0)}},ag.prototype.isNaN=function(){return dm.isNaN(this._hi)},ag.prototype.intValue=function(){return Math.trunc(this._hi)},ag.prototype.toString=function(){var nt=ag.magnitude(this._hi);return nt>=-3&&nt<=20?this.toStandardNotation():this.toSciNotation()},ag.prototype.toStandardNotation=function(){var nt=this.getSpecialNumberString();if(nt!==null)return nt;var at=new Array(1).fill(null),wt=this.extractSignificantDigits(!0,at),lo=at[0]+1,fo=wt;if(wt.charAt(0)===".")fo="0"+wt;else if(lo<0)fo="0."+ag.stringOfChar("0",-lo)+wt;else if(wt.indexOf(".")===-1){var vo=lo-wt.length;fo=wt+ag.stringOfChar("0",vo)+".0"}return this.isNegative()?"-"+fo:fo},ag.prototype.reciprocal=function(){var nt,at,wt,lo,fo=null,vo=null,ls=null,ff=null;nt=(wt=1/this._hi)-(fo=(ls=ag.SPLIT*wt)-(fo=ls-wt)),vo=(ff=ag.SPLIT*this._hi)-this._hi;var mf=wt+(ls=(1-(lo=wt*this._hi)-(ff=fo*(vo=ff-vo)-lo+fo*(at=this._hi-vo)+nt*vo+nt*at)-wt*this._lo)/this._hi);return new ag(mf,wt-mf+ls)},ag.prototype.toSciNotation=function(){if(this.isZero())return ag.SCI_NOT_ZERO;var nt=this.getSpecialNumberString();if(nt!==null)return nt;var at=new Array(1).fill(null),wt=this.extractSignificantDigits(!1,at),lo=ag.SCI_NOT_EXPONENT_CHAR+at[0];if(wt.charAt(0)==="0")throw new Error("Found leading zero: "+wt);var fo="";wt.length>1&&(fo=wt.substring(1));var vo=wt.charAt(0)+"."+fo;return this.isNegative()?"-"+vo+lo:vo+lo},ag.prototype.abs=function(){return this.isNaN()?ag.NaN:this.isNegative()?this.negate():new ag(this)},ag.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},ag.prototype.lt=function(nt){return(this._hint._hi||this._hi===nt._hi)&&this._lo>nt._lo},ag.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},ag.prototype.trunc=function(){return this.isNaN()?ag.NaN:this.isPositive()?this.floor():this.ceil()},ag.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},ag.prototype.interfaces_=function(){return[W0,G0,Zx]},ag.prototype.getClass=function(){return ag},ag.sqr=function(nt){return ag.valueOf(nt).selfMultiply(nt)},ag.valueOf=function(){if(typeof arguments[0]=="string"){var nt=arguments[0];return ag.parse(nt)}if(typeof arguments[0]=="number"){var at=arguments[0];return new ag(at)}},ag.sqrt=function(nt){return ag.valueOf(nt).sqrt()},ag.parse=function(nt){for(var at=0,wt=nt.length;Qx.isWhitespace(nt.charAt(at));)at++;var lo=!1;if(at=wt);){var bf=nt.charAt(at);if(at++,Qx.isDigit(bf)){var Sf=bf-"0";vo.selfMultiply(ag.TEN),vo.selfAdd(Sf),ls++}else{if(bf!=="."){if(bf==="e"||bf==="E"){var xf=nt.substring(at);try{mf=R1.parseInt(xf)}catch(Mf){throw Mf instanceof Error?new Error("Invalid exponent "+xf+" in string "+nt):Mf}break}throw new Error("Unexpected character '"+bf+"' at position "+at+" in string "+nt)}ff=ls}}var If=vo,jf=ls-ff-mf;if(jf===0)If=vo;else if(jf>0){var zf=ag.TEN.pow(jf);If=vo.divide(zf)}else if(jf<0){var Wf=ag.TEN.pow(-jf);If=vo.multiply(Wf)}return lo?If.negate():If},ag.createNaN=function(){return new ag(dm.NaN,dm.NaN)},ag.copy=function(nt){return new ag(nt)},ag.magnitude=function(nt){var at=Math.abs(nt),wt=Math.log(at)/Math.log(10),lo=Math.trunc(Math.floor(wt));return 10*Math.pow(10,lo)<=at&&(lo+=1),lo},ag.stringOfChar=function(nt,at){for(var wt=new A1,lo=0;lo0){if(vo<=0)return a0.signum(ls);lo=fo+vo}else{if(!(fo<0)||vo>=0)return a0.signum(ls);lo=-fo-vo}var ff=a0.DP_SAFE_EPSILON*lo;return ls>=ff||-ls>=ff?a0.signum(ls):2},a0.signum=function(nt){return nt>0?1:nt<0?-1:0},Nk.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(a0,Nk);var Vm=function(){},e2={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};e2.X.get=function(){return 0},e2.Y.get=function(){return 1},e2.Z.get=function(){return 2},e2.M.get=function(){return 3},Vm.prototype.setOrdinate=function(nt,at,wt){},Vm.prototype.size=function(){},Vm.prototype.getOrdinate=function(nt,at){},Vm.prototype.getCoordinate=function(){},Vm.prototype.getCoordinateCopy=function(nt){},Vm.prototype.getDimension=function(){},Vm.prototype.getX=function(nt){},Vm.prototype.clone=function(){},Vm.prototype.expandEnvelope=function(nt){},Vm.prototype.copy=function(){},Vm.prototype.getY=function(nt){},Vm.prototype.toCoordinateArray=function(){},Vm.prototype.interfaces_=function(){return[Zx]},Vm.prototype.getClass=function(){return Vm},Object.defineProperties(Vm,e2);var Mk=function(){},F_=function(nt){function at(){nt.call(this,"Projective point not representable on the Cartesian plane.")}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(Mk),Ry=function(){};Ry.arraycopy=function(nt,at,wt,lo,fo){for(var vo=0,ls=at;lsnt._minx?this._minx:nt._minx,wt=this._miny>nt._miny?this._miny:nt._miny,lo=this._maxx=this._minx&&at.getMaxX()<=this._maxx&&at.getMinY()>=this._miny&&at.getMaxY()<=this._maxy}}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1];return!this.isNull()&&wt>=this._minx&&wt<=this._maxx&&lo>=this._miny&&lo<=this._maxy}},Wg.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof Wg){var nt=arguments[0];return!this.isNull()&&!nt.isNull()&&!(nt._minx>this._maxx||nt._maxxthis._maxy||nt._maxythis._maxx||wtthis._maxy||lothis._maxx&&(this._maxx=at._maxx),at._minythis._maxy&&(this._maxy=at._maxy))}}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1];this.isNull()?(this._minx=wt,this._maxx=wt,this._miny=lo,this._maxy=lo):(wtthis._maxx&&(this._maxx=wt),lothis._maxy&&(this._maxy=lo))}},Wg.prototype.minExtent=function(){if(this.isNull())return 0;var nt=this.getWidth(),at=this.getHeight();return ntat._minx?1:this._minyat._miny?1:this._maxxat._maxx?1:this._maxyat._maxy?1:0},Wg.prototype.translate=function(nt,at){if(this.isNull())return null;this.init(this.getMinX()+nt,this.getMaxX()+nt,this.getMinY()+at,this.getMaxY()+at)},Wg.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},Wg.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},Wg.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},Wg.prototype.maxExtent=function(){if(this.isNull())return 0;var nt=this.getWidth(),at=this.getHeight();return nt>at?nt:at},Wg.prototype.expandBy=function(){if(arguments.length===1){var nt=arguments[0];this.expandBy(nt,nt)}else if(arguments.length===2){var at=arguments[0],wt=arguments[1];if(this.isNull())return null;this._minx-=at,this._maxx+=at,this._miny-=wt,this._maxy+=wt,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},Wg.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof Wg){var nt=arguments[0];return this.covers(nt)}if(arguments[0]instanceof Gp){var at=arguments[0];return this.covers(at)}}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1];return this.covers(wt,lo)}},Wg.prototype.centre=function(){return this.isNull()?null:new Gp((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},Wg.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof Gp){var nt=arguments[0];this.init(nt.x,nt.x,nt.y,nt.y)}else if(arguments[0]instanceof Wg){var at=arguments[0];this._minx=at._minx,this._maxx=at._maxx,this._miny=at._miny,this._maxy=at._maxy}}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1];this.init(wt.x,lo.x,wt.y,lo.y)}else if(arguments.length===4){var fo=arguments[0],vo=arguments[1],ls=arguments[2],ff=arguments[3];font._maxx&&(at=this._minx-nt._maxx);var wt=0;return this._maxynt._maxy&&(wt=this._miny-nt._maxy),at===0?wt:wt===0?at:Math.sqrt(at*at+wt*wt)},Wg.prototype.hashCode=function(){var nt=17;return nt=37*(nt=37*(nt=37*(nt=37*nt+Gp.hashCode(this._minx))+Gp.hashCode(this._maxx))+Gp.hashCode(this._miny))+Gp.hashCode(this._maxy)},Wg.prototype.interfaces_=function(){return[G0,W0]},Wg.prototype.getClass=function(){return Wg},Wg.intersects=function(){if(arguments.length===3){var nt=arguments[0],at=arguments[1],wt=arguments[2];return wt.x>=(nt.xat.x?nt.x:at.x)&&wt.y>=(nt.yat.y?nt.y:at.y)}if(arguments.length===4){var lo=arguments[0],fo=arguments[1],vo=arguments[2],ls=arguments[3],ff=Math.min(vo.x,ls.x),mf=Math.max(vo.x,ls.x),bf=Math.min(lo.x,fo.x),Sf=Math.max(lo.x,fo.x);return!(bf>mf)&&!(Sfmf)&&!(Sfwt?(this._intLineIndex[nt][0]=0,this._intLineIndex[nt][1]=1):(this._intLineIndex[nt][0]=1,this._intLineIndex[nt][1]=0)}},Rv.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},Rv.prototype.setPrecisionModel=function(nt){this._precisionModel=nt},Rv.prototype.isInteriorIntersection=function(){var nt=this;if(arguments.length===0)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(arguments.length===1){for(var at=arguments[0],wt=0;wtfo?lo:fo;else{var ls=Math.abs(nt.x-at.x),ff=Math.abs(nt.y-at.y);(vo=lo>fo?ls:ff)!==0||nt.equals(at)||(vo=Math.max(ls,ff))}return ym.isTrue(!(vo===0&&!nt.equals(at)),"Bad distance calculation"),vo},Rv.nonRobustComputeEdgeDistance=function(nt,at,wt){var lo=nt.x-at.x,fo=nt.y-at.y,vo=Math.sqrt(lo*lo+fo*fo);return ym.isTrue(!(vo===0&&!nt.equals(at)),"Invalid distance calculation"),vo},B_.DONT_INTERSECT.get=function(){return 0},B_.DO_INTERSECT.get=function(){return 1},B_.COLLINEAR.get=function(){return 2},B_.NO_INTERSECTION.get=function(){return 0},B_.POINT_INTERSECTION.get=function(){return 1},B_.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(Rv,B_);var y$=function(nt){function at(){nt.apply(this,arguments)}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.isInSegmentEnvelopes=function(wt){var lo=new Wg(this._inputLines[0][0],this._inputLines[0][1]),fo=new Wg(this._inputLines[1][0],this._inputLines[1][1]);return lo.contains(wt)&&fo.contains(wt)},at.prototype.computeIntersection=function(){if(arguments.length!==3)return nt.prototype.computeIntersection.apply(this,arguments);var wt=arguments[0],lo=arguments[1],fo=arguments[2];if(this._isProper=!1,Wg.intersects(lo,fo,wt)&&Og.orientationIndex(lo,fo,wt)===0&&Og.orientationIndex(fo,lo,wt)===0)return this._isProper=!0,(wt.equals(lo)||wt.equals(fo))&&(this._isProper=!1),this._result=nt.POINT_INTERSECTION,null;this._result=nt.NO_INTERSECTION},at.prototype.normalizeToMinimum=function(wt,lo,fo,vo,ls){ls.x=this.smallestInAbsValue(wt.x,lo.x,fo.x,vo.x),ls.y=this.smallestInAbsValue(wt.y,lo.y,fo.y,vo.y),wt.x-=ls.x,wt.y-=ls.y,lo.x-=ls.x,lo.y-=ls.y,fo.x-=ls.x,fo.y-=ls.y,vo.x-=ls.x,vo.y-=ls.y},at.prototype.safeHCoordinateIntersection=function(wt,lo,fo,vo){var ls=null;try{ls=q0.intersection(wt,lo,fo,vo)}catch(ff){if(!(ff instanceof F_))throw ff;ls=at.nearestEndpoint(wt,lo,fo,vo)}return ls},at.prototype.intersection=function(wt,lo,fo,vo){var ls=this.intersectionWithNormalization(wt,lo,fo,vo);return this.isInSegmentEnvelopes(ls)||(ls=new Gp(at.nearestEndpoint(wt,lo,fo,vo))),this._precisionModel!==null&&this._precisionModel.makePrecise(ls),ls},at.prototype.smallestInAbsValue=function(wt,lo,fo,vo){var ls=wt,ff=Math.abs(ls);return Math.abs(lo)1e-4&&Ry.out.println("Distance = "+ls.distance(ff))},at.prototype.intersectionWithNormalization=function(wt,lo,fo,vo){var ls=new Gp(wt),ff=new Gp(lo),mf=new Gp(fo),bf=new Gp(vo),Sf=new Gp;this.normalizeToEnvCentre(ls,ff,mf,bf,Sf);var xf=this.safeHCoordinateIntersection(ls,ff,mf,bf);return xf.x+=Sf.x,xf.y+=Sf.y,xf},at.prototype.computeCollinearIntersection=function(wt,lo,fo,vo){var ls=Wg.intersects(wt,lo,fo),ff=Wg.intersects(wt,lo,vo),mf=Wg.intersects(fo,vo,wt),bf=Wg.intersects(fo,vo,lo);return ls&&ff?(this._intPt[0]=fo,this._intPt[1]=vo,nt.COLLINEAR_INTERSECTION):mf&&bf?(this._intPt[0]=wt,this._intPt[1]=lo,nt.COLLINEAR_INTERSECTION):ls&&mf?(this._intPt[0]=fo,this._intPt[1]=wt,!fo.equals(wt)||ff||bf?nt.COLLINEAR_INTERSECTION:nt.POINT_INTERSECTION):ls&&bf?(this._intPt[0]=fo,this._intPt[1]=lo,!fo.equals(lo)||ff||mf?nt.COLLINEAR_INTERSECTION:nt.POINT_INTERSECTION):ff&&mf?(this._intPt[0]=vo,this._intPt[1]=wt,!vo.equals(wt)||ls||bf?nt.COLLINEAR_INTERSECTION:nt.POINT_INTERSECTION):ff&&bf?(this._intPt[0]=vo,this._intPt[1]=lo,!vo.equals(lo)||ls||mf?nt.COLLINEAR_INTERSECTION:nt.POINT_INTERSECTION):nt.NO_INTERSECTION},at.prototype.normalizeToEnvCentre=function(wt,lo,fo,vo,ls){var ff=wt.xlo.x?wt.x:lo.x,Sf=wt.y>lo.y?wt.y:lo.y,xf=fo.xvo.x?fo.x:vo.x,zf=fo.y>vo.y?fo.y:vo.y,Wf=((ff>xf?ff:xf)+(bfIf?mf:If)+(Sf0&&ff>0||ls<0&&ff<0)return nt.NO_INTERSECTION;var mf=Og.orientationIndex(fo,vo,wt),bf=Og.orientationIndex(fo,vo,lo);return mf>0&&bf>0||mf<0&&bf<0?nt.NO_INTERSECTION:ls===0&&ff===0&&mf===0&&bf===0?this.computeCollinearIntersection(wt,lo,fo,vo):(ls===0||ff===0||mf===0||bf===0?(this._isProper=!1,wt.equals2D(fo)||wt.equals2D(vo)?this._intPt[0]=wt:lo.equals2D(fo)||lo.equals2D(vo)?this._intPt[0]=lo:ls===0?this._intPt[0]=new Gp(fo):ff===0?this._intPt[0]=new Gp(vo):mf===0?this._intPt[0]=new Gp(wt):bf===0&&(this._intPt[0]=new Gp(lo))):(this._isProper=!0,this._intPt[0]=this.intersection(wt,lo,fo,vo)),nt.POINT_INTERSECTION)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.nearestEndpoint=function(wt,lo,fo,vo){var ls=wt,ff=Og.distancePointLine(wt,fo,vo),mf=Og.distancePointLine(lo,fo,vo);return mf0?wt>0?-fo:fo:wt>0?fo:-fo;if(at===0||wt===0)return lo>0?nt>0?fo:-fo:nt>0?-fo:fo;if(at>0?lo>0?at<=lo||(fo=-fo,vo=nt,nt=wt,wt=vo,vo=at,at=lo,lo=vo):at<=-lo?(fo=-fo,wt=-wt,lo=-lo):(vo=nt,nt=-wt,wt=vo,vo=at,at=-lo,lo=vo):lo>0?-at<=lo?(fo=-fo,nt=-nt,at=-at):(vo=-nt,nt=wt,wt=vo,vo=-at,at=lo,lo=vo):at>=lo?(nt=-nt,at=-at,wt=-wt,lo=-lo):(fo=-fo,vo=-nt,nt=-wt,wt=vo,vo=-at,at=-lo,lo=vo),nt>0){if(!(wt>0)||!(nt<=wt))return fo}else{if(wt>0||!(nt>=wt))return-fo;fo=-fo,nt=-nt,wt=-wt}for(;;){if((lo-=(ls=Math.floor(wt/nt))*at)<0)return-fo;if(lo>at)return fo;if(nt>(wt-=ls*nt)+wt){if(atlo+lo)return-fo;wt=nt-wt,lo=at-lo,fo=-fo}if(lo===0)return wt===0?0:-fo;if(wt===0||(at-=(ls=Math.floor(nt/wt))*lo)<0)return fo;if(at>lo)return-fo;if(wt>(nt-=ls*wt)+nt){if(loat+at)return fo;nt=wt-nt,at=lo-at,fo=-fo}if(at===0)return nt===0?0:fo;if(nt===0)return-fo}};var M1=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var nt=arguments[0];this._p=nt};M1.prototype.countSegment=function(nt,at){if(nt.xlo&&(wt=at.x,lo=nt.x),this._p.x>=wt&&this._p.x<=lo&&(this._isPointOnSegment=!0),null}if(nt.y>this._p.y&&at.y<=this._p.y||at.y>this._p.y&&nt.y<=this._p.y){var fo=nt.x-this._p.x,vo=nt.y-this._p.y,ls=at.x-this._p.x,ff=at.y-this._p.y,mf=j_.signOfDet2x2(fo,vo,ls,ff);if(mf===0)return this._isPointOnSegment=!0,null;ff0&&this._crossingCount++}},M1.prototype.isPointInPolygon=function(){return this.getLocation()!==eg.EXTERIOR},M1.prototype.getLocation=function(){return this._isPointOnSegment?eg.BOUNDARY:this._crossingCount%2==1?eg.INTERIOR:eg.EXTERIOR},M1.prototype.isOnSegment=function(){return this._isPointOnSegment},M1.prototype.interfaces_=function(){return[]},M1.prototype.getClass=function(){return M1},M1.locatePointInRing=function(){if(arguments[0]instanceof Gp&&nm(arguments[1],Vm)){for(var nt=arguments[0],at=arguments[1],wt=new M1(nt),lo=new Gp,fo=new Gp,vo=1;vo1||ff<0||ff>1)&&(fo=!0)}}else fo=!0;return fo?A0.min(Og.distancePointLine(nt,wt,lo),Og.distancePointLine(at,wt,lo),Og.distancePointLine(wt,nt,at),Og.distancePointLine(lo,nt,at)):0},Og.isPointInRing=function(nt,at){return Og.locatePointInRing(nt,at)!==eg.EXTERIOR},Og.computeLength=function(nt){var at=nt.size();if(at<=1)return 0;var wt=0,lo=new Gp;nt.getCoordinate(0,lo);for(var fo=lo.x,vo=lo.y,ls=1;lswt.y&&(wt=vo,lo=fo)}var ls=lo;do(ls-=1)<0&&(ls=at);while(nt[ls].equals2D(wt)&&ls!==lo);var ff=lo;do ff=(ff+1)%at;while(nt[ff].equals2D(wt)&&ff!==lo);var mf=nt[ls],bf=nt[ff];if(mf.equals2D(wt)||bf.equals2D(wt)||mf.equals2D(bf))return!1;var Sf=Og.computeOrientation(mf,wt,bf),xf=!1;return xf=Sf===0?mf.x>bf.x:Sf>0,xf},Og.locatePointInRing=function(nt,at){return M1.locatePointInRing(nt,at)},Og.distancePointLinePerpendicular=function(nt,at,wt){var lo=(wt.x-at.x)*(wt.x-at.x)+(wt.y-at.y)*(wt.y-at.y),fo=((at.y-nt.y)*(wt.x-at.x)-(at.x-nt.x)*(wt.y-at.y))/lo;return Math.abs(fo)*Math.sqrt(lo)},Og.computeOrientation=function(nt,at,wt){return Og.orientationIndex(nt,at,wt)},Og.distancePointLine=function(){if(arguments.length===2){var nt=arguments[0],at=arguments[1];if(at.length===0)throw new Pv("Line array must contain at least one vertex");for(var wt=nt.distance(at[0]),lo=0;lo=1)return vo.distance(ff);var Sf=((ls.y-vo.y)*(ff.x-ls.x)-(ls.x-vo.x)*(ff.y-ls.y))/mf;return Math.abs(Sf)*Math.sqrt(mf)}},Og.isOnLine=function(nt,at){for(var wt=new y$,lo=1;lo0},H_.prototype.interfaces_=function(){return[Y0]},H_.prototype.getClass=function(){return H_};var Gw=function(){};Gw.prototype.isInBoundary=function(nt){return nt>1},Gw.prototype.interfaces_=function(){return[Y0]},Gw.prototype.getClass=function(){return Gw};var Ww=function(){};Ww.prototype.isInBoundary=function(nt){return nt===1},Ww.prototype.interfaces_=function(){return[Y0]},Ww.prototype.getClass=function(){return Ww};var iy=function(){};function GS(nt){this.message=nt||""}iy.prototype.add=function(){},iy.prototype.addAll=function(){},iy.prototype.isEmpty=function(){},iy.prototype.iterator=function(){},iy.prototype.size=function(){},iy.prototype.toArray=function(){},iy.prototype.remove=function(){},GS.prototype=new Error,GS.prototype.name="IndexOutOfBoundsException";var qw=function(){};qw.prototype.hasNext=function(){},qw.prototype.next=function(){},qw.prototype.remove=function(){};var u1=function(nt){function at(){nt.apply(this,arguments)}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.get=function(){},at.prototype.set=function(){},at.prototype.isEmpty=function(){},at}(iy);function U_(nt){this.message=nt||""}U_.prototype=new Error,U_.prototype.name="NoSuchElementException";var Sg=function(nt){function at(){nt.call(this),this.array_=[],arguments[0]instanceof iy&&this.addAll(arguments[0])}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.ensureCapacity=function(){},at.prototype.interfaces_=function(){return[nt,iy]},at.prototype.add=function(wt){return arguments.length===1?this.array_.push(wt):this.array_.splice(arguments[0],arguments[1]),!0},at.prototype.clear=function(){this.array_=[]},at.prototype.addAll=function(wt){for(var lo=wt.iterator();lo.hasNext();)this.add(lo.next());return!0},at.prototype.set=function(wt,lo){var fo=this.array_[wt];return this.array_[wt]=lo,fo},at.prototype.iterator=function(){return new Lk(this)},at.prototype.get=function(wt){if(wt<0||wt>=this.size())throw new GS;return this.array_[wt]},at.prototype.isEmpty=function(){return this.array_.length===0},at.prototype.size=function(){return this.array_.length},at.prototype.toArray=function(){for(var wt=[],lo=0,fo=this.array_.length;lo=1){var bf=this.get(this.size()-1);if(bf.equals2D(ff))return null}nt.prototype.add.call(this,ff)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var Sf=arguments[0],xf=arguments[1];return this.add(Sf,xf),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var If=arguments[0],jf=arguments[1],zf=arguments[2];if(zf)for(var Wf=0;Wf=0;Mf--)lo.add(If[Mf],jf);return!0}if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof Gp){var np=arguments[0],pp=arguments[1],Uf=arguments[2];if(!Uf){var tp=this.size();if(tp>0){if(np>0){var op=this.get(np-1);if(op.equals2D(pp))return null}if(nprg&&(zp=-1);for(var lg=Ap;lg!==rg;lg+=zp)lo.add(sp[lg],Qp);return!0}},at.prototype.closeRing=function(){this.size()>0&&this.add(new Gp(this.get(0)),!1)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},Object.defineProperties(at,wt),at}(Sg),Cm=function(){},dE={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};dE.ForwardComparator.get=function(){return n2},dE.BidirectionalComparator.get=function(){return V_},dE.coordArrayType.get=function(){return new Array(0).fill(null)},Cm.prototype.interfaces_=function(){return[]},Cm.prototype.getClass=function(){return Cm},Cm.isRing=function(nt){return!(nt.length<4)&&!!nt[0].equals2D(nt[nt.length-1])},Cm.ptNotInList=function(nt,at){for(var wt=0;wt=nt?at:[]},Cm.indexOf=function(nt,at){for(var wt=0;wt0)&&(at=nt[wt]);return at},Cm.extract=function(nt,at,wt){at=A0.clamp(at,0,nt.length);var lo=(wt=A0.clamp(wt,-1,nt.length))-at+1;wt<0&&(lo=0),at>=nt.length&&(lo=0),wtlo.length)return 1;if(wt.length===0)return 0;var fo=Cm.compare(wt,lo);return Cm.isEqualReversed(wt,lo)?0:fo},V_.prototype.OLDcompare=function(nt,at){var wt=nt,lo=at;if(wt.lengthlo.length)return 1;if(wt.length===0)return 0;for(var fo=Cm.increasingDirection(wt),vo=Cm.increasingDirection(lo),ls=fo>0?0:wt.length-1,ff=vo>0?0:wt.length-1,mf=0;mf0))return at.value;at=at.right}}return null},Hy.prototype.put=function(nt,at){if(this.root_===null)return this.root_={key:nt,value:at,left:null,right:null,parent:null,color:0,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var wt,lo,fo=this.root_;do if(wt=fo,(lo=nt.compareTo(fo.key))<0)fo=fo.left;else{if(!(lo>0)){var vo=fo.value;return fo.value=at,vo}fo=fo.right}while(fo!==null);var ls={key:nt,left:null,right:null,value:at,parent:wt,color:0,getValue:function(){return this.value},getKey:function(){return this.key}};return lo<0?wt.left=ls:wt.right=ls,this.fixAfterInsertion(ls),this.size_++,null},Hy.prototype.fixAfterInsertion=function(nt){var at=this;for(nt.color=1;nt!=null&&nt!==this.root_&&nt.parent.color===1;)if($v(nt)===WS($v($v(nt)))){var wt=jk($v($v(nt)));Bk(wt)===1?(Mb($v(nt),0),Mb(wt,0),Mb($v($v(nt)),1),nt=$v($v(nt))):(nt===jk($v(nt))&&(nt=$v(nt),at.rotateLeft(nt)),Mb($v(nt),0),Mb($v($v(nt)),1),at.rotateRight($v($v(nt))))}else{var lo=WS($v($v(nt)));Bk(lo)===1?(Mb($v(nt),0),Mb(lo,0),Mb($v($v(nt)),1),nt=$v($v(nt))):(nt===WS($v(nt))&&(nt=$v(nt),at.rotateRight(nt)),Mb($v(nt),0),Mb($v($v(nt)),1),at.rotateLeft($v($v(nt))))}this.root_.color=0},Hy.prototype.values=function(){var nt=new Sg,at=this.getFirstEntry();if(at!==null)for(nt.add(at.value);(at=Hy.successor(at))!==null;)nt.add(at.value);return nt},Hy.prototype.entrySet=function(){var nt=new pE,at=this.getFirstEntry();if(at!==null)for(nt.add(at);(at=Hy.successor(at))!==null;)nt.add(at);return nt},Hy.prototype.rotateLeft=function(nt){if(nt!=null){var at=nt.right;nt.right=at.left,at.left!=null&&(at.left.parent=nt),at.parent=nt.parent,nt.parent===null?this.root_=at:nt.parent.left===nt?nt.parent.left=at:nt.parent.right=at,at.left=nt,nt.parent=at}},Hy.prototype.rotateRight=function(nt){if(nt!=null){var at=nt.left;nt.left=at.right,at.right!=null&&(at.right.parent=nt),at.parent=nt.parent,nt.parent===null?this.root_=at:nt.parent.right===nt?nt.parent.right=at:nt.parent.left=at,at.right=nt,nt.parent=at}},Hy.prototype.getFirstEntry=function(){var nt=this.root_;if(nt!=null)for(;nt.left!=null;)nt=nt.left;return nt},Hy.successor=function(nt){if(nt===null)return null;if(nt.right!==null){for(var at=nt.right;at.left!==null;)at=at.left;return at}for(var wt=nt.parent,lo=nt;wt!==null&&lo===wt.right;)lo=wt,wt=wt.parent;return wt},Hy.prototype.size=function(){return this.size_};var Kw=function(){};function zk(){}function h1(){this.array_=[],arguments[0]instanceof iy&&this.addAll(arguments[0])}Kw.prototype.interfaces_=function(){return[]},Kw.prototype.getClass=function(){return Kw},zk.prototype=new fE,h1.prototype=new zk,h1.prototype.contains=function(nt){for(var at=0,wt=this.array_.length;at=0;){var ls=fo.substring(0,vo);lo.add(ls),vo=(fo=fo.substring(vo+wt)).indexOf(at)}fo.length>0&&lo.add(fo);for(var ff=new Array(lo.size()).fill(null),mf=0;mf0)for(var vo=fo;vo0&&lo.append(" ");for(var vo=0;vo0&&lo.append(","),lo.append(X0.toString(nt.getOrdinate(fo,vo)))}return lo.append(")"),lo.toString()}},Hv.ensureValidRing=function(nt,at){var wt=at.size();return wt===0?at:wt<=3?Hv.createClosedRing(nt,at,4):at.getOrdinate(0,Vm.X)===at.getOrdinate(wt-1,Vm.X)&&at.getOrdinate(0,Vm.Y)===at.getOrdinate(wt-1,Vm.Y)?at:Hv.createClosedRing(nt,at,wt+1)},Hv.createClosedRing=function(nt,at,wt){var lo=nt.create(wt,at.getDimension()),fo=at.size();Hv.copy(at,0,lo,0,fo);for(var vo=fo;vo0&&Hv.reverse(lo._points),null}},at.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},at.prototype.getBoundaryDimension=function(){return this.isClosed()?iv.FALSE:0},at.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},at.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},at.prototype.getDimension=function(){return 1},at.prototype.getLength=function(){return Og.computeLength(this._points)},at.prototype.getNumPoints=function(){return this._points.size()},at.prototype.reverse=function(){var lo=this._points.copy();return Hv.reverse(lo),this.getFactory().createLineString(lo)},at.prototype.compareToSameClass=function(){var lo=this;if(arguments.length===1){for(var fo=arguments[0],vo=fo,ls=0,ff=0;ls= 2)");this._points=lo},at.prototype.isCoordinate=function(lo){for(var fo=0;fo=1&&this.getCoordinateSequence().size()= 4)")},at.prototype.getGeometryType=function(){return"LinearRing"},at.prototype.copy=function(){return new at(this._points.copy(),this._factory)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},wt.MINIMUM_VALID_SIZE.get=function(){return 4},wt.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(at,wt),at}(Av),db=function(nt){function at(){nt.apply(this,arguments)}nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at;var wt={serialVersionUID:{configurable:!0}};return at.prototype.getSortIndex=function(){return tm.SORTINDEX_MULTIPOLYGON},at.prototype.equalsExact=function(){if(arguments.length===2){var lo=arguments[0],fo=arguments[1];return!!this.isEquivalentClass(lo)&&nt.prototype.equalsExact.call(this,lo,fo)}return nt.prototype.equalsExact.apply(this,arguments)},at.prototype.getBoundaryDimension=function(){return 1},at.prototype.getDimension=function(){return 2},at.prototype.reverse=function(){for(var lo=this._geometries.length,fo=new Array(lo).fill(null),vo=0;vo0?at.createPoint(wt[0]):at.createPoint():nt},o2.prototype.interfaces_=function(){return[Z0.GeometryEditorOperation]},o2.prototype.getClass=function(){return o2};var a2=function(){};a2.prototype.edit=function(nt,at){return nt instanceof hb?at.createLinearRing(this.edit(nt.getCoordinateSequence(),nt)):nt instanceof Av?at.createLineString(this.edit(nt.getCoordinateSequence(),nt)):nt instanceof x0?at.createPoint(this.edit(nt.getCoordinateSequence(),nt)):nt},a2.prototype.interfaces_=function(){return[Z0.GeometryEditorOperation]},a2.prototype.getClass=function(){return a2};var Uv=function(){var nt=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var at=arguments[0];this._coordinates=new Array(at).fill(null);for(var wt=0;wt0){var nt=new A1(17*this._coordinates.length);nt.append("("),nt.append(this._coordinates[0]);for(var at=1;at3&&(lo=3),lo<2?new Uv(wt):new Uv(wt,lo)}},fb.prototype.interfaces_=function(){return[Hw,W0]},fb.prototype.getClass=function(){return fb},fb.instance=function(){return fb.instanceObject},YS.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},YS.instanceObject.get=function(){return new fb},Object.defineProperties(fb,YS);var Gk=function(nt){function at(){nt.call(this),this.map_=new Map}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.get=function(wt){return this.map_.get(wt)||null},at.prototype.put=function(wt,lo){return this.map_.set(wt,lo),lo},at.prototype.values=function(){for(var wt=new Sg,lo=this.map_.values(),fo=lo.next();!fo.done;)wt.add(fo.value),fo=lo.next();return wt},at.prototype.entrySet=function(){var wt=new pE;return this.map_.entries().forEach(function(lo){return wt.add(lo)}),wt},at.prototype.size=function(){return this.map_.size()},at}(G_),cv=function nt(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=nt.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof p1){var at=arguments[0];this._modelType=at,at===nt.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var wt=arguments[0];this._modelType=nt.FIXED,this.setScale(wt)}else if(arguments[0]instanceof nt){var lo=arguments[0];this._modelType=lo._modelType,this._scale=lo._scale}}},KS={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};cv.prototype.equals=function(nt){if(!(nt instanceof cv))return!1;var at=nt;return this._modelType===at._modelType&&this._scale===at._scale},cv.prototype.compareTo=function(nt){var at=nt,wt=this.getMaximumSignificantDigits(),lo=at.getMaximumSignificantDigits();return new R1(wt).compareTo(new R1(lo))},cv.prototype.getScale=function(){return this._scale},cv.prototype.isFloating=function(){return this._modelType===cv.FLOATING||this._modelType===cv.FLOATING_SINGLE},cv.prototype.getType=function(){return this._modelType},cv.prototype.toString=function(){var nt="UNKNOWN";return this._modelType===cv.FLOATING?nt="Floating":this._modelType===cv.FLOATING_SINGLE?nt="Floating-Single":this._modelType===cv.FIXED&&(nt="Fixed (Scale="+this.getScale()+")"),nt},cv.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var nt=arguments[0];return dm.isNaN(nt)||this._modelType===cv.FLOATING_SINGLE?nt:this._modelType===cv.FIXED?Math.round(nt*this._scale)/this._scale:nt}if(arguments[0]instanceof Gp){var at=arguments[0];if(this._modelType===cv.FLOATING)return null;at.x=this.makePrecise(at.x),at.y=this.makePrecise(at.y)}},cv.prototype.getMaximumSignificantDigits=function(){var nt=16;return this._modelType===cv.FLOATING?nt=16:this._modelType===cv.FLOATING_SINGLE?nt=6:this._modelType===cv.FIXED&&(nt=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),nt},cv.prototype.setScale=function(nt){this._scale=Math.abs(nt)},cv.prototype.interfaces_=function(){return[W0,G0]},cv.prototype.getClass=function(){return cv},cv.mostPrecise=function(nt,at){return nt.compareTo(at)>=0?nt:at},KS.serialVersionUID.get=function(){return 7777263578777804e3},KS.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(cv,KS);var p1=function nt(at){this._name=at||null,nt.nameToTypeMap.put(at,this)},s2={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};p1.prototype.readResolve=function(){return p1.nameToTypeMap.get(this._name)},p1.prototype.toString=function(){return this._name},p1.prototype.interfaces_=function(){return[W0]},p1.prototype.getClass=function(){return p1},s2.serialVersionUID.get=function(){return-552860263173159e4},s2.nameToTypeMap.get=function(){return new Gk},Object.defineProperties(p1,s2),cv.Type=p1,cv.FIXED=new p1("FIXED"),cv.FLOATING=new p1("FLOATING"),cv.FLOATING_SINGLE=new p1("FLOATING SINGLE");var Om=function nt(){this._precisionModel=new cv,this._SRID=0,this._coordinateSequenceFactory=nt.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?nm(arguments[0],Hw)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof cv&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},Wk={serialVersionUID:{configurable:!0}};Om.prototype.toGeometry=function(nt){return nt.isNull()?this.createPoint(null):nt.getMinX()===nt.getMaxX()&&nt.getMinY()===nt.getMaxY()?this.createPoint(new Gp(nt.getMinX(),nt.getMinY())):nt.getMinX()===nt.getMaxX()||nt.getMinY()===nt.getMaxY()?this.createLineString([new Gp(nt.getMinX(),nt.getMinY()),new Gp(nt.getMaxX(),nt.getMaxY())]):this.createPolygon(this.createLinearRing([new Gp(nt.getMinX(),nt.getMinY()),new Gp(nt.getMinX(),nt.getMaxY()),new Gp(nt.getMaxX(),nt.getMaxY()),new Gp(nt.getMaxX(),nt.getMinY()),new Gp(nt.getMinX(),nt.getMinY())]),null)},Om.prototype.createLineString=function(nt){return nt?nt instanceof Array?new Av(this.getCoordinateSequenceFactory().create(nt),this):nm(nt,Vm)?new Av(nt,this):void 0:new Av(this.getCoordinateSequenceFactory().create([]),this)},Om.prototype.createMultiLineString=function(){if(arguments.length===0)return new b$(null,this);if(arguments.length===1){var nt=arguments[0];return new b$(nt,this)}},Om.prototype.buildGeometry=function(nt){for(var at=null,wt=!1,lo=!1,fo=nt.iterator();fo.hasNext();){var vo=fo.next(),ls=vo.getClass();at===null&&(at=ls),ls!==at&&(wt=!0),vo.isGeometryCollectionOrDerived()&&(lo=!0)}if(at===null)return this.createGeometryCollection();if(wt||lo)return this.createGeometryCollection(Om.toGeometryArray(nt));var ff=nt.iterator().next();if(nt.size()>1){if(ff instanceof oy)return this.createMultiPolygon(Om.toPolygonArray(nt));if(ff instanceof Av)return this.createMultiLineString(Om.toLineStringArray(nt));if(ff instanceof x0)return this.createMultiPoint(Om.toPointArray(nt));ym.shouldNeverReachHere("Unhandled class: "+ff.getClass().getName())}return ff},Om.prototype.createMultiPointFromCoords=function(nt){return this.createMultiPoint(nt!==null?this.getCoordinateSequenceFactory().create(nt):null)},Om.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Gp){var nt=arguments[0];return this.createPoint(nt!==null?this.getCoordinateSequenceFactory().create([nt]):null)}if(nm(arguments[0],Vm)){var at=arguments[0];return new x0(at,this)}}},Om.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},Om.prototype.createPolygon=function(){if(arguments.length===0)return new oy(null,null,this);if(arguments.length===1){if(nm(arguments[0],Vm)){var nt=arguments[0];return this.createPolygon(this.createLinearRing(nt))}if(arguments[0]instanceof Array){var at=arguments[0];return this.createPolygon(this.createLinearRing(at))}if(arguments[0]instanceof hb){var wt=arguments[0];return this.createPolygon(wt,null)}}else if(arguments.length===2){var lo=arguments[0],fo=arguments[1];return new oy(lo,fo,this)}},Om.prototype.getSRID=function(){return this._SRID},Om.prototype.createGeometryCollection=function(){if(arguments.length===0)return new Zy(null,this);if(arguments.length===1){var nt=arguments[0];return new Zy(nt,this)}},Om.prototype.createGeometry=function(nt){return new Z0(this).edit(nt,{edit:function(){if(arguments.length===2){var at=arguments[0];return this._coordinateSequenceFactory.create(at)}}})},Om.prototype.getPrecisionModel=function(){return this._precisionModel},Om.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var nt=arguments[0];return this.createLinearRing(nt!==null?this.getCoordinateSequenceFactory().create(nt):null)}if(nm(arguments[0],Vm)){var at=arguments[0];return new hb(at,this)}}},Om.prototype.createMultiPolygon=function(){if(arguments.length===0)return new db(null,this);if(arguments.length===1){var nt=arguments[0];return new db(nt,this)}},Om.prototype.createMultiPoint=function(){var nt=this;if(arguments.length===0)return new Zw(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var at=arguments[0];return new Zw(at,this)}if(arguments[0]instanceof Array){var wt=arguments[0];return this.createMultiPoint(wt!==null?this.getCoordinateSequenceFactory().create(wt):null)}if(nm(arguments[0],Vm)){var lo=arguments[0];if(lo===null)return this.createMultiPoint(new Array(0).fill(null));for(var fo=new Array(lo.size()).fill(null),vo=0;vo=this.size())throw new Error;return this.array_[nt]},F1.prototype.push=function(nt){return this.array_.push(nt),nt},F1.prototype.pop=function(nt){if(this.array_.length===0)throw new yE;return this.array_.pop()},F1.prototype.peek=function(){if(this.array_.length===0)throw new yE;return this.array_[this.array_.length-1]},F1.prototype.empty=function(){return this.array_.length===0},F1.prototype.isEmpty=function(){return this.empty()},F1.prototype.search=function(nt){return this.array_.indexOf(nt)},F1.prototype.size=function(){return this.array_.length},F1.prototype.toArray=function(){for(var nt=[],at=0,wt=this.array_.length;at0&&this._minIndexthis._minCoord.y&&wt.y>this._minCoord.y&&lo===Og.CLOCKWISE)&&(fo=!0),fo&&(this._minIndex=this._minIndex-1)},g1.prototype.getRightmostSideOfSegment=function(nt,at){var wt=nt.getEdge().getCoordinates();if(at<0||at+1>=wt.length||wt[at].y===wt[at+1].y)return-1;var lo=$g.LEFT;return wt[at].yat._minCoord.x)&&(at._minDe=nt,at._minIndex=lo,at._minCoord=wt[lo])},g1.prototype.findRightmostEdgeAtNode=function(){var nt=this._minDe.getNode().getEdges();this._minDe=nt.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},g1.prototype.findEdge=function(nt){for(var at=nt.iterator();at.hasNext();){var wt=at.next();wt.isForward()&&this.checkForRightmostCoordinate(wt)}ym.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===$g.LEFT&&(this._orientedDe=this._minDe.getSym())},g1.prototype.interfaces_=function(){return[]},g1.prototype.getClass=function(){return g1};var Lb=function(nt){function at(wt,lo){nt.call(this,at.msgWithCoord(wt,lo)),this.pt=lo?new Gp(lo):null,this.name="TopologyException"}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.getCoordinate=function(){return this.pt},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.msgWithCoord=function(wt,lo){return lo?wt:wt+" [ "+lo+" ]"},at}(Nb),bE=function(){this.array_=[]};bE.prototype.addLast=function(nt){this.array_.push(nt)},bE.prototype.removeFirst=function(){return this.array_.shift()},bE.prototype.isEmpty=function(){return this.array_.length===0};var Uy=function(){this._finder=null,this._dirEdgeList=new Sg,this._nodes=new Sg,this._rightMostCoord=null,this._env=null,this._finder=new g1};Uy.prototype.clearVisitedEdges=function(){for(var nt=this._dirEdgeList.iterator();nt.hasNext();)nt.next().setVisited(!1)},Uy.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Uy.prototype.computeNodeDepth=function(nt){for(var at=null,wt=nt.getEdges().iterator();wt.hasNext();){var lo=wt.next();if(lo.isVisited()||lo.getSym().isVisited()){at=lo;break}}if(at===null)throw new Lb("unable to find edge to compute depths at "+nt.getCoordinate());nt.getEdges().computeDepths(at);for(var fo=nt.getEdges().iterator();fo.hasNext();){var vo=fo.next();vo.setVisited(!0),this.copySymDepths(vo)}},Uy.prototype.computeDepth=function(nt){this.clearVisitedEdges();var at=this._finder.getEdge();at.setEdgeDepths($g.RIGHT,nt),this.copySymDepths(at),this.computeDepths(at)},Uy.prototype.create=function(nt){this.addReachable(nt),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Uy.prototype.findResultEdges=function(){for(var nt=this._dirEdgeList.iterator();nt.hasNext();){var at=nt.next();at.getDepth($g.RIGHT)>=1&&at.getDepth($g.LEFT)<=0&&!at.isInteriorAreaEdge()&&at.setInResult(!0)}},Uy.prototype.computeDepths=function(nt){var at=new pE,wt=new bE,lo=nt.getNode();for(wt.addLast(lo),at.add(lo),nt.setVisited(!0);!wt.isEmpty();){var fo=wt.removeFirst();at.add(fo),this.computeNodeDepth(fo);for(var vo=fo.getEdges().iterator();vo.hasNext();){var ls=vo.next().getSym();if(!ls.isVisited()){var ff=ls.getNode();at.contains(ff)||(wt.addLast(ff),at.add(ff))}}}},Uy.prototype.compareTo=function(nt){var at=nt;return this._rightMostCoord.xat._rightMostCoord.x?1:0},Uy.prototype.getEnvelope=function(){if(this._env===null){for(var nt=new Wg,at=this._dirEdgeList.iterator();at.hasNext();)for(var wt=at.next().getEdge().getCoordinates(),lo=0;lothis.location.length){var at=new Array(3).fill(null);at[$g.ON]=this.location[$g.ON],at[$g.LEFT]=eg.NONE,at[$g.RIGHT]=eg.NONE,this.location=at}for(var wt=0;wt1&&nt.append(eg.toLocationSymbol(this.location[$g.LEFT])),nt.append(eg.toLocationSymbol(this.location[$g.ON])),this.location.length>1&&nt.append(eg.toLocationSymbol(this.location[$g.RIGHT])),nt.toString()},_v.prototype.setLocations=function(nt,at,wt){this.location[$g.ON]=nt,this.location[$g.LEFT]=at,this.location[$g.RIGHT]=wt},_v.prototype.get=function(nt){return nt1},_v.prototype.isAnyNull=function(){for(var nt=0;ntnt._maxNodeDegree&&(nt._maxNodeDegree=wt),at=nt.getNext(at)}while(at!==this._startDe);this._maxNodeDegree*=2},Vv.prototype.addPoints=function(nt,at,wt){var lo=nt.getCoordinates();if(at){var fo=1;wt&&(fo=0);for(var vo=fo;vo=0;ff--)this._pts.add(lo[ff])}},Vv.prototype.isHole=function(){return this._isHole},Vv.prototype.setInResult=function(){var nt=this._startDe;do nt.getEdge().setInResult(!0),nt=nt.getNext();while(nt!==this._startDe)},Vv.prototype.containsPoint=function(nt){var at=this.getLinearRing();if(!at.getEnvelopeInternal().contains(nt)||!Og.isPointInRing(nt,at.getCoordinates()))return!1;for(var wt=this._holes.iterator();wt.hasNext();)if(wt.next().containsPoint(nt))return!1;return!0},Vv.prototype.addHole=function(nt){this._holes.add(nt)},Vv.prototype.isShell=function(){return this._shell===null},Vv.prototype.getLabel=function(){return this._label},Vv.prototype.getEdges=function(){return this._edges},Vv.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Vv.prototype.getShell=function(){return this._shell},Vv.prototype.mergeLabel=function(){if(arguments.length===1){var nt=arguments[0];this.mergeLabel(nt,0),this.mergeLabel(nt,1)}else if(arguments.length===2){var at=arguments[0],wt=arguments[1],lo=at.getLocation(wt,$g.RIGHT);if(lo===eg.NONE)return null;if(this._label.getLocation(wt)===eg.NONE)return this._label.setLocation(wt,lo),null}},Vv.prototype.setShell=function(nt){this._shell=nt,nt!==null&&nt.addHole(this)},Vv.prototype.toPolygon=function(nt){for(var at=new Array(this._holes.size()).fill(null),wt=0;wt=2,"found partial label"),this.computeIM(nt)},E0.prototype.isInResult=function(){return this._isInResult},E0.prototype.isVisited=function(){return this._isVisited},E0.prototype.interfaces_=function(){return[]},E0.prototype.getClass=function(){return E0};var $E=function(nt){function at(){nt.call(this),this._coord=null,this._edges=null;var wt=arguments[0],lo=arguments[1];this._coord=wt,this._edges=lo,this._label=new fv(0,eg.NONE)}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.isIncidentEdgeInResult=function(){for(var wt=this.getEdges().getEdges().iterator();wt.hasNext();)if(wt.next().getEdge().isInResult())return!0;return!1},at.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},at.prototype.getCoordinate=function(){return this._coord},at.prototype.print=function(wt){wt.println("node "+this._coord+" lbl: "+this._label)},at.prototype.computeIM=function(wt){},at.prototype.computeMergedLocation=function(wt,lo){var fo=eg.NONE;if(fo=this._label.getLocation(lo),!wt.isNull(lo)){var vo=wt.getLocation(lo);fo!==eg.BOUNDARY&&(fo=vo)}return fo},at.prototype.setLabel=function(){if(arguments.length!==2)return nt.prototype.setLabel.apply(this,arguments);var wt=arguments[0],lo=arguments[1];this._label===null?this._label=new fv(wt,lo):this._label.setLocation(wt,lo)},at.prototype.getEdges=function(){return this._edges},at.prototype.mergeLabel=function(){var wt=this;if(arguments[0]instanceof at){var lo=arguments[0];this.mergeLabel(lo._label)}else if(arguments[0]instanceof fv)for(var fo=arguments[0],vo=0;vo<2;vo++){var ls=wt.computeMergedLocation(fo,vo),ff=wt._label.getLocation(vo);ff===eg.NONE&&wt._label.setLocation(vo,ls)}},at.prototype.add=function(wt){this._edges.insert(wt),wt.setNode(this)},at.prototype.setLabelBoundary=function(wt){if(this._label===null)return null;var lo=eg.NONE;this._label!==null&&(lo=this._label.getLocation(wt));var fo=null;switch(lo){case eg.BOUNDARY:fo=eg.INTERIOR;break;case eg.INTERIOR:default:fo=eg.BOUNDARY}this._label.setLocation(wt,fo)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(E0),B1=function(){this.nodeMap=new Hy,this.nodeFact=null;var nt=arguments[0];this.nodeFact=nt};B1.prototype.find=function(nt){return this.nodeMap.get(nt)},B1.prototype.addNode=function(){if(arguments[0]instanceof Gp){var nt=arguments[0],at=this.nodeMap.get(nt);return at===null&&(at=this.nodeFact.createNode(nt),this.nodeMap.put(nt,at)),at}if(arguments[0]instanceof $E){var wt=arguments[0],lo=this.nodeMap.get(wt.getCoordinate());return lo===null?(this.nodeMap.put(wt.getCoordinate(),wt),wt):(lo.mergeLabel(wt),lo)}},B1.prototype.print=function(nt){for(var at=this.iterator();at.hasNext();)at.next().print(nt)},B1.prototype.iterator=function(){return this.nodeMap.values().iterator()},B1.prototype.values=function(){return this.nodeMap.values()},B1.prototype.getBoundaryNodes=function(nt){for(var at=new Sg,wt=this.iterator();wt.hasNext();){var lo=wt.next();lo.getLabel().getLocation(nt)===eg.BOUNDARY&&at.add(lo)}return at},B1.prototype.add=function(nt){var at=nt.getCoordinate();this.addNode(at).add(nt)},B1.prototype.interfaces_=function(){return[]},B1.prototype.getClass=function(){return B1};var pv=function(){},u2={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};pv.prototype.interfaces_=function(){return[]},pv.prototype.getClass=function(){return pv},pv.isNorthern=function(nt){return nt===pv.NE||nt===pv.NW},pv.isOpposite=function(nt,at){return nt!==at&&(nt-at+4)%4===2},pv.commonHalfPlane=function(nt,at){if(nt===at)return nt;if((nt-at+4)%4===2)return-1;var wt=ntat?nt:at)===3?3:wt},pv.isInHalfPlane=function(nt,at){return at===pv.SE?nt===pv.SE||nt===pv.SW:nt===at||nt===at+1},pv.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var nt=arguments[0],at=arguments[1];if(nt===0&&at===0)throw new Pv("Cannot compute the quadrant for point ( "+nt+", "+at+" )");return nt>=0?at>=0?pv.NE:pv.SE:at>=0?pv.NW:pv.SW}if(arguments[0]instanceof Gp&&arguments[1]instanceof Gp){var wt=arguments[0],lo=arguments[1];if(lo.x===wt.x&&lo.y===wt.y)throw new Pv("Cannot compute the quadrant for two identical points "+wt);return lo.x>=wt.x?lo.y>=wt.y?pv.NE:pv.SE:lo.y>=wt.y?pv.NW:pv.SW}},u2.NE.get=function(){return 0},u2.NW.get=function(){return 1},u2.SW.get=function(){return 2},u2.SE.get=function(){return 3},Object.defineProperties(pv,u2);var Vy=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var nt=arguments[0];this._edge=nt}else if(arguments.length===3){var at=arguments[0],wt=arguments[1],lo=arguments[2],fo=null;this._edge=at,this.init(wt,lo),this._label=fo}else if(arguments.length===4){var vo=arguments[0],ls=arguments[1],ff=arguments[2],mf=arguments[3];this._edge=vo,this.init(ls,ff),this._label=mf}};Vy.prototype.compareDirection=function(nt){return this._dx===nt._dx&&this._dy===nt._dy?0:this._quadrant>nt._quadrant?1:this._quadrant2){vo.linkDirectedEdgesForMinimalEdgeRings();var ls=vo.buildMinimalRings(),ff=this.findShell(ls);ff!==null?(this.placePolygonHoles(ff,ls),at.add(ff)):wt.addAll(ls)}else lo.add(vo)}return lo},l0.prototype.containsPoint=function(nt){for(var at=this._shellList.iterator();at.hasNext();)if(at.next().containsPoint(nt))return!0;return!1},l0.prototype.buildMaximalEdgeRings=function(nt){for(var at=new Sg,wt=nt.iterator();wt.hasNext();){var lo=wt.next();if(lo.isInResult()&&lo.getLabel().isArea()&&lo.getEdgeRing()===null){var fo=new TO(lo,this._geometryFactory);at.add(fo),fo.setInResult()}}return at},l0.prototype.placePolygonHoles=function(nt,at){for(var wt=at.iterator();wt.hasNext();){var lo=wt.next();lo.isHole()&&lo.setShell(nt)}},l0.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},l0.prototype.findEdgeRingContaining=function(nt,at){for(var wt=nt.getLinearRing(),lo=wt.getEnvelopeInternal(),fo=wt.getCoordinateN(0),vo=null,ls=null,ff=at.iterator();ff.hasNext();){var mf=ff.next(),bf=mf.getLinearRing(),Sf=bf.getEnvelopeInternal();vo!==null&&(ls=vo.getLinearRing().getEnvelopeInternal());var xf=!1;Sf.contains(lo)&&Og.isPointInRing(fo,bf.getCoordinates())&&(xf=!0),xf&&(vo===null||ls.contains(Sf))&&(vo=mf)}return vo},l0.prototype.findShell=function(nt){for(var at=0,wt=null,lo=nt.iterator();lo.hasNext();){var fo=lo.next();fo.isHole()||(wt=fo,at++)}return ym.isTrue(at<=1,"found two shells in MinimalEdgeRing list"),wt},l0.prototype.add=function(){if(arguments.length===1){var nt=arguments[0];this.add(nt.getEdgeEnds(),nt.getNodes())}else if(arguments.length===2){var at=arguments[0],wt=arguments[1];Nv.linkResultDirectedEdges(wt);var lo=this.buildMaximalEdgeRings(at),fo=new Sg,vo=this.buildMinimalEdgeRings(lo,this._shellList,fo);this.sortShellsAndHoles(vo,this._shellList,fo),this.placeFreeHoles(this._shellList,fo)}},l0.prototype.interfaces_=function(){return[]},l0.prototype.getClass=function(){return l0};var Qw=function(){};Qw.prototype.getBounds=function(){},Qw.prototype.interfaces_=function(){return[]},Qw.prototype.getClass=function(){return Qw};var m1=function(){this._bounds=null,this._item=null;var nt=arguments[0],at=arguments[1];this._bounds=nt,this._item=at};m1.prototype.getItem=function(){return this._item},m1.prototype.getBounds=function(){return this._bounds},m1.prototype.interfaces_=function(){return[Qw,W0]},m1.prototype.getClass=function(){return m1};var pb=function(){this._size=null,this._items=null,this._size=0,this._items=new Sg,this._items.add(null)};pb.prototype.poll=function(){if(this.isEmpty())return null;var nt=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),nt},pb.prototype.size=function(){return this._size},pb.prototype.reorder=function(nt){for(var at=this,wt=null,lo=this._items.get(nt);2*nt<=this._size&&((wt=2*nt)!==at._size&&at._items.get(wt+1).compareTo(at._items.get(wt))<0&&wt++,at._items.get(wt).compareTo(lo)<0);nt=wt)at._items.set(nt,at._items.get(wt));this._items.set(nt,lo)},pb.prototype.clear=function(){this._size=0,this._items.clear()},pb.prototype.isEmpty=function(){return this._size===0},pb.prototype.add=function(nt){this._items.add(null),this._size+=1;var at=this._size;for(this._items.set(0,nt);nt.compareTo(this._items.get(Math.trunc(at/2)))<0;at/=2)this._items.set(at,this._items.get(Math.trunc(at/2)));this._items.set(at,nt)},pb.prototype.interfaces_=function(){return[]},pb.prototype.getClass=function(){return pb};var _$=function(){};_$.prototype.visitItem=function(nt){},_$.prototype.interfaces_=function(){return[]},_$.prototype.getClass=function(){return _$};var W_=function(){};W_.prototype.insert=function(nt,at){},W_.prototype.remove=function(nt,at){},W_.prototype.query=function(){},W_.prototype.interfaces_=function(){return[]},W_.prototype.getClass=function(){return W_};var Kv=function(){if(this._childBoundables=new Sg,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var nt=arguments[0];this._level=nt}}},Yk={serialVersionUID:{configurable:!0}};Kv.prototype.getLevel=function(){return this._level},Kv.prototype.size=function(){return this._childBoundables.size()},Kv.prototype.getChildBoundables=function(){return this._childBoundables},Kv.prototype.addChildBoundable=function(nt){ym.isTrue(this._bounds===null),this._childBoundables.add(nt)},Kv.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Kv.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},Kv.prototype.interfaces_=function(){return[Qw,W0]},Kv.prototype.getClass=function(){return Kv},Yk.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(Kv,Yk);var v1=function(){};v1.reverseOrder=function(){return{compare:function(nt,at){return at.compareTo(nt)}}},v1.min=function(nt){return v1.sort(nt),nt.get(0)},v1.sort=function(nt,at){var wt=nt.toArray();at?ub.sort(wt,at):ub.sort(wt);for(var lo=nt.iterator(),fo=0,vo=wt.length;foGv.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,nt,at),null):(this.expand(this._boundable2,this._boundable1,nt,at),null);if(wt)return this.expand(this._boundable1,this._boundable2,nt,at),null;if(lo)return this.expand(this._boundable2,this._boundable1,nt,at),null;throw new Pv("neither boundable is composite")},Gv.prototype.isLeaves=function(){return!(Gv.isComposite(this._boundable1)||Gv.isComposite(this._boundable2))},Gv.prototype.compareTo=function(nt){var at=nt;return this._distanceat._distance?1:0},Gv.prototype.expand=function(nt,at,wt,lo){for(var fo=nt.getChildBoundables().iterator();fo.hasNext();){var vo=fo.next(),ls=new Gv(vo,at,this._itemDistance);ls.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=wt}},wE={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};wy.prototype.getNodeCapacity=function(){return this._nodeCapacity},wy.prototype.lastNode=function(nt){return nt.get(nt.size()-1)},wy.prototype.size=function(){var nt=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var at=arguments[0],wt=0,lo=at.getChildBoundables().iterator();lo.hasNext();){var fo=lo.next();fo instanceof Kv?wt+=nt.size(fo):fo instanceof m1&&(wt+=1)}return wt}},wy.prototype.removeItem=function(nt,at){for(var wt=null,lo=nt.getChildBoundables().iterator();lo.hasNext();){var fo=lo.next();fo instanceof m1&&fo.getItem()===at&&(wt=fo)}return wt!==null&&(nt.getChildBoundables().remove(wt),!0)},wy.prototype.itemsTree=function(){var nt=this;if(arguments.length===0){this.build();var at=this.itemsTree(this._root);return at===null?new Sg:at}if(arguments.length===1){for(var wt=arguments[0],lo=new Sg,fo=wt.getChildBoundables().iterator();fo.hasNext();){var vo=fo.next();if(vo instanceof Kv){var ls=nt.itemsTree(vo);ls!==null&&lo.add(ls)}else vo instanceof m1?lo.add(vo.getItem()):ym.shouldNeverReachHere()}return lo.size()<=0?null:lo}},wy.prototype.insert=function(nt,at){ym.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new m1(nt,at))},wy.prototype.boundablesAtLevel=function(){var nt=this;if(arguments.length===1){var at=arguments[0],wt=new Sg;return this.boundablesAtLevel(at,this._root,wt),wt}if(arguments.length===3){var lo=arguments[0],fo=arguments[1],vo=arguments[2];if(ym.isTrue(lo>-2),fo.getLevel()===lo)return vo.add(fo),null;for(var ls=fo.getChildBoundables().iterator();ls.hasNext();){var ff=ls.next();ff instanceof Kv?nt.boundablesAtLevel(lo,ff,vo):(ym.isTrue(ff instanceof m1),lo===-1&&vo.add(ff))}return null}},wy.prototype.query=function(){var nt=this;if(arguments.length===1){var at=arguments[0];this.build();var wt=new Sg;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),at)&&this.query(at,this._root,wt),wt}if(arguments.length===2){var lo=arguments[0],fo=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),lo)&&this.query(lo,this._root,fo)}else if(arguments.length===3){if(nm(arguments[2],_$)&&arguments[0]instanceof Object&&arguments[1]instanceof Kv)for(var vo=arguments[0],ls=arguments[1],ff=arguments[2],mf=ls.getChildBoundables(),bf=0;bfwt&&(wt=vo)}}return wt+1}},wy.prototype.createParentBoundables=function(nt,at){var wt=this;ym.isTrue(!nt.isEmpty());var lo=new Sg;lo.add(this.createNode(at));var fo=new Sg(nt);v1.sort(fo,this.getComparator());for(var vo=fo.iterator();vo.hasNext();){var ls=vo.next();wt.lastNode(lo).getChildBoundables().size()===wt.getNodeCapacity()&&lo.add(wt.createNode(at)),wt.lastNode(lo).addChildBoundable(ls)}return lo},wy.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},wy.prototype.interfaces_=function(){return[W0]},wy.prototype.getClass=function(){return wy},wy.compareDoubles=function(nt,at){return nt>at?1:nt0);for(var vo=new Sg,ls=0;ls0;){var zf=jf.poll(),Wf=zf.getDistance();if(Wf>=xf)break;zf.isLeaves()?(xf=Wf,If=zf):zf.expandToQueue(jf,xf)}return[If.getBoundable(0).getItem(),If.getBoundable(1).getItem()]}}else if(arguments.length===3){var Mf=arguments[0],np=arguments[1],pp=arguments[2],Uf=new m1(Mf,np),tp=new Gv(this.getRoot(),Uf,pp);return this.nearestNeighbour(tp)[0]}},at.prototype.interfaces_=function(){return[W_,W0]},at.prototype.getClass=function(){return at},at.centreX=function(lo){return at.avg(lo.getMinX(),lo.getMaxX())},at.avg=function(lo,fo){return(lo+fo)/2},at.centreY=function(lo){return at.avg(lo.getMinY(),lo.getMaxY())},wt.STRtreeNode.get=function(){return XS},wt.serialVersionUID.get=function(){return 0x39920f7d5f261e0},wt.xComparator.get=function(){return{interfaces_:function(){return[zw]},compare:function(lo,fo){return nt.compareDoubles(at.centreX(lo.getBounds()),at.centreX(fo.getBounds()))}}},wt.yComparator.get=function(){return{interfaces_:function(){return[zw]},compare:function(lo,fo){return nt.compareDoubles(at.centreY(lo.getBounds()),at.centreY(fo.getBounds()))}}},wt.intersectsOp.get=function(){return{interfaces_:function(){return[nt.IntersectsOp]},intersects:function(lo,fo){return lo.intersects(fo)}}},wt.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(at,wt),at}(wy),XS=function(nt){function at(){var wt=arguments[0];nt.call(this,wt)}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.computeBounds=function(){for(var wt=null,lo=this.getChildBoundables().iterator();lo.hasNext();){var fo=lo.next();wt===null?wt=new Wg(fo.getBounds()):wt.expandToInclude(fo.getBounds())}return wt},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(Kv),c0=function(){};c0.prototype.interfaces_=function(){return[]},c0.prototype.getClass=function(){return c0},c0.relativeSign=function(nt,at){return ntat?1:0},c0.compare=function(nt,at,wt){if(at.equals2D(wt))return 0;var lo=c0.relativeSign(at.x,wt.x),fo=c0.relativeSign(at.y,wt.y);switch(nt){case 0:return c0.compareValue(lo,fo);case 1:return c0.compareValue(fo,lo);case 2:return c0.compareValue(fo,-lo);case 3:return c0.compareValue(-lo,fo);case 4:return c0.compareValue(-lo,-fo);case 5:return c0.compareValue(-fo,-lo);case 6:return c0.compareValue(-fo,lo);case 7:return c0.compareValue(lo,-fo)}return ym.shouldNeverReachHere("invalid octant value"),0},c0.compareValue=function(nt,at){return nt<0?-1:nt>0?1:at<0?-1:at>0?1:0};var w$=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var nt=arguments[0],at=arguments[1],wt=arguments[2],lo=arguments[3];this._segString=nt,this.coord=new Gp(at),this.segmentIndex=wt,this._segmentOctant=lo,this._isInterior=!at.equals2D(nt.getCoordinate(wt))};w$.prototype.getCoordinate=function(){return this.coord},w$.prototype.print=function(nt){nt.print(this.coord),nt.print(" seg # = "+this.segmentIndex)},w$.prototype.compareTo=function(nt){var at=nt;return this.segmentIndexat.segmentIndex?1:this.coord.equals2D(at.coord)?0:c0.compare(this._segmentOctant,this.coord,at.coord)},w$.prototype.isEndPoint=function(nt){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===nt},w$.prototype.isInterior=function(){return this._isInterior},w$.prototype.interfaces_=function(){return[G0]},w$.prototype.getClass=function(){return w$};var yy=function(){this._nodeMap=new Hy,this._edge=null;var nt=arguments[0];this._edge=nt};yy.prototype.getSplitCoordinates=function(){var nt=new r2;this.addEndpoints();for(var at=this.iterator(),wt=at.next();at.hasNext();){var lo=at.next();this.addEdgeCoordinates(wt,lo,nt),wt=lo}return nt.toCoordinateArray()},yy.prototype.addCollapsedNodes=function(){var nt=new Sg;this.findCollapsesFromInsertedNodes(nt),this.findCollapsesFromExistingVertices(nt);for(var at=nt.iterator();at.hasNext();){var wt=at.next().intValue();this.add(this._edge.getCoordinate(wt),wt)}},yy.prototype.print=function(nt){nt.println("Intersections:");for(var at=this.iterator();at.hasNext();)at.next().print(nt)},yy.prototype.findCollapsesFromExistingVertices=function(nt){for(var at=0;at=0?at>=0?wt>=lo?0:1:wt>=lo?7:6:at>=0?wt>=lo?3:2:wt>=lo?4:5}if(arguments[0]instanceof Gp&&arguments[1]instanceof Gp){var fo=arguments[0],vo=arguments[1],ls=vo.x-fo.x,ff=vo.y-fo.y;if(ls===0&&ff===0)throw new Pv("Cannot compute the octant for two identical points "+fo);return y1.octant(ls,ff)}};var ay=function(){};ay.prototype.getCoordinates=function(){},ay.prototype.size=function(){},ay.prototype.getCoordinate=function(nt){},ay.prototype.isClosed=function(){},ay.prototype.setData=function(nt){},ay.prototype.getData=function(){},ay.prototype.interfaces_=function(){return[]},ay.prototype.getClass=function(){return ay};var h2=function(){};h2.prototype.addIntersection=function(nt,at){},h2.prototype.interfaces_=function(){return[ay]},h2.prototype.getClass=function(){return h2};var Lv=function(){this._nodeList=new yy(this),this._pts=null,this._data=null;var nt=arguments[0],at=arguments[1];this._pts=nt,this._data=at};Lv.prototype.getCoordinates=function(){return this._pts},Lv.prototype.size=function(){return this._pts.length},Lv.prototype.getCoordinate=function(nt){return this._pts[nt]},Lv.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Lv.prototype.getSegmentOctant=function(nt){return nt===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(nt),this.getCoordinate(nt+1))},Lv.prototype.setData=function(nt){this._data=nt},Lv.prototype.safeOctant=function(nt,at){return nt.equals2D(at)?0:y1.octant(nt,at)},Lv.prototype.getData=function(){return this._data},Lv.prototype.addIntersection=function(){if(arguments.length===2){var nt=arguments[0],at=arguments[1];this.addIntersectionNode(nt,at)}else if(arguments.length===4){var wt=arguments[0],lo=arguments[1],fo=arguments[3],vo=new Gp(wt.getIntersection(fo));this.addIntersection(vo,lo)}},Lv.prototype.toString=function(){return c1.toLineString(new Uv(this._pts))},Lv.prototype.getNodeList=function(){return this._nodeList},Lv.prototype.addIntersectionNode=function(nt,at){var wt=at,lo=wt+1;if(lo=0&&wt>=0||at<=0&&wt<=0?Math.max(at,wt):0}if(arguments[0]instanceof Gp){var lo=arguments[0];return Og.orientationIndex(this.p0,this.p1,lo)}},Vg.prototype.toGeometry=function(nt){return nt.createLineString([this.p0,this.p1])},Vg.prototype.isVertical=function(){return this.p0.x===this.p1.x},Vg.prototype.equals=function(nt){if(!(nt instanceof Vg))return!1;var at=nt;return this.p0.equals(at.p0)&&this.p1.equals(at.p1)},Vg.prototype.intersection=function(nt){var at=new y$;return at.computeIntersection(this.p0,this.p1,nt.p0,nt.p1),at.hasIntersection()?at.getIntersection(0):null},Vg.prototype.project=function(){if(arguments[0]instanceof Gp){var nt=arguments[0];if(nt.equals(this.p0)||nt.equals(this.p1))return new Gp(nt);var at=this.projectionFactor(nt),wt=new Gp;return wt.x=this.p0.x+at*(this.p1.x-this.p0.x),wt.y=this.p0.y+at*(this.p1.y-this.p0.y),wt}if(arguments[0]instanceof Vg){var lo=arguments[0],fo=this.projectionFactor(lo.p0),vo=this.projectionFactor(lo.p1);if(fo>=1&&vo>=1||fo<=0&&vo<=0)return null;var ls=this.project(lo.p0);fo<0&&(ls=this.p0),fo>1&&(ls=this.p1);var ff=this.project(lo.p1);return vo<0&&(ff=this.p0),vo>1&&(ff=this.p1),new Vg(ls,ff)}},Vg.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},Vg.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},Vg.prototype.getCoordinate=function(nt){return nt===0?this.p0:this.p1},Vg.prototype.distancePerpendicular=function(nt){return Og.distancePointLinePerpendicular(nt,this.p0,this.p1)},Vg.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},Vg.prototype.midPoint=function(){return Vg.midPoint(this.p0,this.p1)},Vg.prototype.projectionFactor=function(nt){if(nt.equals(this.p0))return 0;if(nt.equals(this.p1))return 1;var at=this.p1.x-this.p0.x,wt=this.p1.y-this.p0.y,lo=at*at+wt*wt;return lo<=0?dm.NaN:((nt.x-this.p0.x)*at+(nt.y-this.p0.y)*wt)/lo},Vg.prototype.closestPoints=function(nt){var at=this.intersection(nt);if(at!==null)return[at,at];var wt=new Array(2).fill(null),lo=dm.MAX_VALUE,fo=null,vo=this.closestPoint(nt.p0);lo=vo.distance(nt.p0),wt[0]=vo,wt[1]=nt.p0;var ls=this.closestPoint(nt.p1);(fo=ls.distance(nt.p1))0&&at<1?this.project(nt):this.p0.distance(nt)1||dm.isNaN(at))&&(at=1),at},Vg.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},Vg.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},Vg.prototype.distance=function(){if(arguments[0]instanceof Vg){var nt=arguments[0];return Og.distanceLineLine(this.p0,this.p1,nt.p0,nt.p1)}if(arguments[0]instanceof Gp){var at=arguments[0];return Og.distancePointLine(at,this.p0,this.p1)}},Vg.prototype.pointAlong=function(nt){var at=new Gp;return at.x=this.p0.x+nt*(this.p1.x-this.p0.x),at.y=this.p0.y+nt*(this.p1.y-this.p0.y),at},Vg.prototype.hashCode=function(){var nt=dm.doubleToLongBits(this.p0.x);nt^=31*dm.doubleToLongBits(this.p0.y);var at=Math.trunc(nt)^Math.trunc(nt>>32),wt=dm.doubleToLongBits(this.p1.x);return wt^=31*dm.doubleToLongBits(this.p1.y),at^(Math.trunc(wt)^Math.trunc(wt>>32))},Vg.prototype.interfaces_=function(){return[G0,W0]},Vg.prototype.getClass=function(){return Vg},Vg.midPoint=function(nt,at){return new Gp((nt.x+at.x)/2,(nt.y+at.y)/2)},xE.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(Vg,xE);var d2=function(){this.tempEnv1=new Wg,this.tempEnv2=new Wg,this._overlapSeg1=new Vg,this._overlapSeg2=new Vg};d2.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var nt=arguments[0],at=arguments[1],wt=arguments[2],lo=arguments[3];nt.getLineSegment(at,this._overlapSeg1),wt.getLineSegment(lo,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},d2.prototype.interfaces_=function(){return[]},d2.prototype.getClass=function(){return d2};var S0=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var nt=arguments[0],at=arguments[1],wt=arguments[2],lo=arguments[3];this._pts=nt,this._start=at,this._end=wt,this._context=lo};S0.prototype.getLineSegment=function(nt,at){at.p0=this._pts[nt],at.p1=this._pts[nt+1]},S0.prototype.computeSelect=function(nt,at,wt,lo){var fo=this._pts[at],vo=this._pts[wt];if(lo.tempEnv1.init(fo,vo),wt-at==1)return lo.select(this,at),null;if(!nt.intersects(lo.tempEnv1))return null;var ls=Math.trunc((at+wt)/2);at=nt.length-1)return nt.length-1;for(var lo=pv.quadrant(nt[wt],nt[wt+1]),fo=at+1;fols.getId()&&(ls.computeOverlaps(mf,fo),lo._nOverlaps++),lo._segInt.isDone())return null}},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},wt.SegmentOverlapAction.get=function(){return EE},Object.defineProperties(at,wt),at}(f2),EE=function(nt){function at(){nt.call(this),this._si=null;var wt=arguments[0];this._si=wt}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.overlap=function(){if(arguments.length!==4)return nt.prototype.overlap.apply(this,arguments);var wt=arguments[0],lo=arguments[1],fo=arguments[2],vo=arguments[3],ls=wt.getContext(),ff=fo.getContext();this._si.processIntersections(ls,lo,ff,vo)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(d2),uv=function nt(){if(this._quadrantSegments=nt.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=nt.CAP_ROUND,this._joinStyle=nt.JOIN_ROUND,this._mitreLimit=nt.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=nt.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var at=arguments[0];this.setQuadrantSegments(at)}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1];this.setQuadrantSegments(wt),this.setEndCapStyle(lo)}else if(arguments.length===4){var fo=arguments[0],vo=arguments[1],ls=arguments[2],ff=arguments[3];this.setQuadrantSegments(fo),this.setEndCapStyle(vo),this.setJoinStyle(ls),this.setMitreLimit(ff)}}},b1={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};uv.prototype.getEndCapStyle=function(){return this._endCapStyle},uv.prototype.isSingleSided=function(){return this._isSingleSided},uv.prototype.setQuadrantSegments=function(nt){this._quadrantSegments=nt,this._quadrantSegments===0&&(this._joinStyle=uv.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=uv.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),nt<=0&&(this._quadrantSegments=1),this._joinStyle!==uv.JOIN_ROUND&&(this._quadrantSegments=uv.DEFAULT_QUADRANT_SEGMENTS)},uv.prototype.getJoinStyle=function(){return this._joinStyle},uv.prototype.setJoinStyle=function(nt){this._joinStyle=nt},uv.prototype.setSimplifyFactor=function(nt){this._simplifyFactor=nt<0?0:nt},uv.prototype.getSimplifyFactor=function(){return this._simplifyFactor},uv.prototype.getQuadrantSegments=function(){return this._quadrantSegments},uv.prototype.setEndCapStyle=function(nt){this._endCapStyle=nt},uv.prototype.getMitreLimit=function(){return this._mitreLimit},uv.prototype.setMitreLimit=function(nt){this._mitreLimit=nt},uv.prototype.setSingleSided=function(nt){this._isSingleSided=nt},uv.prototype.interfaces_=function(){return[]},uv.prototype.getClass=function(){return uv},uv.bufferDistanceError=function(nt){var at=Math.PI/2/nt;return 1-Math.cos(at/2)},b1.CAP_ROUND.get=function(){return 1},b1.CAP_FLAT.get=function(){return 2},b1.CAP_SQUARE.get=function(){return 3},b1.JOIN_ROUND.get=function(){return 1},b1.JOIN_MITRE.get=function(){return 2},b1.JOIN_BEVEL.get=function(){return 3},b1.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},b1.DEFAULT_MITRE_LIMIT.get=function(){return 5},b1.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(uv,b1);var Ev=function(nt){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=Og.COUNTERCLOCKWISE,this._inputLine=nt||null},o_={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Ev.prototype.isDeletable=function(nt,at,wt,lo){var fo=this._inputLine[nt],vo=this._inputLine[at],ls=this._inputLine[wt];return!!this.isConcave(fo,vo,ls)&&!!this.isShallow(fo,vo,ls,lo)&&this.isShallowSampled(fo,vo,nt,wt,lo)},Ev.prototype.deleteShallowConcavities=function(){for(var nt=this,at=1,wt=this.findNextNonDeletedIndex(at),lo=this.findNextNonDeletedIndex(wt),fo=!1;lo=0;lo--)this.addPt(nt[lo])},R0.prototype.isRedundant=function(nt){if(this._ptList.size()<1)return!1;var at=this._ptList.get(this._ptList.size()-1);return nt.distance(at)Math.PI;)nt-=Mm.PI_TIMES_2;for(;nt<=-Math.PI;)nt+=Mm.PI_TIMES_2;return nt},Mm.angle=function(){if(arguments.length===1){var nt=arguments[0];return Math.atan2(nt.y,nt.x)}if(arguments.length===2){var at=arguments[0],wt=arguments[1],lo=wt.x-at.x,fo=wt.y-at.y;return Math.atan2(fo,lo)}},Mm.isAcute=function(nt,at,wt){var lo=nt.x-at.x,fo=nt.y-at.y;return lo*(wt.x-at.x)+fo*(wt.y-at.y)>0},Mm.isObtuse=function(nt,at,wt){var lo=nt.x-at.x,fo=nt.y-at.y;return lo*(wt.x-at.x)+fo*(wt.y-at.y)<0},Mm.interiorAngle=function(nt,at,wt){var lo=Mm.angle(at,nt),fo=Mm.angle(at,wt);return Math.abs(fo-lo)},Mm.normalizePositive=function(nt){if(nt<0){for(;nt<0;)nt+=Mm.PI_TIMES_2;nt>=Mm.PI_TIMES_2&&(nt=0)}else{for(;nt>=Mm.PI_TIMES_2;)nt-=Mm.PI_TIMES_2;nt<0&&(nt=0)}return nt},Mm.angleBetween=function(nt,at,wt){var lo=Mm.angle(at,nt),fo=Mm.angle(at,wt);return Mm.diff(lo,fo)},Mm.diff=function(nt,at){var wt=null;return(wt=ntMath.PI&&(wt=2*Math.PI-wt),wt},Mm.toRadians=function(nt){return nt*Math.PI/180},Mm.getTurn=function(nt,at){var wt=Math.sin(at-nt);return wt>0?Mm.COUNTERCLOCKWISE:wt<0?Mm.CLOCKWISE:Mm.NONE},Mm.angleBetweenOriented=function(nt,at,wt){var lo=Mm.angle(at,nt),fo=Mm.angle(at,wt)-lo;return fo<=-Math.PI?fo+Mm.PI_TIMES_2:fo>Math.PI?fo-Mm.PI_TIMES_2:fo},q_.PI_TIMES_2.get=function(){return 2*Math.PI},q_.PI_OVER_2.get=function(){return Math.PI/2},q_.PI_OVER_4.get=function(){return Math.PI/4},q_.COUNTERCLOCKWISE.get=function(){return Og.COUNTERCLOCKWISE},q_.CLOCKWISE.get=function(){return Og.CLOCKWISE},q_.NONE.get=function(){return Og.COLLINEAR},Object.defineProperties(Mm,q_);var kv=function nt(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new Vg,this._seg1=new Vg,this._offset0=new Vg,this._offset1=new Vg,this._side=0,this._hasNarrowConcaveAngle=!1;var at=arguments[0],wt=arguments[1],lo=arguments[2];this._precisionModel=at,this._bufParams=wt,this._li=new y$,this._filletAngleQuantum=Math.PI/2/wt.getQuadrantSegments(),wt.getQuadrantSegments()>=8&&wt.getJoinStyle()===uv.JOIN_ROUND&&(this._closingSegLengthFactor=nt.MAX_CLOSING_SEG_LEN_FACTOR),this.init(lo)},tx={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};kv.prototype.addNextSegment=function(nt,at){if(this._s0=this._s1,this._s1=this._s2,this._s2=nt,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var wt=Og.computeOrientation(this._s0,this._s1,this._s2),lo=wt===Og.CLOCKWISE&&this._side===$g.LEFT||wt===Og.COUNTERCLOCKWISE&&this._side===$g.RIGHT;wt===0?this.addCollinear(at):lo?this.addOutsideTurn(wt,at):this.addInsideTurn(wt,at)},kv.prototype.addLineEndCap=function(nt,at){var wt=new Vg(nt,at),lo=new Vg;this.computeOffsetSegment(wt,$g.LEFT,this._distance,lo);var fo=new Vg;this.computeOffsetSegment(wt,$g.RIGHT,this._distance,fo);var vo=at.x-nt.x,ls=at.y-nt.y,ff=Math.atan2(ls,vo);switch(this._bufParams.getEndCapStyle()){case uv.CAP_ROUND:this._segList.addPt(lo.p1),this.addFilletArc(at,ff+Math.PI/2,ff-Math.PI/2,Og.CLOCKWISE,this._distance),this._segList.addPt(fo.p1);break;case uv.CAP_FLAT:this._segList.addPt(lo.p1),this._segList.addPt(fo.p1);break;case uv.CAP_SQUARE:var mf=new Gp;mf.x=Math.abs(this._distance)*Math.cos(ff),mf.y=Math.abs(this._distance)*Math.sin(ff);var bf=new Gp(lo.p1.x+mf.x,lo.p1.y+mf.y),Sf=new Gp(fo.p1.x+mf.x,fo.p1.y+mf.y);this._segList.addPt(bf),this._segList.addPt(Sf)}},kv.prototype.getCoordinates=function(){return this._segList.getCoordinates()},kv.prototype.addMitreJoin=function(nt,at,wt,lo){var fo=!0,vo=null;try{vo=q0.intersection(at.p0,at.p1,wt.p0,wt.p1),(lo<=0?1:vo.distance(nt)/Math.abs(lo))>this._bufParams.getMitreLimit()&&(fo=!1)}catch(ls){if(!(ls instanceof F_))throw ls;vo=new Gp(0,0),fo=!1}fo?this._segList.addPt(vo):this.addLimitedMitreJoin(at,wt,lo,this._bufParams.getMitreLimit())},kv.prototype.addFilletCorner=function(nt,at,wt,lo,fo){var vo=at.x-nt.x,ls=at.y-nt.y,ff=Math.atan2(ls,vo),mf=wt.x-nt.x,bf=wt.y-nt.y,Sf=Math.atan2(bf,mf);lo===Og.CLOCKWISE?ff<=Sf&&(ff+=2*Math.PI):ff>=Sf&&(ff-=2*Math.PI),this._segList.addPt(at),this.addFilletArc(nt,ff,Sf,lo,fo),this._segList.addPt(wt)},kv.prototype.addOutsideTurn=function(nt,at){if(this._offset0.p1.distance(this._offset1.p0)0){var wt=new Gp((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(wt);var lo=new Gp((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(lo)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},kv.prototype.createCircle=function(nt){var at=new Gp(nt.x+this._distance,nt.y);this._segList.addPt(at),this.addFilletArc(nt,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},kv.prototype.addBevelJoin=function(nt,at){this._segList.addPt(nt.p1),this._segList.addPt(at.p0)},kv.prototype.init=function(nt){this._distance=nt,this._maxCurveSegmentError=nt*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new R0,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(nt*kv.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},kv.prototype.addCollinear=function(nt){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===uv.JOIN_BEVEL||this._bufParams.getJoinStyle()===uv.JOIN_MITRE?(nt&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,Og.CLOCKWISE,this._distance))},kv.prototype.closeRing=function(){this._segList.closeRing()},kv.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},kv.prototype.interfaces_=function(){return[]},kv.prototype.getClass=function(){return kv},tx.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},tx.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},tx.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},tx.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(kv,tx);var Kg=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var nt=arguments[0],at=arguments[1];this._precisionModel=nt,this._bufParams=at};Kg.prototype.getOffsetCurve=function(nt,at){if(this._distance=at,at===0)return null;var wt=at<0,lo=Math.abs(at),fo=this.getSegGen(lo);nt.length<=1?this.computePointCurve(nt[0],fo):this.computeOffsetCurve(nt,wt,fo);var vo=fo.getCoordinates();return wt&&Cm.reverse(vo),vo},Kg.prototype.computeSingleSidedBufferCurve=function(nt,at,wt){var lo=this.simplifyTolerance(this._distance);if(at){wt.addSegments(nt,!0);var fo=Ev.simplify(nt,-lo),vo=fo.length-1;wt.initSideSegments(fo[vo],fo[vo-1],$g.LEFT),wt.addFirstSegment();for(var ls=vo-2;ls>=0;ls--)wt.addNextSegment(fo[ls],!0)}else{wt.addSegments(nt,!1);var ff=Ev.simplify(nt,lo),mf=ff.length-1;wt.initSideSegments(ff[0],ff[1],$g.LEFT),wt.addFirstSegment();for(var bf=2;bf<=mf;bf++)wt.addNextSegment(ff[bf],!0)}wt.addLastSegment(),wt.closeRing()},Kg.prototype.computeRingBufferCurve=function(nt,at,wt){var lo=this.simplifyTolerance(this._distance);at===$g.RIGHT&&(lo=-lo);var fo=Ev.simplify(nt,lo),vo=fo.length-1;wt.initSideSegments(fo[vo-1],fo[0],at);for(var ls=1;ls<=vo;ls++){var ff=ls!==1;wt.addNextSegment(fo[ls],ff)}wt.closeRing()},Kg.prototype.computeLineBufferCurve=function(nt,at){var wt=this.simplifyTolerance(this._distance),lo=Ev.simplify(nt,wt),fo=lo.length-1;at.initSideSegments(lo[0],lo[1],$g.LEFT);for(var vo=2;vo<=fo;vo++)at.addNextSegment(lo[vo],!0);at.addLastSegment(),at.addLineEndCap(lo[fo-1],lo[fo]);var ls=Ev.simplify(nt,-wt),ff=ls.length-1;at.initSideSegments(ls[ff],ls[ff-1],$g.LEFT);for(var mf=ff-2;mf>=0;mf--)at.addNextSegment(ls[mf],!0);at.addLastSegment(),at.addLineEndCap(ls[1],ls[0]),at.closeRing()},Kg.prototype.computePointCurve=function(nt,at){switch(this._bufParams.getEndCapStyle()){case uv.CAP_ROUND:at.createCircle(nt);break;case uv.CAP_SQUARE:at.createSquare(nt)}},Kg.prototype.getLineCurve=function(nt,at){if(this._distance=at,at<0&&!this._bufParams.isSingleSided()||at===0)return null;var wt=Math.abs(at),lo=this.getSegGen(wt);if(nt.length<=1)this.computePointCurve(nt[0],lo);else if(this._bufParams.isSingleSided()){var fo=at<0;this.computeSingleSidedBufferCurve(nt,fo,lo)}else this.computeLineBufferCurve(nt,lo);return lo.getCoordinates()},Kg.prototype.getBufferParameters=function(){return this._bufParams},Kg.prototype.simplifyTolerance=function(nt){return nt*this._bufParams.getSimplifyFactor()},Kg.prototype.getRingCurve=function(nt,at,wt){if(this._distance=wt,nt.length<=2)return this.getLineCurve(nt,wt);if(wt===0)return Kg.copyCoordinates(nt);var lo=this.getSegGen(wt);return this.computeRingBufferCurve(nt,at,lo),lo.getCoordinates()},Kg.prototype.computeOffsetCurve=function(nt,at,wt){var lo=this.simplifyTolerance(this._distance);if(at){var fo=Ev.simplify(nt,-lo),vo=fo.length-1;wt.initSideSegments(fo[vo],fo[vo-1],$g.LEFT),wt.addFirstSegment();for(var ls=vo-2;ls>=0;ls--)wt.addNextSegment(fo[ls],!0)}else{var ff=Ev.simplify(nt,lo),mf=ff.length-1;wt.initSideSegments(ff[0],ff[1],$g.LEFT),wt.addFirstSegment();for(var bf=2;bf<=mf;bf++)wt.addNextSegment(ff[bf],!0)}wt.addLastSegment()},Kg.prototype.getSegGen=function(nt){return new kv(this._precisionModel,this._bufParams,nt)},Kg.prototype.interfaces_=function(){return[]},Kg.prototype.getClass=function(){return Kg},Kg.copyCoordinates=function(nt){for(var at=new Array(nt.length).fill(null),wt=0;wtvo.getMaxY()||nt.findStabbedSegments(at,fo.getDirectedEdges(),wt)}return wt}if(arguments.length===3){if(nm(arguments[2],u1)&&arguments[0]instanceof Gp&&arguments[1]instanceof _E)for(var ls=arguments[0],ff=arguments[1],mf=arguments[2],bf=ff.getEdge().getCoordinates(),Sf=0;Sfnt._seg.p1.y&&nt._seg.reverse();var xf=Math.max(nt._seg.p0.x,nt._seg.p1.x);if(!(xfnt._seg.p1.y||Og.computeOrientation(nt._seg.p0,nt._seg.p1,ls)===Og.RIGHT)){var If=ff.getDepth($g.LEFT);nt._seg.p0.equals(bf[Sf])||(If=ff.getDepth($g.RIGHT));var jf=new a_(nt._seg,If);mf.add(jf)}}else if(nm(arguments[2],u1)&&arguments[0]instanceof Gp&&nm(arguments[1],u1))for(var zf=arguments[0],Wf=arguments[1],Mf=arguments[2],np=Wf.iterator();np.hasNext();){var pp=np.next();pp.isForward()&&nt.findStabbedSegments(zf,pp,Mf)}}},Y_.prototype.getDepth=function(nt){var at=this.findStabbedSegments(nt);return at.size()===0?0:v1.min(at)._leftDepth},Y_.prototype.interfaces_=function(){return[]},Y_.prototype.getClass=function(){return Y_},Jk.DepthSegment.get=function(){return a_},Object.defineProperties(Y_,Jk);var a_=function(){this._upwardSeg=null,this._leftDepth=null;var nt=arguments[0],at=arguments[1];this._upwardSeg=new Vg(nt),this._leftDepth=at};a_.prototype.compareTo=function(nt){var at=nt;if(this._upwardSeg.minX()>=at._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=at._upwardSeg.minX())return-1;var wt=this._upwardSeg.orientationIndex(at._upwardSeg);return wt!==0||(wt=-1*at._upwardSeg.orientationIndex(this._upwardSeg))!==0?wt:this._upwardSeg.compareTo(at._upwardSeg)},a_.prototype.compareX=function(nt,at){var wt=nt.p0.compareTo(at.p0);return wt!==0?wt:nt.p1.compareTo(at.p1)},a_.prototype.toString=function(){return this._upwardSeg.toString()},a_.prototype.interfaces_=function(){return[G0]},a_.prototype.getClass=function(){return a_};var fm=function(nt,at,wt){this.p0=nt||null,this.p1=at||null,this.p2=wt||null};fm.prototype.area=function(){return fm.area(this.p0,this.p1,this.p2)},fm.prototype.signedArea=function(){return fm.signedArea(this.p0,this.p1,this.p2)},fm.prototype.interpolateZ=function(nt){if(nt===null)throw new Pv("Supplied point is null.");return fm.interpolateZ(nt,this.p0,this.p1,this.p2)},fm.prototype.longestSideLength=function(){return fm.longestSideLength(this.p0,this.p1,this.p2)},fm.prototype.isAcute=function(){return fm.isAcute(this.p0,this.p1,this.p2)},fm.prototype.circumcentre=function(){return fm.circumcentre(this.p0,this.p1,this.p2)},fm.prototype.area3D=function(){return fm.area3D(this.p0,this.p1,this.p2)},fm.prototype.centroid=function(){return fm.centroid(this.p0,this.p1,this.p2)},fm.prototype.inCentre=function(){return fm.inCentre(this.p0,this.p1,this.p2)},fm.prototype.interfaces_=function(){return[]},fm.prototype.getClass=function(){return fm},fm.area=function(nt,at,wt){return Math.abs(((wt.x-nt.x)*(at.y-nt.y)-(at.x-nt.x)*(wt.y-nt.y))/2)},fm.signedArea=function(nt,at,wt){return((wt.x-nt.x)*(at.y-nt.y)-(at.x-nt.x)*(wt.y-nt.y))/2},fm.det=function(nt,at,wt,lo){return nt*lo-at*wt},fm.interpolateZ=function(nt,at,wt,lo){var fo=at.x,vo=at.y,ls=wt.x-fo,ff=lo.x-fo,mf=wt.y-vo,bf=lo.y-vo,Sf=ls*bf-ff*mf,xf=nt.x-fo,If=nt.y-vo,jf=(bf*xf-ff*If)/Sf,zf=(-mf*xf+ls*If)/Sf;return at.z+jf*(wt.z-at.z)+zf*(lo.z-at.z)},fm.longestSideLength=function(nt,at,wt){var lo=nt.distance(at),fo=at.distance(wt),vo=wt.distance(nt),ls=lo;return fo>ls&&(ls=fo),vo>ls&&(ls=vo),ls},fm.isAcute=function(nt,at,wt){return!!Mm.isAcute(nt,at,wt)&&!!Mm.isAcute(at,wt,nt)&&!!Mm.isAcute(wt,nt,at)},fm.circumcentre=function(nt,at,wt){var lo=wt.x,fo=wt.y,vo=nt.x-lo,ls=nt.y-fo,ff=at.x-lo,mf=at.y-fo,bf=2*fm.det(vo,ls,ff,mf),Sf=fm.det(ls,vo*vo+ls*ls,mf,ff*ff+mf*mf),xf=fm.det(vo,vo*vo+ls*ls,ff,ff*ff+mf*mf);return new Gp(lo-Sf/bf,fo+xf/bf)},fm.perpendicularBisector=function(nt,at){var wt=at.x-nt.x,lo=at.y-nt.y,fo=new q0(nt.x+wt/2,nt.y+lo/2,1),vo=new q0(nt.x-lo+wt/2,nt.y+wt+lo/2,1);return new q0(fo,vo)},fm.angleBisector=function(nt,at,wt){var lo=at.distance(nt),fo=lo/(lo+at.distance(wt)),vo=wt.x-nt.x,ls=wt.y-nt.y;return new Gp(nt.x+fo*vo,nt.y+fo*ls)},fm.area3D=function(nt,at,wt){var lo=at.x-nt.x,fo=at.y-nt.y,vo=at.z-nt.z,ls=wt.x-nt.x,ff=wt.y-nt.y,mf=wt.z-nt.z,bf=fo*mf-vo*ff,Sf=vo*ls-lo*mf,xf=lo*ff-fo*ls,If=bf*bf+Sf*Sf+xf*xf,jf=Math.sqrt(If)/2;return jf},fm.centroid=function(nt,at,wt){var lo=(nt.x+at.x+wt.x)/3,fo=(nt.y+at.y+wt.y)/3;return new Gp(lo,fo)},fm.inCentre=function(nt,at,wt){var lo=at.distance(wt),fo=nt.distance(wt),vo=nt.distance(at),ls=lo+fo+vo,ff=(lo*nt.x+fo*at.x+vo*wt.x)/ls,mf=(lo*nt.y+fo*at.y+vo*wt.y)/ls;return new Gp(ff,mf)};var u0=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Sg;var nt=arguments[0],at=arguments[1],wt=arguments[2];this._inputGeom=nt,this._distance=at,this._curveBuilder=wt};u0.prototype.addPoint=function(nt){if(this._distance<=0)return null;var at=nt.getCoordinates(),wt=this._curveBuilder.getLineCurve(at,this._distance);this.addCurve(wt,eg.EXTERIOR,eg.INTERIOR)},u0.prototype.addPolygon=function(nt){var at=this,wt=this._distance,lo=$g.LEFT;this._distance<0&&(wt=-this._distance,lo=$g.RIGHT);var fo=nt.getExteriorRing(),vo=Cm.removeRepeatedPoints(fo.getCoordinates());if(this._distance<0&&this.isErodedCompletely(fo,this._distance)||this._distance<=0&&vo.length<3)return null;this.addPolygonRing(vo,wt,lo,eg.EXTERIOR,eg.INTERIOR);for(var ls=0;ls0&&at.isErodedCompletely(ff,-at._distance)||at.addPolygonRing(mf,wt,$g.opposite(lo),eg.INTERIOR,eg.EXTERIOR)}},u0.prototype.isTriangleErodedCompletely=function(nt,at){var wt=new fm(nt[0],nt[1],nt[2]),lo=wt.inCentre();return Og.distancePointLine(lo,wt.p0,wt.p1)=hb.MINIMUM_VALID_SIZE&&Og.isCCW(nt)&&(vo=fo,ls=lo,wt=$g.opposite(wt));var ff=this._curveBuilder.getRingCurve(nt,wt,at);this.addCurve(ff,vo,ls)},u0.prototype.add=function(nt){if(nt.isEmpty())return null;nt instanceof oy?this.addPolygon(nt):nt instanceof Av?this.addLineString(nt):nt instanceof x0?this.addPoint(nt):(nt instanceof Zw||nt instanceof b$||nt instanceof db||nt instanceof Zy)&&this.addCollection(nt)},u0.prototype.isErodedCompletely=function(nt,at){var wt=nt.getCoordinates();if(wt.length<4)return at<0;if(wt.length===4)return this.isTriangleErodedCompletely(wt,at);var lo=nt.getEnvelopeInternal(),fo=Math.min(lo.getHeight(),lo.getWidth());return at<0&&2*Math.abs(at)>fo},u0.prototype.addCollection=function(nt){for(var at=0;at=this._max)throw new U_;var nt=this._parent.getGeometryN(this._index++);return nt instanceof Zy?(this._subcollectionIterator=new j1(nt),this._subcollectionIterator.next()):nt},j1.prototype.remove=function(){throw new Error(this.getClass().getName())},j1.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},j1.prototype.interfaces_=function(){return[qw]},j1.prototype.getClass=function(){return j1},j1.isAtomic=function(nt){return!(nt instanceof Zy)};var h0=function(){this._geom=null;var nt=arguments[0];this._geom=nt};h0.prototype.locate=function(nt){return h0.locate(nt,this._geom)},h0.prototype.interfaces_=function(){return[hv]},h0.prototype.getClass=function(){return h0},h0.isPointInRing=function(nt,at){return!!at.getEnvelopeInternal().intersects(nt)&&Og.isPointInRing(nt,at.getCoordinates())},h0.containsPointInPolygon=function(nt,at){if(at.isEmpty())return!1;var wt=at.getExteriorRing();if(!h0.isPointInRing(nt,wt))return!1;for(var lo=0;lo0&&(lo.right=vo.right,lo.left=vo,vo.right=null),this._size++,this._root=lo),this._root},nt.prototype.remove=function(at){this._root=this._remove(at,this._root,this._comparator)},nt.prototype._remove=function(at,wt,lo){var fo;return wt===null?null:lo(at,(wt=p$(at,wt,lo)).key)===0?(wt.left===null?fo=wt.right:(fo=p$(at,wt.left,lo)).right=wt.right,this._size--,fo):wt},nt.prototype.pop=function(){var at=this._root;if(at){for(;at.left;)at=at.left;return this._root=p$(at.key,this._root,this._comparator),this._root=this._remove(at.key,this._root,this._comparator),{key:at.key,data:at.data}}return null},nt.prototype.findStatic=function(at){for(var wt=this._root,lo=this._comparator;wt;){var fo=lo(at,wt.key);if(fo===0)return wt;wt=fo<0?wt.left:wt.right}return null},nt.prototype.find=function(at){return this._root&&(this._root=p$(at,this._root,this._comparator),this._comparator(at,this._root.key)!==0)?null:this._root},nt.prototype.contains=function(at){for(var wt=this._root,lo=this._comparator;wt;){var fo=lo(at,wt.key);if(fo===0)return!0;wt=fo<0?wt.left:wt.right}return!1},nt.prototype.forEach=function(at,wt){for(var lo=this._root,fo=[],vo=!1;!vo;)lo!==null?(fo.push(lo),lo=lo.left):fo.length!==0?(lo=fo.pop(),at.call(wt,lo),lo=lo.right):vo=!0;return this},nt.prototype.range=function(at,wt,lo,fo){for(var vo=[],ls=this._comparator,ff=this._root;vo.length!==0||ff;)if(ff)vo.push(ff),ff=ff.left;else{if(ls((ff=vo.pop()).key,wt)>0)break;if(ls(ff.key,at)>=0&&lo.call(fo,ff))return this;ff=ff.right}return this},nt.prototype.keys=function(){var at=[];return this.forEach(function(wt){var lo=wt.key;return at.push(lo)}),at},nt.prototype.values=function(){var at=[];return this.forEach(function(wt){var lo=wt.data;return at.push(lo)}),at},nt.prototype.min=function(){return this._root?this.minNode(this._root).key:null},nt.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},nt.prototype.minNode=function(at){if(at===void 0&&(at=this._root),at)for(;at.left;)at=at.left;return at},nt.prototype.maxNode=function(at){if(at===void 0&&(at=this._root),at)for(;at.right;)at=at.right;return at},nt.prototype.at=function(at){for(var wt=this._root,lo=!1,fo=0,vo=[];!lo;)if(wt)vo.push(wt),wt=wt.left;else if(vo.length>0){if(wt=vo.pop(),fo===at)return wt;fo++,wt=wt.right}else lo=!0;return null},nt.prototype.next=function(at){var wt=this._root,lo=null;if(at.right){for(lo=at.right;lo.left;)lo=lo.left;return lo}for(var fo=this._comparator;wt;){var vo=fo(at.key,wt.key);if(vo===0)break;vo<0?(lo=wt,wt=wt.left):wt=wt.right}return lo},nt.prototype.prev=function(at){var wt=this._root,lo=null;if(at.left!==null){for(lo=at.left;lo.right;)lo=lo.right;return lo}for(var fo=this._comparator;wt;){var vo=fo(at.key,wt.key);if(vo===0)break;vo<0?wt=wt.left:(lo=wt,wt=wt.right)}return lo},nt.prototype.clear=function(){return this._root=null,this._size=0,this},nt.prototype.toList=function(){return function(at){for(var wt=at,lo=[],fo=!1,vo=new n_(null,null),ls=vo;!fo;)wt?(lo.push(wt),wt=wt.left):lo.length>0?wt=(wt=ls=ls.next=lo.pop()).right:fo=!0;return ls.next=null,vo.next}(this._root)},nt.prototype.load=function(at,wt,lo){wt===void 0&&(wt=[]),lo===void 0&&(lo=!1);var fo=at.length,vo=this._comparator;if(lo&&HS(at,wt,0,fo-1,vo),this._root===null)this._root=zS(at,wt,0,fo),this._size=fo;else{var ls=function(ff,mf,bf){for(var Sf=new n_(null,null),wf=Sf,If=ff,jf=mf;If!==null&&jf!==null;)bf(If.key,jf.key)<0?(wf.next=If,If=If.next):(wf.next=jf,jf=jf.next),wf=wf.next;return If!==null?wf.next=If:jf!==null&&(wf.next=jf),Sf.next}(this.toList(),function(ff,mf){for(var bf=new n_(null,null),Sf=bf,wf=0;wf0){var vo=wt+Math.floor(fo/2),ls=nt[vo],ff=at[vo],mf=new n_(ls,ff);return mf.left=zS(nt,at,wt,vo),mf.right=zS(nt,at,vo+1,lo),mf}return null}function oE(nt,at,wt){var lo=wt-at;if(lo>0){var fo=at+Math.floor(lo/2),vo=oE(nt,at,fo),ls=nt.head;return ls.left=vo,nt.head=nt.head.next,ls.right=oE(nt,fo+1,wt),ls}return null}function HS(nt,at,wt,lo,fo){if(!(wt>=lo)){for(var vo=nt[wt+lo>>1],ls=wt-1,ff=lo+1;;){do ls++;while(fo(nt[ls],vo)<0);do ff--;while(fo(nt[ff],vo)>0);if(ls>=ff)break;var mf=nt[ls];nt[ls]=nt[ff],nt[ff]=mf,mf=at[ls],at[ls]=at[ff],at[ff]=mf}HS(nt,at,wt,ff,fo),HS(nt,at,ff+1,lo,fo)}}function P0(nt,at){if(!(nt instanceof at))throw new TypeError("Cannot call a class as a function")}function US(nt,at){for(var wt=0;wtwt.x?1:at.ywt.y?1:0}}]),w0(nt,[{key:"link",value:function(at){if(at.point===this.point)throw new Error("Tried to link already linked events");for(var wt=at.point.events,lo=0,fo=wt.length;lo=0&&wf>=0?bfIf?-1:0:mf<0&&wf<0?bfIf?1:0:wfmf?1:0}}}]),nt}(),pO=0,cE=function(){function nt(at,wt,lo,fo){P0(this,nt),this.id=++pO,this.leftSE=at,at.segment=this,at.otherSE=wt,this.rightSE=wt,wt.segment=this,wt.otherSE=at,this.rings=lo,this.windings=fo}return w0(nt,null,[{key:"compare",value:function(at,wt){var lo=at.leftSE.point.x,fo=wt.leftSE.point.x,vo=at.rightSE.point.x,ls=wt.rightSE.point.x;if(lsff&&mf>bf)return-1;var wf=at.comparePoint(wt.leftSE.point);if(wf<0)return 1;if(wf>0)return-1;var If=wt.comparePoint(at.rightSE.point);return If!==0?If:-1}if(lo>fo){if(ffmf&&ff>Sf)return 1;var jf=wt.comparePoint(at.leftSE.point);if(jf!==0)return jf;var zf=at.comparePoint(wt.rightSE.point);return zf<0?1:zf>0?-1:1}if(ffmf)return 1;if(vols){var Mf=at.comparePoint(wt.rightSE.point);if(Mf<0)return 1;if(Mf>0)return-1}if(vo!==ls){var np=bf-ff,pp=vo-lo,Uf=Sf-mf,tp=ls-fo;if(np>pp&&Uftp)return-1}return vo>ls?1:voSf?1:at.idwt.id?1:0}}]),w0(nt,[{key:"replaceRightSE",value:function(at){this.rightSE=at,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var at=this.leftSE.point.y,wt=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:atwt?at:wt}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(at){return at.x===this.leftSE.point.x&&at.y===this.leftSE.point.y||at.x===this.rightSE.point.x&&at.y===this.rightSE.point.y}},{key:"comparePoint",value:function(at){if(this.isAnEndpoint(at))return 0;var wt=this.leftSE.point,lo=this.rightSE.point,fo=this.vector();if(wt.x===lo.x)return at.x===wt.x?0:at.x0&&ff.swapEvents(),Ab.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),lo&&(fo.checkForConsuming(),vo.checkForConsuming()),wt}},{key:"swapEvents",value:function(){var at=this.rightSE;this.rightSE=this.leftSE,this.leftSE=at,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var wt=0,lo=this.windings.length;wt0){var vo=wt;wt=lo,lo=vo}if(wt.prev===lo){var ls=wt;wt=lo,lo=ls}for(var ff=0,mf=lo.rings.length;ff0))throw new Error("Tried to create degenerate segment at [".concat(at.x,", ").concat(at.y,"]"));fo=wt,vo=at,ls=-1}return new nt(new Ab(fo,!0),new Ab(vo,!1),[lo],[ls])}}]),nt}(),kk=function(){function nt(at,wt,lo){if(P0(this,nt),!Array.isArray(at)||at.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=wt,this.isExterior=lo,this.segments=[],typeof at[0][0]!="number"||typeof at[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var fo=Kx.round(at[0][0],at[0][1]);this.bbox={ll:{x:fo.x,y:fo.y},ur:{x:fo.x,y:fo.y}};for(var vo=fo,ls=1,ff=at.length;lsthis.bbox.ur.x&&(this.bbox.ur.x=mf.x),mf.y>this.bbox.ur.y&&(this.bbox.ur.y=mf.y),vo=mf)}fo.x===vo.x&&fo.y===vo.y||this.segments.push(cE.fromRing(vo,fo,this))}return w0(nt,[{key:"getSweepEvents",value:function(){for(var at=[],wt=0,lo=this.segments.length;wtthis.bbox.ur.x&&(this.bbox.ur.x=vo.bbox.ur.x),vo.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=vo.bbox.ur.y),this.interiorRings.push(vo)}this.multiPoly=wt}return w0(nt,[{key:"getSweepEvents",value:function(){for(var at=this.exteriorRing.getSweepEvents(),wt=0,lo=this.interiorRings.length;wtthis.bbox.ur.x&&(this.bbox.ur.x=vo.bbox.ur.x),vo.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=vo.bbox.ur.y),this.polys.push(vo)}this.isSubject=wt}return w0(nt,[{key:"getSweepEvents",value:function(){for(var at=[],wt=0,lo=this.polys.length;wt0&&(at=fo)}for(var vo=at.segment.prevInResult(),ls=vo?vo.prevInResult():null;;){if(!vo)return null;if(!ls)return vo.ringOut;if(ls.ringOut!==vo.ringOut)return ls.ringOut.enclosingRing()!==vo.ringOut?vo.ringOut:vo.ringOut.enclosingRing();vo=ls.prevInResult(),ls=vo?vo.prevInResult():null}}}]),nt}(),Ik=function(){function nt(at){P0(this,nt),this.exteriorRing=at,at.poly=this,this.interiorRings=[]}return w0(nt,[{key:"addInterior",value:function(at){this.interiorRings.push(at),at.poly=this}},{key:"getGeom",value:function(){var at=[this.exteriorRing.getGeom()];if(at[0]===null)return null;for(var wt=0,lo=this.interiorRings.length;wt1&&arguments[1]!==void 0?arguments[1]:cE.compare;P0(this,nt),this.queue=at,this.tree=new jS(wt),this.segments=[]}return w0(nt,[{key:"process",value:function(at){var wt=at.segment,lo=[];if(at.consumedBy)return at.isLeft?this.queue.remove(at.otherSE):this.tree.remove(wt),lo;var fo=at.isLeft?this.tree.insert(wt):this.tree.find(wt);if(!fo)throw new Error("Unable to find segment #".concat(wt.id," ")+"[".concat(wt.leftSE.point.x,", ").concat(wt.leftSE.point.y,"] -> ")+"[".concat(wt.rightSE.point.x,", ").concat(wt.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var vo=fo,ls=fo,ff=void 0,mf=void 0;ff===void 0;)(vo=this.tree.prev(vo))===null?ff=null:vo.key.consumedBy===void 0&&(ff=vo.key);for(;mf===void 0;)(ls=this.tree.next(ls))===null?mf=null:ls.key.consumedBy===void 0&&(mf=ls.key);if(at.isLeft){var bf=null;if(ff){var Sf=ff.getIntersection(wt);if(Sf!==null&&(wt.isAnEndpoint(Sf)||(bf=Sf),!ff.isAnEndpoint(Sf)))for(var wf=this._splitSafely(ff,Sf),If=0,jf=wf.length;If0?(this.tree.remove(wt),lo.push(at)):(this.segments.push(wt),wt.prev=ff)}else{if(ff&&mf){var sp=ff.getIntersection(mf);if(sp!==null){if(!ff.isAnEndpoint(sp))for(var Qp=this._splitSafely(ff,sp),Ap=0,rg=Qp.length;ApPk)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var tp=new vO(zf),op=zf.size,up=zf.pop();up;){var sp=up.key;if(zf.size===op){var Qp=sp.segment;throw new Error("Unable to pop() ".concat(sp.isLeft?"left":"right"," SweepEvent ")+"[".concat(sp.point.x,", ").concat(sp.point.y,"] from segment #").concat(Qp.id," ")+"[".concat(Qp.leftSE.point.x,", ").concat(Qp.leftSE.point.y,"] -> ")+"[".concat(Qp.rightSE.point.x,", ").concat(Qp.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(zf.size>Pk)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(tp.segments.length>yO)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var Ap=tp.process(sp),rg=0,zp=Ap.length;rg1?at-1:0),lo=1;lo1?at-1:0),lo=1;lo1?at-1:0),lo=1;lo1?at-1:0),lo=1;loat.x?1:this.yat.y?1:0},Gp.prototype.clone=function(){},Gp.prototype.copy=function(){return new Gp(this)},Gp.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},Gp.prototype.distance3D=function(nt){var at=this.x-nt.x,wt=this.y-nt.y,lo=this.z-nt.z;return Math.sqrt(at*at+wt*wt+lo*lo)},Gp.prototype.distance=function(nt){var at=this.x-nt.x,wt=this.y-nt.y;return Math.sqrt(at*at+wt*wt)},Gp.prototype.hashCode=function(){var nt=17;return nt=37*(nt=37*nt+Gp.hashCode(this.x))+Gp.hashCode(this.y)},Gp.prototype.setCoordinate=function(nt){this.x=nt.x,this.y=nt.y,this.z=nt.z},Gp.prototype.interfaces_=function(){return[G0,Zx,W0]},Gp.prototype.getClass=function(){return Gp},Gp.hashCode=function(){if(arguments.length===1){var nt=arguments[0],at=dm.doubleToLongBits(nt);return Math.trunc((at^at)>>>32)}},L_.DimensionalComparator.get=function(){return v$},L_.serialVersionUID.get=function(){return 6683108902428367e3},L_.NULL_ORDINATE.get=function(){return dm.NaN},L_.X.get=function(){return 0},L_.Y.get=function(){return 1},L_.Z.get=function(){return 2},Object.defineProperties(Gp,L_);var v$=function(nt){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var at=arguments[0];if(at!==2&&at!==3)throw new Pv("only 2 or 3 dimensions may be specified");this._dimensionsToTest=at}}};v$.prototype.compare=function(nt,at){var wt=nt,lo=at,fo=v$.compare(wt.x,lo.x);if(fo!==0)return fo;var vo=v$.compare(wt.y,lo.y);return vo!==0?vo:this._dimensionsToTest<=2?0:v$.compare(wt.z,lo.z)},v$.prototype.interfaces_=function(){return[zw]},v$.prototype.getClass=function(){return v$},v$.compare=function(nt,at){return ntat?1:dm.isNaN(nt)?dm.isNaN(at)?0:-1:dm.isNaN(at)?1:0};var Hw=function(){};Hw.prototype.create=function(){},Hw.prototype.interfaces_=function(){return[]},Hw.prototype.getClass=function(){return Hw};var eg=function(){},Jx={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};eg.prototype.interfaces_=function(){return[]},eg.prototype.getClass=function(){return eg},eg.toLocationSymbol=function(nt){switch(nt){case eg.EXTERIOR:return"e";case eg.BOUNDARY:return"b";case eg.INTERIOR:return"i";case eg.NONE:return"-"}throw new Pv("Unknown location value: "+nt)},Jx.INTERIOR.get=function(){return 0},Jx.BOUNDARY.get=function(){return 1},Jx.EXTERIOR.get=function(){return 2},Jx.NONE.get=function(){return-1},Object.defineProperties(eg,Jx);var nm=function(nt,at){return nt.interfaces_&&nt.interfaces_().indexOf(at)>-1},A0=function(){},Rk={LOG_10:{configurable:!0}};A0.prototype.interfaces_=function(){return[]},A0.prototype.getClass=function(){return A0},A0.log10=function(nt){var at=Math.log(nt);return dm.isInfinite(at)||dm.isNaN(at)?at:at/A0.LOG_10},A0.min=function(nt,at,wt,lo){var fo=nt;return atwt?wt:nt}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var lo=arguments[0],fo=arguments[1],vo=arguments[2];return lovo?vo:lo}},A0.wrap=function(nt,at){return nt<0?at- -nt%at:nt%at},A0.max=function(){if(arguments.length===3){var nt=arguments[0],at=arguments[1],wt=arguments[2],lo=nt;return at>lo&&(lo=at),wt>lo&&(lo=wt),lo}if(arguments.length===4){var fo=arguments[0],vo=arguments[1],ls=arguments[2],ff=arguments[3],mf=fo;return vo>mf&&(mf=vo),ls>mf&&(mf=ls),ff>mf&&(mf=ff),mf}},A0.average=function(nt,at){return(nt+at)/2},Rk.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(A0,Rk);var A1=function(nt){this.str=nt};A1.prototype.append=function(nt){this.str+=nt},A1.prototype.setCharAt=function(nt,at){this.str=this.str.substr(0,nt)+at+this.str.substr(nt+1)},A1.prototype.toString=function(nt){return this.str};var R1=function(nt){this.value=nt};R1.prototype.intValue=function(){return this.value},R1.prototype.compareTo=function(nt){return this.valuent?1:0},R1.isNaN=function(nt){return Number.isNaN(nt)};var Qx=function(){};Qx.isWhitespace=function(nt){return nt<=32&&nt>=0||nt===127},Qx.toUpperCase=function(nt){return nt.toUpperCase()};var ag=function nt(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var at=arguments[0];this.init(at)}else if(arguments[0]instanceof nt){var wt=arguments[0];this.init(wt)}else if(typeof arguments[0]=="string"){var lo=arguments[0];nt.call(this,nt.parse(lo))}}else if(arguments.length===2){var fo=arguments[0],vo=arguments[1];this.init(fo,vo)}},l1={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};ag.prototype.le=function(nt){return(this._hi9?(Sf=!0,wf="9"):wf="0"+bf,ls.append(wf),wt=wt.subtract(ag.valueOf(bf)).multiply(ag.TEN),Sf&&wt.selfAdd(ag.TEN);var If=!0,jf=ag.magnitude(wt._hi);if(jf<0&&Math.abs(jf)>=ff-mf&&(If=!1),!If)break}return at[0]=lo,ls.toString()},ag.prototype.sqr=function(){return this.multiply(this)},ag.prototype.doubleValue=function(){return this._hi+this._lo},ag.prototype.subtract=function(){if(arguments[0]instanceof ag){var nt=arguments[0];return this.add(nt.negate())}if(typeof arguments[0]=="number"){var at=arguments[0];return this.add(-at)}},ag.prototype.equals=function(){if(arguments.length===1){var nt=arguments[0];return this._hi===nt._hi&&this._lo===nt._lo}},ag.prototype.isZero=function(){return this._hi===0&&this._lo===0},ag.prototype.selfSubtract=function(){if(arguments[0]instanceof ag){var nt=arguments[0];return this.isNaN()?this:this.selfAdd(-nt._hi,-nt._lo)}if(typeof arguments[0]=="number"){var at=arguments[0];return this.isNaN()?this:this.selfAdd(-at,0)}},ag.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},ag.prototype.min=function(nt){return this.le(nt)?this:nt},ag.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof ag){var nt=arguments[0];return this.selfDivide(nt._hi,nt._lo)}if(typeof arguments[0]=="number"){var at=arguments[0];return this.selfDivide(at,0)}}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1],fo=null,vo=null,ls=null,ff=null,mf=null,bf=null,Sf=null,wf=null;return mf=this._hi/wt,wf=(fo=(bf=ag.SPLIT*mf)-(fo=bf-mf))*(ls=(wf=ag.SPLIT*wt)-(ls=wf-wt))-(Sf=mf*wt)+fo*(ff=wt-ls)+(vo=mf-fo)*ls+vo*ff,wf=mf+(bf=(this._hi-Sf-wf+this._lo-mf*lo)/wt),this._hi=wf,this._lo=mf-wf+bf,this}},ag.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},ag.prototype.divide=function(){if(arguments[0]instanceof ag){var nt=arguments[0],at=null,wt=null,lo=null,fo=null,vo=null,ls=null,ff=null,mf=null;wt=(vo=this._hi/nt._hi)-(at=(ls=ag.SPLIT*vo)-(at=ls-vo)),mf=at*(lo=(mf=ag.SPLIT*nt._hi)-(lo=mf-nt._hi))-(ff=vo*nt._hi)+at*(fo=nt._hi-lo)+wt*lo+wt*fo;var bf=mf=vo+(ls=(this._hi-ff-mf+this._lo-vo*nt._lo)/nt._hi),Sf=vo-mf+ls;return new ag(bf,Sf)}if(typeof arguments[0]=="number"){var wf=arguments[0];return dm.isNaN(wf)?ag.createNaN():ag.copy(this).selfDivide(wf,0)}},ag.prototype.ge=function(nt){return(this._hi>nt._hi||this._hi===nt._hi)&&this._lo>=nt._lo},ag.prototype.pow=function(nt){if(nt===0)return ag.valueOf(1);var at=new ag(this),wt=ag.valueOf(1),lo=Math.abs(nt);if(lo>1)for(;lo>0;)lo%2==1&&wt.selfMultiply(at),(lo/=2)>0&&(at=at.sqr());else wt=at;return nt<0?wt.reciprocal():wt},ag.prototype.ceil=function(){if(this.isNaN())return ag.NaN;var nt=Math.ceil(this._hi),at=0;return nt===this._hi&&(at=Math.ceil(this._lo)),new ag(nt,at)},ag.prototype.compareTo=function(nt){var at=nt;return this._hiat._hi?1:this._loat._lo?1:0},ag.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},ag.prototype.setValue=function(){if(arguments[0]instanceof ag){var nt=arguments[0];return this.init(nt),this}if(typeof arguments[0]=="number"){var at=arguments[0];return this.init(at),this}},ag.prototype.max=function(nt){return this.ge(nt)?this:nt},ag.prototype.sqrt=function(){if(this.isZero())return ag.valueOf(0);if(this.isNegative())return ag.NaN;var nt=1/Math.sqrt(this._hi),at=this._hi*nt,wt=ag.valueOf(at),lo=this.subtract(wt.sqr())._hi*(.5*nt);return wt.add(lo)},ag.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof ag){var nt=arguments[0];return this.selfAdd(nt._hi,nt._lo)}if(typeof arguments[0]=="number"){var at=arguments[0],wt=null,lo=null,fo=null,vo=null,ls=null,ff=null;return vo=(fo=this._hi+at)-(ls=fo-this._hi),lo=(ff=(vo=at-ls+(this._hi-vo))+this._lo)+(fo-(wt=fo+ff)),this._hi=wt+lo,this._lo=lo+(wt-this._hi),this}}else if(arguments.length===2){var mf=arguments[0],bf=arguments[1],Sf=null,wf=null,If=null,jf=null,zf=null,Wf=null,Mf=null;jf=this._hi+mf,wf=this._lo+bf,zf=jf-(Wf=jf-this._hi),If=wf-(Mf=wf-this._lo);var np=(Sf=jf+(Wf=(zf=mf-Wf+(this._hi-zf))+wf))+(Wf=(If=bf-Mf+(this._lo-If))+(Wf+(jf-Sf))),pp=Wf+(Sf-np);return this._hi=np,this._lo=pp,this}},ag.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof ag){var nt=arguments[0];return this.selfMultiply(nt._hi,nt._lo)}if(typeof arguments[0]=="number"){var at=arguments[0];return this.selfMultiply(at,0)}}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1],fo=null,vo=null,ls=null,ff=null,mf=null,bf=null;fo=(mf=ag.SPLIT*this._hi)-this._hi,bf=ag.SPLIT*wt,fo=mf-fo,vo=this._hi-fo,ls=bf-wt;var Sf=(mf=this._hi*wt)+(bf=fo*(ls=bf-ls)-mf+fo*(ff=wt-ls)+vo*ls+vo*ff+(this._hi*lo+this._lo*wt)),wf=bf+(fo=mf-Sf);return this._hi=Sf,this._lo=wf,this}},ag.prototype.selfSqr=function(){return this.selfMultiply(this)},ag.prototype.floor=function(){if(this.isNaN())return ag.NaN;var nt=Math.floor(this._hi),at=0;return nt===this._hi&&(at=Math.floor(this._lo)),new ag(nt,at)},ag.prototype.negate=function(){return this.isNaN()?this:new ag(-this._hi,-this._lo)},ag.prototype.clone=function(){},ag.prototype.multiply=function(){if(arguments[0]instanceof ag){var nt=arguments[0];return nt.isNaN()?ag.createNaN():ag.copy(this).selfMultiply(nt)}if(typeof arguments[0]=="number"){var at=arguments[0];return dm.isNaN(at)?ag.createNaN():ag.copy(this).selfMultiply(at,0)}},ag.prototype.isNaN=function(){return dm.isNaN(this._hi)},ag.prototype.intValue=function(){return Math.trunc(this._hi)},ag.prototype.toString=function(){var nt=ag.magnitude(this._hi);return nt>=-3&&nt<=20?this.toStandardNotation():this.toSciNotation()},ag.prototype.toStandardNotation=function(){var nt=this.getSpecialNumberString();if(nt!==null)return nt;var at=new Array(1).fill(null),wt=this.extractSignificantDigits(!0,at),lo=at[0]+1,fo=wt;if(wt.charAt(0)===".")fo="0"+wt;else if(lo<0)fo="0."+ag.stringOfChar("0",-lo)+wt;else if(wt.indexOf(".")===-1){var vo=lo-wt.length;fo=wt+ag.stringOfChar("0",vo)+".0"}return this.isNegative()?"-"+fo:fo},ag.prototype.reciprocal=function(){var nt,at,wt,lo,fo=null,vo=null,ls=null,ff=null;nt=(wt=1/this._hi)-(fo=(ls=ag.SPLIT*wt)-(fo=ls-wt)),vo=(ff=ag.SPLIT*this._hi)-this._hi;var mf=wt+(ls=(1-(lo=wt*this._hi)-(ff=fo*(vo=ff-vo)-lo+fo*(at=this._hi-vo)+nt*vo+nt*at)-wt*this._lo)/this._hi);return new ag(mf,wt-mf+ls)},ag.prototype.toSciNotation=function(){if(this.isZero())return ag.SCI_NOT_ZERO;var nt=this.getSpecialNumberString();if(nt!==null)return nt;var at=new Array(1).fill(null),wt=this.extractSignificantDigits(!1,at),lo=ag.SCI_NOT_EXPONENT_CHAR+at[0];if(wt.charAt(0)==="0")throw new Error("Found leading zero: "+wt);var fo="";wt.length>1&&(fo=wt.substring(1));var vo=wt.charAt(0)+"."+fo;return this.isNegative()?"-"+vo+lo:vo+lo},ag.prototype.abs=function(){return this.isNaN()?ag.NaN:this.isNegative()?this.negate():new ag(this)},ag.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},ag.prototype.lt=function(nt){return(this._hint._hi||this._hi===nt._hi)&&this._lo>nt._lo},ag.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},ag.prototype.trunc=function(){return this.isNaN()?ag.NaN:this.isPositive()?this.floor():this.ceil()},ag.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},ag.prototype.interfaces_=function(){return[W0,G0,Zx]},ag.prototype.getClass=function(){return ag},ag.sqr=function(nt){return ag.valueOf(nt).selfMultiply(nt)},ag.valueOf=function(){if(typeof arguments[0]=="string"){var nt=arguments[0];return ag.parse(nt)}if(typeof arguments[0]=="number"){var at=arguments[0];return new ag(at)}},ag.sqrt=function(nt){return ag.valueOf(nt).sqrt()},ag.parse=function(nt){for(var at=0,wt=nt.length;Qx.isWhitespace(nt.charAt(at));)at++;var lo=!1;if(at=wt);){var bf=nt.charAt(at);if(at++,Qx.isDigit(bf)){var Sf=bf-"0";vo.selfMultiply(ag.TEN),vo.selfAdd(Sf),ls++}else{if(bf!=="."){if(bf==="e"||bf==="E"){var wf=nt.substring(at);try{mf=R1.parseInt(wf)}catch(Mf){throw Mf instanceof Error?new Error("Invalid exponent "+wf+" in string "+nt):Mf}break}throw new Error("Unexpected character '"+bf+"' at position "+at+" in string "+nt)}ff=ls}}var If=vo,jf=ls-ff-mf;if(jf===0)If=vo;else if(jf>0){var zf=ag.TEN.pow(jf);If=vo.divide(zf)}else if(jf<0){var Wf=ag.TEN.pow(-jf);If=vo.multiply(Wf)}return lo?If.negate():If},ag.createNaN=function(){return new ag(dm.NaN,dm.NaN)},ag.copy=function(nt){return new ag(nt)},ag.magnitude=function(nt){var at=Math.abs(nt),wt=Math.log(at)/Math.log(10),lo=Math.trunc(Math.floor(wt));return 10*Math.pow(10,lo)<=at&&(lo+=1),lo},ag.stringOfChar=function(nt,at){for(var wt=new A1,lo=0;lo0){if(vo<=0)return a0.signum(ls);lo=fo+vo}else{if(!(fo<0)||vo>=0)return a0.signum(ls);lo=-fo-vo}var ff=a0.DP_SAFE_EPSILON*lo;return ls>=ff||-ls>=ff?a0.signum(ls):2},a0.signum=function(nt){return nt>0?1:nt<0?-1:0},Nk.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(a0,Nk);var Vm=function(){},e2={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};e2.X.get=function(){return 0},e2.Y.get=function(){return 1},e2.Z.get=function(){return 2},e2.M.get=function(){return 3},Vm.prototype.setOrdinate=function(nt,at,wt){},Vm.prototype.size=function(){},Vm.prototype.getOrdinate=function(nt,at){},Vm.prototype.getCoordinate=function(){},Vm.prototype.getCoordinateCopy=function(nt){},Vm.prototype.getDimension=function(){},Vm.prototype.getX=function(nt){},Vm.prototype.clone=function(){},Vm.prototype.expandEnvelope=function(nt){},Vm.prototype.copy=function(){},Vm.prototype.getY=function(nt){},Vm.prototype.toCoordinateArray=function(){},Vm.prototype.interfaces_=function(){return[Zx]},Vm.prototype.getClass=function(){return Vm},Object.defineProperties(Vm,e2);var Mk=function(){},F_=function(nt){function at(){nt.call(this,"Projective point not representable on the Cartesian plane.")}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(Mk),Ry=function(){};Ry.arraycopy=function(nt,at,wt,lo,fo){for(var vo=0,ls=at;lsnt._minx?this._minx:nt._minx,wt=this._miny>nt._miny?this._miny:nt._miny,lo=this._maxx=this._minx&&at.getMaxX()<=this._maxx&&at.getMinY()>=this._miny&&at.getMaxY()<=this._maxy}}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1];return!this.isNull()&&wt>=this._minx&&wt<=this._maxx&&lo>=this._miny&&lo<=this._maxy}},Wg.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof Wg){var nt=arguments[0];return!this.isNull()&&!nt.isNull()&&!(nt._minx>this._maxx||nt._maxxthis._maxy||nt._maxythis._maxx||wtthis._maxy||lothis._maxx&&(this._maxx=at._maxx),at._minythis._maxy&&(this._maxy=at._maxy))}}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1];this.isNull()?(this._minx=wt,this._maxx=wt,this._miny=lo,this._maxy=lo):(wtthis._maxx&&(this._maxx=wt),lothis._maxy&&(this._maxy=lo))}},Wg.prototype.minExtent=function(){if(this.isNull())return 0;var nt=this.getWidth(),at=this.getHeight();return ntat._minx?1:this._minyat._miny?1:this._maxxat._maxx?1:this._maxyat._maxy?1:0},Wg.prototype.translate=function(nt,at){if(this.isNull())return null;this.init(this.getMinX()+nt,this.getMaxX()+nt,this.getMinY()+at,this.getMaxY()+at)},Wg.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},Wg.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},Wg.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},Wg.prototype.maxExtent=function(){if(this.isNull())return 0;var nt=this.getWidth(),at=this.getHeight();return nt>at?nt:at},Wg.prototype.expandBy=function(){if(arguments.length===1){var nt=arguments[0];this.expandBy(nt,nt)}else if(arguments.length===2){var at=arguments[0],wt=arguments[1];if(this.isNull())return null;this._minx-=at,this._maxx+=at,this._miny-=wt,this._maxy+=wt,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},Wg.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof Wg){var nt=arguments[0];return this.covers(nt)}if(arguments[0]instanceof Gp){var at=arguments[0];return this.covers(at)}}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1];return this.covers(wt,lo)}},Wg.prototype.centre=function(){return this.isNull()?null:new Gp((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},Wg.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof Gp){var nt=arguments[0];this.init(nt.x,nt.x,nt.y,nt.y)}else if(arguments[0]instanceof Wg){var at=arguments[0];this._minx=at._minx,this._maxx=at._maxx,this._miny=at._miny,this._maxy=at._maxy}}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1];this.init(wt.x,lo.x,wt.y,lo.y)}else if(arguments.length===4){var fo=arguments[0],vo=arguments[1],ls=arguments[2],ff=arguments[3];font._maxx&&(at=this._minx-nt._maxx);var wt=0;return this._maxynt._maxy&&(wt=this._miny-nt._maxy),at===0?wt:wt===0?at:Math.sqrt(at*at+wt*wt)},Wg.prototype.hashCode=function(){var nt=17;return nt=37*(nt=37*(nt=37*(nt=37*nt+Gp.hashCode(this._minx))+Gp.hashCode(this._maxx))+Gp.hashCode(this._miny))+Gp.hashCode(this._maxy)},Wg.prototype.interfaces_=function(){return[G0,W0]},Wg.prototype.getClass=function(){return Wg},Wg.intersects=function(){if(arguments.length===3){var nt=arguments[0],at=arguments[1],wt=arguments[2];return wt.x>=(nt.xat.x?nt.x:at.x)&&wt.y>=(nt.yat.y?nt.y:at.y)}if(arguments.length===4){var lo=arguments[0],fo=arguments[1],vo=arguments[2],ls=arguments[3],ff=Math.min(vo.x,ls.x),mf=Math.max(vo.x,ls.x),bf=Math.min(lo.x,fo.x),Sf=Math.max(lo.x,fo.x);return!(bf>mf)&&!(Sfmf)&&!(Sfwt?(this._intLineIndex[nt][0]=0,this._intLineIndex[nt][1]=1):(this._intLineIndex[nt][0]=1,this._intLineIndex[nt][1]=0)}},Rv.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},Rv.prototype.setPrecisionModel=function(nt){this._precisionModel=nt},Rv.prototype.isInteriorIntersection=function(){var nt=this;if(arguments.length===0)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(arguments.length===1){for(var at=arguments[0],wt=0;wtfo?lo:fo;else{var ls=Math.abs(nt.x-at.x),ff=Math.abs(nt.y-at.y);(vo=lo>fo?ls:ff)!==0||nt.equals(at)||(vo=Math.max(ls,ff))}return ym.isTrue(!(vo===0&&!nt.equals(at)),"Bad distance calculation"),vo},Rv.nonRobustComputeEdgeDistance=function(nt,at,wt){var lo=nt.x-at.x,fo=nt.y-at.y,vo=Math.sqrt(lo*lo+fo*fo);return ym.isTrue(!(vo===0&&!nt.equals(at)),"Invalid distance calculation"),vo},B_.DONT_INTERSECT.get=function(){return 0},B_.DO_INTERSECT.get=function(){return 1},B_.COLLINEAR.get=function(){return 2},B_.NO_INTERSECTION.get=function(){return 0},B_.POINT_INTERSECTION.get=function(){return 1},B_.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(Rv,B_);var y$=function(nt){function at(){nt.apply(this,arguments)}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.isInSegmentEnvelopes=function(wt){var lo=new Wg(this._inputLines[0][0],this._inputLines[0][1]),fo=new Wg(this._inputLines[1][0],this._inputLines[1][1]);return lo.contains(wt)&&fo.contains(wt)},at.prototype.computeIntersection=function(){if(arguments.length!==3)return nt.prototype.computeIntersection.apply(this,arguments);var wt=arguments[0],lo=arguments[1],fo=arguments[2];if(this._isProper=!1,Wg.intersects(lo,fo,wt)&&Og.orientationIndex(lo,fo,wt)===0&&Og.orientationIndex(fo,lo,wt)===0)return this._isProper=!0,(wt.equals(lo)||wt.equals(fo))&&(this._isProper=!1),this._result=nt.POINT_INTERSECTION,null;this._result=nt.NO_INTERSECTION},at.prototype.normalizeToMinimum=function(wt,lo,fo,vo,ls){ls.x=this.smallestInAbsValue(wt.x,lo.x,fo.x,vo.x),ls.y=this.smallestInAbsValue(wt.y,lo.y,fo.y,vo.y),wt.x-=ls.x,wt.y-=ls.y,lo.x-=ls.x,lo.y-=ls.y,fo.x-=ls.x,fo.y-=ls.y,vo.x-=ls.x,vo.y-=ls.y},at.prototype.safeHCoordinateIntersection=function(wt,lo,fo,vo){var ls=null;try{ls=q0.intersection(wt,lo,fo,vo)}catch(ff){if(!(ff instanceof F_))throw ff;ls=at.nearestEndpoint(wt,lo,fo,vo)}return ls},at.prototype.intersection=function(wt,lo,fo,vo){var ls=this.intersectionWithNormalization(wt,lo,fo,vo);return this.isInSegmentEnvelopes(ls)||(ls=new Gp(at.nearestEndpoint(wt,lo,fo,vo))),this._precisionModel!==null&&this._precisionModel.makePrecise(ls),ls},at.prototype.smallestInAbsValue=function(wt,lo,fo,vo){var ls=wt,ff=Math.abs(ls);return Math.abs(lo)1e-4&&Ry.out.println("Distance = "+ls.distance(ff))},at.prototype.intersectionWithNormalization=function(wt,lo,fo,vo){var ls=new Gp(wt),ff=new Gp(lo),mf=new Gp(fo),bf=new Gp(vo),Sf=new Gp;this.normalizeToEnvCentre(ls,ff,mf,bf,Sf);var wf=this.safeHCoordinateIntersection(ls,ff,mf,bf);return wf.x+=Sf.x,wf.y+=Sf.y,wf},at.prototype.computeCollinearIntersection=function(wt,lo,fo,vo){var ls=Wg.intersects(wt,lo,fo),ff=Wg.intersects(wt,lo,vo),mf=Wg.intersects(fo,vo,wt),bf=Wg.intersects(fo,vo,lo);return ls&&ff?(this._intPt[0]=fo,this._intPt[1]=vo,nt.COLLINEAR_INTERSECTION):mf&&bf?(this._intPt[0]=wt,this._intPt[1]=lo,nt.COLLINEAR_INTERSECTION):ls&&mf?(this._intPt[0]=fo,this._intPt[1]=wt,!fo.equals(wt)||ff||bf?nt.COLLINEAR_INTERSECTION:nt.POINT_INTERSECTION):ls&&bf?(this._intPt[0]=fo,this._intPt[1]=lo,!fo.equals(lo)||ff||mf?nt.COLLINEAR_INTERSECTION:nt.POINT_INTERSECTION):ff&&mf?(this._intPt[0]=vo,this._intPt[1]=wt,!vo.equals(wt)||ls||bf?nt.COLLINEAR_INTERSECTION:nt.POINT_INTERSECTION):ff&&bf?(this._intPt[0]=vo,this._intPt[1]=lo,!vo.equals(lo)||ls||mf?nt.COLLINEAR_INTERSECTION:nt.POINT_INTERSECTION):nt.NO_INTERSECTION},at.prototype.normalizeToEnvCentre=function(wt,lo,fo,vo,ls){var ff=wt.xlo.x?wt.x:lo.x,Sf=wt.y>lo.y?wt.y:lo.y,wf=fo.xvo.x?fo.x:vo.x,zf=fo.y>vo.y?fo.y:vo.y,Wf=((ff>wf?ff:wf)+(bfIf?mf:If)+(Sf0&&ff>0||ls<0&&ff<0)return nt.NO_INTERSECTION;var mf=Og.orientationIndex(fo,vo,wt),bf=Og.orientationIndex(fo,vo,lo);return mf>0&&bf>0||mf<0&&bf<0?nt.NO_INTERSECTION:ls===0&&ff===0&&mf===0&&bf===0?this.computeCollinearIntersection(wt,lo,fo,vo):(ls===0||ff===0||mf===0||bf===0?(this._isProper=!1,wt.equals2D(fo)||wt.equals2D(vo)?this._intPt[0]=wt:lo.equals2D(fo)||lo.equals2D(vo)?this._intPt[0]=lo:ls===0?this._intPt[0]=new Gp(fo):ff===0?this._intPt[0]=new Gp(vo):mf===0?this._intPt[0]=new Gp(wt):bf===0&&(this._intPt[0]=new Gp(lo))):(this._isProper=!0,this._intPt[0]=this.intersection(wt,lo,fo,vo)),nt.POINT_INTERSECTION)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.nearestEndpoint=function(wt,lo,fo,vo){var ls=wt,ff=Og.distancePointLine(wt,fo,vo),mf=Og.distancePointLine(lo,fo,vo);return mf0?wt>0?-fo:fo:wt>0?fo:-fo;if(at===0||wt===0)return lo>0?nt>0?fo:-fo:nt>0?-fo:fo;if(at>0?lo>0?at<=lo||(fo=-fo,vo=nt,nt=wt,wt=vo,vo=at,at=lo,lo=vo):at<=-lo?(fo=-fo,wt=-wt,lo=-lo):(vo=nt,nt=-wt,wt=vo,vo=at,at=-lo,lo=vo):lo>0?-at<=lo?(fo=-fo,nt=-nt,at=-at):(vo=-nt,nt=wt,wt=vo,vo=-at,at=lo,lo=vo):at>=lo?(nt=-nt,at=-at,wt=-wt,lo=-lo):(fo=-fo,vo=-nt,nt=-wt,wt=vo,vo=-at,at=-lo,lo=vo),nt>0){if(!(wt>0)||!(nt<=wt))return fo}else{if(wt>0||!(nt>=wt))return-fo;fo=-fo,nt=-nt,wt=-wt}for(;;){if((lo-=(ls=Math.floor(wt/nt))*at)<0)return-fo;if(lo>at)return fo;if(nt>(wt-=ls*nt)+wt){if(atlo+lo)return-fo;wt=nt-wt,lo=at-lo,fo=-fo}if(lo===0)return wt===0?0:-fo;if(wt===0||(at-=(ls=Math.floor(nt/wt))*lo)<0)return fo;if(at>lo)return-fo;if(wt>(nt-=ls*wt)+nt){if(loat+at)return fo;nt=wt-nt,at=lo-at,fo=-fo}if(at===0)return nt===0?0:fo;if(nt===0)return-fo}};var M1=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var nt=arguments[0];this._p=nt};M1.prototype.countSegment=function(nt,at){if(nt.xlo&&(wt=at.x,lo=nt.x),this._p.x>=wt&&this._p.x<=lo&&(this._isPointOnSegment=!0),null}if(nt.y>this._p.y&&at.y<=this._p.y||at.y>this._p.y&&nt.y<=this._p.y){var fo=nt.x-this._p.x,vo=nt.y-this._p.y,ls=at.x-this._p.x,ff=at.y-this._p.y,mf=j_.signOfDet2x2(fo,vo,ls,ff);if(mf===0)return this._isPointOnSegment=!0,null;ff0&&this._crossingCount++}},M1.prototype.isPointInPolygon=function(){return this.getLocation()!==eg.EXTERIOR},M1.prototype.getLocation=function(){return this._isPointOnSegment?eg.BOUNDARY:this._crossingCount%2==1?eg.INTERIOR:eg.EXTERIOR},M1.prototype.isOnSegment=function(){return this._isPointOnSegment},M1.prototype.interfaces_=function(){return[]},M1.prototype.getClass=function(){return M1},M1.locatePointInRing=function(){if(arguments[0]instanceof Gp&&nm(arguments[1],Vm)){for(var nt=arguments[0],at=arguments[1],wt=new M1(nt),lo=new Gp,fo=new Gp,vo=1;vo1||ff<0||ff>1)&&(fo=!0)}}else fo=!0;return fo?A0.min(Og.distancePointLine(nt,wt,lo),Og.distancePointLine(at,wt,lo),Og.distancePointLine(wt,nt,at),Og.distancePointLine(lo,nt,at)):0},Og.isPointInRing=function(nt,at){return Og.locatePointInRing(nt,at)!==eg.EXTERIOR},Og.computeLength=function(nt){var at=nt.size();if(at<=1)return 0;var wt=0,lo=new Gp;nt.getCoordinate(0,lo);for(var fo=lo.x,vo=lo.y,ls=1;lswt.y&&(wt=vo,lo=fo)}var ls=lo;do(ls-=1)<0&&(ls=at);while(nt[ls].equals2D(wt)&&ls!==lo);var ff=lo;do ff=(ff+1)%at;while(nt[ff].equals2D(wt)&&ff!==lo);var mf=nt[ls],bf=nt[ff];if(mf.equals2D(wt)||bf.equals2D(wt)||mf.equals2D(bf))return!1;var Sf=Og.computeOrientation(mf,wt,bf),wf=!1;return wf=Sf===0?mf.x>bf.x:Sf>0,wf},Og.locatePointInRing=function(nt,at){return M1.locatePointInRing(nt,at)},Og.distancePointLinePerpendicular=function(nt,at,wt){var lo=(wt.x-at.x)*(wt.x-at.x)+(wt.y-at.y)*(wt.y-at.y),fo=((at.y-nt.y)*(wt.x-at.x)-(at.x-nt.x)*(wt.y-at.y))/lo;return Math.abs(fo)*Math.sqrt(lo)},Og.computeOrientation=function(nt,at,wt){return Og.orientationIndex(nt,at,wt)},Og.distancePointLine=function(){if(arguments.length===2){var nt=arguments[0],at=arguments[1];if(at.length===0)throw new Pv("Line array must contain at least one vertex");for(var wt=nt.distance(at[0]),lo=0;lo=1)return vo.distance(ff);var Sf=((ls.y-vo.y)*(ff.x-ls.x)-(ls.x-vo.x)*(ff.y-ls.y))/mf;return Math.abs(Sf)*Math.sqrt(mf)}},Og.isOnLine=function(nt,at){for(var wt=new y$,lo=1;lo0},H_.prototype.interfaces_=function(){return[Y0]},H_.prototype.getClass=function(){return H_};var Gw=function(){};Gw.prototype.isInBoundary=function(nt){return nt>1},Gw.prototype.interfaces_=function(){return[Y0]},Gw.prototype.getClass=function(){return Gw};var Ww=function(){};Ww.prototype.isInBoundary=function(nt){return nt===1},Ww.prototype.interfaces_=function(){return[Y0]},Ww.prototype.getClass=function(){return Ww};var iy=function(){};function GS(nt){this.message=nt||""}iy.prototype.add=function(){},iy.prototype.addAll=function(){},iy.prototype.isEmpty=function(){},iy.prototype.iterator=function(){},iy.prototype.size=function(){},iy.prototype.toArray=function(){},iy.prototype.remove=function(){},GS.prototype=new Error,GS.prototype.name="IndexOutOfBoundsException";var qw=function(){};qw.prototype.hasNext=function(){},qw.prototype.next=function(){},qw.prototype.remove=function(){};var u1=function(nt){function at(){nt.apply(this,arguments)}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.get=function(){},at.prototype.set=function(){},at.prototype.isEmpty=function(){},at}(iy);function U_(nt){this.message=nt||""}U_.prototype=new Error,U_.prototype.name="NoSuchElementException";var Sg=function(nt){function at(){nt.call(this),this.array_=[],arguments[0]instanceof iy&&this.addAll(arguments[0])}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.ensureCapacity=function(){},at.prototype.interfaces_=function(){return[nt,iy]},at.prototype.add=function(wt){return arguments.length===1?this.array_.push(wt):this.array_.splice(arguments[0],arguments[1]),!0},at.prototype.clear=function(){this.array_=[]},at.prototype.addAll=function(wt){for(var lo=wt.iterator();lo.hasNext();)this.add(lo.next());return!0},at.prototype.set=function(wt,lo){var fo=this.array_[wt];return this.array_[wt]=lo,fo},at.prototype.iterator=function(){return new Lk(this)},at.prototype.get=function(wt){if(wt<0||wt>=this.size())throw new GS;return this.array_[wt]},at.prototype.isEmpty=function(){return this.array_.length===0},at.prototype.size=function(){return this.array_.length},at.prototype.toArray=function(){for(var wt=[],lo=0,fo=this.array_.length;lo=1){var bf=this.get(this.size()-1);if(bf.equals2D(ff))return null}nt.prototype.add.call(this,ff)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var Sf=arguments[0],wf=arguments[1];return this.add(Sf,wf),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var If=arguments[0],jf=arguments[1],zf=arguments[2];if(zf)for(var Wf=0;Wf=0;Mf--)lo.add(If[Mf],jf);return!0}if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof Gp){var np=arguments[0],pp=arguments[1],Uf=arguments[2];if(!Uf){var tp=this.size();if(tp>0){if(np>0){var op=this.get(np-1);if(op.equals2D(pp))return null}if(nprg&&(zp=-1);for(var lg=Ap;lg!==rg;lg+=zp)lo.add(sp[lg],Qp);return!0}},at.prototype.closeRing=function(){this.size()>0&&this.add(new Gp(this.get(0)),!1)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},Object.defineProperties(at,wt),at}(Sg),Cm=function(){},dE={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};dE.ForwardComparator.get=function(){return n2},dE.BidirectionalComparator.get=function(){return V_},dE.coordArrayType.get=function(){return new Array(0).fill(null)},Cm.prototype.interfaces_=function(){return[]},Cm.prototype.getClass=function(){return Cm},Cm.isRing=function(nt){return!(nt.length<4)&&!!nt[0].equals2D(nt[nt.length-1])},Cm.ptNotInList=function(nt,at){for(var wt=0;wt=nt?at:[]},Cm.indexOf=function(nt,at){for(var wt=0;wt0)&&(at=nt[wt]);return at},Cm.extract=function(nt,at,wt){at=A0.clamp(at,0,nt.length);var lo=(wt=A0.clamp(wt,-1,nt.length))-at+1;wt<0&&(lo=0),at>=nt.length&&(lo=0),wtlo.length)return 1;if(wt.length===0)return 0;var fo=Cm.compare(wt,lo);return Cm.isEqualReversed(wt,lo)?0:fo},V_.prototype.OLDcompare=function(nt,at){var wt=nt,lo=at;if(wt.lengthlo.length)return 1;if(wt.length===0)return 0;for(var fo=Cm.increasingDirection(wt),vo=Cm.increasingDirection(lo),ls=fo>0?0:wt.length-1,ff=vo>0?0:wt.length-1,mf=0;mf0))return at.value;at=at.right}}return null},Hy.prototype.put=function(nt,at){if(this.root_===null)return this.root_={key:nt,value:at,left:null,right:null,parent:null,color:0,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var wt,lo,fo=this.root_;do if(wt=fo,(lo=nt.compareTo(fo.key))<0)fo=fo.left;else{if(!(lo>0)){var vo=fo.value;return fo.value=at,vo}fo=fo.right}while(fo!==null);var ls={key:nt,left:null,right:null,value:at,parent:wt,color:0,getValue:function(){return this.value},getKey:function(){return this.key}};return lo<0?wt.left=ls:wt.right=ls,this.fixAfterInsertion(ls),this.size_++,null},Hy.prototype.fixAfterInsertion=function(nt){var at=this;for(nt.color=1;nt!=null&&nt!==this.root_&&nt.parent.color===1;)if($v(nt)===WS($v($v(nt)))){var wt=jk($v($v(nt)));Bk(wt)===1?(Mb($v(nt),0),Mb(wt,0),Mb($v($v(nt)),1),nt=$v($v(nt))):(nt===jk($v(nt))&&(nt=$v(nt),at.rotateLeft(nt)),Mb($v(nt),0),Mb($v($v(nt)),1),at.rotateRight($v($v(nt))))}else{var lo=WS($v($v(nt)));Bk(lo)===1?(Mb($v(nt),0),Mb(lo,0),Mb($v($v(nt)),1),nt=$v($v(nt))):(nt===WS($v(nt))&&(nt=$v(nt),at.rotateRight(nt)),Mb($v(nt),0),Mb($v($v(nt)),1),at.rotateLeft($v($v(nt))))}this.root_.color=0},Hy.prototype.values=function(){var nt=new Sg,at=this.getFirstEntry();if(at!==null)for(nt.add(at.value);(at=Hy.successor(at))!==null;)nt.add(at.value);return nt},Hy.prototype.entrySet=function(){var nt=new pE,at=this.getFirstEntry();if(at!==null)for(nt.add(at);(at=Hy.successor(at))!==null;)nt.add(at);return nt},Hy.prototype.rotateLeft=function(nt){if(nt!=null){var at=nt.right;nt.right=at.left,at.left!=null&&(at.left.parent=nt),at.parent=nt.parent,nt.parent===null?this.root_=at:nt.parent.left===nt?nt.parent.left=at:nt.parent.right=at,at.left=nt,nt.parent=at}},Hy.prototype.rotateRight=function(nt){if(nt!=null){var at=nt.left;nt.left=at.right,at.right!=null&&(at.right.parent=nt),at.parent=nt.parent,nt.parent===null?this.root_=at:nt.parent.right===nt?nt.parent.right=at:nt.parent.left=at,at.right=nt,nt.parent=at}},Hy.prototype.getFirstEntry=function(){var nt=this.root_;if(nt!=null)for(;nt.left!=null;)nt=nt.left;return nt},Hy.successor=function(nt){if(nt===null)return null;if(nt.right!==null){for(var at=nt.right;at.left!==null;)at=at.left;return at}for(var wt=nt.parent,lo=nt;wt!==null&&lo===wt.right;)lo=wt,wt=wt.parent;return wt},Hy.prototype.size=function(){return this.size_};var Kw=function(){};function zk(){}function h1(){this.array_=[],arguments[0]instanceof iy&&this.addAll(arguments[0])}Kw.prototype.interfaces_=function(){return[]},Kw.prototype.getClass=function(){return Kw},zk.prototype=new fE,h1.prototype=new zk,h1.prototype.contains=function(nt){for(var at=0,wt=this.array_.length;at=0;){var ls=fo.substring(0,vo);lo.add(ls),vo=(fo=fo.substring(vo+wt)).indexOf(at)}fo.length>0&&lo.add(fo);for(var ff=new Array(lo.size()).fill(null),mf=0;mf0)for(var vo=fo;vo0&&lo.append(" ");for(var vo=0;vo0&&lo.append(","),lo.append(X0.toString(nt.getOrdinate(fo,vo)))}return lo.append(")"),lo.toString()}},Hv.ensureValidRing=function(nt,at){var wt=at.size();return wt===0?at:wt<=3?Hv.createClosedRing(nt,at,4):at.getOrdinate(0,Vm.X)===at.getOrdinate(wt-1,Vm.X)&&at.getOrdinate(0,Vm.Y)===at.getOrdinate(wt-1,Vm.Y)?at:Hv.createClosedRing(nt,at,wt+1)},Hv.createClosedRing=function(nt,at,wt){var lo=nt.create(wt,at.getDimension()),fo=at.size();Hv.copy(at,0,lo,0,fo);for(var vo=fo;vo0&&Hv.reverse(lo._points),null}},at.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},at.prototype.getBoundaryDimension=function(){return this.isClosed()?iv.FALSE:0},at.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},at.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},at.prototype.getDimension=function(){return 1},at.prototype.getLength=function(){return Og.computeLength(this._points)},at.prototype.getNumPoints=function(){return this._points.size()},at.prototype.reverse=function(){var lo=this._points.copy();return Hv.reverse(lo),this.getFactory().createLineString(lo)},at.prototype.compareToSameClass=function(){var lo=this;if(arguments.length===1){for(var fo=arguments[0],vo=fo,ls=0,ff=0;ls= 2)");this._points=lo},at.prototype.isCoordinate=function(lo){for(var fo=0;fo=1&&this.getCoordinateSequence().size()= 4)")},at.prototype.getGeometryType=function(){return"LinearRing"},at.prototype.copy=function(){return new at(this._points.copy(),this._factory)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},wt.MINIMUM_VALID_SIZE.get=function(){return 4},wt.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(at,wt),at}(Av),db=function(nt){function at(){nt.apply(this,arguments)}nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at;var wt={serialVersionUID:{configurable:!0}};return at.prototype.getSortIndex=function(){return tm.SORTINDEX_MULTIPOLYGON},at.prototype.equalsExact=function(){if(arguments.length===2){var lo=arguments[0],fo=arguments[1];return!!this.isEquivalentClass(lo)&&nt.prototype.equalsExact.call(this,lo,fo)}return nt.prototype.equalsExact.apply(this,arguments)},at.prototype.getBoundaryDimension=function(){return 1},at.prototype.getDimension=function(){return 2},at.prototype.reverse=function(){for(var lo=this._geometries.length,fo=new Array(lo).fill(null),vo=0;vo0?at.createPoint(wt[0]):at.createPoint():nt},o2.prototype.interfaces_=function(){return[Z0.GeometryEditorOperation]},o2.prototype.getClass=function(){return o2};var a2=function(){};a2.prototype.edit=function(nt,at){return nt instanceof hb?at.createLinearRing(this.edit(nt.getCoordinateSequence(),nt)):nt instanceof Av?at.createLineString(this.edit(nt.getCoordinateSequence(),nt)):nt instanceof x0?at.createPoint(this.edit(nt.getCoordinateSequence(),nt)):nt},a2.prototype.interfaces_=function(){return[Z0.GeometryEditorOperation]},a2.prototype.getClass=function(){return a2};var Uv=function(){var nt=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var at=arguments[0];this._coordinates=new Array(at).fill(null);for(var wt=0;wt0){var nt=new A1(17*this._coordinates.length);nt.append("("),nt.append(this._coordinates[0]);for(var at=1;at3&&(lo=3),lo<2?new Uv(wt):new Uv(wt,lo)}},fb.prototype.interfaces_=function(){return[Hw,W0]},fb.prototype.getClass=function(){return fb},fb.instance=function(){return fb.instanceObject},YS.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},YS.instanceObject.get=function(){return new fb},Object.defineProperties(fb,YS);var Gk=function(nt){function at(){nt.call(this),this.map_=new Map}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.get=function(wt){return this.map_.get(wt)||null},at.prototype.put=function(wt,lo){return this.map_.set(wt,lo),lo},at.prototype.values=function(){for(var wt=new Sg,lo=this.map_.values(),fo=lo.next();!fo.done;)wt.add(fo.value),fo=lo.next();return wt},at.prototype.entrySet=function(){var wt=new pE;return this.map_.entries().forEach(function(lo){return wt.add(lo)}),wt},at.prototype.size=function(){return this.map_.size()},at}(G_),cv=function nt(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=nt.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof p1){var at=arguments[0];this._modelType=at,at===nt.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var wt=arguments[0];this._modelType=nt.FIXED,this.setScale(wt)}else if(arguments[0]instanceof nt){var lo=arguments[0];this._modelType=lo._modelType,this._scale=lo._scale}}},KS={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};cv.prototype.equals=function(nt){if(!(nt instanceof cv))return!1;var at=nt;return this._modelType===at._modelType&&this._scale===at._scale},cv.prototype.compareTo=function(nt){var at=nt,wt=this.getMaximumSignificantDigits(),lo=at.getMaximumSignificantDigits();return new R1(wt).compareTo(new R1(lo))},cv.prototype.getScale=function(){return this._scale},cv.prototype.isFloating=function(){return this._modelType===cv.FLOATING||this._modelType===cv.FLOATING_SINGLE},cv.prototype.getType=function(){return this._modelType},cv.prototype.toString=function(){var nt="UNKNOWN";return this._modelType===cv.FLOATING?nt="Floating":this._modelType===cv.FLOATING_SINGLE?nt="Floating-Single":this._modelType===cv.FIXED&&(nt="Fixed (Scale="+this.getScale()+")"),nt},cv.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var nt=arguments[0];return dm.isNaN(nt)||this._modelType===cv.FLOATING_SINGLE?nt:this._modelType===cv.FIXED?Math.round(nt*this._scale)/this._scale:nt}if(arguments[0]instanceof Gp){var at=arguments[0];if(this._modelType===cv.FLOATING)return null;at.x=this.makePrecise(at.x),at.y=this.makePrecise(at.y)}},cv.prototype.getMaximumSignificantDigits=function(){var nt=16;return this._modelType===cv.FLOATING?nt=16:this._modelType===cv.FLOATING_SINGLE?nt=6:this._modelType===cv.FIXED&&(nt=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),nt},cv.prototype.setScale=function(nt){this._scale=Math.abs(nt)},cv.prototype.interfaces_=function(){return[W0,G0]},cv.prototype.getClass=function(){return cv},cv.mostPrecise=function(nt,at){return nt.compareTo(at)>=0?nt:at},KS.serialVersionUID.get=function(){return 7777263578777804e3},KS.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(cv,KS);var p1=function nt(at){this._name=at||null,nt.nameToTypeMap.put(at,this)},s2={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};p1.prototype.readResolve=function(){return p1.nameToTypeMap.get(this._name)},p1.prototype.toString=function(){return this._name},p1.prototype.interfaces_=function(){return[W0]},p1.prototype.getClass=function(){return p1},s2.serialVersionUID.get=function(){return-552860263173159e4},s2.nameToTypeMap.get=function(){return new Gk},Object.defineProperties(p1,s2),cv.Type=p1,cv.FIXED=new p1("FIXED"),cv.FLOATING=new p1("FLOATING"),cv.FLOATING_SINGLE=new p1("FLOATING SINGLE");var Om=function nt(){this._precisionModel=new cv,this._SRID=0,this._coordinateSequenceFactory=nt.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?nm(arguments[0],Hw)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof cv&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},Wk={serialVersionUID:{configurable:!0}};Om.prototype.toGeometry=function(nt){return nt.isNull()?this.createPoint(null):nt.getMinX()===nt.getMaxX()&&nt.getMinY()===nt.getMaxY()?this.createPoint(new Gp(nt.getMinX(),nt.getMinY())):nt.getMinX()===nt.getMaxX()||nt.getMinY()===nt.getMaxY()?this.createLineString([new Gp(nt.getMinX(),nt.getMinY()),new Gp(nt.getMaxX(),nt.getMaxY())]):this.createPolygon(this.createLinearRing([new Gp(nt.getMinX(),nt.getMinY()),new Gp(nt.getMinX(),nt.getMaxY()),new Gp(nt.getMaxX(),nt.getMaxY()),new Gp(nt.getMaxX(),nt.getMinY()),new Gp(nt.getMinX(),nt.getMinY())]),null)},Om.prototype.createLineString=function(nt){return nt?nt instanceof Array?new Av(this.getCoordinateSequenceFactory().create(nt),this):nm(nt,Vm)?new Av(nt,this):void 0:new Av(this.getCoordinateSequenceFactory().create([]),this)},Om.prototype.createMultiLineString=function(){if(arguments.length===0)return new b$(null,this);if(arguments.length===1){var nt=arguments[0];return new b$(nt,this)}},Om.prototype.buildGeometry=function(nt){for(var at=null,wt=!1,lo=!1,fo=nt.iterator();fo.hasNext();){var vo=fo.next(),ls=vo.getClass();at===null&&(at=ls),ls!==at&&(wt=!0),vo.isGeometryCollectionOrDerived()&&(lo=!0)}if(at===null)return this.createGeometryCollection();if(wt||lo)return this.createGeometryCollection(Om.toGeometryArray(nt));var ff=nt.iterator().next();if(nt.size()>1){if(ff instanceof oy)return this.createMultiPolygon(Om.toPolygonArray(nt));if(ff instanceof Av)return this.createMultiLineString(Om.toLineStringArray(nt));if(ff instanceof x0)return this.createMultiPoint(Om.toPointArray(nt));ym.shouldNeverReachHere("Unhandled class: "+ff.getClass().getName())}return ff},Om.prototype.createMultiPointFromCoords=function(nt){return this.createMultiPoint(nt!==null?this.getCoordinateSequenceFactory().create(nt):null)},Om.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Gp){var nt=arguments[0];return this.createPoint(nt!==null?this.getCoordinateSequenceFactory().create([nt]):null)}if(nm(arguments[0],Vm)){var at=arguments[0];return new x0(at,this)}}},Om.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},Om.prototype.createPolygon=function(){if(arguments.length===0)return new oy(null,null,this);if(arguments.length===1){if(nm(arguments[0],Vm)){var nt=arguments[0];return this.createPolygon(this.createLinearRing(nt))}if(arguments[0]instanceof Array){var at=arguments[0];return this.createPolygon(this.createLinearRing(at))}if(arguments[0]instanceof hb){var wt=arguments[0];return this.createPolygon(wt,null)}}else if(arguments.length===2){var lo=arguments[0],fo=arguments[1];return new oy(lo,fo,this)}},Om.prototype.getSRID=function(){return this._SRID},Om.prototype.createGeometryCollection=function(){if(arguments.length===0)return new Zy(null,this);if(arguments.length===1){var nt=arguments[0];return new Zy(nt,this)}},Om.prototype.createGeometry=function(nt){return new Z0(this).edit(nt,{edit:function(){if(arguments.length===2){var at=arguments[0];return this._coordinateSequenceFactory.create(at)}}})},Om.prototype.getPrecisionModel=function(){return this._precisionModel},Om.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var nt=arguments[0];return this.createLinearRing(nt!==null?this.getCoordinateSequenceFactory().create(nt):null)}if(nm(arguments[0],Vm)){var at=arguments[0];return new hb(at,this)}}},Om.prototype.createMultiPolygon=function(){if(arguments.length===0)return new db(null,this);if(arguments.length===1){var nt=arguments[0];return new db(nt,this)}},Om.prototype.createMultiPoint=function(){var nt=this;if(arguments.length===0)return new Zw(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var at=arguments[0];return new Zw(at,this)}if(arguments[0]instanceof Array){var wt=arguments[0];return this.createMultiPoint(wt!==null?this.getCoordinateSequenceFactory().create(wt):null)}if(nm(arguments[0],Vm)){var lo=arguments[0];if(lo===null)return this.createMultiPoint(new Array(0).fill(null));for(var fo=new Array(lo.size()).fill(null),vo=0;vo=this.size())throw new Error;return this.array_[nt]},F1.prototype.push=function(nt){return this.array_.push(nt),nt},F1.prototype.pop=function(nt){if(this.array_.length===0)throw new yE;return this.array_.pop()},F1.prototype.peek=function(){if(this.array_.length===0)throw new yE;return this.array_[this.array_.length-1]},F1.prototype.empty=function(){return this.array_.length===0},F1.prototype.isEmpty=function(){return this.empty()},F1.prototype.search=function(nt){return this.array_.indexOf(nt)},F1.prototype.size=function(){return this.array_.length},F1.prototype.toArray=function(){for(var nt=[],at=0,wt=this.array_.length;at0&&this._minIndexthis._minCoord.y&&wt.y>this._minCoord.y&&lo===Og.CLOCKWISE)&&(fo=!0),fo&&(this._minIndex=this._minIndex-1)},g1.prototype.getRightmostSideOfSegment=function(nt,at){var wt=nt.getEdge().getCoordinates();if(at<0||at+1>=wt.length||wt[at].y===wt[at+1].y)return-1;var lo=$g.LEFT;return wt[at].yat._minCoord.x)&&(at._minDe=nt,at._minIndex=lo,at._minCoord=wt[lo])},g1.prototype.findRightmostEdgeAtNode=function(){var nt=this._minDe.getNode().getEdges();this._minDe=nt.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},g1.prototype.findEdge=function(nt){for(var at=nt.iterator();at.hasNext();){var wt=at.next();wt.isForward()&&this.checkForRightmostCoordinate(wt)}ym.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===$g.LEFT&&(this._orientedDe=this._minDe.getSym())},g1.prototype.interfaces_=function(){return[]},g1.prototype.getClass=function(){return g1};var Lb=function(nt){function at(wt,lo){nt.call(this,at.msgWithCoord(wt,lo)),this.pt=lo?new Gp(lo):null,this.name="TopologyException"}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.getCoordinate=function(){return this.pt},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.msgWithCoord=function(wt,lo){return lo?wt:wt+" [ "+lo+" ]"},at}(Nb),bE=function(){this.array_=[]};bE.prototype.addLast=function(nt){this.array_.push(nt)},bE.prototype.removeFirst=function(){return this.array_.shift()},bE.prototype.isEmpty=function(){return this.array_.length===0};var Uy=function(){this._finder=null,this._dirEdgeList=new Sg,this._nodes=new Sg,this._rightMostCoord=null,this._env=null,this._finder=new g1};Uy.prototype.clearVisitedEdges=function(){for(var nt=this._dirEdgeList.iterator();nt.hasNext();)nt.next().setVisited(!1)},Uy.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Uy.prototype.computeNodeDepth=function(nt){for(var at=null,wt=nt.getEdges().iterator();wt.hasNext();){var lo=wt.next();if(lo.isVisited()||lo.getSym().isVisited()){at=lo;break}}if(at===null)throw new Lb("unable to find edge to compute depths at "+nt.getCoordinate());nt.getEdges().computeDepths(at);for(var fo=nt.getEdges().iterator();fo.hasNext();){var vo=fo.next();vo.setVisited(!0),this.copySymDepths(vo)}},Uy.prototype.computeDepth=function(nt){this.clearVisitedEdges();var at=this._finder.getEdge();at.setEdgeDepths($g.RIGHT,nt),this.copySymDepths(at),this.computeDepths(at)},Uy.prototype.create=function(nt){this.addReachable(nt),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Uy.prototype.findResultEdges=function(){for(var nt=this._dirEdgeList.iterator();nt.hasNext();){var at=nt.next();at.getDepth($g.RIGHT)>=1&&at.getDepth($g.LEFT)<=0&&!at.isInteriorAreaEdge()&&at.setInResult(!0)}},Uy.prototype.computeDepths=function(nt){var at=new pE,wt=new bE,lo=nt.getNode();for(wt.addLast(lo),at.add(lo),nt.setVisited(!0);!wt.isEmpty();){var fo=wt.removeFirst();at.add(fo),this.computeNodeDepth(fo);for(var vo=fo.getEdges().iterator();vo.hasNext();){var ls=vo.next().getSym();if(!ls.isVisited()){var ff=ls.getNode();at.contains(ff)||(wt.addLast(ff),at.add(ff))}}}},Uy.prototype.compareTo=function(nt){var at=nt;return this._rightMostCoord.xat._rightMostCoord.x?1:0},Uy.prototype.getEnvelope=function(){if(this._env===null){for(var nt=new Wg,at=this._dirEdgeList.iterator();at.hasNext();)for(var wt=at.next().getEdge().getCoordinates(),lo=0;lothis.location.length){var at=new Array(3).fill(null);at[$g.ON]=this.location[$g.ON],at[$g.LEFT]=eg.NONE,at[$g.RIGHT]=eg.NONE,this.location=at}for(var wt=0;wt1&&nt.append(eg.toLocationSymbol(this.location[$g.LEFT])),nt.append(eg.toLocationSymbol(this.location[$g.ON])),this.location.length>1&&nt.append(eg.toLocationSymbol(this.location[$g.RIGHT])),nt.toString()},_v.prototype.setLocations=function(nt,at,wt){this.location[$g.ON]=nt,this.location[$g.LEFT]=at,this.location[$g.RIGHT]=wt},_v.prototype.get=function(nt){return nt1},_v.prototype.isAnyNull=function(){for(var nt=0;ntnt._maxNodeDegree&&(nt._maxNodeDegree=wt),at=nt.getNext(at)}while(at!==this._startDe);this._maxNodeDegree*=2},Vv.prototype.addPoints=function(nt,at,wt){var lo=nt.getCoordinates();if(at){var fo=1;wt&&(fo=0);for(var vo=fo;vo=0;ff--)this._pts.add(lo[ff])}},Vv.prototype.isHole=function(){return this._isHole},Vv.prototype.setInResult=function(){var nt=this._startDe;do nt.getEdge().setInResult(!0),nt=nt.getNext();while(nt!==this._startDe)},Vv.prototype.containsPoint=function(nt){var at=this.getLinearRing();if(!at.getEnvelopeInternal().contains(nt)||!Og.isPointInRing(nt,at.getCoordinates()))return!1;for(var wt=this._holes.iterator();wt.hasNext();)if(wt.next().containsPoint(nt))return!1;return!0},Vv.prototype.addHole=function(nt){this._holes.add(nt)},Vv.prototype.isShell=function(){return this._shell===null},Vv.prototype.getLabel=function(){return this._label},Vv.prototype.getEdges=function(){return this._edges},Vv.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Vv.prototype.getShell=function(){return this._shell},Vv.prototype.mergeLabel=function(){if(arguments.length===1){var nt=arguments[0];this.mergeLabel(nt,0),this.mergeLabel(nt,1)}else if(arguments.length===2){var at=arguments[0],wt=arguments[1],lo=at.getLocation(wt,$g.RIGHT);if(lo===eg.NONE)return null;if(this._label.getLocation(wt)===eg.NONE)return this._label.setLocation(wt,lo),null}},Vv.prototype.setShell=function(nt){this._shell=nt,nt!==null&&nt.addHole(this)},Vv.prototype.toPolygon=function(nt){for(var at=new Array(this._holes.size()).fill(null),wt=0;wt=2,"found partial label"),this.computeIM(nt)},E0.prototype.isInResult=function(){return this._isInResult},E0.prototype.isVisited=function(){return this._isVisited},E0.prototype.interfaces_=function(){return[]},E0.prototype.getClass=function(){return E0};var $E=function(nt){function at(){nt.call(this),this._coord=null,this._edges=null;var wt=arguments[0],lo=arguments[1];this._coord=wt,this._edges=lo,this._label=new fv(0,eg.NONE)}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.isIncidentEdgeInResult=function(){for(var wt=this.getEdges().getEdges().iterator();wt.hasNext();)if(wt.next().getEdge().isInResult())return!0;return!1},at.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},at.prototype.getCoordinate=function(){return this._coord},at.prototype.print=function(wt){wt.println("node "+this._coord+" lbl: "+this._label)},at.prototype.computeIM=function(wt){},at.prototype.computeMergedLocation=function(wt,lo){var fo=eg.NONE;if(fo=this._label.getLocation(lo),!wt.isNull(lo)){var vo=wt.getLocation(lo);fo!==eg.BOUNDARY&&(fo=vo)}return fo},at.prototype.setLabel=function(){if(arguments.length!==2)return nt.prototype.setLabel.apply(this,arguments);var wt=arguments[0],lo=arguments[1];this._label===null?this._label=new fv(wt,lo):this._label.setLocation(wt,lo)},at.prototype.getEdges=function(){return this._edges},at.prototype.mergeLabel=function(){var wt=this;if(arguments[0]instanceof at){var lo=arguments[0];this.mergeLabel(lo._label)}else if(arguments[0]instanceof fv)for(var fo=arguments[0],vo=0;vo<2;vo++){var ls=wt.computeMergedLocation(fo,vo),ff=wt._label.getLocation(vo);ff===eg.NONE&&wt._label.setLocation(vo,ls)}},at.prototype.add=function(wt){this._edges.insert(wt),wt.setNode(this)},at.prototype.setLabelBoundary=function(wt){if(this._label===null)return null;var lo=eg.NONE;this._label!==null&&(lo=this._label.getLocation(wt));var fo=null;switch(lo){case eg.BOUNDARY:fo=eg.INTERIOR;break;case eg.INTERIOR:default:fo=eg.BOUNDARY}this._label.setLocation(wt,fo)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(E0),B1=function(){this.nodeMap=new Hy,this.nodeFact=null;var nt=arguments[0];this.nodeFact=nt};B1.prototype.find=function(nt){return this.nodeMap.get(nt)},B1.prototype.addNode=function(){if(arguments[0]instanceof Gp){var nt=arguments[0],at=this.nodeMap.get(nt);return at===null&&(at=this.nodeFact.createNode(nt),this.nodeMap.put(nt,at)),at}if(arguments[0]instanceof $E){var wt=arguments[0],lo=this.nodeMap.get(wt.getCoordinate());return lo===null?(this.nodeMap.put(wt.getCoordinate(),wt),wt):(lo.mergeLabel(wt),lo)}},B1.prototype.print=function(nt){for(var at=this.iterator();at.hasNext();)at.next().print(nt)},B1.prototype.iterator=function(){return this.nodeMap.values().iterator()},B1.prototype.values=function(){return this.nodeMap.values()},B1.prototype.getBoundaryNodes=function(nt){for(var at=new Sg,wt=this.iterator();wt.hasNext();){var lo=wt.next();lo.getLabel().getLocation(nt)===eg.BOUNDARY&&at.add(lo)}return at},B1.prototype.add=function(nt){var at=nt.getCoordinate();this.addNode(at).add(nt)},B1.prototype.interfaces_=function(){return[]},B1.prototype.getClass=function(){return B1};var pv=function(){},u2={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};pv.prototype.interfaces_=function(){return[]},pv.prototype.getClass=function(){return pv},pv.isNorthern=function(nt){return nt===pv.NE||nt===pv.NW},pv.isOpposite=function(nt,at){return nt!==at&&(nt-at+4)%4===2},pv.commonHalfPlane=function(nt,at){if(nt===at)return nt;if((nt-at+4)%4===2)return-1;var wt=ntat?nt:at)===3?3:wt},pv.isInHalfPlane=function(nt,at){return at===pv.SE?nt===pv.SE||nt===pv.SW:nt===at||nt===at+1},pv.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var nt=arguments[0],at=arguments[1];if(nt===0&&at===0)throw new Pv("Cannot compute the quadrant for point ( "+nt+", "+at+" )");return nt>=0?at>=0?pv.NE:pv.SE:at>=0?pv.NW:pv.SW}if(arguments[0]instanceof Gp&&arguments[1]instanceof Gp){var wt=arguments[0],lo=arguments[1];if(lo.x===wt.x&&lo.y===wt.y)throw new Pv("Cannot compute the quadrant for two identical points "+wt);return lo.x>=wt.x?lo.y>=wt.y?pv.NE:pv.SE:lo.y>=wt.y?pv.NW:pv.SW}},u2.NE.get=function(){return 0},u2.NW.get=function(){return 1},u2.SW.get=function(){return 2},u2.SE.get=function(){return 3},Object.defineProperties(pv,u2);var Vy=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var nt=arguments[0];this._edge=nt}else if(arguments.length===3){var at=arguments[0],wt=arguments[1],lo=arguments[2],fo=null;this._edge=at,this.init(wt,lo),this._label=fo}else if(arguments.length===4){var vo=arguments[0],ls=arguments[1],ff=arguments[2],mf=arguments[3];this._edge=vo,this.init(ls,ff),this._label=mf}};Vy.prototype.compareDirection=function(nt){return this._dx===nt._dx&&this._dy===nt._dy?0:this._quadrant>nt._quadrant?1:this._quadrant2){vo.linkDirectedEdgesForMinimalEdgeRings();var ls=vo.buildMinimalRings(),ff=this.findShell(ls);ff!==null?(this.placePolygonHoles(ff,ls),at.add(ff)):wt.addAll(ls)}else lo.add(vo)}return lo},l0.prototype.containsPoint=function(nt){for(var at=this._shellList.iterator();at.hasNext();)if(at.next().containsPoint(nt))return!0;return!1},l0.prototype.buildMaximalEdgeRings=function(nt){for(var at=new Sg,wt=nt.iterator();wt.hasNext();){var lo=wt.next();if(lo.isInResult()&&lo.getLabel().isArea()&&lo.getEdgeRing()===null){var fo=new TO(lo,this._geometryFactory);at.add(fo),fo.setInResult()}}return at},l0.prototype.placePolygonHoles=function(nt,at){for(var wt=at.iterator();wt.hasNext();){var lo=wt.next();lo.isHole()&&lo.setShell(nt)}},l0.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},l0.prototype.findEdgeRingContaining=function(nt,at){for(var wt=nt.getLinearRing(),lo=wt.getEnvelopeInternal(),fo=wt.getCoordinateN(0),vo=null,ls=null,ff=at.iterator();ff.hasNext();){var mf=ff.next(),bf=mf.getLinearRing(),Sf=bf.getEnvelopeInternal();vo!==null&&(ls=vo.getLinearRing().getEnvelopeInternal());var wf=!1;Sf.contains(lo)&&Og.isPointInRing(fo,bf.getCoordinates())&&(wf=!0),wf&&(vo===null||ls.contains(Sf))&&(vo=mf)}return vo},l0.prototype.findShell=function(nt){for(var at=0,wt=null,lo=nt.iterator();lo.hasNext();){var fo=lo.next();fo.isHole()||(wt=fo,at++)}return ym.isTrue(at<=1,"found two shells in MinimalEdgeRing list"),wt},l0.prototype.add=function(){if(arguments.length===1){var nt=arguments[0];this.add(nt.getEdgeEnds(),nt.getNodes())}else if(arguments.length===2){var at=arguments[0],wt=arguments[1];Nv.linkResultDirectedEdges(wt);var lo=this.buildMaximalEdgeRings(at),fo=new Sg,vo=this.buildMinimalEdgeRings(lo,this._shellList,fo);this.sortShellsAndHoles(vo,this._shellList,fo),this.placeFreeHoles(this._shellList,fo)}},l0.prototype.interfaces_=function(){return[]},l0.prototype.getClass=function(){return l0};var Qw=function(){};Qw.prototype.getBounds=function(){},Qw.prototype.interfaces_=function(){return[]},Qw.prototype.getClass=function(){return Qw};var m1=function(){this._bounds=null,this._item=null;var nt=arguments[0],at=arguments[1];this._bounds=nt,this._item=at};m1.prototype.getItem=function(){return this._item},m1.prototype.getBounds=function(){return this._bounds},m1.prototype.interfaces_=function(){return[Qw,W0]},m1.prototype.getClass=function(){return m1};var pb=function(){this._size=null,this._items=null,this._size=0,this._items=new Sg,this._items.add(null)};pb.prototype.poll=function(){if(this.isEmpty())return null;var nt=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),nt},pb.prototype.size=function(){return this._size},pb.prototype.reorder=function(nt){for(var at=this,wt=null,lo=this._items.get(nt);2*nt<=this._size&&((wt=2*nt)!==at._size&&at._items.get(wt+1).compareTo(at._items.get(wt))<0&&wt++,at._items.get(wt).compareTo(lo)<0);nt=wt)at._items.set(nt,at._items.get(wt));this._items.set(nt,lo)},pb.prototype.clear=function(){this._size=0,this._items.clear()},pb.prototype.isEmpty=function(){return this._size===0},pb.prototype.add=function(nt){this._items.add(null),this._size+=1;var at=this._size;for(this._items.set(0,nt);nt.compareTo(this._items.get(Math.trunc(at/2)))<0;at/=2)this._items.set(at,this._items.get(Math.trunc(at/2)));this._items.set(at,nt)},pb.prototype.interfaces_=function(){return[]},pb.prototype.getClass=function(){return pb};var _$=function(){};_$.prototype.visitItem=function(nt){},_$.prototype.interfaces_=function(){return[]},_$.prototype.getClass=function(){return _$};var W_=function(){};W_.prototype.insert=function(nt,at){},W_.prototype.remove=function(nt,at){},W_.prototype.query=function(){},W_.prototype.interfaces_=function(){return[]},W_.prototype.getClass=function(){return W_};var Kv=function(){if(this._childBoundables=new Sg,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var nt=arguments[0];this._level=nt}}},Yk={serialVersionUID:{configurable:!0}};Kv.prototype.getLevel=function(){return this._level},Kv.prototype.size=function(){return this._childBoundables.size()},Kv.prototype.getChildBoundables=function(){return this._childBoundables},Kv.prototype.addChildBoundable=function(nt){ym.isTrue(this._bounds===null),this._childBoundables.add(nt)},Kv.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Kv.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},Kv.prototype.interfaces_=function(){return[Qw,W0]},Kv.prototype.getClass=function(){return Kv},Yk.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(Kv,Yk);var v1=function(){};v1.reverseOrder=function(){return{compare:function(nt,at){return at.compareTo(nt)}}},v1.min=function(nt){return v1.sort(nt),nt.get(0)},v1.sort=function(nt,at){var wt=nt.toArray();at?ub.sort(wt,at):ub.sort(wt);for(var lo=nt.iterator(),fo=0,vo=wt.length;foGv.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,nt,at),null):(this.expand(this._boundable2,this._boundable1,nt,at),null);if(wt)return this.expand(this._boundable1,this._boundable2,nt,at),null;if(lo)return this.expand(this._boundable2,this._boundable1,nt,at),null;throw new Pv("neither boundable is composite")},Gv.prototype.isLeaves=function(){return!(Gv.isComposite(this._boundable1)||Gv.isComposite(this._boundable2))},Gv.prototype.compareTo=function(nt){var at=nt;return this._distanceat._distance?1:0},Gv.prototype.expand=function(nt,at,wt,lo){for(var fo=nt.getChildBoundables().iterator();fo.hasNext();){var vo=fo.next(),ls=new Gv(vo,at,this._itemDistance);ls.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=wt}},wE={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};wy.prototype.getNodeCapacity=function(){return this._nodeCapacity},wy.prototype.lastNode=function(nt){return nt.get(nt.size()-1)},wy.prototype.size=function(){var nt=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var at=arguments[0],wt=0,lo=at.getChildBoundables().iterator();lo.hasNext();){var fo=lo.next();fo instanceof Kv?wt+=nt.size(fo):fo instanceof m1&&(wt+=1)}return wt}},wy.prototype.removeItem=function(nt,at){for(var wt=null,lo=nt.getChildBoundables().iterator();lo.hasNext();){var fo=lo.next();fo instanceof m1&&fo.getItem()===at&&(wt=fo)}return wt!==null&&(nt.getChildBoundables().remove(wt),!0)},wy.prototype.itemsTree=function(){var nt=this;if(arguments.length===0){this.build();var at=this.itemsTree(this._root);return at===null?new Sg:at}if(arguments.length===1){for(var wt=arguments[0],lo=new Sg,fo=wt.getChildBoundables().iterator();fo.hasNext();){var vo=fo.next();if(vo instanceof Kv){var ls=nt.itemsTree(vo);ls!==null&&lo.add(ls)}else vo instanceof m1?lo.add(vo.getItem()):ym.shouldNeverReachHere()}return lo.size()<=0?null:lo}},wy.prototype.insert=function(nt,at){ym.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new m1(nt,at))},wy.prototype.boundablesAtLevel=function(){var nt=this;if(arguments.length===1){var at=arguments[0],wt=new Sg;return this.boundablesAtLevel(at,this._root,wt),wt}if(arguments.length===3){var lo=arguments[0],fo=arguments[1],vo=arguments[2];if(ym.isTrue(lo>-2),fo.getLevel()===lo)return vo.add(fo),null;for(var ls=fo.getChildBoundables().iterator();ls.hasNext();){var ff=ls.next();ff instanceof Kv?nt.boundablesAtLevel(lo,ff,vo):(ym.isTrue(ff instanceof m1),lo===-1&&vo.add(ff))}return null}},wy.prototype.query=function(){var nt=this;if(arguments.length===1){var at=arguments[0];this.build();var wt=new Sg;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),at)&&this.query(at,this._root,wt),wt}if(arguments.length===2){var lo=arguments[0],fo=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),lo)&&this.query(lo,this._root,fo)}else if(arguments.length===3){if(nm(arguments[2],_$)&&arguments[0]instanceof Object&&arguments[1]instanceof Kv)for(var vo=arguments[0],ls=arguments[1],ff=arguments[2],mf=ls.getChildBoundables(),bf=0;bfwt&&(wt=vo)}}return wt+1}},wy.prototype.createParentBoundables=function(nt,at){var wt=this;ym.isTrue(!nt.isEmpty());var lo=new Sg;lo.add(this.createNode(at));var fo=new Sg(nt);v1.sort(fo,this.getComparator());for(var vo=fo.iterator();vo.hasNext();){var ls=vo.next();wt.lastNode(lo).getChildBoundables().size()===wt.getNodeCapacity()&&lo.add(wt.createNode(at)),wt.lastNode(lo).addChildBoundable(ls)}return lo},wy.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},wy.prototype.interfaces_=function(){return[W0]},wy.prototype.getClass=function(){return wy},wy.compareDoubles=function(nt,at){return nt>at?1:nt0);for(var vo=new Sg,ls=0;ls0;){var zf=jf.poll(),Wf=zf.getDistance();if(Wf>=wf)break;zf.isLeaves()?(wf=Wf,If=zf):zf.expandToQueue(jf,wf)}return[If.getBoundable(0).getItem(),If.getBoundable(1).getItem()]}}else if(arguments.length===3){var Mf=arguments[0],np=arguments[1],pp=arguments[2],Uf=new m1(Mf,np),tp=new Gv(this.getRoot(),Uf,pp);return this.nearestNeighbour(tp)[0]}},at.prototype.interfaces_=function(){return[W_,W0]},at.prototype.getClass=function(){return at},at.centreX=function(lo){return at.avg(lo.getMinX(),lo.getMaxX())},at.avg=function(lo,fo){return(lo+fo)/2},at.centreY=function(lo){return at.avg(lo.getMinY(),lo.getMaxY())},wt.STRtreeNode.get=function(){return XS},wt.serialVersionUID.get=function(){return 0x39920f7d5f261e0},wt.xComparator.get=function(){return{interfaces_:function(){return[zw]},compare:function(lo,fo){return nt.compareDoubles(at.centreX(lo.getBounds()),at.centreX(fo.getBounds()))}}},wt.yComparator.get=function(){return{interfaces_:function(){return[zw]},compare:function(lo,fo){return nt.compareDoubles(at.centreY(lo.getBounds()),at.centreY(fo.getBounds()))}}},wt.intersectsOp.get=function(){return{interfaces_:function(){return[nt.IntersectsOp]},intersects:function(lo,fo){return lo.intersects(fo)}}},wt.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(at,wt),at}(wy),XS=function(nt){function at(){var wt=arguments[0];nt.call(this,wt)}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.computeBounds=function(){for(var wt=null,lo=this.getChildBoundables().iterator();lo.hasNext();){var fo=lo.next();wt===null?wt=new Wg(fo.getBounds()):wt.expandToInclude(fo.getBounds())}return wt},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(Kv),c0=function(){};c0.prototype.interfaces_=function(){return[]},c0.prototype.getClass=function(){return c0},c0.relativeSign=function(nt,at){return ntat?1:0},c0.compare=function(nt,at,wt){if(at.equals2D(wt))return 0;var lo=c0.relativeSign(at.x,wt.x),fo=c0.relativeSign(at.y,wt.y);switch(nt){case 0:return c0.compareValue(lo,fo);case 1:return c0.compareValue(fo,lo);case 2:return c0.compareValue(fo,-lo);case 3:return c0.compareValue(-lo,fo);case 4:return c0.compareValue(-lo,-fo);case 5:return c0.compareValue(-fo,-lo);case 6:return c0.compareValue(-fo,lo);case 7:return c0.compareValue(lo,-fo)}return ym.shouldNeverReachHere("invalid octant value"),0},c0.compareValue=function(nt,at){return nt<0?-1:nt>0?1:at<0?-1:at>0?1:0};var w$=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var nt=arguments[0],at=arguments[1],wt=arguments[2],lo=arguments[3];this._segString=nt,this.coord=new Gp(at),this.segmentIndex=wt,this._segmentOctant=lo,this._isInterior=!at.equals2D(nt.getCoordinate(wt))};w$.prototype.getCoordinate=function(){return this.coord},w$.prototype.print=function(nt){nt.print(this.coord),nt.print(" seg # = "+this.segmentIndex)},w$.prototype.compareTo=function(nt){var at=nt;return this.segmentIndexat.segmentIndex?1:this.coord.equals2D(at.coord)?0:c0.compare(this._segmentOctant,this.coord,at.coord)},w$.prototype.isEndPoint=function(nt){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===nt},w$.prototype.isInterior=function(){return this._isInterior},w$.prototype.interfaces_=function(){return[G0]},w$.prototype.getClass=function(){return w$};var yy=function(){this._nodeMap=new Hy,this._edge=null;var nt=arguments[0];this._edge=nt};yy.prototype.getSplitCoordinates=function(){var nt=new r2;this.addEndpoints();for(var at=this.iterator(),wt=at.next();at.hasNext();){var lo=at.next();this.addEdgeCoordinates(wt,lo,nt),wt=lo}return nt.toCoordinateArray()},yy.prototype.addCollapsedNodes=function(){var nt=new Sg;this.findCollapsesFromInsertedNodes(nt),this.findCollapsesFromExistingVertices(nt);for(var at=nt.iterator();at.hasNext();){var wt=at.next().intValue();this.add(this._edge.getCoordinate(wt),wt)}},yy.prototype.print=function(nt){nt.println("Intersections:");for(var at=this.iterator();at.hasNext();)at.next().print(nt)},yy.prototype.findCollapsesFromExistingVertices=function(nt){for(var at=0;at=0?at>=0?wt>=lo?0:1:wt>=lo?7:6:at>=0?wt>=lo?3:2:wt>=lo?4:5}if(arguments[0]instanceof Gp&&arguments[1]instanceof Gp){var fo=arguments[0],vo=arguments[1],ls=vo.x-fo.x,ff=vo.y-fo.y;if(ls===0&&ff===0)throw new Pv("Cannot compute the octant for two identical points "+fo);return y1.octant(ls,ff)}};var ay=function(){};ay.prototype.getCoordinates=function(){},ay.prototype.size=function(){},ay.prototype.getCoordinate=function(nt){},ay.prototype.isClosed=function(){},ay.prototype.setData=function(nt){},ay.prototype.getData=function(){},ay.prototype.interfaces_=function(){return[]},ay.prototype.getClass=function(){return ay};var h2=function(){};h2.prototype.addIntersection=function(nt,at){},h2.prototype.interfaces_=function(){return[ay]},h2.prototype.getClass=function(){return h2};var Lv=function(){this._nodeList=new yy(this),this._pts=null,this._data=null;var nt=arguments[0],at=arguments[1];this._pts=nt,this._data=at};Lv.prototype.getCoordinates=function(){return this._pts},Lv.prototype.size=function(){return this._pts.length},Lv.prototype.getCoordinate=function(nt){return this._pts[nt]},Lv.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Lv.prototype.getSegmentOctant=function(nt){return nt===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(nt),this.getCoordinate(nt+1))},Lv.prototype.setData=function(nt){this._data=nt},Lv.prototype.safeOctant=function(nt,at){return nt.equals2D(at)?0:y1.octant(nt,at)},Lv.prototype.getData=function(){return this._data},Lv.prototype.addIntersection=function(){if(arguments.length===2){var nt=arguments[0],at=arguments[1];this.addIntersectionNode(nt,at)}else if(arguments.length===4){var wt=arguments[0],lo=arguments[1],fo=arguments[3],vo=new Gp(wt.getIntersection(fo));this.addIntersection(vo,lo)}},Lv.prototype.toString=function(){return c1.toLineString(new Uv(this._pts))},Lv.prototype.getNodeList=function(){return this._nodeList},Lv.prototype.addIntersectionNode=function(nt,at){var wt=at,lo=wt+1;if(lo=0&&wt>=0||at<=0&&wt<=0?Math.max(at,wt):0}if(arguments[0]instanceof Gp){var lo=arguments[0];return Og.orientationIndex(this.p0,this.p1,lo)}},Vg.prototype.toGeometry=function(nt){return nt.createLineString([this.p0,this.p1])},Vg.prototype.isVertical=function(){return this.p0.x===this.p1.x},Vg.prototype.equals=function(nt){if(!(nt instanceof Vg))return!1;var at=nt;return this.p0.equals(at.p0)&&this.p1.equals(at.p1)},Vg.prototype.intersection=function(nt){var at=new y$;return at.computeIntersection(this.p0,this.p1,nt.p0,nt.p1),at.hasIntersection()?at.getIntersection(0):null},Vg.prototype.project=function(){if(arguments[0]instanceof Gp){var nt=arguments[0];if(nt.equals(this.p0)||nt.equals(this.p1))return new Gp(nt);var at=this.projectionFactor(nt),wt=new Gp;return wt.x=this.p0.x+at*(this.p1.x-this.p0.x),wt.y=this.p0.y+at*(this.p1.y-this.p0.y),wt}if(arguments[0]instanceof Vg){var lo=arguments[0],fo=this.projectionFactor(lo.p0),vo=this.projectionFactor(lo.p1);if(fo>=1&&vo>=1||fo<=0&&vo<=0)return null;var ls=this.project(lo.p0);fo<0&&(ls=this.p0),fo>1&&(ls=this.p1);var ff=this.project(lo.p1);return vo<0&&(ff=this.p0),vo>1&&(ff=this.p1),new Vg(ls,ff)}},Vg.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},Vg.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},Vg.prototype.getCoordinate=function(nt){return nt===0?this.p0:this.p1},Vg.prototype.distancePerpendicular=function(nt){return Og.distancePointLinePerpendicular(nt,this.p0,this.p1)},Vg.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},Vg.prototype.midPoint=function(){return Vg.midPoint(this.p0,this.p1)},Vg.prototype.projectionFactor=function(nt){if(nt.equals(this.p0))return 0;if(nt.equals(this.p1))return 1;var at=this.p1.x-this.p0.x,wt=this.p1.y-this.p0.y,lo=at*at+wt*wt;return lo<=0?dm.NaN:((nt.x-this.p0.x)*at+(nt.y-this.p0.y)*wt)/lo},Vg.prototype.closestPoints=function(nt){var at=this.intersection(nt);if(at!==null)return[at,at];var wt=new Array(2).fill(null),lo=dm.MAX_VALUE,fo=null,vo=this.closestPoint(nt.p0);lo=vo.distance(nt.p0),wt[0]=vo,wt[1]=nt.p0;var ls=this.closestPoint(nt.p1);(fo=ls.distance(nt.p1))0&&at<1?this.project(nt):this.p0.distance(nt)1||dm.isNaN(at))&&(at=1),at},Vg.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},Vg.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},Vg.prototype.distance=function(){if(arguments[0]instanceof Vg){var nt=arguments[0];return Og.distanceLineLine(this.p0,this.p1,nt.p0,nt.p1)}if(arguments[0]instanceof Gp){var at=arguments[0];return Og.distancePointLine(at,this.p0,this.p1)}},Vg.prototype.pointAlong=function(nt){var at=new Gp;return at.x=this.p0.x+nt*(this.p1.x-this.p0.x),at.y=this.p0.y+nt*(this.p1.y-this.p0.y),at},Vg.prototype.hashCode=function(){var nt=dm.doubleToLongBits(this.p0.x);nt^=31*dm.doubleToLongBits(this.p0.y);var at=Math.trunc(nt)^Math.trunc(nt>>32),wt=dm.doubleToLongBits(this.p1.x);return wt^=31*dm.doubleToLongBits(this.p1.y),at^(Math.trunc(wt)^Math.trunc(wt>>32))},Vg.prototype.interfaces_=function(){return[G0,W0]},Vg.prototype.getClass=function(){return Vg},Vg.midPoint=function(nt,at){return new Gp((nt.x+at.x)/2,(nt.y+at.y)/2)},xE.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(Vg,xE);var d2=function(){this.tempEnv1=new Wg,this.tempEnv2=new Wg,this._overlapSeg1=new Vg,this._overlapSeg2=new Vg};d2.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var nt=arguments[0],at=arguments[1],wt=arguments[2],lo=arguments[3];nt.getLineSegment(at,this._overlapSeg1),wt.getLineSegment(lo,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},d2.prototype.interfaces_=function(){return[]},d2.prototype.getClass=function(){return d2};var S0=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var nt=arguments[0],at=arguments[1],wt=arguments[2],lo=arguments[3];this._pts=nt,this._start=at,this._end=wt,this._context=lo};S0.prototype.getLineSegment=function(nt,at){at.p0=this._pts[nt],at.p1=this._pts[nt+1]},S0.prototype.computeSelect=function(nt,at,wt,lo){var fo=this._pts[at],vo=this._pts[wt];if(lo.tempEnv1.init(fo,vo),wt-at==1)return lo.select(this,at),null;if(!nt.intersects(lo.tempEnv1))return null;var ls=Math.trunc((at+wt)/2);at=nt.length-1)return nt.length-1;for(var lo=pv.quadrant(nt[wt],nt[wt+1]),fo=at+1;fols.getId()&&(ls.computeOverlaps(mf,fo),lo._nOverlaps++),lo._segInt.isDone())return null}},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},wt.SegmentOverlapAction.get=function(){return EE},Object.defineProperties(at,wt),at}(f2),EE=function(nt){function at(){nt.call(this),this._si=null;var wt=arguments[0];this._si=wt}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.overlap=function(){if(arguments.length!==4)return nt.prototype.overlap.apply(this,arguments);var wt=arguments[0],lo=arguments[1],fo=arguments[2],vo=arguments[3],ls=wt.getContext(),ff=fo.getContext();this._si.processIntersections(ls,lo,ff,vo)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(d2),uv=function nt(){if(this._quadrantSegments=nt.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=nt.CAP_ROUND,this._joinStyle=nt.JOIN_ROUND,this._mitreLimit=nt.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=nt.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var at=arguments[0];this.setQuadrantSegments(at)}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1];this.setQuadrantSegments(wt),this.setEndCapStyle(lo)}else if(arguments.length===4){var fo=arguments[0],vo=arguments[1],ls=arguments[2],ff=arguments[3];this.setQuadrantSegments(fo),this.setEndCapStyle(vo),this.setJoinStyle(ls),this.setMitreLimit(ff)}}},b1={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};uv.prototype.getEndCapStyle=function(){return this._endCapStyle},uv.prototype.isSingleSided=function(){return this._isSingleSided},uv.prototype.setQuadrantSegments=function(nt){this._quadrantSegments=nt,this._quadrantSegments===0&&(this._joinStyle=uv.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=uv.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),nt<=0&&(this._quadrantSegments=1),this._joinStyle!==uv.JOIN_ROUND&&(this._quadrantSegments=uv.DEFAULT_QUADRANT_SEGMENTS)},uv.prototype.getJoinStyle=function(){return this._joinStyle},uv.prototype.setJoinStyle=function(nt){this._joinStyle=nt},uv.prototype.setSimplifyFactor=function(nt){this._simplifyFactor=nt<0?0:nt},uv.prototype.getSimplifyFactor=function(){return this._simplifyFactor},uv.prototype.getQuadrantSegments=function(){return this._quadrantSegments},uv.prototype.setEndCapStyle=function(nt){this._endCapStyle=nt},uv.prototype.getMitreLimit=function(){return this._mitreLimit},uv.prototype.setMitreLimit=function(nt){this._mitreLimit=nt},uv.prototype.setSingleSided=function(nt){this._isSingleSided=nt},uv.prototype.interfaces_=function(){return[]},uv.prototype.getClass=function(){return uv},uv.bufferDistanceError=function(nt){var at=Math.PI/2/nt;return 1-Math.cos(at/2)},b1.CAP_ROUND.get=function(){return 1},b1.CAP_FLAT.get=function(){return 2},b1.CAP_SQUARE.get=function(){return 3},b1.JOIN_ROUND.get=function(){return 1},b1.JOIN_MITRE.get=function(){return 2},b1.JOIN_BEVEL.get=function(){return 3},b1.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},b1.DEFAULT_MITRE_LIMIT.get=function(){return 5},b1.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(uv,b1);var Ev=function(nt){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=Og.COUNTERCLOCKWISE,this._inputLine=nt||null},o_={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Ev.prototype.isDeletable=function(nt,at,wt,lo){var fo=this._inputLine[nt],vo=this._inputLine[at],ls=this._inputLine[wt];return!!this.isConcave(fo,vo,ls)&&!!this.isShallow(fo,vo,ls,lo)&&this.isShallowSampled(fo,vo,nt,wt,lo)},Ev.prototype.deleteShallowConcavities=function(){for(var nt=this,at=1,wt=this.findNextNonDeletedIndex(at),lo=this.findNextNonDeletedIndex(wt),fo=!1;lo=0;lo--)this.addPt(nt[lo])},R0.prototype.isRedundant=function(nt){if(this._ptList.size()<1)return!1;var at=this._ptList.get(this._ptList.size()-1);return nt.distance(at)Math.PI;)nt-=Mm.PI_TIMES_2;for(;nt<=-Math.PI;)nt+=Mm.PI_TIMES_2;return nt},Mm.angle=function(){if(arguments.length===1){var nt=arguments[0];return Math.atan2(nt.y,nt.x)}if(arguments.length===2){var at=arguments[0],wt=arguments[1],lo=wt.x-at.x,fo=wt.y-at.y;return Math.atan2(fo,lo)}},Mm.isAcute=function(nt,at,wt){var lo=nt.x-at.x,fo=nt.y-at.y;return lo*(wt.x-at.x)+fo*(wt.y-at.y)>0},Mm.isObtuse=function(nt,at,wt){var lo=nt.x-at.x,fo=nt.y-at.y;return lo*(wt.x-at.x)+fo*(wt.y-at.y)<0},Mm.interiorAngle=function(nt,at,wt){var lo=Mm.angle(at,nt),fo=Mm.angle(at,wt);return Math.abs(fo-lo)},Mm.normalizePositive=function(nt){if(nt<0){for(;nt<0;)nt+=Mm.PI_TIMES_2;nt>=Mm.PI_TIMES_2&&(nt=0)}else{for(;nt>=Mm.PI_TIMES_2;)nt-=Mm.PI_TIMES_2;nt<0&&(nt=0)}return nt},Mm.angleBetween=function(nt,at,wt){var lo=Mm.angle(at,nt),fo=Mm.angle(at,wt);return Mm.diff(lo,fo)},Mm.diff=function(nt,at){var wt=null;return(wt=ntMath.PI&&(wt=2*Math.PI-wt),wt},Mm.toRadians=function(nt){return nt*Math.PI/180},Mm.getTurn=function(nt,at){var wt=Math.sin(at-nt);return wt>0?Mm.COUNTERCLOCKWISE:wt<0?Mm.CLOCKWISE:Mm.NONE},Mm.angleBetweenOriented=function(nt,at,wt){var lo=Mm.angle(at,nt),fo=Mm.angle(at,wt)-lo;return fo<=-Math.PI?fo+Mm.PI_TIMES_2:fo>Math.PI?fo-Mm.PI_TIMES_2:fo},q_.PI_TIMES_2.get=function(){return 2*Math.PI},q_.PI_OVER_2.get=function(){return Math.PI/2},q_.PI_OVER_4.get=function(){return Math.PI/4},q_.COUNTERCLOCKWISE.get=function(){return Og.COUNTERCLOCKWISE},q_.CLOCKWISE.get=function(){return Og.CLOCKWISE},q_.NONE.get=function(){return Og.COLLINEAR},Object.defineProperties(Mm,q_);var kv=function nt(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new Vg,this._seg1=new Vg,this._offset0=new Vg,this._offset1=new Vg,this._side=0,this._hasNarrowConcaveAngle=!1;var at=arguments[0],wt=arguments[1],lo=arguments[2];this._precisionModel=at,this._bufParams=wt,this._li=new y$,this._filletAngleQuantum=Math.PI/2/wt.getQuadrantSegments(),wt.getQuadrantSegments()>=8&&wt.getJoinStyle()===uv.JOIN_ROUND&&(this._closingSegLengthFactor=nt.MAX_CLOSING_SEG_LEN_FACTOR),this.init(lo)},tx={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};kv.prototype.addNextSegment=function(nt,at){if(this._s0=this._s1,this._s1=this._s2,this._s2=nt,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var wt=Og.computeOrientation(this._s0,this._s1,this._s2),lo=wt===Og.CLOCKWISE&&this._side===$g.LEFT||wt===Og.COUNTERCLOCKWISE&&this._side===$g.RIGHT;wt===0?this.addCollinear(at):lo?this.addOutsideTurn(wt,at):this.addInsideTurn(wt,at)},kv.prototype.addLineEndCap=function(nt,at){var wt=new Vg(nt,at),lo=new Vg;this.computeOffsetSegment(wt,$g.LEFT,this._distance,lo);var fo=new Vg;this.computeOffsetSegment(wt,$g.RIGHT,this._distance,fo);var vo=at.x-nt.x,ls=at.y-nt.y,ff=Math.atan2(ls,vo);switch(this._bufParams.getEndCapStyle()){case uv.CAP_ROUND:this._segList.addPt(lo.p1),this.addFilletArc(at,ff+Math.PI/2,ff-Math.PI/2,Og.CLOCKWISE,this._distance),this._segList.addPt(fo.p1);break;case uv.CAP_FLAT:this._segList.addPt(lo.p1),this._segList.addPt(fo.p1);break;case uv.CAP_SQUARE:var mf=new Gp;mf.x=Math.abs(this._distance)*Math.cos(ff),mf.y=Math.abs(this._distance)*Math.sin(ff);var bf=new Gp(lo.p1.x+mf.x,lo.p1.y+mf.y),Sf=new Gp(fo.p1.x+mf.x,fo.p1.y+mf.y);this._segList.addPt(bf),this._segList.addPt(Sf)}},kv.prototype.getCoordinates=function(){return this._segList.getCoordinates()},kv.prototype.addMitreJoin=function(nt,at,wt,lo){var fo=!0,vo=null;try{vo=q0.intersection(at.p0,at.p1,wt.p0,wt.p1),(lo<=0?1:vo.distance(nt)/Math.abs(lo))>this._bufParams.getMitreLimit()&&(fo=!1)}catch(ls){if(!(ls instanceof F_))throw ls;vo=new Gp(0,0),fo=!1}fo?this._segList.addPt(vo):this.addLimitedMitreJoin(at,wt,lo,this._bufParams.getMitreLimit())},kv.prototype.addFilletCorner=function(nt,at,wt,lo,fo){var vo=at.x-nt.x,ls=at.y-nt.y,ff=Math.atan2(ls,vo),mf=wt.x-nt.x,bf=wt.y-nt.y,Sf=Math.atan2(bf,mf);lo===Og.CLOCKWISE?ff<=Sf&&(ff+=2*Math.PI):ff>=Sf&&(ff-=2*Math.PI),this._segList.addPt(at),this.addFilletArc(nt,ff,Sf,lo,fo),this._segList.addPt(wt)},kv.prototype.addOutsideTurn=function(nt,at){if(this._offset0.p1.distance(this._offset1.p0)0){var wt=new Gp((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(wt);var lo=new Gp((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(lo)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},kv.prototype.createCircle=function(nt){var at=new Gp(nt.x+this._distance,nt.y);this._segList.addPt(at),this.addFilletArc(nt,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},kv.prototype.addBevelJoin=function(nt,at){this._segList.addPt(nt.p1),this._segList.addPt(at.p0)},kv.prototype.init=function(nt){this._distance=nt,this._maxCurveSegmentError=nt*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new R0,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(nt*kv.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},kv.prototype.addCollinear=function(nt){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===uv.JOIN_BEVEL||this._bufParams.getJoinStyle()===uv.JOIN_MITRE?(nt&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,Og.CLOCKWISE,this._distance))},kv.prototype.closeRing=function(){this._segList.closeRing()},kv.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},kv.prototype.interfaces_=function(){return[]},kv.prototype.getClass=function(){return kv},tx.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},tx.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},tx.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},tx.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(kv,tx);var Kg=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var nt=arguments[0],at=arguments[1];this._precisionModel=nt,this._bufParams=at};Kg.prototype.getOffsetCurve=function(nt,at){if(this._distance=at,at===0)return null;var wt=at<0,lo=Math.abs(at),fo=this.getSegGen(lo);nt.length<=1?this.computePointCurve(nt[0],fo):this.computeOffsetCurve(nt,wt,fo);var vo=fo.getCoordinates();return wt&&Cm.reverse(vo),vo},Kg.prototype.computeSingleSidedBufferCurve=function(nt,at,wt){var lo=this.simplifyTolerance(this._distance);if(at){wt.addSegments(nt,!0);var fo=Ev.simplify(nt,-lo),vo=fo.length-1;wt.initSideSegments(fo[vo],fo[vo-1],$g.LEFT),wt.addFirstSegment();for(var ls=vo-2;ls>=0;ls--)wt.addNextSegment(fo[ls],!0)}else{wt.addSegments(nt,!1);var ff=Ev.simplify(nt,lo),mf=ff.length-1;wt.initSideSegments(ff[0],ff[1],$g.LEFT),wt.addFirstSegment();for(var bf=2;bf<=mf;bf++)wt.addNextSegment(ff[bf],!0)}wt.addLastSegment(),wt.closeRing()},Kg.prototype.computeRingBufferCurve=function(nt,at,wt){var lo=this.simplifyTolerance(this._distance);at===$g.RIGHT&&(lo=-lo);var fo=Ev.simplify(nt,lo),vo=fo.length-1;wt.initSideSegments(fo[vo-1],fo[0],at);for(var ls=1;ls<=vo;ls++){var ff=ls!==1;wt.addNextSegment(fo[ls],ff)}wt.closeRing()},Kg.prototype.computeLineBufferCurve=function(nt,at){var wt=this.simplifyTolerance(this._distance),lo=Ev.simplify(nt,wt),fo=lo.length-1;at.initSideSegments(lo[0],lo[1],$g.LEFT);for(var vo=2;vo<=fo;vo++)at.addNextSegment(lo[vo],!0);at.addLastSegment(),at.addLineEndCap(lo[fo-1],lo[fo]);var ls=Ev.simplify(nt,-wt),ff=ls.length-1;at.initSideSegments(ls[ff],ls[ff-1],$g.LEFT);for(var mf=ff-2;mf>=0;mf--)at.addNextSegment(ls[mf],!0);at.addLastSegment(),at.addLineEndCap(ls[1],ls[0]),at.closeRing()},Kg.prototype.computePointCurve=function(nt,at){switch(this._bufParams.getEndCapStyle()){case uv.CAP_ROUND:at.createCircle(nt);break;case uv.CAP_SQUARE:at.createSquare(nt)}},Kg.prototype.getLineCurve=function(nt,at){if(this._distance=at,at<0&&!this._bufParams.isSingleSided()||at===0)return null;var wt=Math.abs(at),lo=this.getSegGen(wt);if(nt.length<=1)this.computePointCurve(nt[0],lo);else if(this._bufParams.isSingleSided()){var fo=at<0;this.computeSingleSidedBufferCurve(nt,fo,lo)}else this.computeLineBufferCurve(nt,lo);return lo.getCoordinates()},Kg.prototype.getBufferParameters=function(){return this._bufParams},Kg.prototype.simplifyTolerance=function(nt){return nt*this._bufParams.getSimplifyFactor()},Kg.prototype.getRingCurve=function(nt,at,wt){if(this._distance=wt,nt.length<=2)return this.getLineCurve(nt,wt);if(wt===0)return Kg.copyCoordinates(nt);var lo=this.getSegGen(wt);return this.computeRingBufferCurve(nt,at,lo),lo.getCoordinates()},Kg.prototype.computeOffsetCurve=function(nt,at,wt){var lo=this.simplifyTolerance(this._distance);if(at){var fo=Ev.simplify(nt,-lo),vo=fo.length-1;wt.initSideSegments(fo[vo],fo[vo-1],$g.LEFT),wt.addFirstSegment();for(var ls=vo-2;ls>=0;ls--)wt.addNextSegment(fo[ls],!0)}else{var ff=Ev.simplify(nt,lo),mf=ff.length-1;wt.initSideSegments(ff[0],ff[1],$g.LEFT),wt.addFirstSegment();for(var bf=2;bf<=mf;bf++)wt.addNextSegment(ff[bf],!0)}wt.addLastSegment()},Kg.prototype.getSegGen=function(nt){return new kv(this._precisionModel,this._bufParams,nt)},Kg.prototype.interfaces_=function(){return[]},Kg.prototype.getClass=function(){return Kg},Kg.copyCoordinates=function(nt){for(var at=new Array(nt.length).fill(null),wt=0;wtvo.getMaxY()||nt.findStabbedSegments(at,fo.getDirectedEdges(),wt)}return wt}if(arguments.length===3){if(nm(arguments[2],u1)&&arguments[0]instanceof Gp&&arguments[1]instanceof _E)for(var ls=arguments[0],ff=arguments[1],mf=arguments[2],bf=ff.getEdge().getCoordinates(),Sf=0;Sfnt._seg.p1.y&&nt._seg.reverse();var wf=Math.max(nt._seg.p0.x,nt._seg.p1.x);if(!(wfnt._seg.p1.y||Og.computeOrientation(nt._seg.p0,nt._seg.p1,ls)===Og.RIGHT)){var If=ff.getDepth($g.LEFT);nt._seg.p0.equals(bf[Sf])||(If=ff.getDepth($g.RIGHT));var jf=new a_(nt._seg,If);mf.add(jf)}}else if(nm(arguments[2],u1)&&arguments[0]instanceof Gp&&nm(arguments[1],u1))for(var zf=arguments[0],Wf=arguments[1],Mf=arguments[2],np=Wf.iterator();np.hasNext();){var pp=np.next();pp.isForward()&&nt.findStabbedSegments(zf,pp,Mf)}}},Y_.prototype.getDepth=function(nt){var at=this.findStabbedSegments(nt);return at.size()===0?0:v1.min(at)._leftDepth},Y_.prototype.interfaces_=function(){return[]},Y_.prototype.getClass=function(){return Y_},Jk.DepthSegment.get=function(){return a_},Object.defineProperties(Y_,Jk);var a_=function(){this._upwardSeg=null,this._leftDepth=null;var nt=arguments[0],at=arguments[1];this._upwardSeg=new Vg(nt),this._leftDepth=at};a_.prototype.compareTo=function(nt){var at=nt;if(this._upwardSeg.minX()>=at._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=at._upwardSeg.minX())return-1;var wt=this._upwardSeg.orientationIndex(at._upwardSeg);return wt!==0||(wt=-1*at._upwardSeg.orientationIndex(this._upwardSeg))!==0?wt:this._upwardSeg.compareTo(at._upwardSeg)},a_.prototype.compareX=function(nt,at){var wt=nt.p0.compareTo(at.p0);return wt!==0?wt:nt.p1.compareTo(at.p1)},a_.prototype.toString=function(){return this._upwardSeg.toString()},a_.prototype.interfaces_=function(){return[G0]},a_.prototype.getClass=function(){return a_};var fm=function(nt,at,wt){this.p0=nt||null,this.p1=at||null,this.p2=wt||null};fm.prototype.area=function(){return fm.area(this.p0,this.p1,this.p2)},fm.prototype.signedArea=function(){return fm.signedArea(this.p0,this.p1,this.p2)},fm.prototype.interpolateZ=function(nt){if(nt===null)throw new Pv("Supplied point is null.");return fm.interpolateZ(nt,this.p0,this.p1,this.p2)},fm.prototype.longestSideLength=function(){return fm.longestSideLength(this.p0,this.p1,this.p2)},fm.prototype.isAcute=function(){return fm.isAcute(this.p0,this.p1,this.p2)},fm.prototype.circumcentre=function(){return fm.circumcentre(this.p0,this.p1,this.p2)},fm.prototype.area3D=function(){return fm.area3D(this.p0,this.p1,this.p2)},fm.prototype.centroid=function(){return fm.centroid(this.p0,this.p1,this.p2)},fm.prototype.inCentre=function(){return fm.inCentre(this.p0,this.p1,this.p2)},fm.prototype.interfaces_=function(){return[]},fm.prototype.getClass=function(){return fm},fm.area=function(nt,at,wt){return Math.abs(((wt.x-nt.x)*(at.y-nt.y)-(at.x-nt.x)*(wt.y-nt.y))/2)},fm.signedArea=function(nt,at,wt){return((wt.x-nt.x)*(at.y-nt.y)-(at.x-nt.x)*(wt.y-nt.y))/2},fm.det=function(nt,at,wt,lo){return nt*lo-at*wt},fm.interpolateZ=function(nt,at,wt,lo){var fo=at.x,vo=at.y,ls=wt.x-fo,ff=lo.x-fo,mf=wt.y-vo,bf=lo.y-vo,Sf=ls*bf-ff*mf,wf=nt.x-fo,If=nt.y-vo,jf=(bf*wf-ff*If)/Sf,zf=(-mf*wf+ls*If)/Sf;return at.z+jf*(wt.z-at.z)+zf*(lo.z-at.z)},fm.longestSideLength=function(nt,at,wt){var lo=nt.distance(at),fo=at.distance(wt),vo=wt.distance(nt),ls=lo;return fo>ls&&(ls=fo),vo>ls&&(ls=vo),ls},fm.isAcute=function(nt,at,wt){return!!Mm.isAcute(nt,at,wt)&&!!Mm.isAcute(at,wt,nt)&&!!Mm.isAcute(wt,nt,at)},fm.circumcentre=function(nt,at,wt){var lo=wt.x,fo=wt.y,vo=nt.x-lo,ls=nt.y-fo,ff=at.x-lo,mf=at.y-fo,bf=2*fm.det(vo,ls,ff,mf),Sf=fm.det(ls,vo*vo+ls*ls,mf,ff*ff+mf*mf),wf=fm.det(vo,vo*vo+ls*ls,ff,ff*ff+mf*mf);return new Gp(lo-Sf/bf,fo+wf/bf)},fm.perpendicularBisector=function(nt,at){var wt=at.x-nt.x,lo=at.y-nt.y,fo=new q0(nt.x+wt/2,nt.y+lo/2,1),vo=new q0(nt.x-lo+wt/2,nt.y+wt+lo/2,1);return new q0(fo,vo)},fm.angleBisector=function(nt,at,wt){var lo=at.distance(nt),fo=lo/(lo+at.distance(wt)),vo=wt.x-nt.x,ls=wt.y-nt.y;return new Gp(nt.x+fo*vo,nt.y+fo*ls)},fm.area3D=function(nt,at,wt){var lo=at.x-nt.x,fo=at.y-nt.y,vo=at.z-nt.z,ls=wt.x-nt.x,ff=wt.y-nt.y,mf=wt.z-nt.z,bf=fo*mf-vo*ff,Sf=vo*ls-lo*mf,wf=lo*ff-fo*ls,If=bf*bf+Sf*Sf+wf*wf,jf=Math.sqrt(If)/2;return jf},fm.centroid=function(nt,at,wt){var lo=(nt.x+at.x+wt.x)/3,fo=(nt.y+at.y+wt.y)/3;return new Gp(lo,fo)},fm.inCentre=function(nt,at,wt){var lo=at.distance(wt),fo=nt.distance(wt),vo=nt.distance(at),ls=lo+fo+vo,ff=(lo*nt.x+fo*at.x+vo*wt.x)/ls,mf=(lo*nt.y+fo*at.y+vo*wt.y)/ls;return new Gp(ff,mf)};var u0=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Sg;var nt=arguments[0],at=arguments[1],wt=arguments[2];this._inputGeom=nt,this._distance=at,this._curveBuilder=wt};u0.prototype.addPoint=function(nt){if(this._distance<=0)return null;var at=nt.getCoordinates(),wt=this._curveBuilder.getLineCurve(at,this._distance);this.addCurve(wt,eg.EXTERIOR,eg.INTERIOR)},u0.prototype.addPolygon=function(nt){var at=this,wt=this._distance,lo=$g.LEFT;this._distance<0&&(wt=-this._distance,lo=$g.RIGHT);var fo=nt.getExteriorRing(),vo=Cm.removeRepeatedPoints(fo.getCoordinates());if(this._distance<0&&this.isErodedCompletely(fo,this._distance)||this._distance<=0&&vo.length<3)return null;this.addPolygonRing(vo,wt,lo,eg.EXTERIOR,eg.INTERIOR);for(var ls=0;ls0&&at.isErodedCompletely(ff,-at._distance)||at.addPolygonRing(mf,wt,$g.opposite(lo),eg.INTERIOR,eg.EXTERIOR)}},u0.prototype.isTriangleErodedCompletely=function(nt,at){var wt=new fm(nt[0],nt[1],nt[2]),lo=wt.inCentre();return Og.distancePointLine(lo,wt.p0,wt.p1)=hb.MINIMUM_VALID_SIZE&&Og.isCCW(nt)&&(vo=fo,ls=lo,wt=$g.opposite(wt));var ff=this._curveBuilder.getRingCurve(nt,wt,at);this.addCurve(ff,vo,ls)},u0.prototype.add=function(nt){if(nt.isEmpty())return null;nt instanceof oy?this.addPolygon(nt):nt instanceof Av?this.addLineString(nt):nt instanceof x0?this.addPoint(nt):(nt instanceof Zw||nt instanceof b$||nt instanceof db||nt instanceof Zy)&&this.addCollection(nt)},u0.prototype.isErodedCompletely=function(nt,at){var wt=nt.getCoordinates();if(wt.length<4)return at<0;if(wt.length===4)return this.isTriangleErodedCompletely(wt,at);var lo=nt.getEnvelopeInternal(),fo=Math.min(lo.getHeight(),lo.getWidth());return at<0&&2*Math.abs(at)>fo},u0.prototype.addCollection=function(nt){for(var at=0;at=this._max)throw new U_;var nt=this._parent.getGeometryN(this._index++);return nt instanceof Zy?(this._subcollectionIterator=new j1(nt),this._subcollectionIterator.next()):nt},j1.prototype.remove=function(){throw new Error(this.getClass().getName())},j1.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},j1.prototype.interfaces_=function(){return[qw]},j1.prototype.getClass=function(){return j1},j1.isAtomic=function(nt){return!(nt instanceof Zy)};var h0=function(){this._geom=null;var nt=arguments[0];this._geom=nt};h0.prototype.locate=function(nt){return h0.locate(nt,this._geom)},h0.prototype.interfaces_=function(){return[hv]},h0.prototype.getClass=function(){return h0},h0.isPointInRing=function(nt,at){return!!at.getEnvelopeInternal().intersects(nt)&&Og.isPointInRing(nt,at.getCoordinates())},h0.containsPointInPolygon=function(nt,at){if(at.isEmpty())return!1;var wt=at.getExteriorRing();if(!h0.isPointInRing(nt,wt))return!1;for(var lo=0;lo=0;fo--){var vo=this._edgeList.get(fo),ls=vo.getSym();lo===null&&(lo=ls),wt!==null&&ls.setNext(wt),wt=vo}lo.setNext(wt)},at.prototype.computeDepths=function(){var wt=this;if(arguments.length===1){var lo=arguments[0],fo=this.findIndex(lo),vo=lo.getDepth($g.LEFT),ls=lo.getDepth($g.RIGHT),ff=this.computeDepths(fo+1,this._edgeList.size(),vo),mf=this.computeDepths(0,fo,ff);if(mf!==ls)throw new Lb("depth mismatch at "+lo.getCoordinate())}else if(arguments.length===3){for(var bf=arguments[0],Sf=arguments[1],xf=arguments[2],If=xf,jf=bf;jf=0;ff--){var mf=lo._resultAreaEdgeList.get(ff),bf=mf.getSym();switch(fo===null&&mf.getEdgeRing()===wt&&(fo=mf),ls){case lo._SCANNING_FOR_INCOMING:if(bf.getEdgeRing()!==wt)continue;vo=bf,ls=lo._LINKING_TO_OUTGOING;break;case lo._LINKING_TO_OUTGOING:if(mf.getEdgeRing()!==wt)continue;vo.setNextMin(mf),ls=lo._SCANNING_FOR_INCOMING}}ls===this._LINKING_TO_OUTGOING&&(ym.isTrue(fo!==null,"found null for first outgoing dirEdge"),ym.isTrue(fo.getEdgeRing()===wt,"unable to link last incoming dirEdge"),vo.setNextMin(fo))},at.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var wt=0,lo=this.iterator();lo.hasNext();){var fo=lo.next();fo.isInResult()&&wt++}return wt}if(arguments.length===1){for(var vo=arguments[0],ls=0,ff=this.iterator();ff.hasNext();){var mf=ff.next();mf.getEdgeRing()===vo&&ls++}return ls}},at.prototype.getLabel=function(){return this._label},at.prototype.findCoveredLineEdges=function(){for(var wt=eg.NONE,lo=this.iterator();lo.hasNext();){var fo=lo.next(),vo=fo.getSym();if(!fo.isLineEdge()){if(fo.isInResult()){wt=eg.INTERIOR;break}if(vo.isInResult()){wt=eg.EXTERIOR;break}}}if(wt===eg.NONE)return null;for(var ls=wt,ff=this.iterator();ff.hasNext();){var mf=ff.next(),bf=mf.getSym();mf.isLineEdge()?mf.getEdge().setCovered(ls===eg.INTERIOR):(mf.isInResult()&&(ls=eg.EXTERIOR),bf.isInResult()&&(ls=eg.INTERIOR))}},at.prototype.computeLabelling=function(wt){nt.prototype.computeLabelling.call(this,wt),this._label=new fv(eg.NONE);for(var lo=this.iterator();lo.hasNext();)for(var fo=lo.next().getEdge().getLabel(),vo=0;vo<2;vo++){var ls=fo.getLocation(vo);ls!==eg.INTERIOR&&ls!==eg.BOUNDARY||this._label.setLocation(vo,eg.INTERIOR)}},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(xy),Qk=function(nt){function at(){nt.apply(this,arguments)}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.createNode=function(wt){return new $E(wt,new kO)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(Jw),x$=function nt(){this._pts=null,this._orientation=null;var at=arguments[0];this._pts=at,this._orientation=nt.orientation(at)};x$.prototype.compareTo=function(nt){var at=nt;return x$.compareOriented(this._pts,this._orientation,at._pts,at._orientation)},x$.prototype.interfaces_=function(){return[G0]},x$.prototype.getClass=function(){return x$},x$.orientation=function(nt){return Cm.increasingDirection(nt)===1},x$.compareOriented=function(nt,at,wt,lo){for(var fo=at?1:-1,vo=lo?1:-1,ls=at?nt.length:-1,ff=lo?wt.length:-1,mf=at?0:nt.length-1,bf=lo?0:wt.length-1;;){var Sf=nt[mf].compareTo(wt[bf]);if(Sf!==0)return Sf;var xf=(mf+=fo)===ls,If=(bf+=vo)===ff;if(xf&&!If)return-1;if(!xf&&If)return 1;if(xf&&If)return 0}};var T0=function(){this._edges=new Sg,this._ocaMap=new Hy};T0.prototype.print=function(nt){nt.print("MULTILINESTRING ( ");for(var at=0;at0&&nt.print(","),nt.print("(");for(var lo=wt.getCoordinates(),fo=0;fo0&&nt.print(","),nt.print(lo[fo].x+" "+lo[fo].y);nt.println(")")}nt.print(") ")},T0.prototype.addAll=function(nt){for(var at=nt.iterator();at.hasNext();)this.add(at.next())},T0.prototype.findEdgeIndex=function(nt){for(var at=0;at0||!at.coord.equals2D(lo);fo||wt--;var vo=new Array(wt).fill(null),ls=0;vo[ls++]=new Gp(nt.coord);for(var ff=nt.segmentIndex+1;ff<=at.segmentIndex;ff++)vo[ls++]=this.edge.pts[ff];return fo&&(vo[ls]=at.coord),new rx(vo,new fv(this.edge._label))},ov.prototype.add=function(nt,at,wt){var lo=new z1(nt,at,wt),fo=this._nodeMap.get(lo);return fo!==null?fo:(this._nodeMap.put(lo,lo),lo)},ov.prototype.isIntersection=function(nt){for(var at=this.iterator();at.hasNext();)if(at.next().coord.equals(nt))return!0;return!1},ov.prototype.interfaces_=function(){return[]},ov.prototype.getClass=function(){return ov};var E$=function(){};E$.prototype.getChainStartIndices=function(nt){var at=0,wt=new Sg;wt.add(new R1(at));do{var lo=this.findChainEnd(nt,at);wt.add(new R1(lo)),at=lo}while(atwt?at:wt},sy.prototype.getMinX=function(nt){var at=this.pts[this.startIndex[nt]].x,wt=this.pts[this.startIndex[nt+1]].x;return atwt&&(fo=1),nt._depth[at][lo]=fo}}},Xv.prototype.getDelta=function(nt){return this._depth[nt][$g.RIGHT]-this._depth[nt][$g.LEFT]},Xv.prototype.getLocation=function(nt,at){return this._depth[nt][at]<=0?eg.EXTERIOR:eg.INTERIOR},Xv.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},Xv.prototype.add=function(){var nt=this;if(arguments.length===1)for(var at=arguments[0],wt=0;wt<2;wt++)for(var lo=1;lo<3;lo++){var fo=at.getLocation(wt,lo);fo!==eg.EXTERIOR&&fo!==eg.INTERIOR||(nt.isNull(wt,lo)?nt._depth[wt][lo]=Xv.depthAtLocation(fo):nt._depth[wt][lo]+=Xv.depthAtLocation(fo))}else if(arguments.length===3){var vo=arguments[0],ls=arguments[1],ff=arguments[2];ff===eg.INTERIOR&&this._depth[vo][ls]++}},Xv.prototype.interfaces_=function(){return[]},Xv.prototype.getClass=function(){return Xv},Xv.depthAtLocation=function(nt){return nt===eg.EXTERIOR?0:nt===eg.INTERIOR?1:Xv.NULL_VALUE},gb.NULL_VALUE.get=function(){return-1},Object.defineProperties(Xv,gb);var rx=function(nt){function at(){if(nt.call(this),this.pts=null,this._env=null,this.eiList=new ov(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Xv,this._depthDelta=0,arguments.length===1){var wt=arguments[0];at.call(this,wt,null)}else if(arguments.length===2){var lo=arguments[0],fo=arguments[1];this.pts=lo,this._label=fo}}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.getDepth=function(){return this._depth},at.prototype.getCollapsedEdge=function(){var wt=new Array(2).fill(null);return wt[0]=this.pts[0],wt[1]=this.pts[1],new at(wt,fv.toLineLabel(this._label))},at.prototype.isIsolated=function(){return this._isIsolated},at.prototype.getCoordinates=function(){return this.pts},at.prototype.setIsolated=function(wt){this._isIsolated=wt},at.prototype.setName=function(wt){this._name=wt},at.prototype.equals=function(wt){if(!(wt instanceof at))return!1;var lo=wt;if(this.pts.length!==lo.pts.length)return!1;for(var fo=!0,vo=!0,ls=this.pts.length,ff=0;ff0?this.pts[0]:null;if(arguments.length===1){var wt=arguments[0];return this.pts[wt]}},at.prototype.print=function(wt){wt.print("edge "+this._name+": "),wt.print("LINESTRING (");for(var lo=0;lo0&&wt.print(","),wt.print(this.pts[lo].x+" "+this.pts[lo].y);wt.print(") "+this._label+" "+this._depthDelta)},at.prototype.computeIM=function(wt){at.updateIM(this._label,wt)},at.prototype.isCollapsed=function(){return!!this._label.isArea()&&this.pts.length===3&&!!this.pts[0].equals(this.pts[2])},at.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},at.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},at.prototype.getDepthDelta=function(){return this._depthDelta},at.prototype.getNumPoints=function(){return this.pts.length},at.prototype.printReverse=function(wt){wt.print("edge "+this._name+": ");for(var lo=this.pts.length-1;lo>=0;lo--)wt.print(this.pts[lo]+" ");wt.println("")},at.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new sy(this)),this._mce},at.prototype.getEnvelope=function(){if(this._env===null){this._env=new Wg;for(var wt=0;wt0&&wt.append(","),wt.append(this.pts[lo].x+" "+this.pts[lo].y);return wt.append(") "+this._label+" "+this._depthDelta),wt.toString()},at.prototype.isPointwiseEqual=function(wt){if(this.pts.length!==wt.pts.length)return!1;for(var lo=0;lolo||this._maxyvo;if(ls)return!1;var ff=this.intersectsToleranceSquare(nt,at);return ym.isTrue(!(ls&&ff),"Found bad envelope test"),ff},Jy.prototype.initCorners=function(nt){var at=.5;this._minx=nt.x-at,this._maxx=nt.x+at,this._miny=nt.y-at,this._maxy=nt.y+at,this._corner[0]=new Gp(this._maxx,this._maxy),this._corner[1]=new Gp(this._minx,this._maxy),this._corner[2]=new Gp(this._minx,this._miny),this._corner[3]=new Gp(this._maxx,this._miny)},Jy.prototype.intersects=function(nt,at){return this._scaleFactor===1?this.intersectsScaled(nt,at):(this.copyScaled(nt,this._p0Scaled),this.copyScaled(at,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},Jy.prototype.scale=function(nt){return Math.round(nt*this._scaleFactor)},Jy.prototype.getCoordinate=function(){return this._originalPt},Jy.prototype.copyScaled=function(nt,at){at.x=this.scale(nt.x),at.y=this.scale(nt.y)},Jy.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var nt=Jy.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Wg(this._originalPt.x-nt,this._originalPt.x+nt,this._originalPt.y-nt,this._originalPt.y+nt)}return this._safeEnv},Jy.prototype.intersectsPixelClosure=function(nt,at){return this._li.computeIntersection(nt,at,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(nt,at,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(nt,at,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(nt,at,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},Jy.prototype.intersectsToleranceSquare=function(nt,at){var wt=!1,lo=!1;return this._li.computeIntersection(nt,at,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(nt,at,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(wt=!0),this._li.computeIntersection(nt,at,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(lo=!0),this._li.computeIntersection(nt,at,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!wt||!lo)||!!nt.equals(this._pt)||!!at.equals(this._pt))))},Jy.prototype.addSnappedNode=function(nt,at){var wt=nt.getCoordinate(at),lo=nt.getCoordinate(at+1);return!!this.intersects(wt,lo)&&(nt.addIntersection(this.getCoordinate(),at),!0)},Jy.prototype.interfaces_=function(){return[]},Jy.prototype.getClass=function(){return Jy},M0.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(Jy,M0);var Zv=function(){this.tempEnv1=new Wg,this.selectedSegment=new Vg};Zv.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var nt=arguments[0],at=arguments[1];nt.getLineSegment(at,this.selectedSegment),this.select(this.selectedSegment)}}},Zv.prototype.interfaces_=function(){return[]},Zv.prototype.getClass=function(){return Zv};var mb=function(){this._index=null;var nt=arguments[0];this._index=nt},p2={HotPixelSnapAction:{configurable:!0}};mb.prototype.snap=function(){if(arguments.length===1){var nt=arguments[0];return this.snap(nt,null,-1)}if(arguments.length===3){var at=arguments[0],wt=arguments[1],lo=arguments[2],fo=at.getSafeEnvelope(),vo=new nx(at,wt,lo);return this._index.query(fo,{interfaces_:function(){return[_$]},visitItem:function(ls){ls.select(fo,vo)}}),vo.isNodeAdded()}},mb.prototype.interfaces_=function(){return[]},mb.prototype.getClass=function(){return mb},p2.HotPixelSnapAction.get=function(){return nx},Object.defineProperties(mb,p2);var nx=function(nt){function at(){nt.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var wt=arguments[0],lo=arguments[1],fo=arguments[2];this._hotPixel=wt,this._parentEdge=lo,this._hotPixelVertexIndex=fo}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.isNodeAdded=function(){return this._isNodeAdded},at.prototype.select=function(){if(arguments.length!==2)return nt.prototype.select.apply(this,arguments);var wt=arguments[0],lo=arguments[1],fo=wt.getContext();if(this._parentEdge!==null&&fo===this._parentEdge&&lo===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(fo,lo)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(Zv),X_=function(){this._li=null,this._interiorIntersections=null;var nt=arguments[0];this._li=nt,this._interiorIntersections=new Sg};X_.prototype.processIntersections=function(nt,at,wt,lo){if(nt===wt&&at===lo)return null;var fo=nt.getCoordinates()[at],vo=nt.getCoordinates()[at+1],ls=wt.getCoordinates()[lo],ff=wt.getCoordinates()[lo+1];if(this._li.computeIntersection(fo,vo,ls,ff),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var mf=0;mf=0;at--){try{nt.bufferReducedPrecision(at)}catch(vo){if(!(vo instanceof Lb))throw vo;nt._saveException=vo}if(nt._resultGeometry!==null)return null}throw this._saveException}if(arguments.length===1){var wt=arguments[0],lo=bv.precisionScaleFactor(this._argGeom,this._distance,wt),fo=new cv(lo);this.bufferFixedPrecision(fo)}},bv.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var nt=this._argGeom.getFactory().getPrecisionModel();nt.getType()===cv.FIXED?this.bufferFixedPrecision(nt):this.bufferReducedPrecision()},bv.prototype.setQuadrantSegments=function(nt){this._bufParams.setQuadrantSegments(nt)},bv.prototype.bufferOriginalPrecision=function(){try{var nt=new Ey(this._bufParams);this._resultGeometry=nt.buffer(this._argGeom,this._distance)}catch(at){if(!(at instanceof Nb))throw at;this._saveException=at}},bv.prototype.getResultGeometry=function(nt){return this._distance=nt,this.computeGeometry(),this._resultGeometry},bv.prototype.setEndCapStyle=function(nt){this._bufParams.setEndCapStyle(nt)},bv.prototype.interfaces_=function(){return[]},bv.prototype.getClass=function(){return bv},bv.bufferOp=function(){if(arguments.length===2){var nt=arguments[0],at=arguments[1],wt=new bv(nt),lo=wt.getResultGeometry(at);return lo}if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof tm&&typeof arguments[1]=="number"){var fo=arguments[0],vo=arguments[1],ls=arguments[2],ff=new bv(fo);ff.setQuadrantSegments(ls);var mf=ff.getResultGeometry(vo);return mf}if(arguments[2]instanceof uv&&arguments[0]instanceof tm&&typeof arguments[1]=="number"){var bf=arguments[0],Sf=arguments[1],xf=arguments[2],If=new bv(bf,xf),jf=If.getResultGeometry(Sf);return jf}}else if(arguments.length===4){var zf=arguments[0],Wf=arguments[1],Mf=arguments[2],np=arguments[3],pp=new bv(zf);pp.setQuadrantSegments(Mf),pp.setEndCapStyle(np);var Uf=pp.getResultGeometry(Wf);return Uf}},bv.precisionScaleFactor=function(nt,at,wt){var lo=nt.getEnvelopeInternal(),fo=A0.max(Math.abs(lo.getMaxX()),Math.abs(lo.getMaxY()),Math.abs(lo.getMinX()),Math.abs(lo.getMinY()))+2*(at>0?at:0),vo=wt-Math.trunc(Math.log(fo)/Math.log(10)+1);return Math.pow(10,vo)},D0.CAP_ROUND.get=function(){return uv.CAP_ROUND},D0.CAP_BUTT.get=function(){return uv.CAP_FLAT},D0.CAP_FLAT.get=function(){return uv.CAP_FLAT},D0.CAP_SQUARE.get=function(){return uv.CAP_SQUARE},D0.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(bv,D0);var Sy=function(){this._pt=[new Gp,new Gp],this._distance=dm.NaN,this._isNull=!0};Sy.prototype.getCoordinates=function(){return this._pt},Sy.prototype.getCoordinate=function(nt){return this._pt[nt]},Sy.prototype.setMinimum=function(){if(arguments.length===1){var nt=arguments[0];this.setMinimum(nt._pt[0],nt._pt[1])}else if(arguments.length===2){var at=arguments[0],wt=arguments[1];if(this._isNull)return this.initialize(at,wt),null;var lo=at.distance(wt);lothis._distance&&this.initialize(at,wt,lo)}},Sy.prototype.interfaces_=function(){return[]},Sy.prototype.getClass=function(){return Sy};var L0=function(){};L0.prototype.interfaces_=function(){return[]},L0.prototype.getClass=function(){return L0},L0.computeDistance=function(){if(arguments[2]instanceof Sy&&arguments[0]instanceof Av&&arguments[1]instanceof Gp)for(var nt=arguments[0],at=arguments[1],wt=arguments[2],lo=nt.getCoordinates(),fo=new Vg,vo=0;vo0||this._isIn?eg.INTERIOR:eg.EXTERIOR)},F0.prototype.interfaces_=function(){return[]},F0.prototype.getClass=function(){return F0};var Qy=function nt(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var at=arguments[0],wt=arguments[1];nt.call(this,at,nt.INSIDE_AREA,wt)}else if(arguments.length===3){var lo=arguments[0],fo=arguments[1],vo=arguments[2];this._component=lo,this._segIndex=fo,this._pt=vo}},eC={INSIDE_AREA:{configurable:!0}};Qy.prototype.isInsideArea=function(){return this._segIndex===Qy.INSIDE_AREA},Qy.prototype.getCoordinate=function(){return this._pt},Qy.prototype.getGeometryComponent=function(){return this._component},Qy.prototype.getSegmentIndex=function(){return this._segIndex},Qy.prototype.interfaces_=function(){return[]},Qy.prototype.getClass=function(){return Qy},eC.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Qy,eC);var T$=function(nt){this._pts=nt||null};T$.prototype.filter=function(nt){nt instanceof x0&&this._pts.add(nt)},T$.prototype.interfaces_=function(){return[D1]},T$.prototype.getClass=function(){return T$},T$.getPoints=function(){if(arguments.length===1){var nt=arguments[0];return nt instanceof x0?v1.singletonList(nt):T$.getPoints(nt,new Sg)}if(arguments.length===2){var at=arguments[0],wt=arguments[1];return at instanceof x0?wt.add(at):at instanceof Zy&&at.apply(new T$(wt)),wt}};var Bb=function(){this._locations=null;var nt=arguments[0];this._locations=nt};Bb.prototype.filter=function(nt){(nt instanceof x0||nt instanceof Av||nt instanceof oy)&&this._locations.add(new Qy(nt,0,nt.getCoordinate()))},Bb.prototype.interfaces_=function(){return[D1]},Bb.prototype.getClass=function(){return Bb},Bb.getLocations=function(nt){var at=new Sg;return nt.apply(new Bb(at)),at};var Ty=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new F0,this._minDistanceLocation=null,this._minDistance=dm.MAX_VALUE,arguments.length===2){var nt=arguments[0],at=arguments[1];this._geom=[nt,at],this._terminateDistance=0}else if(arguments.length===3){var wt=arguments[0],lo=arguments[1],fo=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=wt,this._geom[1]=lo,this._terminateDistance=fo}};Ty.prototype.computeContainmentDistance=function(){var nt=this;if(arguments.length===0){var at=new Array(2).fill(null);if(this.computeContainmentDistance(0,at),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,at)}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1],fo=1-wt,vo=Fb.getPolygons(this._geom[wt]);if(vo.size()>0){var ls=Bb.getLocations(this._geom[fo]);if(this.computeContainmentDistance(ls,vo,lo),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[fo]=lo[0],this._minDistanceLocation[wt]=lo[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&nm(arguments[0],u1)&&nm(arguments[1],u1)){for(var ff=arguments[0],mf=arguments[1],bf=arguments[2],Sf=0;Sfthis._minDistance)return null;for(var fo=at.getCoordinates(),vo=wt.getCoordinate(),ls=0;lsthis._minDistance)return null;for(var jf=Sf.getCoordinates(),zf=xf.getCoordinates(),Wf=0;Wfthis._distance&&this.initialize(at,wt,lo)}},Gy.prototype.interfaces_=function(){return[]},Gy.prototype.getClass=function(){return Gy};var $1=function(){};$1.prototype.interfaces_=function(){return[]},$1.prototype.getClass=function(){return $1},$1.computeDistance=function(){if(arguments[2]instanceof Gy&&arguments[0]instanceof Av&&arguments[1]instanceof Gp)for(var nt=arguments[0],at=arguments[1],wt=arguments[2],lo=new Vg,fo=nt.getCoordinates(),vo=0;vo1||nt<=0)throw new Pv("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=nt},B0.prototype.compute=function(nt,at){this.computeOrientedDistance(nt,at,this._ptDist),this.computeOrientedDistance(at,nt,this._ptDist)},B0.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},B0.prototype.computeOrientedDistance=function(nt,at,wt){var lo=new J_(at);if(nt.apply(lo),wt.setMaximum(lo.getMaxPointDistance()),this._densifyFrac>0){var fo=new k$(at,this._densifyFrac);nt.apply(fo),wt.setMaximum(fo.getMaxPointDistance())}},B0.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},B0.prototype.interfaces_=function(){return[]},B0.prototype.getClass=function(){return B0},B0.distance=function(){if(arguments.length===2){var nt=arguments[0],at=arguments[1],wt=new B0(nt,at);return wt.distance()}if(arguments.length===3){var lo=arguments[0],fo=arguments[1],vo=arguments[2],ls=new B0(lo,fo);return ls.setDensifyFraction(vo),ls.distance()}},Z_.MaxPointDistanceFilter.get=function(){return J_},Z_.MaxDensifiedByFractionDistanceFilter.get=function(){return k$},Object.defineProperties(B0,Z_);var J_=function(){this._maxPtDist=new Gy,this._minPtDist=new Gy,this._euclideanDist=new $1,this._geom=null;var nt=arguments[0];this._geom=nt};J_.prototype.filter=function(nt){this._minPtDist.initialize(),$1.computeDistance(this._geom,nt,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},J_.prototype.getMaxPointDistance=function(){return this._maxPtDist},J_.prototype.interfaces_=function(){return[lb]},J_.prototype.getClass=function(){return J_};var k$=function(){this._maxPtDist=new Gy,this._minPtDist=new Gy,this._geom=null,this._numSubSegs=0;var nt=arguments[0],at=arguments[1];this._geom=nt,this._numSubSegs=Math.trunc(Math.round(1/at))};k$.prototype.filter=function(nt,at){var wt=this;if(at===0)return null;for(var lo=nt.getCoordinate(at-1),fo=nt.getCoordinate(at),vo=(fo.x-lo.x)/this._numSubSegs,ls=(fo.y-lo.y)/this._numSubSegs,ff=0;ffwt){this._isValid=!1;var fo=lo.getCoordinates();this._errorLocation=fo[1],this._errorIndicator=nt.getFactory().createLineString(fo),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+c1.toLineString(fo[0],fo[1])+")"}},C0.prototype.isValid=function(){var nt=Math.abs(this._bufDistance),at=C0.MAX_DISTANCE_DIFF_FRAC*nt;return this._minValidDistance=nt-at,this._maxValidDistance=nt+at,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),C0.VERBOSE&&Ry.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},C0.prototype.checkNegativeValid=function(){if(!(this._input instanceof oy||this._input instanceof db||this._input instanceof Zy))return null;var nt=this.getPolygonLines(this._input);if(this.checkMinimumDistance(nt,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(nt,this._result,this._maxValidDistance)},C0.prototype.getErrorIndicator=function(){return this._errorIndicator},C0.prototype.checkMinimumDistance=function(nt,at,wt){var lo=new Ty(nt,at,wt);if(this._minDistanceFound=lo.distance(),this._minDistanceFound0&&nt>at&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&nt=2||this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},My.prototype.report=function(nt){if(!My.VERBOSE)return null;Ry.out.println("Check "+nt+": "+(this._isValid?"passed":"FAILED"))},My.prototype.getErrorMessage=function(){return this._errorMsg},My.prototype.interfaces_=function(){return[]},My.prototype.getClass=function(){return My},My.isValidMsg=function(nt,at,wt){var lo=new My(nt,at,wt);return lo.isValid()?null:lo.getErrorMessage()},My.isValid=function(nt,at,wt){return!!new My(nt,at,wt).isValid()},QS.VERBOSE.get=function(){return!1},QS.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(My,QS);var U1=function(){this._pts=null,this._data=null;var nt=arguments[0],at=arguments[1];this._pts=nt,this._data=at};U1.prototype.getCoordinates=function(){return this._pts},U1.prototype.size=function(){return this._pts.length},U1.prototype.getCoordinate=function(nt){return this._pts[nt]},U1.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},U1.prototype.getSegmentOctant=function(nt){return nt===this._pts.length-1?-1:y1.octant(this.getCoordinate(nt),this.getCoordinate(nt+1))},U1.prototype.setData=function(nt){this._data=nt},U1.prototype.getData=function(){return this._data},U1.prototype.toString=function(){return c1.toLineString(new Uv(this._pts))},U1.prototype.interfaces_=function(){return[ay]},U1.prototype.getClass=function(){return U1};var ky=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Sg,this._intersectionCount=0,this._keepIntersections=!0;var nt=arguments[0];this._li=nt,this._interiorIntersection=null};ky.prototype.getInteriorIntersection=function(){return this._interiorIntersection},ky.prototype.setCheckEndSegmentsOnly=function(nt){this._isCheckEndSegmentsOnly=nt},ky.prototype.getIntersectionSegments=function(){return this._intSegments},ky.prototype.count=function(){return this._intersectionCount},ky.prototype.getIntersections=function(){return this._intersections},ky.prototype.setFindAllIntersections=function(nt){this._findAllIntersections=nt},ky.prototype.setKeepIntersections=function(nt){this._keepIntersections=nt},ky.prototype.processIntersections=function(nt,at,wt,lo){if(!this._findAllIntersections&&this.hasIntersection()||nt===wt&&at===lo||this._isCheckEndSegmentsOnly&&!(this.isEndSegment(nt,at)||this.isEndSegment(wt,lo)))return null;var fo=nt.getCoordinates()[at],vo=nt.getCoordinates()[at+1],ls=wt.getCoordinates()[lo],ff=wt.getCoordinates()[lo+1];this._li.computeIntersection(fo,vo,ls,ff),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=fo,this._intSegments[1]=vo,this._intSegments[2]=ls,this._intSegments[3]=ff,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},ky.prototype.isEndSegment=function(nt,at){return at===0||at>=nt.size()-2},ky.prototype.hasIntersection=function(){return this._interiorIntersection!==null},ky.prototype.isDone=function(){return!this._findAllIntersections&&this._interiorIntersection!==null},ky.prototype.interfaces_=function(){return[s_]},ky.prototype.getClass=function(){return ky},ky.createAllIntersectionsFinder=function(nt){var at=new ky(nt);return at.setFindAllIntersections(!0),at},ky.createAnyIntersectionFinder=function(nt){return new ky(nt)},ky.createIntersectionCounter=function(nt){var at=new ky(nt);return at.setFindAllIntersections(!0),at.setKeepIntersections(!1),at};var Q0=function(){this._li=new y$,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var nt=arguments[0];this._segStrings=nt};Q0.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},Q0.prototype.getIntersections=function(){return this._segInt.getIntersections()},Q0.prototype.isValid=function(){return this.execute(),this._isValid},Q0.prototype.setFindAllIntersections=function(nt){this._findAllIntersections=nt},Q0.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new ky(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var nt=new ZS;if(nt.setSegmentIntersector(this._segInt),nt.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Q0.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Lb(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Q0.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var nt=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+c1.toLineString(nt[0],nt[1])+" and "+c1.toLineString(nt[2],nt[3])},Q0.prototype.interfaces_=function(){return[]},Q0.prototype.getClass=function(){return Q0},Q0.computeIntersections=function(nt){var at=new Q0(nt);return at.setFindAllIntersections(!0),at.isValid(),at.getIntersections()};var c_=function nt(){this._nv=null;var at=arguments[0];this._nv=new Q0(nt.toSegmentStrings(at))};c_.prototype.checkValid=function(){this._nv.checkValid()},c_.prototype.interfaces_=function(){return[]},c_.prototype.getClass=function(){return c_},c_.toSegmentStrings=function(nt){for(var at=new Sg,wt=nt.iterator();wt.hasNext();){var lo=wt.next();at.add(new U1(lo.getCoordinates(),lo))}return at},c_.checkValid=function(nt){new c_(nt).checkValid()};var Q_=function(nt){this._mapOp=nt};Q_.prototype.map=function(nt){for(var at=new Sg,wt=0;wt0&&lo<4&&!this._preserveType?this._factory.createLineString(wt):this._factory.createLinearRing(wt)},e0.prototype.interfaces_=function(){return[]},e0.prototype.getClass=function(){return e0};var av=function nt(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Vg,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Av&&typeof arguments[1]=="number"){var at=arguments[0],wt=arguments[1];nt.call(this,at.getCoordinates(),wt)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var lo=arguments[0],fo=arguments[1];this._srcPts=lo,this._isClosed=nt.isClosed(lo),this._snapTolerance=fo}};av.prototype.snapVertices=function(nt,at){for(var wt=this._isClosed?nt.size()-1:nt.size(),lo=0;lo=0&&nt.add(vo+1,new Gp(fo),!1)}},av.prototype.findSegmentIndexToSnap=function(nt,at){for(var wt=this,lo=dm.MAX_VALUE,fo=-1,vo=0;voat&&(at=lo)}return at}if(arguments.length===2){var fo=arguments[0],vo=arguments[1];return Math.min(Dm.computeOverlaySnapTolerance(fo),Dm.computeOverlaySnapTolerance(vo))}},Dm.computeSizeBasedSnapTolerance=function(nt){var at=nt.getEnvelopeInternal();return Math.min(at.getHeight(),at.getWidth())*Dm.SNAP_PRECISION_FACTOR},Dm.snapToSelf=function(nt,at,wt){return new Dm(nt).snapToSelf(at,wt)},TE.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Dm,TE);var kE=function(nt){function at(wt,lo,fo){nt.call(this),this._snapTolerance=wt||null,this._snapPts=lo||null,this._isSelfSnap=fo!==void 0&&fo}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.snapLine=function(wt,lo){var fo=new av(wt,this._snapTolerance);return fo.setAllowSnappingToSourceVertices(this._isSelfSnap),fo.snapTo(lo)},at.prototype.transformCoordinates=function(wt,lo){var fo=wt.toCoordinateArray(),vo=this.snapLine(fo,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(vo)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(e0),Cy=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Cy.prototype.getCommon=function(){return dm.longBitsToDouble(this._commonBits)},Cy.prototype.add=function(nt){var at=dm.doubleToLongBits(nt);return this._isFirst?(this._commonBits=at,this._commonSignExp=Cy.signExpBits(this._commonBits),this._isFirst=!1,null):Cy.signExpBits(at)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=Cy.numCommonMostSigMantissaBits(this._commonBits,at),void(this._commonBits=Cy.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},Cy.prototype.toString=function(){if(arguments.length===1){var nt=arguments[0],at=dm.longBitsToDouble(nt),wt=dm.toBinaryString(nt),lo="0000000000000000000000000000000000000000000000000000000000000000"+wt,fo=lo.substring(lo.length-64),vo=fo.substring(0,1)+" "+fo.substring(1,12)+"(exp) "+fo.substring(12)+" [ "+at+" ]";return vo}},Cy.prototype.interfaces_=function(){return[]},Cy.prototype.getClass=function(){return Cy},Cy.getBit=function(nt,at){return nt&1<>52},Cy.zeroLowerBits=function(nt,at){return nt&~((1<=0;lo--){if(Cy.getBit(nt,lo)!==Cy.getBit(at,lo))return wt;wt++}return 52};var G1=function(){this._commonCoord=null,this._ccFilter=new jb},ix={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};G1.prototype.addCommonBits=function(nt){var at=new W1(this._commonCoord);nt.apply(at),nt.geometryChanged()},G1.prototype.removeCommonBits=function(nt){if(this._commonCoord.x===0&&this._commonCoord.y===0)return nt;var at=new Gp(this._commonCoord);at.x=-at.x,at.y=-at.y;var wt=new W1(at);return nt.apply(wt),nt.geometryChanged(),nt},G1.prototype.getCommonCoordinate=function(){return this._commonCoord},G1.prototype.add=function(nt){nt.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},G1.prototype.interfaces_=function(){return[]},G1.prototype.getClass=function(){return G1},ix.CommonCoordinateFilter.get=function(){return jb},ix.Translater.get=function(){return W1},Object.defineProperties(G1,ix);var jb=function(){this._commonBitsX=new Cy,this._commonBitsY=new Cy};jb.prototype.filter=function(nt){this._commonBitsX.add(nt.x),this._commonBitsY.add(nt.y)},jb.prototype.getCommonCoordinate=function(){return new Gp(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},jb.prototype.interfaces_=function(){return[lb]},jb.prototype.getClass=function(){return jb};var W1=function(){this.trans=null;var nt=arguments[0];this.trans=nt};W1.prototype.filter=function(nt,at){var wt=nt.getOrdinate(at,0)+this.trans.x,lo=nt.getOrdinate(at,1)+this.trans.y;nt.setOrdinate(at,0,wt),nt.setOrdinate(at,1,lo)},W1.prototype.isDone=function(){return!1},W1.prototype.isGeometryChanged=function(){return!0},W1.prototype.interfaces_=function(){return[d1]},W1.prototype.getClass=function(){return W1};var ly=function(nt,at){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=nt,this._geom[1]=at,this.computeSnapTolerance()};ly.prototype.selfSnap=function(nt){return new Dm(nt).snapTo(nt,this._snapTolerance)},ly.prototype.removeCommonBits=function(nt){this._cbr=new G1,this._cbr.add(nt[0]),this._cbr.add(nt[1]);var at=new Array(2).fill(null);return at[0]=this._cbr.removeCommonBits(nt[0].copy()),at[1]=this._cbr.removeCommonBits(nt[1].copy()),at},ly.prototype.prepareResult=function(nt){return this._cbr.addCommonBits(nt),nt},ly.prototype.getResultGeometry=function(nt){var at=this.snap(this._geom),wt=vm.overlayOp(at[0],at[1],nt);return this.prepareResult(wt)},ly.prototype.checkValid=function(nt){nt.isValid()||Ry.out.println("Snapped geometry is invalid")},ly.prototype.computeSnapTolerance=function(){this._snapTolerance=Dm.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ly.prototype.snap=function(nt){var at=this.removeCommonBits(nt);return Dm.snap(at[0],at[1],this._snapTolerance)},ly.prototype.interfaces_=function(){return[]},ly.prototype.getClass=function(){return ly},ly.overlayOp=function(nt,at,wt){return new ly(nt,at).getResultGeometry(wt)},ly.union=function(nt,at){return ly.overlayOp(nt,at,vm.UNION)},ly.intersection=function(nt,at){return ly.overlayOp(nt,at,vm.INTERSECTION)},ly.symDifference=function(nt,at){return ly.overlayOp(nt,at,vm.SYMDIFFERENCE)},ly.difference=function(nt,at){return ly.overlayOp(nt,at,vm.DIFFERENCE)};var Oy=function(nt,at){this._geom=new Array(2).fill(null),this._geom[0]=nt,this._geom[1]=at};Oy.prototype.getResultGeometry=function(nt){var at=null,wt=!1,lo=null;try{at=vm.overlayOp(this._geom[0],this._geom[1],nt),wt=!0}catch(fo){if(!(fo instanceof Nb))throw fo;lo=fo}if(!wt)try{at=ly.overlayOp(this._geom[0],this._geom[1],nt)}catch(fo){throw fo instanceof Nb?lo:fo}return at},Oy.prototype.interfaces_=function(){return[]},Oy.prototype.getClass=function(){return Oy},Oy.overlayOp=function(nt,at,wt){return new Oy(nt,at).getResultGeometry(wt)},Oy.union=function(nt,at){return Oy.overlayOp(nt,at,vm.UNION)},Oy.intersection=function(nt,at){return Oy.overlayOp(nt,at,vm.INTERSECTION)},Oy.symDifference=function(nt,at){return Oy.overlayOp(nt,at,vm.SYMDIFFERENCE)},Oy.difference=function(nt,at){return Oy.overlayOp(nt,at,vm.DIFFERENCE)};var u_=function(){this.mce=null,this.chainIndex=null;var nt=arguments[0],at=arguments[1];this.mce=nt,this.chainIndex=at};u_.prototype.computeIntersections=function(nt,at){this.mce.computeIntersectsForChain(this.chainIndex,nt.mce,nt.chainIndex,at)},u_.prototype.interfaces_=function(){return[]},u_.prototype.getClass=function(){return u_};var Wy=function nt(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var at=arguments[0],wt=arguments[1];this._eventType=nt.DELETE,this._xValue=at,this._insertEvent=wt}else if(arguments.length===3){var lo=arguments[0],fo=arguments[1],vo=arguments[2];this._eventType=nt.INSERT,this._label=lo,this._xValue=fo,this._obj=vo}},eT={INSERT:{configurable:!0},DELETE:{configurable:!0}};Wy.prototype.isDelete=function(){return this._eventType===Wy.DELETE},Wy.prototype.setDeleteEventIndex=function(nt){this._deleteEventIndex=nt},Wy.prototype.getObject=function(){return this._obj},Wy.prototype.compareTo=function(nt){var at=nt;return this._xValueat._xValue?1:this._eventTypeat._eventType?1:0},Wy.prototype.getInsertEvent=function(){return this._insertEvent},Wy.prototype.isInsert=function(){return this._eventType===Wy.INSERT},Wy.prototype.isSameLabel=function(nt){return this._label!==null&&this._label===nt._label},Wy.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},Wy.prototype.interfaces_=function(){return[G0]},Wy.prototype.getClass=function(){return Wy},eT.INSERT.get=function(){return 1},eT.DELETE.get=function(){return 2},Object.defineProperties(Wy,eT);var tw=function(){};tw.prototype.interfaces_=function(){return[]},tw.prototype.getClass=function(){return tw};var cy=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var nt=arguments[0],at=arguments[1],wt=arguments[2];this._li=nt,this._includeProper=at,this._recordIsolated=wt};cy.prototype.isTrivialIntersection=function(nt,at,wt,lo){if(nt===wt&&this._li.getIntersectionNum()===1){if(cy.isAdjacentSegments(at,lo))return!0;if(nt.isClosed()){var fo=nt.getNumPoints()-1;if(at===0&&lo===fo||lo===0&&at===fo)return!0}}return!1},cy.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},cy.prototype.setIsDoneIfProperInt=function(nt){this._isDoneWhenProperInt=nt},cy.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},cy.prototype.isBoundaryPointInternal=function(nt,at){for(var wt=at.iterator();wt.hasNext();){var lo=wt.next().getCoordinate();if(nt.isIntersection(lo))return!0}return!1},cy.prototype.hasProperIntersection=function(){return this._hasProper},cy.prototype.hasIntersection=function(){return this._hasIntersection},cy.prototype.isDone=function(){return this._isDone},cy.prototype.isBoundaryPoint=function(nt,at){return at!==null&&(!!this.isBoundaryPointInternal(nt,at[0])||!!this.isBoundaryPointInternal(nt,at[1]))},cy.prototype.setBoundaryNodes=function(nt,at){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=nt,this._bdyNodes[1]=at},cy.prototype.addIntersections=function(nt,at,wt,lo){if(nt===wt&&at===lo)return null;this.numTests++;var fo=nt.getCoordinates()[at],vo=nt.getCoordinates()[at+1],ls=wt.getCoordinates()[lo],ff=wt.getCoordinates()[lo+1];this._li.computeIntersection(fo,vo,ls,ff),this._li.hasIntersection()&&(this._recordIsolated&&(nt.setIsolated(!1),wt.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(nt,at,wt,lo)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(nt.addIntersections(this._li,at,0),wt.addIntersections(this._li,lo,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},cy.prototype.interfaces_=function(){return[]},cy.prototype.getClass=function(){return cy},cy.isAdjacentSegments=function(nt,at){return Math.abs(nt-at)===1};var CO=function(nt){function at(){nt.call(this),this.events=new Sg,this.nOverlaps=null}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.prepareEvents=function(){v1.sort(this.events);for(var wt=0;wtat||this._maxvo?1:0},g2.prototype.interfaces_=function(){return[zw]},g2.prototype.getClass=function(){return g2};var _1=function(nt){function at(){nt.call(this),this._item=null;var wt=arguments[0],lo=arguments[1],fo=arguments[2];this._min=wt,this._max=lo,this._item=fo}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.query=function(wt,lo,fo){if(!this.intersects(wt,lo))return null;fo.visitItem(this._item)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(bb),rC=function(nt){function at(){nt.call(this),this._node1=null,this._node2=null;var wt=arguments[0],lo=arguments[1];this._node1=wt,this._node2=lo,this.buildExtent(this._node1,this._node2)}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.buildExtent=function(wt,lo){this._min=Math.min(wt._min,lo._min),this._max=Math.max(wt._max,lo._max)},at.prototype.query=function(wt,lo,fo){if(!this.intersects(wt,lo))return null;this._node1!==null&&this._node1.query(wt,lo,fo),this._node2!==null&&this._node2.query(wt,lo,fo)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(bb),q1=function(){this._leaves=new Sg,this._root=null,this._level=0};q1.prototype.buildTree=function(){v1.sort(this._leaves,new bb.NodeComparator);for(var nt=this._leaves,at=null,wt=new Sg;;){if(this.buildLevel(nt,wt),wt.size()===1)return wt.get(0);at=nt,nt=wt,wt=at}},q1.prototype.insert=function(nt,at,wt){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new _1(nt,at,wt))},q1.prototype.query=function(nt,at,wt){this.init(),this._root.query(nt,at,wt)},q1.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},q1.prototype.printNode=function(nt){Ry.out.println(c1.toLineString(new Gp(nt._min,this._level),new Gp(nt._max,this._level)))},q1.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},q1.prototype.buildLevel=function(nt,at){this._level++,at.clear();for(var wt=0;wt=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,lo[0]),this.insertBoundaryPoint(this._argIndex,lo[lo.length-1])},at.prototype.getInvalidPoint=function(){return this._invalidPoint},at.prototype.getBoundaryPoints=function(){for(var wt=this.getBoundaryNodes(),lo=new Array(wt.size()).fill(null),fo=0,vo=wt.iterator();vo.hasNext();){var ls=vo.next();lo[fo++]=ls.getCoordinate().copy()}return lo},at.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},at.prototype.addSelfIntersectionNode=function(wt,lo,fo){if(this.isBoundaryNode(wt,lo))return null;fo===eg.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(wt,lo):this.insertPoint(wt,lo,fo)},at.prototype.addPolygonRing=function(wt,lo,fo){if(wt.isEmpty())return null;var vo=Cm.removeRepeatedPoints(wt.getCoordinates());if(vo.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=vo[0],null;var ls=lo,ff=fo;Og.isCCW(vo)&&(ls=fo,ff=lo);var mf=new rx(vo,new fv(this._argIndex,eg.BOUNDARY,ls,ff));this._lineEdgeMap.put(wt,mf),this.insertEdge(mf),this.insertPoint(this._argIndex,vo[0],eg.BOUNDARY)},at.prototype.insertPoint=function(wt,lo,fo){var vo=this._nodes.addNode(lo),ls=vo.getLabel();ls===null?vo._label=new fv(wt,fo):ls.setLocation(wt,fo)},at.prototype.createEdgeSetIntersector=function(){return new CO},at.prototype.addSelfIntersectionNodes=function(wt){for(var lo=this._edges.iterator();lo.hasNext();)for(var fo=lo.next(),vo=fo.getLabel().getLocation(wt),ls=fo.eiList.iterator();ls.hasNext();){var ff=ls.next();this.addSelfIntersectionNode(wt,ff.coord,vo)}},at.prototype.add=function(){if(arguments.length!==1)return nt.prototype.add.apply(this,arguments);var wt=arguments[0];if(wt.isEmpty())return null;if(wt instanceof db&&(this._useBoundaryDeterminationRule=!1),wt instanceof oy)this.addPolygon(wt);else if(wt instanceof Av)this.addLineString(wt);else if(wt instanceof x0)this.addPoint(wt);else if(wt instanceof Zw)this.addCollection(wt);else if(wt instanceof b$)this.addCollection(wt);else if(wt instanceof db)this.addCollection(wt);else{if(!(wt instanceof Zy))throw new Error(wt.getClass().getName());this.addCollection(wt)}},at.prototype.addCollection=function(wt){for(var lo=0;lo50?(this._areaPtLocator===null&&(this._areaPtLocator=new ax(this._parentGeom)),this._areaPtLocator.locate(wt)):this._ptLocator.locate(wt,this._parentGeom)},at.prototype.findEdge=function(){if(arguments.length===1){var wt=arguments[0];return this._lineEdgeMap.get(wt)}return nt.prototype.findEdge.apply(this,arguments)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.determineBoundary=function(wt,lo){return wt.isInBoundary(lo)?eg.BOUNDARY:eg.INTERIOR},at}(Nv),cx=function(){if(this._li=new y$,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var nt=arguments[0];this.setComputationPrecision(nt.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new lx(0,nt)}else if(arguments.length===2){var at=arguments[0],wt=arguments[1],lo=Y0.OGC_SFS_BOUNDARY_RULE;at.getPrecisionModel().compareTo(wt.getPrecisionModel())>=0?this.setComputationPrecision(at.getPrecisionModel()):this.setComputationPrecision(wt.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new lx(0,at,lo),this._arg[1]=new lx(1,wt,lo)}else if(arguments.length===3){var fo=arguments[0],vo=arguments[1],ls=arguments[2];fo.getPrecisionModel().compareTo(vo.getPrecisionModel())>=0?this.setComputationPrecision(fo.getPrecisionModel()):this.setComputationPrecision(vo.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new lx(0,fo,ls),this._arg[1]=new lx(1,vo,ls)}};cx.prototype.getArgGeometry=function(nt){return this._arg[nt].getGeometry()},cx.prototype.setComputationPrecision=function(nt){this._resultPrecisionModel=nt,this._li.setPrecisionModel(this._resultPrecisionModel)},cx.prototype.interfaces_=function(){return[]},cx.prototype.getClass=function(){return cx};var h_=function(){};h_.prototype.interfaces_=function(){return[]},h_.prototype.getClass=function(){return h_},h_.map=function(){if(arguments[0]instanceof tm&&nm(arguments[1],h_.MapOp)){for(var nt=arguments[0],at=arguments[1],wt=new Sg,lo=0;lo=nt.size()?null:nt.get(at)},Jv.union=function(nt){return new Jv(nt).union()},rT.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Jv,rT);var w1=function(){};function zb(){return new ux}function ux(){this.reset()}w1.prototype.interfaces_=function(){return[]},w1.prototype.getClass=function(){return w1},w1.union=function(nt,at){if(nt.isEmpty()||at.isEmpty()){if(nt.isEmpty()&&at.isEmpty())return vm.createEmptyResult(vm.UNION,nt,at,nt.getFactory());if(nt.isEmpty())return at.copy();if(at.isEmpty())return nt.copy()}return nt.checkNotGeometryCollection(nt),nt.checkNotGeometryCollection(at),Oy.overlayOp(nt,at,vm.UNION)},ux.prototype={constructor:ux,reset:function(){this.s=this.t=0},add:function(nt){nT(m2,nt,this.t),nT(this,m2.s,this.s),this.s?this.t+=m2.t:this.s=m2.t},valueOf:function(){return this.s}};var m2=new ux;function nT(nt,at,wt){var lo=nt.s=at+wt,fo=lo-at,vo=lo-fo;nt.t=at-vo+(wt-fo)}var Wv=1e-6,gv=Math.PI,Hb=gv/2,nC=gv/4,Ub=2*gv,im=180/gv,e1=gv/180,t0=Math.abs,OO=Math.atan,hx=Math.atan2,uy=Math.cos,hy=Math.sin,v2=Math.sqrt;function OE(nt){return nt>1?0:nt<-1?gv:Math.acos(nt)}function $b(nt){return nt>1?Hb:nt<-1?-Hb:Math.asin(nt)}function d_(){}function y2(nt,at){nt&&iT.hasOwnProperty(nt.type)&&iT[nt.type](nt,at)}var IE={Feature:function(nt,at){y2(nt.geometry,at)},FeatureCollection:function(nt,at){for(var wt=nt.features,lo=-1,fo=wt.length;++logv?nt-Ub:nt<-gv?nt+Ub:nt,at]}function iC(nt){return function(at,wt){return[(at+=nt)>gv?at-Ub:at<-gv?at+Ub:at,wt]}}function uT(nt){var at=iC(nt);return at.invert=iC(-nt),at}function hT(nt,at){var wt=uy(nt),lo=hy(nt),fo=uy(at),vo=hy(at);function ls(ff,mf){var bf=uy(mf),Sf=uy(ff)*bf,xf=hy(ff)*bf,If=hy(mf),jf=If*wt+Sf*lo;return[hx(xf*fo-jf*vo,Sf*wt-If*lo),$b(jf*fo+xf*vo)]}return ls.invert=function(ff,mf){var bf=uy(mf),Sf=uy(ff)*bf,xf=hy(ff)*bf,If=hy(mf),jf=If*fo-xf*vo;return[hx(xf*fo+If*vo,Sf*wt+jf*lo),$b(jf*wt-Sf*lo)]},ls}function dT(nt,at){(at=Qv(at))[0]-=nt,sT(at);var wt=OE(-at[1]);return((-at[2]<0?-wt:wt)+Ub-Wv)%Ub}function NE(){var nt,at=[];return{point:function(wt,lo){nt.push([wt,lo])},lineStart:function(){at.push(nt=[])},lineEnd:d_,rejoin:function(){at.length>1&&at.push(at.pop().concat(at.shift()))},result:function(){var wt=at;return at=[],nt=null,wt}}}function ME(nt,at){return t0(nt[0]-at[0])=0;--vo)fo.point((Sf=bf[vo])[0],Sf[1]);else lo(If.x,If.p.x,-1,fo);If=If.p}bf=(If=If.o).z,jf=!jf}while(!If.v);fo.lineEnd()}}}function $2(nt){if(at=nt.length){for(var at,wt,lo=0,fo=nt[0];++loat?1:nt>=at?0:NaN}cT.invert=cT;var fx,Vb;(fx=_2).length===1&&(Vb=fx,fx=function(nt,at){return _2(Vb(nt),at)});function oC(nt){for(var at,wt,lo,fo=nt.length,vo=-1,ls=0;++vo=0;)for(at=(lo=nt[fo]).length;--at>=0;)wt[--ls]=lo[at];return wt}var px=1e9,Dy=-px;function DE(nt,at,wt,lo){function fo(bf,Sf){return nt<=bf&&bf<=wt&&at<=Sf&&Sf<=lo}function vo(bf,Sf,xf,If){var jf=0,zf=0;if(bf==null||(jf=ls(bf,xf))!==(zf=ls(Sf,xf))||mf(bf,Sf)<0^xf>0)do If.point(jf===0||jf===3?nt:wt,jf>1?lo:at);while((jf=(jf+xf+4)%4)!==zf);else If.point(Sf[0],Sf[1])}function ls(bf,Sf){return t0(bf[0]-nt)0?0:3:t0(bf[0]-wt)0?2:1:t0(bf[1]-at)0?1:0:Sf>0?3:2}function ff(bf,Sf){return mf(bf.x,Sf.x)}function mf(bf,Sf){var xf=ls(bf,1),If=ls(Sf,1);return xf!==If?xf-If:xf===0?Sf[1]-bf[1]:xf===1?bf[0]-Sf[0]:xf===2?bf[1]-Sf[1]:Sf[0]-bf[0]}return function(bf){var Sf,xf,If,jf,zf,Wf,Mf,np,pp,Uf,tp,op=bf,up=NE(),sp={point:Qp,lineStart:function(){sp.point=Ap,xf&&xf.push(If=[]),Uf=!0,pp=!1,Mf=np=NaN},lineEnd:function(){Sf&&(Ap(jf,zf),Wf&&pp&&up.rejoin(),Sf.push(up.result())),sp.point=Qp,pp&&op.lineEnd()},polygonStart:function(){op=up,Sf=[],xf=[],tp=!0},polygonEnd:function(){var rg=function(){for(var qp=0,Wp=0,Up=xf.length;Wplo&&(bm-ig)*(lo-Xp)>(Mg-Xp)*(nt-ig)&&++qp:Mg<=lo&&(bm-ig)*(lo-Xp)<(Mg-Xp)*(nt-ig)&&--qp;return qp}(),zp=tp&&rg,lg=(Sf=oC(Sf)).length;(zp||lg)&&(bf.polygonStart(),zp&&(bf.lineStart(),vo(null,null,1,bf),bf.lineEnd()),lg&&fT(Sf,ff,rg,vo,bf),bf.polygonEnd()),op=bf,Sf=xf=If=null}};function Qp(rg,zp){fo(rg,zp)&&op.point(rg,zp)}function Ap(rg,zp){var lg=fo(rg,zp);if(xf&&If.push([rg,zp]),Uf)jf=rg,zf=zp,Wf=lg,Uf=!1,lg&&(op.lineStart(),op.point(rg,zp));else if(lg&&pp)op.point(rg,zp);else{var qp=[Mf=Math.max(Dy,Math.min(px,Mf)),np=Math.max(Dy,Math.min(px,np))],Wp=[rg=Math.max(Dy,Math.min(px,rg)),zp=Math.max(Dy,Math.min(px,zp))];(function(Up,ig,Xp,cg,Sp,Ug){var _g,bm=Up[0],Mg=Up[1],em=0,Lm=1,vv=ig[0]-bm,Ly=ig[1]-Mg;if(_g=Xp-bm,vv||!(_g>0)){if(_g/=vv,vv<0){if(_g0){if(_g>Lm)return;_g>em&&(em=_g)}if(_g=Sp-bm,vv||!(_g<0)){if(_g/=vv,vv<0){if(_g>Lm)return;_g>em&&(em=_g)}else if(vv>0){if(_g0)){if(_g/=Ly,Ly<0){if(_g0){if(_g>Lm)return;_g>em&&(em=_g)}if(_g=Ug-Mg,Ly||!(_g<0)){if(_g/=Ly,Ly<0){if(_g>Lm)return;_g>em&&(em=_g)}else if(Ly>0){if(_g0&&(Up[0]=bm+em*vv,Up[1]=Mg+em*Ly),Lm<1&&(ig[0]=bm+Lm*vv,ig[1]=Mg+Lm*Ly),!0}}}}})(qp,Wp,nt,at,wt,lo)?(pp||(op.lineStart(),op.point(qp[0],qp[1])),op.point(Wp[0],Wp[1]),lg||op.lineEnd(),tp=!1):lg&&(op.lineStart(),op.point(rg,zp),tp=!1)}Mf=rg,np=zp,pp=lg}return sp}}var pT=zb();zb();function aC(nt){return nt}zb(),zb();var gx=1/0,iw=gx,f_=-gx,LE=f_,sC={point:function(nt,at){ntf_&&(f_=nt),atLE&&(LE=at)},lineStart:d_,lineEnd:d_,polygonStart:d_,polygonEnd:d_,result:function(){var nt=[[gx,iw],[f_,LE]];return f_=LE=-(iw=gx=1/0),nt}};zb();function gT(nt,at,wt,lo){return function(fo,vo){var ls,ff,mf,bf=at(vo),Sf=fo.invert(lo[0],lo[1]),xf=NE(),If=at(xf),jf=!1,zf={point:Wf,lineStart:np,lineEnd:pp,polygonStart:function(){zf.point=Uf,zf.lineStart=tp,zf.lineEnd=op,ff=[],ls=[]},polygonEnd:function(){zf.point=Wf,zf.lineStart=np,zf.lineEnd=pp,ff=oC(ff);var up=function(sp,Qp){var Ap=Qp[0],rg=Qp[1],zp=[hy(Ap),-uy(Ap),0],lg=0,qp=0;pT.reset();for(var Wp=0,Up=sp.length;Wp=0?1:-1,S2=E2*p_,mx=S2>gv,BE=_g*Ly;if(pT.add(hx(BE*E2*hy(S2),bm*x2+BE*uy(S2))),lg+=mx?p_+E2*Ub:p_,mx^Sp>=Ap^Lm>=Ap){var vx=AE(Qv(cg),Qv(em));sT(vx);var $C=AE(zp,vx);sT($C);var _C=(mx^p_>=0?-1:1)*$b($C[2]);(rg>_C||rg===_C&&(vx[0]||vx[1]))&&(qp+=mx^p_>=0?1:-1)}}return(lg<-1e-6||lg0){for(jf||(vo.polygonStart(),jf=!0),vo.lineStart(),up=0;up1&&2&rg&&zp.push(zp.pop().concat(zp.shift())),ff.push(zp.filter(lC))}return zf}}function lC(nt){return nt.length>1}function mT(nt,at){return((nt=nt.x)[0]<0?nt[1]-Hb-Wv:Hb-nt[1])-((at=at.x)[0]<0?at[1]-Hb-Wv:Hb-at[1])}var vT=gT(function(){return!0},function(nt){var at,wt=NaN,lo=NaN,fo=NaN;return{lineStart:function(){nt.lineStart(),at=1},point:function(vo,ls){var ff=vo>0?gv:-gv,mf=t0(vo-wt);t0(mf-gv)0?Hb:-Hb),nt.point(fo,lo),nt.lineEnd(),nt.lineStart(),nt.point(ff,lo),nt.point(vo,lo),at=0):fo!==ff&&mf>=gv&&(t0(wt-fo)Wv?OO((hy(Sf)*(zf=uy(If))*hy(xf)-hy(If)*(jf=uy(Sf))*hy(bf))/(jf*zf*Wf)):(Sf+If)/2}(wt,lo,vo,ls),nt.point(fo,lo),nt.lineEnd(),nt.lineStart(),nt.point(ff,lo),at=0),nt.point(wt=vo,lo=ls),fo=ff},lineEnd:function(){nt.lineEnd(),wt=lo=NaN},clean:function(){return 2-at}}},function(nt,at,wt,lo){var fo;if(nt==null)fo=wt*Hb,lo.point(-gv,fo),lo.point(0,fo),lo.point(gv,fo),lo.point(gv,0),lo.point(gv,-fo),lo.point(0,-fo),lo.point(-gv,-fo),lo.point(-gv,0),lo.point(-gv,fo);else if(t0(nt[0]-at[0])>Wv){var vo=nt[0]0,fo=t0(wt)>Wv;function vo(mf,bf){return uy(mf)*uy(bf)>wt}function ls(mf,bf,Sf){var xf=[1,0,0],If=AE(Qv(mf),Qv(bf)),jf=b2(If,If),zf=If[0],Wf=jf-zf*zf;if(!Wf)return!Sf&&mf;var Mf=wt*jf/Wf,np=-wt*zf/Wf,pp=AE(xf,If),Uf=RE(xf,Mf);aT(Uf,RE(If,np));var tp=pp,op=b2(Uf,tp),up=b2(tp,tp),sp=op*op-up*(b2(Uf,Uf)-1);if(!(sp<0)){var Qp=v2(sp),Ap=RE(tp,(-op-Qp)/up);if(aT(Ap,Uf),Ap=oT(Ap),!Sf)return Ap;var rg,zp=mf[0],lg=bf[0],qp=mf[1],Wp=bf[1];lg0^Ap[1]<(t0(Ap[0]-zp)gv^(zp<=Ap[0]&&Ap[0]<=lg)){var Xp=RE(tp,(-op+Qp)/up);return aT(Xp,Uf),[Ap,oT(Xp)]}}}function ff(mf,bf){var Sf=lo?nt:gv-nt,xf=0;return mf<-Sf?xf|=1:mf>Sf&&(xf|=2),bf<-Sf?xf|=4:bf>Sf&&(xf|=8),xf}return gT(vo,function(mf){var bf,Sf,xf,If,jf;return{lineStart:function(){If=xf=!1,jf=1},point:function(zf,Wf){var Mf,np=[zf,Wf],pp=vo(zf,Wf),Uf=lo?pp?0:ff(zf,Wf):pp?ff(zf+(zf<0?gv:-gv),Wf):0;if(!bf&&(If=xf=pp)&&mf.lineStart(),pp!==xf&&(!(Mf=ls(bf,np))||ME(bf,Mf)||ME(np,Mf))&&(np[0]+=Wv,np[1]+=Wv,pp=vo(np[0],np[1])),pp!==xf)jf=0,pp?(mf.lineStart(),Mf=ls(np,bf),mf.point(Mf[0],Mf[1])):(Mf=ls(bf,np),mf.point(Mf[0],Mf[1]),mf.lineEnd()),bf=Mf;else if(fo&&bf&&lo^pp){var tp;Uf&Sf||!(tp=ls(np,bf,!0))||(jf=0,lo?(mf.lineStart(),mf.point(tp[0][0],tp[0][1]),mf.point(tp[1][0],tp[1][1]),mf.lineEnd()):(mf.point(tp[1][0],tp[1][1]),mf.lineEnd(),mf.lineStart(),mf.point(tp[0][0],tp[0][1])))}!pp||bf&&ME(bf,np)||mf.point(np[0],np[1]),bf=np,xf=pp,Sf=Uf},lineEnd:function(){xf&&mf.lineEnd(),bf=null},clean:function(){return jf|(If&&xf)<<1}}},function(mf,bf,Sf,xf){(function(If,jf,zf,Wf,Mf,np){if(zf){var pp=uy(jf),Uf=hy(jf),tp=Wf*zf;Mf==null?(Mf=jf+Wf*Ub,np=jf-tp/2):(Mf=dT(pp,Mf),np=dT(pp,np),(Wf>0?Mfnp)&&(Mf+=Wf*Ub));for(var op,up=Mf;Wf>0?up>np:up4*lo&&np--){var up=mf+zf,sp=bf+Wf,Qp=Sf+Mf,Ap=v2(up*up+sp*sp+Qp*Qp),rg=$b(Qp/=Ap),zp=t0(t0(Qp)-1)lo||t0((Uf*Up+tp*ig)/op-.5)>.3||mf*zf+bf*Wf+Sf*Mf2?Up[2]%360*e1:0,qp()):[np*im,pp*im,Uf*im]},rg.precision=function(Up){return arguments.length?(Ap=uC(lg,Qp=Up*Up),Wp()):v2(Qp)},rg.fitExtent=function(Up,ig){return w2(rg,Up,ig)},rg.fitSize=function(Up,ig){return function(Xp,cg,Sp){return w2(Xp,[[0,0],cg],Sp)}(rg,Up,ig)},function(){return wt=at.apply(this,arguments),rg.invert=wt.invert&&zp,qp()}}(function(){return nt})()}var bT=function(nt){return function(at,wt){var lo=uy(at),fo=uy(wt),vo=nt(lo*fo);return[vo*fo*hy(at),vo*hy(wt)]}}(function(nt){return(nt=OE(nt))&&nt/hy(nt)});function AO(){return PO(bT).scale(79.4188).clipAngle(179.999)}function ow(nt,at,wt,lo){var fo=nt.properties||{},vo=nt.type==="Feature"?nt.geometry:nt;if(vo.type==="GeometryCollection"){var ls=[];return Ip(nt,function(If){var jf=ow(If,at,wt,lo);jf&&ls.push(jf)}),wo(ls)}var ff=function(If){var jf=n1(If).geometry.coordinates,zf=[-jf[0],-jf[1]];return AO().rotate(zf).scale(W)}(vo),mf={type:vo.type,coordinates:fC(vo.coordinates,ff)},bf=new vE().read(mf),Sf=$f(wf(at,wt),"meters"),xf=bv.bufferOp(bf,Sf,lo);if(!dC((xf=new qk().write(xf)).coordinates))return tt({type:xf.type,coordinates:pC(xf.coordinates,ff)},fo)}function dC(nt){return Array.isArray(nt[0])?dC(nt[0]):isNaN(nt[0])}function fC(nt,at){return typeof nt[0]!="object"?at(nt):nt.map(function(wt){return fC(wt,at)})}function pC(nt,at){return typeof nt[0]!="object"?at.invert(nt):nt.map(function(wt){return pC(wt,at)})}function aw(nt,at,wt){wt===void 0&&(wt={});var lo=_p(nt),fo=_p(at),vo=m$.intersection(lo.coordinates,fo.coordinates);return vo.length===0?null:vo.length===1?yn(vo[0],wt.properties):cf(vo,wt.properties)}function gC(nt,at,wt){wt===void 0&&(wt={});var lo=JSON.stringify(wt.properties||{}),fo=nt[0],vo=nt[1],ls=nt[2],ff=nt[3],mf=(vo+ff)/2,bf=(fo+ls)/2,Sf=2*at/_m([fo,mf],[ls,mf],wt)*(ls-fo),xf=2*at/_m([bf,vo],[bf,ff],wt)*(ff-vo),If=Sf/2,jf=2*If,zf=Math.sqrt(3)/2*xf,Wf=ls-fo,Mf=ff-vo,np=3/4*jf,pp=zf,Uf=(Wf-jf)/(jf-If/2),tp=Math.floor(Uf),op=(tp*np-If/2-Wf)/2-If/2+np/2,up=Math.floor((Mf-zf)/zf),sp=(Mf-up*zf)/2,Qp=up*zf-Mf>zf/2;Qp&&(sp-=zf/4);for(var Ap=[],rg=[],zp=0;zp<6;zp++){var lg=2*Math.PI/6*zp;Ap.push(Math.cos(lg)),rg.push(Math.sin(lg))}for(var qp=[],Wp=0;Wp<=tp;Wp++)for(var Up=0;Up<=up;Up++){var ig=Wp%2==1;if((Up!==0||!ig)&&(Up!==0||!Qp)){var Xp=Wp*np+fo-op,cg=Up*pp+vo+sp;if(ig&&(cg-=zf/2),wt.triangles===!0)vC([Xp,cg],Sf/2,xf/2,JSON.parse(lo),Ap,rg).forEach(function(Ug){wt.mask?aw(wt.mask,Ug)&&qp.push(Ug):qp.push(Ug)});else{var Sp=mC([Xp,cg],Sf/2,xf/2,JSON.parse(lo),Ap,rg);wt.mask?aw(wt.mask,Sp)&&qp.push(Sp):qp.push(Sp)}}}return wo(qp)}function mC(nt,at,wt,lo,fo,vo){for(var ls=[],ff=0;ff<6;ff++){var mf=nt[0]+at*fo[ff],bf=nt[1]+wt*vo[ff];ls.push([mf,bf])}return ls.push(ls[0].slice()),yn([ls],lo)}function vC(nt,at,wt,lo,fo,vo){for(var ls=[],ff=0;ff<6;ff++){var mf=[];mf.push(nt),mf.push([nt[0]+at*fo[ff],nt[1]+wt*vo[ff]]),mf.push([nt[0]+at*fo[(ff+1)%6],nt[1]+wt*vo[(ff+1)%6]]),mf.push(nt),ls.push(yn([mf],lo))}return ls}function yC(nt){return cf(nt)}function RO(nt){return yn(nt&&nt.geometry.coordinates||[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]])}function bC(nt,at,wt){return wt===void 0&&(wt={}),function(lo,fo,vo,ls){ls===void 0&&(ls={});for(var ff=[],mf=lo[0],bf=lo[1],Sf=lo[2],xf=lo[3],If=fo/_m([mf,bf],[Sf,bf],ls)*(Sf-mf),jf=vo/_m([mf,bf],[mf,xf],ls)*(xf-bf),zf=Sf-mf,Wf=xf-bf,Mf=Math.floor(zf/If),np=Math.floor(Wf/jf),pp=(Wf-np*jf)/2,Uf=mf+(zf-Mf*If)/2,tp=0;tp=fo&&vo===lo.length-1);vo++){if(fo>=at){var ls=at-fo;if(ls){var ff=k1(lo[vo],lo[vo-1])-180;return $y(lo[vo],ls,ff,wt)}return ot(lo[vo])}fo+=_m(lo[vo],lo[vo+1],wt)}return ot(lo[lo.length-1])},F.angle=function(nt,at,wt,lo){if(lo===void 0&&(lo={}),!kf(lo))throw new Error("options is invalid");if(!nt)throw new Error("startPoint is required");if(!at)throw new Error("midPoint is required");if(!wt)throw new Error("endPoint is required");var fo=nt,vo=at,ls=wt,ff=Cf(lo.mercator!==!0?k1(fo,vo):u$(fo,vo)),mf=Cf(lo.mercator!==!0?k1(ls,vo):u$(ls,vo)),bf=Math.abs(ff-mf);return lo.explementary===!0?360-bf:bf},F.applyFilter=iE,F.area=W$,F.areaFactors=X,F.bbox=qf,F.bboxClip=function(nt,at){var wt=_p(nt),lo=wt.type,fo=nt.type==="Feature"?nt.properties:{},vo=wt.coordinates;switch(lo){case"LineString":case"MultiLineString":var ls=[];return lo==="LineString"&&(vo=[vo]),vo.forEach(function(ff){(function(mf,bf,Sf){var xf,If,jf,zf,Wf,Mf=mf.length,np=rb(mf[0],bf),pp=[];for(Sf||(Sf=[]),xf=1;xf0)for(var mf=0;mf0},F.booleanParallel=function(nt,at){if(!nt)throw new Error("line1 is required");if(!at)throw new Error("line2 is required");if(SS(nt,"line1")!=="LineString")throw new Error("line1 must be a LineString");if(SS(at,"line2")!=="LineString")throw new Error("line2 must be a LineString");for(var wt=_y(V0(nt)).features,lo=_y(V0(at)).features,fo=0;fowt&&(at.numberOfClusters=wt),at.mutate!==!0&&(nt=Iv(nt));var lo=jp(nt),fo=lo.slice(0,at.numberOfClusters),vo=ES(lo,at.numberOfClusters,fo),ls={};return vo.centroids.forEach(function(ff,mf){ls[mf]=ff}),vp(nt,function(ff,mf){var bf=vo.idxs[mf];ff.properties.cluster=bf,ff.properties.centroid=ls[bf]}),nt},F.collect=function(nt,at,wt,lo){var fo=Cg(6),vo=at.features.map(function(ls){var ff;return{minX:ls.geometry.coordinates[0],minY:ls.geometry.coordinates[1],maxX:ls.geometry.coordinates[0],maxY:ls.geometry.coordinates[1],property:(ff=ls.properties)===null||ff===void 0?void 0:ff[wt]}});return fo.load(vo),nt.features.forEach(function(ls){ls.properties||(ls.properties={});var ff=qf(ls),mf=fo.search({minX:ff[0],minY:ff[1],maxX:ff[2],maxY:ff[3]}),bf=[];mf.forEach(function(Sf){cm([Sf.minX,Sf.minY],ls)&&bf.push(Sf.property)}),ls.properties[lo]=bf}),nt},F.collectionOf=Ep,F.combine=function(nt){var at={MultiPoint:{coordinates:[],properties:[]},MultiLineString:{coordinates:[],properties:[]},MultiPolygon:{coordinates:[],properties:[]}};return vp(nt,function(wt){var lo,fo,vo,ls;switch((ls=wt.geometry)===null||ls===void 0?void 0:ls.type){case"Point":at.MultiPoint.coordinates.push(wt.geometry.coordinates),at.MultiPoint.properties.push(wt.properties);break;case"MultiPoint":(lo=at.MultiPoint.coordinates).push.apply(lo,wt.geometry.coordinates),at.MultiPoint.properties.push(wt.properties);break;case"LineString":at.MultiLineString.coordinates.push(wt.geometry.coordinates),at.MultiLineString.properties.push(wt.properties);break;case"MultiLineString":(fo=at.MultiLineString.coordinates).push.apply(fo,wt.geometry.coordinates),at.MultiLineString.properties.push(wt.properties);break;case"Polygon":at.MultiPolygon.coordinates.push(wt.geometry.coordinates),at.MultiPolygon.properties.push(wt.properties);break;case"MultiPolygon":(vo=at.MultiPolygon.coordinates).push.apply(vo,wt.geometry.coordinates),at.MultiPolygon.properties.push(wt.properties)}}),wo(Object.keys(at).filter(function(wt){return at[wt].coordinates.length}).sort().map(function(wt){return tt({type:wt,coordinates:at[wt].coordinates},{collectedProperties:at[wt].properties})}))},F.concave=function(nt,at){at===void 0&&(at={});var wt=at.maxEdge||1/0,lo=Eb(function(vo){var ls=[],ff={};return vp(vo,function(mf){if(mf.geometry){var bf=mf.geometry.coordinates.join("-");Object.prototype.hasOwnProperty.call(ff,bf)||(ls.push(mf),ff[bf]=!0)}}),wo(ls)}(nt));if(lo.features=lo.features.filter(function(vo){var ls=vo.geometry.coordinates[0][0],ff=vo.geometry.coordinates[0][1],mf=vo.geometry.coordinates[0][2],bf=_m(ls,ff,at),Sf=_m(ff,mf,at),xf=_m(ls,mf,at);return bf<=wt&&Sf<=wt&&xf<=wt}),lo.features.length<1)return null;var fo=R2(lo);return fo.coordinates.length===1&&(fo.coordinates=fo.coordinates[0],fo.type="Polygon"),tt(fo)},F.containsNumber=$p,F.convertArea=Df,F.convertDistance=Hf,F.convertLength=Hf,F.convex=Tm,F.coordAll=jp,F.coordEach=rp,F.coordReduce=ip,F.createBins=NS,F.degrees2radians=Bf,F.degreesToRadians=Bf,F.destination=$y,F.difference=function(nt,at){var wt=_p(nt),lo=_p(at),fo=nt.properties||{},vo=m$.difference(wt.coordinates,lo.coordinates);return vo.length===0?null:vo.length===1?yn(vo[0],fo):cf(vo,fo)},F.dissolve=function(nt,at){if(!kf(at=at||{}))throw new Error("options is invalid");var wt=at.propertyName;Ep(nt,"Polygon","dissolve");var lo=[];if(!at.propertyName)return A_(cf(m$.union.apply(null,nt.features.map(function(mf){return mf.geometry.coordinates}))));var fo={};vp(nt,function(mf){Object.prototype.hasOwnProperty.call(fo,mf.properties[wt])||(fo[mf.properties[wt]]=[]),fo[mf.properties[wt]].push(mf)});for(var vo=Object.keys(fo),ls=0;ls0&&(mf=yn(ff).geometry),sO(mf,bf),ff=bf.slice(0);wt.push(yn(ff,ls));break;case"MultiPolygon":ff=[[[]]];for(var xf=0;xf0&&(mf=cf(ff).geometry),lO(mf,bf),ff=bf.slice(0);wt.push(cf(ff,ls));break;default:throw new Error("geometry is invalid, must be Polygon or MultiPolygon")}}),wo(wt)},F.polygonTangents=function(nt,at){var wt,lo,fo,vo,ls=hp(nt),ff=hp(at),mf=qf(at),bf=0,Sf=null;switch(ls[0]>mf[0]&&ls[0]mf[1]&&ls[1] is required");if(typeof wt!="boolean")throw new Error(" must be a boolean");if(typeof lo!="boolean")throw new Error(" must be a boolean");lo===!1&&(nt=Iv(nt));var fo=[];switch(nt.type){case"GeometryCollection":return Ip(nt,function(vo){d$(vo,wt)}),nt;case"FeatureCollection":return vp(nt,function(vo){vp(d$(vo,wt),function(ls){fo.push(ls)})}),wo(fo)}return d$(nt,wt)},F.rhumbBearing=u$,F.rhumbDestination=Nw,F.rhumbDistance=Tb,F.round=_f,F.sample=function(nt,at){if(!nt)throw new Error("featurecollection is required");if(at==null)throw new Error("num is required");if(typeof at!="number")throw new Error("num must be a number");return wo(function(wt,lo){for(var fo,vo,ls=wt.slice(0),ff=wt.length,mf=ff-lo;ff-- >mf;)fo=ls[vo=Math.floor((ff+1)*Math.random())],ls[vo]=ls[ff],ls[ff]=fo;return ls.slice(mf)}(nt.features,at))},F.sector=function(nt,at,wt,lo,fo){if(!kf(fo=fo||{}))throw new Error("options is invalid");var vo=fo.properties;if(!nt)throw new Error("center is required");if(wt==null)throw new Error("bearing1 is required");if(lo==null)throw new Error("bearing2 is required");if(!at)throw new Error("radius is required");if(typeof fo!="object")throw new Error("options must be an object");if(Rw(wt)===Rw(lo))return kx(nt,at,fo);var ls=hp(nt),ff=Ky(nt,at,wt,lo,fo),mf=[[ls]];return rp(ff,function(bf){mf[0].push(bf)}),mf[0].push(ls),yn(mf,vo)},F.segmentEach=vg,F.segmentReduce=Dp,F.shortestPath=function(nt,at,wt){if(!kf(wt=wt||{}))throw new Error("options is invalid");var lo=wt.resolution,fo=wt.minDistance,vo=wt.obstacles||wo([]);if(!nt)throw new Error("start is required");if(!at)throw new Error("end is required");if(lo&&!Lf(lo)||lo<=0)throw new Error("options.resolution must be a number, greater than 0");if(fo)throw new Error("options.minDistance is not yet implemented");var ls=cp(nt),ff=cp(at);switch(nt=ot(ls),at=ot(ff),Mp(vo)){case"FeatureCollection":if(vo.features.length===0)return po([ls,ff]);break;case"Polygon":vo=wo([tt(_p(vo))]);break;default:throw new Error("invalid obstacles")}var mf=vo;mf.features.push(nt),mf.features.push(at);var bf=qf(AT(Tx(qf(mf)),1.15));lo||(lo=_m([bf[0],bf[1]],[bf[2],bf[1]],wt)/100),mf.features.pop(),mf.features.pop();for(var Sf=bf[0],xf=bf[1],If=bf[2],jf=bf[3],zf=lo/_m([Sf,xf],[If,xf],wt)*(If-Sf),Wf=lo/_m([Sf,xf],[Sf,jf],wt)*(jf-xf),Mf=If-Sf,np=jf-xf,pp=Math.floor(Mf/zf),Uf=Math.floor(np/Wf),tp=(Mf-pp*zf)/2,op=[],up=[],sp=[],Qp=[],Ap=1/0,rg=1/0,zp=jf-(np-Uf*Wf)/2,lg=0;zp>=xf;){for(var qp=[],Wp=[],Up=Sf+tp,ig=0;Up<=If;){var Xp=ot([Up,zp]),cg=ZC(Xp,vo);qp.push(cg?0:1),Wp.push(Up+"|"+zp);var Sp=_m(Xp,nt);!cg&&SpK.getMaxZoom())&&(this._goalZoom=K._limitZoom(this._goalZoom)),this._wheelMousePosition=this._map.mouseEventToContainerPoint(q),clearTimeout(this._timeoutId),this._timeoutId=setTimeout(this._onWheelEnd.bind(this),200),W.DomEvent.preventDefault(q),W.DomEvent.stopPropagation(q)},_onWheelEnd:function(q){this._isWheeling=!1,cancelAnimationFrame(this._zoomAnimationId),this._map.fire("zoomend")},_updateWheelZoom:function(){var q=this._map;if(!(!q.getCenter().equals(this._prevCenter)||q.getZoom()!=this._prevZoom)){this._zoom=q.getZoom()+(this._goalZoom-q.getZoom())*.3,this._zoom=Math.floor(this._zoom*100)/100;var K=this._wheelMousePosition.subtract(this._centerPoint);K.x===0&&K.y===0||(q.options.smoothWheelZoom==="center"?this._center=this._startLatLng:this._center=q.unproject(q.project(this._wheelStartLatLng,this._zoom).subtract(K),this._zoom),this._moved||(q._moveStart(!0,!1),this._moved=!0),q._move(this._center,this._zoom),this._prevCenter=q.getCenter(),this._prevZoom=q.getZoom(),q.fire("viewreset"),this._zoomAnimationId=requestAnimationFrame(this._updateWheelZoom.bind(this)))}}}),W.Map.addInitHook("addHandler","smoothWheelZoom",W.Map.SmoothWheelZoom)})})(Leaflet_SmoothWheelZoom);function an(F){return Array.isArray(F)?`[${F.map(W=>an(W)).join(",")}]`:typeof F=="number"?`${F}`:typeof F=="string"?`"${F}"`:typeof F=="object"&&F!==null?Object.keys(F).sort().map(W=>`${W}:${an(F[W])}`).join("|"):String(F)}async function bo(F){const W=await crypto.subtle.digest("SHA-1",new TextEncoder().encode(F));return Array.from(new Uint8Array(W)).map(q=>q.toString(16).padStart(2,"0")).join("")}async function Li(F,W=16){return(await bo(String(F))).slice(0,W)}async function To(F,W){return await Li(an(F),W)}var H;(function(F){F.assertEqual=X=>X;function W(X){}F.assertIs=W;function q(X){throw new Error}F.assertNever=q,F.arrayToEnum=X=>{const tt={};for(const rt of X)tt[rt]=rt;return tt},F.getValidEnumValues=X=>{const tt=F.objectKeys(X).filter(ot=>typeof X[X[ot]]!="number"),rt={};for(const ot of tt)rt[ot]=X[ot];return F.objectValues(rt)},F.objectValues=X=>F.objectKeys(X).map(function(tt){return X[tt]}),F.objectKeys=typeof Object.keys=="function"?X=>Object.keys(X):X=>{const tt=[];for(const rt in X)Object.prototype.hasOwnProperty.call(X,rt)&&tt.push(rt);return tt},F.find=(X,tt)=>{for(const rt of X)if(tt(rt))return rt},F.isInteger=typeof Number.isInteger=="function"?X=>Number.isInteger(X):X=>typeof X=="number"&&isFinite(X)&&Math.floor(X)===X;function K(X,tt=" | "){return X.map(rt=>typeof rt=="string"?`'${rt}'`:rt).join(tt)}F.joinValues=K,F.jsonStringifyReplacer=(X,tt)=>typeof tt=="bigint"?tt.toString():tt})(H||(H={}));var hn;(function(F){F.mergeShapes=(W,q)=>({...W,...q})})(hn||(hn={}));const O=H.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ut=F=>{switch(typeof F){case"undefined":return O.undefined;case"string":return O.string;case"number":return isNaN(F)?O.nan:O.number;case"boolean":return O.boolean;case"function":return O.function;case"bigint":return O.bigint;case"symbol":return O.symbol;case"object":return Array.isArray(F)?O.array:F===null?O.null:F.then&&typeof F.then=="function"&&F.catch&&typeof F.catch=="function"?O.promise:typeof Map<"u"&&F instanceof Map?O.map:typeof Set<"u"&&F instanceof Set?O.set:typeof Date<"u"&&F instanceof Date?O.date:O.object;default:return O.unknown}},R=H.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Mo=F=>JSON.stringify(F,null,2).replace(/"([^"]+)":/g,"$1:");class _t extends Error{constructor(W){super(),this.issues=[],this.addIssue=K=>{this.issues=[...this.issues,K]},this.addIssues=(K=[])=>{this.issues=[...this.issues,...K]};const q=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,q):this.__proto__=q,this.name="ZodError",this.issues=W}get errors(){return this.issues}format(W){const q=W||function(tt){return tt.message},K={_errors:[]},X=tt=>{for(const rt of tt.issues)if(rt.code==="invalid_union")rt.unionErrors.map(X);else if(rt.code==="invalid_return_type")X(rt.returnTypeError);else if(rt.code==="invalid_arguments")X(rt.argumentsError);else if(rt.path.length===0)K._errors.push(q(rt));else{let ot=K,ut=0;for(;utq.message){const q={},K=[];for(const X of this.issues)X.path.length>0?(q[X.path[0]]=q[X.path[0]]||[],q[X.path[0]].push(W(X))):K.push(W(X));return{formErrors:K,fieldErrors:q}}get formErrors(){return this.flatten()}}_t.create=F=>new _t(F);const _e=(F,W)=>{let q;switch(F.code){case R.invalid_type:F.received===O.undefined?q="Required":q=`Expected ${F.expected}, received ${F.received}`;break;case R.invalid_literal:q=`Invalid literal value, expected ${JSON.stringify(F.expected,H.jsonStringifyReplacer)}`;break;case R.unrecognized_keys:q=`Unrecognized key(s) in object: ${H.joinValues(F.keys,", ")}`;break;case R.invalid_union:q="Invalid input";break;case R.invalid_union_discriminator:q=`Invalid discriminator value. Expected ${H.joinValues(F.options)}`;break;case R.invalid_enum_value:q=`Invalid enum value. Expected ${H.joinValues(F.options)}, received '${F.received}'`;break;case R.invalid_arguments:q="Invalid function arguments";break;case R.invalid_return_type:q="Invalid function return type";break;case R.invalid_date:q="Invalid date";break;case R.invalid_string:typeof F.validation=="object"?"includes"in F.validation?(q=`Invalid input: must include "${F.validation.includes}"`,typeof F.validation.position=="number"&&(q=`${q} at one or more positions greater than or equal to ${F.validation.position}`)):"startsWith"in F.validation?q=`Invalid input: must start with "${F.validation.startsWith}"`:"endsWith"in F.validation?q=`Invalid input: must end with "${F.validation.endsWith}"`:H.assertNever(F.validation):F.validation!=="regex"?q=`Invalid ${F.validation}`:q="Invalid";break;case R.too_small:F.type==="array"?q=`Array must contain ${F.exact?"exactly":F.inclusive?"at least":"more than"} ${F.minimum} element(s)`:F.type==="string"?q=`String must contain ${F.exact?"exactly":F.inclusive?"at least":"over"} ${F.minimum} character(s)`:F.type==="number"?q=`Number must be ${F.exact?"exactly equal to ":F.inclusive?"greater than or equal to ":"greater than "}${F.minimum}`:F.type==="date"?q=`Date must be ${F.exact?"exactly equal to ":F.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(F.minimum))}`:q="Invalid input";break;case R.too_big:F.type==="array"?q=`Array must contain ${F.exact?"exactly":F.inclusive?"at most":"less than"} ${F.maximum} element(s)`:F.type==="string"?q=`String must contain ${F.exact?"exactly":F.inclusive?"at most":"under"} ${F.maximum} character(s)`:F.type==="number"?q=`Number must be ${F.exact?"exactly":F.inclusive?"less than or equal to":"less than"} ${F.maximum}`:F.type==="bigint"?q=`BigInt must be ${F.exact?"exactly":F.inclusive?"less than or equal to":"less than"} ${F.maximum}`:F.type==="date"?q=`Date must be ${F.exact?"exactly":F.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(F.maximum))}`:q="Invalid input";break;case R.custom:q="Invalid input";break;case R.invalid_intersection_types:q="Intersection results could not be merged";break;case R.not_multiple_of:q=`Number must be a multiple of ${F.multipleOf}`;break;case R.not_finite:q="Number must be finite";break;default:q=W.defaultError,H.assertNever(F)}return{message:q}};let Di=_e;function _o(F){Di=F}function dr(){return Di}const fr$2=F=>{const{data:W,path:q,errorMaps:K,issueData:X}=F,tt=[...q,...X.path||[]],rt={...X,path:tt};let ot="";const ut=K.filter(yn=>!!yn).slice().reverse();for(const yn of ut)ot=yn(rt,{data:W,defaultError:ot}).message;return{...X,path:tt,message:X.message||ot}},Eo=[];function N(F,W){const q=fr$2({issueData:W,data:F.data,path:F.path,errorMaps:[F.common.contextualErrorMap,F.schemaErrorMap,dr(),_e].filter(K=>!!K)});F.common.issues.push(q)}class ct{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(W,q){const K=[];for(const X of q){if(X.status==="aborted")return B;X.status==="dirty"&&W.dirty(),K.push(X.value)}return{status:W.value,value:K}}static async mergeObjectAsync(W,q){const K=[];for(const X of q)K.push({key:await X.key,value:await X.value});return ct.mergeObjectSync(W,K)}static mergeObjectSync(W,q){const K={};for(const X of q){const{key:tt,value:rt}=X;if(tt.status==="aborted"||rt.status==="aborted")return B;tt.status==="dirty"&&W.dirty(),rt.status==="dirty"&&W.dirty(),tt.value!=="__proto__"&&(typeof rt.value<"u"||X.alwaysSet)&&(K[tt.value]=rt.value)}return{status:W.value,value:K}}}const B=Object.freeze({status:"aborted"}),Bi=F=>({status:"dirty",value:F}),ft=F=>({status:"valid",value:F}),cn$1=F=>F.status==="aborted",ln=F=>F.status==="dirty",Ee=F=>F.status==="valid",pr=F=>typeof Promise<"u"&&F instanceof Promise;var L$1;(function(F){F.errToObj=W=>typeof W=="string"?{message:W}:W||{},F.toString=W=>typeof W=="string"?W:W==null?void 0:W.message})(L$1||(L$1={}));class Ct{constructor(W,q,K,X){this._cachedPath=[],this.parent=W,this.data=q,this._path=K,this._key=X}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Yn=(F,W)=>{if(Ee(W))return{success:!0,data:W.value};if(!F.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const q=new _t(F.common.issues);return this._error=q,this._error}}};function G(F){if(!F)return{};const{errorMap:W,invalid_type_error:q,required_error:K,description:X}=F;if(W&&(q||K))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return W?{errorMap:W,description:X}:{errorMap:(tt,rt)=>tt.code!=="invalid_type"?{message:rt.defaultError}:typeof rt.data>"u"?{message:K??rt.defaultError}:{message:q??rt.defaultError},description:X}}class U{constructor(W){this.spa=this.safeParseAsync,this._def=W,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(W){return Ut(W.data)}_getOrReturnCtx(W,q){return q||{common:W.parent.common,data:W.data,parsedType:Ut(W.data),schemaErrorMap:this._def.errorMap,path:W.path,parent:W.parent}}_processInputParams(W){return{status:new ct,ctx:{common:W.parent.common,data:W.data,parsedType:Ut(W.data),schemaErrorMap:this._def.errorMap,path:W.path,parent:W.parent}}}_parseSync(W){const q=this._parse(W);if(pr(q))throw new Error("Synchronous parse encountered promise.");return q}_parseAsync(W){const q=this._parse(W);return Promise.resolve(q)}parse(W,q){const K=this.safeParse(W,q);if(K.success)return K.data;throw K.error}safeParse(W,q){var K;const X={common:{issues:[],async:(K=q==null?void 0:q.async)!==null&&K!==void 0?K:!1,contextualErrorMap:q==null?void 0:q.errorMap},path:(q==null?void 0:q.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:W,parsedType:Ut(W)},tt=this._parseSync({data:W,path:X.path,parent:X});return Yn(X,tt)}async parseAsync(W,q){const K=await this.safeParseAsync(W,q);if(K.success)return K.data;throw K.error}async safeParseAsync(W,q){const K={common:{issues:[],contextualErrorMap:q==null?void 0:q.errorMap,async:!0},path:(q==null?void 0:q.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:W,parsedType:Ut(W)},X=this._parse({data:W,path:K.path,parent:K}),tt=await(pr(X)?X:Promise.resolve(X));return Yn(K,tt)}refine(W,q){const K=X=>typeof q=="string"||typeof q>"u"?{message:q}:typeof q=="function"?q(X):q;return this._refinement((X,tt)=>{const rt=W(X),ot=()=>tt.addIssue({code:R.custom,...K(X)});return typeof Promise<"u"&&rt instanceof Promise?rt.then(ut=>ut?!0:(ot(),!1)):rt?!0:(ot(),!1)})}refinement(W,q){return this._refinement((K,X)=>W(K)?!0:(X.addIssue(typeof q=="function"?q(K,X):q),!1))}_refinement(W){return new It({schema:this,typeName:D.ZodEffects,effect:{type:"refinement",refinement:W}})}superRefine(W){return this._refinement(W)}optional(){return Bt.create(this,this._def)}nullable(){return Yt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Et.create(this,this._def)}promise(){return he.create(this,this._def)}or(W){return Re.create([this,W],this._def)}and(W){return Ce.create(this,W,this._def)}transform(W){return new It({...G(this._def),schema:this,typeName:D.ZodEffects,effect:{type:"transform",transform:W}})}default(W){const q=typeof W=="function"?W:()=>W;return new Le({...G(this._def),innerType:this,defaultValue:q,typeName:D.ZodDefault})}brand(){return new Gi({typeName:D.ZodBranded,type:this,...G(this._def)})}catch(W){const q=typeof W=="function"?W:()=>W;return new vr({...G(this._def),innerType:this,catchValue:q,typeName:D.ZodCatch})}describe(W){const q=this.constructor;return new q({...this._def,description:W})}pipe(W){return Fe.create(this,W)}readonly(){return xr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Io=/^c[^\s-]{8,}$/i,So=/^[a-z][a-z0-9]*$/,Ao=/^[0-9A-HJKMNP-TV-Z]{26}$/,Ro=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Co=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Po="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Zr;const ko=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Oo=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,No=F=>F.precision?F.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${F.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${F.precision}}Z$`):F.precision===0?F.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):F.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Lo(F,W){return!!((W==="v4"||!W)&&ko.test(F)||(W==="v6"||!W)&&Oo.test(F))}class Tt extends U{_parse(W){if(this._def.coerce&&(W.data=String(W.data)),this._getType(W)!==O.string){const X=this._getOrReturnCtx(W);return N(X,{code:R.invalid_type,expected:O.string,received:X.parsedType}),B}const q=new ct;let K;for(const X of this._def.checks)if(X.kind==="min")W.data.lengthX.value&&(K=this._getOrReturnCtx(W,K),N(K,{code:R.too_big,maximum:X.value,type:"string",inclusive:!0,exact:!1,message:X.message}),q.dirty());else if(X.kind==="length"){const tt=W.data.length>X.value,rt=W.data.lengthW.test(X),{validation:q,code:R.invalid_string,...L$1.errToObj(K)})}_addCheck(W){return new Tt({...this._def,checks:[...this._def.checks,W]})}email(W){return this._addCheck({kind:"email",...L$1.errToObj(W)})}url(W){return this._addCheck({kind:"url",...L$1.errToObj(W)})}emoji(W){return this._addCheck({kind:"emoji",...L$1.errToObj(W)})}uuid(W){return this._addCheck({kind:"uuid",...L$1.errToObj(W)})}cuid(W){return this._addCheck({kind:"cuid",...L$1.errToObj(W)})}cuid2(W){return this._addCheck({kind:"cuid2",...L$1.errToObj(W)})}ulid(W){return this._addCheck({kind:"ulid",...L$1.errToObj(W)})}ip(W){return this._addCheck({kind:"ip",...L$1.errToObj(W)})}datetime(W){var q;return typeof W=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:W}):this._addCheck({kind:"datetime",precision:typeof(W==null?void 0:W.precision)>"u"?null:W==null?void 0:W.precision,offset:(q=W==null?void 0:W.offset)!==null&&q!==void 0?q:!1,...L$1.errToObj(W==null?void 0:W.message)})}regex(W,q){return this._addCheck({kind:"regex",regex:W,...L$1.errToObj(q)})}includes(W,q){return this._addCheck({kind:"includes",value:W,position:q==null?void 0:q.position,...L$1.errToObj(q==null?void 0:q.message)})}startsWith(W,q){return this._addCheck({kind:"startsWith",value:W,...L$1.errToObj(q)})}endsWith(W,q){return this._addCheck({kind:"endsWith",value:W,...L$1.errToObj(q)})}min(W,q){return this._addCheck({kind:"min",value:W,...L$1.errToObj(q)})}max(W,q){return this._addCheck({kind:"max",value:W,...L$1.errToObj(q)})}length(W,q){return this._addCheck({kind:"length",value:W,...L$1.errToObj(q)})}nonempty(W){return this.min(1,L$1.errToObj(W))}trim(){return new Tt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Tt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Tt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(W=>W.kind==="datetime")}get isEmail(){return!!this._def.checks.find(W=>W.kind==="email")}get isURL(){return!!this._def.checks.find(W=>W.kind==="url")}get isEmoji(){return!!this._def.checks.find(W=>W.kind==="emoji")}get isUUID(){return!!this._def.checks.find(W=>W.kind==="uuid")}get isCUID(){return!!this._def.checks.find(W=>W.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(W=>W.kind==="cuid2")}get isULID(){return!!this._def.checks.find(W=>W.kind==="ulid")}get isIP(){return!!this._def.checks.find(W=>W.kind==="ip")}get minLength(){let W=null;for(const q of this._def.checks)q.kind==="min"&&(W===null||q.value>W)&&(W=q.value);return W}get maxLength(){let W=null;for(const q of this._def.checks)q.kind==="max"&&(W===null||q.value{var W;return new Tt({checks:[],typeName:D.ZodString,coerce:(W=F==null?void 0:F.coerce)!==null&&W!==void 0?W:!1,...G(F)})};function Do(F,W){const q=(F.toString().split(".")[1]||"").length,K=(W.toString().split(".")[1]||"").length,X=q>K?q:K,tt=parseInt(F.toFixed(X).replace(".","")),rt=parseInt(W.toFixed(X).replace(".",""));return tt%rt/Math.pow(10,X)}class Wt extends U{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(W){if(this._def.coerce&&(W.data=Number(W.data)),this._getType(W)!==O.number){const X=this._getOrReturnCtx(W);return N(X,{code:R.invalid_type,expected:O.number,received:X.parsedType}),B}let q;const K=new ct;for(const X of this._def.checks)X.kind==="int"?H.isInteger(W.data)||(q=this._getOrReturnCtx(W,q),N(q,{code:R.invalid_type,expected:"integer",received:"float",message:X.message}),K.dirty()):X.kind==="min"?(X.inclusive?W.dataX.value:W.data>=X.value)&&(q=this._getOrReturnCtx(W,q),N(q,{code:R.too_big,maximum:X.value,type:"number",inclusive:X.inclusive,exact:!1,message:X.message}),K.dirty()):X.kind==="multipleOf"?Do(W.data,X.value)!==0&&(q=this._getOrReturnCtx(W,q),N(q,{code:R.not_multiple_of,multipleOf:X.value,message:X.message}),K.dirty()):X.kind==="finite"?Number.isFinite(W.data)||(q=this._getOrReturnCtx(W,q),N(q,{code:R.not_finite,message:X.message}),K.dirty()):H.assertNever(X);return{status:K.value,value:W.data}}gte(W,q){return this.setLimit("min",W,!0,L$1.toString(q))}gt(W,q){return this.setLimit("min",W,!1,L$1.toString(q))}lte(W,q){return this.setLimit("max",W,!0,L$1.toString(q))}lt(W,q){return this.setLimit("max",W,!1,L$1.toString(q))}setLimit(W,q,K,X){return new Wt({...this._def,checks:[...this._def.checks,{kind:W,value:q,inclusive:K,message:L$1.toString(X)}]})}_addCheck(W){return new Wt({...this._def,checks:[...this._def.checks,W]})}int(W){return this._addCheck({kind:"int",message:L$1.toString(W)})}positive(W){return this._addCheck({kind:"min",value:0,inclusive:!1,message:L$1.toString(W)})}negative(W){return this._addCheck({kind:"max",value:0,inclusive:!1,message:L$1.toString(W)})}nonpositive(W){return this._addCheck({kind:"max",value:0,inclusive:!0,message:L$1.toString(W)})}nonnegative(W){return this._addCheck({kind:"min",value:0,inclusive:!0,message:L$1.toString(W)})}multipleOf(W,q){return this._addCheck({kind:"multipleOf",value:W,message:L$1.toString(q)})}finite(W){return this._addCheck({kind:"finite",message:L$1.toString(W)})}safe(W){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:L$1.toString(W)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:L$1.toString(W)})}get minValue(){let W=null;for(const q of this._def.checks)q.kind==="min"&&(W===null||q.value>W)&&(W=q.value);return W}get maxValue(){let W=null;for(const q of this._def.checks)q.kind==="max"&&(W===null||q.valueW.kind==="int"||W.kind==="multipleOf"&&H.isInteger(W.value))}get isFinite(){let W=null,q=null;for(const K of this._def.checks){if(K.kind==="finite"||K.kind==="int"||K.kind==="multipleOf")return!0;K.kind==="min"?(q===null||K.value>q)&&(q=K.value):K.kind==="max"&&(W===null||K.valuenew Wt({checks:[],typeName:D.ZodNumber,coerce:(F==null?void 0:F.coerce)||!1,...G(F)});class Vt extends U{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(W){if(this._def.coerce&&(W.data=BigInt(W.data)),this._getType(W)!==O.bigint){const X=this._getOrReturnCtx(W);return N(X,{code:R.invalid_type,expected:O.bigint,received:X.parsedType}),B}let q;const K=new ct;for(const X of this._def.checks)X.kind==="min"?(X.inclusive?W.dataX.value:W.data>=X.value)&&(q=this._getOrReturnCtx(W,q),N(q,{code:R.too_big,type:"bigint",maximum:X.value,inclusive:X.inclusive,message:X.message}),K.dirty()):X.kind==="multipleOf"?W.data%X.value!==BigInt(0)&&(q=this._getOrReturnCtx(W,q),N(q,{code:R.not_multiple_of,multipleOf:X.value,message:X.message}),K.dirty()):H.assertNever(X);return{status:K.value,value:W.data}}gte(W,q){return this.setLimit("min",W,!0,L$1.toString(q))}gt(W,q){return this.setLimit("min",W,!1,L$1.toString(q))}lte(W,q){return this.setLimit("max",W,!0,L$1.toString(q))}lt(W,q){return this.setLimit("max",W,!1,L$1.toString(q))}setLimit(W,q,K,X){return new Vt({...this._def,checks:[...this._def.checks,{kind:W,value:q,inclusive:K,message:L$1.toString(X)}]})}_addCheck(W){return new Vt({...this._def,checks:[...this._def.checks,W]})}positive(W){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:L$1.toString(W)})}negative(W){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:L$1.toString(W)})}nonpositive(W){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:L$1.toString(W)})}nonnegative(W){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:L$1.toString(W)})}multipleOf(W,q){return this._addCheck({kind:"multipleOf",value:W,message:L$1.toString(q)})}get minValue(){let W=null;for(const q of this._def.checks)q.kind==="min"&&(W===null||q.value>W)&&(W=q.value);return W}get maxValue(){let W=null;for(const q of this._def.checks)q.kind==="max"&&(W===null||q.value{var W;return new Vt({checks:[],typeName:D.ZodBigInt,coerce:(W=F==null?void 0:F.coerce)!==null&&W!==void 0?W:!1,...G(F)})};class Ie extends U{_parse(W){if(this._def.coerce&&(W.data=!!W.data),this._getType(W)!==O.boolean){const q=this._getOrReturnCtx(W);return N(q,{code:R.invalid_type,expected:O.boolean,received:q.parsedType}),B}return ft(W.data)}}Ie.create=F=>new Ie({typeName:D.ZodBoolean,coerce:(F==null?void 0:F.coerce)||!1,...G(F)});class qt extends U{_parse(W){if(this._def.coerce&&(W.data=new Date(W.data)),this._getType(W)!==O.date){const X=this._getOrReturnCtx(W);return N(X,{code:R.invalid_type,expected:O.date,received:X.parsedType}),B}if(isNaN(W.data.getTime())){const X=this._getOrReturnCtx(W);return N(X,{code:R.invalid_date}),B}const q=new ct;let K;for(const X of this._def.checks)X.kind==="min"?W.data.getTime()X.value&&(K=this._getOrReturnCtx(W,K),N(K,{code:R.too_big,message:X.message,inclusive:!0,exact:!1,maximum:X.value,type:"date"}),q.dirty()):H.assertNever(X);return{status:q.value,value:new Date(W.data.getTime())}}_addCheck(W){return new qt({...this._def,checks:[...this._def.checks,W]})}min(W,q){return this._addCheck({kind:"min",value:W.getTime(),message:L$1.toString(q)})}max(W,q){return this._addCheck({kind:"max",value:W.getTime(),message:L$1.toString(q)})}get minDate(){let W=null;for(const q of this._def.checks)q.kind==="min"&&(W===null||q.value>W)&&(W=q.value);return W!=null?new Date(W):null}get maxDate(){let W=null;for(const q of this._def.checks)q.kind==="max"&&(W===null||q.valuenew qt({checks:[],coerce:(F==null?void 0:F.coerce)||!1,typeName:D.ZodDate,...G(F)});class gr extends U{_parse(W){if(this._getType(W)!==O.symbol){const q=this._getOrReturnCtx(W);return N(q,{code:R.invalid_type,expected:O.symbol,received:q.parsedType}),B}return ft(W.data)}}gr.create=F=>new gr({typeName:D.ZodSymbol,...G(F)});class Se extends U{_parse(W){if(this._getType(W)!==O.undefined){const q=this._getOrReturnCtx(W);return N(q,{code:R.invalid_type,expected:O.undefined,received:q.parsedType}),B}return ft(W.data)}}Se.create=F=>new Se({typeName:D.ZodUndefined,...G(F)});class Ae extends U{_parse(W){if(this._getType(W)!==O.null){const q=this._getOrReturnCtx(W);return N(q,{code:R.invalid_type,expected:O.null,received:q.parsedType}),B}return ft(W.data)}}Ae.create=F=>new Ae({typeName:D.ZodNull,...G(F)});class ae extends U{constructor(){super(...arguments),this._any=!0}_parse(W){return ft(W.data)}}ae.create=F=>new ae({typeName:D.ZodAny,...G(F)});class Xt extends U{constructor(){super(...arguments),this._unknown=!0}_parse(W){return ft(W.data)}}Xt.create=F=>new Xt({typeName:D.ZodUnknown,...G(F)});class Gt extends U{_parse(W){const q=this._getOrReturnCtx(W);return N(q,{code:R.invalid_type,expected:O.never,received:q.parsedType}),B}}Gt.create=F=>new Gt({typeName:D.ZodNever,...G(F)});class mr extends U{_parse(W){if(this._getType(W)!==O.undefined){const q=this._getOrReturnCtx(W);return N(q,{code:R.invalid_type,expected:O.void,received:q.parsedType}),B}return ft(W.data)}}mr.create=F=>new mr({typeName:D.ZodVoid,...G(F)});class Et extends U{_parse(W){const{ctx:q,status:K}=this._processInputParams(W),X=this._def;if(q.parsedType!==O.array)return N(q,{code:R.invalid_type,expected:O.array,received:q.parsedType}),B;if(X.exactLength!==null){const rt=q.data.length>X.exactLength.value,ot=q.data.lengthX.maxLength.value&&(N(q,{code:R.too_big,maximum:X.maxLength.value,type:"array",inclusive:!0,exact:!1,message:X.maxLength.message}),K.dirty()),q.common.async)return Promise.all([...q.data].map((rt,ot)=>X.type._parseAsync(new Ct(q,rt,q.path,ot)))).then(rt=>ct.mergeArray(K,rt));const tt=[...q.data].map((rt,ot)=>X.type._parseSync(new Ct(q,rt,q.path,ot)));return ct.mergeArray(K,tt)}get element(){return this._def.type}min(W,q){return new Et({...this._def,minLength:{value:W,message:L$1.toString(q)}})}max(W,q){return new Et({...this._def,maxLength:{value:W,message:L$1.toString(q)}})}length(W,q){return new Et({...this._def,exactLength:{value:W,message:L$1.toString(q)}})}nonempty(W){return this.min(1,W)}}Et.create=(F,W)=>new Et({type:F,minLength:null,maxLength:null,exactLength:null,typeName:D.ZodArray,...G(W)});function ee(F){if(F instanceof Q){const W={};for(const q in F.shape){const K=F.shape[q];W[q]=Bt.create(ee(K))}return new Q({...F._def,shape:()=>W})}else return F instanceof Et?new Et({...F._def,type:ee(F.element)}):F instanceof Bt?Bt.create(ee(F.unwrap())):F instanceof Yt?Yt.create(ee(F.unwrap())):F instanceof Pt?Pt.create(F.items.map(W=>ee(W))):F}class Q extends U{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const W=this._def.shape(),q=H.objectKeys(W);return this._cached={shape:W,keys:q}}_parse(W){if(this._getType(W)!==O.object){const ut=this._getOrReturnCtx(W);return N(ut,{code:R.invalid_type,expected:O.object,received:ut.parsedType}),B}const{status:q,ctx:K}=this._processInputParams(W),{shape:X,keys:tt}=this._getCached(),rt=[];if(!(this._def.catchall instanceof Gt&&this._def.unknownKeys==="strip"))for(const ut in K.data)tt.includes(ut)||rt.push(ut);const ot=[];for(const ut of tt){const yn=X[ut],uo=K.data[ut];ot.push({key:{status:"valid",value:ut},value:yn._parse(new Ct(K,uo,K.path,ut)),alwaysSet:ut in K.data})}if(this._def.catchall instanceof Gt){const ut=this._def.unknownKeys;if(ut==="passthrough")for(const yn of rt)ot.push({key:{status:"valid",value:yn},value:{status:"valid",value:K.data[yn]}});else if(ut==="strict")rt.length>0&&(N(K,{code:R.unrecognized_keys,keys:rt}),q.dirty());else if(ut!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const ut=this._def.catchall;for(const yn of rt){const uo=K.data[yn];ot.push({key:{status:"valid",value:yn},value:ut._parse(new Ct(K,uo,K.path,yn)),alwaysSet:yn in K.data})}}return K.common.async?Promise.resolve().then(async()=>{const ut=[];for(const yn of ot){const uo=await yn.key;ut.push({key:uo,value:await yn.value,alwaysSet:yn.alwaysSet})}return ut}).then(ut=>ct.mergeObjectSync(q,ut)):ct.mergeObjectSync(q,ot)}get shape(){return this._def.shape()}strict(W){return L$1.errToObj,new Q({...this._def,unknownKeys:"strict",...W!==void 0?{errorMap:(q,K)=>{var X,tt,rt,ot;const ut=(rt=(tt=(X=this._def).errorMap)===null||tt===void 0?void 0:tt.call(X,q,K).message)!==null&&rt!==void 0?rt:K.defaultError;return q.code==="unrecognized_keys"?{message:(ot=L$1.errToObj(W).message)!==null&&ot!==void 0?ot:ut}:{message:ut}}}:{}})}strip(){return new Q({...this._def,unknownKeys:"strip"})}passthrough(){return new Q({...this._def,unknownKeys:"passthrough"})}extend(W){return new Q({...this._def,shape:()=>({...this._def.shape(),...W})})}merge(W){return new Q({unknownKeys:W._def.unknownKeys,catchall:W._def.catchall,shape:()=>({...this._def.shape(),...W._def.shape()}),typeName:D.ZodObject})}setKey(W,q){return this.augment({[W]:q})}catchall(W){return new Q({...this._def,catchall:W})}pick(W){const q={};return H.objectKeys(W).forEach(K=>{W[K]&&this.shape[K]&&(q[K]=this.shape[K])}),new Q({...this._def,shape:()=>q})}omit(W){const q={};return H.objectKeys(this.shape).forEach(K=>{W[K]||(q[K]=this.shape[K])}),new Q({...this._def,shape:()=>q})}deepPartial(){return ee(this)}partial(W){const q={};return H.objectKeys(this.shape).forEach(K=>{const X=this.shape[K];W&&!W[K]?q[K]=X:q[K]=X.optional()}),new Q({...this._def,shape:()=>q})}required(W){const q={};return H.objectKeys(this.shape).forEach(K=>{if(W&&!W[K])q[K]=this.shape[K];else{let X=this.shape[K];for(;X instanceof Bt;)X=X._def.innerType;q[K]=X}}),new Q({...this._def,shape:()=>q})}keyof(){return ji(H.objectKeys(this.shape))}}Q.create=(F,W)=>new Q({shape:()=>F,unknownKeys:"strip",catchall:Gt.create(),typeName:D.ZodObject,...G(W)});Q.strictCreate=(F,W)=>new Q({shape:()=>F,unknownKeys:"strict",catchall:Gt.create(),typeName:D.ZodObject,...G(W)});Q.lazycreate=(F,W)=>new Q({shape:F,unknownKeys:"strip",catchall:Gt.create(),typeName:D.ZodObject,...G(W)});class Re extends U{_parse(W){const{ctx:q}=this._processInputParams(W),K=this._def.options;function X(tt){for(const ot of tt)if(ot.result.status==="valid")return ot.result;for(const ot of tt)if(ot.result.status==="dirty")return q.common.issues.push(...ot.ctx.common.issues),ot.result;const rt=tt.map(ot=>new _t(ot.ctx.common.issues));return N(q,{code:R.invalid_union,unionErrors:rt}),B}if(q.common.async)return Promise.all(K.map(async tt=>{const rt={...q,common:{...q.common,issues:[]},parent:null};return{result:await tt._parseAsync({data:q.data,path:q.path,parent:rt}),ctx:rt}})).then(X);{let tt;const rt=[];for(const ut of K){const yn={...q,common:{...q.common,issues:[]},parent:null},uo=ut._parseSync({data:q.data,path:q.path,parent:yn});if(uo.status==="valid")return uo;uo.status==="dirty"&&!tt&&(tt={result:uo,ctx:yn}),yn.common.issues.length&&rt.push(yn.common.issues)}if(tt)return q.common.issues.push(...tt.ctx.common.issues),tt.result;const ot=rt.map(ut=>new _t(ut));return N(q,{code:R.invalid_union,unionErrors:ot}),B}}get options(){return this._def.options}}Re.create=(F,W)=>new Re({options:F,typeName:D.ZodUnion,...G(W)});const or=F=>F instanceof ke?or(F.schema):F instanceof It?or(F.innerType()):F instanceof Oe?[F.value]:F instanceof zt?F.options:F instanceof Ne?Object.keys(F.enum):F instanceof Le?or(F._def.innerType):F instanceof Se?[void 0]:F instanceof Ae?[null]:null;class kr extends U{_parse(W){const{ctx:q}=this._processInputParams(W);if(q.parsedType!==O.object)return N(q,{code:R.invalid_type,expected:O.object,received:q.parsedType}),B;const K=this.discriminator,X=q.data[K],tt=this.optionsMap.get(X);return tt?q.common.async?tt._parseAsync({data:q.data,path:q.path,parent:q}):tt._parseSync({data:q.data,path:q.path,parent:q}):(N(q,{code:R.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[K]}),B)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(W,q,K){const X=new Map;for(const tt of q){const rt=or(tt.shape[W]);if(!rt)throw new Error(`A discriminator value for key \`${W}\` could not be extracted from all schema options`);for(const ot of rt){if(X.has(ot))throw new Error(`Discriminator property ${String(W)} has duplicate value ${String(ot)}`);X.set(ot,tt)}}return new kr({typeName:D.ZodDiscriminatedUnion,discriminator:W,options:q,optionsMap:X,...G(K)})}}function un(F,W){const q=Ut(F),K=Ut(W);if(F===W)return{valid:!0,data:F};if(q===O.object&&K===O.object){const X=H.objectKeys(W),tt=H.objectKeys(F).filter(ot=>X.indexOf(ot)!==-1),rt={...F,...W};for(const ot of tt){const ut=un(F[ot],W[ot]);if(!ut.valid)return{valid:!1};rt[ot]=ut.data}return{valid:!0,data:rt}}else if(q===O.array&&K===O.array){if(F.length!==W.length)return{valid:!1};const X=[];for(let tt=0;tt{if(cn$1(tt)||cn$1(rt))return B;const ot=un(tt.value,rt.value);return ot.valid?((ln(tt)||ln(rt))&&q.dirty(),{status:q.value,value:ot.data}):(N(K,{code:R.invalid_intersection_types}),B)};return K.common.async?Promise.all([this._def.left._parseAsync({data:K.data,path:K.path,parent:K}),this._def.right._parseAsync({data:K.data,path:K.path,parent:K})]).then(([tt,rt])=>X(tt,rt)):X(this._def.left._parseSync({data:K.data,path:K.path,parent:K}),this._def.right._parseSync({data:K.data,path:K.path,parent:K}))}}Ce.create=(F,W,q)=>new Ce({left:F,right:W,typeName:D.ZodIntersection,...G(q)});class Pt extends U{_parse(W){const{status:q,ctx:K}=this._processInputParams(W);if(K.parsedType!==O.array)return N(K,{code:R.invalid_type,expected:O.array,received:K.parsedType}),B;if(K.data.lengththis._def.items.length&&(N(K,{code:R.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q.dirty());const X=[...K.data].map((tt,rt)=>{const ot=this._def.items[rt]||this._def.rest;return ot?ot._parse(new Ct(K,tt,K.path,rt)):null}).filter(tt=>!!tt);return K.common.async?Promise.all(X).then(tt=>ct.mergeArray(q,tt)):ct.mergeArray(q,X)}get items(){return this._def.items}rest(W){return new Pt({...this._def,rest:W})}}Pt.create=(F,W)=>{if(!Array.isArray(F))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Pt({items:F,typeName:D.ZodTuple,rest:null,...G(W)})};class Pe extends U{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(W){const{status:q,ctx:K}=this._processInputParams(W);if(K.parsedType!==O.object)return N(K,{code:R.invalid_type,expected:O.object,received:K.parsedType}),B;const X=[],tt=this._def.keyType,rt=this._def.valueType;for(const ot in K.data)X.push({key:tt._parse(new Ct(K,ot,K.path,ot)),value:rt._parse(new Ct(K,K.data[ot],K.path,ot))});return K.common.async?ct.mergeObjectAsync(q,X):ct.mergeObjectSync(q,X)}get element(){return this._def.valueType}static create(W,q,K){return q instanceof U?new Pe({keyType:W,valueType:q,typeName:D.ZodRecord,...G(K)}):new Pe({keyType:Tt.create(),valueType:W,typeName:D.ZodRecord,...G(q)})}}class yr extends U{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(W){const{status:q,ctx:K}=this._processInputParams(W);if(K.parsedType!==O.map)return N(K,{code:R.invalid_type,expected:O.map,received:K.parsedType}),B;const X=this._def.keyType,tt=this._def.valueType,rt=[...K.data.entries()].map(([ot,ut],yn)=>({key:X._parse(new Ct(K,ot,K.path,[yn,"key"])),value:tt._parse(new Ct(K,ut,K.path,[yn,"value"]))}));if(K.common.async){const ot=new Map;return Promise.resolve().then(async()=>{for(const ut of rt){const yn=await ut.key,uo=await ut.value;if(yn.status==="aborted"||uo.status==="aborted")return B;(yn.status==="dirty"||uo.status==="dirty")&&q.dirty(),ot.set(yn.value,uo.value)}return{status:q.value,value:ot}})}else{const ot=new Map;for(const ut of rt){const yn=ut.key,uo=ut.value;if(yn.status==="aborted"||uo.status==="aborted")return B;(yn.status==="dirty"||uo.status==="dirty")&&q.dirty(),ot.set(yn.value,uo.value)}return{status:q.value,value:ot}}}}yr.create=(F,W,q)=>new yr({valueType:W,keyType:F,typeName:D.ZodMap,...G(q)});class Ht extends U{_parse(W){const{status:q,ctx:K}=this._processInputParams(W);if(K.parsedType!==O.set)return N(K,{code:R.invalid_type,expected:O.set,received:K.parsedType}),B;const X=this._def;X.minSize!==null&&K.data.sizeX.maxSize.value&&(N(K,{code:R.too_big,maximum:X.maxSize.value,type:"set",inclusive:!0,exact:!1,message:X.maxSize.message}),q.dirty());const tt=this._def.valueType;function rt(ut){const yn=new Set;for(const uo of ut){if(uo.status==="aborted")return B;uo.status==="dirty"&&q.dirty(),yn.add(uo.value)}return{status:q.value,value:yn}}const ot=[...K.data.values()].map((ut,yn)=>tt._parse(new Ct(K,ut,K.path,yn)));return K.common.async?Promise.all(ot).then(ut=>rt(ut)):rt(ot)}min(W,q){return new Ht({...this._def,minSize:{value:W,message:L$1.toString(q)}})}max(W,q){return new Ht({...this._def,maxSize:{value:W,message:L$1.toString(q)}})}size(W,q){return this.min(W,q).max(W,q)}nonempty(W){return this.min(1,W)}}Ht.create=(F,W)=>new Ht({valueType:F,minSize:null,maxSize:null,typeName:D.ZodSet,...G(W)});class oe extends U{constructor(){super(...arguments),this.validate=this.implement}_parse(W){const{ctx:q}=this._processInputParams(W);if(q.parsedType!==O.function)return N(q,{code:R.invalid_type,expected:O.function,received:q.parsedType}),B;function K(ot,ut){return fr$2({data:ot,path:q.path,errorMaps:[q.common.contextualErrorMap,q.schemaErrorMap,dr(),_e].filter(yn=>!!yn),issueData:{code:R.invalid_arguments,argumentsError:ut}})}function X(ot,ut){return fr$2({data:ot,path:q.path,errorMaps:[q.common.contextualErrorMap,q.schemaErrorMap,dr(),_e].filter(yn=>!!yn),issueData:{code:R.invalid_return_type,returnTypeError:ut}})}const tt={errorMap:q.common.contextualErrorMap},rt=q.data;if(this._def.returns instanceof he){const ot=this;return ft(async function(...ut){const yn=new _t([]),uo=await ot._def.args.parseAsync(ut,tt).catch(mo=>{throw yn.addIssue(K(ut,mo)),yn}),po=await Reflect.apply(rt,this,uo);return await ot._def.returns._def.type.parseAsync(po,tt).catch(mo=>{throw yn.addIssue(X(po,mo)),yn})})}else{const ot=this;return ft(function(...ut){const yn=ot._def.args.safeParse(ut,tt);if(!yn.success)throw new _t([K(ut,yn.error)]);const uo=Reflect.apply(rt,this,yn.data),po=ot._def.returns.safeParse(uo,tt);if(!po.success)throw new _t([X(uo,po.error)]);return po.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...W){return new oe({...this._def,args:Pt.create(W).rest(Xt.create())})}returns(W){return new oe({...this._def,returns:W})}implement(W){return this.parse(W)}strictImplement(W){return this.parse(W)}static create(W,q,K){return new oe({args:W||Pt.create([]).rest(Xt.create()),returns:q||Xt.create(),typeName:D.ZodFunction,...G(K)})}}class ke extends U{get schema(){return this._def.getter()}_parse(W){const{ctx:q}=this._processInputParams(W);return this._def.getter()._parse({data:q.data,path:q.path,parent:q})}}ke.create=(F,W)=>new ke({getter:F,typeName:D.ZodLazy,...G(W)});class Oe extends U{_parse(W){if(W.data!==this._def.value){const q=this._getOrReturnCtx(W);return N(q,{received:q.data,code:R.invalid_literal,expected:this._def.value}),B}return{status:"valid",value:W.data}}get value(){return this._def.value}}Oe.create=(F,W)=>new Oe({value:F,typeName:D.ZodLiteral,...G(W)});function ji(F,W){return new zt({values:F,typeName:D.ZodEnum,...G(W)})}class zt extends U{_parse(W){if(typeof W.data!="string"){const q=this._getOrReturnCtx(W),K=this._def.values;return N(q,{expected:H.joinValues(K),received:q.parsedType,code:R.invalid_type}),B}if(this._def.values.indexOf(W.data)===-1){const q=this._getOrReturnCtx(W),K=this._def.values;return N(q,{received:q.data,code:R.invalid_enum_value,options:K}),B}return ft(W.data)}get options(){return this._def.values}get enum(){const W={};for(const q of this._def.values)W[q]=q;return W}get Values(){const W={};for(const q of this._def.values)W[q]=q;return W}get Enum(){const W={};for(const q of this._def.values)W[q]=q;return W}extract(W){return zt.create(W)}exclude(W){return zt.create(this.options.filter(q=>!W.includes(q)))}}zt.create=ji;class Ne extends U{_parse(W){const q=H.getValidEnumValues(this._def.values),K=this._getOrReturnCtx(W);if(K.parsedType!==O.string&&K.parsedType!==O.number){const X=H.objectValues(q);return N(K,{expected:H.joinValues(X),received:K.parsedType,code:R.invalid_type}),B}if(q.indexOf(W.data)===-1){const X=H.objectValues(q);return N(K,{received:K.data,code:R.invalid_enum_value,options:X}),B}return ft(W.data)}get enum(){return this._def.values}}Ne.create=(F,W)=>new Ne({values:F,typeName:D.ZodNativeEnum,...G(W)});class he extends U{unwrap(){return this._def.type}_parse(W){const{ctx:q}=this._processInputParams(W);if(q.parsedType!==O.promise&&q.common.async===!1)return N(q,{code:R.invalid_type,expected:O.promise,received:q.parsedType}),B;const K=q.parsedType===O.promise?q.data:Promise.resolve(q.data);return ft(K.then(X=>this._def.type.parseAsync(X,{path:q.path,errorMap:q.common.contextualErrorMap})))}}he.create=(F,W)=>new he({type:F,typeName:D.ZodPromise,...G(W)});class It extends U{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===D.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(W){const{status:q,ctx:K}=this._processInputParams(W),X=this._def.effect||null,tt={addIssue:rt=>{N(K,rt),rt.fatal?q.abort():q.dirty()},get path(){return K.path}};if(tt.addIssue=tt.addIssue.bind(tt),X.type==="preprocess"){const rt=X.transform(K.data,tt);return K.common.issues.length?{status:"dirty",value:K.data}:K.common.async?Promise.resolve(rt).then(ot=>this._def.schema._parseAsync({data:ot,path:K.path,parent:K})):this._def.schema._parseSync({data:rt,path:K.path,parent:K})}if(X.type==="refinement"){const rt=ot=>{const ut=X.refinement(ot,tt);if(K.common.async)return Promise.resolve(ut);if(ut instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return ot};if(K.common.async===!1){const ot=this._def.schema._parseSync({data:K.data,path:K.path,parent:K});return ot.status==="aborted"?B:(ot.status==="dirty"&&q.dirty(),rt(ot.value),{status:q.value,value:ot.value})}else return this._def.schema._parseAsync({data:K.data,path:K.path,parent:K}).then(ot=>ot.status==="aborted"?B:(ot.status==="dirty"&&q.dirty(),rt(ot.value).then(()=>({status:q.value,value:ot.value}))))}if(X.type==="transform")if(K.common.async===!1){const rt=this._def.schema._parseSync({data:K.data,path:K.path,parent:K});if(!Ee(rt))return rt;const ot=X.transform(rt.value,tt);if(ot instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:q.value,value:ot}}else return this._def.schema._parseAsync({data:K.data,path:K.path,parent:K}).then(rt=>Ee(rt)?Promise.resolve(X.transform(rt.value,tt)).then(ot=>({status:q.value,value:ot})):rt);H.assertNever(X)}}It.create=(F,W,q)=>new It({schema:F,typeName:D.ZodEffects,effect:W,...G(q)});It.createWithPreprocess=(F,W,q)=>new It({schema:W,effect:{type:"preprocess",transform:F},typeName:D.ZodEffects,...G(q)});class Bt extends U{_parse(W){return this._getType(W)===O.undefined?ft(void 0):this._def.innerType._parse(W)}unwrap(){return this._def.innerType}}Bt.create=(F,W)=>new Bt({innerType:F,typeName:D.ZodOptional,...G(W)});class Yt extends U{_parse(W){return this._getType(W)===O.null?ft(null):this._def.innerType._parse(W)}unwrap(){return this._def.innerType}}Yt.create=(F,W)=>new Yt({innerType:F,typeName:D.ZodNullable,...G(W)});class Le extends U{_parse(W){const{ctx:q}=this._processInputParams(W);let K=q.data;return q.parsedType===O.undefined&&(K=this._def.defaultValue()),this._def.innerType._parse({data:K,path:q.path,parent:q})}removeDefault(){return this._def.innerType}}Le.create=(F,W)=>new Le({innerType:F,typeName:D.ZodDefault,defaultValue:typeof W.default=="function"?W.default:()=>W.default,...G(W)});class vr extends U{_parse(W){const{ctx:q}=this._processInputParams(W),K={...q,common:{...q.common,issues:[]}},X=this._def.innerType._parse({data:K.data,path:K.path,parent:{...K}});return pr(X)?X.then(tt=>({status:"valid",value:tt.status==="valid"?tt.value:this._def.catchValue({get error(){return new _t(K.common.issues)},input:K.data})})):{status:"valid",value:X.status==="valid"?X.value:this._def.catchValue({get error(){return new _t(K.common.issues)},input:K.data})}}removeCatch(){return this._def.innerType}}vr.create=(F,W)=>new vr({innerType:F,typeName:D.ZodCatch,catchValue:typeof W.catch=="function"?W.catch:()=>W.catch,...G(W)});class wr extends U{_parse(W){if(this._getType(W)!==O.nan){const q=this._getOrReturnCtx(W);return N(q,{code:R.invalid_type,expected:O.nan,received:q.parsedType}),B}return{status:"valid",value:W.data}}}wr.create=F=>new wr({typeName:D.ZodNaN,...G(F)});const Bo=Symbol("zod_brand");class Gi extends U{_parse(W){const{ctx:q}=this._processInputParams(W),K=q.data;return this._def.type._parse({data:K,path:q.path,parent:q})}unwrap(){return this._def.type}}class Fe extends U{_parse(W){const{status:q,ctx:K}=this._processInputParams(W);if(K.common.async)return(async()=>{const X=await this._def.in._parseAsync({data:K.data,path:K.path,parent:K});return X.status==="aborted"?B:X.status==="dirty"?(q.dirty(),Bi(X.value)):this._def.out._parseAsync({data:X.value,path:K.path,parent:K})})();{const X=this._def.in._parseSync({data:K.data,path:K.path,parent:K});return X.status==="aborted"?B:X.status==="dirty"?(q.dirty(),{status:"dirty",value:X.value}):this._def.out._parseSync({data:X.value,path:K.path,parent:K})}}static create(W,q){return new Fe({in:W,out:q,typeName:D.ZodPipeline})}}class xr extends U{_parse(W){const q=this._def.innerType._parse(W);return Ee(q)&&(q.value=Object.freeze(q.value)),q}}xr.create=(F,W)=>new xr({innerType:F,typeName:D.ZodReadonly,...G(W)});const Fi=(F,W={},q)=>F?ae.create().superRefine((K,X)=>{var tt,rt;if(!F(K)){const ot=typeof W=="function"?W(K):typeof W=="string"?{message:W}:W,ut=(rt=(tt=ot.fatal)!==null&&tt!==void 0?tt:q)!==null&&rt!==void 0?rt:!0,yn=typeof ot=="string"?{message:ot}:ot;X.addIssue({code:"custom",...yn,fatal:ut})}}):ae.create(),jo={object:Q.lazycreate};var D;(function(F){F.ZodString="ZodString",F.ZodNumber="ZodNumber",F.ZodNaN="ZodNaN",F.ZodBigInt="ZodBigInt",F.ZodBoolean="ZodBoolean",F.ZodDate="ZodDate",F.ZodSymbol="ZodSymbol",F.ZodUndefined="ZodUndefined",F.ZodNull="ZodNull",F.ZodAny="ZodAny",F.ZodUnknown="ZodUnknown",F.ZodNever="ZodNever",F.ZodVoid="ZodVoid",F.ZodArray="ZodArray",F.ZodObject="ZodObject",F.ZodUnion="ZodUnion",F.ZodDiscriminatedUnion="ZodDiscriminatedUnion",F.ZodIntersection="ZodIntersection",F.ZodTuple="ZodTuple",F.ZodRecord="ZodRecord",F.ZodMap="ZodMap",F.ZodSet="ZodSet",F.ZodFunction="ZodFunction",F.ZodLazy="ZodLazy",F.ZodLiteral="ZodLiteral",F.ZodEnum="ZodEnum",F.ZodEffects="ZodEffects",F.ZodNativeEnum="ZodNativeEnum",F.ZodOptional="ZodOptional",F.ZodNullable="ZodNullable",F.ZodDefault="ZodDefault",F.ZodCatch="ZodCatch",F.ZodPromise="ZodPromise",F.ZodBranded="ZodBranded",F.ZodPipeline="ZodPipeline",F.ZodReadonly="ZodReadonly"})(D||(D={}));const Go=(F,W={message:`Input not instance of ${F.name}`})=>Fi(q=>q instanceof F,W),Ui=Tt.create,Wi=Wt.create,Fo=wr.create,Uo=Vt.create,Vi=Ie.create,Wo=qt.create,Vo=gr.create,zo=Se.create,Zo=Ae.create,$o=ae.create,Xo=Xt.create,qo=Gt.create,Ho=mr.create,Yo=Et.create,Jo=Q.create,Ko=Q.strictCreate,Qo=Re.create,ta=kr.create,ea=Ce.create,ra=Pt.create,na=Pe.create,ia=yr.create,sa=Ht.create,oa=oe.create,aa=ke.create,ha=Oe.create,ca=zt.create,la=Ne.create,ua=he.create,Jn=It.create,da=Bt.create,fa=Yt.create,pa=It.createWithPreprocess,ga=Fe.create,ma=()=>Ui().optional(),ya=()=>Wi().optional(),va=()=>Vi().optional(),wa={string:F=>Tt.create({...F,coerce:!0}),number:F=>Wt.create({...F,coerce:!0}),boolean:F=>Ie.create({...F,coerce:!0}),bigint:F=>Vt.create({...F,coerce:!0}),date:F=>qt.create({...F,coerce:!0})},xa=B;var m=Object.freeze({__proto__:null,defaultErrorMap:_e,setErrorMap:_o,getErrorMap:dr,makeIssue:fr$2,EMPTY_PATH:Eo,addIssueToContext:N,ParseStatus:ct,INVALID:B,DIRTY:Bi,OK:ft,isAborted:cn$1,isDirty:ln,isValid:Ee,isAsync:pr,get util(){return H},get objectUtil(){return hn},ZodParsedType:O,getParsedType:Ut,ZodType:U,ZodString:Tt,ZodNumber:Wt,ZodBigInt:Vt,ZodBoolean:Ie,ZodDate:qt,ZodSymbol:gr,ZodUndefined:Se,ZodNull:Ae,ZodAny:ae,ZodUnknown:Xt,ZodNever:Gt,ZodVoid:mr,ZodArray:Et,ZodObject:Q,ZodUnion:Re,ZodDiscriminatedUnion:kr,ZodIntersection:Ce,ZodTuple:Pt,ZodRecord:Pe,ZodMap:yr,ZodSet:Ht,ZodFunction:oe,ZodLazy:ke,ZodLiteral:Oe,ZodEnum:zt,ZodNativeEnum:Ne,ZodPromise:he,ZodEffects:It,ZodTransformer:It,ZodOptional:Bt,ZodNullable:Yt,ZodDefault:Le,ZodCatch:vr,ZodNaN:wr,BRAND:Bo,ZodBranded:Gi,ZodPipeline:Fe,ZodReadonly:xr,custom:Fi,Schema:U,ZodSchema:U,late:jo,get ZodFirstPartyTypeKind(){return D},coerce:wa,any:$o,array:Yo,bigint:Uo,boolean:Vi,date:Wo,discriminatedUnion:ta,effect:Jn,enum:ca,function:oa,instanceof:Go,intersection:ea,lazy:aa,literal:ha,map:ia,nan:Fo,nativeEnum:la,never:qo,null:Zo,nullable:fa,number:Wi,object:Jo,oboolean:va,onumber:ya,optional:da,ostring:ma,pipeline:ga,preprocess:pa,promise:ua,record:na,set:sa,strictObject:Ko,string:Ui,symbol:Vo,transformer:Jn,tuple:ra,undefined:zo,union:Qo,unknown:Xo,void:Ho,NEVER:xa,ZodIssueCode:R,quotelessJson:Mo,ZodError:_t});const Or=/^https?:\/\/library.stanford.edu\/iiif\/image-api\/1.1\/compliance.html#level(?[012])$/,zi=m.string().regex(Or),ba=zi,br="http://library.stanford.edu/iiif/image-api/1.1/context.json",Zi="http://iiif.io/api/image/1/context.json",$i=m.literal(br),Xi=m.object({"@context":$i,"@id":m.string().url(),profile:zi.optional(),width:m.number().int(),height:m.number().int(),scale_factors:m.number().array().optional(),tile_width:m.number().optional(),tile_height:m.number().optional()}),qi=m.object({width:m.number().int(),height:m.number().int()}),Hi=m.object({width:m.number().int(),height:m.number().int().optional(),scaleFactors:m.array(m.number().int())}),Nr=/^https?:\/\/iiif.io\/api\/image\/2.*level(?[012])(.json)?$/,Kn=m.string().regex(Nr),Ta=m.object({formats:m.string().array().optional(),maxArea:m.number().int().optional(),maxHeight:m.number().int().optional(),maxWidth:m.number().int().optional(),qualities:m.string().array().optional(),supports:m.string().array().optional()}),Tr=Kn.or(m.array(m.union([Kn,Ta,m.any()]))),Mr="http://iiif.io/api/image/2/context.json",Yi=m.literal(Mr).or(m.literal("https://iiif.io/api/image/2/context.json")),En=m.object({"@id":m.string().url(),"@type":m.literal("iiif:Image").optional(),"@context":Yi,protocol:m.literal("http://iiif.io/api/image"),width:m.number().int(),height:m.number().int(),profile:Tr,sizes:qi.array().optional(),tiles:Hi.array().optional()}),Ma=["level0","level1","level2"],In=m.object({id:m.string().url(),type:m.literal("ImageService3"),protocol:m.literal("http://iiif.io/api/image"),profile:m.enum(Ma),width:m.number().int(),height:m.number().int(),maxWidth:m.number().int().optional(),maxHeight:m.number().int().optional(),maxArea:m.number().int().optional(),sizes:qi.array().optional(),tiles:Hi.array().optional(),extraFeatures:m.string().array().optional()}),_a=m.object({"@id":m.string().url(),profile:ba.or(Tr),width:m.number().int().optional(),height:m.number().int().optional(),"@context":$i.or(m.literal("http://iiif.io/api/image/1/context.json")).or(Yi).optional()}),Ea=["level0","level1","level2"],Ia=["ImageService1","ImageService2","ImageService3"],Sa=m.object({id:m.string().url(),type:m.literal("ImageService2"),profile:Tr}).or(m.object({"@id":m.string().url(),"@type":m.literal("ImageService2"),profile:Tr})),Aa=m.object({id:m.string().url(),type:m.enum(Ia),profile:m.enum(Ea)}),Ra=m.union([Sa,Aa]),Ji=_a.or(Ra),Qn=m.string().or(m.number()).or(m.boolean()),Ki=Qn.or(Qn.array()),ti=m.object({"@language":m.string().optional(),"@value":Ki}),Jt=Ki.or(ti).or(ti.array()),Ca=m.object({label:Jt.optional(),value:Jt.optional()}),Qi=Ca.array(),Pa=m.object({width:m.number().int().optional(),height:m.number().int().optional(),service:Ji}),ka=m.object({resource:Pa}),ts=m.object({"@id":m.string().url(),"@type":m.literal("sc:Canvas"),width:m.number().int(),height:m.number().int(),images:ka.array().length(1),label:Jt.optional(),metadata:Qi.optional()}),Oa=m.object({canvases:ts.array().nonempty()}),es$2=m.object({"@id":m.string().url(),"@type":m.literal("sc:Manifest"),sequences:Oa.array().length(1),label:Jt.optional(),description:Jt.optional(),metadata:Qi.optional()}),ei=m.lazy(()=>m.object({"@id":m.string().url(),"@type":m.literal("sc:Manifest"),label:Jt.optional()})),dn=m.lazy(()=>m.object({"@id":m.string().url(),"@type":m.literal("sc:Collection"),label:Jt.optional(),manifests:ei.array().optional(),collections:dn.array().optional(),members:ei.or(dn).array().optional()})),Na=m.string().or(m.number()).or(m.boolean()),Kt=m.record(m.string(),Na.array()),La=m.object({label:Kt.optional(),value:Kt.optional()}),rs=La.array(),ri=m.object({type:m.literal("Image"),width:m.number().int().optional(),height:m.number().int().optional(),service:Ji.array()}),Da=m.object({type:m.literal("Annotation"),body:ri.or(ri.array().length(1))}),Ba=m.object({type:m.literal("AnnotationPage"),items:Da.array().length(1)}),ns=m.object({id:m.string().url(),type:m.literal("Canvas"),width:m.number().int(),height:m.number().int(),items:Ba.array().length(1),label:Kt.optional(),metadata:rs.optional()}),is=m.object({id:m.string().url(),type:m.literal("Manifest"),items:ns.array().nonempty(),label:Kt.optional(),description:Kt.optional(),metadata:rs.optional()}),ja$1=m.lazy(()=>m.object({id:m.string().url(),type:m.literal("Manifest"),label:Kt.optional()})),ss=m.lazy(()=>m.object({id:m.string().url(),type:m.literal("Collection"),label:Kt.optional(),items:ja$1.or(ss).array()})),os=Xi.or(En).or(In);ts.or(ns);const Ga=es$2.or(is);dn.or(ss);es$2.or(En);is.or(In);Ga.or(os);function as$1({width:F,height:W},q,K,X){const tt=K*q.originalWidth,rt=X*q.originalHeight,ot=K*q.originalWidth+q.width*q.scaleFactor>F?F-K*q.originalWidth:q.width*q.scaleFactor,ut=X*q.originalHeight+q.height*q.scaleFactor>W?W-X*q.originalHeight:q.height*q.scaleFactor;let yn=q.width,uo=q.height;return tt+q.width*q.scaleFactor>F&&(yn=Math.floor((F-tt+q.scaleFactor-1)/q.scaleFactor)),rt+q.height*q.scaleFactor>W&&(uo=Math.floor((W-rt+q.scaleFactor-1)/q.scaleFactor)),{region:{x:tt,y:rt,width:ot,height:ut},size:{width:yn,height:uo}}}function Fa({width:F,height:W},q=768){const K=Math.max(F,W)/q,X=Math.ceil(Math.log(K)/Math.log(2));return{scaleFactors:Array.from({length:X},(tt,rt)=>2**rt),width:q}}function Ua({width:F,height:W},q,K){const X=q.height||q.width,tt=q.width*K,rt=X*K;return{scaleFactor:K,width:q.width,height:X,originalWidth:tt,originalHeight:rt,columns:Math.ceil(F/tt),rows:Math.ceil(W/rt)}}function Wa(F,W){return W.map(q=>q.scaleFactors.map(K=>Ua(F,q,K))).flat()}function Va(F){return!!F.some(W=>W.width&&W.scaleFactors&&W.scaleFactors.length)}function za(F,W,q){if(!W||!Va(W))if(q)W=[Fa(F)];else throw new Error("Image does not support tiles or custom regions and sizes.");return Wa(F,W)}function Za(F,W,q="cover"){if(q==="cover"||q==="contain"){const K=W.width/F.width,X=W.height/F.height,tt=q==="cover"?Math.max(K,X):Math.min(K,X),rt=F.width*tt,ot=F.height*tt;return{width:rt,height:ot}}else throw new Error('Mode must be either "cover" or "contain"')}const $a=.8,Xa=1.5;function hs(F,W,q="cover",{sizes:K,tileZoomLevels:X,supportsAnyRegionAndSize:tt,maxWidth:rt,maxHeight:ot,maxArea:ut}){let{width:yn,height:uo}=Za(F,W,q);if(rt&&yn>rt&&(uo=uo/yn*rt,yn=rt),ot&&uo>ot&&(yn=yn/uo*ot,uo=ot),ut&&yn*uo>ut){const mo=uo/yn,wo=Math.floor(Math.sqrt(ut/mo))*mo;yn=Math.floor(wo)/mo,uo=yn*mo}const po=F.width/F.height;if(yn=Math.floor(yn),uo=Math.round(yn/po),K){let mo;for(const wo of K){const lf=wo.width/yn;if(lf>=$a&&lf<=Xa){mo=wo;break}}if(mo)return{size:mo}}if(tt)return{size:{width:Math.round(yn),height:Math.round(uo)}};if(X){const mo=F.width/yn,wo=X.map(({scaleFactor:_f},$f)=>({index:$f,scaleFactor:_f,diff:Math.abs(_f-mo)})).sort((_f,$f)=>_f.diff-$f.diff),lf=X[wo[0].index],yf=Math.ceil(F.width/(lf.scaleFactor*X[0].width)),cf=Math.ceil(F.height/(lf.scaleFactor*X[0].height)),vf=[];for(let _f=0;_f{var q;return(F==null?void 0:F.supports)&&((q=F==null?void 0:F.supports)==null?void 0:q.includes(W))})}}function Ya(F){if("type"in F&&F.type==="ImageService3")return 3;if("type"in F&&F.type==="ImageService2"||"@type"in F&&F["@type"]==="ImageService2"||"@context"in F&&F["@context"]===Mr)return 2;if("@context"in F&&(F["@context"]===br||F["@context"]===Zi))return 1;if("profile"in F){let W;return Array.isArray(F.profile)?W=F.profile[0]:W=F.profile,W.match(Or)?1:W.match(Nr)?2:3}else throw new Error("Unsupported IIIF Image Service")}function fn(F){if("type"in F){const W=F.profile;let q=!1;return W==="level0"||typeof W=="string"&&W.endsWith("level0.json")?"extraFeatures"in F&&(q=cs$1.every(K=>F.extraFeatures&&F.extraFeatures.includes(K))):q=!0,{maxWidth:"maxWidth"in F?F.maxWidth:void 0,maxHeight:"maxHeight"in F?F.maxHeight:void 0,maxArea:"maxArea"in F?F.maxArea:void 0,supportsAnyRegionAndSize:q}}else if(Array.isArray(F.profile)){let W=!1,q=Number.NEGATIVE_INFINITY,K=Number.NEGATIVE_INFINITY,X=Number.NEGATIVE_INFINITY;return F.profile.forEach(tt=>{if(typeof tt=="string"){const rt=ni(tt);rt&&(W=W||rt>=1)}else{const{maxWidth:rt,maxHeight:ot,maxArea:ut,supportsAnyRegionAndSize:yn}=Ha(tt);rt!==void 0&&(K=Math.max(rt,K)),ot!==void 0&&(q=Math.max(ot,q)),ut!==void 0&&(X=Math.max(ut,X)),W=W||yn}}),{maxWidth:K>=0?K:void 0,maxHeight:q>=0?q:void 0,maxArea:X>=0?X:void 0,supportsAnyRegionAndSize:W}}else if("profile"in F&&F.profile){const W=qa(F.profile),q=ni(F.profile);return W?{supportsAnyRegionAndSize:W>=1}:q?{supportsAnyRegionAndSize:q>=1}:{supportsAnyRegionAndSize:!1}}else throw new Error("Invalid Image")}const Ja="image";class Ka{constructor(W,q){if(this.embedded=!0,this.type=Ja,q){const K=W;let X,tt;if(Array.isArray(K.service)?K.service.forEach(rt=>{try{const ot=Ya(rt);(!tt||ot>tt)&&(tt=ot,X=rt)}catch{}}):X=K.service,!X)throw new Error("Unsupported IIIF Image Service");if("@id"in X)this.uri=X["@id"];else if("id"in X)this.uri=X.id;else throw new Error("Unsupported IIIF Image Service");if("type"in X&&X.type==="ImageService3")this.majorVersion=3;else if("type"in X&&X.type==="ImageService2"||"@type"in X&&X["@type"]==="ImageService2"||"@context"in X&&X["@context"]===Mr)this.majorVersion=2;else if("@context"in X&&(X["@context"]===br||X["@context"]===Zi))this.majorVersion=1;else if("profile"in X){let rt;Array.isArray(X.profile)?rt=X.profile[0]:rt=X.profile,rt.match(Or)?this.majorVersion=1:rt.match(Nr)?this.majorVersion=2:this.majorVersion=3}else throw new Error("Unsupported IIIF Image Service");if("profile"in X){const rt=fn(X);this.supportsAnyRegionAndSize=rt.supportsAnyRegionAndSize,this.maxWidth=rt.maxWidth,this.maxHeight=rt.maxHeight,this.maxArea=rt.maxArea}else this.supportsAnyRegionAndSize=!1}else{if("@id"in W)this.uri=W["@id"];else if("id"in W)this.uri=W.id;else throw new Error("Unsupported IIIF Image");if("type"in W&&W.type==="ImageService3")this.majorVersion=3;else if("@type"in W&&W["@type"]==="iiif:Image"||"@context"in W&&W["@context"]===Mr)this.majorVersion=2;else if("@context"in W&&W["@context"]===br)this.majorVersion=1;else throw new Error("Unsupported IIIF Image");if("profile"in W){const K=fn(W);this.supportsAnyRegionAndSize=K.supportsAnyRegionAndSize,this.maxWidth=K.maxWidth,this.maxHeight=K.maxHeight,this.maxArea=K.maxArea}else this.supportsAnyRegionAndSize=!1}if(W.width!==void 0)this.width=W.width;else if(q)this.width=q.width;else throw new Error("Width not present on either Canvas or Image Resource");if(W.height!==void 0)this.height=W.height;else if(q)this.height=q.height;else throw new Error("Height not present on either Canvas or Image Resource")}getImageUrl(W){const{region:q,size:K}=W;let X,tt,rt,ot,ut;q?(ut=`${q.x},${q.y},${q.width},${q.height}`,rt=q.height,ot=q.width):(ut="full",rt=this.height,ot=this.width);let yn;if(K){X=Math.round(K.width),tt=Math.round(K.height);const mo=String(X);let wo=String(tt);const lf=ot/rt,yf=tt*lf/lf;tt===Math.round(yf)&&(wo=""),yn=`${mo},${wo}`}else X=this.width,tt=this.height,yn=this.majorVersion===2?"full":"max";const uo=X*tt;if(this.maxWidth!==void 0&&X>this.maxWidth)throw new Error(`Width of requested image is too large: ${X} > ${this.maxWidth}`);if(this.maxHeight!==void 0&&tt>this.maxHeight)throw new Error(`Height of requested image is too large: ${tt} > ${this.maxHeight}`);if(this.maxArea!==void 0&&uo>this.maxArea)throw new Error(`Area of requested image is too large: ${uo} > ${this.maxArea}`);const po=this.majorVersion===1?"native":"default";return`${this.uri}/${ut}/${yn}/0/${po}.jpg`}getThumbnail(W,q="cover"){return hs({width:this.width,height:this.height},W,q,{supportsAnyRegionAndSize:this.supportsAnyRegionAndSize,maxWidth:this.maxWidth,maxHeight:this.maxHeight,maxArea:this.maxArea})}}let Qa=class xP extends Ka{constructor(W){super(W),this.embedded=!1;const q=fn(W);let K;"tiles"in W&&(K=W.tiles),this.tileZoomLevels=za({width:this.width,height:this.height},K,q.supportsAnyRegionAndSize),"sizes"in W&&(this.sizes=W.sizes)}static parse(W,q=null){let K;return q===1?K=Xi.parse(W):q===2?K=En.parse(W):q===3?K=In.parse(W):K=os.parse(W),new xP(K)}getIiifTile(W,q,K){return as$1({width:this.width,height:this.height},W,q,K)}getThumbnail(W,q="cover"){return hs({width:this.width,height:this.height},W,q,{supportsAnyRegionAndSize:this.supportsAnyRegionAndSize,sizes:this.sizes,tileZoomLevels:this.tileZoomLevels,maxWidth:this.maxWidth,maxHeight:this.maxHeight,maxArea:this.maxArea})}};const ii=m.record(m.string(),m.string().array());m.object({label:ii.optional(),value:ii.optional()});var gt=63710088e-1,us={centimeters:gt*100,centimetres:gt*100,degrees:gt/111325,feet:gt*3.28084,inches:gt*39.37,kilometers:gt/1e3,kilometres:gt/1e3,meters:gt,metres:gt,miles:gt/1609.344,millimeters:gt*1e3,millimetres:gt*1e3,nauticalmiles:gt/1852,radians:1,yards:gt*1.0936};function th(F,W,q){q===void 0&&(q={});var K={type:"Feature"};return(q.id===0||q.id)&&(K.id=q.id),q.bbox&&(K.bbox=q.bbox),K.properties=W||{},K.geometry=F,K}function eh(F,W,q){if(q===void 0&&(q={}),!F)throw new Error("coordinates is required");if(!Array.isArray(F))throw new Error("coordinates must be an Array");if(F.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!si(F[0])||!si(F[1]))throw new Error("coordinates must contain numbers");var K={type:"Point",coordinates:F};return th(K,W,q)}function rh(F,W){W===void 0&&(W="kilometers");var q=us[W];if(!q)throw new Error(W+" units is invalid");return F*q}function nh(F,W){W===void 0&&(W="kilometers");var q=us[W];if(!q)throw new Error(W+" units is invalid");return F/q}function pn(F){var W=F%(2*Math.PI);return W*180/Math.PI}function Mt(F){var W=F%360;return W*Math.PI/180}function si(F){return!isNaN(F)&&F!==null&&!Array.isArray(F)}function ce(F){if(!F)throw new Error("coord is required");if(!Array.isArray(F)){if(F.type==="Feature"&&F.geometry!==null&&F.geometry.type==="Point")return F.geometry.coordinates;if(F.type==="Point")return F.coordinates}if(Array.isArray(F)&&F.length>=2&&!Array.isArray(F[0])&&!Array.isArray(F[1]))return F;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function ih(F){return F.type==="Feature"?F.geometry:F}function ds(F,W,q){if(q===void 0&&(q={}),q.final===!0)return sh(F,W);var K=ce(F),X=ce(W),tt=Mt(K[0]),rt=Mt(X[0]),ot=Mt(K[1]),ut=Mt(X[1]),yn=Math.sin(rt-tt)*Math.cos(ut),uo=Math.cos(ot)*Math.sin(ut)-Math.sin(ot)*Math.cos(ut)*Math.cos(rt-tt);return pn(Math.atan2(yn,uo))}function sh(F,W){var q=ds(W,F);return q=(q+180)%360,q}function oh(F,W,q,K){K===void 0&&(K={});var X=ce(F),tt=Mt(X[0]),rt=Mt(X[1]),ot=Mt(q),ut=nh(W,K.units),yn=Math.asin(Math.sin(rt)*Math.cos(ut)+Math.cos(rt)*Math.sin(ut)*Math.cos(ot)),uo=tt+Math.atan2(Math.sin(ot)*Math.sin(ut)*Math.cos(rt),Math.cos(ut)-Math.sin(rt)*Math.sin(yn)),po=pn(uo),mo=pn(yn);return eh([po,mo],K.properties)}function Sn(F,W,q){q===void 0&&(q={});var K=ce(F),X=ce(W),tt=Mt(X[1]-K[1]),rt=Mt(X[0]-K[0]),ot=Mt(K[1]),ut=Mt(X[1]),yn=Math.pow(Math.sin(tt/2),2)+Math.pow(Math.sin(rt/2),2)*Math.cos(ot)*Math.cos(ut);return rh(2*Math.atan2(Math.sqrt(yn),Math.sqrt(1-yn)),q.units)}function _r(F,W){var q=Sn(F,W),K=ds(F,W),X=oh(F,q/2,K);return X}async function fs(F,W={}){let q;if(W.cache&&(q=await W.cache.match(F)),q||(q=await fetch(F,{signal:W.abortSignal}),W.cache&&W.cache.put(F,q.clone())),!q.ok)throw new Error(q.statusText);return q}async function ah(F,W={}){return await(await fs(F,W)).json()}async function hh(F,W={}){return await ah(`${F}/info.json`,W)}function ch(F,W){return new Promise((q,K)=>{const X=new Image;let tt=!1;X.addEventListener("load",()=>q(X)),X.addEventListener("error",async()=>{if(tt)K(new DOMException("Loading image aborted by user","AbortError"));else try{throw await fs(F,{abortSignal:W}),new Error("Image failed to load by setting Image src but downloaded successfully using fetch")}catch(rt){K(rt)}}),X.crossOrigin="anonymous",X.src=F,W&&W.addEventListener("abort",()=>{tt=!0,X.src=""})})}function ps(F,W=!1){switch(F.type){case"Polygon":return F.coordinates?{...F,coordinates:oi(F.coordinates,W)}:F;case"MultiPolygon":return F.coordinates?{...F,coordinates:F.coordinates.map(q=>oi(q,W))}:F;case"GeometryCollection":return{...F,geometries:F.geometries.map(q=>ps(q,W))};default:return F}}function oi(F,W){if(F.length===0)return F;const q=[];for(let K=0;K=Math.abs(ot)?q-ut+ot:ot-ut+q,q=ut}return q+K>=0!=!!W?F.slice().reverse():F}function mt(F){return Array.isArray(F)&&F.length===2&&typeof F[0]=="number"&&typeof F[1]=="number"}function At(F){return Array.isArray(F)&&F.every(mt)}function uh(F){return Array.isArray(F)&&F.every(mt)}function Rt(F){return Array.isArray(F)&&F.every(uh)}function gs(F){if(F=F.filter(function(W,q,K){return q===0||!Rn(W,K[q-1])}),F.length<2)throw new Error("LineString should contain at least 2 points");return F}function An(F){if(F=F.filter(function(W,q,K){return q===0||!Rn(W,K[q-1])}),fh(F)&&F.splice(-1),F.length<3)throw new Error("Ring should contain at least 3 points");return F}function dh(F){return F.map(W=>An(W))}function ze(F){return{type:"Point",coordinates:F}}function Ze(F){return{type:"LineString",coordinates:F}}function $e(F,W=!0){const q={type:"Polygon",coordinates:W?F.map(K=>[...K,K[0]]):F};return ps(q)}function fh(F){return Array.isArray(F)&&F.length>=2&&Rn(F[0],F[F.length-1])}function Rn(F,W){return F===W?!0:F==null||W==null?!1:F[0]==W[0]&&F[1]==W[1]}function Er(F,W){return[(W[0]-F[0])/2+F[0],(W[1]-F[1])/2+F[1]]}function ph(F,W,q){return[F[0]*q+W[0]*(1-q),F[1]*q+W[1]*(1-q)]}function jt(F,W){if(At(F)&&F.length==2)return jt(F[0],F[1]);if(mt(F)&&mt(W))return Math.sqrt((W[0]-F[0])**2+(W[1]-F[1])**2);throw new Error("Input type not supported")}function gh(F){return F*(Math.PI/180)}function Ot(F){return typeof F=="object"&&F!==null&&F.type==="Point"&&mt(F.coordinates)}function Nt(F){return typeof F=="object"&&F!==null&&F.type==="LineString"&&At(F.coordinates)}function Lt(F){return typeof F=="object"&&F!==null&&F.type==="Polygon"&&Array.isArray(F.coordinates)&&Rt(F.coordinates)}function mh(F){const W=typeof F=="object"&&F!==null,q=W&&"type"in F&&typeof F.type=="string"&&(F.type==="Point"||F.type==="LineString"||F.type==="Polygon"),K=W&&"coordinates"in F&&Array.isArray(F.coordinates);return q&&K}function ye(F){return F.coordinates}function ve(F){return F.coordinates}function we(F,W=!1){let q=F.coordinates;return q=dh(q),W?q.map(K=>[...K,K[0]]):q}function yh(F){if(Ot(F))return ye(F);if(Nt(F))return ve(F);if(Lt(F))return we(F);throw new Error("Geometry type not supported")}function ai(F){let W=Number.POSITIVE_INFINITY,q=Number.NEGATIVE_INFINITY;for(const K of F)W===void 0?K>=K&&(W=q=K):(W>K&&(W=K),q=W[0]&&W[2]>=F[0],K=F[3]>=W[1]&&W[3]>=F[1];return q&&K}function De(F){return[[F[0],F[1]],[F[2],F[1]],[F[2],F[3]],[F[0],F[3]]]}function wh(F){return[De(F)]}function ms$1(F){return[[F[0],F[1]],[F[2],F[3]]]}function xh(F){return jt(ms$1(F))}function bh(F){return jt(ms$1(st(F)))}function gn(F){return[(F[0]+F[2])/2,(F[1]+F[3])/2]}function Ir(F){return[F[2]-F[0],F[3]-F[1]]}function ys(F,W){const q=F[0]/W[0],K=F[1]/W[1];return Math.min(q,K)}function $r(F,W){return ys(Ir(F),Ir(W))}function Th(F){const W=parseInt(F.replace(/^#/,""),16),q=W>>16&255,K=W>>8&255,X=W&255;return[q,K,X]}function ci(F){return Th(F).map(W=>W/255)}function Mh(F,W){return!F||!W||F.size!==W.size?!1:[...F].every(q=>W.has(q))}function li(F,W){if(F!==void 0&&W!==void 0)return Math.max(F,W);if(F!==void 0)return F;if(W!==void 0)return W}function _h(F){let W;try{W=new URL(F)}catch{return!1}return W.protocol==="http:"||W.protocol==="https:"}function Eh([F,W]){const q=6378137*gh(F),K=q/F,X=180/Math.PI*Math.log(Math.tan(Math.PI/4+W*(Math.PI/180)/2))*K;return[q,X]}function ui([F,W]){const q=Math.PI*6378137,K=F/q*180;let X=W/q*180;return X=180/Math.PI*(2*Math.atan(Math.exp(X*Math.PI/180))-Math.PI/2),[K,X]}var Ih=Object.defineProperty,Sh=(F,W,q)=>W in F?Ih(F,W,{enumerable:!0,configurable:!0,writable:!0,value:q}):F[W]=q,Ah=(F,W,q)=>(Sh(F,typeof W!="symbol"?W+"":W,q),q),Cn=(F,W,q)=>{if(!W.has(F))throw TypeError("Cannot "+q)},St=(F,W,q)=>(Cn(F,W,"read from private field"),q?q.call(F):W.get(F)),Te=(F,W,q)=>{if(W.has(F))throw TypeError("Cannot add the same private member more than once");W instanceof WeakSet?W.add(F):W.set(F,q)},Xr=(F,W,q,K)=>(Cn(F,W,"write to private field"),K?K.call(F,q):W.set(F,q),q),le=(F,W,q)=>(Cn(F,W,"access private method"),q);function vs(F){if(F.__esModule)return F;var W=F.default;if(typeof W=="function"){var q=function K(){return this instanceof K?Reflect.construct(W,arguments,this.constructor):W.apply(this,arguments)};q.prototype=W.prototype}else q={};return Object.defineProperty(q,"__esModule",{value:!0}),Object.keys(F).forEach(function(K){var X=Object.getOwnPropertyDescriptor(F,K);Object.defineProperty(q,K,X.get?X:{enumerable:!0,get:function(){return F[K]}})}),q}var $$S={};const Rh=Object.prototype.toString;function Be(F){const W=Rh.call(F);return W.endsWith("Array]")&&!W.includes("Big")}const Ch=Object.freeze(Object.defineProperty({__proto__:null,isAnyArray:Be},Symbol.toStringTag,{value:"Module"})),Ph=vs(Ch);function kh(F){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Be(F))throw new TypeError("input must be an array");if(F.length===0)throw new TypeError("input must not be empty");var q=W.fromIndex,K=q===void 0?0:q,X=W.toIndex,tt=X===void 0?F.length:X;if(K<0||K>=F.length||!Number.isInteger(K))throw new Error("fromIndex must be a positive integer smaller than length");if(tt<=K||tt>F.length||!Number.isInteger(tt))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var rt=F[K],ot=K+1;otrt&&(rt=F[ot]);return rt}function Oh(F){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Be(F))throw new TypeError("input must be an array");if(F.length===0)throw new TypeError("input must not be empty");var q=W.fromIndex,K=q===void 0?0:q,X=W.toIndex,tt=X===void 0?F.length:X;if(K<0||K>=F.length||!Number.isInteger(K))throw new Error("fromIndex must be a positive integer smaller than length");if(tt<=K||tt>F.length||!Number.isInteger(tt))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var rt=F[K],ot=K+1;ot1&&arguments[1]!==void 0?arguments[1]:{};if(Be(F)){if(F.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var q;if(W.output!==void 0){if(!Be(W.output))throw new TypeError("output option must be an array if specified");q=W.output}else q=new Array(F.length);var K=Oh(F),X=kh(F);if(K===X)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var tt=W.min,rt=tt===void 0?W.autoMinMax?K:0:tt,ot=W.max,ut=ot===void 0?W.autoMinMax?X:1:ot;if(rt>=ut)throw new RangeError("min option must be smaller than max option");for(var yn=(ut-rt)/(X-K),uo=0;uo=0;fo--){var vo=this._edgeList.get(fo),ls=vo.getSym();lo===null&&(lo=ls),wt!==null&&ls.setNext(wt),wt=vo}lo.setNext(wt)},at.prototype.computeDepths=function(){var wt=this;if(arguments.length===1){var lo=arguments[0],fo=this.findIndex(lo),vo=lo.getDepth($g.LEFT),ls=lo.getDepth($g.RIGHT),ff=this.computeDepths(fo+1,this._edgeList.size(),vo),mf=this.computeDepths(0,fo,ff);if(mf!==ls)throw new Lb("depth mismatch at "+lo.getCoordinate())}else if(arguments.length===3){for(var bf=arguments[0],Sf=arguments[1],wf=arguments[2],If=wf,jf=bf;jf=0;ff--){var mf=lo._resultAreaEdgeList.get(ff),bf=mf.getSym();switch(fo===null&&mf.getEdgeRing()===wt&&(fo=mf),ls){case lo._SCANNING_FOR_INCOMING:if(bf.getEdgeRing()!==wt)continue;vo=bf,ls=lo._LINKING_TO_OUTGOING;break;case lo._LINKING_TO_OUTGOING:if(mf.getEdgeRing()!==wt)continue;vo.setNextMin(mf),ls=lo._SCANNING_FOR_INCOMING}}ls===this._LINKING_TO_OUTGOING&&(ym.isTrue(fo!==null,"found null for first outgoing dirEdge"),ym.isTrue(fo.getEdgeRing()===wt,"unable to link last incoming dirEdge"),vo.setNextMin(fo))},at.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var wt=0,lo=this.iterator();lo.hasNext();){var fo=lo.next();fo.isInResult()&&wt++}return wt}if(arguments.length===1){for(var vo=arguments[0],ls=0,ff=this.iterator();ff.hasNext();){var mf=ff.next();mf.getEdgeRing()===vo&&ls++}return ls}},at.prototype.getLabel=function(){return this._label},at.prototype.findCoveredLineEdges=function(){for(var wt=eg.NONE,lo=this.iterator();lo.hasNext();){var fo=lo.next(),vo=fo.getSym();if(!fo.isLineEdge()){if(fo.isInResult()){wt=eg.INTERIOR;break}if(vo.isInResult()){wt=eg.EXTERIOR;break}}}if(wt===eg.NONE)return null;for(var ls=wt,ff=this.iterator();ff.hasNext();){var mf=ff.next(),bf=mf.getSym();mf.isLineEdge()?mf.getEdge().setCovered(ls===eg.INTERIOR):(mf.isInResult()&&(ls=eg.EXTERIOR),bf.isInResult()&&(ls=eg.INTERIOR))}},at.prototype.computeLabelling=function(wt){nt.prototype.computeLabelling.call(this,wt),this._label=new fv(eg.NONE);for(var lo=this.iterator();lo.hasNext();)for(var fo=lo.next().getEdge().getLabel(),vo=0;vo<2;vo++){var ls=fo.getLocation(vo);ls!==eg.INTERIOR&&ls!==eg.BOUNDARY||this._label.setLocation(vo,eg.INTERIOR)}},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(xy),Qk=function(nt){function at(){nt.apply(this,arguments)}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.createNode=function(wt){return new $E(wt,new kO)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(Jw),x$=function nt(){this._pts=null,this._orientation=null;var at=arguments[0];this._pts=at,this._orientation=nt.orientation(at)};x$.prototype.compareTo=function(nt){var at=nt;return x$.compareOriented(this._pts,this._orientation,at._pts,at._orientation)},x$.prototype.interfaces_=function(){return[G0]},x$.prototype.getClass=function(){return x$},x$.orientation=function(nt){return Cm.increasingDirection(nt)===1},x$.compareOriented=function(nt,at,wt,lo){for(var fo=at?1:-1,vo=lo?1:-1,ls=at?nt.length:-1,ff=lo?wt.length:-1,mf=at?0:nt.length-1,bf=lo?0:wt.length-1;;){var Sf=nt[mf].compareTo(wt[bf]);if(Sf!==0)return Sf;var wf=(mf+=fo)===ls,If=(bf+=vo)===ff;if(wf&&!If)return-1;if(!wf&&If)return 1;if(wf&&If)return 0}};var T0=function(){this._edges=new Sg,this._ocaMap=new Hy};T0.prototype.print=function(nt){nt.print("MULTILINESTRING ( ");for(var at=0;at0&&nt.print(","),nt.print("(");for(var lo=wt.getCoordinates(),fo=0;fo0&&nt.print(","),nt.print(lo[fo].x+" "+lo[fo].y);nt.println(")")}nt.print(") ")},T0.prototype.addAll=function(nt){for(var at=nt.iterator();at.hasNext();)this.add(at.next())},T0.prototype.findEdgeIndex=function(nt){for(var at=0;at0||!at.coord.equals2D(lo);fo||wt--;var vo=new Array(wt).fill(null),ls=0;vo[ls++]=new Gp(nt.coord);for(var ff=nt.segmentIndex+1;ff<=at.segmentIndex;ff++)vo[ls++]=this.edge.pts[ff];return fo&&(vo[ls]=at.coord),new rx(vo,new fv(this.edge._label))},ov.prototype.add=function(nt,at,wt){var lo=new z1(nt,at,wt),fo=this._nodeMap.get(lo);return fo!==null?fo:(this._nodeMap.put(lo,lo),lo)},ov.prototype.isIntersection=function(nt){for(var at=this.iterator();at.hasNext();)if(at.next().coord.equals(nt))return!0;return!1},ov.prototype.interfaces_=function(){return[]},ov.prototype.getClass=function(){return ov};var E$=function(){};E$.prototype.getChainStartIndices=function(nt){var at=0,wt=new Sg;wt.add(new R1(at));do{var lo=this.findChainEnd(nt,at);wt.add(new R1(lo)),at=lo}while(atwt?at:wt},sy.prototype.getMinX=function(nt){var at=this.pts[this.startIndex[nt]].x,wt=this.pts[this.startIndex[nt+1]].x;return atwt&&(fo=1),nt._depth[at][lo]=fo}}},Xv.prototype.getDelta=function(nt){return this._depth[nt][$g.RIGHT]-this._depth[nt][$g.LEFT]},Xv.prototype.getLocation=function(nt,at){return this._depth[nt][at]<=0?eg.EXTERIOR:eg.INTERIOR},Xv.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},Xv.prototype.add=function(){var nt=this;if(arguments.length===1)for(var at=arguments[0],wt=0;wt<2;wt++)for(var lo=1;lo<3;lo++){var fo=at.getLocation(wt,lo);fo!==eg.EXTERIOR&&fo!==eg.INTERIOR||(nt.isNull(wt,lo)?nt._depth[wt][lo]=Xv.depthAtLocation(fo):nt._depth[wt][lo]+=Xv.depthAtLocation(fo))}else if(arguments.length===3){var vo=arguments[0],ls=arguments[1],ff=arguments[2];ff===eg.INTERIOR&&this._depth[vo][ls]++}},Xv.prototype.interfaces_=function(){return[]},Xv.prototype.getClass=function(){return Xv},Xv.depthAtLocation=function(nt){return nt===eg.EXTERIOR?0:nt===eg.INTERIOR?1:Xv.NULL_VALUE},gb.NULL_VALUE.get=function(){return-1},Object.defineProperties(Xv,gb);var rx=function(nt){function at(){if(nt.call(this),this.pts=null,this._env=null,this.eiList=new ov(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Xv,this._depthDelta=0,arguments.length===1){var wt=arguments[0];at.call(this,wt,null)}else if(arguments.length===2){var lo=arguments[0],fo=arguments[1];this.pts=lo,this._label=fo}}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.getDepth=function(){return this._depth},at.prototype.getCollapsedEdge=function(){var wt=new Array(2).fill(null);return wt[0]=this.pts[0],wt[1]=this.pts[1],new at(wt,fv.toLineLabel(this._label))},at.prototype.isIsolated=function(){return this._isIsolated},at.prototype.getCoordinates=function(){return this.pts},at.prototype.setIsolated=function(wt){this._isIsolated=wt},at.prototype.setName=function(wt){this._name=wt},at.prototype.equals=function(wt){if(!(wt instanceof at))return!1;var lo=wt;if(this.pts.length!==lo.pts.length)return!1;for(var fo=!0,vo=!0,ls=this.pts.length,ff=0;ff0?this.pts[0]:null;if(arguments.length===1){var wt=arguments[0];return this.pts[wt]}},at.prototype.print=function(wt){wt.print("edge "+this._name+": "),wt.print("LINESTRING (");for(var lo=0;lo0&&wt.print(","),wt.print(this.pts[lo].x+" "+this.pts[lo].y);wt.print(") "+this._label+" "+this._depthDelta)},at.prototype.computeIM=function(wt){at.updateIM(this._label,wt)},at.prototype.isCollapsed=function(){return!!this._label.isArea()&&this.pts.length===3&&!!this.pts[0].equals(this.pts[2])},at.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},at.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},at.prototype.getDepthDelta=function(){return this._depthDelta},at.prototype.getNumPoints=function(){return this.pts.length},at.prototype.printReverse=function(wt){wt.print("edge "+this._name+": ");for(var lo=this.pts.length-1;lo>=0;lo--)wt.print(this.pts[lo]+" ");wt.println("")},at.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new sy(this)),this._mce},at.prototype.getEnvelope=function(){if(this._env===null){this._env=new Wg;for(var wt=0;wt0&&wt.append(","),wt.append(this.pts[lo].x+" "+this.pts[lo].y);return wt.append(") "+this._label+" "+this._depthDelta),wt.toString()},at.prototype.isPointwiseEqual=function(wt){if(this.pts.length!==wt.pts.length)return!1;for(var lo=0;lolo||this._maxyvo;if(ls)return!1;var ff=this.intersectsToleranceSquare(nt,at);return ym.isTrue(!(ls&&ff),"Found bad envelope test"),ff},Jy.prototype.initCorners=function(nt){var at=.5;this._minx=nt.x-at,this._maxx=nt.x+at,this._miny=nt.y-at,this._maxy=nt.y+at,this._corner[0]=new Gp(this._maxx,this._maxy),this._corner[1]=new Gp(this._minx,this._maxy),this._corner[2]=new Gp(this._minx,this._miny),this._corner[3]=new Gp(this._maxx,this._miny)},Jy.prototype.intersects=function(nt,at){return this._scaleFactor===1?this.intersectsScaled(nt,at):(this.copyScaled(nt,this._p0Scaled),this.copyScaled(at,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},Jy.prototype.scale=function(nt){return Math.round(nt*this._scaleFactor)},Jy.prototype.getCoordinate=function(){return this._originalPt},Jy.prototype.copyScaled=function(nt,at){at.x=this.scale(nt.x),at.y=this.scale(nt.y)},Jy.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var nt=Jy.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Wg(this._originalPt.x-nt,this._originalPt.x+nt,this._originalPt.y-nt,this._originalPt.y+nt)}return this._safeEnv},Jy.prototype.intersectsPixelClosure=function(nt,at){return this._li.computeIntersection(nt,at,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(nt,at,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(nt,at,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(nt,at,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},Jy.prototype.intersectsToleranceSquare=function(nt,at){var wt=!1,lo=!1;return this._li.computeIntersection(nt,at,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(nt,at,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(wt=!0),this._li.computeIntersection(nt,at,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(lo=!0),this._li.computeIntersection(nt,at,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!wt||!lo)||!!nt.equals(this._pt)||!!at.equals(this._pt))))},Jy.prototype.addSnappedNode=function(nt,at){var wt=nt.getCoordinate(at),lo=nt.getCoordinate(at+1);return!!this.intersects(wt,lo)&&(nt.addIntersection(this.getCoordinate(),at),!0)},Jy.prototype.interfaces_=function(){return[]},Jy.prototype.getClass=function(){return Jy},M0.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(Jy,M0);var Zv=function(){this.tempEnv1=new Wg,this.selectedSegment=new Vg};Zv.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var nt=arguments[0],at=arguments[1];nt.getLineSegment(at,this.selectedSegment),this.select(this.selectedSegment)}}},Zv.prototype.interfaces_=function(){return[]},Zv.prototype.getClass=function(){return Zv};var mb=function(){this._index=null;var nt=arguments[0];this._index=nt},p2={HotPixelSnapAction:{configurable:!0}};mb.prototype.snap=function(){if(arguments.length===1){var nt=arguments[0];return this.snap(nt,null,-1)}if(arguments.length===3){var at=arguments[0],wt=arguments[1],lo=arguments[2],fo=at.getSafeEnvelope(),vo=new nx(at,wt,lo);return this._index.query(fo,{interfaces_:function(){return[_$]},visitItem:function(ls){ls.select(fo,vo)}}),vo.isNodeAdded()}},mb.prototype.interfaces_=function(){return[]},mb.prototype.getClass=function(){return mb},p2.HotPixelSnapAction.get=function(){return nx},Object.defineProperties(mb,p2);var nx=function(nt){function at(){nt.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var wt=arguments[0],lo=arguments[1],fo=arguments[2];this._hotPixel=wt,this._parentEdge=lo,this._hotPixelVertexIndex=fo}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.isNodeAdded=function(){return this._isNodeAdded},at.prototype.select=function(){if(arguments.length!==2)return nt.prototype.select.apply(this,arguments);var wt=arguments[0],lo=arguments[1],fo=wt.getContext();if(this._parentEdge!==null&&fo===this._parentEdge&&lo===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(fo,lo)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(Zv),X_=function(){this._li=null,this._interiorIntersections=null;var nt=arguments[0];this._li=nt,this._interiorIntersections=new Sg};X_.prototype.processIntersections=function(nt,at,wt,lo){if(nt===wt&&at===lo)return null;var fo=nt.getCoordinates()[at],vo=nt.getCoordinates()[at+1],ls=wt.getCoordinates()[lo],ff=wt.getCoordinates()[lo+1];if(this._li.computeIntersection(fo,vo,ls,ff),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var mf=0;mf=0;at--){try{nt.bufferReducedPrecision(at)}catch(vo){if(!(vo instanceof Lb))throw vo;nt._saveException=vo}if(nt._resultGeometry!==null)return null}throw this._saveException}if(arguments.length===1){var wt=arguments[0],lo=bv.precisionScaleFactor(this._argGeom,this._distance,wt),fo=new cv(lo);this.bufferFixedPrecision(fo)}},bv.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var nt=this._argGeom.getFactory().getPrecisionModel();nt.getType()===cv.FIXED?this.bufferFixedPrecision(nt):this.bufferReducedPrecision()},bv.prototype.setQuadrantSegments=function(nt){this._bufParams.setQuadrantSegments(nt)},bv.prototype.bufferOriginalPrecision=function(){try{var nt=new Ey(this._bufParams);this._resultGeometry=nt.buffer(this._argGeom,this._distance)}catch(at){if(!(at instanceof Nb))throw at;this._saveException=at}},bv.prototype.getResultGeometry=function(nt){return this._distance=nt,this.computeGeometry(),this._resultGeometry},bv.prototype.setEndCapStyle=function(nt){this._bufParams.setEndCapStyle(nt)},bv.prototype.interfaces_=function(){return[]},bv.prototype.getClass=function(){return bv},bv.bufferOp=function(){if(arguments.length===2){var nt=arguments[0],at=arguments[1],wt=new bv(nt),lo=wt.getResultGeometry(at);return lo}if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof tm&&typeof arguments[1]=="number"){var fo=arguments[0],vo=arguments[1],ls=arguments[2],ff=new bv(fo);ff.setQuadrantSegments(ls);var mf=ff.getResultGeometry(vo);return mf}if(arguments[2]instanceof uv&&arguments[0]instanceof tm&&typeof arguments[1]=="number"){var bf=arguments[0],Sf=arguments[1],wf=arguments[2],If=new bv(bf,wf),jf=If.getResultGeometry(Sf);return jf}}else if(arguments.length===4){var zf=arguments[0],Wf=arguments[1],Mf=arguments[2],np=arguments[3],pp=new bv(zf);pp.setQuadrantSegments(Mf),pp.setEndCapStyle(np);var Uf=pp.getResultGeometry(Wf);return Uf}},bv.precisionScaleFactor=function(nt,at,wt){var lo=nt.getEnvelopeInternal(),fo=A0.max(Math.abs(lo.getMaxX()),Math.abs(lo.getMaxY()),Math.abs(lo.getMinX()),Math.abs(lo.getMinY()))+2*(at>0?at:0),vo=wt-Math.trunc(Math.log(fo)/Math.log(10)+1);return Math.pow(10,vo)},D0.CAP_ROUND.get=function(){return uv.CAP_ROUND},D0.CAP_BUTT.get=function(){return uv.CAP_FLAT},D0.CAP_FLAT.get=function(){return uv.CAP_FLAT},D0.CAP_SQUARE.get=function(){return uv.CAP_SQUARE},D0.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(bv,D0);var Sy=function(){this._pt=[new Gp,new Gp],this._distance=dm.NaN,this._isNull=!0};Sy.prototype.getCoordinates=function(){return this._pt},Sy.prototype.getCoordinate=function(nt){return this._pt[nt]},Sy.prototype.setMinimum=function(){if(arguments.length===1){var nt=arguments[0];this.setMinimum(nt._pt[0],nt._pt[1])}else if(arguments.length===2){var at=arguments[0],wt=arguments[1];if(this._isNull)return this.initialize(at,wt),null;var lo=at.distance(wt);lothis._distance&&this.initialize(at,wt,lo)}},Sy.prototype.interfaces_=function(){return[]},Sy.prototype.getClass=function(){return Sy};var L0=function(){};L0.prototype.interfaces_=function(){return[]},L0.prototype.getClass=function(){return L0},L0.computeDistance=function(){if(arguments[2]instanceof Sy&&arguments[0]instanceof Av&&arguments[1]instanceof Gp)for(var nt=arguments[0],at=arguments[1],wt=arguments[2],lo=nt.getCoordinates(),fo=new Vg,vo=0;vo0||this._isIn?eg.INTERIOR:eg.EXTERIOR)},F0.prototype.interfaces_=function(){return[]},F0.prototype.getClass=function(){return F0};var Qy=function nt(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var at=arguments[0],wt=arguments[1];nt.call(this,at,nt.INSIDE_AREA,wt)}else if(arguments.length===3){var lo=arguments[0],fo=arguments[1],vo=arguments[2];this._component=lo,this._segIndex=fo,this._pt=vo}},eC={INSIDE_AREA:{configurable:!0}};Qy.prototype.isInsideArea=function(){return this._segIndex===Qy.INSIDE_AREA},Qy.prototype.getCoordinate=function(){return this._pt},Qy.prototype.getGeometryComponent=function(){return this._component},Qy.prototype.getSegmentIndex=function(){return this._segIndex},Qy.prototype.interfaces_=function(){return[]},Qy.prototype.getClass=function(){return Qy},eC.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Qy,eC);var T$=function(nt){this._pts=nt||null};T$.prototype.filter=function(nt){nt instanceof x0&&this._pts.add(nt)},T$.prototype.interfaces_=function(){return[D1]},T$.prototype.getClass=function(){return T$},T$.getPoints=function(){if(arguments.length===1){var nt=arguments[0];return nt instanceof x0?v1.singletonList(nt):T$.getPoints(nt,new Sg)}if(arguments.length===2){var at=arguments[0],wt=arguments[1];return at instanceof x0?wt.add(at):at instanceof Zy&&at.apply(new T$(wt)),wt}};var Bb=function(){this._locations=null;var nt=arguments[0];this._locations=nt};Bb.prototype.filter=function(nt){(nt instanceof x0||nt instanceof Av||nt instanceof oy)&&this._locations.add(new Qy(nt,0,nt.getCoordinate()))},Bb.prototype.interfaces_=function(){return[D1]},Bb.prototype.getClass=function(){return Bb},Bb.getLocations=function(nt){var at=new Sg;return nt.apply(new Bb(at)),at};var Ty=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new F0,this._minDistanceLocation=null,this._minDistance=dm.MAX_VALUE,arguments.length===2){var nt=arguments[0],at=arguments[1];this._geom=[nt,at],this._terminateDistance=0}else if(arguments.length===3){var wt=arguments[0],lo=arguments[1],fo=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=wt,this._geom[1]=lo,this._terminateDistance=fo}};Ty.prototype.computeContainmentDistance=function(){var nt=this;if(arguments.length===0){var at=new Array(2).fill(null);if(this.computeContainmentDistance(0,at),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,at)}else if(arguments.length===2){var wt=arguments[0],lo=arguments[1],fo=1-wt,vo=Fb.getPolygons(this._geom[wt]);if(vo.size()>0){var ls=Bb.getLocations(this._geom[fo]);if(this.computeContainmentDistance(ls,vo,lo),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[fo]=lo[0],this._minDistanceLocation[wt]=lo[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&nm(arguments[0],u1)&&nm(arguments[1],u1)){for(var ff=arguments[0],mf=arguments[1],bf=arguments[2],Sf=0;Sfthis._minDistance)return null;for(var fo=at.getCoordinates(),vo=wt.getCoordinate(),ls=0;lsthis._minDistance)return null;for(var jf=Sf.getCoordinates(),zf=wf.getCoordinates(),Wf=0;Wfthis._distance&&this.initialize(at,wt,lo)}},Gy.prototype.interfaces_=function(){return[]},Gy.prototype.getClass=function(){return Gy};var $1=function(){};$1.prototype.interfaces_=function(){return[]},$1.prototype.getClass=function(){return $1},$1.computeDistance=function(){if(arguments[2]instanceof Gy&&arguments[0]instanceof Av&&arguments[1]instanceof Gp)for(var nt=arguments[0],at=arguments[1],wt=arguments[2],lo=new Vg,fo=nt.getCoordinates(),vo=0;vo1||nt<=0)throw new Pv("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=nt},B0.prototype.compute=function(nt,at){this.computeOrientedDistance(nt,at,this._ptDist),this.computeOrientedDistance(at,nt,this._ptDist)},B0.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},B0.prototype.computeOrientedDistance=function(nt,at,wt){var lo=new J_(at);if(nt.apply(lo),wt.setMaximum(lo.getMaxPointDistance()),this._densifyFrac>0){var fo=new k$(at,this._densifyFrac);nt.apply(fo),wt.setMaximum(fo.getMaxPointDistance())}},B0.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},B0.prototype.interfaces_=function(){return[]},B0.prototype.getClass=function(){return B0},B0.distance=function(){if(arguments.length===2){var nt=arguments[0],at=arguments[1],wt=new B0(nt,at);return wt.distance()}if(arguments.length===3){var lo=arguments[0],fo=arguments[1],vo=arguments[2],ls=new B0(lo,fo);return ls.setDensifyFraction(vo),ls.distance()}},Z_.MaxPointDistanceFilter.get=function(){return J_},Z_.MaxDensifiedByFractionDistanceFilter.get=function(){return k$},Object.defineProperties(B0,Z_);var J_=function(){this._maxPtDist=new Gy,this._minPtDist=new Gy,this._euclideanDist=new $1,this._geom=null;var nt=arguments[0];this._geom=nt};J_.prototype.filter=function(nt){this._minPtDist.initialize(),$1.computeDistance(this._geom,nt,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},J_.prototype.getMaxPointDistance=function(){return this._maxPtDist},J_.prototype.interfaces_=function(){return[lb]},J_.prototype.getClass=function(){return J_};var k$=function(){this._maxPtDist=new Gy,this._minPtDist=new Gy,this._geom=null,this._numSubSegs=0;var nt=arguments[0],at=arguments[1];this._geom=nt,this._numSubSegs=Math.trunc(Math.round(1/at))};k$.prototype.filter=function(nt,at){var wt=this;if(at===0)return null;for(var lo=nt.getCoordinate(at-1),fo=nt.getCoordinate(at),vo=(fo.x-lo.x)/this._numSubSegs,ls=(fo.y-lo.y)/this._numSubSegs,ff=0;ffwt){this._isValid=!1;var fo=lo.getCoordinates();this._errorLocation=fo[1],this._errorIndicator=nt.getFactory().createLineString(fo),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+c1.toLineString(fo[0],fo[1])+")"}},C0.prototype.isValid=function(){var nt=Math.abs(this._bufDistance),at=C0.MAX_DISTANCE_DIFF_FRAC*nt;return this._minValidDistance=nt-at,this._maxValidDistance=nt+at,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),C0.VERBOSE&&Ry.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},C0.prototype.checkNegativeValid=function(){if(!(this._input instanceof oy||this._input instanceof db||this._input instanceof Zy))return null;var nt=this.getPolygonLines(this._input);if(this.checkMinimumDistance(nt,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(nt,this._result,this._maxValidDistance)},C0.prototype.getErrorIndicator=function(){return this._errorIndicator},C0.prototype.checkMinimumDistance=function(nt,at,wt){var lo=new Ty(nt,at,wt);if(this._minDistanceFound=lo.distance(),this._minDistanceFound0&&nt>at&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&nt=2||this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},My.prototype.report=function(nt){if(!My.VERBOSE)return null;Ry.out.println("Check "+nt+": "+(this._isValid?"passed":"FAILED"))},My.prototype.getErrorMessage=function(){return this._errorMsg},My.prototype.interfaces_=function(){return[]},My.prototype.getClass=function(){return My},My.isValidMsg=function(nt,at,wt){var lo=new My(nt,at,wt);return lo.isValid()?null:lo.getErrorMessage()},My.isValid=function(nt,at,wt){return!!new My(nt,at,wt).isValid()},QS.VERBOSE.get=function(){return!1},QS.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(My,QS);var U1=function(){this._pts=null,this._data=null;var nt=arguments[0],at=arguments[1];this._pts=nt,this._data=at};U1.prototype.getCoordinates=function(){return this._pts},U1.prototype.size=function(){return this._pts.length},U1.prototype.getCoordinate=function(nt){return this._pts[nt]},U1.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},U1.prototype.getSegmentOctant=function(nt){return nt===this._pts.length-1?-1:y1.octant(this.getCoordinate(nt),this.getCoordinate(nt+1))},U1.prototype.setData=function(nt){this._data=nt},U1.prototype.getData=function(){return this._data},U1.prototype.toString=function(){return c1.toLineString(new Uv(this._pts))},U1.prototype.interfaces_=function(){return[ay]},U1.prototype.getClass=function(){return U1};var ky=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Sg,this._intersectionCount=0,this._keepIntersections=!0;var nt=arguments[0];this._li=nt,this._interiorIntersection=null};ky.prototype.getInteriorIntersection=function(){return this._interiorIntersection},ky.prototype.setCheckEndSegmentsOnly=function(nt){this._isCheckEndSegmentsOnly=nt},ky.prototype.getIntersectionSegments=function(){return this._intSegments},ky.prototype.count=function(){return this._intersectionCount},ky.prototype.getIntersections=function(){return this._intersections},ky.prototype.setFindAllIntersections=function(nt){this._findAllIntersections=nt},ky.prototype.setKeepIntersections=function(nt){this._keepIntersections=nt},ky.prototype.processIntersections=function(nt,at,wt,lo){if(!this._findAllIntersections&&this.hasIntersection()||nt===wt&&at===lo||this._isCheckEndSegmentsOnly&&!(this.isEndSegment(nt,at)||this.isEndSegment(wt,lo)))return null;var fo=nt.getCoordinates()[at],vo=nt.getCoordinates()[at+1],ls=wt.getCoordinates()[lo],ff=wt.getCoordinates()[lo+1];this._li.computeIntersection(fo,vo,ls,ff),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=fo,this._intSegments[1]=vo,this._intSegments[2]=ls,this._intSegments[3]=ff,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},ky.prototype.isEndSegment=function(nt,at){return at===0||at>=nt.size()-2},ky.prototype.hasIntersection=function(){return this._interiorIntersection!==null},ky.prototype.isDone=function(){return!this._findAllIntersections&&this._interiorIntersection!==null},ky.prototype.interfaces_=function(){return[s_]},ky.prototype.getClass=function(){return ky},ky.createAllIntersectionsFinder=function(nt){var at=new ky(nt);return at.setFindAllIntersections(!0),at},ky.createAnyIntersectionFinder=function(nt){return new ky(nt)},ky.createIntersectionCounter=function(nt){var at=new ky(nt);return at.setFindAllIntersections(!0),at.setKeepIntersections(!1),at};var Q0=function(){this._li=new y$,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var nt=arguments[0];this._segStrings=nt};Q0.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},Q0.prototype.getIntersections=function(){return this._segInt.getIntersections()},Q0.prototype.isValid=function(){return this.execute(),this._isValid},Q0.prototype.setFindAllIntersections=function(nt){this._findAllIntersections=nt},Q0.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new ky(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var nt=new ZS;if(nt.setSegmentIntersector(this._segInt),nt.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Q0.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Lb(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Q0.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var nt=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+c1.toLineString(nt[0],nt[1])+" and "+c1.toLineString(nt[2],nt[3])},Q0.prototype.interfaces_=function(){return[]},Q0.prototype.getClass=function(){return Q0},Q0.computeIntersections=function(nt){var at=new Q0(nt);return at.setFindAllIntersections(!0),at.isValid(),at.getIntersections()};var c_=function nt(){this._nv=null;var at=arguments[0];this._nv=new Q0(nt.toSegmentStrings(at))};c_.prototype.checkValid=function(){this._nv.checkValid()},c_.prototype.interfaces_=function(){return[]},c_.prototype.getClass=function(){return c_},c_.toSegmentStrings=function(nt){for(var at=new Sg,wt=nt.iterator();wt.hasNext();){var lo=wt.next();at.add(new U1(lo.getCoordinates(),lo))}return at},c_.checkValid=function(nt){new c_(nt).checkValid()};var Q_=function(nt){this._mapOp=nt};Q_.prototype.map=function(nt){for(var at=new Sg,wt=0;wt0&&lo<4&&!this._preserveType?this._factory.createLineString(wt):this._factory.createLinearRing(wt)},e0.prototype.interfaces_=function(){return[]},e0.prototype.getClass=function(){return e0};var av=function nt(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Vg,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Av&&typeof arguments[1]=="number"){var at=arguments[0],wt=arguments[1];nt.call(this,at.getCoordinates(),wt)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var lo=arguments[0],fo=arguments[1];this._srcPts=lo,this._isClosed=nt.isClosed(lo),this._snapTolerance=fo}};av.prototype.snapVertices=function(nt,at){for(var wt=this._isClosed?nt.size()-1:nt.size(),lo=0;lo=0&&nt.add(vo+1,new Gp(fo),!1)}},av.prototype.findSegmentIndexToSnap=function(nt,at){for(var wt=this,lo=dm.MAX_VALUE,fo=-1,vo=0;voat&&(at=lo)}return at}if(arguments.length===2){var fo=arguments[0],vo=arguments[1];return Math.min(Dm.computeOverlaySnapTolerance(fo),Dm.computeOverlaySnapTolerance(vo))}},Dm.computeSizeBasedSnapTolerance=function(nt){var at=nt.getEnvelopeInternal();return Math.min(at.getHeight(),at.getWidth())*Dm.SNAP_PRECISION_FACTOR},Dm.snapToSelf=function(nt,at,wt){return new Dm(nt).snapToSelf(at,wt)},TE.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Dm,TE);var kE=function(nt){function at(wt,lo,fo){nt.call(this),this._snapTolerance=wt||null,this._snapPts=lo||null,this._isSelfSnap=fo!==void 0&&fo}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.snapLine=function(wt,lo){var fo=new av(wt,this._snapTolerance);return fo.setAllowSnappingToSourceVertices(this._isSelfSnap),fo.snapTo(lo)},at.prototype.transformCoordinates=function(wt,lo){var fo=wt.toCoordinateArray(),vo=this.snapLine(fo,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(vo)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(e0),Cy=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Cy.prototype.getCommon=function(){return dm.longBitsToDouble(this._commonBits)},Cy.prototype.add=function(nt){var at=dm.doubleToLongBits(nt);return this._isFirst?(this._commonBits=at,this._commonSignExp=Cy.signExpBits(this._commonBits),this._isFirst=!1,null):Cy.signExpBits(at)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=Cy.numCommonMostSigMantissaBits(this._commonBits,at),void(this._commonBits=Cy.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},Cy.prototype.toString=function(){if(arguments.length===1){var nt=arguments[0],at=dm.longBitsToDouble(nt),wt=dm.toBinaryString(nt),lo="0000000000000000000000000000000000000000000000000000000000000000"+wt,fo=lo.substring(lo.length-64),vo=fo.substring(0,1)+" "+fo.substring(1,12)+"(exp) "+fo.substring(12)+" [ "+at+" ]";return vo}},Cy.prototype.interfaces_=function(){return[]},Cy.prototype.getClass=function(){return Cy},Cy.getBit=function(nt,at){return nt&1<>52},Cy.zeroLowerBits=function(nt,at){return nt&~((1<=0;lo--){if(Cy.getBit(nt,lo)!==Cy.getBit(at,lo))return wt;wt++}return 52};var G1=function(){this._commonCoord=null,this._ccFilter=new jb},ix={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};G1.prototype.addCommonBits=function(nt){var at=new W1(this._commonCoord);nt.apply(at),nt.geometryChanged()},G1.prototype.removeCommonBits=function(nt){if(this._commonCoord.x===0&&this._commonCoord.y===0)return nt;var at=new Gp(this._commonCoord);at.x=-at.x,at.y=-at.y;var wt=new W1(at);return nt.apply(wt),nt.geometryChanged(),nt},G1.prototype.getCommonCoordinate=function(){return this._commonCoord},G1.prototype.add=function(nt){nt.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},G1.prototype.interfaces_=function(){return[]},G1.prototype.getClass=function(){return G1},ix.CommonCoordinateFilter.get=function(){return jb},ix.Translater.get=function(){return W1},Object.defineProperties(G1,ix);var jb=function(){this._commonBitsX=new Cy,this._commonBitsY=new Cy};jb.prototype.filter=function(nt){this._commonBitsX.add(nt.x),this._commonBitsY.add(nt.y)},jb.prototype.getCommonCoordinate=function(){return new Gp(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},jb.prototype.interfaces_=function(){return[lb]},jb.prototype.getClass=function(){return jb};var W1=function(){this.trans=null;var nt=arguments[0];this.trans=nt};W1.prototype.filter=function(nt,at){var wt=nt.getOrdinate(at,0)+this.trans.x,lo=nt.getOrdinate(at,1)+this.trans.y;nt.setOrdinate(at,0,wt),nt.setOrdinate(at,1,lo)},W1.prototype.isDone=function(){return!1},W1.prototype.isGeometryChanged=function(){return!0},W1.prototype.interfaces_=function(){return[d1]},W1.prototype.getClass=function(){return W1};var ly=function(nt,at){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=nt,this._geom[1]=at,this.computeSnapTolerance()};ly.prototype.selfSnap=function(nt){return new Dm(nt).snapTo(nt,this._snapTolerance)},ly.prototype.removeCommonBits=function(nt){this._cbr=new G1,this._cbr.add(nt[0]),this._cbr.add(nt[1]);var at=new Array(2).fill(null);return at[0]=this._cbr.removeCommonBits(nt[0].copy()),at[1]=this._cbr.removeCommonBits(nt[1].copy()),at},ly.prototype.prepareResult=function(nt){return this._cbr.addCommonBits(nt),nt},ly.prototype.getResultGeometry=function(nt){var at=this.snap(this._geom),wt=vm.overlayOp(at[0],at[1],nt);return this.prepareResult(wt)},ly.prototype.checkValid=function(nt){nt.isValid()||Ry.out.println("Snapped geometry is invalid")},ly.prototype.computeSnapTolerance=function(){this._snapTolerance=Dm.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ly.prototype.snap=function(nt){var at=this.removeCommonBits(nt);return Dm.snap(at[0],at[1],this._snapTolerance)},ly.prototype.interfaces_=function(){return[]},ly.prototype.getClass=function(){return ly},ly.overlayOp=function(nt,at,wt){return new ly(nt,at).getResultGeometry(wt)},ly.union=function(nt,at){return ly.overlayOp(nt,at,vm.UNION)},ly.intersection=function(nt,at){return ly.overlayOp(nt,at,vm.INTERSECTION)},ly.symDifference=function(nt,at){return ly.overlayOp(nt,at,vm.SYMDIFFERENCE)},ly.difference=function(nt,at){return ly.overlayOp(nt,at,vm.DIFFERENCE)};var Oy=function(nt,at){this._geom=new Array(2).fill(null),this._geom[0]=nt,this._geom[1]=at};Oy.prototype.getResultGeometry=function(nt){var at=null,wt=!1,lo=null;try{at=vm.overlayOp(this._geom[0],this._geom[1],nt),wt=!0}catch(fo){if(!(fo instanceof Nb))throw fo;lo=fo}if(!wt)try{at=ly.overlayOp(this._geom[0],this._geom[1],nt)}catch(fo){throw fo instanceof Nb?lo:fo}return at},Oy.prototype.interfaces_=function(){return[]},Oy.prototype.getClass=function(){return Oy},Oy.overlayOp=function(nt,at,wt){return new Oy(nt,at).getResultGeometry(wt)},Oy.union=function(nt,at){return Oy.overlayOp(nt,at,vm.UNION)},Oy.intersection=function(nt,at){return Oy.overlayOp(nt,at,vm.INTERSECTION)},Oy.symDifference=function(nt,at){return Oy.overlayOp(nt,at,vm.SYMDIFFERENCE)},Oy.difference=function(nt,at){return Oy.overlayOp(nt,at,vm.DIFFERENCE)};var u_=function(){this.mce=null,this.chainIndex=null;var nt=arguments[0],at=arguments[1];this.mce=nt,this.chainIndex=at};u_.prototype.computeIntersections=function(nt,at){this.mce.computeIntersectsForChain(this.chainIndex,nt.mce,nt.chainIndex,at)},u_.prototype.interfaces_=function(){return[]},u_.prototype.getClass=function(){return u_};var Wy=function nt(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var at=arguments[0],wt=arguments[1];this._eventType=nt.DELETE,this._xValue=at,this._insertEvent=wt}else if(arguments.length===3){var lo=arguments[0],fo=arguments[1],vo=arguments[2];this._eventType=nt.INSERT,this._label=lo,this._xValue=fo,this._obj=vo}},eT={INSERT:{configurable:!0},DELETE:{configurable:!0}};Wy.prototype.isDelete=function(){return this._eventType===Wy.DELETE},Wy.prototype.setDeleteEventIndex=function(nt){this._deleteEventIndex=nt},Wy.prototype.getObject=function(){return this._obj},Wy.prototype.compareTo=function(nt){var at=nt;return this._xValueat._xValue?1:this._eventTypeat._eventType?1:0},Wy.prototype.getInsertEvent=function(){return this._insertEvent},Wy.prototype.isInsert=function(){return this._eventType===Wy.INSERT},Wy.prototype.isSameLabel=function(nt){return this._label!==null&&this._label===nt._label},Wy.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},Wy.prototype.interfaces_=function(){return[G0]},Wy.prototype.getClass=function(){return Wy},eT.INSERT.get=function(){return 1},eT.DELETE.get=function(){return 2},Object.defineProperties(Wy,eT);var tw=function(){};tw.prototype.interfaces_=function(){return[]},tw.prototype.getClass=function(){return tw};var cy=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var nt=arguments[0],at=arguments[1],wt=arguments[2];this._li=nt,this._includeProper=at,this._recordIsolated=wt};cy.prototype.isTrivialIntersection=function(nt,at,wt,lo){if(nt===wt&&this._li.getIntersectionNum()===1){if(cy.isAdjacentSegments(at,lo))return!0;if(nt.isClosed()){var fo=nt.getNumPoints()-1;if(at===0&&lo===fo||lo===0&&at===fo)return!0}}return!1},cy.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},cy.prototype.setIsDoneIfProperInt=function(nt){this._isDoneWhenProperInt=nt},cy.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},cy.prototype.isBoundaryPointInternal=function(nt,at){for(var wt=at.iterator();wt.hasNext();){var lo=wt.next().getCoordinate();if(nt.isIntersection(lo))return!0}return!1},cy.prototype.hasProperIntersection=function(){return this._hasProper},cy.prototype.hasIntersection=function(){return this._hasIntersection},cy.prototype.isDone=function(){return this._isDone},cy.prototype.isBoundaryPoint=function(nt,at){return at!==null&&(!!this.isBoundaryPointInternal(nt,at[0])||!!this.isBoundaryPointInternal(nt,at[1]))},cy.prototype.setBoundaryNodes=function(nt,at){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=nt,this._bdyNodes[1]=at},cy.prototype.addIntersections=function(nt,at,wt,lo){if(nt===wt&&at===lo)return null;this.numTests++;var fo=nt.getCoordinates()[at],vo=nt.getCoordinates()[at+1],ls=wt.getCoordinates()[lo],ff=wt.getCoordinates()[lo+1];this._li.computeIntersection(fo,vo,ls,ff),this._li.hasIntersection()&&(this._recordIsolated&&(nt.setIsolated(!1),wt.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(nt,at,wt,lo)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(nt.addIntersections(this._li,at,0),wt.addIntersections(this._li,lo,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},cy.prototype.interfaces_=function(){return[]},cy.prototype.getClass=function(){return cy},cy.isAdjacentSegments=function(nt,at){return Math.abs(nt-at)===1};var CO=function(nt){function at(){nt.call(this),this.events=new Sg,this.nOverlaps=null}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.prepareEvents=function(){v1.sort(this.events);for(var wt=0;wtat||this._maxvo?1:0},g2.prototype.interfaces_=function(){return[zw]},g2.prototype.getClass=function(){return g2};var _1=function(nt){function at(){nt.call(this),this._item=null;var wt=arguments[0],lo=arguments[1],fo=arguments[2];this._min=wt,this._max=lo,this._item=fo}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.query=function(wt,lo,fo){if(!this.intersects(wt,lo))return null;fo.visitItem(this._item)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(bb),rC=function(nt){function at(){nt.call(this),this._node1=null,this._node2=null;var wt=arguments[0],lo=arguments[1];this._node1=wt,this._node2=lo,this.buildExtent(this._node1,this._node2)}return nt&&(at.__proto__=nt),at.prototype=Object.create(nt&&nt.prototype),at.prototype.constructor=at,at.prototype.buildExtent=function(wt,lo){this._min=Math.min(wt._min,lo._min),this._max=Math.max(wt._max,lo._max)},at.prototype.query=function(wt,lo,fo){if(!this.intersects(wt,lo))return null;this._node1!==null&&this._node1.query(wt,lo,fo),this._node2!==null&&this._node2.query(wt,lo,fo)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at}(bb),q1=function(){this._leaves=new Sg,this._root=null,this._level=0};q1.prototype.buildTree=function(){v1.sort(this._leaves,new bb.NodeComparator);for(var nt=this._leaves,at=null,wt=new Sg;;){if(this.buildLevel(nt,wt),wt.size()===1)return wt.get(0);at=nt,nt=wt,wt=at}},q1.prototype.insert=function(nt,at,wt){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new _1(nt,at,wt))},q1.prototype.query=function(nt,at,wt){this.init(),this._root.query(nt,at,wt)},q1.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},q1.prototype.printNode=function(nt){Ry.out.println(c1.toLineString(new Gp(nt._min,this._level),new Gp(nt._max,this._level)))},q1.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},q1.prototype.buildLevel=function(nt,at){this._level++,at.clear();for(var wt=0;wt=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,lo[0]),this.insertBoundaryPoint(this._argIndex,lo[lo.length-1])},at.prototype.getInvalidPoint=function(){return this._invalidPoint},at.prototype.getBoundaryPoints=function(){for(var wt=this.getBoundaryNodes(),lo=new Array(wt.size()).fill(null),fo=0,vo=wt.iterator();vo.hasNext();){var ls=vo.next();lo[fo++]=ls.getCoordinate().copy()}return lo},at.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},at.prototype.addSelfIntersectionNode=function(wt,lo,fo){if(this.isBoundaryNode(wt,lo))return null;fo===eg.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(wt,lo):this.insertPoint(wt,lo,fo)},at.prototype.addPolygonRing=function(wt,lo,fo){if(wt.isEmpty())return null;var vo=Cm.removeRepeatedPoints(wt.getCoordinates());if(vo.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=vo[0],null;var ls=lo,ff=fo;Og.isCCW(vo)&&(ls=fo,ff=lo);var mf=new rx(vo,new fv(this._argIndex,eg.BOUNDARY,ls,ff));this._lineEdgeMap.put(wt,mf),this.insertEdge(mf),this.insertPoint(this._argIndex,vo[0],eg.BOUNDARY)},at.prototype.insertPoint=function(wt,lo,fo){var vo=this._nodes.addNode(lo),ls=vo.getLabel();ls===null?vo._label=new fv(wt,fo):ls.setLocation(wt,fo)},at.prototype.createEdgeSetIntersector=function(){return new CO},at.prototype.addSelfIntersectionNodes=function(wt){for(var lo=this._edges.iterator();lo.hasNext();)for(var fo=lo.next(),vo=fo.getLabel().getLocation(wt),ls=fo.eiList.iterator();ls.hasNext();){var ff=ls.next();this.addSelfIntersectionNode(wt,ff.coord,vo)}},at.prototype.add=function(){if(arguments.length!==1)return nt.prototype.add.apply(this,arguments);var wt=arguments[0];if(wt.isEmpty())return null;if(wt instanceof db&&(this._useBoundaryDeterminationRule=!1),wt instanceof oy)this.addPolygon(wt);else if(wt instanceof Av)this.addLineString(wt);else if(wt instanceof x0)this.addPoint(wt);else if(wt instanceof Zw)this.addCollection(wt);else if(wt instanceof b$)this.addCollection(wt);else if(wt instanceof db)this.addCollection(wt);else{if(!(wt instanceof Zy))throw new Error(wt.getClass().getName());this.addCollection(wt)}},at.prototype.addCollection=function(wt){for(var lo=0;lo50?(this._areaPtLocator===null&&(this._areaPtLocator=new ax(this._parentGeom)),this._areaPtLocator.locate(wt)):this._ptLocator.locate(wt,this._parentGeom)},at.prototype.findEdge=function(){if(arguments.length===1){var wt=arguments[0];return this._lineEdgeMap.get(wt)}return nt.prototype.findEdge.apply(this,arguments)},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.determineBoundary=function(wt,lo){return wt.isInBoundary(lo)?eg.BOUNDARY:eg.INTERIOR},at}(Nv),cx=function(){if(this._li=new y$,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var nt=arguments[0];this.setComputationPrecision(nt.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new lx(0,nt)}else if(arguments.length===2){var at=arguments[0],wt=arguments[1],lo=Y0.OGC_SFS_BOUNDARY_RULE;at.getPrecisionModel().compareTo(wt.getPrecisionModel())>=0?this.setComputationPrecision(at.getPrecisionModel()):this.setComputationPrecision(wt.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new lx(0,at,lo),this._arg[1]=new lx(1,wt,lo)}else if(arguments.length===3){var fo=arguments[0],vo=arguments[1],ls=arguments[2];fo.getPrecisionModel().compareTo(vo.getPrecisionModel())>=0?this.setComputationPrecision(fo.getPrecisionModel()):this.setComputationPrecision(vo.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new lx(0,fo,ls),this._arg[1]=new lx(1,vo,ls)}};cx.prototype.getArgGeometry=function(nt){return this._arg[nt].getGeometry()},cx.prototype.setComputationPrecision=function(nt){this._resultPrecisionModel=nt,this._li.setPrecisionModel(this._resultPrecisionModel)},cx.prototype.interfaces_=function(){return[]},cx.prototype.getClass=function(){return cx};var h_=function(){};h_.prototype.interfaces_=function(){return[]},h_.prototype.getClass=function(){return h_},h_.map=function(){if(arguments[0]instanceof tm&&nm(arguments[1],h_.MapOp)){for(var nt=arguments[0],at=arguments[1],wt=new Sg,lo=0;lo=nt.size()?null:nt.get(at)},Jv.union=function(nt){return new Jv(nt).union()},rT.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Jv,rT);var w1=function(){};function zb(){return new ux}function ux(){this.reset()}w1.prototype.interfaces_=function(){return[]},w1.prototype.getClass=function(){return w1},w1.union=function(nt,at){if(nt.isEmpty()||at.isEmpty()){if(nt.isEmpty()&&at.isEmpty())return vm.createEmptyResult(vm.UNION,nt,at,nt.getFactory());if(nt.isEmpty())return at.copy();if(at.isEmpty())return nt.copy()}return nt.checkNotGeometryCollection(nt),nt.checkNotGeometryCollection(at),Oy.overlayOp(nt,at,vm.UNION)},ux.prototype={constructor:ux,reset:function(){this.s=this.t=0},add:function(nt){nT(m2,nt,this.t),nT(this,m2.s,this.s),this.s?this.t+=m2.t:this.s=m2.t},valueOf:function(){return this.s}};var m2=new ux;function nT(nt,at,wt){var lo=nt.s=at+wt,fo=lo-at,vo=lo-fo;nt.t=at-vo+(wt-fo)}var Wv=1e-6,gv=Math.PI,Hb=gv/2,nC=gv/4,Ub=2*gv,im=180/gv,e1=gv/180,t0=Math.abs,OO=Math.atan,hx=Math.atan2,uy=Math.cos,hy=Math.sin,v2=Math.sqrt;function OE(nt){return nt>1?0:nt<-1?gv:Math.acos(nt)}function $b(nt){return nt>1?Hb:nt<-1?-Hb:Math.asin(nt)}function d_(){}function y2(nt,at){nt&&iT.hasOwnProperty(nt.type)&&iT[nt.type](nt,at)}var IE={Feature:function(nt,at){y2(nt.geometry,at)},FeatureCollection:function(nt,at){for(var wt=nt.features,lo=-1,fo=wt.length;++logv?nt-Ub:nt<-gv?nt+Ub:nt,at]}function iC(nt){return function(at,wt){return[(at+=nt)>gv?at-Ub:at<-gv?at+Ub:at,wt]}}function uT(nt){var at=iC(nt);return at.invert=iC(-nt),at}function hT(nt,at){var wt=uy(nt),lo=hy(nt),fo=uy(at),vo=hy(at);function ls(ff,mf){var bf=uy(mf),Sf=uy(ff)*bf,wf=hy(ff)*bf,If=hy(mf),jf=If*wt+Sf*lo;return[hx(wf*fo-jf*vo,Sf*wt-If*lo),$b(jf*fo+wf*vo)]}return ls.invert=function(ff,mf){var bf=uy(mf),Sf=uy(ff)*bf,wf=hy(ff)*bf,If=hy(mf),jf=If*fo-wf*vo;return[hx(wf*fo+If*vo,Sf*wt+jf*lo),$b(jf*wt-Sf*lo)]},ls}function dT(nt,at){(at=Qv(at))[0]-=nt,sT(at);var wt=OE(-at[1]);return((-at[2]<0?-wt:wt)+Ub-Wv)%Ub}function NE(){var nt,at=[];return{point:function(wt,lo){nt.push([wt,lo])},lineStart:function(){at.push(nt=[])},lineEnd:d_,rejoin:function(){at.length>1&&at.push(at.pop().concat(at.shift()))},result:function(){var wt=at;return at=[],nt=null,wt}}}function ME(nt,at){return t0(nt[0]-at[0])=0;--vo)fo.point((Sf=bf[vo])[0],Sf[1]);else lo(If.x,If.p.x,-1,fo);If=If.p}bf=(If=If.o).z,jf=!jf}while(!If.v);fo.lineEnd()}}}function $2(nt){if(at=nt.length){for(var at,wt,lo=0,fo=nt[0];++loat?1:nt>=at?0:NaN}cT.invert=cT;var fx,Vb;(fx=_2).length===1&&(Vb=fx,fx=function(nt,at){return _2(Vb(nt),at)});function oC(nt){for(var at,wt,lo,fo=nt.length,vo=-1,ls=0;++vo=0;)for(at=(lo=nt[fo]).length;--at>=0;)wt[--ls]=lo[at];return wt}var px=1e9,Dy=-px;function DE(nt,at,wt,lo){function fo(bf,Sf){return nt<=bf&&bf<=wt&&at<=Sf&&Sf<=lo}function vo(bf,Sf,wf,If){var jf=0,zf=0;if(bf==null||(jf=ls(bf,wf))!==(zf=ls(Sf,wf))||mf(bf,Sf)<0^wf>0)do If.point(jf===0||jf===3?nt:wt,jf>1?lo:at);while((jf=(jf+wf+4)%4)!==zf);else If.point(Sf[0],Sf[1])}function ls(bf,Sf){return t0(bf[0]-nt)0?0:3:t0(bf[0]-wt)0?2:1:t0(bf[1]-at)0?1:0:Sf>0?3:2}function ff(bf,Sf){return mf(bf.x,Sf.x)}function mf(bf,Sf){var wf=ls(bf,1),If=ls(Sf,1);return wf!==If?wf-If:wf===0?Sf[1]-bf[1]:wf===1?bf[0]-Sf[0]:wf===2?bf[1]-Sf[1]:Sf[0]-bf[0]}return function(bf){var Sf,wf,If,jf,zf,Wf,Mf,np,pp,Uf,tp,op=bf,up=NE(),sp={point:Qp,lineStart:function(){sp.point=Ap,wf&&wf.push(If=[]),Uf=!0,pp=!1,Mf=np=NaN},lineEnd:function(){Sf&&(Ap(jf,zf),Wf&&pp&&up.rejoin(),Sf.push(up.result())),sp.point=Qp,pp&&op.lineEnd()},polygonStart:function(){op=up,Sf=[],wf=[],tp=!0},polygonEnd:function(){var rg=function(){for(var qp=0,Wp=0,Up=wf.length;Wplo&&(bm-ig)*(lo-Xp)>(Mg-Xp)*(nt-ig)&&++qp:Mg<=lo&&(bm-ig)*(lo-Xp)<(Mg-Xp)*(nt-ig)&&--qp;return qp}(),zp=tp&&rg,lg=(Sf=oC(Sf)).length;(zp||lg)&&(bf.polygonStart(),zp&&(bf.lineStart(),vo(null,null,1,bf),bf.lineEnd()),lg&&fT(Sf,ff,rg,vo,bf),bf.polygonEnd()),op=bf,Sf=wf=If=null}};function Qp(rg,zp){fo(rg,zp)&&op.point(rg,zp)}function Ap(rg,zp){var lg=fo(rg,zp);if(wf&&If.push([rg,zp]),Uf)jf=rg,zf=zp,Wf=lg,Uf=!1,lg&&(op.lineStart(),op.point(rg,zp));else if(lg&&pp)op.point(rg,zp);else{var qp=[Mf=Math.max(Dy,Math.min(px,Mf)),np=Math.max(Dy,Math.min(px,np))],Wp=[rg=Math.max(Dy,Math.min(px,rg)),zp=Math.max(Dy,Math.min(px,zp))];(function(Up,ig,Xp,cg,Sp,Ug){var _g,bm=Up[0],Mg=Up[1],em=0,Lm=1,vv=ig[0]-bm,Ly=ig[1]-Mg;if(_g=Xp-bm,vv||!(_g>0)){if(_g/=vv,vv<0){if(_g0){if(_g>Lm)return;_g>em&&(em=_g)}if(_g=Sp-bm,vv||!(_g<0)){if(_g/=vv,vv<0){if(_g>Lm)return;_g>em&&(em=_g)}else if(vv>0){if(_g0)){if(_g/=Ly,Ly<0){if(_g0){if(_g>Lm)return;_g>em&&(em=_g)}if(_g=Ug-Mg,Ly||!(_g<0)){if(_g/=Ly,Ly<0){if(_g>Lm)return;_g>em&&(em=_g)}else if(Ly>0){if(_g0&&(Up[0]=bm+em*vv,Up[1]=Mg+em*Ly),Lm<1&&(ig[0]=bm+Lm*vv,ig[1]=Mg+Lm*Ly),!0}}}}})(qp,Wp,nt,at,wt,lo)?(pp||(op.lineStart(),op.point(qp[0],qp[1])),op.point(Wp[0],Wp[1]),lg||op.lineEnd(),tp=!1):lg&&(op.lineStart(),op.point(rg,zp),tp=!1)}Mf=rg,np=zp,pp=lg}return sp}}var pT=zb();zb();function aC(nt){return nt}zb(),zb();var gx=1/0,iw=gx,f_=-gx,LE=f_,sC={point:function(nt,at){ntf_&&(f_=nt),atLE&&(LE=at)},lineStart:d_,lineEnd:d_,polygonStart:d_,polygonEnd:d_,result:function(){var nt=[[gx,iw],[f_,LE]];return f_=LE=-(iw=gx=1/0),nt}};zb();function gT(nt,at,wt,lo){return function(fo,vo){var ls,ff,mf,bf=at(vo),Sf=fo.invert(lo[0],lo[1]),wf=NE(),If=at(wf),jf=!1,zf={point:Wf,lineStart:np,lineEnd:pp,polygonStart:function(){zf.point=Uf,zf.lineStart=tp,zf.lineEnd=op,ff=[],ls=[]},polygonEnd:function(){zf.point=Wf,zf.lineStart=np,zf.lineEnd=pp,ff=oC(ff);var up=function(sp,Qp){var Ap=Qp[0],rg=Qp[1],zp=[hy(Ap),-uy(Ap),0],lg=0,qp=0;pT.reset();for(var Wp=0,Up=sp.length;Wp=0?1:-1,S2=E2*p_,mx=S2>gv,BE=_g*Ly;if(pT.add(hx(BE*E2*hy(S2),bm*x2+BE*uy(S2))),lg+=mx?p_+E2*Ub:p_,mx^Sp>=Ap^Lm>=Ap){var vx=AE(Qv(cg),Qv(em));sT(vx);var $C=AE(zp,vx);sT($C);var _C=(mx^p_>=0?-1:1)*$b($C[2]);(rg>_C||rg===_C&&(vx[0]||vx[1]))&&(qp+=mx^p_>=0?1:-1)}}return(lg<-1e-6||lg0){for(jf||(vo.polygonStart(),jf=!0),vo.lineStart(),up=0;up1&&2&rg&&zp.push(zp.pop().concat(zp.shift())),ff.push(zp.filter(lC))}return zf}}function lC(nt){return nt.length>1}function mT(nt,at){return((nt=nt.x)[0]<0?nt[1]-Hb-Wv:Hb-nt[1])-((at=at.x)[0]<0?at[1]-Hb-Wv:Hb-at[1])}var vT=gT(function(){return!0},function(nt){var at,wt=NaN,lo=NaN,fo=NaN;return{lineStart:function(){nt.lineStart(),at=1},point:function(vo,ls){var ff=vo>0?gv:-gv,mf=t0(vo-wt);t0(mf-gv)0?Hb:-Hb),nt.point(fo,lo),nt.lineEnd(),nt.lineStart(),nt.point(ff,lo),nt.point(vo,lo),at=0):fo!==ff&&mf>=gv&&(t0(wt-fo)Wv?OO((hy(Sf)*(zf=uy(If))*hy(wf)-hy(If)*(jf=uy(Sf))*hy(bf))/(jf*zf*Wf)):(Sf+If)/2}(wt,lo,vo,ls),nt.point(fo,lo),nt.lineEnd(),nt.lineStart(),nt.point(ff,lo),at=0),nt.point(wt=vo,lo=ls),fo=ff},lineEnd:function(){nt.lineEnd(),wt=lo=NaN},clean:function(){return 2-at}}},function(nt,at,wt,lo){var fo;if(nt==null)fo=wt*Hb,lo.point(-gv,fo),lo.point(0,fo),lo.point(gv,fo),lo.point(gv,0),lo.point(gv,-fo),lo.point(0,-fo),lo.point(-gv,-fo),lo.point(-gv,0),lo.point(-gv,fo);else if(t0(nt[0]-at[0])>Wv){var vo=nt[0]0,fo=t0(wt)>Wv;function vo(mf,bf){return uy(mf)*uy(bf)>wt}function ls(mf,bf,Sf){var wf=[1,0,0],If=AE(Qv(mf),Qv(bf)),jf=b2(If,If),zf=If[0],Wf=jf-zf*zf;if(!Wf)return!Sf&&mf;var Mf=wt*jf/Wf,np=-wt*zf/Wf,pp=AE(wf,If),Uf=RE(wf,Mf);aT(Uf,RE(If,np));var tp=pp,op=b2(Uf,tp),up=b2(tp,tp),sp=op*op-up*(b2(Uf,Uf)-1);if(!(sp<0)){var Qp=v2(sp),Ap=RE(tp,(-op-Qp)/up);if(aT(Ap,Uf),Ap=oT(Ap),!Sf)return Ap;var rg,zp=mf[0],lg=bf[0],qp=mf[1],Wp=bf[1];lg0^Ap[1]<(t0(Ap[0]-zp)gv^(zp<=Ap[0]&&Ap[0]<=lg)){var Xp=RE(tp,(-op+Qp)/up);return aT(Xp,Uf),[Ap,oT(Xp)]}}}function ff(mf,bf){var Sf=lo?nt:gv-nt,wf=0;return mf<-Sf?wf|=1:mf>Sf&&(wf|=2),bf<-Sf?wf|=4:bf>Sf&&(wf|=8),wf}return gT(vo,function(mf){var bf,Sf,wf,If,jf;return{lineStart:function(){If=wf=!1,jf=1},point:function(zf,Wf){var Mf,np=[zf,Wf],pp=vo(zf,Wf),Uf=lo?pp?0:ff(zf,Wf):pp?ff(zf+(zf<0?gv:-gv),Wf):0;if(!bf&&(If=wf=pp)&&mf.lineStart(),pp!==wf&&(!(Mf=ls(bf,np))||ME(bf,Mf)||ME(np,Mf))&&(np[0]+=Wv,np[1]+=Wv,pp=vo(np[0],np[1])),pp!==wf)jf=0,pp?(mf.lineStart(),Mf=ls(np,bf),mf.point(Mf[0],Mf[1])):(Mf=ls(bf,np),mf.point(Mf[0],Mf[1]),mf.lineEnd()),bf=Mf;else if(fo&&bf&&lo^pp){var tp;Uf&Sf||!(tp=ls(np,bf,!0))||(jf=0,lo?(mf.lineStart(),mf.point(tp[0][0],tp[0][1]),mf.point(tp[1][0],tp[1][1]),mf.lineEnd()):(mf.point(tp[1][0],tp[1][1]),mf.lineEnd(),mf.lineStart(),mf.point(tp[0][0],tp[0][1])))}!pp||bf&&ME(bf,np)||mf.point(np[0],np[1]),bf=np,wf=pp,Sf=Uf},lineEnd:function(){wf&&mf.lineEnd(),bf=null},clean:function(){return jf|(If&&wf)<<1}}},function(mf,bf,Sf,wf){(function(If,jf,zf,Wf,Mf,np){if(zf){var pp=uy(jf),Uf=hy(jf),tp=Wf*zf;Mf==null?(Mf=jf+Wf*Ub,np=jf-tp/2):(Mf=dT(pp,Mf),np=dT(pp,np),(Wf>0?Mfnp)&&(Mf+=Wf*Ub));for(var op,up=Mf;Wf>0?up>np:up4*lo&&np--){var up=mf+zf,sp=bf+Wf,Qp=Sf+Mf,Ap=v2(up*up+sp*sp+Qp*Qp),rg=$b(Qp/=Ap),zp=t0(t0(Qp)-1)lo||t0((Uf*Up+tp*ig)/op-.5)>.3||mf*zf+bf*Wf+Sf*Mf2?Up[2]%360*e1:0,qp()):[np*im,pp*im,Uf*im]},rg.precision=function(Up){return arguments.length?(Ap=uC(lg,Qp=Up*Up),Wp()):v2(Qp)},rg.fitExtent=function(Up,ig){return w2(rg,Up,ig)},rg.fitSize=function(Up,ig){return function(Xp,cg,Sp){return w2(Xp,[[0,0],cg],Sp)}(rg,Up,ig)},function(){return wt=at.apply(this,arguments),rg.invert=wt.invert&&zp,qp()}}(function(){return nt})()}var bT=function(nt){return function(at,wt){var lo=uy(at),fo=uy(wt),vo=nt(lo*fo);return[vo*fo*hy(at),vo*hy(wt)]}}(function(nt){return(nt=OE(nt))&&nt/hy(nt)});function AO(){return PO(bT).scale(79.4188).clipAngle(179.999)}function ow(nt,at,wt,lo){var fo=nt.properties||{},vo=nt.type==="Feature"?nt.geometry:nt;if(vo.type==="GeometryCollection"){var ls=[];return Ip(nt,function(If){var jf=ow(If,at,wt,lo);jf&&ls.push(jf)}),wo(ls)}var ff=function(If){var jf=n1(If).geometry.coordinates,zf=[-jf[0],-jf[1]];return AO().rotate(zf).scale(W)}(vo),mf={type:vo.type,coordinates:fC(vo.coordinates,ff)},bf=new vE().read(mf),Sf=$f(xf(at,wt),"meters"),wf=bv.bufferOp(bf,Sf,lo);if(!dC((wf=new qk().write(wf)).coordinates))return tt({type:wf.type,coordinates:pC(wf.coordinates,ff)},fo)}function dC(nt){return Array.isArray(nt[0])?dC(nt[0]):isNaN(nt[0])}function fC(nt,at){return typeof nt[0]!="object"?at(nt):nt.map(function(wt){return fC(wt,at)})}function pC(nt,at){return typeof nt[0]!="object"?at.invert(nt):nt.map(function(wt){return pC(wt,at)})}function aw(nt,at,wt){wt===void 0&&(wt={});var lo=_p(nt),fo=_p(at),vo=m$.intersection(lo.coordinates,fo.coordinates);return vo.length===0?null:vo.length===1?yn(vo[0],wt.properties):cf(vo,wt.properties)}function gC(nt,at,wt){wt===void 0&&(wt={});var lo=JSON.stringify(wt.properties||{}),fo=nt[0],vo=nt[1],ls=nt[2],ff=nt[3],mf=(vo+ff)/2,bf=(fo+ls)/2,Sf=2*at/_m([fo,mf],[ls,mf],wt)*(ls-fo),wf=2*at/_m([bf,vo],[bf,ff],wt)*(ff-vo),If=Sf/2,jf=2*If,zf=Math.sqrt(3)/2*wf,Wf=ls-fo,Mf=ff-vo,np=3/4*jf,pp=zf,Uf=(Wf-jf)/(jf-If/2),tp=Math.floor(Uf),op=(tp*np-If/2-Wf)/2-If/2+np/2,up=Math.floor((Mf-zf)/zf),sp=(Mf-up*zf)/2,Qp=up*zf-Mf>zf/2;Qp&&(sp-=zf/4);for(var Ap=[],rg=[],zp=0;zp<6;zp++){var lg=2*Math.PI/6*zp;Ap.push(Math.cos(lg)),rg.push(Math.sin(lg))}for(var qp=[],Wp=0;Wp<=tp;Wp++)for(var Up=0;Up<=up;Up++){var ig=Wp%2==1;if((Up!==0||!ig)&&(Up!==0||!Qp)){var Xp=Wp*np+fo-op,cg=Up*pp+vo+sp;if(ig&&(cg-=zf/2),wt.triangles===!0)vC([Xp,cg],Sf/2,wf/2,JSON.parse(lo),Ap,rg).forEach(function(Ug){wt.mask?aw(wt.mask,Ug)&&qp.push(Ug):qp.push(Ug)});else{var Sp=mC([Xp,cg],Sf/2,wf/2,JSON.parse(lo),Ap,rg);wt.mask?aw(wt.mask,Sp)&&qp.push(Sp):qp.push(Sp)}}}return wo(qp)}function mC(nt,at,wt,lo,fo,vo){for(var ls=[],ff=0;ff<6;ff++){var mf=nt[0]+at*fo[ff],bf=nt[1]+wt*vo[ff];ls.push([mf,bf])}return ls.push(ls[0].slice()),yn([ls],lo)}function vC(nt,at,wt,lo,fo,vo){for(var ls=[],ff=0;ff<6;ff++){var mf=[];mf.push(nt),mf.push([nt[0]+at*fo[ff],nt[1]+wt*vo[ff]]),mf.push([nt[0]+at*fo[(ff+1)%6],nt[1]+wt*vo[(ff+1)%6]]),mf.push(nt),ls.push(yn([mf],lo))}return ls}function yC(nt){return cf(nt)}function RO(nt){return yn(nt&&nt.geometry.coordinates||[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]])}function bC(nt,at,wt){return wt===void 0&&(wt={}),function(lo,fo,vo,ls){ls===void 0&&(ls={});for(var ff=[],mf=lo[0],bf=lo[1],Sf=lo[2],wf=lo[3],If=fo/_m([mf,bf],[Sf,bf],ls)*(Sf-mf),jf=vo/_m([mf,bf],[mf,wf],ls)*(wf-bf),zf=Sf-mf,Wf=wf-bf,Mf=Math.floor(zf/If),np=Math.floor(Wf/jf),pp=(Wf-np*jf)/2,Uf=mf+(zf-Mf*If)/2,tp=0;tp=fo&&vo===lo.length-1);vo++){if(fo>=at){var ls=at-fo;if(ls){var ff=k1(lo[vo],lo[vo-1])-180;return $y(lo[vo],ls,ff,wt)}return ot(lo[vo])}fo+=_m(lo[vo],lo[vo+1],wt)}return ot(lo[lo.length-1])},F.angle=function(nt,at,wt,lo){if(lo===void 0&&(lo={}),!kf(lo))throw new Error("options is invalid");if(!nt)throw new Error("startPoint is required");if(!at)throw new Error("midPoint is required");if(!wt)throw new Error("endPoint is required");var fo=nt,vo=at,ls=wt,ff=Cf(lo.mercator!==!0?k1(fo,vo):u$(fo,vo)),mf=Cf(lo.mercator!==!0?k1(ls,vo):u$(ls,vo)),bf=Math.abs(ff-mf);return lo.explementary===!0?360-bf:bf},F.applyFilter=iE,F.area=W$,F.areaFactors=X,F.bbox=qf,F.bboxClip=function(nt,at){var wt=_p(nt),lo=wt.type,fo=nt.type==="Feature"?nt.properties:{},vo=wt.coordinates;switch(lo){case"LineString":case"MultiLineString":var ls=[];return lo==="LineString"&&(vo=[vo]),vo.forEach(function(ff){(function(mf,bf,Sf){var wf,If,jf,zf,Wf,Mf=mf.length,np=rb(mf[0],bf),pp=[];for(Sf||(Sf=[]),wf=1;wf0)for(var mf=0;mf0},F.booleanParallel=function(nt,at){if(!nt)throw new Error("line1 is required");if(!at)throw new Error("line2 is required");if(SS(nt,"line1")!=="LineString")throw new Error("line1 must be a LineString");if(SS(at,"line2")!=="LineString")throw new Error("line2 must be a LineString");for(var wt=_y(V0(nt)).features,lo=_y(V0(at)).features,fo=0;fowt&&(at.numberOfClusters=wt),at.mutate!==!0&&(nt=Iv(nt));var lo=jp(nt),fo=lo.slice(0,at.numberOfClusters),vo=ES(lo,at.numberOfClusters,fo),ls={};return vo.centroids.forEach(function(ff,mf){ls[mf]=ff}),vp(nt,function(ff,mf){var bf=vo.idxs[mf];ff.properties.cluster=bf,ff.properties.centroid=ls[bf]}),nt},F.collect=function(nt,at,wt,lo){var fo=Cg(6),vo=at.features.map(function(ls){var ff;return{minX:ls.geometry.coordinates[0],minY:ls.geometry.coordinates[1],maxX:ls.geometry.coordinates[0],maxY:ls.geometry.coordinates[1],property:(ff=ls.properties)===null||ff===void 0?void 0:ff[wt]}});return fo.load(vo),nt.features.forEach(function(ls){ls.properties||(ls.properties={});var ff=qf(ls),mf=fo.search({minX:ff[0],minY:ff[1],maxX:ff[2],maxY:ff[3]}),bf=[];mf.forEach(function(Sf){cm([Sf.minX,Sf.minY],ls)&&bf.push(Sf.property)}),ls.properties[lo]=bf}),nt},F.collectionOf=Ep,F.combine=function(nt){var at={MultiPoint:{coordinates:[],properties:[]},MultiLineString:{coordinates:[],properties:[]},MultiPolygon:{coordinates:[],properties:[]}};return vp(nt,function(wt){var lo,fo,vo,ls;switch((ls=wt.geometry)===null||ls===void 0?void 0:ls.type){case"Point":at.MultiPoint.coordinates.push(wt.geometry.coordinates),at.MultiPoint.properties.push(wt.properties);break;case"MultiPoint":(lo=at.MultiPoint.coordinates).push.apply(lo,wt.geometry.coordinates),at.MultiPoint.properties.push(wt.properties);break;case"LineString":at.MultiLineString.coordinates.push(wt.geometry.coordinates),at.MultiLineString.properties.push(wt.properties);break;case"MultiLineString":(fo=at.MultiLineString.coordinates).push.apply(fo,wt.geometry.coordinates),at.MultiLineString.properties.push(wt.properties);break;case"Polygon":at.MultiPolygon.coordinates.push(wt.geometry.coordinates),at.MultiPolygon.properties.push(wt.properties);break;case"MultiPolygon":(vo=at.MultiPolygon.coordinates).push.apply(vo,wt.geometry.coordinates),at.MultiPolygon.properties.push(wt.properties)}}),wo(Object.keys(at).filter(function(wt){return at[wt].coordinates.length}).sort().map(function(wt){return tt({type:wt,coordinates:at[wt].coordinates},{collectedProperties:at[wt].properties})}))},F.concave=function(nt,at){at===void 0&&(at={});var wt=at.maxEdge||1/0,lo=Eb(function(vo){var ls=[],ff={};return vp(vo,function(mf){if(mf.geometry){var bf=mf.geometry.coordinates.join("-");Object.prototype.hasOwnProperty.call(ff,bf)||(ls.push(mf),ff[bf]=!0)}}),wo(ls)}(nt));if(lo.features=lo.features.filter(function(vo){var ls=vo.geometry.coordinates[0][0],ff=vo.geometry.coordinates[0][1],mf=vo.geometry.coordinates[0][2],bf=_m(ls,ff,at),Sf=_m(ff,mf,at),wf=_m(ls,mf,at);return bf<=wt&&Sf<=wt&&wf<=wt}),lo.features.length<1)return null;var fo=R2(lo);return fo.coordinates.length===1&&(fo.coordinates=fo.coordinates[0],fo.type="Polygon"),tt(fo)},F.containsNumber=$p,F.convertArea=Df,F.convertDistance=Hf,F.convertLength=Hf,F.convex=Tm,F.coordAll=jp,F.coordEach=rp,F.coordReduce=ip,F.createBins=NS,F.degrees2radians=Bf,F.degreesToRadians=Bf,F.destination=$y,F.difference=function(nt,at){var wt=_p(nt),lo=_p(at),fo=nt.properties||{},vo=m$.difference(wt.coordinates,lo.coordinates);return vo.length===0?null:vo.length===1?yn(vo[0],fo):cf(vo,fo)},F.dissolve=function(nt,at){if(!kf(at=at||{}))throw new Error("options is invalid");var wt=at.propertyName;Ep(nt,"Polygon","dissolve");var lo=[];if(!at.propertyName)return A_(cf(m$.union.apply(null,nt.features.map(function(mf){return mf.geometry.coordinates}))));var fo={};vp(nt,function(mf){Object.prototype.hasOwnProperty.call(fo,mf.properties[wt])||(fo[mf.properties[wt]]=[]),fo[mf.properties[wt]].push(mf)});for(var vo=Object.keys(fo),ls=0;ls0&&(mf=yn(ff).geometry),sO(mf,bf),ff=bf.slice(0);wt.push(yn(ff,ls));break;case"MultiPolygon":ff=[[[]]];for(var wf=0;wf0&&(mf=cf(ff).geometry),lO(mf,bf),ff=bf.slice(0);wt.push(cf(ff,ls));break;default:throw new Error("geometry is invalid, must be Polygon or MultiPolygon")}}),wo(wt)},F.polygonTangents=function(nt,at){var wt,lo,fo,vo,ls=hp(nt),ff=hp(at),mf=qf(at),bf=0,Sf=null;switch(ls[0]>mf[0]&&ls[0]mf[1]&&ls[1] is required");if(typeof wt!="boolean")throw new Error(" must be a boolean");if(typeof lo!="boolean")throw new Error(" must be a boolean");lo===!1&&(nt=Iv(nt));var fo=[];switch(nt.type){case"GeometryCollection":return Ip(nt,function(vo){d$(vo,wt)}),nt;case"FeatureCollection":return vp(nt,function(vo){vp(d$(vo,wt),function(ls){fo.push(ls)})}),wo(fo)}return d$(nt,wt)},F.rhumbBearing=u$,F.rhumbDestination=Nw,F.rhumbDistance=Tb,F.round=_f,F.sample=function(nt,at){if(!nt)throw new Error("featurecollection is required");if(at==null)throw new Error("num is required");if(typeof at!="number")throw new Error("num must be a number");return wo(function(wt,lo){for(var fo,vo,ls=wt.slice(0),ff=wt.length,mf=ff-lo;ff-- >mf;)fo=ls[vo=Math.floor((ff+1)*Math.random())],ls[vo]=ls[ff],ls[ff]=fo;return ls.slice(mf)}(nt.features,at))},F.sector=function(nt,at,wt,lo,fo){if(!kf(fo=fo||{}))throw new Error("options is invalid");var vo=fo.properties;if(!nt)throw new Error("center is required");if(wt==null)throw new Error("bearing1 is required");if(lo==null)throw new Error("bearing2 is required");if(!at)throw new Error("radius is required");if(typeof fo!="object")throw new Error("options must be an object");if(Rw(wt)===Rw(lo))return kx(nt,at,fo);var ls=hp(nt),ff=Ky(nt,at,wt,lo,fo),mf=[[ls]];return rp(ff,function(bf){mf[0].push(bf)}),mf[0].push(ls),yn(mf,vo)},F.segmentEach=vg,F.segmentReduce=Dp,F.shortestPath=function(nt,at,wt){if(!kf(wt=wt||{}))throw new Error("options is invalid");var lo=wt.resolution,fo=wt.minDistance,vo=wt.obstacles||wo([]);if(!nt)throw new Error("start is required");if(!at)throw new Error("end is required");if(lo&&!Lf(lo)||lo<=0)throw new Error("options.resolution must be a number, greater than 0");if(fo)throw new Error("options.minDistance is not yet implemented");var ls=cp(nt),ff=cp(at);switch(nt=ot(ls),at=ot(ff),Mp(vo)){case"FeatureCollection":if(vo.features.length===0)return po([ls,ff]);break;case"Polygon":vo=wo([tt(_p(vo))]);break;default:throw new Error("invalid obstacles")}var mf=vo;mf.features.push(nt),mf.features.push(at);var bf=qf(AT(Tx(qf(mf)),1.15));lo||(lo=_m([bf[0],bf[1]],[bf[2],bf[1]],wt)/100),mf.features.pop(),mf.features.pop();for(var Sf=bf[0],wf=bf[1],If=bf[2],jf=bf[3],zf=lo/_m([Sf,wf],[If,wf],wt)*(If-Sf),Wf=lo/_m([Sf,wf],[Sf,jf],wt)*(jf-wf),Mf=If-Sf,np=jf-wf,pp=Math.floor(Mf/zf),Uf=Math.floor(np/Wf),tp=(Mf-pp*zf)/2,op=[],up=[],sp=[],Qp=[],Ap=1/0,rg=1/0,zp=jf-(np-Uf*Wf)/2,lg=0;zp>=wf;){for(var qp=[],Wp=[],Up=Sf+tp,ig=0;Up<=If;){var Xp=ot([Up,zp]),cg=ZC(Xp,vo);qp.push(cg?0:1),Wp.push(Up+"|"+zp);var Sp=_m(Xp,nt);!cg&&SpK.getMaxZoom())&&(this._goalZoom=K._limitZoom(this._goalZoom)),this._wheelMousePosition=this._map.mouseEventToContainerPoint(q),clearTimeout(this._timeoutId),this._timeoutId=setTimeout(this._onWheelEnd.bind(this),200),W.DomEvent.preventDefault(q),W.DomEvent.stopPropagation(q)},_onWheelEnd:function(q){this._isWheeling=!1,cancelAnimationFrame(this._zoomAnimationId),this._map.fire("zoomend")},_updateWheelZoom:function(){var q=this._map;if(!(!q.getCenter().equals(this._prevCenter)||q.getZoom()!=this._prevZoom)){this._zoom=q.getZoom()+(this._goalZoom-q.getZoom())*.3,this._zoom=Math.floor(this._zoom*100)/100;var K=this._wheelMousePosition.subtract(this._centerPoint);K.x===0&&K.y===0||(q.options.smoothWheelZoom==="center"?this._center=this._startLatLng:this._center=q.unproject(q.project(this._wheelStartLatLng,this._zoom).subtract(K),this._zoom),this._moved||(q._moveStart(!0,!1),this._moved=!0),q._move(this._center,this._zoom),this._prevCenter=q.getCenter(),this._prevZoom=q.getZoom(),q.fire("viewreset"),this._zoomAnimationId=requestAnimationFrame(this._updateWheelZoom.bind(this)))}}}),W.Map.addInitHook("addHandler","smoothWheelZoom",W.Map.SmoothWheelZoom)})})(Leaflet_SmoothWheelZoom);function an(F){return Array.isArray(F)?`[${F.map(W=>an(W)).join(",")}]`:typeof F=="number"?`${F}`:typeof F=="string"?`"${F}"`:typeof F=="object"&&F!==null?Object.keys(F).sort().map(W=>`${W}:${an(F[W])}`).join("|"):String(F)}async function bo(F){const W=await crypto.subtle.digest("SHA-1",new TextEncoder().encode(F));return Array.from(new Uint8Array(W)).map(q=>q.toString(16).padStart(2,"0")).join("")}async function Li(F,W=16){return(await bo(String(F))).slice(0,W)}async function To(F,W){return await Li(an(F),W)}var H;(function(F){F.assertEqual=X=>X;function W(X){}F.assertIs=W;function q(X){throw new Error}F.assertNever=q,F.arrayToEnum=X=>{const tt={};for(const rt of X)tt[rt]=rt;return tt},F.getValidEnumValues=X=>{const tt=F.objectKeys(X).filter(ot=>typeof X[X[ot]]!="number"),rt={};for(const ot of tt)rt[ot]=X[ot];return F.objectValues(rt)},F.objectValues=X=>F.objectKeys(X).map(function(tt){return X[tt]}),F.objectKeys=typeof Object.keys=="function"?X=>Object.keys(X):X=>{const tt=[];for(const rt in X)Object.prototype.hasOwnProperty.call(X,rt)&&tt.push(rt);return tt},F.find=(X,tt)=>{for(const rt of X)if(tt(rt))return rt},F.isInteger=typeof Number.isInteger=="function"?X=>Number.isInteger(X):X=>typeof X=="number"&&isFinite(X)&&Math.floor(X)===X;function K(X,tt=" | "){return X.map(rt=>typeof rt=="string"?`'${rt}'`:rt).join(tt)}F.joinValues=K,F.jsonStringifyReplacer=(X,tt)=>typeof tt=="bigint"?tt.toString():tt})(H||(H={}));var hn;(function(F){F.mergeShapes=(W,q)=>({...W,...q})})(hn||(hn={}));const O=H.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ut=F=>{switch(typeof F){case"undefined":return O.undefined;case"string":return O.string;case"number":return isNaN(F)?O.nan:O.number;case"boolean":return O.boolean;case"function":return O.function;case"bigint":return O.bigint;case"symbol":return O.symbol;case"object":return Array.isArray(F)?O.array:F===null?O.null:F.then&&typeof F.then=="function"&&F.catch&&typeof F.catch=="function"?O.promise:typeof Map<"u"&&F instanceof Map?O.map:typeof Set<"u"&&F instanceof Set?O.set:typeof Date<"u"&&F instanceof Date?O.date:O.object;default:return O.unknown}},R=H.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Mo=F=>JSON.stringify(F,null,2).replace(/"([^"]+)":/g,"$1:");class _t extends Error{constructor(W){super(),this.issues=[],this.addIssue=K=>{this.issues=[...this.issues,K]},this.addIssues=(K=[])=>{this.issues=[...this.issues,...K]};const q=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,q):this.__proto__=q,this.name="ZodError",this.issues=W}get errors(){return this.issues}format(W){const q=W||function(tt){return tt.message},K={_errors:[]},X=tt=>{for(const rt of tt.issues)if(rt.code==="invalid_union")rt.unionErrors.map(X);else if(rt.code==="invalid_return_type")X(rt.returnTypeError);else if(rt.code==="invalid_arguments")X(rt.argumentsError);else if(rt.path.length===0)K._errors.push(q(rt));else{let ot=K,ut=0;for(;utq.message){const q={},K=[];for(const X of this.issues)X.path.length>0?(q[X.path[0]]=q[X.path[0]]||[],q[X.path[0]].push(W(X))):K.push(W(X));return{formErrors:K,fieldErrors:q}}get formErrors(){return this.flatten()}}_t.create=F=>new _t(F);const _e=(F,W)=>{let q;switch(F.code){case R.invalid_type:F.received===O.undefined?q="Required":q=`Expected ${F.expected}, received ${F.received}`;break;case R.invalid_literal:q=`Invalid literal value, expected ${JSON.stringify(F.expected,H.jsonStringifyReplacer)}`;break;case R.unrecognized_keys:q=`Unrecognized key(s) in object: ${H.joinValues(F.keys,", ")}`;break;case R.invalid_union:q="Invalid input";break;case R.invalid_union_discriminator:q=`Invalid discriminator value. Expected ${H.joinValues(F.options)}`;break;case R.invalid_enum_value:q=`Invalid enum value. Expected ${H.joinValues(F.options)}, received '${F.received}'`;break;case R.invalid_arguments:q="Invalid function arguments";break;case R.invalid_return_type:q="Invalid function return type";break;case R.invalid_date:q="Invalid date";break;case R.invalid_string:typeof F.validation=="object"?"includes"in F.validation?(q=`Invalid input: must include "${F.validation.includes}"`,typeof F.validation.position=="number"&&(q=`${q} at one or more positions greater than or equal to ${F.validation.position}`)):"startsWith"in F.validation?q=`Invalid input: must start with "${F.validation.startsWith}"`:"endsWith"in F.validation?q=`Invalid input: must end with "${F.validation.endsWith}"`:H.assertNever(F.validation):F.validation!=="regex"?q=`Invalid ${F.validation}`:q="Invalid";break;case R.too_small:F.type==="array"?q=`Array must contain ${F.exact?"exactly":F.inclusive?"at least":"more than"} ${F.minimum} element(s)`:F.type==="string"?q=`String must contain ${F.exact?"exactly":F.inclusive?"at least":"over"} ${F.minimum} character(s)`:F.type==="number"?q=`Number must be ${F.exact?"exactly equal to ":F.inclusive?"greater than or equal to ":"greater than "}${F.minimum}`:F.type==="date"?q=`Date must be ${F.exact?"exactly equal to ":F.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(F.minimum))}`:q="Invalid input";break;case R.too_big:F.type==="array"?q=`Array must contain ${F.exact?"exactly":F.inclusive?"at most":"less than"} ${F.maximum} element(s)`:F.type==="string"?q=`String must contain ${F.exact?"exactly":F.inclusive?"at most":"under"} ${F.maximum} character(s)`:F.type==="number"?q=`Number must be ${F.exact?"exactly":F.inclusive?"less than or equal to":"less than"} ${F.maximum}`:F.type==="bigint"?q=`BigInt must be ${F.exact?"exactly":F.inclusive?"less than or equal to":"less than"} ${F.maximum}`:F.type==="date"?q=`Date must be ${F.exact?"exactly":F.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(F.maximum))}`:q="Invalid input";break;case R.custom:q="Invalid input";break;case R.invalid_intersection_types:q="Intersection results could not be merged";break;case R.not_multiple_of:q=`Number must be a multiple of ${F.multipleOf}`;break;case R.not_finite:q="Number must be finite";break;default:q=W.defaultError,H.assertNever(F)}return{message:q}};let Di=_e;function _o(F){Di=F}function dr(){return Di}const fr$2=F=>{const{data:W,path:q,errorMaps:K,issueData:X}=F,tt=[...q,...X.path||[]],rt={...X,path:tt};let ot="";const ut=K.filter(yn=>!!yn).slice().reverse();for(const yn of ut)ot=yn(rt,{data:W,defaultError:ot}).message;return{...X,path:tt,message:X.message||ot}},Eo=[];function N(F,W){const q=fr$2({issueData:W,data:F.data,path:F.path,errorMaps:[F.common.contextualErrorMap,F.schemaErrorMap,dr(),_e].filter(K=>!!K)});F.common.issues.push(q)}class ct{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(W,q){const K=[];for(const X of q){if(X.status==="aborted")return B;X.status==="dirty"&&W.dirty(),K.push(X.value)}return{status:W.value,value:K}}static async mergeObjectAsync(W,q){const K=[];for(const X of q)K.push({key:await X.key,value:await X.value});return ct.mergeObjectSync(W,K)}static mergeObjectSync(W,q){const K={};for(const X of q){const{key:tt,value:rt}=X;if(tt.status==="aborted"||rt.status==="aborted")return B;tt.status==="dirty"&&W.dirty(),rt.status==="dirty"&&W.dirty(),tt.value!=="__proto__"&&(typeof rt.value<"u"||X.alwaysSet)&&(K[tt.value]=rt.value)}return{status:W.value,value:K}}}const B=Object.freeze({status:"aborted"}),Bi=F=>({status:"dirty",value:F}),ft=F=>({status:"valid",value:F}),cn$1=F=>F.status==="aborted",ln=F=>F.status==="dirty",Ee=F=>F.status==="valid",pr=F=>typeof Promise<"u"&&F instanceof Promise;var L$1;(function(F){F.errToObj=W=>typeof W=="string"?{message:W}:W||{},F.toString=W=>typeof W=="string"?W:W==null?void 0:W.message})(L$1||(L$1={}));class Ct{constructor(W,q,K,X){this._cachedPath=[],this.parent=W,this.data=q,this._path=K,this._key=X}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Yn=(F,W)=>{if(Ee(W))return{success:!0,data:W.value};if(!F.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const q=new _t(F.common.issues);return this._error=q,this._error}}};function G(F){if(!F)return{};const{errorMap:W,invalid_type_error:q,required_error:K,description:X}=F;if(W&&(q||K))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return W?{errorMap:W,description:X}:{errorMap:(tt,rt)=>tt.code!=="invalid_type"?{message:rt.defaultError}:typeof rt.data>"u"?{message:K??rt.defaultError}:{message:q??rt.defaultError},description:X}}class U{constructor(W){this.spa=this.safeParseAsync,this._def=W,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(W){return Ut(W.data)}_getOrReturnCtx(W,q){return q||{common:W.parent.common,data:W.data,parsedType:Ut(W.data),schemaErrorMap:this._def.errorMap,path:W.path,parent:W.parent}}_processInputParams(W){return{status:new ct,ctx:{common:W.parent.common,data:W.data,parsedType:Ut(W.data),schemaErrorMap:this._def.errorMap,path:W.path,parent:W.parent}}}_parseSync(W){const q=this._parse(W);if(pr(q))throw new Error("Synchronous parse encountered promise.");return q}_parseAsync(W){const q=this._parse(W);return Promise.resolve(q)}parse(W,q){const K=this.safeParse(W,q);if(K.success)return K.data;throw K.error}safeParse(W,q){var K;const X={common:{issues:[],async:(K=q==null?void 0:q.async)!==null&&K!==void 0?K:!1,contextualErrorMap:q==null?void 0:q.errorMap},path:(q==null?void 0:q.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:W,parsedType:Ut(W)},tt=this._parseSync({data:W,path:X.path,parent:X});return Yn(X,tt)}async parseAsync(W,q){const K=await this.safeParseAsync(W,q);if(K.success)return K.data;throw K.error}async safeParseAsync(W,q){const K={common:{issues:[],contextualErrorMap:q==null?void 0:q.errorMap,async:!0},path:(q==null?void 0:q.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:W,parsedType:Ut(W)},X=this._parse({data:W,path:K.path,parent:K}),tt=await(pr(X)?X:Promise.resolve(X));return Yn(K,tt)}refine(W,q){const K=X=>typeof q=="string"||typeof q>"u"?{message:q}:typeof q=="function"?q(X):q;return this._refinement((X,tt)=>{const rt=W(X),ot=()=>tt.addIssue({code:R.custom,...K(X)});return typeof Promise<"u"&&rt instanceof Promise?rt.then(ut=>ut?!0:(ot(),!1)):rt?!0:(ot(),!1)})}refinement(W,q){return this._refinement((K,X)=>W(K)?!0:(X.addIssue(typeof q=="function"?q(K,X):q),!1))}_refinement(W){return new It({schema:this,typeName:D.ZodEffects,effect:{type:"refinement",refinement:W}})}superRefine(W){return this._refinement(W)}optional(){return Bt.create(this,this._def)}nullable(){return Yt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Et.create(this,this._def)}promise(){return he.create(this,this._def)}or(W){return Re.create([this,W],this._def)}and(W){return Ce.create(this,W,this._def)}transform(W){return new It({...G(this._def),schema:this,typeName:D.ZodEffects,effect:{type:"transform",transform:W}})}default(W){const q=typeof W=="function"?W:()=>W;return new Le({...G(this._def),innerType:this,defaultValue:q,typeName:D.ZodDefault})}brand(){return new Gi({typeName:D.ZodBranded,type:this,...G(this._def)})}catch(W){const q=typeof W=="function"?W:()=>W;return new vr({...G(this._def),innerType:this,catchValue:q,typeName:D.ZodCatch})}describe(W){const q=this.constructor;return new q({...this._def,description:W})}pipe(W){return Fe.create(this,W)}readonly(){return xr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Io=/^c[^\s-]{8,}$/i,So=/^[a-z][a-z0-9]*$/,Ao=/^[0-9A-HJKMNP-TV-Z]{26}$/,Ro=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Co=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Po="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Zr;const ko=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Oo=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,No=F=>F.precision?F.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${F.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${F.precision}}Z$`):F.precision===0?F.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):F.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Lo(F,W){return!!((W==="v4"||!W)&&ko.test(F)||(W==="v6"||!W)&&Oo.test(F))}class Tt extends U{_parse(W){if(this._def.coerce&&(W.data=String(W.data)),this._getType(W)!==O.string){const X=this._getOrReturnCtx(W);return N(X,{code:R.invalid_type,expected:O.string,received:X.parsedType}),B}const q=new ct;let K;for(const X of this._def.checks)if(X.kind==="min")W.data.lengthX.value&&(K=this._getOrReturnCtx(W,K),N(K,{code:R.too_big,maximum:X.value,type:"string",inclusive:!0,exact:!1,message:X.message}),q.dirty());else if(X.kind==="length"){const tt=W.data.length>X.value,rt=W.data.lengthW.test(X),{validation:q,code:R.invalid_string,...L$1.errToObj(K)})}_addCheck(W){return new Tt({...this._def,checks:[...this._def.checks,W]})}email(W){return this._addCheck({kind:"email",...L$1.errToObj(W)})}url(W){return this._addCheck({kind:"url",...L$1.errToObj(W)})}emoji(W){return this._addCheck({kind:"emoji",...L$1.errToObj(W)})}uuid(W){return this._addCheck({kind:"uuid",...L$1.errToObj(W)})}cuid(W){return this._addCheck({kind:"cuid",...L$1.errToObj(W)})}cuid2(W){return this._addCheck({kind:"cuid2",...L$1.errToObj(W)})}ulid(W){return this._addCheck({kind:"ulid",...L$1.errToObj(W)})}ip(W){return this._addCheck({kind:"ip",...L$1.errToObj(W)})}datetime(W){var q;return typeof W=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:W}):this._addCheck({kind:"datetime",precision:typeof(W==null?void 0:W.precision)>"u"?null:W==null?void 0:W.precision,offset:(q=W==null?void 0:W.offset)!==null&&q!==void 0?q:!1,...L$1.errToObj(W==null?void 0:W.message)})}regex(W,q){return this._addCheck({kind:"regex",regex:W,...L$1.errToObj(q)})}includes(W,q){return this._addCheck({kind:"includes",value:W,position:q==null?void 0:q.position,...L$1.errToObj(q==null?void 0:q.message)})}startsWith(W,q){return this._addCheck({kind:"startsWith",value:W,...L$1.errToObj(q)})}endsWith(W,q){return this._addCheck({kind:"endsWith",value:W,...L$1.errToObj(q)})}min(W,q){return this._addCheck({kind:"min",value:W,...L$1.errToObj(q)})}max(W,q){return this._addCheck({kind:"max",value:W,...L$1.errToObj(q)})}length(W,q){return this._addCheck({kind:"length",value:W,...L$1.errToObj(q)})}nonempty(W){return this.min(1,L$1.errToObj(W))}trim(){return new Tt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Tt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Tt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(W=>W.kind==="datetime")}get isEmail(){return!!this._def.checks.find(W=>W.kind==="email")}get isURL(){return!!this._def.checks.find(W=>W.kind==="url")}get isEmoji(){return!!this._def.checks.find(W=>W.kind==="emoji")}get isUUID(){return!!this._def.checks.find(W=>W.kind==="uuid")}get isCUID(){return!!this._def.checks.find(W=>W.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(W=>W.kind==="cuid2")}get isULID(){return!!this._def.checks.find(W=>W.kind==="ulid")}get isIP(){return!!this._def.checks.find(W=>W.kind==="ip")}get minLength(){let W=null;for(const q of this._def.checks)q.kind==="min"&&(W===null||q.value>W)&&(W=q.value);return W}get maxLength(){let W=null;for(const q of this._def.checks)q.kind==="max"&&(W===null||q.value{var W;return new Tt({checks:[],typeName:D.ZodString,coerce:(W=F==null?void 0:F.coerce)!==null&&W!==void 0?W:!1,...G(F)})};function Do(F,W){const q=(F.toString().split(".")[1]||"").length,K=(W.toString().split(".")[1]||"").length,X=q>K?q:K,tt=parseInt(F.toFixed(X).replace(".","")),rt=parseInt(W.toFixed(X).replace(".",""));return tt%rt/Math.pow(10,X)}class Wt extends U{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(W){if(this._def.coerce&&(W.data=Number(W.data)),this._getType(W)!==O.number){const X=this._getOrReturnCtx(W);return N(X,{code:R.invalid_type,expected:O.number,received:X.parsedType}),B}let q;const K=new ct;for(const X of this._def.checks)X.kind==="int"?H.isInteger(W.data)||(q=this._getOrReturnCtx(W,q),N(q,{code:R.invalid_type,expected:"integer",received:"float",message:X.message}),K.dirty()):X.kind==="min"?(X.inclusive?W.dataX.value:W.data>=X.value)&&(q=this._getOrReturnCtx(W,q),N(q,{code:R.too_big,maximum:X.value,type:"number",inclusive:X.inclusive,exact:!1,message:X.message}),K.dirty()):X.kind==="multipleOf"?Do(W.data,X.value)!==0&&(q=this._getOrReturnCtx(W,q),N(q,{code:R.not_multiple_of,multipleOf:X.value,message:X.message}),K.dirty()):X.kind==="finite"?Number.isFinite(W.data)||(q=this._getOrReturnCtx(W,q),N(q,{code:R.not_finite,message:X.message}),K.dirty()):H.assertNever(X);return{status:K.value,value:W.data}}gte(W,q){return this.setLimit("min",W,!0,L$1.toString(q))}gt(W,q){return this.setLimit("min",W,!1,L$1.toString(q))}lte(W,q){return this.setLimit("max",W,!0,L$1.toString(q))}lt(W,q){return this.setLimit("max",W,!1,L$1.toString(q))}setLimit(W,q,K,X){return new Wt({...this._def,checks:[...this._def.checks,{kind:W,value:q,inclusive:K,message:L$1.toString(X)}]})}_addCheck(W){return new Wt({...this._def,checks:[...this._def.checks,W]})}int(W){return this._addCheck({kind:"int",message:L$1.toString(W)})}positive(W){return this._addCheck({kind:"min",value:0,inclusive:!1,message:L$1.toString(W)})}negative(W){return this._addCheck({kind:"max",value:0,inclusive:!1,message:L$1.toString(W)})}nonpositive(W){return this._addCheck({kind:"max",value:0,inclusive:!0,message:L$1.toString(W)})}nonnegative(W){return this._addCheck({kind:"min",value:0,inclusive:!0,message:L$1.toString(W)})}multipleOf(W,q){return this._addCheck({kind:"multipleOf",value:W,message:L$1.toString(q)})}finite(W){return this._addCheck({kind:"finite",message:L$1.toString(W)})}safe(W){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:L$1.toString(W)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:L$1.toString(W)})}get minValue(){let W=null;for(const q of this._def.checks)q.kind==="min"&&(W===null||q.value>W)&&(W=q.value);return W}get maxValue(){let W=null;for(const q of this._def.checks)q.kind==="max"&&(W===null||q.valueW.kind==="int"||W.kind==="multipleOf"&&H.isInteger(W.value))}get isFinite(){let W=null,q=null;for(const K of this._def.checks){if(K.kind==="finite"||K.kind==="int"||K.kind==="multipleOf")return!0;K.kind==="min"?(q===null||K.value>q)&&(q=K.value):K.kind==="max"&&(W===null||K.valuenew Wt({checks:[],typeName:D.ZodNumber,coerce:(F==null?void 0:F.coerce)||!1,...G(F)});class Vt extends U{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(W){if(this._def.coerce&&(W.data=BigInt(W.data)),this._getType(W)!==O.bigint){const X=this._getOrReturnCtx(W);return N(X,{code:R.invalid_type,expected:O.bigint,received:X.parsedType}),B}let q;const K=new ct;for(const X of this._def.checks)X.kind==="min"?(X.inclusive?W.dataX.value:W.data>=X.value)&&(q=this._getOrReturnCtx(W,q),N(q,{code:R.too_big,type:"bigint",maximum:X.value,inclusive:X.inclusive,message:X.message}),K.dirty()):X.kind==="multipleOf"?W.data%X.value!==BigInt(0)&&(q=this._getOrReturnCtx(W,q),N(q,{code:R.not_multiple_of,multipleOf:X.value,message:X.message}),K.dirty()):H.assertNever(X);return{status:K.value,value:W.data}}gte(W,q){return this.setLimit("min",W,!0,L$1.toString(q))}gt(W,q){return this.setLimit("min",W,!1,L$1.toString(q))}lte(W,q){return this.setLimit("max",W,!0,L$1.toString(q))}lt(W,q){return this.setLimit("max",W,!1,L$1.toString(q))}setLimit(W,q,K,X){return new Vt({...this._def,checks:[...this._def.checks,{kind:W,value:q,inclusive:K,message:L$1.toString(X)}]})}_addCheck(W){return new Vt({...this._def,checks:[...this._def.checks,W]})}positive(W){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:L$1.toString(W)})}negative(W){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:L$1.toString(W)})}nonpositive(W){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:L$1.toString(W)})}nonnegative(W){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:L$1.toString(W)})}multipleOf(W,q){return this._addCheck({kind:"multipleOf",value:W,message:L$1.toString(q)})}get minValue(){let W=null;for(const q of this._def.checks)q.kind==="min"&&(W===null||q.value>W)&&(W=q.value);return W}get maxValue(){let W=null;for(const q of this._def.checks)q.kind==="max"&&(W===null||q.value{var W;return new Vt({checks:[],typeName:D.ZodBigInt,coerce:(W=F==null?void 0:F.coerce)!==null&&W!==void 0?W:!1,...G(F)})};class Ie extends U{_parse(W){if(this._def.coerce&&(W.data=!!W.data),this._getType(W)!==O.boolean){const q=this._getOrReturnCtx(W);return N(q,{code:R.invalid_type,expected:O.boolean,received:q.parsedType}),B}return ft(W.data)}}Ie.create=F=>new Ie({typeName:D.ZodBoolean,coerce:(F==null?void 0:F.coerce)||!1,...G(F)});class qt extends U{_parse(W){if(this._def.coerce&&(W.data=new Date(W.data)),this._getType(W)!==O.date){const X=this._getOrReturnCtx(W);return N(X,{code:R.invalid_type,expected:O.date,received:X.parsedType}),B}if(isNaN(W.data.getTime())){const X=this._getOrReturnCtx(W);return N(X,{code:R.invalid_date}),B}const q=new ct;let K;for(const X of this._def.checks)X.kind==="min"?W.data.getTime()X.value&&(K=this._getOrReturnCtx(W,K),N(K,{code:R.too_big,message:X.message,inclusive:!0,exact:!1,maximum:X.value,type:"date"}),q.dirty()):H.assertNever(X);return{status:q.value,value:new Date(W.data.getTime())}}_addCheck(W){return new qt({...this._def,checks:[...this._def.checks,W]})}min(W,q){return this._addCheck({kind:"min",value:W.getTime(),message:L$1.toString(q)})}max(W,q){return this._addCheck({kind:"max",value:W.getTime(),message:L$1.toString(q)})}get minDate(){let W=null;for(const q of this._def.checks)q.kind==="min"&&(W===null||q.value>W)&&(W=q.value);return W!=null?new Date(W):null}get maxDate(){let W=null;for(const q of this._def.checks)q.kind==="max"&&(W===null||q.valuenew qt({checks:[],coerce:(F==null?void 0:F.coerce)||!1,typeName:D.ZodDate,...G(F)});class gr extends U{_parse(W){if(this._getType(W)!==O.symbol){const q=this._getOrReturnCtx(W);return N(q,{code:R.invalid_type,expected:O.symbol,received:q.parsedType}),B}return ft(W.data)}}gr.create=F=>new gr({typeName:D.ZodSymbol,...G(F)});class Se extends U{_parse(W){if(this._getType(W)!==O.undefined){const q=this._getOrReturnCtx(W);return N(q,{code:R.invalid_type,expected:O.undefined,received:q.parsedType}),B}return ft(W.data)}}Se.create=F=>new Se({typeName:D.ZodUndefined,...G(F)});class Ae extends U{_parse(W){if(this._getType(W)!==O.null){const q=this._getOrReturnCtx(W);return N(q,{code:R.invalid_type,expected:O.null,received:q.parsedType}),B}return ft(W.data)}}Ae.create=F=>new Ae({typeName:D.ZodNull,...G(F)});class ae extends U{constructor(){super(...arguments),this._any=!0}_parse(W){return ft(W.data)}}ae.create=F=>new ae({typeName:D.ZodAny,...G(F)});class Xt extends U{constructor(){super(...arguments),this._unknown=!0}_parse(W){return ft(W.data)}}Xt.create=F=>new Xt({typeName:D.ZodUnknown,...G(F)});class Gt extends U{_parse(W){const q=this._getOrReturnCtx(W);return N(q,{code:R.invalid_type,expected:O.never,received:q.parsedType}),B}}Gt.create=F=>new Gt({typeName:D.ZodNever,...G(F)});class mr extends U{_parse(W){if(this._getType(W)!==O.undefined){const q=this._getOrReturnCtx(W);return N(q,{code:R.invalid_type,expected:O.void,received:q.parsedType}),B}return ft(W.data)}}mr.create=F=>new mr({typeName:D.ZodVoid,...G(F)});class Et extends U{_parse(W){const{ctx:q,status:K}=this._processInputParams(W),X=this._def;if(q.parsedType!==O.array)return N(q,{code:R.invalid_type,expected:O.array,received:q.parsedType}),B;if(X.exactLength!==null){const rt=q.data.length>X.exactLength.value,ot=q.data.lengthX.maxLength.value&&(N(q,{code:R.too_big,maximum:X.maxLength.value,type:"array",inclusive:!0,exact:!1,message:X.maxLength.message}),K.dirty()),q.common.async)return Promise.all([...q.data].map((rt,ot)=>X.type._parseAsync(new Ct(q,rt,q.path,ot)))).then(rt=>ct.mergeArray(K,rt));const tt=[...q.data].map((rt,ot)=>X.type._parseSync(new Ct(q,rt,q.path,ot)));return ct.mergeArray(K,tt)}get element(){return this._def.type}min(W,q){return new Et({...this._def,minLength:{value:W,message:L$1.toString(q)}})}max(W,q){return new Et({...this._def,maxLength:{value:W,message:L$1.toString(q)}})}length(W,q){return new Et({...this._def,exactLength:{value:W,message:L$1.toString(q)}})}nonempty(W){return this.min(1,W)}}Et.create=(F,W)=>new Et({type:F,minLength:null,maxLength:null,exactLength:null,typeName:D.ZodArray,...G(W)});function ee(F){if(F instanceof Q){const W={};for(const q in F.shape){const K=F.shape[q];W[q]=Bt.create(ee(K))}return new Q({...F._def,shape:()=>W})}else return F instanceof Et?new Et({...F._def,type:ee(F.element)}):F instanceof Bt?Bt.create(ee(F.unwrap())):F instanceof Yt?Yt.create(ee(F.unwrap())):F instanceof Pt?Pt.create(F.items.map(W=>ee(W))):F}class Q extends U{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const W=this._def.shape(),q=H.objectKeys(W);return this._cached={shape:W,keys:q}}_parse(W){if(this._getType(W)!==O.object){const ut=this._getOrReturnCtx(W);return N(ut,{code:R.invalid_type,expected:O.object,received:ut.parsedType}),B}const{status:q,ctx:K}=this._processInputParams(W),{shape:X,keys:tt}=this._getCached(),rt=[];if(!(this._def.catchall instanceof Gt&&this._def.unknownKeys==="strip"))for(const ut in K.data)tt.includes(ut)||rt.push(ut);const ot=[];for(const ut of tt){const yn=X[ut],uo=K.data[ut];ot.push({key:{status:"valid",value:ut},value:yn._parse(new Ct(K,uo,K.path,ut)),alwaysSet:ut in K.data})}if(this._def.catchall instanceof Gt){const ut=this._def.unknownKeys;if(ut==="passthrough")for(const yn of rt)ot.push({key:{status:"valid",value:yn},value:{status:"valid",value:K.data[yn]}});else if(ut==="strict")rt.length>0&&(N(K,{code:R.unrecognized_keys,keys:rt}),q.dirty());else if(ut!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const ut=this._def.catchall;for(const yn of rt){const uo=K.data[yn];ot.push({key:{status:"valid",value:yn},value:ut._parse(new Ct(K,uo,K.path,yn)),alwaysSet:yn in K.data})}}return K.common.async?Promise.resolve().then(async()=>{const ut=[];for(const yn of ot){const uo=await yn.key;ut.push({key:uo,value:await yn.value,alwaysSet:yn.alwaysSet})}return ut}).then(ut=>ct.mergeObjectSync(q,ut)):ct.mergeObjectSync(q,ot)}get shape(){return this._def.shape()}strict(W){return L$1.errToObj,new Q({...this._def,unknownKeys:"strict",...W!==void 0?{errorMap:(q,K)=>{var X,tt,rt,ot;const ut=(rt=(tt=(X=this._def).errorMap)===null||tt===void 0?void 0:tt.call(X,q,K).message)!==null&&rt!==void 0?rt:K.defaultError;return q.code==="unrecognized_keys"?{message:(ot=L$1.errToObj(W).message)!==null&&ot!==void 0?ot:ut}:{message:ut}}}:{}})}strip(){return new Q({...this._def,unknownKeys:"strip"})}passthrough(){return new Q({...this._def,unknownKeys:"passthrough"})}extend(W){return new Q({...this._def,shape:()=>({...this._def.shape(),...W})})}merge(W){return new Q({unknownKeys:W._def.unknownKeys,catchall:W._def.catchall,shape:()=>({...this._def.shape(),...W._def.shape()}),typeName:D.ZodObject})}setKey(W,q){return this.augment({[W]:q})}catchall(W){return new Q({...this._def,catchall:W})}pick(W){const q={};return H.objectKeys(W).forEach(K=>{W[K]&&this.shape[K]&&(q[K]=this.shape[K])}),new Q({...this._def,shape:()=>q})}omit(W){const q={};return H.objectKeys(this.shape).forEach(K=>{W[K]||(q[K]=this.shape[K])}),new Q({...this._def,shape:()=>q})}deepPartial(){return ee(this)}partial(W){const q={};return H.objectKeys(this.shape).forEach(K=>{const X=this.shape[K];W&&!W[K]?q[K]=X:q[K]=X.optional()}),new Q({...this._def,shape:()=>q})}required(W){const q={};return H.objectKeys(this.shape).forEach(K=>{if(W&&!W[K])q[K]=this.shape[K];else{let X=this.shape[K];for(;X instanceof Bt;)X=X._def.innerType;q[K]=X}}),new Q({...this._def,shape:()=>q})}keyof(){return ji(H.objectKeys(this.shape))}}Q.create=(F,W)=>new Q({shape:()=>F,unknownKeys:"strip",catchall:Gt.create(),typeName:D.ZodObject,...G(W)});Q.strictCreate=(F,W)=>new Q({shape:()=>F,unknownKeys:"strict",catchall:Gt.create(),typeName:D.ZodObject,...G(W)});Q.lazycreate=(F,W)=>new Q({shape:F,unknownKeys:"strip",catchall:Gt.create(),typeName:D.ZodObject,...G(W)});class Re extends U{_parse(W){const{ctx:q}=this._processInputParams(W),K=this._def.options;function X(tt){for(const ot of tt)if(ot.result.status==="valid")return ot.result;for(const ot of tt)if(ot.result.status==="dirty")return q.common.issues.push(...ot.ctx.common.issues),ot.result;const rt=tt.map(ot=>new _t(ot.ctx.common.issues));return N(q,{code:R.invalid_union,unionErrors:rt}),B}if(q.common.async)return Promise.all(K.map(async tt=>{const rt={...q,common:{...q.common,issues:[]},parent:null};return{result:await tt._parseAsync({data:q.data,path:q.path,parent:rt}),ctx:rt}})).then(X);{let tt;const rt=[];for(const ut of K){const yn={...q,common:{...q.common,issues:[]},parent:null},uo=ut._parseSync({data:q.data,path:q.path,parent:yn});if(uo.status==="valid")return uo;uo.status==="dirty"&&!tt&&(tt={result:uo,ctx:yn}),yn.common.issues.length&&rt.push(yn.common.issues)}if(tt)return q.common.issues.push(...tt.ctx.common.issues),tt.result;const ot=rt.map(ut=>new _t(ut));return N(q,{code:R.invalid_union,unionErrors:ot}),B}}get options(){return this._def.options}}Re.create=(F,W)=>new Re({options:F,typeName:D.ZodUnion,...G(W)});const or=F=>F instanceof ke?or(F.schema):F instanceof It?or(F.innerType()):F instanceof Oe?[F.value]:F instanceof zt?F.options:F instanceof Ne?Object.keys(F.enum):F instanceof Le?or(F._def.innerType):F instanceof Se?[void 0]:F instanceof Ae?[null]:null;class kr extends U{_parse(W){const{ctx:q}=this._processInputParams(W);if(q.parsedType!==O.object)return N(q,{code:R.invalid_type,expected:O.object,received:q.parsedType}),B;const K=this.discriminator,X=q.data[K],tt=this.optionsMap.get(X);return tt?q.common.async?tt._parseAsync({data:q.data,path:q.path,parent:q}):tt._parseSync({data:q.data,path:q.path,parent:q}):(N(q,{code:R.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[K]}),B)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(W,q,K){const X=new Map;for(const tt of q){const rt=or(tt.shape[W]);if(!rt)throw new Error(`A discriminator value for key \`${W}\` could not be extracted from all schema options`);for(const ot of rt){if(X.has(ot))throw new Error(`Discriminator property ${String(W)} has duplicate value ${String(ot)}`);X.set(ot,tt)}}return new kr({typeName:D.ZodDiscriminatedUnion,discriminator:W,options:q,optionsMap:X,...G(K)})}}function un(F,W){const q=Ut(F),K=Ut(W);if(F===W)return{valid:!0,data:F};if(q===O.object&&K===O.object){const X=H.objectKeys(W),tt=H.objectKeys(F).filter(ot=>X.indexOf(ot)!==-1),rt={...F,...W};for(const ot of tt){const ut=un(F[ot],W[ot]);if(!ut.valid)return{valid:!1};rt[ot]=ut.data}return{valid:!0,data:rt}}else if(q===O.array&&K===O.array){if(F.length!==W.length)return{valid:!1};const X=[];for(let tt=0;tt{if(cn$1(tt)||cn$1(rt))return B;const ot=un(tt.value,rt.value);return ot.valid?((ln(tt)||ln(rt))&&q.dirty(),{status:q.value,value:ot.data}):(N(K,{code:R.invalid_intersection_types}),B)};return K.common.async?Promise.all([this._def.left._parseAsync({data:K.data,path:K.path,parent:K}),this._def.right._parseAsync({data:K.data,path:K.path,parent:K})]).then(([tt,rt])=>X(tt,rt)):X(this._def.left._parseSync({data:K.data,path:K.path,parent:K}),this._def.right._parseSync({data:K.data,path:K.path,parent:K}))}}Ce.create=(F,W,q)=>new Ce({left:F,right:W,typeName:D.ZodIntersection,...G(q)});class Pt extends U{_parse(W){const{status:q,ctx:K}=this._processInputParams(W);if(K.parsedType!==O.array)return N(K,{code:R.invalid_type,expected:O.array,received:K.parsedType}),B;if(K.data.lengththis._def.items.length&&(N(K,{code:R.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q.dirty());const X=[...K.data].map((tt,rt)=>{const ot=this._def.items[rt]||this._def.rest;return ot?ot._parse(new Ct(K,tt,K.path,rt)):null}).filter(tt=>!!tt);return K.common.async?Promise.all(X).then(tt=>ct.mergeArray(q,tt)):ct.mergeArray(q,X)}get items(){return this._def.items}rest(W){return new Pt({...this._def,rest:W})}}Pt.create=(F,W)=>{if(!Array.isArray(F))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Pt({items:F,typeName:D.ZodTuple,rest:null,...G(W)})};class Pe extends U{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(W){const{status:q,ctx:K}=this._processInputParams(W);if(K.parsedType!==O.object)return N(K,{code:R.invalid_type,expected:O.object,received:K.parsedType}),B;const X=[],tt=this._def.keyType,rt=this._def.valueType;for(const ot in K.data)X.push({key:tt._parse(new Ct(K,ot,K.path,ot)),value:rt._parse(new Ct(K,K.data[ot],K.path,ot))});return K.common.async?ct.mergeObjectAsync(q,X):ct.mergeObjectSync(q,X)}get element(){return this._def.valueType}static create(W,q,K){return q instanceof U?new Pe({keyType:W,valueType:q,typeName:D.ZodRecord,...G(K)}):new Pe({keyType:Tt.create(),valueType:W,typeName:D.ZodRecord,...G(q)})}}class yr extends U{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(W){const{status:q,ctx:K}=this._processInputParams(W);if(K.parsedType!==O.map)return N(K,{code:R.invalid_type,expected:O.map,received:K.parsedType}),B;const X=this._def.keyType,tt=this._def.valueType,rt=[...K.data.entries()].map(([ot,ut],yn)=>({key:X._parse(new Ct(K,ot,K.path,[yn,"key"])),value:tt._parse(new Ct(K,ut,K.path,[yn,"value"]))}));if(K.common.async){const ot=new Map;return Promise.resolve().then(async()=>{for(const ut of rt){const yn=await ut.key,uo=await ut.value;if(yn.status==="aborted"||uo.status==="aborted")return B;(yn.status==="dirty"||uo.status==="dirty")&&q.dirty(),ot.set(yn.value,uo.value)}return{status:q.value,value:ot}})}else{const ot=new Map;for(const ut of rt){const yn=ut.key,uo=ut.value;if(yn.status==="aborted"||uo.status==="aborted")return B;(yn.status==="dirty"||uo.status==="dirty")&&q.dirty(),ot.set(yn.value,uo.value)}return{status:q.value,value:ot}}}}yr.create=(F,W,q)=>new yr({valueType:W,keyType:F,typeName:D.ZodMap,...G(q)});class Ht extends U{_parse(W){const{status:q,ctx:K}=this._processInputParams(W);if(K.parsedType!==O.set)return N(K,{code:R.invalid_type,expected:O.set,received:K.parsedType}),B;const X=this._def;X.minSize!==null&&K.data.sizeX.maxSize.value&&(N(K,{code:R.too_big,maximum:X.maxSize.value,type:"set",inclusive:!0,exact:!1,message:X.maxSize.message}),q.dirty());const tt=this._def.valueType;function rt(ut){const yn=new Set;for(const uo of ut){if(uo.status==="aborted")return B;uo.status==="dirty"&&q.dirty(),yn.add(uo.value)}return{status:q.value,value:yn}}const ot=[...K.data.values()].map((ut,yn)=>tt._parse(new Ct(K,ut,K.path,yn)));return K.common.async?Promise.all(ot).then(ut=>rt(ut)):rt(ot)}min(W,q){return new Ht({...this._def,minSize:{value:W,message:L$1.toString(q)}})}max(W,q){return new Ht({...this._def,maxSize:{value:W,message:L$1.toString(q)}})}size(W,q){return this.min(W,q).max(W,q)}nonempty(W){return this.min(1,W)}}Ht.create=(F,W)=>new Ht({valueType:F,minSize:null,maxSize:null,typeName:D.ZodSet,...G(W)});class oe extends U{constructor(){super(...arguments),this.validate=this.implement}_parse(W){const{ctx:q}=this._processInputParams(W);if(q.parsedType!==O.function)return N(q,{code:R.invalid_type,expected:O.function,received:q.parsedType}),B;function K(ot,ut){return fr$2({data:ot,path:q.path,errorMaps:[q.common.contextualErrorMap,q.schemaErrorMap,dr(),_e].filter(yn=>!!yn),issueData:{code:R.invalid_arguments,argumentsError:ut}})}function X(ot,ut){return fr$2({data:ot,path:q.path,errorMaps:[q.common.contextualErrorMap,q.schemaErrorMap,dr(),_e].filter(yn=>!!yn),issueData:{code:R.invalid_return_type,returnTypeError:ut}})}const tt={errorMap:q.common.contextualErrorMap},rt=q.data;if(this._def.returns instanceof he){const ot=this;return ft(async function(...ut){const yn=new _t([]),uo=await ot._def.args.parseAsync(ut,tt).catch(mo=>{throw yn.addIssue(K(ut,mo)),yn}),po=await Reflect.apply(rt,this,uo);return await ot._def.returns._def.type.parseAsync(po,tt).catch(mo=>{throw yn.addIssue(X(po,mo)),yn})})}else{const ot=this;return ft(function(...ut){const yn=ot._def.args.safeParse(ut,tt);if(!yn.success)throw new _t([K(ut,yn.error)]);const uo=Reflect.apply(rt,this,yn.data),po=ot._def.returns.safeParse(uo,tt);if(!po.success)throw new _t([X(uo,po.error)]);return po.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...W){return new oe({...this._def,args:Pt.create(W).rest(Xt.create())})}returns(W){return new oe({...this._def,returns:W})}implement(W){return this.parse(W)}strictImplement(W){return this.parse(W)}static create(W,q,K){return new oe({args:W||Pt.create([]).rest(Xt.create()),returns:q||Xt.create(),typeName:D.ZodFunction,...G(K)})}}class ke extends U{get schema(){return this._def.getter()}_parse(W){const{ctx:q}=this._processInputParams(W);return this._def.getter()._parse({data:q.data,path:q.path,parent:q})}}ke.create=(F,W)=>new ke({getter:F,typeName:D.ZodLazy,...G(W)});class Oe extends U{_parse(W){if(W.data!==this._def.value){const q=this._getOrReturnCtx(W);return N(q,{received:q.data,code:R.invalid_literal,expected:this._def.value}),B}return{status:"valid",value:W.data}}get value(){return this._def.value}}Oe.create=(F,W)=>new Oe({value:F,typeName:D.ZodLiteral,...G(W)});function ji(F,W){return new zt({values:F,typeName:D.ZodEnum,...G(W)})}class zt extends U{_parse(W){if(typeof W.data!="string"){const q=this._getOrReturnCtx(W),K=this._def.values;return N(q,{expected:H.joinValues(K),received:q.parsedType,code:R.invalid_type}),B}if(this._def.values.indexOf(W.data)===-1){const q=this._getOrReturnCtx(W),K=this._def.values;return N(q,{received:q.data,code:R.invalid_enum_value,options:K}),B}return ft(W.data)}get options(){return this._def.values}get enum(){const W={};for(const q of this._def.values)W[q]=q;return W}get Values(){const W={};for(const q of this._def.values)W[q]=q;return W}get Enum(){const W={};for(const q of this._def.values)W[q]=q;return W}extract(W){return zt.create(W)}exclude(W){return zt.create(this.options.filter(q=>!W.includes(q)))}}zt.create=ji;class Ne extends U{_parse(W){const q=H.getValidEnumValues(this._def.values),K=this._getOrReturnCtx(W);if(K.parsedType!==O.string&&K.parsedType!==O.number){const X=H.objectValues(q);return N(K,{expected:H.joinValues(X),received:K.parsedType,code:R.invalid_type}),B}if(q.indexOf(W.data)===-1){const X=H.objectValues(q);return N(K,{received:K.data,code:R.invalid_enum_value,options:X}),B}return ft(W.data)}get enum(){return this._def.values}}Ne.create=(F,W)=>new Ne({values:F,typeName:D.ZodNativeEnum,...G(W)});class he extends U{unwrap(){return this._def.type}_parse(W){const{ctx:q}=this._processInputParams(W);if(q.parsedType!==O.promise&&q.common.async===!1)return N(q,{code:R.invalid_type,expected:O.promise,received:q.parsedType}),B;const K=q.parsedType===O.promise?q.data:Promise.resolve(q.data);return ft(K.then(X=>this._def.type.parseAsync(X,{path:q.path,errorMap:q.common.contextualErrorMap})))}}he.create=(F,W)=>new he({type:F,typeName:D.ZodPromise,...G(W)});class It extends U{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===D.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(W){const{status:q,ctx:K}=this._processInputParams(W),X=this._def.effect||null,tt={addIssue:rt=>{N(K,rt),rt.fatal?q.abort():q.dirty()},get path(){return K.path}};if(tt.addIssue=tt.addIssue.bind(tt),X.type==="preprocess"){const rt=X.transform(K.data,tt);return K.common.issues.length?{status:"dirty",value:K.data}:K.common.async?Promise.resolve(rt).then(ot=>this._def.schema._parseAsync({data:ot,path:K.path,parent:K})):this._def.schema._parseSync({data:rt,path:K.path,parent:K})}if(X.type==="refinement"){const rt=ot=>{const ut=X.refinement(ot,tt);if(K.common.async)return Promise.resolve(ut);if(ut instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return ot};if(K.common.async===!1){const ot=this._def.schema._parseSync({data:K.data,path:K.path,parent:K});return ot.status==="aborted"?B:(ot.status==="dirty"&&q.dirty(),rt(ot.value),{status:q.value,value:ot.value})}else return this._def.schema._parseAsync({data:K.data,path:K.path,parent:K}).then(ot=>ot.status==="aborted"?B:(ot.status==="dirty"&&q.dirty(),rt(ot.value).then(()=>({status:q.value,value:ot.value}))))}if(X.type==="transform")if(K.common.async===!1){const rt=this._def.schema._parseSync({data:K.data,path:K.path,parent:K});if(!Ee(rt))return rt;const ot=X.transform(rt.value,tt);if(ot instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:q.value,value:ot}}else return this._def.schema._parseAsync({data:K.data,path:K.path,parent:K}).then(rt=>Ee(rt)?Promise.resolve(X.transform(rt.value,tt)).then(ot=>({status:q.value,value:ot})):rt);H.assertNever(X)}}It.create=(F,W,q)=>new It({schema:F,typeName:D.ZodEffects,effect:W,...G(q)});It.createWithPreprocess=(F,W,q)=>new It({schema:W,effect:{type:"preprocess",transform:F},typeName:D.ZodEffects,...G(q)});class Bt extends U{_parse(W){return this._getType(W)===O.undefined?ft(void 0):this._def.innerType._parse(W)}unwrap(){return this._def.innerType}}Bt.create=(F,W)=>new Bt({innerType:F,typeName:D.ZodOptional,...G(W)});class Yt extends U{_parse(W){return this._getType(W)===O.null?ft(null):this._def.innerType._parse(W)}unwrap(){return this._def.innerType}}Yt.create=(F,W)=>new Yt({innerType:F,typeName:D.ZodNullable,...G(W)});class Le extends U{_parse(W){const{ctx:q}=this._processInputParams(W);let K=q.data;return q.parsedType===O.undefined&&(K=this._def.defaultValue()),this._def.innerType._parse({data:K,path:q.path,parent:q})}removeDefault(){return this._def.innerType}}Le.create=(F,W)=>new Le({innerType:F,typeName:D.ZodDefault,defaultValue:typeof W.default=="function"?W.default:()=>W.default,...G(W)});class vr extends U{_parse(W){const{ctx:q}=this._processInputParams(W),K={...q,common:{...q.common,issues:[]}},X=this._def.innerType._parse({data:K.data,path:K.path,parent:{...K}});return pr(X)?X.then(tt=>({status:"valid",value:tt.status==="valid"?tt.value:this._def.catchValue({get error(){return new _t(K.common.issues)},input:K.data})})):{status:"valid",value:X.status==="valid"?X.value:this._def.catchValue({get error(){return new _t(K.common.issues)},input:K.data})}}removeCatch(){return this._def.innerType}}vr.create=(F,W)=>new vr({innerType:F,typeName:D.ZodCatch,catchValue:typeof W.catch=="function"?W.catch:()=>W.catch,...G(W)});class wr extends U{_parse(W){if(this._getType(W)!==O.nan){const q=this._getOrReturnCtx(W);return N(q,{code:R.invalid_type,expected:O.nan,received:q.parsedType}),B}return{status:"valid",value:W.data}}}wr.create=F=>new wr({typeName:D.ZodNaN,...G(F)});const Bo=Symbol("zod_brand");class Gi extends U{_parse(W){const{ctx:q}=this._processInputParams(W),K=q.data;return this._def.type._parse({data:K,path:q.path,parent:q})}unwrap(){return this._def.type}}class Fe extends U{_parse(W){const{status:q,ctx:K}=this._processInputParams(W);if(K.common.async)return(async()=>{const X=await this._def.in._parseAsync({data:K.data,path:K.path,parent:K});return X.status==="aborted"?B:X.status==="dirty"?(q.dirty(),Bi(X.value)):this._def.out._parseAsync({data:X.value,path:K.path,parent:K})})();{const X=this._def.in._parseSync({data:K.data,path:K.path,parent:K});return X.status==="aborted"?B:X.status==="dirty"?(q.dirty(),{status:"dirty",value:X.value}):this._def.out._parseSync({data:X.value,path:K.path,parent:K})}}static create(W,q){return new Fe({in:W,out:q,typeName:D.ZodPipeline})}}class xr extends U{_parse(W){const q=this._def.innerType._parse(W);return Ee(q)&&(q.value=Object.freeze(q.value)),q}}xr.create=(F,W)=>new xr({innerType:F,typeName:D.ZodReadonly,...G(W)});const Fi=(F,W={},q)=>F?ae.create().superRefine((K,X)=>{var tt,rt;if(!F(K)){const ot=typeof W=="function"?W(K):typeof W=="string"?{message:W}:W,ut=(rt=(tt=ot.fatal)!==null&&tt!==void 0?tt:q)!==null&&rt!==void 0?rt:!0,yn=typeof ot=="string"?{message:ot}:ot;X.addIssue({code:"custom",...yn,fatal:ut})}}):ae.create(),jo={object:Q.lazycreate};var D;(function(F){F.ZodString="ZodString",F.ZodNumber="ZodNumber",F.ZodNaN="ZodNaN",F.ZodBigInt="ZodBigInt",F.ZodBoolean="ZodBoolean",F.ZodDate="ZodDate",F.ZodSymbol="ZodSymbol",F.ZodUndefined="ZodUndefined",F.ZodNull="ZodNull",F.ZodAny="ZodAny",F.ZodUnknown="ZodUnknown",F.ZodNever="ZodNever",F.ZodVoid="ZodVoid",F.ZodArray="ZodArray",F.ZodObject="ZodObject",F.ZodUnion="ZodUnion",F.ZodDiscriminatedUnion="ZodDiscriminatedUnion",F.ZodIntersection="ZodIntersection",F.ZodTuple="ZodTuple",F.ZodRecord="ZodRecord",F.ZodMap="ZodMap",F.ZodSet="ZodSet",F.ZodFunction="ZodFunction",F.ZodLazy="ZodLazy",F.ZodLiteral="ZodLiteral",F.ZodEnum="ZodEnum",F.ZodEffects="ZodEffects",F.ZodNativeEnum="ZodNativeEnum",F.ZodOptional="ZodOptional",F.ZodNullable="ZodNullable",F.ZodDefault="ZodDefault",F.ZodCatch="ZodCatch",F.ZodPromise="ZodPromise",F.ZodBranded="ZodBranded",F.ZodPipeline="ZodPipeline",F.ZodReadonly="ZodReadonly"})(D||(D={}));const Go=(F,W={message:`Input not instance of ${F.name}`})=>Fi(q=>q instanceof F,W),Ui=Tt.create,Wi=Wt.create,Fo=wr.create,Uo=Vt.create,Vi=Ie.create,Wo=qt.create,Vo=gr.create,zo=Se.create,Zo=Ae.create,$o=ae.create,Xo=Xt.create,qo=Gt.create,Ho=mr.create,Yo=Et.create,Jo=Q.create,Ko=Q.strictCreate,Qo=Re.create,ta=kr.create,ea=Ce.create,ra=Pt.create,na=Pe.create,ia=yr.create,sa=Ht.create,oa=oe.create,aa=ke.create,ha=Oe.create,ca=zt.create,la=Ne.create,ua=he.create,Jn=It.create,da=Bt.create,fa=Yt.create,pa=It.createWithPreprocess,ga=Fe.create,ma=()=>Ui().optional(),ya=()=>Wi().optional(),va=()=>Vi().optional(),wa={string:F=>Tt.create({...F,coerce:!0}),number:F=>Wt.create({...F,coerce:!0}),boolean:F=>Ie.create({...F,coerce:!0}),bigint:F=>Vt.create({...F,coerce:!0}),date:F=>qt.create({...F,coerce:!0})},xa=B;var m=Object.freeze({__proto__:null,defaultErrorMap:_e,setErrorMap:_o,getErrorMap:dr,makeIssue:fr$2,EMPTY_PATH:Eo,addIssueToContext:N,ParseStatus:ct,INVALID:B,DIRTY:Bi,OK:ft,isAborted:cn$1,isDirty:ln,isValid:Ee,isAsync:pr,get util(){return H},get objectUtil(){return hn},ZodParsedType:O,getParsedType:Ut,ZodType:U,ZodString:Tt,ZodNumber:Wt,ZodBigInt:Vt,ZodBoolean:Ie,ZodDate:qt,ZodSymbol:gr,ZodUndefined:Se,ZodNull:Ae,ZodAny:ae,ZodUnknown:Xt,ZodNever:Gt,ZodVoid:mr,ZodArray:Et,ZodObject:Q,ZodUnion:Re,ZodDiscriminatedUnion:kr,ZodIntersection:Ce,ZodTuple:Pt,ZodRecord:Pe,ZodMap:yr,ZodSet:Ht,ZodFunction:oe,ZodLazy:ke,ZodLiteral:Oe,ZodEnum:zt,ZodNativeEnum:Ne,ZodPromise:he,ZodEffects:It,ZodTransformer:It,ZodOptional:Bt,ZodNullable:Yt,ZodDefault:Le,ZodCatch:vr,ZodNaN:wr,BRAND:Bo,ZodBranded:Gi,ZodPipeline:Fe,ZodReadonly:xr,custom:Fi,Schema:U,ZodSchema:U,late:jo,get ZodFirstPartyTypeKind(){return D},coerce:wa,any:$o,array:Yo,bigint:Uo,boolean:Vi,date:Wo,discriminatedUnion:ta,effect:Jn,enum:ca,function:oa,instanceof:Go,intersection:ea,lazy:aa,literal:ha,map:ia,nan:Fo,nativeEnum:la,never:qo,null:Zo,nullable:fa,number:Wi,object:Jo,oboolean:va,onumber:ya,optional:da,ostring:ma,pipeline:ga,preprocess:pa,promise:ua,record:na,set:sa,strictObject:Ko,string:Ui,symbol:Vo,transformer:Jn,tuple:ra,undefined:zo,union:Qo,unknown:Xo,void:Ho,NEVER:xa,ZodIssueCode:R,quotelessJson:Mo,ZodError:_t});const Or=/^https?:\/\/library.stanford.edu\/iiif\/image-api\/1.1\/compliance.html#level(?[012])$/,zi=m.string().regex(Or),ba=zi,br="http://library.stanford.edu/iiif/image-api/1.1/context.json",Zi="http://iiif.io/api/image/1/context.json",$i=m.literal(br),Xi=m.object({"@context":$i,"@id":m.string().url(),profile:zi.optional(),width:m.number().int(),height:m.number().int(),scale_factors:m.number().array().optional(),tile_width:m.number().optional(),tile_height:m.number().optional()}),qi=m.object({width:m.number().int(),height:m.number().int()}),Hi=m.object({width:m.number().int(),height:m.number().int().optional(),scaleFactors:m.array(m.number().int())}),Nr=/^https?:\/\/iiif.io\/api\/image\/2.*level(?[012])(.json)?$/,Kn=m.string().regex(Nr),Ta=m.object({formats:m.string().array().optional(),maxArea:m.number().int().optional(),maxHeight:m.number().int().optional(),maxWidth:m.number().int().optional(),qualities:m.string().array().optional(),supports:m.string().array().optional()}),Tr=Kn.or(m.array(m.union([Kn,Ta,m.any()]))),Mr="http://iiif.io/api/image/2/context.json",Yi=m.literal(Mr).or(m.literal("https://iiif.io/api/image/2/context.json")),En=m.object({"@id":m.string().url(),"@type":m.literal("iiif:Image").optional(),"@context":Yi,protocol:m.literal("http://iiif.io/api/image"),width:m.number().int(),height:m.number().int(),profile:Tr,sizes:qi.array().optional(),tiles:Hi.array().optional()}),Ma=["level0","level1","level2"],In=m.object({id:m.string().url(),type:m.literal("ImageService3"),protocol:m.literal("http://iiif.io/api/image"),profile:m.enum(Ma),width:m.number().int(),height:m.number().int(),maxWidth:m.number().int().optional(),maxHeight:m.number().int().optional(),maxArea:m.number().int().optional(),sizes:qi.array().optional(),tiles:Hi.array().optional(),extraFeatures:m.string().array().optional()}),_a=m.object({"@id":m.string().url(),profile:ba.or(Tr),width:m.number().int().optional(),height:m.number().int().optional(),"@context":$i.or(m.literal("http://iiif.io/api/image/1/context.json")).or(Yi).optional()}),Ea=["level0","level1","level2"],Ia=["ImageService1","ImageService2","ImageService3"],Sa=m.object({id:m.string().url(),type:m.literal("ImageService2"),profile:Tr}).or(m.object({"@id":m.string().url(),"@type":m.literal("ImageService2"),profile:Tr})),Aa=m.object({id:m.string().url(),type:m.enum(Ia),profile:m.enum(Ea)}),Ra=m.union([Sa,Aa]),Ji=_a.or(Ra),Qn=m.string().or(m.number()).or(m.boolean()),Ki=Qn.or(Qn.array()),ti=m.object({"@language":m.string().optional(),"@value":Ki}),Jt=Ki.or(ti).or(ti.array()),Ca=m.object({label:Jt.optional(),value:Jt.optional()}),Qi=Ca.array(),Pa=m.object({width:m.number().int().optional(),height:m.number().int().optional(),service:Ji}),ka=m.object({resource:Pa}),ts=m.object({"@id":m.string().url(),"@type":m.literal("sc:Canvas"),width:m.number().int(),height:m.number().int(),images:ka.array().length(1),label:Jt.optional(),metadata:Qi.optional()}),Oa=m.object({canvases:ts.array().nonempty()}),es$2=m.object({"@id":m.string().url(),"@type":m.literal("sc:Manifest"),sequences:Oa.array().length(1),label:Jt.optional(),description:Jt.optional(),metadata:Qi.optional()}),ei=m.lazy(()=>m.object({"@id":m.string().url(),"@type":m.literal("sc:Manifest"),label:Jt.optional()})),dn=m.lazy(()=>m.object({"@id":m.string().url(),"@type":m.literal("sc:Collection"),label:Jt.optional(),manifests:ei.array().optional(),collections:dn.array().optional(),members:ei.or(dn).array().optional()})),Na=m.string().or(m.number()).or(m.boolean()),Kt=m.record(m.string(),Na.array()),La=m.object({label:Kt.optional(),value:Kt.optional()}),rs=La.array(),ri=m.object({type:m.literal("Image"),width:m.number().int().optional(),height:m.number().int().optional(),service:Ji.array()}),Da=m.object({type:m.literal("Annotation"),body:ri.or(ri.array().length(1))}),Ba=m.object({type:m.literal("AnnotationPage"),items:Da.array().length(1)}),ns=m.object({id:m.string().url(),type:m.literal("Canvas"),width:m.number().int(),height:m.number().int(),items:Ba.array().length(1),label:Kt.optional(),metadata:rs.optional()}),is=m.object({id:m.string().url(),type:m.literal("Manifest"),items:ns.array().nonempty(),label:Kt.optional(),description:Kt.optional(),metadata:rs.optional()}),ja$1=m.lazy(()=>m.object({id:m.string().url(),type:m.literal("Manifest"),label:Kt.optional()})),ss=m.lazy(()=>m.object({id:m.string().url(),type:m.literal("Collection"),label:Kt.optional(),items:ja$1.or(ss).array()})),os=Xi.or(En).or(In);ts.or(ns);const Ga=es$2.or(is);dn.or(ss);es$2.or(En);is.or(In);Ga.or(os);function as$1({width:F,height:W},q,K,X){const tt=K*q.originalWidth,rt=X*q.originalHeight,ot=K*q.originalWidth+q.width*q.scaleFactor>F?F-K*q.originalWidth:q.width*q.scaleFactor,ut=X*q.originalHeight+q.height*q.scaleFactor>W?W-X*q.originalHeight:q.height*q.scaleFactor;let yn=q.width,uo=q.height;return tt+q.width*q.scaleFactor>F&&(yn=Math.floor((F-tt+q.scaleFactor-1)/q.scaleFactor)),rt+q.height*q.scaleFactor>W&&(uo=Math.floor((W-rt+q.scaleFactor-1)/q.scaleFactor)),{region:{x:tt,y:rt,width:ot,height:ut},size:{width:yn,height:uo}}}function Fa({width:F,height:W},q=768){const K=Math.max(F,W)/q,X=Math.ceil(Math.log(K)/Math.log(2));return{scaleFactors:Array.from({length:X},(tt,rt)=>2**rt),width:q}}function Ua({width:F,height:W},q,K){const X=q.height||q.width,tt=q.width*K,rt=X*K;return{scaleFactor:K,width:q.width,height:X,originalWidth:tt,originalHeight:rt,columns:Math.ceil(F/tt),rows:Math.ceil(W/rt)}}function Wa(F,W){return W.map(q=>q.scaleFactors.map(K=>Ua(F,q,K))).flat()}function Va(F){return!!F.some(W=>W.width&&W.scaleFactors&&W.scaleFactors.length)}function za(F,W,q){if(!W||!Va(W))if(q)W=[Fa(F)];else throw new Error("Image does not support tiles or custom regions and sizes.");return Wa(F,W)}function Za(F,W,q="cover"){if(q==="cover"||q==="contain"){const K=W.width/F.width,X=W.height/F.height,tt=q==="cover"?Math.max(K,X):Math.min(K,X),rt=F.width*tt,ot=F.height*tt;return{width:rt,height:ot}}else throw new Error('Mode must be either "cover" or "contain"')}const $a=.8,Xa=1.5;function hs(F,W,q="cover",{sizes:K,tileZoomLevels:X,supportsAnyRegionAndSize:tt,maxWidth:rt,maxHeight:ot,maxArea:ut}){let{width:yn,height:uo}=Za(F,W,q);if(rt&&yn>rt&&(uo=uo/yn*rt,yn=rt),ot&&uo>ot&&(yn=yn/uo*ot,uo=ot),ut&&yn*uo>ut){const mo=uo/yn,wo=Math.floor(Math.sqrt(ut/mo))*mo;yn=Math.floor(wo)/mo,uo=yn*mo}const po=F.width/F.height;if(yn=Math.floor(yn),uo=Math.round(yn/po),K){let mo;for(const wo of K){const lf=wo.width/yn;if(lf>=$a&&lf<=Xa){mo=wo;break}}if(mo)return{size:mo}}if(tt)return{size:{width:Math.round(yn),height:Math.round(uo)}};if(X){const mo=F.width/yn,wo=X.map(({scaleFactor:_f},$f)=>({index:$f,scaleFactor:_f,diff:Math.abs(_f-mo)})).sort((_f,$f)=>_f.diff-$f.diff),lf=X[wo[0].index],yf=Math.ceil(F.width/(lf.scaleFactor*X[0].width)),cf=Math.ceil(F.height/(lf.scaleFactor*X[0].height)),vf=[];for(let _f=0;_f{var q;return(F==null?void 0:F.supports)&&((q=F==null?void 0:F.supports)==null?void 0:q.includes(W))})}}function Ya(F){if("type"in F&&F.type==="ImageService3")return 3;if("type"in F&&F.type==="ImageService2"||"@type"in F&&F["@type"]==="ImageService2"||"@context"in F&&F["@context"]===Mr)return 2;if("@context"in F&&(F["@context"]===br||F["@context"]===Zi))return 1;if("profile"in F){let W;return Array.isArray(F.profile)?W=F.profile[0]:W=F.profile,W.match(Or)?1:W.match(Nr)?2:3}else throw new Error("Unsupported IIIF Image Service")}function fn(F){if("type"in F){const W=F.profile;let q=!1;return W==="level0"||typeof W=="string"&&W.endsWith("level0.json")?"extraFeatures"in F&&(q=cs$1.every(K=>F.extraFeatures&&F.extraFeatures.includes(K))):q=!0,{maxWidth:"maxWidth"in F?F.maxWidth:void 0,maxHeight:"maxHeight"in F?F.maxHeight:void 0,maxArea:"maxArea"in F?F.maxArea:void 0,supportsAnyRegionAndSize:q}}else if(Array.isArray(F.profile)){let W=!1,q=Number.NEGATIVE_INFINITY,K=Number.NEGATIVE_INFINITY,X=Number.NEGATIVE_INFINITY;return F.profile.forEach(tt=>{if(typeof tt=="string"){const rt=ni(tt);rt&&(W=W||rt>=1)}else{const{maxWidth:rt,maxHeight:ot,maxArea:ut,supportsAnyRegionAndSize:yn}=Ha(tt);rt!==void 0&&(K=Math.max(rt,K)),ot!==void 0&&(q=Math.max(ot,q)),ut!==void 0&&(X=Math.max(ut,X)),W=W||yn}}),{maxWidth:K>=0?K:void 0,maxHeight:q>=0?q:void 0,maxArea:X>=0?X:void 0,supportsAnyRegionAndSize:W}}else if("profile"in F&&F.profile){const W=qa(F.profile),q=ni(F.profile);return W?{supportsAnyRegionAndSize:W>=1}:q?{supportsAnyRegionAndSize:q>=1}:{supportsAnyRegionAndSize:!1}}else throw new Error("Invalid Image")}const Ja="image";class Ka{constructor(W,q){if(this.embedded=!0,this.type=Ja,q){const K=W;let X,tt;if(Array.isArray(K.service)?K.service.forEach(rt=>{try{const ot=Ya(rt);(!tt||ot>tt)&&(tt=ot,X=rt)}catch{}}):X=K.service,!X)throw new Error("Unsupported IIIF Image Service");if("@id"in X)this.uri=X["@id"];else if("id"in X)this.uri=X.id;else throw new Error("Unsupported IIIF Image Service");if("type"in X&&X.type==="ImageService3")this.majorVersion=3;else if("type"in X&&X.type==="ImageService2"||"@type"in X&&X["@type"]==="ImageService2"||"@context"in X&&X["@context"]===Mr)this.majorVersion=2;else if("@context"in X&&(X["@context"]===br||X["@context"]===Zi))this.majorVersion=1;else if("profile"in X){let rt;Array.isArray(X.profile)?rt=X.profile[0]:rt=X.profile,rt.match(Or)?this.majorVersion=1:rt.match(Nr)?this.majorVersion=2:this.majorVersion=3}else throw new Error("Unsupported IIIF Image Service");if("profile"in X){const rt=fn(X);this.supportsAnyRegionAndSize=rt.supportsAnyRegionAndSize,this.maxWidth=rt.maxWidth,this.maxHeight=rt.maxHeight,this.maxArea=rt.maxArea}else this.supportsAnyRegionAndSize=!1}else{if("@id"in W)this.uri=W["@id"];else if("id"in W)this.uri=W.id;else throw new Error("Unsupported IIIF Image");if("type"in W&&W.type==="ImageService3")this.majorVersion=3;else if("@type"in W&&W["@type"]==="iiif:Image"||"@context"in W&&W["@context"]===Mr)this.majorVersion=2;else if("@context"in W&&W["@context"]===br)this.majorVersion=1;else throw new Error("Unsupported IIIF Image");if("profile"in W){const K=fn(W);this.supportsAnyRegionAndSize=K.supportsAnyRegionAndSize,this.maxWidth=K.maxWidth,this.maxHeight=K.maxHeight,this.maxArea=K.maxArea}else this.supportsAnyRegionAndSize=!1}if(W.width!==void 0)this.width=W.width;else if(q)this.width=q.width;else throw new Error("Width not present on either Canvas or Image Resource");if(W.height!==void 0)this.height=W.height;else if(q)this.height=q.height;else throw new Error("Height not present on either Canvas or Image Resource")}getImageUrl(W){const{region:q,size:K}=W;let X,tt,rt,ot,ut;q?(ut=`${q.x},${q.y},${q.width},${q.height}`,rt=q.height,ot=q.width):(ut="full",rt=this.height,ot=this.width);let yn;if(K){X=Math.round(K.width),tt=Math.round(K.height);const mo=String(X);let wo=String(tt);const lf=ot/rt,yf=tt*lf/lf;tt===Math.round(yf)&&(wo=""),yn=`${mo},${wo}`}else X=this.width,tt=this.height,yn=this.majorVersion===2?"full":"max";const uo=X*tt;if(this.maxWidth!==void 0&&X>this.maxWidth)throw new Error(`Width of requested image is too large: ${X} > ${this.maxWidth}`);if(this.maxHeight!==void 0&&tt>this.maxHeight)throw new Error(`Height of requested image is too large: ${tt} > ${this.maxHeight}`);if(this.maxArea!==void 0&&uo>this.maxArea)throw new Error(`Area of requested image is too large: ${uo} > ${this.maxArea}`);const po=this.majorVersion===1?"native":"default";return`${this.uri}/${ut}/${yn}/0/${po}.jpg`}getThumbnail(W,q="cover"){return hs({width:this.width,height:this.height},W,q,{supportsAnyRegionAndSize:this.supportsAnyRegionAndSize,maxWidth:this.maxWidth,maxHeight:this.maxHeight,maxArea:this.maxArea})}}let Qa=class xP extends Ka{constructor(W){super(W),this.embedded=!1;const q=fn(W);let K;"tiles"in W&&(K=W.tiles),this.tileZoomLevels=za({width:this.width,height:this.height},K,q.supportsAnyRegionAndSize),"sizes"in W&&(this.sizes=W.sizes)}static parse(W,q=null){let K;return q===1?K=Xi.parse(W):q===2?K=En.parse(W):q===3?K=In.parse(W):K=os.parse(W),new xP(K)}getIiifTile(W,q,K){return as$1({width:this.width,height:this.height},W,q,K)}getThumbnail(W,q="cover"){return hs({width:this.width,height:this.height},W,q,{supportsAnyRegionAndSize:this.supportsAnyRegionAndSize,sizes:this.sizes,tileZoomLevels:this.tileZoomLevels,maxWidth:this.maxWidth,maxHeight:this.maxHeight,maxArea:this.maxArea})}};const ii=m.record(m.string(),m.string().array());m.object({label:ii.optional(),value:ii.optional()});var gt=63710088e-1,us={centimeters:gt*100,centimetres:gt*100,degrees:gt/111325,feet:gt*3.28084,inches:gt*39.37,kilometers:gt/1e3,kilometres:gt/1e3,meters:gt,metres:gt,miles:gt/1609.344,millimeters:gt*1e3,millimetres:gt*1e3,nauticalmiles:gt/1852,radians:1,yards:gt*1.0936};function th(F,W,q){q===void 0&&(q={});var K={type:"Feature"};return(q.id===0||q.id)&&(K.id=q.id),q.bbox&&(K.bbox=q.bbox),K.properties=W||{},K.geometry=F,K}function eh(F,W,q){if(q===void 0&&(q={}),!F)throw new Error("coordinates is required");if(!Array.isArray(F))throw new Error("coordinates must be an Array");if(F.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!si(F[0])||!si(F[1]))throw new Error("coordinates must contain numbers");var K={type:"Point",coordinates:F};return th(K,W,q)}function rh(F,W){W===void 0&&(W="kilometers");var q=us[W];if(!q)throw new Error(W+" units is invalid");return F*q}function nh(F,W){W===void 0&&(W="kilometers");var q=us[W];if(!q)throw new Error(W+" units is invalid");return F/q}function pn(F){var W=F%(2*Math.PI);return W*180/Math.PI}function Mt(F){var W=F%360;return W*Math.PI/180}function si(F){return!isNaN(F)&&F!==null&&!Array.isArray(F)}function ce(F){if(!F)throw new Error("coord is required");if(!Array.isArray(F)){if(F.type==="Feature"&&F.geometry!==null&&F.geometry.type==="Point")return F.geometry.coordinates;if(F.type==="Point")return F.coordinates}if(Array.isArray(F)&&F.length>=2&&!Array.isArray(F[0])&&!Array.isArray(F[1]))return F;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function ih(F){return F.type==="Feature"?F.geometry:F}function ds(F,W,q){if(q===void 0&&(q={}),q.final===!0)return sh(F,W);var K=ce(F),X=ce(W),tt=Mt(K[0]),rt=Mt(X[0]),ot=Mt(K[1]),ut=Mt(X[1]),yn=Math.sin(rt-tt)*Math.cos(ut),uo=Math.cos(ot)*Math.sin(ut)-Math.sin(ot)*Math.cos(ut)*Math.cos(rt-tt);return pn(Math.atan2(yn,uo))}function sh(F,W){var q=ds(W,F);return q=(q+180)%360,q}function oh(F,W,q,K){K===void 0&&(K={});var X=ce(F),tt=Mt(X[0]),rt=Mt(X[1]),ot=Mt(q),ut=nh(W,K.units),yn=Math.asin(Math.sin(rt)*Math.cos(ut)+Math.cos(rt)*Math.sin(ut)*Math.cos(ot)),uo=tt+Math.atan2(Math.sin(ot)*Math.sin(ut)*Math.cos(rt),Math.cos(ut)-Math.sin(rt)*Math.sin(yn)),po=pn(uo),mo=pn(yn);return eh([po,mo],K.properties)}function Sn(F,W,q){q===void 0&&(q={});var K=ce(F),X=ce(W),tt=Mt(X[1]-K[1]),rt=Mt(X[0]-K[0]),ot=Mt(K[1]),ut=Mt(X[1]),yn=Math.pow(Math.sin(tt/2),2)+Math.pow(Math.sin(rt/2),2)*Math.cos(ot)*Math.cos(ut);return rh(2*Math.atan2(Math.sqrt(yn),Math.sqrt(1-yn)),q.units)}function _r(F,W){var q=Sn(F,W),K=ds(F,W),X=oh(F,q/2,K);return X}async function fs(F,W={}){let q;if(W.cache&&(q=await W.cache.match(F)),q||(q=await fetch(F,{signal:W.abortSignal}),W.cache&&W.cache.put(F,q.clone())),!q.ok)throw new Error(q.statusText);return q}async function ah(F,W={}){return await(await fs(F,W)).json()}async function hh(F,W={}){return await ah(`${F}/info.json`,W)}function ch(F,W){return new Promise((q,K)=>{const X=new Image;let tt=!1;X.addEventListener("load",()=>q(X)),X.addEventListener("error",async()=>{if(tt)K(new DOMException("Loading image aborted by user","AbortError"));else try{throw await fs(F,{abortSignal:W}),new Error("Image failed to load by setting Image src but downloaded successfully using fetch")}catch(rt){K(rt)}}),X.crossOrigin="anonymous",X.src=F,W&&W.addEventListener("abort",()=>{tt=!0,X.src=""})})}function ps(F,W=!1){switch(F.type){case"Polygon":return F.coordinates?{...F,coordinates:oi(F.coordinates,W)}:F;case"MultiPolygon":return F.coordinates?{...F,coordinates:F.coordinates.map(q=>oi(q,W))}:F;case"GeometryCollection":return{...F,geometries:F.geometries.map(q=>ps(q,W))};default:return F}}function oi(F,W){if(F.length===0)return F;const q=[];for(let K=0;K=Math.abs(ot)?q-ut+ot:ot-ut+q,q=ut}return q+K>=0!=!!W?F.slice().reverse():F}function mt(F){return Array.isArray(F)&&F.length===2&&typeof F[0]=="number"&&typeof F[1]=="number"}function At(F){return Array.isArray(F)&&F.every(mt)}function uh(F){return Array.isArray(F)&&F.every(mt)}function Rt(F){return Array.isArray(F)&&F.every(uh)}function gs(F){if(F=F.filter(function(W,q,K){return q===0||!Rn(W,K[q-1])}),F.length<2)throw new Error("LineString should contain at least 2 points");return F}function An(F){if(F=F.filter(function(W,q,K){return q===0||!Rn(W,K[q-1])}),fh(F)&&F.splice(-1),F.length<3)throw new Error("Ring should contain at least 3 points");return F}function dh(F){return F.map(W=>An(W))}function ze(F){return{type:"Point",coordinates:F}}function Ze(F){return{type:"LineString",coordinates:F}}function $e(F,W=!0){const q={type:"Polygon",coordinates:W?F.map(K=>[...K,K[0]]):F};return ps(q)}function fh(F){return Array.isArray(F)&&F.length>=2&&Rn(F[0],F[F.length-1])}function Rn(F,W){return F===W?!0:F==null||W==null?!1:F[0]==W[0]&&F[1]==W[1]}function Er(F,W){return[(W[0]-F[0])/2+F[0],(W[1]-F[1])/2+F[1]]}function ph(F,W,q){return[F[0]*q+W[0]*(1-q),F[1]*q+W[1]*(1-q)]}function jt(F,W){if(At(F)&&F.length==2)return jt(F[0],F[1]);if(mt(F)&&mt(W))return Math.sqrt((W[0]-F[0])**2+(W[1]-F[1])**2);throw new Error("Input type not supported")}function gh(F){return F*(Math.PI/180)}function Ot(F){return typeof F=="object"&&F!==null&&F.type==="Point"&&mt(F.coordinates)}function Nt(F){return typeof F=="object"&&F!==null&&F.type==="LineString"&&At(F.coordinates)}function Lt(F){return typeof F=="object"&&F!==null&&F.type==="Polygon"&&Array.isArray(F.coordinates)&&Rt(F.coordinates)}function mh(F){const W=typeof F=="object"&&F!==null,q=W&&"type"in F&&typeof F.type=="string"&&(F.type==="Point"||F.type==="LineString"||F.type==="Polygon"),K=W&&"coordinates"in F&&Array.isArray(F.coordinates);return q&&K}function ye(F){return F.coordinates}function ve(F){return F.coordinates}function we(F,W=!1){let q=F.coordinates;return q=dh(q),W?q.map(K=>[...K,K[0]]):q}function yh(F){if(Ot(F))return ye(F);if(Nt(F))return ve(F);if(Lt(F))return we(F);throw new Error("Geometry type not supported")}function ai(F){let W=Number.POSITIVE_INFINITY,q=Number.NEGATIVE_INFINITY;for(const K of F)W===void 0?K>=K&&(W=q=K):(W>K&&(W=K),q=W[0]&&W[2]>=F[0],K=F[3]>=W[1]&&W[3]>=F[1];return q&&K}function De(F){return[[F[0],F[1]],[F[2],F[1]],[F[2],F[3]],[F[0],F[3]]]}function wh(F){return[De(F)]}function ms$1(F){return[[F[0],F[1]],[F[2],F[3]]]}function xh(F){return jt(ms$1(F))}function bh(F){return jt(ms$1(st(F)))}function gn(F){return[(F[0]+F[2])/2,(F[1]+F[3])/2]}function Ir(F){return[F[2]-F[0],F[3]-F[1]]}function ys(F,W){const q=F[0]/W[0],K=F[1]/W[1];return Math.min(q,K)}function $r(F,W){return ys(Ir(F),Ir(W))}function Th(F){const W=parseInt(F.replace(/^#/,""),16),q=W>>16&255,K=W>>8&255,X=W&255;return[q,K,X]}function ci(F){return Th(F).map(W=>W/255)}function Mh(F,W){return!F||!W||F.size!==W.size?!1:[...F].every(q=>W.has(q))}function li(F,W){if(F!==void 0&&W!==void 0)return Math.max(F,W);if(F!==void 0)return F;if(W!==void 0)return W}function _h(F){let W;try{W=new URL(F)}catch{return!1}return W.protocol==="http:"||W.protocol==="https:"}function Eh([F,W]){const q=6378137*gh(F),K=q/F,X=180/Math.PI*Math.log(Math.tan(Math.PI/4+W*(Math.PI/180)/2))*K;return[q,X]}function ui([F,W]){const q=Math.PI*6378137,K=F/q*180;let X=W/q*180;return X=180/Math.PI*(2*Math.atan(Math.exp(X*Math.PI/180))-Math.PI/2),[K,X]}var Ih=Object.defineProperty,Sh=(F,W,q)=>W in F?Ih(F,W,{enumerable:!0,configurable:!0,writable:!0,value:q}):F[W]=q,Ah=(F,W,q)=>(Sh(F,typeof W!="symbol"?W+"":W,q),q),Cn=(F,W,q)=>{if(!W.has(F))throw TypeError("Cannot "+q)},St=(F,W,q)=>(Cn(F,W,"read from private field"),q?q.call(F):W.get(F)),Te=(F,W,q)=>{if(W.has(F))throw TypeError("Cannot add the same private member more than once");W instanceof WeakSet?W.add(F):W.set(F,q)},Xr=(F,W,q,K)=>(Cn(F,W,"write to private field"),K?K.call(F,q):W.set(F,q),q),le=(F,W,q)=>(Cn(F,W,"access private method"),q);function vs(F){if(F.__esModule)return F;var W=F.default;if(typeof W=="function"){var q=function K(){return this instanceof K?Reflect.construct(W,arguments,this.constructor):W.apply(this,arguments)};q.prototype=W.prototype}else q={};return Object.defineProperty(q,"__esModule",{value:!0}),Object.keys(F).forEach(function(K){var X=Object.getOwnPropertyDescriptor(F,K);Object.defineProperty(q,K,X.get?X:{enumerable:!0,get:function(){return F[K]}})}),q}var $$S={};const Rh=Object.prototype.toString;function Be(F){const W=Rh.call(F);return W.endsWith("Array]")&&!W.includes("Big")}const Ch=Object.freeze(Object.defineProperty({__proto__:null,isAnyArray:Be},Symbol.toStringTag,{value:"Module"})),Ph=vs(Ch);function kh(F){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Be(F))throw new TypeError("input must be an array");if(F.length===0)throw new TypeError("input must not be empty");var q=W.fromIndex,K=q===void 0?0:q,X=W.toIndex,tt=X===void 0?F.length:X;if(K<0||K>=F.length||!Number.isInteger(K))throw new Error("fromIndex must be a positive integer smaller than length");if(tt<=K||tt>F.length||!Number.isInteger(tt))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var rt=F[K],ot=K+1;otrt&&(rt=F[ot]);return rt}function Oh(F){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Be(F))throw new TypeError("input must be an array");if(F.length===0)throw new TypeError("input must not be empty");var q=W.fromIndex,K=q===void 0?0:q,X=W.toIndex,tt=X===void 0?F.length:X;if(K<0||K>=F.length||!Number.isInteger(K))throw new Error("fromIndex must be a positive integer smaller than length");if(tt<=K||tt>F.length||!Number.isInteger(tt))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var rt=F[K],ot=K+1;ot1&&arguments[1]!==void 0?arguments[1]:{};if(Be(F)){if(F.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var q;if(W.output!==void 0){if(!Be(W.output))throw new TypeError("output option must be an array if specified");q=W.output}else q=new Array(F.length);var K=Oh(F),X=kh(F);if(K===X)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var tt=W.min,rt=tt===void 0?W.autoMinMax?K:0:tt,ot=W.max,ut=ot===void 0?W.autoMinMax?X:1:ot;if(rt>=ut)throw new RangeError("min option must be smaller than max option");for(var yn=(ut-rt)/(X-K),uo=0;uo=0&&q?` ${fi(F,W-1)}`:fi(F,W)).padEnd(W)}function fi(F,W){let q=F.toString();if(q.length<=W)return q;let K=F.toFixed(W);if(K.length>W&&(K=F.toFixed(Math.max(0,W-(K.length-W)))),K.length<=W&&!K.startsWith("0.000")&&!K.startsWith("-0.000"))return K;let X=F.toExponential(W);return X.length>W&&(X=F.toExponential(Math.max(0,W-(X.length-W)))),X.slice(0)}function Fh(F,W){F.prototype.add=function(q){return typeof q=="number"?this.addS(q):this.addM(q)},F.prototype.addS=function(q){for(let K=0;K>q);return this},F.prototype.signPropagatingRightShiftM=function(q){if(q=W.checkMatrix(q),this.rows!==q.rows||this.columns!==q.columns)throw new RangeError("Matrices dimensions must be equal");for(let K=0;K>q.get(K,X));return this},F.signPropagatingRightShift=function(q,K){return new W(q).signPropagatingRightShift(K)},F.prototype.rightShift=function(q){return typeof q=="number"?this.rightShiftS(q):this.rightShiftM(q)},F.prototype.rightShiftS=function(q){for(let K=0;K>>q);return this},F.prototype.rightShiftM=function(q){if(q=W.checkMatrix(q),this.rows!==q.rows||this.columns!==q.columns)throw new RangeError("Matrices dimensions must be equal");for(let K=0;K>>q.get(K,X));return this},F.rightShift=function(q,K){return new W(q).rightShift(K)},F.prototype.zeroFillRightShift=F.prototype.rightShift,F.prototype.zeroFillRightShiftS=F.prototype.rightShiftS,F.prototype.zeroFillRightShiftM=F.prototype.rightShiftM,F.zeroFillRightShift=F.rightShift,F.prototype.not=function(){for(let q=0;qK)throw new RangeError("Row index out of range")}function bt(F,W,q){let K=q?F.columns:F.columns-1;if(W<0||W>K)throw new RangeError("Column index out of range")}function re(F,W){if(W.to1DArray&&(W=W.to1DArray()),W.length!==F.columns)throw new RangeError("vector size must be the same as the number of columns");return W}function ne(F,W){if(W.to1DArray&&(W=W.to1DArray()),W.length!==F.rows)throw new RangeError("vector size must be the same as the number of rows");return W}function Pn(F,W){if(!yt.isAnyArray(W))throw new TypeError("row indices must be an array");for(let q=0;q=F.rows)throw new RangeError("row indices are out of range")}function kn(F,W){if(!yt.isAnyArray(W))throw new TypeError("column indices must be an array");for(let q=0;q=F.columns)throw new RangeError("column indices are out of range")}function mn(F,W,q,K,X){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(qe("startRow",W),qe("endRow",q),qe("startColumn",K),qe("endColumn",X),W>q||K>X||W<0||W>=F.rows||q<0||q>=F.rows||K<0||K>=F.columns||X<0||X>=F.columns)throw new RangeError("Submatrix indices are out of range")}function Lr(F,W=0){let q=[];for(let K=0;K=tt)throw new RangeError("min must be smaller than max");let ot=tt-X,ut=new P(W,q);for(let yn=0;ynK?(tt=!0,K=q):(X=!1,tt=!0);W++}return X}isReducedEchelonForm(){let W=0,q=0,K=-1,X=!0,tt=!1;for(;WK?(tt=!0,K=q):(X=!1,tt=!0);for(let rt=q+1;rtW.get(X,K)&&(X=tt);if(W.get(X,K)===0)K++;else{W.swapRows(q,X);let tt=W.get(q,K);for(let rt=K;rt=0;)if(W.maxRow(X)===0)X--;else{let tt=0,rt=!1;for(;ttq[K]&&(q[K]=this.get(K,X));return q}case"column":{const q=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let K=0;Kq[X]&&(q[X]=this.get(K,X));return q}case void 0:{let q=this.get(0,0);for(let K=0;Kq&&(q=this.get(K,X));return q}default:throw new Error(`invalid option: ${W}`)}}maxIndex(){Qt(this);let W=this.get(0,0),q=[0,0];for(let K=0;KW&&(W=this.get(K,X),q[0]=K,q[1]=X);return q}min(W){if(this.isEmpty())return NaN;switch(W){case"row":{const q=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let K=0;Kq&&(q=this.get(W,K));return q}maxRowIndex(W){xt(this,W),Qt(this);let q=this.get(W,0),K=[W,0];for(let X=1;Xq&&(q=this.get(W,X),K[1]=X);return K}minRow(W){if(xt(this,W),this.isEmpty())return NaN;let q=this.get(W,0);for(let K=1;Kq&&(q=this.get(K,W));return q}maxColumnIndex(W){bt(this,W),Qt(this);let q=this.get(0,W),K=[0,W];for(let X=1;Xq&&(q=this.get(X,W),K[0]=X);return K}minColumn(W){if(bt(this,W),this.isEmpty())return NaN;let q=this.get(0,W);for(let K=1;K=K)throw new RangeError("min must be smaller than max");let X=new P(this.rows,this.columns);for(let tt=0;tt0&&di(rt,{min:q,max:K,output:rt}),X.setRow(tt,rt)}return X}scaleColumns(W={}){if(typeof W!="object")throw new TypeError("options must be an object");const{min:q=0,max:K=1}=W;if(!Number.isFinite(q))throw new TypeError("min must be a number");if(!Number.isFinite(K))throw new TypeError("max must be a number");if(q>=K)throw new RangeError("min must be smaller than max");let X=new P(this.rows,this.columns);for(let tt=0;ttK||q<0||q>=this.columns||K<0||K>=this.columns)throw new RangeError("Argument out of range");let X=new P(W.length,K-q+1);for(let tt=0;tt=this.rows)throw new RangeError(`Row index out of range: ${W[tt]}`);X.set(tt,rt-q,this.get(W[tt],rt))}return X}subMatrixColumn(W,q,K){if(q===void 0&&(q=0),K===void 0&&(K=this.rows-1),q>K||q<0||q>=this.rows||K<0||K>=this.rows)throw new RangeError("Argument out of range");let X=new P(K-q+1,W.length);for(let tt=0;tt=this.columns)throw new RangeError(`Column index out of range: ${W[tt]}`);X.set(rt-q,tt,this.get(rt,W[tt]))}return X}setSubMatrix(W,q,K){if(W=P.checkMatrix(W),W.isEmpty())return this;let X=q+W.rows-1,tt=K+W.columns-1;mn(this,q,X,K,tt);for(let rt=0;rttypeof W=="number")}j.random=j.rand;j.randomInt=j.randInt;j.diagonal=j.diag;j.prototype.diagonal=j.prototype.diag;j.identity=j.eye;j.prototype.negate=j.prototype.neg;j.prototype.tensorProduct=j.prototype.kroneckerProduct;var He,qr,Ye;let P=(Ye=class extends j{constructor(F,W){if(super(),Te(this,He),Ah(this,"data"),Ye.isMatrix(F))le(this,He,qr).call(this,F.rows,F.columns),Ye.copy(F,this);else if(Number.isInteger(F)&&F>=0)le(this,He,qr).call(this,F,W);else if(yt.isAnyArray(F)){const q=F;if(F=q.length,W=F?q[0].length:0,typeof W!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let K=0;K"u"&&(W=F,F=this.columns),bt(this,F,!0),W=ne(this,W);for(let q=0;q=0)for(let q=0;q=0)Xr(this,dt,new P(W,W));else if(Xr(this,dt,new P(W)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return St(this,dt).size}get rows(){return St(this,dt).rows}get columns(){return St(this,dt).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(W){return P.isMatrix(W)&&W.klassType==="SymmetricMatrix"}static zeros(W){return new this(W)}static ones(W){return new this(W).fill(1)}clone(){const W=new dI(this.diagonalSize);for(const[q,K,X]of this.upperRightEntries())W.set(q,K,X);return W}toMatrix(){return new P(this)}get(W,q){return St(this,dt).get(W,q)}set(W,q,K){return St(this,dt).set(W,q,K),St(this,dt).set(q,W,K),this}removeCross(W){return St(this,dt).removeRow(W),St(this,dt).removeColumn(W),this}addCross(W,q){q===void 0&&(q=W,W=this.diagonalSize);const K=q.slice();return K.splice(W,1),St(this,dt).addRow(W,K),St(this,dt).addColumn(W,q),this}applyMask(W){if(W.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const q=[];for(const[K,X]of W.entries())X||q.push(K);q.reverse();for(const K of q)this.removeCross(K);return this}toCompact(){const{diagonalSize:W}=this,q=new Array(W*(W+1)/2);for(let K=0,X=0,tt=0;tt=W&&(K=++X);return q}static fromCompact(W){const q=W.length,K=(Math.sqrt(8*q+1)-1)/2;if(!Number.isInteger(K))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(W)}`);const X=new dI(K);for(let tt=0,rt=0,ot=0;ot=K&&(tt=++rt);return X}*upperRightEntries(){for(let W=0,q=0;W=this.diagonalSize&&(q=++W)}}*upperRightValues(){for(let W=0,q=0;W=this.diagonalSize&&(q=++W)}};dt=new WeakMap;let Me=oc;Me.prototype.klassType="SymmetricMatrix";class Dr extends Me{static isDistanceMatrix(W){return Me.isSymmetricMatrix(W)&&W.klassSubType==="DistanceMatrix"}constructor(W){if(super(W),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set(W,q,K){return W===q&&(K=0),super.set(W,q,K)}addCross(W,q){return q===void 0&&(q=W,W=this.diagonalSize),q=q.slice(),q[W]=0,super.addCross(W,q)}toSymmetricMatrix(){return new Me(this)}clone(){const W=new Dr(this.diagonalSize);for(const[q,K,X]of this.upperRightEntries())q!==K&&W.set(q,K,X);return W}toCompact(){const{diagonalSize:W}=this,q=(W-1)*W/2,K=new Array(q);for(let X=1,tt=0,rt=0;rt=W&&(X=++tt+1);return K}static fromCompact(W){const q=W.length,K=(Math.sqrt(8*q+1)+1)/2;if(!Number.isInteger(K))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(W)}`);const X=new this(K);for(let tt=1,rt=0,ot=0;ot=K&&(tt=++rt+1);return X}}Dr.prototype.klassSubType="DistanceMatrix";class Ft extends j{constructor(W,q,K){super(),this.matrix=W,this.rows=q,this.columns=K}}class ac extends Ft{constructor(W,q){bt(W,q),super(W,W.rows,1),this.column=q}set(W,q,K){return this.matrix.set(W,this.column,K),this}get(W){return this.matrix.get(W,this.column)}}class hc extends Ft{constructor(W,q){kn(W,q),super(W,W.rows,q.length),this.columnIndices=q}set(W,q,K){return this.matrix.set(W,this.columnIndices[q],K),this}get(W,q){return this.matrix.get(W,this.columnIndices[q])}}class cc extends Ft{constructor(W){super(W,W.rows,W.columns)}set(W,q,K){return this.matrix.set(W,this.columns-q-1,K),this}get(W,q){return this.matrix.get(W,this.columns-q-1)}}class lc extends Ft{constructor(W){super(W,W.rows,W.columns)}set(W,q,K){return this.matrix.set(this.rows-W-1,q,K),this}get(W,q){return this.matrix.get(this.rows-W-1,q)}}class uc extends Ft{constructor(W,q){xt(W,q),super(W,1,W.columns),this.row=q}set(W,q,K){return this.matrix.set(this.row,q,K),this}get(W,q){return this.matrix.get(this.row,q)}}class dc extends Ft{constructor(W,q){Pn(W,q),super(W,q.length,W.columns),this.rowIndices=q}set(W,q,K){return this.matrix.set(this.rowIndices[W],q,K),this}get(W,q){return this.matrix.get(this.rowIndices[W],q)}}class ar extends Ft{constructor(W,q,K){Pn(W,q),kn(W,K),super(W,q.length,K.length),this.rowIndices=q,this.columnIndices=K}set(W,q,K){return this.matrix.set(this.rowIndices[W],this.columnIndices[q],K),this}get(W,q){return this.matrix.get(this.rowIndices[W],this.columnIndices[q])}}class fc extends Ft{constructor(W,q,K,X,tt){mn(W,q,K,X,tt),super(W,K-q+1,tt-X+1),this.startRow=q,this.startColumn=X}set(W,q,K){return this.matrix.set(this.startRow+W,this.startColumn+q,K),this}get(W,q){return this.matrix.get(this.startRow+W,this.startColumn+q)}}class pc extends Ft{constructor(W){super(W,W.columns,W.rows)}set(W,q,K){return this.matrix.set(q,W,K),this}get(W,q){return this.matrix.get(q,W)}}class bs extends j{constructor(W,q={}){const{rows:K=1}=q;if(W.length%K!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=K,this.columns=W.length/K,this.data=W}set(W,q,K){let X=this._calculateIndex(W,q);return this.data[X]=K,this}get(W,q){let K=this._calculateIndex(W,q);return this.data[K]}_calculateIndex(W,q){return W*this.columns+q}}class vt extends j{constructor(W){super(),this.data=W,this.rows=W.length,this.columns=W[0].length}set(W,q,K){return this.data[W][q]=K,this}get(W,q){return this.data[W][q]}}function gc(F,W){if(yt.isAnyArray(F))return F[0]&&yt.isAnyArray(F[0])?new vt(F):new bs(F,W);throw new Error("the argument is not an array")}class Br{constructor(W){W=vt.checkMatrix(W);let q=W.clone(),K=q.rows,X=q.columns,tt=new Float64Array(K),rt=1,ot,ut,yn,uo,po,mo,wo,lf,yf;for(ot=0;otMath.abs(lf[uo])&&(uo=ot);if(uo!==ut){for(yn=0;yn=0;ut--){for(ot=0;otrt?X.set(tt,rt,W.get(tt,rt)):tt===rt?X.set(tt,rt,1):X.set(tt,rt,0);return X}get upperTriangularMatrix(){let W=this.LU,q=W.rows,K=W.columns,X=new P(q,K);for(let tt=0;ttMath.abs(W)?(q=W/F,Math.abs(F)*Math.sqrt(1+q*q)):W!==0?(q=F/W,Math.abs(W)*Math.sqrt(1+q*q)):0}class On{constructor(W){W=vt.checkMatrix(W);let q=W.clone(),K=W.rows,X=W.columns,tt=new Float64Array(X),rt,ot,ut,yn;for(ut=0;ut=0;yn--){for(ut=0;ut=0;ot--){for(tt=0;tt=0;Df--)if(lf[Df]!==0){for(let Lf=Df+1;Lf=0;Df--){if(Df0;){let Df,Lf;for(Df=Af-2;Df>=-1&&Df!==-1;Df--){const kf=Number.MIN_VALUE+Hf*Math.abs(lf[Df]+Math.abs(lf[Df+1]));if(Math.abs(vf[Df])<=kf||Number.isNaN(vf[Df])){vf[Df]=0;break}}if(Df===Af-2)Lf=4;else{let kf;for(kf=Af-1;kf>=Df&&kf!==Df;kf--){let Nf=(kf!==Af?Math.abs(vf[kf]):0)+(kf!==Df+1?Math.abs(vf[kf-1]):0);if(Math.abs(lf[kf])<=Hf*Nf){lf[kf]=0;break}}kf===Df?Lf=3:kf===Af-1?Lf=1:(Lf=2,Df=kf)}switch(Df++,Lf){case 1:{let kf=vf[Af-2];vf[Af-2]=0;for(let Nf=Af-2;Nf>=Df;Nf--){let Yf=Dt(lf[Nf],kf),Gf=lf[Nf]/Yf,rp=kf/Yf;if(lf[Nf]=Yf,Nf!==Df&&(kf=-rp*vf[Nf-1],vf[Nf-1]=Gf*vf[Nf-1]),yn)for(let ip=0;ip=lf[Df+1]);){let kf=lf[Df];if(lf[Df]=lf[Df+1],lf[Df+1]=kf,yn&&Dfq&&tt.set(uo,po,W.get(uo,po)/this.s[po]);let rt=this.U,ot=rt.rows,ut=rt.columns,yn=new P(K,ot);for(let uo=0;uoW&&q++;return q}get diagonal(){return Array.from(this.s)}get threshold(){return Number.EPSILON/2*Math.max(this.m,this.n)*this.s[0]}get leftSingularVectors(){return this.U}get rightSingularVectors(){return this.V}get diagonalMatrix(){return P.diag(this.s)}};function mc(F,W=!1){return F=vt.checkMatrix(F),W?new de$2(F).inverse():Ts(F,P.eye(F.rows))}function Ts(F,W,q=!1){return F=vt.checkMatrix(F),W=vt.checkMatrix(W),q?new de$2(F).solve(W):F.isSquare()?new Br(F).solve(W):new On(F).solve(W)}function hr(F){if(F=P.checkMatrix(F),F.isSquare()){if(F.columns===0)return 1;let W,q,K,X;if(F.columns===2)return W=F.get(0,0),q=F.get(0,1),K=F.get(1,0),X=F.get(1,1),W*X-q*K;if(F.columns===3){let tt,rt,ot;return tt=new ar(F,[1,2],[1,2]),rt=new ar(F,[1,2],[0,2]),ot=new ar(F,[1,2],[0,1]),W=F.get(0,0),q=F.get(0,1),K=F.get(0,2),W*hr(tt)-q*hr(rt)+K*hr(ot)}else return new Br(F).determinant}else throw Error("determinant can only be calculated for a square matrix")}function yc(F,W){let q=[];for(let K=0;KX)return new Array(W.rows+1).fill(0);{let tt=W.addRow(q,[0]);for(let rt=0;rtW?tt[rt]=1/tt[rt]:tt[rt]=0;return X.mmul(P.diag(tt).mmul(K.transpose()))}function bc(F,W=F,q={}){F=new P(F);let K=!1;if(typeof W=="object"&&!P.isMatrix(W)&&!yt.isAnyArray(W)?(q=W,W=F,K=!0):W=new P(W),F.rows!==W.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:X=!0}=q;X&&(F=F.center("column"),K||(W=W.center("column")));const tt=F.transpose().mmul(W);for(let rt=0;rt0?X.set(tt,tt+1,q[tt]):q[tt]<0&&X.set(tt,tt-1,q[tt])}return X}}function Mc(F,W,q,K){let X,tt,rt,ot,ut,yn,uo,po;for(ut=0;ut0;ot--){for(po=0,rt=0,yn=0;yn0&&(tt=-tt),W[ot]=po*tt,rt=rt-X*tt,q[ot-1]=X-tt,ut=0;utyn)do{for(X=q[yn],po=(q[yn+1]-X)/(2*W[yn]),mo=Dt(po,1),po<0&&(mo=-mo),q[yn]=W[yn]/(po+mo),q[yn+1]=W[yn]*(po+mo),wo=q[yn+1],tt=X-q[yn],rt=yn+2;rt=yn;rt--)for(cf=yf,yf=lf,$f=_f,X=lf*W[rt],tt=lf*po,mo=Dt(po,W[rt]),W[rt+1]=_f*mo,_f=W[rt]/mo,lf=po/mo,po=lf*q[rt]-_f*X,q[rt+1]=tt+_f*(lf*X+_f*q[rt]),ut=0;utCf*Pf);q[yn]=q[yn]+wf,W[yn]=0}for(rt=0;rt=po;yn--)q[yn]=W.get(yn,po-1)/mo,ut+=q[yn]*q[yn];for(ot=Math.sqrt(ut),q[po]>0&&(ot=-ot),ut=ut-q[po]*ot,q[po]=q[po]-ot,uo=po;uo=po;yn--)rt+=q[yn]*W.get(yn,uo);for(rt=rt/ut,yn=po;yn<=tt;yn++)W.set(yn,uo,W.get(yn,uo)-rt*q[yn])}for(yn=0;yn<=tt;yn++){for(rt=0,uo=tt;uo>=po;uo--)rt+=q[uo]*W.get(yn,uo);for(rt=rt/ut,uo=po;uo<=tt;uo++)W.set(yn,uo,W.get(yn,uo)-rt*q[uo])}q[po]=mo*q[po],W.set(po,po-1,mo*ot)}}for(yn=0;yn=X+1;po--)if(W.get(po,po-1)!==0){for(yn=po+1;yn<=tt;yn++)q[yn]=W.get(yn,po-1);for(uo=po;uo<=tt;uo++){for(ot=0,yn=po;yn<=tt;yn++)ot+=q[yn]*K.get(yn,uo);for(ot=ot/q[po]/W.get(po,po-1),yn=po;yn<=tt;yn++)K.set(yn,uo,K.get(yn,uo)+ot*q[yn])}}}function Ic(F,W,q,K,X){let tt=F-1,rt=0,ot=F-1,ut=Number.EPSILON,yn=0,uo=0,po=0,mo=0,wo=0,lf=0,yf=0,cf=0,vf,_f,$f,wf,Pf,Cf,Af,Bf,Hf,Df,Lf,kf,Nf,Yf,Gf;for(vf=0;vfot)&&(q[vf]=X.get(vf,vf),W[vf]=0),_f=Math.max(vf-1,0);_f=rt;){for(wf=tt;wf>rt&&(lf=Math.abs(X.get(wf-1,wf-1))+Math.abs(X.get(wf,wf)),lf===0&&(lf=uo),!(Math.abs(X.get(wf,wf-1))=0){for(yf=po>=0?po+yf:po-yf,q[tt-1]=Bf+yf,q[tt]=q[tt-1],yf!==0&&(q[tt]=Bf-Af/yf),W[tt-1]=0,W[tt]=0,Bf=X.get(tt,tt-1),lf=Math.abs(Bf)+Math.abs(yf),po=Bf/lf,mo=yf/lf,wo=Math.sqrt(po*po+mo*mo),po=po/wo,mo=mo/wo,_f=tt-1;_f0)){for(lf=Math.sqrt(lf),Hf=wf&&(yf=X.get(Pf,Pf),wo=Bf-yf,lf=Hf-yf,po=(wo*lf-Af)/X.get(Pf+1,Pf)+X.get(Pf,Pf+1),mo=X.get(Pf+1,Pf+1)-yf-wo-lf,wo=X.get(Pf+2,Pf+1),lf=Math.abs(po)+Math.abs(mo)+Math.abs(wo),po=po/lf,mo=mo/lf,wo=wo/lf,!(Pf===wf||Math.abs(X.get(Pf,Pf-1))*(Math.abs(mo)+Math.abs(wo))Pf+2&&X.set(vf,vf-3,0);for($f=Pf;$f<=tt-1&&(Yf=$f!==tt-1,$f!==Pf&&(po=X.get($f,$f-1),mo=X.get($f+1,$f-1),wo=Yf?X.get($f+2,$f-1):0,Bf=Math.abs(po)+Math.abs(mo)+Math.abs(wo),Bf!==0&&(po=po/Bf,mo=mo/Bf,wo=wo/Bf)),Bf!==0);$f++)if(lf=Math.sqrt(po*po+mo*mo+wo*wo),po<0&&(lf=-lf),lf!==0){for($f!==Pf?X.set($f,$f-1,-lf*Bf):wf!==Pf&&X.set($f,$f-1,-X.get($f,$f-1)),po=po+lf,Bf=po/lf,Hf=mo/lf,yf=wo/lf,mo=mo/po,wo=wo/po,_f=$f;_f=0;tt--)if(po=q[tt],mo=W[tt],mo===0)for(wf=tt,X.set(tt,tt,1),vf=tt-1;vf>=0;vf--){for(Af=X.get(vf,vf)-po,wo=0,_f=wf;_f<=tt;_f++)wo=wo+X.get(vf,_f)*X.get(_f,tt);if(W[vf]<0)yf=Af,lf=wo;else if(wf=vf,W[vf]===0?X.set(vf,tt,Af!==0?-wo/Af:-wo/(ut*uo)):(Bf=X.get(vf,vf+1),Hf=X.get(vf+1,vf),mo=(q[vf]-po)*(q[vf]-po)+W[vf]*W[vf],Cf=(Bf*lf-yf*wo)/mo,X.set(vf,tt,Cf),X.set(vf+1,tt,Math.abs(Bf)>Math.abs(yf)?(-wo-Af*Cf)/Bf:(-lf-Hf*Cf)/yf)),Cf=Math.abs(X.get(vf,tt)),ut*Cf*Cf>1)for(_f=vf;_f<=tt;_f++)X.set(_f,tt,X.get(_f,tt)/Cf)}else if(mo<0)for(wf=tt-1,Math.abs(X.get(tt,tt-1))>Math.abs(X.get(tt-1,tt))?(X.set(tt-1,tt-1,mo/X.get(tt,tt-1)),X.set(tt-1,tt,-(X.get(tt,tt)-po)/X.get(tt,tt-1))):(Gf=Je(0,-X.get(tt-1,tt),X.get(tt-1,tt-1)-po,mo),X.set(tt-1,tt-1,Gf[0]),X.set(tt-1,tt,Gf[1])),X.set(tt,tt-1,0),X.set(tt,tt,1),vf=tt-2;vf>=0;vf--){for(Df=0,Lf=0,_f=wf;_f<=tt;_f++)Df=Df+X.get(vf,_f)*X.get(_f,tt-1),Lf=Lf+X.get(vf,_f)*X.get(_f,tt);if(Af=X.get(vf,vf)-po,W[vf]<0)yf=Af,wo=Df,lf=Lf;else if(wf=vf,W[vf]===0?(Gf=Je(-Df,-Lf,Af,mo),X.set(vf,tt-1,Gf[0]),X.set(vf,tt,Gf[1])):(Bf=X.get(vf,vf+1),Hf=X.get(vf+1,vf),kf=(q[vf]-po)*(q[vf]-po)+W[vf]*W[vf]-mo*mo,Nf=(q[vf]-po)*2*mo,kf===0&&Nf===0&&(kf=ut*uo*(Math.abs(Af)+Math.abs(mo)+Math.abs(Bf)+Math.abs(Hf)+Math.abs(yf))),Gf=Je(Bf*wo-yf*Df+mo*Lf,Bf*lf-yf*Lf-mo*Df,kf,Nf),X.set(vf,tt-1,Gf[0]),X.set(vf,tt,Gf[1]),Math.abs(Bf)>Math.abs(yf)+Math.abs(mo)?(X.set(vf+1,tt-1,(-Df-Af*X.get(vf,tt-1)+mo*X.get(vf,tt))/Bf),X.set(vf+1,tt,(-Lf-Af*X.get(vf,tt)-mo*X.get(vf,tt-1))/Bf)):(Gf=Je(-wo-Hf*X.get(vf,tt-1),-lf-Hf*X.get(vf,tt),yf,mo),X.set(vf+1,tt-1,Gf[0]),X.set(vf+1,tt,Gf[1]))),Cf=Math.max(Math.abs(X.get(vf,tt-1)),Math.abs(X.get(vf,tt))),ut*Cf*Cf>1)for(_f=vf;_f<=tt;_f++)X.set(_f,tt-1,X.get(_f,tt-1)/Cf),X.set(_f,tt,X.get(_f,tt)/Cf)}for(vf=0;vfot)for(_f=vf;_f=rt;_f--)for(vf=rt;vf<=ot;vf++){for(yf=0,$f=rt;$f<=Math.min(_f,ot);$f++)yf=yf+K.get(vf,$f)*X.get($f,_f);K.set(vf,_f,yf)}}}function Je(F,W,q,K){let X,tt;return Math.abs(q)>Math.abs(K)?(X=K/q,tt=q+X*K,[(F+X*W)/tt,(W-X*F)/tt]):(X=q/K,tt=K+X*q,[(X*F+W)/tt,(X*W-F)/tt])}class _s{constructor(W){if(W=vt.checkMatrix(W),!W.isSymmetric())throw new Error("Matrix is not symmetric");let q=W,K=q.rows,X=new P(K,K),tt=!0,rt,ot,ut;for(ot=0;ot0,X.set(ot,ot,Math.sqrt(Math.max(yn,0))),ut=ot+1;ut=0;ut--)for(ot=0;otrt;wo++)po=W.transpose().mmul(ot).div(ot.transpose().mmul(ot).get(0,0)),po=po.div(po.norm()),yn=W.mmul(po).div(po.transpose().mmul(po).get(0,0)),wo>0&&(ut=yn.clone().sub(mo).pow(2).sum()),mo=yn.clone(),K?(uo=K.transpose().mmul(yn).div(yn.transpose().mmul(yn).get(0,0)),uo=uo.div(uo.norm()),ot=K.mmul(uo).div(uo.transpose().mmul(uo).get(0,0))):ot=yn;if(K){let wo=W.transpose().mmul(yn).div(yn.transpose().mmul(yn).get(0,0));wo=wo.div(wo.norm());let lf=W.clone().sub(yn.clone().mmul(wo.transpose())),yf=ot.transpose().mmul(yn).div(yn.transpose().mmul(yn).get(0,0)),cf=K.clone().sub(yn.clone().mulS(yf.get(0,0)).mmul(uo.transpose()));this.t=yn,this.p=wo.transpose(),this.w=po.transpose(),this.q=uo,this.u=ot,this.s=yn.transpose().mmul(yn),this.xResidual=lf,this.yResidual=cf,this.betas=yf}else this.w=po.transpose(),this.s=yn.transpose().mmul(yn).sqrt(),X?this.t=yn.clone().div(this.s.get(0,0)):this.t=yn,this.xResidual=W.sub(yn.mmul(po.transpose()))}}$$S.AbstractMatrix=j;$$S.CHO=_s;$$S.CholeskyDecomposition=_s;$$S.DistanceMatrix=Dr;$$S.EVD=Ms;$$S.EigenvalueDecomposition=Ms;$$S.LU=Br;$$S.LuDecomposition=Br;var Sc=$$S.Matrix=P;$$S.MatrixColumnSelectionView=hc;$$S.MatrixColumnView=ac;$$S.MatrixFlipColumnView=cc;$$S.MatrixFlipRowView=lc;$$S.MatrixRowSelectionView=dc;$$S.MatrixRowView=uc;$$S.MatrixSelectionView=ar;$$S.MatrixSubView=fc;$$S.MatrixTransposeView=pc;$$S.NIPALS=Es;$$S.Nipals=Es;$$S.QR=On;$$S.QrDecomposition=On;$$S.SVD=de$2;var Ac=$$S.SingularValueDecomposition=de$2;$$S.SymmetricMatrix=Me;$$S.WrapperMatrix1D=bs;$$S.WrapperMatrix2D=vt;$$S.correlation=Tc;$$S.covariance=bc;var gi=$$S.default=P;$$S.determinant=hr;var Rc=$$S.inverse=mc;$$S.linearDependencies=wc;var Cc=$$S.pseudoInverse=xc;$$S.solve=Ts;$$S.wrap=gc;const ht=Sc,Pc=Ac;gi.Matrix&&gi.Matrix;const kc=Rc,Is=Cc;class Oc{constructor(W,q){if(this.sourcePoints=W,this.destinationPoints=q,this.pointCount=this.sourcePoints.length,this.pointCount<2)throw new Error("Not enough control points. A helmert transformation requires a minimum of 2 points, but "+this.pointCount+" are given.");const K=ht.columnVector(q.flat()),X=ht.zeros(2*this.pointCount,4);for(let rt=0;rt3)throw new Error("Only polynomial transformations of order 1, 2 or 3 are supported");const X=[ht.columnVector(q.map(ot=>ot[0])),ht.columnVector(q.map(ot=>ot[1]))],tt=ht.zeros(this.pointCount,this.nCoefs);for(let ot=0;otpo[0])),ht.columnVector([...q,[0,0],[0,0],[0,0]].map(po=>po[1]))],ot=ht.zeros(this.pointCount,this.pointCount);for(let po=0;po=this.pointCount&&mo=this.pointCount&&yn.set(po,mo,ut.get(po,mo-this.pointCount));const uo=kc(yn);this.weightsMatrices=[uo.mmul(rt[0]),uo.mmul(rt[1])]}interpolate(W){if(!this.weightsMatrices)throw new Error("Weights not computed");const q=ht.zeros(this.pointCount,1);for(let X=0;X({source:ot,destination:F.transformForward(ot)})),tt=Gr(X,!1),rt=Ss(F,tt,K);return Fr(rt,!0).map(ot=>ot.destination)}function Qe(F,W,q){const K=jr(q);W=gs(W);const X=W.map(ot=>({source:F.transformBackward(ot),destination:ot})),tt=Gr(X,!1),rt=As(F,tt,K);return Fr(rt,!0).map(ot=>ot.source)}function Gc(F,W,q){const K=jr(q);W=An(W);const X=W.map(ot=>({source:ot,destination:F.transformForward(ot)})),tt=Gr(X,!0),rt=Ss(F,tt,K);return Fr(rt,!1).map(ot=>ot.destination)}function Fc(F,W,q){const K=jr(q);W=An(W);const X=W.map(ot=>({source:F.transformBackward(ot),destination:ot})),tt=Gr(X,!0),rt=As(F,tt,K);return Fr(rt,!1).map(ot=>ot.source)}function tr(F,W,q){return W.map(K=>Gc(F,K,q))}function er$1(F,W,q){return W.map(K=>Fc(F,K,q))}function Gr(F,W=!1){const q=F.length-(W?0:1),K=[];for(let X=0;XK.from);return W&&q.push(F[F.length-1].to),q}function Ss(F,W,q){return q.maxDepth<=0||q.maxOffsetRatio<=0?W:W.map(K=>vn(F,K,q,0)).flat(1)}function As(F,W,q){return q.maxDepth<=0||q.maxOffsetRatio<=0?W:W.map(K=>wn(F,K,q,0)).flat(1)}function vn(F,W,q,K){const X=(q.sourceIsGeographic?(uo,po)=>_r(uo,po).geometry.coordinates:Er)(W.from.source,W.to.source),tt=(q.destinationIsGeographic?(uo,po)=>_r(uo,po).geometry.coordinates:Er)(W.from.destination,W.to.destination),rt=F.transformForward(X),ot=q.destinationIsGeographic?Sn:jt,ut=ot(W.from.destination,W.to.destination),yn=ot(tt,rt);if(Kq.maxOffsetRatio&&ut>0){const uo={source:X,destination:rt};return[vn(F,{from:W.from,to:uo},q,K+1),vn(F,{from:uo,to:W.to},q,K+1)].flat(1)}else return W}function wn(F,W,q,K){const X=(q.destinationIsGeographic?(uo,po)=>_r(uo,po).geometry.coordinates:Er)(W.from.destination,W.to.destination),tt=(q.sourceIsGeographic?(uo,po)=>_r(uo,po).geometry.coordinates:Er)(W.from.source,W.to.source),rt=F.transformBackward(X),ot=q.sourceIsGeographic?Sn:jt,ut=ot(W.from.source,W.to.source),yn=ot(tt,rt);if(Kq.maxOffsetRatio&&ut>0){const uo={source:rt,destination:X};return[wn(F,{from:W.from,to:uo},q,K+1),wn(F,{from:uo,to:W.to},q,K+1)].flat(1)}else return W}var xn,Rs,bn,Cs,cr,Yr;class mi{constructor(W,q="polynomial"){if(Te(this,xn),Te(this,bn),Te(this,cr),W.length==0)throw new Error("No control points.");this.gcps=W.map(K=>{if("resource"in K&&"geo"in K)return{source:K.resource,destination:K.geo};if("source"in K&&"destination"in K)return K;throw new Error("Unsupported GCP type")}),this.sourcePoints=this.gcps.map(K=>K.source),this.destinationPoints=this.gcps.map(K=>K.destination),this.type=q}transformForward(W,q){if(mt(W))return this.forwardTransformation||(this.forwardTransformation=le(this,xn,Rs).call(this)),this.forwardTransformation.interpolate(W);if(Ot(W))return this.transformForward(ye(W));if(At(W))return Ke(this,W,q);if(Nt(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),Ke(this,ve(W),q);if(Rt(W))return tr(this,W,q);if(Lt(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),tr(this,we(W),q);throw new Error("Input type not supported")}transformForwardAsGeojson(W,q){if(mt(W))return ze(this.transformForward(W));if(Ot(W))return ze(this.transformForward(ye(W)));if(At(W))return q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),Ze(Ke(this,W,q));if(Nt(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),Ze(Ke(this,ve(W),q));if(Rt(W))return q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),$e(tr(this,W,q));if(Lt(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),$e(tr(this,we(W),q));throw new Error("Input type not supported")}transformBackward(W,q){if(mt(W))return this.backwardTransformation||(this.backwardTransformation=le(this,bn,Cs).call(this)),this.backwardTransformation.interpolate(W);if(Ot(W))return this.transformBackward(ye(W));if(At(W))return Qe(this,W,q);if(Nt(W))return q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),Qe(this,ve(W),q);if(Rt(W))return er$1(this,W,q);if(Lt(W))return q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),er$1(this,we(W),q);throw new Error("Input type not supported")}transformBackwardAsGeojson(W,q){if(mt(W))return ze(this.transformBackward(W));if(Ot(W))return ze(this.transformBackward(ye(W)));if(At(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),Ze(Qe(this,W,q));if(Nt(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),Ze(Qe(this,ve(W),q));if(Rt(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),$e(er$1(this,W,q));if(Lt(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),$e(er$1(this,we(W),q));throw new Error("Input type not supported")}transformToGeo(W,q){if(mt(W))return this.transformForward(W,q);if(Ot(W))return this.transformForward(W,q);if(At(W))return this.transformForward(W,q);if(Nt(W))return this.transformForward(W,q);if(Rt(W))return this.transformForward(W,q);if(Lt(W))return this.transformForward(W,q);throw new Error("Input type not supported")}transformToGeoAsGeojson(W,q){if(mt(W))return this.transformForwardAsGeojson(W,q);if(Ot(W))return this.transformForwardAsGeojson(W,q);if(At(W))return this.transformForwardAsGeojson(W,q);if(Nt(W))return this.transformForwardAsGeojson(W,q);if(Rt(W))return this.transformForwardAsGeojson(W,q);if(Lt(W))return this.transformForwardAsGeojson(W,q);throw new Error("Input type not supported")}transformToResource(W,q){if(mt(W))return this.transformBackward(W,q);if(Ot(W))return this.transformBackward(W,q);if(At(W))return this.transformBackward(W,q);if(Nt(W))return this.transformBackward(W,q);if(Rt(W))return this.transformBackward(W,q);if(Lt(W))return this.transformBackward(W,q);throw new Error("Input type not supported")}transformToResourceAsGeojson(W,q){if(mt(W))return this.transformBackwardAsGeojson(W,q);if(Ot(W))return this.transformBackwardAsGeojson(W,q);if(At(W))return this.transformBackwardAsGeojson(W,q);if(Nt(W))return this.transformBackwardAsGeojson(W,q);if(Rt(W))return this.transformBackwardAsGeojson(W,q);if(Lt(W))return this.transformBackwardAsGeojson(W,q);throw new Error("Input type not supported")}transformSvgToGeojson(W,q){if(W.type==="circle")return this.transformForwardAsGeojson(W.coordinates);if(W.type==="line")return this.transformForwardAsGeojson(W.coordinates,q);if(W.type==="polyline")return this.transformForwardAsGeojson(W.coordinates,q);if(W.type==="rect")return this.transformForwardAsGeojson([W.coordinates],q);if(W.type==="polygon")return this.transformForwardAsGeojson([W.coordinates],q);throw new Error("Unsupported SVG geometry")}transformGeojsonToSvg(W,q){if(W.type==="Point")return{type:"circle",coordinates:this.transformBackward(W)};if(W.type==="LineString")return{type:"polyline",coordinates:this.transformBackward(W,q)};if(W.type==="Polygon")return{type:"polygon",coordinates:this.transformBackward(W,q)[0]};throw new Error("Unsupported GeoJSON geometry")}}xn=new WeakSet,Rs=function(){return le(this,cr,Yr).call(this,this.sourcePoints,this.destinationPoints)},bn=new WeakSet,Cs=function(){return le(this,cr,Yr).call(this,this.destinationPoints,this.sourcePoints)},cr=new WeakSet,Yr=function(F,W){if(this.type==="helmert")return new Oc(F,W);if(this.type==="polynomial1"||this.type==="polynomial")return new Hr(F,W);if(this.type==="polynomial2")return new Hr(F,W,2);if(this.type==="polynomial3")return new Hr(F,W,3);if(this.type==="projective")return new Nc(F,W);if(this.type==="thinPlateSpline")return new Dc(F,W,Bc,jc);throw new Error(`Unsupported transformation type: ${this.type}`)};function Uc(F){return Math.sqrt(Math.pow(F[1][0]-F[0][0],2)+Math.pow(F[1][1]-F[0][1],2))}function Wc(F){return Math.atan2(F[1][1]-F[0][1],F[1][0]-F[0][0])}function Vc(F,W,q){return[F[0]+Math.cos(q)*W,F[1]+Math.sin(q)*W]}function zc(F,W){let q=F[0];const K=[q];for(;Uc([q,F[1]])>W;){const X=Vc(q,W,Wc(F));K.push(X),q=X}return K}function Zc(F,W){F=[...F,F[0]];let q=[];for(let K=0;K=K?(lf=uo,ot+=1,ot=K?(lf=uo,ot+=1,ot0){if(Af<=0)return Bf;Hf=Cf+Af}else if(Cf<0){if(Af>=0)return Bf;Hf=-(Cf+Af)}else return Bf;var Df=ot*Hf;return Bf>=Df||Bf<=-Df?Bf:wo($f,wf,Pf)},function($f,wf,Pf,Cf){var Af=$f[0]-Cf[0],Bf=wf[0]-Cf[0],Hf=Pf[0]-Cf[0],Df=$f[1]-Cf[1],Lf=wf[1]-Cf[1],kf=Pf[1]-Cf[1],Nf=$f[2]-Cf[2],Yf=wf[2]-Cf[2],Gf=Pf[2]-Cf[2],rp=Bf*kf,ip=Hf*Lf,ap=Hf*Df,yp=Af*kf,vp=Af*Lf,Np=Bf*Df,jp=Nf*(rp-ip)+Yf*(ap-yp)+Gf*(vp-Np),Ip=(Math.abs(rp)+Math.abs(ip))*Math.abs(Nf)+(Math.abs(ap)+Math.abs(yp))*Math.abs(Yf)+(Math.abs(vp)+Math.abs(Np))*Math.abs(Gf),Jp=ut*Ip;return jp>Jp||-jp>Jp?jp:lf($f,wf,Pf,Cf)}];function cf($f){var wf=yf[$f.length];return wf||(wf=yf[$f.length]=mo($f.length)),wf.apply(void 0,$f)}function vf($f,wf,Pf,Cf,Af,Bf,Hf){return function(Df,Lf,kf,Nf,Yf){switch(arguments.length){case 0:case 1:return 0;case 2:return Cf(Df,Lf);case 3:return Af(Df,Lf,kf);case 4:return Bf(Df,Lf,kf,Nf);case 5:return Hf(Df,Lf,kf,Nf,Yf)}for(var Gf=new Array(arguments.length),rp=0;rp0;){var _f=(ut+X-1)%X,$f=F[_f];if($f[1]!==K)break;var wf=$f[0];cf=Math.min(cf,wf),vf=Math.max(vf,wf),ut=_f}if(ut===0)return cf<=q&&q<=vf?0:1;rt=ut+1}for(var Pf=F[(ut+X-1)%X][1];ot+1=W.value)return this.search_node_=W,W}else for(;W=W.next;)if(F-Ge&&tt0?ur.CCW:ur.CW}fe.orient2d=wl;function xl(F,W,q,K){var X=(F.x-W.x)*(K.y-W.y)-(K.x-W.x)*(F.y-W.y);if(X>=-Ge)return!1;var tt=(F.x-q.x)*(K.y-q.y)-(K.x-q.x)*(F.y-q.y);return!(tt<=Ge)}fe.inScanArea=xl;function bl(F,W,q){var K=W.x-F.x,X=W.y-F.y,tt=q.x-F.x,rt=q.y-F.y;return K*tt+X*rt<0}fe.isAngleObtuse=bl;var jn=ml,Ar=Ln,Ns=Dn,Tl=je.Node,We=fe,Ml=We.EPSILON,et=We.Orientation,it$2=We.orient2d,Ls=We.inScanArea,vi=We.isAngleObtuse;function _l(F){F.initTriangulation(),F.createAdvancingFront(),El(F),Il(F)}function El(F){var W,q=F.pointCount();for(W=1;WW.q.x,!Ds(q.triangle,W.p,W.q)&&(Ll(F,W,q),Gn(F,W.p,W.q,q.triangle,W.q))}function Gn(F,W,q,K,X){if(!Ds(K,W,q)){var tt=K.pointCCW(X),rt=it$2(q,tt,W);if(rt===et.COLLINEAR)throw new Ar("poly2tri EdgeEvent: Collinear not supported!",[q,tt,W]);var ot=K.pointCW(X),ut=it$2(q,ot,W);if(ut===et.COLLINEAR)throw new Ar("poly2tri EdgeEvent: Collinear not supported!",[q,ot,W]);rt===ut?(rt===et.CW?K=K.neighborCCW(X):K=K.neighborCW(X),Gn(F,W,q,K,X)):Wn(F,W,q,K,X)}}function Ds(F,W,q){var K=F.edgeIndex(W,q);if(K!==-1){F.markConstrainedEdgeByIndex(K);var X=F.getNeighbor(K);return X&&X.markConstrainedEdgeByPoints(W,q),!0}return!1}function Rl(F,W,q){var K=new Ns(W,q.point,q.next.point);K.markNeighbor(q.triangle),F.addToMap(K);var X=new Tl(W);return X.next=q.next,X.prev=q,q.next.prev=X,q.next=X,Zt(F,K)||F.mapTriangleToNodes(K),X}function ue(F,W){var q=new Ns(W.prev.point,W.point,W.next.point);q.markNeighbor(W.prev.triangle),q.markNeighbor(W.triangle),F.addToMap(q),W.prev.next=W.next,W.next.prev=W.prev,Zt(F,q)||F.mapTriangleToNodes(q)}function Cl(F,W){for(var q=W.next;q.next&&!vi(q.point,q.next.point,q.prev.point);)ue(F,q),q=q.next;for(q=W.prev;q.prev&&!vi(q.point,q.next.point,q.prev.point);)ue(F,q),q=q.prev;W.next&&W.next.next&&Pl(W)&&Ol(F,W)}function Pl(F){var W=F.point.x-F.next.next.point.x,q=F.point.y-F.next.next.point.y;return jn(q>=0,"unordered y"),W>=0||Math.abs(W)0}function Bs(F,W,q,K){var X,tt,rt,ot;X=F.neighborCCW(W),tt=F.neighborCW(W),rt=q.neighborCCW(K),ot=q.neighborCW(K);var ut,yn,uo,po;ut=F.getConstrainedEdgeCCW(W),yn=F.getConstrainedEdgeCW(W),uo=q.getConstrainedEdgeCCW(K),po=q.getConstrainedEdgeCW(K);var mo,wo,lf,yf;mo=F.getDelaunayEdgeCCW(W),wo=F.getDelaunayEdgeCW(W),lf=q.getDelaunayEdgeCCW(K),yf=q.getDelaunayEdgeCW(K),F.legalize(W,K),q.legalize(K,W),q.setDelaunayEdgeCCW(W,mo),F.setDelaunayEdgeCW(W,wo),F.setDelaunayEdgeCCW(K,lf),q.setDelaunayEdgeCW(K,yf),q.setConstrainedEdgeCCW(W,ut),F.setConstrainedEdgeCW(W,yn),F.setConstrainedEdgeCCW(K,uo),q.setConstrainedEdgeCW(K,po),F.clearNeighbors(),q.clearNeighbors(),X&&q.markNeighbor(X),tt&&F.markNeighbor(tt),rt&&F.markNeighbor(rt),ot&&q.markNeighbor(ot),F.markNeighbor(q)}function Ol(F,W){for(it$2(W.point,W.next.point,W.next.next.point)===et.CCW?F.basin.left_node=W.next.next:F.basin.left_node=W.next,F.basin.bottom_node=F.basin.left_node;F.basin.bottom_node.next&&F.basin.bottom_node.point.y>=F.basin.bottom_node.next.point.y;)F.basin.bottom_node=F.basin.bottom_node.next;if(F.basin.bottom_node!==F.basin.left_node){for(F.basin.right_node=F.basin.bottom_node;F.basin.right_node.next&&F.basin.right_node.point.yF.basin.right_node.point.y,js(F,F.basin.bottom_node))}}function js(F,W){if(!Nl(F,W)){ue(F,W);var q;if(!(W.prev===F.basin.left_node&&W.next===F.basin.right_node)){if(W.prev===F.basin.left_node){if(q=it$2(W.point,W.next.point,W.next.next.point),q===et.CW)return;W=W.next}else if(W.next===F.basin.right_node){if(q=it$2(W.point,W.prev.point,W.prev.prev.point),q===et.CCW)return;W=W.prev}else W.prev.point.yq}function Ll(F,W,q){F.edge_event.right?Dl(F,W,q):Bl(F,W,q)}function Dl(F,W,q){for(;q.next.point.xW.p.x;)it$2(W.q,q.prev.point,W.p)===et.CW?Us(F,W,q):q=q.prev}function Us(F,W,q){q.point.x>W.p.x&&(it$2(q.point,q.prev.point,q.prev.prev.point)===et.CW?Un(F,W,q):(Ws(F,W,q),Us(F,W,q)))}function Ws(F,W,q){it$2(q.prev.point,q.prev.prev.point,q.prev.prev.prev.point)===et.CW?Un(F,W,q.prev):it$2(W.q,q.prev.prev.point,W.p)===et.CW&&Ws(F,W,q.prev)}function Un(F,W,q){ue(F,q.prev),q.prev.point!==W.p&&it$2(W.q,q.prev.point,W.p)===et.CW&&it$2(q.point,q.prev.point,q.prev.prev.point)===et.CW&&Un(F,W,q)}function Wn(F,W,q,K,X){var tt=K.neighborAcross(X);jn(tt,"FLIP failed due to missing triangle!");var rt=tt.oppositePoint(K,X);if(K.getConstrainedEdgeAcross(X)){var ot=K.index(X);throw new Ar("poly2tri Intersecting Constraints",[X,rt,K.getPoint((ot+1)%3),K.getPoint((ot+2)%3)])}if(Ls(X,K.pointCCW(X),K.pointCW(X),rt))if(Bs(K,X,tt,rt),F.mapTriangleToNodes(K),F.mapTriangleToNodes(tt),X===q&&rt===W)q===F.edge_event.constrained_edge.q&&W===F.edge_event.constrained_edge.p&&(K.markConstrainedEdgeByPoints(W,q),tt.markConstrainedEdgeByPoints(W,q),Zt(F,K),Zt(F,tt));else{var ut=it$2(q,rt,W);K=jl(F,ut,K,tt,X,rt),Wn(F,W,q,K,X)}else{var yn=Vs(W,q,tt,rt);zs(F,W,q,K,tt,yn),Gn(F,W,q,K,X)}}function jl(F,W,q,K,X,tt){var rt;return W===et.CCW?(rt=K.edgeIndex(X,tt),K.delaunay_edge[rt]=!0,Zt(F,K),K.clearDelaunayEdges(),q):(rt=q.edgeIndex(X,tt),q.delaunay_edge[rt]=!0,Zt(F,q),q.clearDelaunayEdges(),K)}function Vs(F,W,q,K){var X=it$2(W,K,F);if(X===et.CW)return q.pointCCW(K);if(X===et.CCW)return q.pointCW(K);throw new Ar("poly2tri [Unsupported] nextFlipPoint: opposing point on constrained edge!",[W,K,F])}function zs(F,W,q,K,X,tt){var rt=X.neighborAcross(tt);jn(rt,"FLIP failed due to missing triangle");var ot=rt.oppositePoint(X,tt);if(Ls(q,K.pointCCW(q),K.pointCW(q),ot))Wn(F,q,ot,rt,ot);else{var ut=Vs(W,q,rt,ot);zs(F,W,q,K,rt,ut)}}Bn.triangulate=_l;var Gl=Ln,pe=Os,Fl=Dn,Ul=Bn,Zs=je,Qr=Zs.Node,wi=.3,Wl=function(F,W){if(this.p=F,this.q=W,F.y>W.y)this.q=F,this.p=W;else if(F.y===W.y){if(F.x>W.x)this.q=F,this.p=W;else if(F.x===W.x)throw new Gl("poly2tri Invalid Edge constructor: repeated points!",[F])}this.q._p2t_edge_list||(this.q._p2t_edge_list=[]),this.q._p2t_edge_list.push(this)},$s=function(){this.left_node=null,this.bottom_node=null,this.right_node=null,this.width=0,this.left_highest=!1};$s.prototype.clear=function(){this.left_node=null,this.bottom_node=null,this.right_node=null,this.width=0,this.left_highest=!1};var Vl=function(){this.constrained_edge=null,this.right=!1},Y=function(F,W){W=W||{},this.triangles_=[],this.map_=[],this.points_=W.cloneArrays?F.slice(0):F,this.edge_list=[],this.pmin_=this.pmax_=null,this.front_=null,this.head_=null,this.tail_=null,this.af_head_=null,this.af_middle_=null,this.af_tail_=null,this.basin=new $s,this.edge_event=new Vl,this.initEdges(this.points_)};Y.prototype.addHole=function(F){this.initEdges(F);var W,q=F.length;for(W=0;WF&&(F=rt.x),rt.xq&&(q=rt.y),rt.ynew lr.Point(X[0],X[1])));for(let X=0;Xq.getPoints().map(K=>[K.x,K.y]))}function se(F,W){const q=W[0],K=W[1];return[F[0]*q+F[2]*K+F[4],F[1]*q+F[3]*K+F[5]]}function Xl(){return[1,0,0,1,0,0]}function ql(F,W){const q=F[0],K=F[1],X=F[2],tt=F[3],rt=F[4],ot=F[5],ut=W[0],yn=W[1],uo=W[2],po=W[3],mo=W[4],wo=W[5];return[q*ut+X*yn,K*ut+tt*yn,q*uo+X*po,K*uo+tt*po,q*mo+X*wo+rt,K*mo+tt*wo+ot]}function xi(F,W,q,K,X,tt,rt){const ot=Math.sin(X),ut=Math.cos(X);return[q*ut,K*ot,-q*ot,K*ut,tt*q*ut-rt*q*ot+F,tt*K*ot+rt*K*ut+W]}function Hl(F){const W=Yl(F),q=F[0],K=F[1],X=F[2],tt=F[3],rt=F[4],ot=F[5];return[tt/W,-K/W,-X/W,q/W,(X*ot-tt*rt)/W,-(q*ot-K*rt)/W]}function Yl(F){return F[0]*F[3]-F[1]*F[2]}function Jl(F){const W=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return W[0]=F[0],W[1]=F[1],W[4]=F[2],W[5]=F[3],W[12]=F[4],W[13]=F[5],W}var k;(function(F){F.GEOREFERENCEANNOTATIONADDED="georeferenceannotationadded",F.GEOREFERENCEANNOTATIONREMOVED="georeferenceannotationremoved",F.WARPEDMAPADDED="warpedmapadded",F.WARPEDMAPREMOVED="warpedmapremoved",F.WARPEDMAPENTER="warpedmapenter",F.WARPEDMAPLEAVE="warpedmapleave",F.IMAGEINFOLOADED="imageinfoloaded",F.TILEFETCHED="tilefetched",F.TILEFETCHERROR="tilefetcherror",F.MAPTILELOADED="maptileloaded",F.MAPTILEREMOVED="maptileremoved",F.FIRSTMAPTILELOADED="firstmaptileloaded",F.ALLREQUESTEDTILESLOADED="allrequestedtilesloaded",F.TEXTURESUPDATED="texturesupdated",F.ZINDICESCHANGES="zindiceschanged",F.RESOURCEMASKUPDATED="resourcemaskupdated",F.VISIBILITYCHANGED="visibilitychanged",F.TRANSFORMATIONCHANGED="transformationchanged",F.CHANGED="changed",F.CLEARED="cleared"})(k||(k={}));class z extends Event{constructor(W,q){super(W),this.data=q}}const Kl=80,bi={maxOffsetRatio:.05,maxDepth:2},Ti={maxOffsetRatio:.05,maxDepth:2};class Ql extends EventTarget{constructor(W,q,K,X=!0){var tt;super(),this.resourceViewportRing=[],this.resourceTrianglePoints=[],this.resourceTrianglePointsByBestScaleFactor=new Map,this.projectedGeoCurrentTrianglePoints=[],this.projectedGeoNewTrianglePoints=[],this.mapId=W,this.georeferencedMap=q,this.gcps=this.georeferencedMap.gcps,this.projectedGcps=this.gcps.map(({geo:rt,resource:ot})=>({geo:Eh(rt),resource:ot})),this.resourceMask=this.georeferencedMap.resourceMask,this.resourceMaskBbox=st(this.resourceMask),this.resourceFullMask=[[0,0],[this.georeferencedMap.resource.width,0],[this.georeferencedMap.resource.width,this.georeferencedMap.resource.height],[0,this.georeferencedMap.resource.height]],this.resourceFullMaskBbox=st(this.resourceFullMask),this.imageInfoCache=K,this.visible=X,this.transformationType=((tt=this.georeferencedMap.transformation)==null?void 0:tt.type)||"polynomial",this.updateTransformerProperties()}getViewportMask(W){return this.projectedGeoMask.map(q=>se(W.projectedGeoToViewportTransform,q))}getViewportMaskBbox(W){return st(this.getViewportMask(W))}getApproxViewportMaskBbox(W){return st(De(this.projectedGeoMaskBbox).map(q=>se(W.projectedGeoToViewportTransform,q)))}getViewportFullMask(W){return this.projectedGeoFullMask.map(q=>se(W.projectedGeoToViewportTransform,q))}getViewportFullMaskBbox(W){return st(this.getViewportFullMask(W))}getApproxViewportFullMaskBbox(W){return st(De(this.projectedGeoFullMaskBbox).map(q=>se(W.projectedGeoToViewportTransform,q)))}getResourceToViewportScale(W){return $r(this.resourceMaskBbox,this.getViewportMaskBbox(W))}getResourceToCanvasScale(W){return this.getResourceToViewportScale(W)/W.devicePixelRatio}getApproxResourceToViewportScale(W){return $r(this.resourceMaskBbox,this.getApproxViewportMaskBbox(W))}getApproxResourceToCanvasScale(W){return this.getApproxResourceToViewportScale(W)/W.devicePixelRatio}setResourceViewportRing(W){this.resourceViewportRing=W,this.resourceViewportRingBbox=st(W)}setResourceMask(W){this.resourceMask=W,this.updateGeoMask(),this.updateProjectedGeoMask()}setTransformationType(W){this.transformationType=W,this.updateTransformerProperties()}setGcps(W){this.gcps=W,this.updateTransformerProperties()}updateBestScaleFactor(W){this.bestScaleFactor!=W&&(this.bestScaleFactor=W,this.updateTriangulation(!0))}updateTriangulation(W=!1){if(this.resourceTrianglePointsByBestScaleFactor.has(this.bestScaleFactor))this.resourceTrianglePoints=this.resourceTrianglePointsByBestScaleFactor.get(this.bestScaleFactor);else{const q=bh(this.resourceMask)*this.bestScaleFactor/Kl;this.resourceTrianglePoints=$l(this.resourceMask,q).flat(),this.resourceTrianglePointsByBestScaleFactor.set(this.bestScaleFactor,this.resourceTrianglePoints)}this.updateProjectedGeoTrianglePoints(W)}updateProjectedGeoTrianglePoints(W=!1){this.projectedGeoNewTrianglePoints=this.resourceTrianglePoints.map(q=>this.projectedTransformer.transformToGeo(q)),(W||!this.projectedGeoCurrentTrianglePoints.length)&&(this.projectedGeoCurrentTrianglePoints=this.projectedGeoNewTrianglePoints)}resetCurrentTrianglePoints(){this.projectedGeoCurrentTrianglePoints=this.projectedGeoNewTrianglePoints}clearResourceTrianglePointsByBestScaleFactor(){this.resourceTrianglePointsByBestScaleFactor=new Map}mixProjectedGeoCurrentAndNewTrianglePoints(W){this.projectedGeoCurrentTrianglePoints=this.projectedGeoNewTrianglePoints.map((q,K)=>ph(q,this.projectedGeoCurrentTrianglePoints[K],W))}hasImageInfo(){return this.imageId!==void 0&&this.parsedImage!==void 0}async loadImageInfo(){const W=this.georeferencedMap.resource.id,q=await hh(W,{cache:this.imageInfoCache});this.parsedImage=Qa.parse(q),this.imageId=await Li(W),this.dispatchEvent(new z(k.IMAGEINFOLOADED))}dispose(){this.resourceTrianglePoints=[],this.projectedGeoCurrentTrianglePoints=[],this.projectedGeoNewTrianglePoints=[]}updateTransformerProperties(){this.updateTransformer(),this.updateProjectedTransformer(),this.updateGeoMask(),this.updateFullGeoMask(),this.updateProjectedGeoMask(),this.updateProjectedFullGeoMask(),this.updateResourceToProjectedGeoScale()}updateTransformer(){this.transformer=new mi(this.gcps,this.transformationType)}updateProjectedTransformer(){this.projectedTransformer=new mi(this.projectedGcps,this.transformationType)}updateGeoMask(){this.geoMask=this.transformer.transformForwardAsGeojson([this.resourceMask],bi),this.geoMaskBbox=st(this.geoMask)}updateFullGeoMask(){this.geoFullMask=this.transformer.transformForwardAsGeojson([this.resourceFullMask],bi),this.geoFullMaskBbox=st(this.geoFullMask)}updateProjectedGeoMask(){this.projectedGeoMask=this.projectedTransformer.transformForward([this.resourceMask],Ti)[0],this.projectedGeoMaskBbox=st(this.projectedGeoMask)}updateProjectedFullGeoMask(){this.projectedGeoFullMask=this.projectedTransformer.transformForward([this.resourceFullMask],Ti)[0],this.projectedGeoFullMaskBbox=st(this.projectedGeoFullMask)}updateResourceToProjectedGeoScale(){this.resourceToProjectedGeoScale=$r(this.resourceMaskBbox,this.projectedGeoMaskBbox)}}const tu=m.string().or(m.number()).or(m.boolean()),eu=m.record(m.string(),tu.array()),$t=m.tuple([m.number(),m.number()]),Xs=m.object({type:m.literal("Point"),coordinates:$t}),qs=$t.array().min(3),Ve=m.enum(["ImageService1","ImageService2","ImageService3"]),ru$2=m.object({id:m.string().url(),type:m.string(),label:eu.optional()}),Ur=ru$2.extend({partOf:m.lazy(()=>Ur.array()).optional()}),nu=m.object({type:m.literal("polynomial"),options:m.object({order:m.number().min(1).max(3)}).optional()}),iu=m.object({type:m.literal("thinPlateSpline")}),Wr=nu.or(iu),su=/^\s*\s*<\/svg>$/,ou=m.object({type:m.literal("SvgSelector"),value:m.string().regex(su)}),au=m.object({source:m.string().url(),service:m.array(m.object({"@id":m.string().url(),type:Ve})).length(1),selector:ou}),Hs=m.object({pixelCoords:$t}),hu=m.object({type:m.literal("FeatureCollection"),transformation:Wr.optional(),features:m.array(m.object({type:m.literal("Feature"),properties:Hs,geometry:Xs}))}),Vn=m.object({id:m.string().optional(),type:m.literal("Annotation"),"@context":m.string().url().array().optional(),motivation:m.string().default("georeferencing").optional(),target:au,body:hu}),Ys=m.object({id:m.string().optional(),type:m.literal("AnnotationPage"),"@context":m.string().url().array().optional(),items:m.array(Vn)}),zn=//,cu=new RegExp(`^\\s*${zn.source}\\s*$`),lu=new RegExp(`^\\s*${zn.source}\\s*$`),uu=new RegExp(`^\\s*${zn.source}\\s*$`),du=m.string().regex(uu),fu=m.string().regex(cu),pu=m.string().regex(lu),gu=m.object({type:m.literal("SvgSelector"),value:du.or(fu).or(pu)}),mu=m.object({"@id":m.string().url(),type:Ve,height:m.number().positive(),width:m.number().positive(),partOf:Ur.array().optional()}),yu=m.object({id:m.string().url(),type:Ve,height:m.number().positive(),width:m.number().positive(),partOf:Ur.array().optional()}),vu=m.object({type:m.literal("SpecificResource"),source:mu.or(yu),selector:gu}),Js=m.object({resourceCoords:$t}),wu=m.object({type:m.literal("FeatureCollection"),transformation:Wr.optional(),features:m.array(m.object({type:m.literal("Feature"),properties:Js,geometry:Xs}))}),Zn=m.object({id:m.string().optional(),type:m.literal("Annotation"),"@context":m.string().url().array().optional(),motivation:m.string().default("georeferencing").optional(),target:vu,body:wu}),Ks=m.object({id:m.string().optional(),type:m.literal("AnnotationPage"),"@context":m.string().url().array().optional(),items:m.array(Zn)});Vn.or(Zn);Ys.or(Ks);Hs.or(Js);function Qs(F){return Array.isArray(F)}function xu(F){return!!(F&&typeof F=="object"&&"type"in F&&F.type==="AnnotationPage")}function Rr(F){return!!(F&&typeof F=="object"&&"type"in F&&F.type==="GeoreferencedMap")}function Mi(F){return!!(F&&typeof F=="object"&&"target"in F&&F.target&&typeof F.target=="object"&&"source"in F.target&&typeof F.target.source=="string")}function $n(F){return"type"in F&&F.type==="GeoreferencedMap"}function Xn(F){return"source"in F.target&&typeof F.target.source=="object"}function bu(F){return{id:Tu(F),...Su(F),type:Mu(F),partOf:_u(F)}}function Tu(F){if(Xn(F)){const W=F.target.source;return"id"in W?W.id:W["@id"]}else return F.target.service[0]["@id"]}function Mu(F){return"service"in F.target?F.target.service[0].type:F.target.source.type}function _u(F){if(Xn(F))return F.target.source.partOf}function Eu(F){return"pixelCoords"in F?F.pixelCoords:F.resourceCoords}function Iu(F){return F.body.features.map(W=>({resource:Eu(W.properties),geo:W.geometry.coordinates}))}function Su(F){var rt,ot;if(Xn(F))return{width:F.target.source.width,height:F.target.source.height};const W=F.target.selector.value,q=/width="(?\d+)"/.exec(W),K=/height="(?\d+)"/.exec(W),X=(rt=q==null?void 0:q.groups)==null?void 0:rt.width,tt=(ot=K==null?void 0:K.groups)==null?void 0:ot.height;if(!X||!tt)throw new Error("Could not parse image dimensions");return{width:parseInt(X),height:parseInt(tt)}}function Au(F){var K;const W=F.target.selector.value,q=(K=/points="(?.+)"/.exec(W))==null?void 0:K.groups;if(q&&q.points){const X=q.points.trim().split(/\s+/);if(X[0]===X[X.length-1]&&X.splice(-1),X.length>=3)return X.map(tt=>{const rt=tt.split(",");if(rt.length===2)return[parseFloat(rt[0]),parseFloat(rt[1])];throw new Error("Could not parse resource mask")});throw new Error("Could not parse resource mask")}else throw new Error("Could not parse resource mask")}function _i(F){return{"@context":"https://schemas.allmaps.org/map/2/context.json",type:"GeoreferencedMap",id:F.id,resource:bu(F),gcps:Iu(F),resourceMask:Au(F),transformation:F.body.transformation}}function Mn(F){if(xu(F)){let W;return"items"in F&&Array.isArray(F.items)&&Mi(F.items[0])?W=Ys.parse(F):W=Ks.parse(F),W.items.map(q=>_i(q))}else{let W;return Mi(F)?W=Vn.parse(F):W=Zn.parse(F),[_i(W)]}}const to$1=m.object({image:$t,world:$t}),Ru=m.object({uri:m.string().url(),width:m.number(),height:m.number(),type:Ve}),Vr=m.object({id:m.string().optional(),version:m.number().min(1).max(1).default(1),image:Ru,gcps:to$1.array(),pixelMask:qs,transformation:Wr.optional()}),qn=m.array(Vr),eo=m.object({resource:$t,geo:$t}),Cu=m.object({id:m.string().url(),width:m.number(),height:m.number(),type:Ve,partOf:Ur.array().optional()}),zr=m.object({"@context":m.literal("https://schemas.allmaps.org/map/2/context.json").optional(),type:m.literal("GeoreferencedMap"),id:m.string().optional(),resource:Cu,gcps:eo.array(),resourceMask:qs,transformation:Wr.optional()}),Hn=m.array(zr);Vr.or(zr);qn.or(Hn);to$1.or(eo);function Pu(F){let W,q,K;return $n(F)?(W=F.resource.width,q=F.resource.height,K=F.resourceMask):(W=F.image.width,q=F.image.height,K=F.pixelMask),{type:"SvgSelector",value:``}}function ku(F){let W,q,K,X,tt;return $n(F)?(W=F.resource.id,q=F.resource.type,K=F.resource.width,X=F.resource.height,tt=F.resource.partOf):(W=F.image.uri,q=F.image.type,K=F.image.width,X=F.image.height),{id:W,type:q,height:X,width:K,partOf:tt}}function ro(){return["http://iiif.io/api/extension/georef/1/context.json","http://iiif.io/api/presentation/3/context.json"]}function Ou(F){let W,q;return"resource"in F?(W=F.resource,q=F.geo):(W=F.image,q=F.world),{type:"Feature",properties:{resourceCoords:W},geometry:{type:"Point",coordinates:q}}}function Ei(F,W=!0){const q={type:"SpecificResource",source:ku(F),selector:Pu(F)},K={type:"FeatureCollection",transformation:F.transformation,features:F.gcps.map(X=>Ou(X))};return{id:F.id,type:"Annotation","@context":W?ro():void 0,motivation:"georeferencing",target:q,body:K}}function Nu(F){if(Qs(F)){let W;Rr(F[0])?W=Hn.parse(F):W=qn.parse(F);const q=W.map(K=>Ei(K,!1));return{type:"AnnotationPage","@context":ro(),items:q}}else{let W;return Rr(F)?W=zr.parse(F):W=Vr.parse(F),Ei(W)}}function no(F){return $n(F)?F:Mn(Nu(F))[0]}function Lu(F){return F.map(no)}function Ii(F){if(Qs(F)){let W;return Rr(F[0])?W=Hn.parse(F):W=qn.parse(F),Lu(W)}else{let W;return Rr(F)?W=zr.parse(F):W=Vr.parse(F),no(W)}}function Du(F,W,q,K,X){io(F,W,q||0,K||F.length-1,X||Bu)}function io(F,W,q,K,X){for(;K>q;){if(K-q>600){var tt=K-q+1,rt=W-q+1,ot=Math.log(tt),ut=.5*Math.exp(2*ot/3),yn=.5*Math.sqrt(ot*ut*(tt-ut)/tt)*(rt-tt/2<0?-1:1),uo=Math.max(q,Math.floor(W-rt*ut/tt+yn)),po=Math.min(K,Math.floor(W+(tt-rt)*ut/tt+yn));io(F,W,uo,po,X)}var mo=F[W],wo=q,lf=K;for(ge(F,q,W),X(F[K],mo)>0&&ge(F,q,K);wo0;)lf--}X(F[q],mo)===0?ge(F,q,lf):(lf++,ge(F,lf,K)),lf<=W&&(q=lf+1),W<=lf&&(K=lf-1)}}function ge(F,W,q){var K=F[W];F[W]=F[q],F[q]=K}function Bu(F,W){return FW?1:0}class ju{constructor(W=9){this._maxEntries=Math.max(4,W),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(W){let q=this.data;const K=[];if(!ir(W,q))return K;const X=this.toBBox,tt=[];for(;q;){for(let rt=0;rt=0&&tt[q].children.length>this._maxEntries;)this._split(tt,q),q--;this._adjustParentBBoxes(X,tt,q)}_split(W,q){const K=W[q],X=K.children.length,tt=this._minEntries;this._chooseSplitAxis(K,tt,X);const rt=this._chooseSplitIndex(K,tt,X),ot=ie(K.children.splice(rt,K.children.length-rt));ot.height=K.height,ot.leaf=K.leaf,te(K,this.toBBox),te(ot,this.toBBox),q?W[q-1].children.push(ot):this._splitRoot(K,ot)}_splitRoot(W,q){this.data=ie([W,q]),this.data.height=W.height+1,this.data.leaf=!1,te(this.data,this.toBBox)}_chooseSplitIndex(W,q,K){let X,tt=1/0,rt=1/0;for(let ot=q;ot<=K-q;ot++){const ut=xe(W,0,ot,this.toBBox),yn=xe(W,ot,K,this.toBBox),uo=Vu(ut,yn),po=tn(ut)+tn(yn);uo=q;yn--){const uo=W.children[yn];be(ot,W.leaf?tt(uo):uo),ut+=nr(ot)}return ut}_adjustParentBBoxes(W,q,K){for(let X=K;X>=0;X--)be(q[X],W)}_condense(W){for(let q=W.length-1,K;q>=0;q--)W[q].children.length===0?q>0?(K=W[q-1].children,K.splice(K.indexOf(W[q]),1)):this.clear():te(W[q],this.toBBox)}}function Gu(F,W,q){if(!q)return W.indexOf(F);for(let K=0;K=F.minX&&W.maxY>=F.minY}function ie(F){return{children:F,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Si(F,W,q,K,X){const tt=[W,q];for(;tt.length;){if(q=tt.pop(),W=tt.pop(),q-W<=K)continue;const rt=W+Math.ceil((q-W)/K/2)*K;Du(F,rt,W,q,X),tt.push(W,rt,rt,q)}}function zu(F,W,q){if(q===void 0&&(q={}),!F)throw new Error("point is required");if(!W)throw new Error("polygon is required");var K=ce(F),X=ih(W),tt=X.type,rt=W.bbox,ot=X.coordinates;if(rt&&Zu(K,rt)===!1)return!1;tt==="Polygon"&&(ot=[ot]);for(var ut=!1,yn=0;ynF[1]!=yn>F[1]&&F[0]<(ut-rt)*(F[1]-ot)/(yn-ot)+rt;po&&(K=!K)}return K}function Zu(F,W){return W[0]<=F[0]&&W[1]<=F[1]&&W[2]>=F[0]&&W[3]>=F[1]}const $u=!0;class Xu{constructor(){this.rbush=new ju,this.polygonsById=new Map,this.bboxesById=new Map,this.itemsById=new Map}addItem(W,q){this.removeItem(W);const K=st(q),X={minX:K[0],minY:K[1],maxX:K[2],maxY:K[3],id:W};this.polygonsById.set(W,q),this.bboxesById.set(W,K),this.itemsById.set(W,X),this.rbush.insert(X)}removeItem(W){const q=this.itemsById.get(W);q&&(this.rbush.remove(q),this.polygonsById.delete(W),this.bboxesById.delete(W),this.itemsById.delete(W))}clear(){this.rbush.clear()}search(W,q,K,X){return this.rbush.search({minX:W,minY:q,maxX:K,maxY:X})}getBbox(W){return this.bboxesById.get(W)}getPolygon(W){return this.polygonsById.get(W)}searchFromBbox(W){const[q,K,X,tt]=W;return this.search(q,K,X,tt).map(rt=>rt.id)}searchFromPoint(W,q=$u){const[K,X,tt,rt]=[W[0],W[1],W[0],W[1]],ot=this.search(K,X,tt,rt);return q?ot.filter(ut=>{const yn=this.polygonsById.get(ut.id);return yn?zu(W,yn):!1}).map(ut=>ut.id):ot.map(ut=>ut.id)}}class qu extends EventTarget{constructor(W,q){super(),this.warpedMapsById=new Map,this.zIndices=new Map,q=Object.assign({createRTree:!0},q),this.imageInfoCache=W,q.createRTree&&(this.rtree=new Xu)}getMaps(){return this.warpedMapsById.keys()}getWarpedMaps(W){if(W===void 0)return this.warpedMapsById.values();{const q=[];for(const K of W){const X=this.warpedMapsById.get(K);X&&q.push(X)}return q}}getWarpedMap(W){return this.warpedMapsById.get(W)}getMapZIndex(W){return this.zIndices.get(W)}getTotalBbox(){let W;for(const q of this.getWarpedMaps())q.visible&&(W?W=hi$3(W,q.geoMaskBbox):W=q.geoMaskBbox);return W}getTotalProjectedGeoMaskBbox(){let W;for(const q of this.getWarpedMaps())q.visible&&(W?W=hi$3(W,q.projectedGeoMaskBbox):W=q.projectedGeoMaskBbox);return W}getMapsByGeoBbox(W){return this.rtree?this.rtree.searchFromBbox(W):Array.from(this.warpedMapsById.keys())}setImageInfoCache(W){this.imageInfoCache=W}setMapResourceMask(W,q){const K=this.warpedMapsById.get(W);K&&(K.setResourceMask(q),this.addToOrUpdateRtree(K),this.dispatchEvent(new z(k.RESOURCEMASKUPDATED,W)))}setMapsTransformationType(W,q){for(const K of W){const X=this.warpedMapsById.get(K);X&&(X.setTransformationType(q),this.addToOrUpdateRtree(X))}this.dispatchEvent(new z(k.TRANSFORMATIONCHANGED,W))}bringMapsToFront(W){let q=this.warpedMapsById.size;for(const K of W)this.zIndices.has(K)&&(this.zIndices.set(K,q),q++);this.removeZIndexHoles(),this.dispatchEvent(new z(k.ZINDICESCHANGES))}sendMapsToBack(W){let q=-Array.from(W).length;for(const K of W)this.zIndices.has(K)&&(this.zIndices.set(K,q),q++);this.removeZIndexHoles(),this.dispatchEvent(new z(k.ZINDICESCHANGES))}bringMapsForward(W){for(const[q,K]of this.zIndices.entries())this.zIndices.set(q,K*2);for(const q of W){const K=this.zIndices.get(q);K!==void 0&&this.zIndices.set(q,K+3)}this.removeZIndexHoles(),this.dispatchEvent(new z(k.ZINDICESCHANGES))}sendMapsBackward(W){for(const[q,K]of this.zIndices.entries())this.zIndices.set(q,K*2);for(const q of W){const K=this.zIndices.get(q);K!==void 0&&this.zIndices.set(q,K-3)}this.removeZIndexHoles(),this.dispatchEvent(new z(k.ZINDICESCHANGES))}showMaps(W){for(const q of W){const K=this.warpedMapsById.get(q);K&&(K.visible=!0)}this.dispatchEvent(new z(k.VISIBILITYCHANGED,W))}hideMaps(W){for(const q of W){const K=this.warpedMapsById.get(q);K&&(K.visible=!1)}this.dispatchEvent(new z(k.VISIBILITYCHANGED,W))}async addGeoreferencedMap(W){const q=Ii(W),K=Array.isArray(q)?q[0]:q;return this.addGeoreferencedMapInternal(K)}async removeGeoreferencedMap(W){const q=Ii(W),K=Array.isArray(q)?q[0]:q;return this.removeGeoreferencedMapInternal(K)}async addGeoreferenceAnnotation(W){const q=[],K=Mn(W),X=await Promise.allSettled(K.map(tt=>this.addGeoreferencedMapInternal(tt)));for(const tt of X)tt.status==="fulfilled"?q.push(tt.value):q.push(tt.reason);return this.dispatchEvent(new z(k.GEOREFERENCEANNOTATIONADDED)),this.dispatchEvent(new z(k.ZINDICESCHANGES)),q}async removeGeoreferenceAnnotation(W){const q=[],K=Mn(W);for(const X of K){const tt=await this.removeGeoreferencedMapInternal(X);q.push(tt)}return this.dispatchEvent(new z(k.GEOREFERENCEANNOTATIONREMOVED)),q}clear(){var W;this.warpedMapsById=new Map,this.zIndices=new Map,(W=this.rtree)==null||W.clear(),this.dispatchEvent(new z(k.CLEARED))}dispose(){for(const W of this.getWarpedMaps())this.removeEventListenersFromWarpedMap(W),W.dispose()}async addGeoreferencedMapInternal(W){const q=await this.getOrComputeMapId(W),K=new Ql(q,W,this.imageInfoCache);return this.warpedMapsById.set(q,K),this.zIndices.set(q,this.warpedMapsById.size-1),this.addToOrUpdateRtree(K),this.addEventListenersToWarpedMap(K),this.dispatchEvent(new z(k.WARPEDMAPADDED,q)),q}async removeGeoreferencedMapInternal(W){const q=await this.getOrComputeMapId(W),K=this.warpedMapsById.get(q);if(K)this.warpedMapsById.delete(q),this.zIndices.delete(q),this.removeFromRtree(K),this.dispatchEvent(new z(k.WARPEDMAPREMOVED,q)),this.removeZIndexHoles(),this.dispatchEvent(new z(k.ZINDICESCHANGES));else throw new Error(`No map found with ID ${q}`);return q}async getOrComputeMapId(W){return W.id||await To(W)}addToOrUpdateRtree(W){this.rtree&&(this.rtree.removeItem(W.mapId),this.rtree.addItem(W.mapId,W.geoMask))}removeFromRtree(W){this.rtree&&this.rtree.removeItem(W.mapId)}removeZIndexHoles(){const W=[...this.zIndices.entries()].sort((K,X)=>K[1]-X[1]);let q=0;for(const K of W){const X=K[0];this.zIndices.set(X,q),q++}}imageInfoLoaded(){this.dispatchEvent(new z(k.IMAGEINFOLOADED))}addEventListenersToWarpedMap(W){W.addEventListener(k.IMAGEINFOLOADED,this.imageInfoLoaded.bind(this))}removeEventListenersFromWarpedMap(W){W.removeEventListener(k.IMAGEINFOLOADED,this.imageInfoLoaded.bind(this))}}class Hu extends EventTarget{constructor(W,q,K,X,tt=1){super(),this.projectedGeoToViewportTransform=[1,0,0,1,0,0],this.projectedGeoToClipTransform=[1,0,0,1,0,0],this.projectedGeoCenter=W,this.projectedGeoPerViewportScale=X,this.rotation=K,this.viewportSize=q,this.devicePixelRatio=tt,this.projectedGeoRectangle=this.computeProjectedGeoRectangle(this.projectedGeoCenter,this.projectedGeoPerViewportScale,this.rotation,this.viewportSize),this.projectedGeoBbox=st(this.projectedGeoRectangle),this.projectedGeoSize=[this.viewportSize[0]*X,this.viewportSize[1]*X],this.geoCenter=ui(this.projectedGeoCenter),this.geoRectangle=this.projectedGeoRectangle.map(rt=>ui(rt)),this.geoBbox=st(this.geoRectangle),this.geoSize=Ir(this.geoBbox),this.viewportCenter=[this.viewportSize[0]/2,this.viewportSize[1]/2],this.viewportBbox=[0,0,...this.viewportSize],this.viewportRectangle=De(this.viewportBbox),this.canvasCenter=[this.viewportCenter[0]*this.devicePixelRatio,this.viewportSize[1]*this.devicePixelRatio],this.canvasSize=[this.viewportSize[0]*this.devicePixelRatio,this.viewportSize[1]*this.devicePixelRatio],this.canvasBbox=[0,0,...this.canvasSize],this.canvasRectangle=De(this.canvasBbox),this.projectedGeoPerCanvasScale=this.projectedGeoPerViewportScale/this.devicePixelRatio,this.projectedGeoToViewportTransform=this.composeProjectedGeoToViewportTransform(),this.projectedGeoToClipTransform=this.composeProjectedGeoToClipTransform()}composeProjectedGeoToViewportTransform(){return xi(this.viewportSize[0]/2,this.viewportSize[1]/2,1/this.projectedGeoPerViewportScale,-1/this.projectedGeoPerViewportScale,-this.rotation,-this.projectedGeoCenter[0],-this.projectedGeoCenter[1])}composeProjectedGeoToClipTransform(){return xi(0,0,2/(this.projectedGeoPerViewportScale*this.viewportSize[0]),2/(this.projectedGeoPerViewportScale*this.viewportSize[1]),-this.rotation,-this.projectedGeoCenter[0],-this.projectedGeoCenter[1])}computeProjectedGeoRectangle(W,q,K,X){const tt=q*X[0]/2,rt=q*X[1]/2,ot=Math.cos(K),ut=Math.sin(K),yn=tt*ot,uo=tt*ut,po=rt*ot,mo=rt*ut,wo=W[0],lf=W[1];return[[wo-yn+mo,lf-uo-po],[wo-yn-mo,lf-uo+po],[wo+yn-mo,lf+uo+po],[wo+yn+mo,lf+uo-po]]}}class Yu extends EventTarget{constructor(W){super(),this.tile=W.tile,this.imageRequest=W.imageRequest,this.tileUrl=W.tileUrl,this.abortController=new AbortController}async fetch(){try{const W=await ch(this.tileUrl,this.abortController.signal);return this.imageBitmap=await createImageBitmap(W),this.dispatchEvent(new z(k.TILEFETCHED,this.tileUrl)),this.imageBitmap}catch(W){W instanceof Error&&W.name==="AbortError"||this.dispatchEvent(new z(k.TILEFETCHERROR,this.tileUrl))}}isCachedTile(){return this.imageBitmap!==void 0}abort(){this.abortController.signal.aborted||this.abortController.abort()}}const Ju=.75;function so(F,W){return`${F}:${W}`}function oo(F){return so(F.mapId,F.tileUrl)}function rn(F){return new Set(F.map(W=>oo(W)))}function Ku(F,W,q={maxOffsetRatio:1e-5,maxDepth:2}){const K=wh(W)[0];return F.transformBackward(K,q)}function Qu(F,W,q=Ju){let K=Number.POSITIVE_INFINITY,X=F.tileZoomLevels.at(-1);for(const tt of F.tileZoomLevels){const rt=Math.abs(Math.log(tt.scaleFactor)-(Math.log(W)-Math.log(q)));rtRi(ot,rt)-Ri(ut,rt)),tt}function ed(F,W){return F.map(q=>[q[0]/W.originalWidth,q[1]/W.originalHeight])}function rd(F){const W={};for(let q=0;q{W[X]||(W[X]=[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]),ttW[X][1]&&(W[X][1]=tt)})}return W}function nd([F,W]){let q=Math.floor(F[0]),K=Math.floor(F[1]);const X=Math.floor(W[0]),tt=Math.floor(W[1]),rt=[[q,K]];if(q===X&&K===tt)return rt;const ot=Math.sign(W[0]-F[0]),ut=Math.sign(W[1]-F[1]),yn=Math.abs(F[0]-q-Math.max(0,ot)),uo=Math.abs(F[1]-K-Math.max(0,ut)),po=Math.abs(F[0]-W[0]),mo=Math.abs(F[1]-W[1]);let wo=yn/po,lf=uo/mo;const yf=1/po,cf=1/mo;for(;!(q===X&&K===tt);)wo=q.columns)break;const rt=Math.max(F[tt][0],0),ot=Math.min(F[tt][1],q.rows-1);for(let ut=rt;ut<=ot;ut++)K.push({column:tt,row:ut,tileZoomLevel:q,imageSize:[W.width,W.height]})}return K}function sd(F){var W,q;return(((W=F.imageRequest.size)==null?void 0:W.height)||0)*(((q=F.imageRequest.size)==null?void 0:q.width)||0)*3}function Ri(F,W){return jt(od(F),W)}function od(F){const W=ao(F);return[(W[2]-W[0])/2+W[0],(W[3]-W[1])/2+W[1]]}function ad(F){const W=F.column*F.tileZoomLevel.originalWidth,q=F.row*F.tileZoomLevel.originalHeight;return[W,q]}function ao(F){const W=ad(F),q=Math.min(W[0]+F.tileZoomLevel.originalWidth,F.imageSize[0]),K=Math.min(W[1]+F.tileZoomLevel.originalHeight,F.imageSize[1]);return[W[0],W[1],q,K]}const hd=50,cd=32*1e3*1e3;class ld extends EventTarget{constructor(){super(...arguments),this.tilesByTileUrl=new Map,this.mapIdsByTileUrl=new Map,this.tileUrlsByMapId=new Map,this.tilesFetchingCount=0,this.previousRequestedTiles=[],this.outgoingTilesHistory=[]}getCacheableTile(W){return this.tilesByTileUrl.get(W)}getCachedTile(W){const q=this.tilesByTileUrl.get(W);if(q&&q.isCachedTile())return q}getCacheableTiles(){return this.tilesByTileUrl.values()}getCachedTiles(){const W=Array.from(this.tilesByTileUrl.values()),q=[];return W.forEach(K=>{K.isCachedTile()&&q.push(K)}),q}getTileUrls(){return this.tilesByTileUrl.keys()}requestFetcableMapTiles(W){const q=rn(this.previousRequestedTiles),K=rn(W);if(Mh(q,K))return;const X=[];for(const ot of this.previousRequestedTiles)K.has(oo(ot))||X.push(ot);this.updateOutgoingTilesHistory(X,W.length);const tt=rn(this.outgoingTilesHistory),rt=new Set([...K,...tt]);for(const[ot,ut]of this.mapIdsByTileUrl)for(const yn of ut)rt.has(so(yn,ot))||this.removeMapTile(yn,ot);for(const ot of W)this.addMapTile(ot);this.previousRequestedTiles=W}clear(){this.tilesByTileUrl=new Map,this.mapIdsByTileUrl=new Map,this.tileUrlsByMapId=new Map,this.tilesFetchingCount=0,this.outgoingTilesHistory=[]}dispose(){for(const W of this.getCacheableTiles())this.removeEventListenersFromTile(W)}addMapTile(W){const q=W.mapId,K=W.tileUrl;if(this.tilesByTileUrl.has(K))this.dispatchEvent(new z(k.MAPTILELOADED,{mapId:q,tileUrl:K}));else{const X=new Yu(W);this.addEventListenersToTile(X),this.tilesByTileUrl.set(K,X),this.updateTilesFetchingCount(1),X.fetch()}this.addTileUrlForMapId(q,K),this.addMapIdForTileUrl(q,K)}removeMapTile(W,q){const K=this.tilesByTileUrl.get(q);if(!K)return;const X=this.removeMapIdForTileUrl(W,q);this.removeTileUrlForMapId(W,q),X.size||(K.isCachedTile()||(K.abort(),this.updateTilesFetchingCount(-1)),this.tilesByTileUrl.delete(q)),this.dispatchEvent(new z(k.MAPTILEREMOVED,{mapId:W,tileUrl:q}))}updateOutgoingTilesHistory(W,q){for(let rt=W.length-1;rt>=0;rt--){const ot=W[rt];this.outgoingTilesHistory.unshift(ot)}this.outgoingTilesHistory=Array.from(new Set(this.outgoingTilesHistory));let K=0,X=0,tt=0;for(const rt of this.outgoingTilesHistory){if(K+=1,tt=sd(rt),X+=tt,K+q>hd){K-=1,X-=tt;break}if(X>cd){K-=1,X-=tt;break}}this.outgoingTilesHistory=this.outgoingTilesHistory.slice(0,K)}tileFetched(W){var q;if(W instanceof z){const K=W.data;this.updateTilesFetchingCount(-1);for(const X of this.mapIdsByTileUrl.get(K)||[])this.dispatchEvent(new z(k.MAPTILELOADED,{mapId:X,tileUrl:K})),((q=this.tileUrlsByMapId.get(X))==null?void 0:q.values().next().value)===K&&this.dispatchEvent(new z(k.FIRSTMAPTILELOADED,{mapId:X,tileUrl:K}))}}tileFetchError(W){if(W instanceof z){const q=W.data;this.tilesByTileUrl.has(q)||(this.updateTilesFetchingCount(-1),this.tilesByTileUrl.delete(q))}}addMapIdForTileUrl(W,q){let K=this.mapIdsByTileUrl.get(q);return K?K.add(W):K=new Set([W]),this.mapIdsByTileUrl.set(q,K),K}removeMapIdForTileUrl(W,q){const K=this.mapIdsByTileUrl.get(q);if(K)K.delete(W);else return new Set;return K.size?this.mapIdsByTileUrl.set(q,K):this.mapIdsByTileUrl.delete(q),K}addTileUrlForMapId(W,q){let K=this.tileUrlsByMapId.get(W);return K?K.add(q):K=new Set([q]),this.tileUrlsByMapId.set(W,K),K}removeTileUrlForMapId(W,q){const K=this.tileUrlsByMapId.get(W);return K?(K.delete(q),K.size?this.tileUrlsByMapId.set(W,K):this.tileUrlsByMapId.delete(W),K):new Set}updateTilesFetchingCount(W){this.tilesFetchingCount+=W,this.tilesFetchingCount===0&&this.dispatchEvent(new z(k.ALLREQUESTEDTILESLOADED))}addEventListenersToTile(W){W.addEventListener(k.TILEFETCHED,this.tileFetched.bind(this)),W.addEventListener(k.TILEFETCHERROR,this.tileFetchError.bind(this))}removeEventListenersFromTile(W){W.removeEventListener(k.TILEFETCHED,this.tileFetched.bind(this)),W.removeEventListener(k.TILEFETCHERROR,this.tileFetchError.bind(this))}}class ud{constructor(W,q){this.mapId=q.mapId,this.tile=W;const K=q.parsedImage.getIiifTile(W.tileZoomLevel,W.column,W.row);this.imageRequest=K;const X=q.parsedImage.getImageUrl(K);this.tileUrl=X}}var dd=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis;const fd=dd;var pd=typeof self=="object"&&self&&self.Object===Object&&self,gd=fd||pd||Function("return this")();const ho=gd;var md=ho.Symbol;const Cr=md;var co=Object.prototype,yd=co.hasOwnProperty,vd=co.toString,me=Cr?Cr.toStringTag:void 0;function wd(F){var W=yd.call(F,me),q=F[me];try{F[me]=void 0;var K=!0}catch{}var X=vd.call(F);return K&&(W?F[me]=q:delete F[me]),X}var xd=Object.prototype,bd=xd.toString;function Td(F){return bd.call(F)}var Md="[object Null]",_d="[object Undefined]",Ci=Cr?Cr.toStringTag:void 0;function Ed(F){return F==null?F===void 0?_d:Md:Ci&&Ci in Object(F)?wd(F):Td(F)}function Id(F){return F!=null&&typeof F=="object"}var Sd="[object Symbol]";function Ad(F){return typeof F=="symbol"||Id(F)&&Ed(F)==Sd}var Rd=/\s/;function Cd(F){for(var W=F.length;W--&&Rd.test(F.charAt(W)););return W}var Pd=/^\s+/;function kd(F){return F&&F.slice(0,Cd(F)+1).replace(Pd,"")}function Pr(F){var W=typeof F;return F!=null&&(W=="object"||W=="function")}var Pi=0/0,Od=/^[-+]0x[0-9a-f]+$/i,Nd=/^0b[01]+$/i,Ld=/^0o[0-7]+$/i,Dd=parseInt;function ki(F){if(typeof F=="number")return F;if(Ad(F))return Pi;if(Pr(F)){var W=typeof F.valueOf=="function"?F.valueOf():F;F=Pr(W)?W+"":W}if(typeof F!="string")return F===0?F:+F;F=kd(F);var q=Nd.test(F);return q||Ld.test(F)?Dd(F.slice(2),q?2:8):Od.test(F)?Pi:+F}var Bd=function(){return ho.Date.now()};const nn$1=Bd;var jd="Expected a function",Gd=Math.max,Fd=Math.min;function Ud(F,W,q){var K,X,tt,rt,ot,ut,yn=0,uo=!1,po=!1,mo=!0;if(typeof F!="function")throw new TypeError(jd);W=ki(W)||0,Pr(q)&&(uo=!!q.leading,po="maxWait"in q,tt=po?Gd(ki(q.maxWait)||0,W):tt,mo="trailing"in q?!!q.trailing:mo);function wo(Cf){var Af=K,Bf=X;return K=X=void 0,yn=Cf,rt=F.apply(Bf,Af),rt}function lf(Cf){return yn=Cf,ot=setTimeout(vf,W),uo?wo(Cf):rt}function yf(Cf){var Af=Cf-ut,Bf=Cf-yn,Hf=W-Af;return po?Fd(Hf,tt-Bf):Hf}function cf(Cf){var Af=Cf-ut,Bf=Cf-yn;return ut===void 0||Af>=W||Af<0||po&&Bf>=tt}function vf(){var Cf=nn$1();if(cf(Cf))return _f(Cf);ot=setTimeout(vf,yf(Cf))}function _f(Cf){return ot=void 0,mo&&K?wo(Cf):(K=X=void 0,rt)}function $f(){ot!==void 0&&clearTimeout(ot),yn=0,K=ut=X=ot=void 0}function wf(){return ot===void 0?rt:_f(nn$1())}function Pf(){var Cf=nn$1(),Af=cf(Cf);if(K=arguments,X=this,ut=Cf,Af){if(ot===void 0)return lf(ut);if(po)return clearTimeout(ot),ot=setTimeout(vf,W),wo(ut)}return ot===void 0&&(ot=setTimeout(vf,W)),rt}return Pf.cancel=$f,Pf.flush=wf,Pf}var Wd="Expected a function";function _n(F,W,q){var K=!0,X=!0;if(typeof F!="function")throw new TypeError(Wd);return Pr(q)&&(K="leading"in q?!!q.leading:K,X="trailing"in q?!!q.trailing:X),Ud(F,W,{leading:K,maxWait:W,trailing:X})}function Vd(F){let W=0,q=0;for(const rt of F)W+=rt.w*rt.h,q=Math.max(q,rt.w);F.sort((rt,ot)=>ot.h-rt.h);const K=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(W/.95)),q),h:1/0}];let X=0,tt=0;for(const rt of F)for(let ot=K.length-1;ot>=0;ot--){const ut=K[ot];if(!(rt.w>ut.w||rt.h>ut.h)){if(rt.x=ut.x,rt.y=ut.y,tt=Math.max(tt,rt.y+rt.h),X=Math.max(X,rt.x+rt.w),rt.w===ut.w&&rt.h===ut.h){const yn=K.pop();otse(this.projectedGeoToClipTransform,X));sr(this.gl,this.program,new Float32Array(W.flat()),2,"a_clipCurrentTrianglePoint");const q=this.warpedMap.projectedGeoNewTrianglePoints.map(X=>se(this.projectedGeoToClipTransform,X));sr(this.gl,this.program,new Float32Array(q.flat()),2,"a_clipNewTrianglePoint");let K=new Float32Array(this.warpedMap.resourceTrianglePoints.length);K=K.map((X,tt)=>Math.round((tt-1)/3)),sr(this.gl,this.program,K,1,"a_triangleIndex")}async updateTextures(){const W=this.gl;if(this.CachedTilesByTileUrl.size===0)return;let q=[...this.CachedTilesByTileUrl.values()];q=q.filter(uo=>this.warpedMap.resourceViewportRingBbox?vh(ao(uo.tile),this.warpedMap.resourceViewportRingBbox):!0);const K=q.length,X=q.map((uo,po)=>({w:uo.imageBitmap.width,h:uo.imageBitmap.height,x:0,y:0,index:po})),{w:tt,h:rt}=Vd(X);W.pixelStorei(W.UNPACK_ALIGNMENT,4),W.bindTexture(W.TEXTURE_2D,this.packedTilesTexture),W.texImage2D(W.TEXTURE_2D,0,W.RGBA,tt,rt,0,W.RGBA,W.UNSIGNED_BYTE,null);for(const uo of X){const po=q[uo.index].imageBitmap;W.texSubImage2D(W.TEXTURE_2D,0,uo.x,uo.y,po.width,po.height,W.RGBA,W.UNSIGNED_BYTE,po)}W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MIN_FILTER,W.LINEAR),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MAG_FILTER,W.LINEAR),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_S,W.CLAMP_TO_EDGE),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_T,W.CLAMP_TO_EDGE);const ot=X.map(uo=>[uo.x,uo.y]);W.bindTexture(W.TEXTURE_2D,this.packedTilesPositionsTexture),W.texImage2D(W.TEXTURE_2D,0,W.RG32I,1,K,0,W.RG_INTEGER,W.INT,new Int32Array(ot.flat())),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MIN_FILTER,W.NEAREST),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MAG_FILTER,W.NEAREST),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_S,W.CLAMP_TO_EDGE),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_T,W.CLAMP_TO_EDGE);const ut=X.map(uo=>{const po=q[uo.index];if(po&&po.imageRequest&&po.imageRequest.region)return[po.imageRequest.region.x,po.imageRequest.region.y,po.imageRequest.region.width,po.imageRequest.region.height]});W.bindTexture(W.TEXTURE_2D,this.packedTilesResourcePositionsAndDimensionsTexture),W.texImage2D(W.TEXTURE_2D,0,W.RGBA32I,1,K,0,W.RGBA_INTEGER,W.INT,new Int32Array(ut.flat())),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MIN_FILTER,W.NEAREST),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MAG_FILTER,W.NEAREST),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_S,W.CLAMP_TO_EDGE),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_T,W.CLAMP_TO_EDGE);const yn=X.map(({index:uo})=>q[uo].tile.tileZoomLevel.scaleFactor);W.bindTexture(W.TEXTURE_2D,this.packedTilesScaleFactorsTexture),W.texImage2D(W.TEXTURE_2D,0,W.R32I,1,K,0,W.RED_INTEGER,W.INT,new Int32Array(yn)),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MIN_FILTER,W.NEAREST),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MAG_FILTER,W.NEAREST),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_S,W.CLAMP_TO_EDGE),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_T,W.CLAMP_TO_EDGE),this.dispatchEvent(new z(k.TEXTURESUPDATED))}}const Yd=`#version 300 es +${ws}`)}function Gh(F,W,q){return(F>=0&&q?` ${fi(F,W-1)}`:fi(F,W)).padEnd(W)}function fi(F,W){let q=F.toString();if(q.length<=W)return q;let K=F.toFixed(W);if(K.length>W&&(K=F.toFixed(Math.max(0,W-(K.length-W)))),K.length<=W&&!K.startsWith("0.000")&&!K.startsWith("-0.000"))return K;let X=F.toExponential(W);return X.length>W&&(X=F.toExponential(Math.max(0,W-(X.length-W)))),X.slice(0)}function Fh(F,W){F.prototype.add=function(q){return typeof q=="number"?this.addS(q):this.addM(q)},F.prototype.addS=function(q){for(let K=0;K>q);return this},F.prototype.signPropagatingRightShiftM=function(q){if(q=W.checkMatrix(q),this.rows!==q.rows||this.columns!==q.columns)throw new RangeError("Matrices dimensions must be equal");for(let K=0;K>q.get(K,X));return this},F.signPropagatingRightShift=function(q,K){return new W(q).signPropagatingRightShift(K)},F.prototype.rightShift=function(q){return typeof q=="number"?this.rightShiftS(q):this.rightShiftM(q)},F.prototype.rightShiftS=function(q){for(let K=0;K>>q);return this},F.prototype.rightShiftM=function(q){if(q=W.checkMatrix(q),this.rows!==q.rows||this.columns!==q.columns)throw new RangeError("Matrices dimensions must be equal");for(let K=0;K>>q.get(K,X));return this},F.rightShift=function(q,K){return new W(q).rightShift(K)},F.prototype.zeroFillRightShift=F.prototype.rightShift,F.prototype.zeroFillRightShiftS=F.prototype.rightShiftS,F.prototype.zeroFillRightShiftM=F.prototype.rightShiftM,F.zeroFillRightShift=F.rightShift,F.prototype.not=function(){for(let q=0;qK)throw new RangeError("Row index out of range")}function bt(F,W,q){let K=q?F.columns:F.columns-1;if(W<0||W>K)throw new RangeError("Column index out of range")}function re(F,W){if(W.to1DArray&&(W=W.to1DArray()),W.length!==F.columns)throw new RangeError("vector size must be the same as the number of columns");return W}function ne(F,W){if(W.to1DArray&&(W=W.to1DArray()),W.length!==F.rows)throw new RangeError("vector size must be the same as the number of rows");return W}function Pn(F,W){if(!yt.isAnyArray(W))throw new TypeError("row indices must be an array");for(let q=0;q=F.rows)throw new RangeError("row indices are out of range")}function kn(F,W){if(!yt.isAnyArray(W))throw new TypeError("column indices must be an array");for(let q=0;q=F.columns)throw new RangeError("column indices are out of range")}function mn(F,W,q,K,X){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(qe("startRow",W),qe("endRow",q),qe("startColumn",K),qe("endColumn",X),W>q||K>X||W<0||W>=F.rows||q<0||q>=F.rows||K<0||K>=F.columns||X<0||X>=F.columns)throw new RangeError("Submatrix indices are out of range")}function Lr(F,W=0){let q=[];for(let K=0;K=tt)throw new RangeError("min must be smaller than max");let ot=tt-X,ut=new P(W,q);for(let yn=0;ynK?(tt=!0,K=q):(X=!1,tt=!0);W++}return X}isReducedEchelonForm(){let W=0,q=0,K=-1,X=!0,tt=!1;for(;WK?(tt=!0,K=q):(X=!1,tt=!0);for(let rt=q+1;rtW.get(X,K)&&(X=tt);if(W.get(X,K)===0)K++;else{W.swapRows(q,X);let tt=W.get(q,K);for(let rt=K;rt=0;)if(W.maxRow(X)===0)X--;else{let tt=0,rt=!1;for(;ttq[K]&&(q[K]=this.get(K,X));return q}case"column":{const q=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let K=0;Kq[X]&&(q[X]=this.get(K,X));return q}case void 0:{let q=this.get(0,0);for(let K=0;Kq&&(q=this.get(K,X));return q}default:throw new Error(`invalid option: ${W}`)}}maxIndex(){Qt(this);let W=this.get(0,0),q=[0,0];for(let K=0;KW&&(W=this.get(K,X),q[0]=K,q[1]=X);return q}min(W){if(this.isEmpty())return NaN;switch(W){case"row":{const q=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let K=0;Kq&&(q=this.get(W,K));return q}maxRowIndex(W){xt(this,W),Qt(this);let q=this.get(W,0),K=[W,0];for(let X=1;Xq&&(q=this.get(W,X),K[1]=X);return K}minRow(W){if(xt(this,W),this.isEmpty())return NaN;let q=this.get(W,0);for(let K=1;Kq&&(q=this.get(K,W));return q}maxColumnIndex(W){bt(this,W),Qt(this);let q=this.get(0,W),K=[0,W];for(let X=1;Xq&&(q=this.get(X,W),K[0]=X);return K}minColumn(W){if(bt(this,W),this.isEmpty())return NaN;let q=this.get(0,W);for(let K=1;K=K)throw new RangeError("min must be smaller than max");let X=new P(this.rows,this.columns);for(let tt=0;tt0&&di(rt,{min:q,max:K,output:rt}),X.setRow(tt,rt)}return X}scaleColumns(W={}){if(typeof W!="object")throw new TypeError("options must be an object");const{min:q=0,max:K=1}=W;if(!Number.isFinite(q))throw new TypeError("min must be a number");if(!Number.isFinite(K))throw new TypeError("max must be a number");if(q>=K)throw new RangeError("min must be smaller than max");let X=new P(this.rows,this.columns);for(let tt=0;ttK||q<0||q>=this.columns||K<0||K>=this.columns)throw new RangeError("Argument out of range");let X=new P(W.length,K-q+1);for(let tt=0;tt=this.rows)throw new RangeError(`Row index out of range: ${W[tt]}`);X.set(tt,rt-q,this.get(W[tt],rt))}return X}subMatrixColumn(W,q,K){if(q===void 0&&(q=0),K===void 0&&(K=this.rows-1),q>K||q<0||q>=this.rows||K<0||K>=this.rows)throw new RangeError("Argument out of range");let X=new P(K-q+1,W.length);for(let tt=0;tt=this.columns)throw new RangeError(`Column index out of range: ${W[tt]}`);X.set(rt-q,tt,this.get(rt,W[tt]))}return X}setSubMatrix(W,q,K){if(W=P.checkMatrix(W),W.isEmpty())return this;let X=q+W.rows-1,tt=K+W.columns-1;mn(this,q,X,K,tt);for(let rt=0;rttypeof W=="number")}j.random=j.rand;j.randomInt=j.randInt;j.diagonal=j.diag;j.prototype.diagonal=j.prototype.diag;j.identity=j.eye;j.prototype.negate=j.prototype.neg;j.prototype.tensorProduct=j.prototype.kroneckerProduct;var He,qr,Ye;let P=(Ye=class extends j{constructor(F,W){if(super(),Te(this,He),Ah(this,"data"),Ye.isMatrix(F))le(this,He,qr).call(this,F.rows,F.columns),Ye.copy(F,this);else if(Number.isInteger(F)&&F>=0)le(this,He,qr).call(this,F,W);else if(yt.isAnyArray(F)){const q=F;if(F=q.length,W=F?q[0].length:0,typeof W!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let K=0;K"u"&&(W=F,F=this.columns),bt(this,F,!0),W=ne(this,W);for(let q=0;q=0)for(let q=0;q=0)Xr(this,dt,new P(W,W));else if(Xr(this,dt,new P(W)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return St(this,dt).size}get rows(){return St(this,dt).rows}get columns(){return St(this,dt).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(W){return P.isMatrix(W)&&W.klassType==="SymmetricMatrix"}static zeros(W){return new this(W)}static ones(W){return new this(W).fill(1)}clone(){const W=new dI(this.diagonalSize);for(const[q,K,X]of this.upperRightEntries())W.set(q,K,X);return W}toMatrix(){return new P(this)}get(W,q){return St(this,dt).get(W,q)}set(W,q,K){return St(this,dt).set(W,q,K),St(this,dt).set(q,W,K),this}removeCross(W){return St(this,dt).removeRow(W),St(this,dt).removeColumn(W),this}addCross(W,q){q===void 0&&(q=W,W=this.diagonalSize);const K=q.slice();return K.splice(W,1),St(this,dt).addRow(W,K),St(this,dt).addColumn(W,q),this}applyMask(W){if(W.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const q=[];for(const[K,X]of W.entries())X||q.push(K);q.reverse();for(const K of q)this.removeCross(K);return this}toCompact(){const{diagonalSize:W}=this,q=new Array(W*(W+1)/2);for(let K=0,X=0,tt=0;tt=W&&(K=++X);return q}static fromCompact(W){const q=W.length,K=(Math.sqrt(8*q+1)-1)/2;if(!Number.isInteger(K))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(W)}`);const X=new dI(K);for(let tt=0,rt=0,ot=0;ot=K&&(tt=++rt);return X}*upperRightEntries(){for(let W=0,q=0;W=this.diagonalSize&&(q=++W)}}*upperRightValues(){for(let W=0,q=0;W=this.diagonalSize&&(q=++W)}};dt=new WeakMap;let Me=oc;Me.prototype.klassType="SymmetricMatrix";class Dr extends Me{static isDistanceMatrix(W){return Me.isSymmetricMatrix(W)&&W.klassSubType==="DistanceMatrix"}constructor(W){if(super(W),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set(W,q,K){return W===q&&(K=0),super.set(W,q,K)}addCross(W,q){return q===void 0&&(q=W,W=this.diagonalSize),q=q.slice(),q[W]=0,super.addCross(W,q)}toSymmetricMatrix(){return new Me(this)}clone(){const W=new Dr(this.diagonalSize);for(const[q,K,X]of this.upperRightEntries())q!==K&&W.set(q,K,X);return W}toCompact(){const{diagonalSize:W}=this,q=(W-1)*W/2,K=new Array(q);for(let X=1,tt=0,rt=0;rt=W&&(X=++tt+1);return K}static fromCompact(W){const q=W.length,K=(Math.sqrt(8*q+1)+1)/2;if(!Number.isInteger(K))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(W)}`);const X=new this(K);for(let tt=1,rt=0,ot=0;ot=K&&(tt=++rt+1);return X}}Dr.prototype.klassSubType="DistanceMatrix";class Ft extends j{constructor(W,q,K){super(),this.matrix=W,this.rows=q,this.columns=K}}class ac extends Ft{constructor(W,q){bt(W,q),super(W,W.rows,1),this.column=q}set(W,q,K){return this.matrix.set(W,this.column,K),this}get(W){return this.matrix.get(W,this.column)}}class hc extends Ft{constructor(W,q){kn(W,q),super(W,W.rows,q.length),this.columnIndices=q}set(W,q,K){return this.matrix.set(W,this.columnIndices[q],K),this}get(W,q){return this.matrix.get(W,this.columnIndices[q])}}class cc extends Ft{constructor(W){super(W,W.rows,W.columns)}set(W,q,K){return this.matrix.set(W,this.columns-q-1,K),this}get(W,q){return this.matrix.get(W,this.columns-q-1)}}class lc extends Ft{constructor(W){super(W,W.rows,W.columns)}set(W,q,K){return this.matrix.set(this.rows-W-1,q,K),this}get(W,q){return this.matrix.get(this.rows-W-1,q)}}class uc extends Ft{constructor(W,q){xt(W,q),super(W,1,W.columns),this.row=q}set(W,q,K){return this.matrix.set(this.row,q,K),this}get(W,q){return this.matrix.get(this.row,q)}}class dc extends Ft{constructor(W,q){Pn(W,q),super(W,q.length,W.columns),this.rowIndices=q}set(W,q,K){return this.matrix.set(this.rowIndices[W],q,K),this}get(W,q){return this.matrix.get(this.rowIndices[W],q)}}class ar extends Ft{constructor(W,q,K){Pn(W,q),kn(W,K),super(W,q.length,K.length),this.rowIndices=q,this.columnIndices=K}set(W,q,K){return this.matrix.set(this.rowIndices[W],this.columnIndices[q],K),this}get(W,q){return this.matrix.get(this.rowIndices[W],this.columnIndices[q])}}class fc extends Ft{constructor(W,q,K,X,tt){mn(W,q,K,X,tt),super(W,K-q+1,tt-X+1),this.startRow=q,this.startColumn=X}set(W,q,K){return this.matrix.set(this.startRow+W,this.startColumn+q,K),this}get(W,q){return this.matrix.get(this.startRow+W,this.startColumn+q)}}class pc extends Ft{constructor(W){super(W,W.columns,W.rows)}set(W,q,K){return this.matrix.set(q,W,K),this}get(W,q){return this.matrix.get(q,W)}}class bs extends j{constructor(W,q={}){const{rows:K=1}=q;if(W.length%K!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=K,this.columns=W.length/K,this.data=W}set(W,q,K){let X=this._calculateIndex(W,q);return this.data[X]=K,this}get(W,q){let K=this._calculateIndex(W,q);return this.data[K]}_calculateIndex(W,q){return W*this.columns+q}}class vt extends j{constructor(W){super(),this.data=W,this.rows=W.length,this.columns=W[0].length}set(W,q,K){return this.data[W][q]=K,this}get(W,q){return this.data[W][q]}}function gc(F,W){if(yt.isAnyArray(F))return F[0]&&yt.isAnyArray(F[0])?new vt(F):new bs(F,W);throw new Error("the argument is not an array")}class Br{constructor(W){W=vt.checkMatrix(W);let q=W.clone(),K=q.rows,X=q.columns,tt=new Float64Array(K),rt=1,ot,ut,yn,uo,po,mo,wo,lf,yf;for(ot=0;otMath.abs(lf[uo])&&(uo=ot);if(uo!==ut){for(yn=0;yn=0;ut--){for(ot=0;otrt?X.set(tt,rt,W.get(tt,rt)):tt===rt?X.set(tt,rt,1):X.set(tt,rt,0);return X}get upperTriangularMatrix(){let W=this.LU,q=W.rows,K=W.columns,X=new P(q,K);for(let tt=0;ttMath.abs(W)?(q=W/F,Math.abs(F)*Math.sqrt(1+q*q)):W!==0?(q=F/W,Math.abs(W)*Math.sqrt(1+q*q)):0}class On{constructor(W){W=vt.checkMatrix(W);let q=W.clone(),K=W.rows,X=W.columns,tt=new Float64Array(X),rt,ot,ut,yn;for(ut=0;ut=0;yn--){for(ut=0;ut=0;ot--){for(tt=0;tt=0;Df--)if(lf[Df]!==0){for(let Lf=Df+1;Lf=0;Df--){if(Df0;){let Df,Lf;for(Df=Pf-2;Df>=-1&&Df!==-1;Df--){const kf=Number.MIN_VALUE+Hf*Math.abs(lf[Df]+Math.abs(lf[Df+1]));if(Math.abs(vf[Df])<=kf||Number.isNaN(vf[Df])){vf[Df]=0;break}}if(Df===Pf-2)Lf=4;else{let kf;for(kf=Pf-1;kf>=Df&&kf!==Df;kf--){let Nf=(kf!==Pf?Math.abs(vf[kf]):0)+(kf!==Df+1?Math.abs(vf[kf-1]):0);if(Math.abs(lf[kf])<=Hf*Nf){lf[kf]=0;break}}kf===Df?Lf=3:kf===Pf-1?Lf=1:(Lf=2,Df=kf)}switch(Df++,Lf){case 1:{let kf=vf[Pf-2];vf[Pf-2]=0;for(let Nf=Pf-2;Nf>=Df;Nf--){let Yf=Dt(lf[Nf],kf),Gf=lf[Nf]/Yf,rp=kf/Yf;if(lf[Nf]=Yf,Nf!==Df&&(kf=-rp*vf[Nf-1],vf[Nf-1]=Gf*vf[Nf-1]),yn)for(let ip=0;ip=lf[Df+1]);){let kf=lf[Df];if(lf[Df]=lf[Df+1],lf[Df+1]=kf,yn&&Dfq&&tt.set(uo,po,W.get(uo,po)/this.s[po]);let rt=this.U,ot=rt.rows,ut=rt.columns,yn=new P(K,ot);for(let uo=0;uoW&&q++;return q}get diagonal(){return Array.from(this.s)}get threshold(){return Number.EPSILON/2*Math.max(this.m,this.n)*this.s[0]}get leftSingularVectors(){return this.U}get rightSingularVectors(){return this.V}get diagonalMatrix(){return P.diag(this.s)}};function mc(F,W=!1){return F=vt.checkMatrix(F),W?new de$2(F).inverse():Ts(F,P.eye(F.rows))}function Ts(F,W,q=!1){return F=vt.checkMatrix(F),W=vt.checkMatrix(W),q?new de$2(F).solve(W):F.isSquare()?new Br(F).solve(W):new On(F).solve(W)}function hr(F){if(F=P.checkMatrix(F),F.isSquare()){if(F.columns===0)return 1;let W,q,K,X;if(F.columns===2)return W=F.get(0,0),q=F.get(0,1),K=F.get(1,0),X=F.get(1,1),W*X-q*K;if(F.columns===3){let tt,rt,ot;return tt=new ar(F,[1,2],[1,2]),rt=new ar(F,[1,2],[0,2]),ot=new ar(F,[1,2],[0,1]),W=F.get(0,0),q=F.get(0,1),K=F.get(0,2),W*hr(tt)-q*hr(rt)+K*hr(ot)}else return new Br(F).determinant}else throw Error("determinant can only be calculated for a square matrix")}function yc(F,W){let q=[];for(let K=0;KX)return new Array(W.rows+1).fill(0);{let tt=W.addRow(q,[0]);for(let rt=0;rtW?tt[rt]=1/tt[rt]:tt[rt]=0;return X.mmul(P.diag(tt).mmul(K.transpose()))}function bc(F,W=F,q={}){F=new P(F);let K=!1;if(typeof W=="object"&&!P.isMatrix(W)&&!yt.isAnyArray(W)?(q=W,W=F,K=!0):W=new P(W),F.rows!==W.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:X=!0}=q;X&&(F=F.center("column"),K||(W=W.center("column")));const tt=F.transpose().mmul(W);for(let rt=0;rt0?X.set(tt,tt+1,q[tt]):q[tt]<0&&X.set(tt,tt-1,q[tt])}return X}}function Mc(F,W,q,K){let X,tt,rt,ot,ut,yn,uo,po;for(ut=0;ut0;ot--){for(po=0,rt=0,yn=0;yn0&&(tt=-tt),W[ot]=po*tt,rt=rt-X*tt,q[ot-1]=X-tt,ut=0;utyn)do{for(X=q[yn],po=(q[yn+1]-X)/(2*W[yn]),mo=Dt(po,1),po<0&&(mo=-mo),q[yn]=W[yn]/(po+mo),q[yn+1]=W[yn]*(po+mo),wo=q[yn+1],tt=X-q[yn],rt=yn+2;rt=yn;rt--)for(cf=yf,yf=lf,$f=_f,X=lf*W[rt],tt=lf*po,mo=Dt(po,W[rt]),W[rt+1]=_f*mo,_f=W[rt]/mo,lf=po/mo,po=lf*q[rt]-_f*X,q[rt+1]=tt+_f*(lf*X+_f*q[rt]),ut=0;utCf*Af);q[yn]=q[yn]+xf,W[yn]=0}for(rt=0;rt=po;yn--)q[yn]=W.get(yn,po-1)/mo,ut+=q[yn]*q[yn];for(ot=Math.sqrt(ut),q[po]>0&&(ot=-ot),ut=ut-q[po]*ot,q[po]=q[po]-ot,uo=po;uo=po;yn--)rt+=q[yn]*W.get(yn,uo);for(rt=rt/ut,yn=po;yn<=tt;yn++)W.set(yn,uo,W.get(yn,uo)-rt*q[yn])}for(yn=0;yn<=tt;yn++){for(rt=0,uo=tt;uo>=po;uo--)rt+=q[uo]*W.get(yn,uo);for(rt=rt/ut,uo=po;uo<=tt;uo++)W.set(yn,uo,W.get(yn,uo)-rt*q[uo])}q[po]=mo*q[po],W.set(po,po-1,mo*ot)}}for(yn=0;yn=X+1;po--)if(W.get(po,po-1)!==0){for(yn=po+1;yn<=tt;yn++)q[yn]=W.get(yn,po-1);for(uo=po;uo<=tt;uo++){for(ot=0,yn=po;yn<=tt;yn++)ot+=q[yn]*K.get(yn,uo);for(ot=ot/q[po]/W.get(po,po-1),yn=po;yn<=tt;yn++)K.set(yn,uo,K.get(yn,uo)+ot*q[yn])}}}function Ic(F,W,q,K,X){let tt=F-1,rt=0,ot=F-1,ut=Number.EPSILON,yn=0,uo=0,po=0,mo=0,wo=0,lf=0,yf=0,cf=0,vf,_f,$f,xf,Af,Cf,Pf,Bf,Hf,Df,Lf,kf,Nf,Yf,Gf;for(vf=0;vfot)&&(q[vf]=X.get(vf,vf),W[vf]=0),_f=Math.max(vf-1,0);_f=rt;){for(xf=tt;xf>rt&&(lf=Math.abs(X.get(xf-1,xf-1))+Math.abs(X.get(xf,xf)),lf===0&&(lf=uo),!(Math.abs(X.get(xf,xf-1))=0){for(yf=po>=0?po+yf:po-yf,q[tt-1]=Bf+yf,q[tt]=q[tt-1],yf!==0&&(q[tt]=Bf-Pf/yf),W[tt-1]=0,W[tt]=0,Bf=X.get(tt,tt-1),lf=Math.abs(Bf)+Math.abs(yf),po=Bf/lf,mo=yf/lf,wo=Math.sqrt(po*po+mo*mo),po=po/wo,mo=mo/wo,_f=tt-1;_f0)){for(lf=Math.sqrt(lf),Hf=xf&&(yf=X.get(Af,Af),wo=Bf-yf,lf=Hf-yf,po=(wo*lf-Pf)/X.get(Af+1,Af)+X.get(Af,Af+1),mo=X.get(Af+1,Af+1)-yf-wo-lf,wo=X.get(Af+2,Af+1),lf=Math.abs(po)+Math.abs(mo)+Math.abs(wo),po=po/lf,mo=mo/lf,wo=wo/lf,!(Af===xf||Math.abs(X.get(Af,Af-1))*(Math.abs(mo)+Math.abs(wo))Af+2&&X.set(vf,vf-3,0);for($f=Af;$f<=tt-1&&(Yf=$f!==tt-1,$f!==Af&&(po=X.get($f,$f-1),mo=X.get($f+1,$f-1),wo=Yf?X.get($f+2,$f-1):0,Bf=Math.abs(po)+Math.abs(mo)+Math.abs(wo),Bf!==0&&(po=po/Bf,mo=mo/Bf,wo=wo/Bf)),Bf!==0);$f++)if(lf=Math.sqrt(po*po+mo*mo+wo*wo),po<0&&(lf=-lf),lf!==0){for($f!==Af?X.set($f,$f-1,-lf*Bf):xf!==Af&&X.set($f,$f-1,-X.get($f,$f-1)),po=po+lf,Bf=po/lf,Hf=mo/lf,yf=wo/lf,mo=mo/po,wo=wo/po,_f=$f;_f=0;tt--)if(po=q[tt],mo=W[tt],mo===0)for(xf=tt,X.set(tt,tt,1),vf=tt-1;vf>=0;vf--){for(Pf=X.get(vf,vf)-po,wo=0,_f=xf;_f<=tt;_f++)wo=wo+X.get(vf,_f)*X.get(_f,tt);if(W[vf]<0)yf=Pf,lf=wo;else if(xf=vf,W[vf]===0?X.set(vf,tt,Pf!==0?-wo/Pf:-wo/(ut*uo)):(Bf=X.get(vf,vf+1),Hf=X.get(vf+1,vf),mo=(q[vf]-po)*(q[vf]-po)+W[vf]*W[vf],Cf=(Bf*lf-yf*wo)/mo,X.set(vf,tt,Cf),X.set(vf+1,tt,Math.abs(Bf)>Math.abs(yf)?(-wo-Pf*Cf)/Bf:(-lf-Hf*Cf)/yf)),Cf=Math.abs(X.get(vf,tt)),ut*Cf*Cf>1)for(_f=vf;_f<=tt;_f++)X.set(_f,tt,X.get(_f,tt)/Cf)}else if(mo<0)for(xf=tt-1,Math.abs(X.get(tt,tt-1))>Math.abs(X.get(tt-1,tt))?(X.set(tt-1,tt-1,mo/X.get(tt,tt-1)),X.set(tt-1,tt,-(X.get(tt,tt)-po)/X.get(tt,tt-1))):(Gf=Je(0,-X.get(tt-1,tt),X.get(tt-1,tt-1)-po,mo),X.set(tt-1,tt-1,Gf[0]),X.set(tt-1,tt,Gf[1])),X.set(tt,tt-1,0),X.set(tt,tt,1),vf=tt-2;vf>=0;vf--){for(Df=0,Lf=0,_f=xf;_f<=tt;_f++)Df=Df+X.get(vf,_f)*X.get(_f,tt-1),Lf=Lf+X.get(vf,_f)*X.get(_f,tt);if(Pf=X.get(vf,vf)-po,W[vf]<0)yf=Pf,wo=Df,lf=Lf;else if(xf=vf,W[vf]===0?(Gf=Je(-Df,-Lf,Pf,mo),X.set(vf,tt-1,Gf[0]),X.set(vf,tt,Gf[1])):(Bf=X.get(vf,vf+1),Hf=X.get(vf+1,vf),kf=(q[vf]-po)*(q[vf]-po)+W[vf]*W[vf]-mo*mo,Nf=(q[vf]-po)*2*mo,kf===0&&Nf===0&&(kf=ut*uo*(Math.abs(Pf)+Math.abs(mo)+Math.abs(Bf)+Math.abs(Hf)+Math.abs(yf))),Gf=Je(Bf*wo-yf*Df+mo*Lf,Bf*lf-yf*Lf-mo*Df,kf,Nf),X.set(vf,tt-1,Gf[0]),X.set(vf,tt,Gf[1]),Math.abs(Bf)>Math.abs(yf)+Math.abs(mo)?(X.set(vf+1,tt-1,(-Df-Pf*X.get(vf,tt-1)+mo*X.get(vf,tt))/Bf),X.set(vf+1,tt,(-Lf-Pf*X.get(vf,tt)-mo*X.get(vf,tt-1))/Bf)):(Gf=Je(-wo-Hf*X.get(vf,tt-1),-lf-Hf*X.get(vf,tt),yf,mo),X.set(vf+1,tt-1,Gf[0]),X.set(vf+1,tt,Gf[1]))),Cf=Math.max(Math.abs(X.get(vf,tt-1)),Math.abs(X.get(vf,tt))),ut*Cf*Cf>1)for(_f=vf;_f<=tt;_f++)X.set(_f,tt-1,X.get(_f,tt-1)/Cf),X.set(_f,tt,X.get(_f,tt)/Cf)}for(vf=0;vfot)for(_f=vf;_f=rt;_f--)for(vf=rt;vf<=ot;vf++){for(yf=0,$f=rt;$f<=Math.min(_f,ot);$f++)yf=yf+K.get(vf,$f)*X.get($f,_f);K.set(vf,_f,yf)}}}function Je(F,W,q,K){let X,tt;return Math.abs(q)>Math.abs(K)?(X=K/q,tt=q+X*K,[(F+X*W)/tt,(W-X*F)/tt]):(X=q/K,tt=K+X*q,[(X*F+W)/tt,(X*W-F)/tt])}class _s{constructor(W){if(W=vt.checkMatrix(W),!W.isSymmetric())throw new Error("Matrix is not symmetric");let q=W,K=q.rows,X=new P(K,K),tt=!0,rt,ot,ut;for(ot=0;ot0,X.set(ot,ot,Math.sqrt(Math.max(yn,0))),ut=ot+1;ut=0;ut--)for(ot=0;otrt;wo++)po=W.transpose().mmul(ot).div(ot.transpose().mmul(ot).get(0,0)),po=po.div(po.norm()),yn=W.mmul(po).div(po.transpose().mmul(po).get(0,0)),wo>0&&(ut=yn.clone().sub(mo).pow(2).sum()),mo=yn.clone(),K?(uo=K.transpose().mmul(yn).div(yn.transpose().mmul(yn).get(0,0)),uo=uo.div(uo.norm()),ot=K.mmul(uo).div(uo.transpose().mmul(uo).get(0,0))):ot=yn;if(K){let wo=W.transpose().mmul(yn).div(yn.transpose().mmul(yn).get(0,0));wo=wo.div(wo.norm());let lf=W.clone().sub(yn.clone().mmul(wo.transpose())),yf=ot.transpose().mmul(yn).div(yn.transpose().mmul(yn).get(0,0)),cf=K.clone().sub(yn.clone().mulS(yf.get(0,0)).mmul(uo.transpose()));this.t=yn,this.p=wo.transpose(),this.w=po.transpose(),this.q=uo,this.u=ot,this.s=yn.transpose().mmul(yn),this.xResidual=lf,this.yResidual=cf,this.betas=yf}else this.w=po.transpose(),this.s=yn.transpose().mmul(yn).sqrt(),X?this.t=yn.clone().div(this.s.get(0,0)):this.t=yn,this.xResidual=W.sub(yn.mmul(po.transpose()))}}$$S.AbstractMatrix=j;$$S.CHO=_s;$$S.CholeskyDecomposition=_s;$$S.DistanceMatrix=Dr;$$S.EVD=Ms;$$S.EigenvalueDecomposition=Ms;$$S.LU=Br;$$S.LuDecomposition=Br;var Sc=$$S.Matrix=P;$$S.MatrixColumnSelectionView=hc;$$S.MatrixColumnView=ac;$$S.MatrixFlipColumnView=cc;$$S.MatrixFlipRowView=lc;$$S.MatrixRowSelectionView=dc;$$S.MatrixRowView=uc;$$S.MatrixSelectionView=ar;$$S.MatrixSubView=fc;$$S.MatrixTransposeView=pc;$$S.NIPALS=Es;$$S.Nipals=Es;$$S.QR=On;$$S.QrDecomposition=On;$$S.SVD=de$2;var Ac=$$S.SingularValueDecomposition=de$2;$$S.SymmetricMatrix=Me;$$S.WrapperMatrix1D=bs;$$S.WrapperMatrix2D=vt;$$S.correlation=Tc;$$S.covariance=bc;var gi=$$S.default=P;$$S.determinant=hr;var Rc=$$S.inverse=mc;$$S.linearDependencies=wc;var Cc=$$S.pseudoInverse=xc;$$S.solve=Ts;$$S.wrap=gc;const ht=Sc,Pc=Ac;gi.Matrix&&gi.Matrix;const kc=Rc,Is=Cc;class Oc{constructor(W,q){if(this.sourcePoints=W,this.destinationPoints=q,this.pointCount=this.sourcePoints.length,this.pointCount<2)throw new Error("Not enough control points. A helmert transformation requires a minimum of 2 points, but "+this.pointCount+" are given.");const K=ht.columnVector(q.flat()),X=ht.zeros(2*this.pointCount,4);for(let rt=0;rt3)throw new Error("Only polynomial transformations of order 1, 2 or 3 are supported");const X=[ht.columnVector(q.map(ot=>ot[0])),ht.columnVector(q.map(ot=>ot[1]))],tt=ht.zeros(this.pointCount,this.nCoefs);for(let ot=0;otpo[0])),ht.columnVector([...q,[0,0],[0,0],[0,0]].map(po=>po[1]))],ot=ht.zeros(this.pointCount,this.pointCount);for(let po=0;po=this.pointCount&&mo=this.pointCount&&yn.set(po,mo,ut.get(po,mo-this.pointCount));const uo=kc(yn);this.weightsMatrices=[uo.mmul(rt[0]),uo.mmul(rt[1])]}interpolate(W){if(!this.weightsMatrices)throw new Error("Weights not computed");const q=ht.zeros(this.pointCount,1);for(let X=0;X({source:ot,destination:F.transformForward(ot)})),tt=Gr(X,!1),rt=Ss(F,tt,K);return Fr(rt,!0).map(ot=>ot.destination)}function Qe(F,W,q){const K=jr(q);W=gs(W);const X=W.map(ot=>({source:F.transformBackward(ot),destination:ot})),tt=Gr(X,!1),rt=As(F,tt,K);return Fr(rt,!0).map(ot=>ot.source)}function Gc(F,W,q){const K=jr(q);W=An(W);const X=W.map(ot=>({source:ot,destination:F.transformForward(ot)})),tt=Gr(X,!0),rt=Ss(F,tt,K);return Fr(rt,!1).map(ot=>ot.destination)}function Fc(F,W,q){const K=jr(q);W=An(W);const X=W.map(ot=>({source:F.transformBackward(ot),destination:ot})),tt=Gr(X,!0),rt=As(F,tt,K);return Fr(rt,!1).map(ot=>ot.source)}function tr(F,W,q){return W.map(K=>Gc(F,K,q))}function er$1(F,W,q){return W.map(K=>Fc(F,K,q))}function Gr(F,W=!1){const q=F.length-(W?0:1),K=[];for(let X=0;XK.from);return W&&q.push(F[F.length-1].to),q}function Ss(F,W,q){return q.maxDepth<=0||q.maxOffsetRatio<=0?W:W.map(K=>vn(F,K,q,0)).flat(1)}function As(F,W,q){return q.maxDepth<=0||q.maxOffsetRatio<=0?W:W.map(K=>wn(F,K,q,0)).flat(1)}function vn(F,W,q,K){const X=(q.sourceIsGeographic?(uo,po)=>_r(uo,po).geometry.coordinates:Er)(W.from.source,W.to.source),tt=(q.destinationIsGeographic?(uo,po)=>_r(uo,po).geometry.coordinates:Er)(W.from.destination,W.to.destination),rt=F.transformForward(X),ot=q.destinationIsGeographic?Sn:jt,ut=ot(W.from.destination,W.to.destination),yn=ot(tt,rt);if(Kq.maxOffsetRatio&&ut>0){const uo={source:X,destination:rt};return[vn(F,{from:W.from,to:uo},q,K+1),vn(F,{from:uo,to:W.to},q,K+1)].flat(1)}else return W}function wn(F,W,q,K){const X=(q.destinationIsGeographic?(uo,po)=>_r(uo,po).geometry.coordinates:Er)(W.from.destination,W.to.destination),tt=(q.sourceIsGeographic?(uo,po)=>_r(uo,po).geometry.coordinates:Er)(W.from.source,W.to.source),rt=F.transformBackward(X),ot=q.sourceIsGeographic?Sn:jt,ut=ot(W.from.source,W.to.source),yn=ot(tt,rt);if(Kq.maxOffsetRatio&&ut>0){const uo={source:rt,destination:X};return[wn(F,{from:W.from,to:uo},q,K+1),wn(F,{from:uo,to:W.to},q,K+1)].flat(1)}else return W}var xn,Rs,bn,Cs,cr,Yr;class mi{constructor(W,q="polynomial"){if(Te(this,xn),Te(this,bn),Te(this,cr),W.length==0)throw new Error("No control points.");this.gcps=W.map(K=>{if("resource"in K&&"geo"in K)return{source:K.resource,destination:K.geo};if("source"in K&&"destination"in K)return K;throw new Error("Unsupported GCP type")}),this.sourcePoints=this.gcps.map(K=>K.source),this.destinationPoints=this.gcps.map(K=>K.destination),this.type=q}transformForward(W,q){if(mt(W))return this.forwardTransformation||(this.forwardTransformation=le(this,xn,Rs).call(this)),this.forwardTransformation.interpolate(W);if(Ot(W))return this.transformForward(ye(W));if(At(W))return Ke(this,W,q);if(Nt(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),Ke(this,ve(W),q);if(Rt(W))return tr(this,W,q);if(Lt(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),tr(this,we(W),q);throw new Error("Input type not supported")}transformForwardAsGeojson(W,q){if(mt(W))return ze(this.transformForward(W));if(Ot(W))return ze(this.transformForward(ye(W)));if(At(W))return q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),Ze(Ke(this,W,q));if(Nt(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),Ze(Ke(this,ve(W),q));if(Rt(W))return q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),$e(tr(this,W,q));if(Lt(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),$e(tr(this,we(W),q));throw new Error("Input type not supported")}transformBackward(W,q){if(mt(W))return this.backwardTransformation||(this.backwardTransformation=le(this,bn,Cs).call(this)),this.backwardTransformation.interpolate(W);if(Ot(W))return this.transformBackward(ye(W));if(At(W))return Qe(this,W,q);if(Nt(W))return q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),Qe(this,ve(W),q);if(Rt(W))return er$1(this,W,q);if(Lt(W))return q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),er$1(this,we(W),q);throw new Error("Input type not supported")}transformBackwardAsGeojson(W,q){if(mt(W))return ze(this.transformBackward(W));if(Ot(W))return ze(this.transformBackward(ye(W)));if(At(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),Ze(Qe(this,W,q));if(Nt(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),Ze(Qe(this,ve(W),q));if(Rt(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),$e(er$1(this,W,q));if(Lt(W))return q&&!("sourceIsGeographic"in q)&&(q.sourceIsGeographic=!0),q&&!("destinationIsGeographic"in q)&&(q.destinationIsGeographic=!0),$e(er$1(this,we(W),q));throw new Error("Input type not supported")}transformToGeo(W,q){if(mt(W))return this.transformForward(W,q);if(Ot(W))return this.transformForward(W,q);if(At(W))return this.transformForward(W,q);if(Nt(W))return this.transformForward(W,q);if(Rt(W))return this.transformForward(W,q);if(Lt(W))return this.transformForward(W,q);throw new Error("Input type not supported")}transformToGeoAsGeojson(W,q){if(mt(W))return this.transformForwardAsGeojson(W,q);if(Ot(W))return this.transformForwardAsGeojson(W,q);if(At(W))return this.transformForwardAsGeojson(W,q);if(Nt(W))return this.transformForwardAsGeojson(W,q);if(Rt(W))return this.transformForwardAsGeojson(W,q);if(Lt(W))return this.transformForwardAsGeojson(W,q);throw new Error("Input type not supported")}transformToResource(W,q){if(mt(W))return this.transformBackward(W,q);if(Ot(W))return this.transformBackward(W,q);if(At(W))return this.transformBackward(W,q);if(Nt(W))return this.transformBackward(W,q);if(Rt(W))return this.transformBackward(W,q);if(Lt(W))return this.transformBackward(W,q);throw new Error("Input type not supported")}transformToResourceAsGeojson(W,q){if(mt(W))return this.transformBackwardAsGeojson(W,q);if(Ot(W))return this.transformBackwardAsGeojson(W,q);if(At(W))return this.transformBackwardAsGeojson(W,q);if(Nt(W))return this.transformBackwardAsGeojson(W,q);if(Rt(W))return this.transformBackwardAsGeojson(W,q);if(Lt(W))return this.transformBackwardAsGeojson(W,q);throw new Error("Input type not supported")}transformSvgToGeojson(W,q){if(W.type==="circle")return this.transformForwardAsGeojson(W.coordinates);if(W.type==="line")return this.transformForwardAsGeojson(W.coordinates,q);if(W.type==="polyline")return this.transformForwardAsGeojson(W.coordinates,q);if(W.type==="rect")return this.transformForwardAsGeojson([W.coordinates],q);if(W.type==="polygon")return this.transformForwardAsGeojson([W.coordinates],q);throw new Error("Unsupported SVG geometry")}transformGeojsonToSvg(W,q){if(W.type==="Point")return{type:"circle",coordinates:this.transformBackward(W)};if(W.type==="LineString")return{type:"polyline",coordinates:this.transformBackward(W,q)};if(W.type==="Polygon")return{type:"polygon",coordinates:this.transformBackward(W,q)[0]};throw new Error("Unsupported GeoJSON geometry")}}xn=new WeakSet,Rs=function(){return le(this,cr,Yr).call(this,this.sourcePoints,this.destinationPoints)},bn=new WeakSet,Cs=function(){return le(this,cr,Yr).call(this,this.destinationPoints,this.sourcePoints)},cr=new WeakSet,Yr=function(F,W){if(this.type==="helmert")return new Oc(F,W);if(this.type==="polynomial1"||this.type==="polynomial")return new Hr(F,W);if(this.type==="polynomial2")return new Hr(F,W,2);if(this.type==="polynomial3")return new Hr(F,W,3);if(this.type==="projective")return new Nc(F,W);if(this.type==="thinPlateSpline")return new Dc(F,W,Bc,jc);throw new Error(`Unsupported transformation type: ${this.type}`)};function Uc(F){return Math.sqrt(Math.pow(F[1][0]-F[0][0],2)+Math.pow(F[1][1]-F[0][1],2))}function Wc(F){return Math.atan2(F[1][1]-F[0][1],F[1][0]-F[0][0])}function Vc(F,W,q){return[F[0]+Math.cos(q)*W,F[1]+Math.sin(q)*W]}function zc(F,W){let q=F[0];const K=[q];for(;Uc([q,F[1]])>W;){const X=Vc(q,W,Wc(F));K.push(X),q=X}return K}function Zc(F,W){F=[...F,F[0]];let q=[];for(let K=0;K=K?(lf=uo,ot+=1,ot=K?(lf=uo,ot+=1,ot0){if(Pf<=0)return Bf;Hf=Cf+Pf}else if(Cf<0){if(Pf>=0)return Bf;Hf=-(Cf+Pf)}else return Bf;var Df=ot*Hf;return Bf>=Df||Bf<=-Df?Bf:wo($f,xf,Af)},function($f,xf,Af,Cf){var Pf=$f[0]-Cf[0],Bf=xf[0]-Cf[0],Hf=Af[0]-Cf[0],Df=$f[1]-Cf[1],Lf=xf[1]-Cf[1],kf=Af[1]-Cf[1],Nf=$f[2]-Cf[2],Yf=xf[2]-Cf[2],Gf=Af[2]-Cf[2],rp=Bf*kf,ip=Hf*Lf,ap=Hf*Df,yp=Pf*kf,vp=Pf*Lf,Np=Bf*Df,jp=Nf*(rp-ip)+Yf*(ap-yp)+Gf*(vp-Np),Ip=(Math.abs(rp)+Math.abs(ip))*Math.abs(Nf)+(Math.abs(ap)+Math.abs(yp))*Math.abs(Yf)+(Math.abs(vp)+Math.abs(Np))*Math.abs(Gf),Jp=ut*Ip;return jp>Jp||-jp>Jp?jp:lf($f,xf,Af,Cf)}];function cf($f){var xf=yf[$f.length];return xf||(xf=yf[$f.length]=mo($f.length)),xf.apply(void 0,$f)}function vf($f,xf,Af,Cf,Pf,Bf,Hf){return function(Df,Lf,kf,Nf,Yf){switch(arguments.length){case 0:case 1:return 0;case 2:return Cf(Df,Lf);case 3:return Pf(Df,Lf,kf);case 4:return Bf(Df,Lf,kf,Nf);case 5:return Hf(Df,Lf,kf,Nf,Yf)}for(var Gf=new Array(arguments.length),rp=0;rp0;){var _f=(ut+X-1)%X,$f=F[_f];if($f[1]!==K)break;var xf=$f[0];cf=Math.min(cf,xf),vf=Math.max(vf,xf),ut=_f}if(ut===0)return cf<=q&&q<=vf?0:1;rt=ut+1}for(var Af=F[(ut+X-1)%X][1];ot+1=W.value)return this.search_node_=W,W}else for(;W=W.next;)if(F-Ge&&tt0?ur.CCW:ur.CW}fe.orient2d=wl;function xl(F,W,q,K){var X=(F.x-W.x)*(K.y-W.y)-(K.x-W.x)*(F.y-W.y);if(X>=-Ge)return!1;var tt=(F.x-q.x)*(K.y-q.y)-(K.x-q.x)*(F.y-q.y);return!(tt<=Ge)}fe.inScanArea=xl;function bl(F,W,q){var K=W.x-F.x,X=W.y-F.y,tt=q.x-F.x,rt=q.y-F.y;return K*tt+X*rt<0}fe.isAngleObtuse=bl;var jn=ml,Ar=Ln,Ns=Dn,Tl=je.Node,We=fe,Ml=We.EPSILON,et=We.Orientation,it$2=We.orient2d,Ls=We.inScanArea,vi=We.isAngleObtuse;function _l(F){F.initTriangulation(),F.createAdvancingFront(),El(F),Il(F)}function El(F){var W,q=F.pointCount();for(W=1;WW.q.x,!Ds(q.triangle,W.p,W.q)&&(Ll(F,W,q),Gn(F,W.p,W.q,q.triangle,W.q))}function Gn(F,W,q,K,X){if(!Ds(K,W,q)){var tt=K.pointCCW(X),rt=it$2(q,tt,W);if(rt===et.COLLINEAR)throw new Ar("poly2tri EdgeEvent: Collinear not supported!",[q,tt,W]);var ot=K.pointCW(X),ut=it$2(q,ot,W);if(ut===et.COLLINEAR)throw new Ar("poly2tri EdgeEvent: Collinear not supported!",[q,ot,W]);rt===ut?(rt===et.CW?K=K.neighborCCW(X):K=K.neighborCW(X),Gn(F,W,q,K,X)):Wn(F,W,q,K,X)}}function Ds(F,W,q){var K=F.edgeIndex(W,q);if(K!==-1){F.markConstrainedEdgeByIndex(K);var X=F.getNeighbor(K);return X&&X.markConstrainedEdgeByPoints(W,q),!0}return!1}function Rl(F,W,q){var K=new Ns(W,q.point,q.next.point);K.markNeighbor(q.triangle),F.addToMap(K);var X=new Tl(W);return X.next=q.next,X.prev=q,q.next.prev=X,q.next=X,Zt(F,K)||F.mapTriangleToNodes(K),X}function ue(F,W){var q=new Ns(W.prev.point,W.point,W.next.point);q.markNeighbor(W.prev.triangle),q.markNeighbor(W.triangle),F.addToMap(q),W.prev.next=W.next,W.next.prev=W.prev,Zt(F,q)||F.mapTriangleToNodes(q)}function Cl(F,W){for(var q=W.next;q.next&&!vi(q.point,q.next.point,q.prev.point);)ue(F,q),q=q.next;for(q=W.prev;q.prev&&!vi(q.point,q.next.point,q.prev.point);)ue(F,q),q=q.prev;W.next&&W.next.next&&Pl(W)&&Ol(F,W)}function Pl(F){var W=F.point.x-F.next.next.point.x,q=F.point.y-F.next.next.point.y;return jn(q>=0,"unordered y"),W>=0||Math.abs(W)0}function Bs(F,W,q,K){var X,tt,rt,ot;X=F.neighborCCW(W),tt=F.neighborCW(W),rt=q.neighborCCW(K),ot=q.neighborCW(K);var ut,yn,uo,po;ut=F.getConstrainedEdgeCCW(W),yn=F.getConstrainedEdgeCW(W),uo=q.getConstrainedEdgeCCW(K),po=q.getConstrainedEdgeCW(K);var mo,wo,lf,yf;mo=F.getDelaunayEdgeCCW(W),wo=F.getDelaunayEdgeCW(W),lf=q.getDelaunayEdgeCCW(K),yf=q.getDelaunayEdgeCW(K),F.legalize(W,K),q.legalize(K,W),q.setDelaunayEdgeCCW(W,mo),F.setDelaunayEdgeCW(W,wo),F.setDelaunayEdgeCCW(K,lf),q.setDelaunayEdgeCW(K,yf),q.setConstrainedEdgeCCW(W,ut),F.setConstrainedEdgeCW(W,yn),F.setConstrainedEdgeCCW(K,uo),q.setConstrainedEdgeCW(K,po),F.clearNeighbors(),q.clearNeighbors(),X&&q.markNeighbor(X),tt&&F.markNeighbor(tt),rt&&F.markNeighbor(rt),ot&&q.markNeighbor(ot),F.markNeighbor(q)}function Ol(F,W){for(it$2(W.point,W.next.point,W.next.next.point)===et.CCW?F.basin.left_node=W.next.next:F.basin.left_node=W.next,F.basin.bottom_node=F.basin.left_node;F.basin.bottom_node.next&&F.basin.bottom_node.point.y>=F.basin.bottom_node.next.point.y;)F.basin.bottom_node=F.basin.bottom_node.next;if(F.basin.bottom_node!==F.basin.left_node){for(F.basin.right_node=F.basin.bottom_node;F.basin.right_node.next&&F.basin.right_node.point.yF.basin.right_node.point.y,js(F,F.basin.bottom_node))}}function js(F,W){if(!Nl(F,W)){ue(F,W);var q;if(!(W.prev===F.basin.left_node&&W.next===F.basin.right_node)){if(W.prev===F.basin.left_node){if(q=it$2(W.point,W.next.point,W.next.next.point),q===et.CW)return;W=W.next}else if(W.next===F.basin.right_node){if(q=it$2(W.point,W.prev.point,W.prev.prev.point),q===et.CCW)return;W=W.prev}else W.prev.point.yq}function Ll(F,W,q){F.edge_event.right?Dl(F,W,q):Bl(F,W,q)}function Dl(F,W,q){for(;q.next.point.xW.p.x;)it$2(W.q,q.prev.point,W.p)===et.CW?Us(F,W,q):q=q.prev}function Us(F,W,q){q.point.x>W.p.x&&(it$2(q.point,q.prev.point,q.prev.prev.point)===et.CW?Un(F,W,q):(Ws(F,W,q),Us(F,W,q)))}function Ws(F,W,q){it$2(q.prev.point,q.prev.prev.point,q.prev.prev.prev.point)===et.CW?Un(F,W,q.prev):it$2(W.q,q.prev.prev.point,W.p)===et.CW&&Ws(F,W,q.prev)}function Un(F,W,q){ue(F,q.prev),q.prev.point!==W.p&&it$2(W.q,q.prev.point,W.p)===et.CW&&it$2(q.point,q.prev.point,q.prev.prev.point)===et.CW&&Un(F,W,q)}function Wn(F,W,q,K,X){var tt=K.neighborAcross(X);jn(tt,"FLIP failed due to missing triangle!");var rt=tt.oppositePoint(K,X);if(K.getConstrainedEdgeAcross(X)){var ot=K.index(X);throw new Ar("poly2tri Intersecting Constraints",[X,rt,K.getPoint((ot+1)%3),K.getPoint((ot+2)%3)])}if(Ls(X,K.pointCCW(X),K.pointCW(X),rt))if(Bs(K,X,tt,rt),F.mapTriangleToNodes(K),F.mapTriangleToNodes(tt),X===q&&rt===W)q===F.edge_event.constrained_edge.q&&W===F.edge_event.constrained_edge.p&&(K.markConstrainedEdgeByPoints(W,q),tt.markConstrainedEdgeByPoints(W,q),Zt(F,K),Zt(F,tt));else{var ut=it$2(q,rt,W);K=jl(F,ut,K,tt,X,rt),Wn(F,W,q,K,X)}else{var yn=Vs(W,q,tt,rt);zs(F,W,q,K,tt,yn),Gn(F,W,q,K,X)}}function jl(F,W,q,K,X,tt){var rt;return W===et.CCW?(rt=K.edgeIndex(X,tt),K.delaunay_edge[rt]=!0,Zt(F,K),K.clearDelaunayEdges(),q):(rt=q.edgeIndex(X,tt),q.delaunay_edge[rt]=!0,Zt(F,q),q.clearDelaunayEdges(),K)}function Vs(F,W,q,K){var X=it$2(W,K,F);if(X===et.CW)return q.pointCCW(K);if(X===et.CCW)return q.pointCW(K);throw new Ar("poly2tri [Unsupported] nextFlipPoint: opposing point on constrained edge!",[W,K,F])}function zs(F,W,q,K,X,tt){var rt=X.neighborAcross(tt);jn(rt,"FLIP failed due to missing triangle");var ot=rt.oppositePoint(X,tt);if(Ls(q,K.pointCCW(q),K.pointCW(q),ot))Wn(F,q,ot,rt,ot);else{var ut=Vs(W,q,rt,ot);zs(F,W,q,K,rt,ut)}}Bn.triangulate=_l;var Gl=Ln,pe=Os,Fl=Dn,Ul=Bn,Zs=je,Qr=Zs.Node,wi=.3,Wl=function(F,W){if(this.p=F,this.q=W,F.y>W.y)this.q=F,this.p=W;else if(F.y===W.y){if(F.x>W.x)this.q=F,this.p=W;else if(F.x===W.x)throw new Gl("poly2tri Invalid Edge constructor: repeated points!",[F])}this.q._p2t_edge_list||(this.q._p2t_edge_list=[]),this.q._p2t_edge_list.push(this)},$s=function(){this.left_node=null,this.bottom_node=null,this.right_node=null,this.width=0,this.left_highest=!1};$s.prototype.clear=function(){this.left_node=null,this.bottom_node=null,this.right_node=null,this.width=0,this.left_highest=!1};var Vl=function(){this.constrained_edge=null,this.right=!1},Y=function(F,W){W=W||{},this.triangles_=[],this.map_=[],this.points_=W.cloneArrays?F.slice(0):F,this.edge_list=[],this.pmin_=this.pmax_=null,this.front_=null,this.head_=null,this.tail_=null,this.af_head_=null,this.af_middle_=null,this.af_tail_=null,this.basin=new $s,this.edge_event=new Vl,this.initEdges(this.points_)};Y.prototype.addHole=function(F){this.initEdges(F);var W,q=F.length;for(W=0;WF&&(F=rt.x),rt.xq&&(q=rt.y),rt.ynew lr.Point(X[0],X[1])));for(let X=0;Xq.getPoints().map(K=>[K.x,K.y]))}function se(F,W){const q=W[0],K=W[1];return[F[0]*q+F[2]*K+F[4],F[1]*q+F[3]*K+F[5]]}function Xl(){return[1,0,0,1,0,0]}function ql(F,W){const q=F[0],K=F[1],X=F[2],tt=F[3],rt=F[4],ot=F[5],ut=W[0],yn=W[1],uo=W[2],po=W[3],mo=W[4],wo=W[5];return[q*ut+X*yn,K*ut+tt*yn,q*uo+X*po,K*uo+tt*po,q*mo+X*wo+rt,K*mo+tt*wo+ot]}function xi(F,W,q,K,X,tt,rt){const ot=Math.sin(X),ut=Math.cos(X);return[q*ut,K*ot,-q*ot,K*ut,tt*q*ut-rt*q*ot+F,tt*K*ot+rt*K*ut+W]}function Hl(F){const W=Yl(F),q=F[0],K=F[1],X=F[2],tt=F[3],rt=F[4],ot=F[5];return[tt/W,-K/W,-X/W,q/W,(X*ot-tt*rt)/W,-(q*ot-K*rt)/W]}function Yl(F){return F[0]*F[3]-F[1]*F[2]}function Jl(F){const W=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return W[0]=F[0],W[1]=F[1],W[4]=F[2],W[5]=F[3],W[12]=F[4],W[13]=F[5],W}var k;(function(F){F.GEOREFERENCEANNOTATIONADDED="georeferenceannotationadded",F.GEOREFERENCEANNOTATIONREMOVED="georeferenceannotationremoved",F.WARPEDMAPADDED="warpedmapadded",F.WARPEDMAPREMOVED="warpedmapremoved",F.WARPEDMAPENTER="warpedmapenter",F.WARPEDMAPLEAVE="warpedmapleave",F.IMAGEINFOLOADED="imageinfoloaded",F.TILEFETCHED="tilefetched",F.TILEFETCHERROR="tilefetcherror",F.MAPTILELOADED="maptileloaded",F.MAPTILEREMOVED="maptileremoved",F.FIRSTMAPTILELOADED="firstmaptileloaded",F.ALLREQUESTEDTILESLOADED="allrequestedtilesloaded",F.TEXTURESUPDATED="texturesupdated",F.ZINDICESCHANGES="zindiceschanged",F.RESOURCEMASKUPDATED="resourcemaskupdated",F.VISIBILITYCHANGED="visibilitychanged",F.TRANSFORMATIONCHANGED="transformationchanged",F.CHANGED="changed",F.CLEARED="cleared"})(k||(k={}));class z extends Event{constructor(W,q){super(W),this.data=q}}const Kl=80,bi={maxOffsetRatio:.05,maxDepth:2},Ti={maxOffsetRatio:.05,maxDepth:2};class Ql extends EventTarget{constructor(W,q,K,X=!0){var tt;super(),this.resourceViewportRing=[],this.resourceTrianglePoints=[],this.resourceTrianglePointsByBestScaleFactor=new Map,this.projectedGeoCurrentTrianglePoints=[],this.projectedGeoNewTrianglePoints=[],this.mapId=W,this.georeferencedMap=q,this.gcps=this.georeferencedMap.gcps,this.projectedGcps=this.gcps.map(({geo:rt,resource:ot})=>({geo:Eh(rt),resource:ot})),this.resourceMask=this.georeferencedMap.resourceMask,this.resourceMaskBbox=st(this.resourceMask),this.resourceFullMask=[[0,0],[this.georeferencedMap.resource.width,0],[this.georeferencedMap.resource.width,this.georeferencedMap.resource.height],[0,this.georeferencedMap.resource.height]],this.resourceFullMaskBbox=st(this.resourceFullMask),this.imageInfoCache=K,this.visible=X,this.transformationType=((tt=this.georeferencedMap.transformation)==null?void 0:tt.type)||"polynomial",this.updateTransformerProperties()}getViewportMask(W){return this.projectedGeoMask.map(q=>se(W.projectedGeoToViewportTransform,q))}getViewportMaskBbox(W){return st(this.getViewportMask(W))}getApproxViewportMaskBbox(W){return st(De(this.projectedGeoMaskBbox).map(q=>se(W.projectedGeoToViewportTransform,q)))}getViewportFullMask(W){return this.projectedGeoFullMask.map(q=>se(W.projectedGeoToViewportTransform,q))}getViewportFullMaskBbox(W){return st(this.getViewportFullMask(W))}getApproxViewportFullMaskBbox(W){return st(De(this.projectedGeoFullMaskBbox).map(q=>se(W.projectedGeoToViewportTransform,q)))}getResourceToViewportScale(W){return $r(this.resourceMaskBbox,this.getViewportMaskBbox(W))}getResourceToCanvasScale(W){return this.getResourceToViewportScale(W)/W.devicePixelRatio}getApproxResourceToViewportScale(W){return $r(this.resourceMaskBbox,this.getApproxViewportMaskBbox(W))}getApproxResourceToCanvasScale(W){return this.getApproxResourceToViewportScale(W)/W.devicePixelRatio}setResourceViewportRing(W){this.resourceViewportRing=W,this.resourceViewportRingBbox=st(W)}setResourceMask(W){this.resourceMask=W,this.updateGeoMask(),this.updateProjectedGeoMask()}setTransformationType(W){this.transformationType=W,this.updateTransformerProperties()}setGcps(W){this.gcps=W,this.updateTransformerProperties()}updateBestScaleFactor(W){this.bestScaleFactor!=W&&(this.bestScaleFactor=W,this.updateTriangulation(!0))}updateTriangulation(W=!1){if(this.resourceTrianglePointsByBestScaleFactor.has(this.bestScaleFactor))this.resourceTrianglePoints=this.resourceTrianglePointsByBestScaleFactor.get(this.bestScaleFactor);else{const q=bh(this.resourceMask)*this.bestScaleFactor/Kl;this.resourceTrianglePoints=$l(this.resourceMask,q).flat(),this.resourceTrianglePointsByBestScaleFactor.set(this.bestScaleFactor,this.resourceTrianglePoints)}this.updateProjectedGeoTrianglePoints(W)}updateProjectedGeoTrianglePoints(W=!1){this.projectedGeoNewTrianglePoints=this.resourceTrianglePoints.map(q=>this.projectedTransformer.transformToGeo(q)),(W||!this.projectedGeoCurrentTrianglePoints.length)&&(this.projectedGeoCurrentTrianglePoints=this.projectedGeoNewTrianglePoints)}resetCurrentTrianglePoints(){this.projectedGeoCurrentTrianglePoints=this.projectedGeoNewTrianglePoints}clearResourceTrianglePointsByBestScaleFactor(){this.resourceTrianglePointsByBestScaleFactor=new Map}mixProjectedGeoCurrentAndNewTrianglePoints(W){this.projectedGeoCurrentTrianglePoints=this.projectedGeoNewTrianglePoints.map((q,K)=>ph(q,this.projectedGeoCurrentTrianglePoints[K],W))}hasImageInfo(){return this.imageId!==void 0&&this.parsedImage!==void 0}async loadImageInfo(){const W=this.georeferencedMap.resource.id,q=await hh(W,{cache:this.imageInfoCache});this.parsedImage=Qa.parse(q),this.imageId=await Li(W),this.dispatchEvent(new z(k.IMAGEINFOLOADED))}dispose(){this.resourceTrianglePoints=[],this.projectedGeoCurrentTrianglePoints=[],this.projectedGeoNewTrianglePoints=[]}updateTransformerProperties(){this.updateTransformer(),this.updateProjectedTransformer(),this.updateGeoMask(),this.updateFullGeoMask(),this.updateProjectedGeoMask(),this.updateProjectedFullGeoMask(),this.updateResourceToProjectedGeoScale()}updateTransformer(){this.transformer=new mi(this.gcps,this.transformationType)}updateProjectedTransformer(){this.projectedTransformer=new mi(this.projectedGcps,this.transformationType)}updateGeoMask(){this.geoMask=this.transformer.transformForwardAsGeojson([this.resourceMask],bi),this.geoMaskBbox=st(this.geoMask)}updateFullGeoMask(){this.geoFullMask=this.transformer.transformForwardAsGeojson([this.resourceFullMask],bi),this.geoFullMaskBbox=st(this.geoFullMask)}updateProjectedGeoMask(){this.projectedGeoMask=this.projectedTransformer.transformForward([this.resourceMask],Ti)[0],this.projectedGeoMaskBbox=st(this.projectedGeoMask)}updateProjectedFullGeoMask(){this.projectedGeoFullMask=this.projectedTransformer.transformForward([this.resourceFullMask],Ti)[0],this.projectedGeoFullMaskBbox=st(this.projectedGeoFullMask)}updateResourceToProjectedGeoScale(){this.resourceToProjectedGeoScale=$r(this.resourceMaskBbox,this.projectedGeoMaskBbox)}}const tu=m.string().or(m.number()).or(m.boolean()),eu=m.record(m.string(),tu.array()),$t=m.tuple([m.number(),m.number()]),Xs=m.object({type:m.literal("Point"),coordinates:$t}),qs=$t.array().min(3),Ve=m.enum(["ImageService1","ImageService2","ImageService3"]),ru$2=m.object({id:m.string().url(),type:m.string(),label:eu.optional()}),Ur=ru$2.extend({partOf:m.lazy(()=>Ur.array()).optional()}),nu=m.object({type:m.literal("polynomial"),options:m.object({order:m.number().min(1).max(3)}).optional()}),iu=m.object({type:m.literal("thinPlateSpline")}),Wr=nu.or(iu),su=/^\s*\s*<\/svg>$/,ou=m.object({type:m.literal("SvgSelector"),value:m.string().regex(su)}),au=m.object({source:m.string().url(),service:m.array(m.object({"@id":m.string().url(),type:Ve})).length(1),selector:ou}),Hs=m.object({pixelCoords:$t}),hu=m.object({type:m.literal("FeatureCollection"),transformation:Wr.optional(),features:m.array(m.object({type:m.literal("Feature"),properties:Hs,geometry:Xs}))}),Vn=m.object({id:m.string().optional(),type:m.literal("Annotation"),"@context":m.string().url().array().optional(),motivation:m.string().default("georeferencing").optional(),target:au,body:hu}),Ys=m.object({id:m.string().optional(),type:m.literal("AnnotationPage"),"@context":m.string().url().array().optional(),items:m.array(Vn)}),zn=//,cu=new RegExp(`^\\s*${zn.source}\\s*$`),lu=new RegExp(`^\\s*${zn.source}\\s*$`),uu=new RegExp(`^\\s*${zn.source}\\s*$`),du=m.string().regex(uu),fu=m.string().regex(cu),pu=m.string().regex(lu),gu=m.object({type:m.literal("SvgSelector"),value:du.or(fu).or(pu)}),mu=m.object({"@id":m.string().url(),type:Ve,height:m.number().positive(),width:m.number().positive(),partOf:Ur.array().optional()}),yu=m.object({id:m.string().url(),type:Ve,height:m.number().positive(),width:m.number().positive(),partOf:Ur.array().optional()}),vu=m.object({type:m.literal("SpecificResource"),source:mu.or(yu),selector:gu}),Js=m.object({resourceCoords:$t}),wu=m.object({type:m.literal("FeatureCollection"),transformation:Wr.optional(),features:m.array(m.object({type:m.literal("Feature"),properties:Js,geometry:Xs}))}),Zn=m.object({id:m.string().optional(),type:m.literal("Annotation"),"@context":m.string().url().array().optional(),motivation:m.string().default("georeferencing").optional(),target:vu,body:wu}),Ks=m.object({id:m.string().optional(),type:m.literal("AnnotationPage"),"@context":m.string().url().array().optional(),items:m.array(Zn)});Vn.or(Zn);Ys.or(Ks);Hs.or(Js);function Qs(F){return Array.isArray(F)}function xu(F){return!!(F&&typeof F=="object"&&"type"in F&&F.type==="AnnotationPage")}function Rr(F){return!!(F&&typeof F=="object"&&"type"in F&&F.type==="GeoreferencedMap")}function Mi(F){return!!(F&&typeof F=="object"&&"target"in F&&F.target&&typeof F.target=="object"&&"source"in F.target&&typeof F.target.source=="string")}function $n(F){return"type"in F&&F.type==="GeoreferencedMap"}function Xn(F){return"source"in F.target&&typeof F.target.source=="object"}function bu(F){return{id:Tu(F),...Su(F),type:Mu(F),partOf:_u(F)}}function Tu(F){if(Xn(F)){const W=F.target.source;return"id"in W?W.id:W["@id"]}else return F.target.service[0]["@id"]}function Mu(F){return"service"in F.target?F.target.service[0].type:F.target.source.type}function _u(F){if(Xn(F))return F.target.source.partOf}function Eu(F){return"pixelCoords"in F?F.pixelCoords:F.resourceCoords}function Iu(F){return F.body.features.map(W=>({resource:Eu(W.properties),geo:W.geometry.coordinates}))}function Su(F){var rt,ot;if(Xn(F))return{width:F.target.source.width,height:F.target.source.height};const W=F.target.selector.value,q=/width="(?\d+)"/.exec(W),K=/height="(?\d+)"/.exec(W),X=(rt=q==null?void 0:q.groups)==null?void 0:rt.width,tt=(ot=K==null?void 0:K.groups)==null?void 0:ot.height;if(!X||!tt)throw new Error("Could not parse image dimensions");return{width:parseInt(X),height:parseInt(tt)}}function Au(F){var K;const W=F.target.selector.value,q=(K=/points="(?.+)"/.exec(W))==null?void 0:K.groups;if(q&&q.points){const X=q.points.trim().split(/\s+/);if(X[0]===X[X.length-1]&&X.splice(-1),X.length>=3)return X.map(tt=>{const rt=tt.split(",");if(rt.length===2)return[parseFloat(rt[0]),parseFloat(rt[1])];throw new Error("Could not parse resource mask")});throw new Error("Could not parse resource mask")}else throw new Error("Could not parse resource mask")}function _i(F){return{"@context":"https://schemas.allmaps.org/map/2/context.json",type:"GeoreferencedMap",id:F.id,resource:bu(F),gcps:Iu(F),resourceMask:Au(F),transformation:F.body.transformation}}function Mn(F){if(xu(F)){let W;return"items"in F&&Array.isArray(F.items)&&Mi(F.items[0])?W=Ys.parse(F):W=Ks.parse(F),W.items.map(q=>_i(q))}else{let W;return Mi(F)?W=Vn.parse(F):W=Zn.parse(F),[_i(W)]}}const to$1=m.object({image:$t,world:$t}),Ru=m.object({uri:m.string().url(),width:m.number(),height:m.number(),type:Ve}),Vr=m.object({id:m.string().optional(),version:m.number().min(1).max(1).default(1),image:Ru,gcps:to$1.array(),pixelMask:qs,transformation:Wr.optional()}),qn=m.array(Vr),eo=m.object({resource:$t,geo:$t}),Cu=m.object({id:m.string().url(),width:m.number(),height:m.number(),type:Ve,partOf:Ur.array().optional()}),zr=m.object({"@context":m.literal("https://schemas.allmaps.org/map/2/context.json").optional(),type:m.literal("GeoreferencedMap"),id:m.string().optional(),resource:Cu,gcps:eo.array(),resourceMask:qs,transformation:Wr.optional()}),Hn=m.array(zr);Vr.or(zr);qn.or(Hn);to$1.or(eo);function Pu(F){let W,q,K;return $n(F)?(W=F.resource.width,q=F.resource.height,K=F.resourceMask):(W=F.image.width,q=F.image.height,K=F.pixelMask),{type:"SvgSelector",value:``}}function ku(F){let W,q,K,X,tt;return $n(F)?(W=F.resource.id,q=F.resource.type,K=F.resource.width,X=F.resource.height,tt=F.resource.partOf):(W=F.image.uri,q=F.image.type,K=F.image.width,X=F.image.height),{id:W,type:q,height:X,width:K,partOf:tt}}function ro(){return["http://iiif.io/api/extension/georef/1/context.json","http://iiif.io/api/presentation/3/context.json"]}function Ou(F){let W,q;return"resource"in F?(W=F.resource,q=F.geo):(W=F.image,q=F.world),{type:"Feature",properties:{resourceCoords:W},geometry:{type:"Point",coordinates:q}}}function Ei(F,W=!0){const q={type:"SpecificResource",source:ku(F),selector:Pu(F)},K={type:"FeatureCollection",transformation:F.transformation,features:F.gcps.map(X=>Ou(X))};return{id:F.id,type:"Annotation","@context":W?ro():void 0,motivation:"georeferencing",target:q,body:K}}function Nu(F){if(Qs(F)){let W;Rr(F[0])?W=Hn.parse(F):W=qn.parse(F);const q=W.map(K=>Ei(K,!1));return{type:"AnnotationPage","@context":ro(),items:q}}else{let W;return Rr(F)?W=zr.parse(F):W=Vr.parse(F),Ei(W)}}function no(F){return $n(F)?F:Mn(Nu(F))[0]}function Lu(F){return F.map(no)}function Ii(F){if(Qs(F)){let W;return Rr(F[0])?W=Hn.parse(F):W=qn.parse(F),Lu(W)}else{let W;return Rr(F)?W=zr.parse(F):W=Vr.parse(F),no(W)}}function Du(F,W,q,K,X){io(F,W,q||0,K||F.length-1,X||Bu)}function io(F,W,q,K,X){for(;K>q;){if(K-q>600){var tt=K-q+1,rt=W-q+1,ot=Math.log(tt),ut=.5*Math.exp(2*ot/3),yn=.5*Math.sqrt(ot*ut*(tt-ut)/tt)*(rt-tt/2<0?-1:1),uo=Math.max(q,Math.floor(W-rt*ut/tt+yn)),po=Math.min(K,Math.floor(W+(tt-rt)*ut/tt+yn));io(F,W,uo,po,X)}var mo=F[W],wo=q,lf=K;for(ge(F,q,W),X(F[K],mo)>0&&ge(F,q,K);wo0;)lf--}X(F[q],mo)===0?ge(F,q,lf):(lf++,ge(F,lf,K)),lf<=W&&(q=lf+1),W<=lf&&(K=lf-1)}}function ge(F,W,q){var K=F[W];F[W]=F[q],F[q]=K}function Bu(F,W){return FW?1:0}class ju{constructor(W=9){this._maxEntries=Math.max(4,W),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(W){let q=this.data;const K=[];if(!ir(W,q))return K;const X=this.toBBox,tt=[];for(;q;){for(let rt=0;rt=0&&tt[q].children.length>this._maxEntries;)this._split(tt,q),q--;this._adjustParentBBoxes(X,tt,q)}_split(W,q){const K=W[q],X=K.children.length,tt=this._minEntries;this._chooseSplitAxis(K,tt,X);const rt=this._chooseSplitIndex(K,tt,X),ot=ie(K.children.splice(rt,K.children.length-rt));ot.height=K.height,ot.leaf=K.leaf,te(K,this.toBBox),te(ot,this.toBBox),q?W[q-1].children.push(ot):this._splitRoot(K,ot)}_splitRoot(W,q){this.data=ie([W,q]),this.data.height=W.height+1,this.data.leaf=!1,te(this.data,this.toBBox)}_chooseSplitIndex(W,q,K){let X,tt=1/0,rt=1/0;for(let ot=q;ot<=K-q;ot++){const ut=xe(W,0,ot,this.toBBox),yn=xe(W,ot,K,this.toBBox),uo=Vu(ut,yn),po=tn(ut)+tn(yn);uo=q;yn--){const uo=W.children[yn];be(ot,W.leaf?tt(uo):uo),ut+=nr(ot)}return ut}_adjustParentBBoxes(W,q,K){for(let X=K;X>=0;X--)be(q[X],W)}_condense(W){for(let q=W.length-1,K;q>=0;q--)W[q].children.length===0?q>0?(K=W[q-1].children,K.splice(K.indexOf(W[q]),1)):this.clear():te(W[q],this.toBBox)}}function Gu(F,W,q){if(!q)return W.indexOf(F);for(let K=0;K=F.minX&&W.maxY>=F.minY}function ie(F){return{children:F,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Si(F,W,q,K,X){const tt=[W,q];for(;tt.length;){if(q=tt.pop(),W=tt.pop(),q-W<=K)continue;const rt=W+Math.ceil((q-W)/K/2)*K;Du(F,rt,W,q,X),tt.push(W,rt,rt,q)}}function zu(F,W,q){if(q===void 0&&(q={}),!F)throw new Error("point is required");if(!W)throw new Error("polygon is required");var K=ce(F),X=ih(W),tt=X.type,rt=W.bbox,ot=X.coordinates;if(rt&&Zu(K,rt)===!1)return!1;tt==="Polygon"&&(ot=[ot]);for(var ut=!1,yn=0;ynF[1]!=yn>F[1]&&F[0]<(ut-rt)*(F[1]-ot)/(yn-ot)+rt;po&&(K=!K)}return K}function Zu(F,W){return W[0]<=F[0]&&W[1]<=F[1]&&W[2]>=F[0]&&W[3]>=F[1]}const $u=!0;class Xu{constructor(){this.rbush=new ju,this.polygonsById=new Map,this.bboxesById=new Map,this.itemsById=new Map}addItem(W,q){this.removeItem(W);const K=st(q),X={minX:K[0],minY:K[1],maxX:K[2],maxY:K[3],id:W};this.polygonsById.set(W,q),this.bboxesById.set(W,K),this.itemsById.set(W,X),this.rbush.insert(X)}removeItem(W){const q=this.itemsById.get(W);q&&(this.rbush.remove(q),this.polygonsById.delete(W),this.bboxesById.delete(W),this.itemsById.delete(W))}clear(){this.rbush.clear()}search(W,q,K,X){return this.rbush.search({minX:W,minY:q,maxX:K,maxY:X})}getBbox(W){return this.bboxesById.get(W)}getPolygon(W){return this.polygonsById.get(W)}searchFromBbox(W){const[q,K,X,tt]=W;return this.search(q,K,X,tt).map(rt=>rt.id)}searchFromPoint(W,q=$u){const[K,X,tt,rt]=[W[0],W[1],W[0],W[1]],ot=this.search(K,X,tt,rt);return q?ot.filter(ut=>{const yn=this.polygonsById.get(ut.id);return yn?zu(W,yn):!1}).map(ut=>ut.id):ot.map(ut=>ut.id)}}class qu extends EventTarget{constructor(W,q){super(),this.warpedMapsById=new Map,this.zIndices=new Map,q=Object.assign({createRTree:!0},q),this.imageInfoCache=W,q.createRTree&&(this.rtree=new Xu)}getMaps(){return this.warpedMapsById.keys()}getWarpedMaps(W){if(W===void 0)return this.warpedMapsById.values();{const q=[];for(const K of W){const X=this.warpedMapsById.get(K);X&&q.push(X)}return q}}getWarpedMap(W){return this.warpedMapsById.get(W)}getMapZIndex(W){return this.zIndices.get(W)}getTotalBbox(){let W;for(const q of this.getWarpedMaps())q.visible&&(W?W=hi$3(W,q.geoMaskBbox):W=q.geoMaskBbox);return W}getTotalProjectedGeoMaskBbox(){let W;for(const q of this.getWarpedMaps())q.visible&&(W?W=hi$3(W,q.projectedGeoMaskBbox):W=q.projectedGeoMaskBbox);return W}getMapsByGeoBbox(W){return this.rtree?this.rtree.searchFromBbox(W):Array.from(this.warpedMapsById.keys())}setImageInfoCache(W){this.imageInfoCache=W}setMapResourceMask(W,q){const K=this.warpedMapsById.get(W);K&&(K.setResourceMask(q),this.addToOrUpdateRtree(K),this.dispatchEvent(new z(k.RESOURCEMASKUPDATED,W)))}setMapsTransformationType(W,q){for(const K of W){const X=this.warpedMapsById.get(K);X&&(X.setTransformationType(q),this.addToOrUpdateRtree(X))}this.dispatchEvent(new z(k.TRANSFORMATIONCHANGED,W))}bringMapsToFront(W){let q=this.warpedMapsById.size;for(const K of W)this.zIndices.has(K)&&(this.zIndices.set(K,q),q++);this.removeZIndexHoles(),this.dispatchEvent(new z(k.ZINDICESCHANGES))}sendMapsToBack(W){let q=-Array.from(W).length;for(const K of W)this.zIndices.has(K)&&(this.zIndices.set(K,q),q++);this.removeZIndexHoles(),this.dispatchEvent(new z(k.ZINDICESCHANGES))}bringMapsForward(W){for(const[q,K]of this.zIndices.entries())this.zIndices.set(q,K*2);for(const q of W){const K=this.zIndices.get(q);K!==void 0&&this.zIndices.set(q,K+3)}this.removeZIndexHoles(),this.dispatchEvent(new z(k.ZINDICESCHANGES))}sendMapsBackward(W){for(const[q,K]of this.zIndices.entries())this.zIndices.set(q,K*2);for(const q of W){const K=this.zIndices.get(q);K!==void 0&&this.zIndices.set(q,K-3)}this.removeZIndexHoles(),this.dispatchEvent(new z(k.ZINDICESCHANGES))}showMaps(W){for(const q of W){const K=this.warpedMapsById.get(q);K&&(K.visible=!0)}this.dispatchEvent(new z(k.VISIBILITYCHANGED,W))}hideMaps(W){for(const q of W){const K=this.warpedMapsById.get(q);K&&(K.visible=!1)}this.dispatchEvent(new z(k.VISIBILITYCHANGED,W))}async addGeoreferencedMap(W){const q=Ii(W),K=Array.isArray(q)?q[0]:q;return this.addGeoreferencedMapInternal(K)}async removeGeoreferencedMap(W){const q=Ii(W),K=Array.isArray(q)?q[0]:q;return this.removeGeoreferencedMapInternal(K)}async addGeoreferenceAnnotation(W){const q=[],K=Mn(W),X=await Promise.allSettled(K.map(tt=>this.addGeoreferencedMapInternal(tt)));for(const tt of X)tt.status==="fulfilled"?q.push(tt.value):q.push(tt.reason);return this.dispatchEvent(new z(k.GEOREFERENCEANNOTATIONADDED)),this.dispatchEvent(new z(k.ZINDICESCHANGES)),q}async removeGeoreferenceAnnotation(W){const q=[],K=Mn(W);for(const X of K){const tt=await this.removeGeoreferencedMapInternal(X);q.push(tt)}return this.dispatchEvent(new z(k.GEOREFERENCEANNOTATIONREMOVED)),q}clear(){var W;this.warpedMapsById=new Map,this.zIndices=new Map,(W=this.rtree)==null||W.clear(),this.dispatchEvent(new z(k.CLEARED))}dispose(){for(const W of this.getWarpedMaps())this.removeEventListenersFromWarpedMap(W),W.dispose()}async addGeoreferencedMapInternal(W){const q=await this.getOrComputeMapId(W),K=new Ql(q,W,this.imageInfoCache);return this.warpedMapsById.set(q,K),this.zIndices.set(q,this.warpedMapsById.size-1),this.addToOrUpdateRtree(K),this.addEventListenersToWarpedMap(K),this.dispatchEvent(new z(k.WARPEDMAPADDED,q)),q}async removeGeoreferencedMapInternal(W){const q=await this.getOrComputeMapId(W),K=this.warpedMapsById.get(q);if(K)this.warpedMapsById.delete(q),this.zIndices.delete(q),this.removeFromRtree(K),this.dispatchEvent(new z(k.WARPEDMAPREMOVED,q)),this.removeZIndexHoles(),this.dispatchEvent(new z(k.ZINDICESCHANGES));else throw new Error(`No map found with ID ${q}`);return q}async getOrComputeMapId(W){return W.id||await To(W)}addToOrUpdateRtree(W){this.rtree&&(this.rtree.removeItem(W.mapId),this.rtree.addItem(W.mapId,W.geoMask))}removeFromRtree(W){this.rtree&&this.rtree.removeItem(W.mapId)}removeZIndexHoles(){const W=[...this.zIndices.entries()].sort((K,X)=>K[1]-X[1]);let q=0;for(const K of W){const X=K[0];this.zIndices.set(X,q),q++}}imageInfoLoaded(){this.dispatchEvent(new z(k.IMAGEINFOLOADED))}addEventListenersToWarpedMap(W){W.addEventListener(k.IMAGEINFOLOADED,this.imageInfoLoaded.bind(this))}removeEventListenersFromWarpedMap(W){W.removeEventListener(k.IMAGEINFOLOADED,this.imageInfoLoaded.bind(this))}}class Hu extends EventTarget{constructor(W,q,K,X,tt=1){super(),this.projectedGeoToViewportTransform=[1,0,0,1,0,0],this.projectedGeoToClipTransform=[1,0,0,1,0,0],this.projectedGeoCenter=W,this.projectedGeoPerViewportScale=X,this.rotation=K,this.viewportSize=q,this.devicePixelRatio=tt,this.projectedGeoRectangle=this.computeProjectedGeoRectangle(this.projectedGeoCenter,this.projectedGeoPerViewportScale,this.rotation,this.viewportSize),this.projectedGeoBbox=st(this.projectedGeoRectangle),this.projectedGeoSize=[this.viewportSize[0]*X,this.viewportSize[1]*X],this.geoCenter=ui(this.projectedGeoCenter),this.geoRectangle=this.projectedGeoRectangle.map(rt=>ui(rt)),this.geoBbox=st(this.geoRectangle),this.geoSize=Ir(this.geoBbox),this.viewportCenter=[this.viewportSize[0]/2,this.viewportSize[1]/2],this.viewportBbox=[0,0,...this.viewportSize],this.viewportRectangle=De(this.viewportBbox),this.canvasCenter=[this.viewportCenter[0]*this.devicePixelRatio,this.viewportSize[1]*this.devicePixelRatio],this.canvasSize=[this.viewportSize[0]*this.devicePixelRatio,this.viewportSize[1]*this.devicePixelRatio],this.canvasBbox=[0,0,...this.canvasSize],this.canvasRectangle=De(this.canvasBbox),this.projectedGeoPerCanvasScale=this.projectedGeoPerViewportScale/this.devicePixelRatio,this.projectedGeoToViewportTransform=this.composeProjectedGeoToViewportTransform(),this.projectedGeoToClipTransform=this.composeProjectedGeoToClipTransform()}composeProjectedGeoToViewportTransform(){return xi(this.viewportSize[0]/2,this.viewportSize[1]/2,1/this.projectedGeoPerViewportScale,-1/this.projectedGeoPerViewportScale,-this.rotation,-this.projectedGeoCenter[0],-this.projectedGeoCenter[1])}composeProjectedGeoToClipTransform(){return xi(0,0,2/(this.projectedGeoPerViewportScale*this.viewportSize[0]),2/(this.projectedGeoPerViewportScale*this.viewportSize[1]),-this.rotation,-this.projectedGeoCenter[0],-this.projectedGeoCenter[1])}computeProjectedGeoRectangle(W,q,K,X){const tt=q*X[0]/2,rt=q*X[1]/2,ot=Math.cos(K),ut=Math.sin(K),yn=tt*ot,uo=tt*ut,po=rt*ot,mo=rt*ut,wo=W[0],lf=W[1];return[[wo-yn+mo,lf-uo-po],[wo-yn-mo,lf-uo+po],[wo+yn-mo,lf+uo+po],[wo+yn+mo,lf+uo-po]]}}class Yu extends EventTarget{constructor(W){super(),this.tile=W.tile,this.imageRequest=W.imageRequest,this.tileUrl=W.tileUrl,this.abortController=new AbortController}async fetch(){try{const W=await ch(this.tileUrl,this.abortController.signal);return this.imageBitmap=await createImageBitmap(W),this.dispatchEvent(new z(k.TILEFETCHED,this.tileUrl)),this.imageBitmap}catch(W){W instanceof Error&&W.name==="AbortError"||this.dispatchEvent(new z(k.TILEFETCHERROR,this.tileUrl))}}isCachedTile(){return this.imageBitmap!==void 0}abort(){this.abortController.signal.aborted||this.abortController.abort()}}const Ju=.75;function so(F,W){return`${F}:${W}`}function oo(F){return so(F.mapId,F.tileUrl)}function rn(F){return new Set(F.map(W=>oo(W)))}function Ku(F,W,q={maxOffsetRatio:1e-5,maxDepth:2}){const K=wh(W)[0];return F.transformBackward(K,q)}function Qu(F,W,q=Ju){let K=Number.POSITIVE_INFINITY,X=F.tileZoomLevels.at(-1);for(const tt of F.tileZoomLevels){const rt=Math.abs(Math.log(tt.scaleFactor)-(Math.log(W)-Math.log(q)));rtRi(ot,rt)-Ri(ut,rt)),tt}function ed(F,W){return F.map(q=>[q[0]/W.originalWidth,q[1]/W.originalHeight])}function rd(F){const W={};for(let q=0;q{W[X]||(W[X]=[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]),ttW[X][1]&&(W[X][1]=tt)})}return W}function nd([F,W]){let q=Math.floor(F[0]),K=Math.floor(F[1]);const X=Math.floor(W[0]),tt=Math.floor(W[1]),rt=[[q,K]];if(q===X&&K===tt)return rt;const ot=Math.sign(W[0]-F[0]),ut=Math.sign(W[1]-F[1]),yn=Math.abs(F[0]-q-Math.max(0,ot)),uo=Math.abs(F[1]-K-Math.max(0,ut)),po=Math.abs(F[0]-W[0]),mo=Math.abs(F[1]-W[1]);let wo=yn/po,lf=uo/mo;const yf=1/po,cf=1/mo;for(;!(q===X&&K===tt);)wo=q.columns)break;const rt=Math.max(F[tt][0],0),ot=Math.min(F[tt][1],q.rows-1);for(let ut=rt;ut<=ot;ut++)K.push({column:tt,row:ut,tileZoomLevel:q,imageSize:[W.width,W.height]})}return K}function sd(F){var W,q;return(((W=F.imageRequest.size)==null?void 0:W.height)||0)*(((q=F.imageRequest.size)==null?void 0:q.width)||0)*3}function Ri(F,W){return jt(od(F),W)}function od(F){const W=ao(F);return[(W[2]-W[0])/2+W[0],(W[3]-W[1])/2+W[1]]}function ad(F){const W=F.column*F.tileZoomLevel.originalWidth,q=F.row*F.tileZoomLevel.originalHeight;return[W,q]}function ao(F){const W=ad(F),q=Math.min(W[0]+F.tileZoomLevel.originalWidth,F.imageSize[0]),K=Math.min(W[1]+F.tileZoomLevel.originalHeight,F.imageSize[1]);return[W[0],W[1],q,K]}const hd=50,cd=32*1e3*1e3;class ld extends EventTarget{constructor(){super(...arguments),this.tilesByTileUrl=new Map,this.mapIdsByTileUrl=new Map,this.tileUrlsByMapId=new Map,this.tilesFetchingCount=0,this.previousRequestedTiles=[],this.outgoingTilesHistory=[]}getCacheableTile(W){return this.tilesByTileUrl.get(W)}getCachedTile(W){const q=this.tilesByTileUrl.get(W);if(q&&q.isCachedTile())return q}getCacheableTiles(){return this.tilesByTileUrl.values()}getCachedTiles(){const W=Array.from(this.tilesByTileUrl.values()),q=[];return W.forEach(K=>{K.isCachedTile()&&q.push(K)}),q}getTileUrls(){return this.tilesByTileUrl.keys()}requestFetcableMapTiles(W){const q=rn(this.previousRequestedTiles),K=rn(W);if(Mh(q,K))return;const X=[];for(const ot of this.previousRequestedTiles)K.has(oo(ot))||X.push(ot);this.updateOutgoingTilesHistory(X,W.length);const tt=rn(this.outgoingTilesHistory),rt=new Set([...K,...tt]);for(const[ot,ut]of this.mapIdsByTileUrl)for(const yn of ut)rt.has(so(yn,ot))||this.removeMapTile(yn,ot);for(const ot of W)this.addMapTile(ot);this.previousRequestedTiles=W}clear(){this.tilesByTileUrl=new Map,this.mapIdsByTileUrl=new Map,this.tileUrlsByMapId=new Map,this.tilesFetchingCount=0,this.outgoingTilesHistory=[]}dispose(){for(const W of this.getCacheableTiles())this.removeEventListenersFromTile(W)}addMapTile(W){const q=W.mapId,K=W.tileUrl;if(this.tilesByTileUrl.has(K))this.dispatchEvent(new z(k.MAPTILELOADED,{mapId:q,tileUrl:K}));else{const X=new Yu(W);this.addEventListenersToTile(X),this.tilesByTileUrl.set(K,X),this.updateTilesFetchingCount(1),X.fetch()}this.addTileUrlForMapId(q,K),this.addMapIdForTileUrl(q,K)}removeMapTile(W,q){const K=this.tilesByTileUrl.get(q);if(!K)return;const X=this.removeMapIdForTileUrl(W,q);this.removeTileUrlForMapId(W,q),X.size||(K.isCachedTile()||(K.abort(),this.updateTilesFetchingCount(-1)),this.tilesByTileUrl.delete(q)),this.dispatchEvent(new z(k.MAPTILEREMOVED,{mapId:W,tileUrl:q}))}updateOutgoingTilesHistory(W,q){for(let rt=W.length-1;rt>=0;rt--){const ot=W[rt];this.outgoingTilesHistory.unshift(ot)}this.outgoingTilesHistory=Array.from(new Set(this.outgoingTilesHistory));let K=0,X=0,tt=0;for(const rt of this.outgoingTilesHistory){if(K+=1,tt=sd(rt),X+=tt,K+q>hd){K-=1,X-=tt;break}if(X>cd){K-=1,X-=tt;break}}this.outgoingTilesHistory=this.outgoingTilesHistory.slice(0,K)}tileFetched(W){var q;if(W instanceof z){const K=W.data;this.updateTilesFetchingCount(-1);for(const X of this.mapIdsByTileUrl.get(K)||[])this.dispatchEvent(new z(k.MAPTILELOADED,{mapId:X,tileUrl:K})),((q=this.tileUrlsByMapId.get(X))==null?void 0:q.values().next().value)===K&&this.dispatchEvent(new z(k.FIRSTMAPTILELOADED,{mapId:X,tileUrl:K}))}}tileFetchError(W){if(W instanceof z){const q=W.data;this.tilesByTileUrl.has(q)||(this.updateTilesFetchingCount(-1),this.tilesByTileUrl.delete(q))}}addMapIdForTileUrl(W,q){let K=this.mapIdsByTileUrl.get(q);return K?K.add(W):K=new Set([W]),this.mapIdsByTileUrl.set(q,K),K}removeMapIdForTileUrl(W,q){const K=this.mapIdsByTileUrl.get(q);if(K)K.delete(W);else return new Set;return K.size?this.mapIdsByTileUrl.set(q,K):this.mapIdsByTileUrl.delete(q),K}addTileUrlForMapId(W,q){let K=this.tileUrlsByMapId.get(W);return K?K.add(q):K=new Set([q]),this.tileUrlsByMapId.set(W,K),K}removeTileUrlForMapId(W,q){const K=this.tileUrlsByMapId.get(W);return K?(K.delete(q),K.size?this.tileUrlsByMapId.set(W,K):this.tileUrlsByMapId.delete(W),K):new Set}updateTilesFetchingCount(W){this.tilesFetchingCount+=W,this.tilesFetchingCount===0&&this.dispatchEvent(new z(k.ALLREQUESTEDTILESLOADED))}addEventListenersToTile(W){W.addEventListener(k.TILEFETCHED,this.tileFetched.bind(this)),W.addEventListener(k.TILEFETCHERROR,this.tileFetchError.bind(this))}removeEventListenersFromTile(W){W.removeEventListener(k.TILEFETCHED,this.tileFetched.bind(this)),W.removeEventListener(k.TILEFETCHERROR,this.tileFetchError.bind(this))}}class ud{constructor(W,q){this.mapId=q.mapId,this.tile=W;const K=q.parsedImage.getIiifTile(W.tileZoomLevel,W.column,W.row);this.imageRequest=K;const X=q.parsedImage.getImageUrl(K);this.tileUrl=X}}var dd=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis;const fd=dd;var pd=typeof self=="object"&&self&&self.Object===Object&&self,gd=fd||pd||Function("return this")();const ho=gd;var md=ho.Symbol;const Cr=md;var co=Object.prototype,yd=co.hasOwnProperty,vd=co.toString,me=Cr?Cr.toStringTag:void 0;function wd(F){var W=yd.call(F,me),q=F[me];try{F[me]=void 0;var K=!0}catch{}var X=vd.call(F);return K&&(W?F[me]=q:delete F[me]),X}var xd=Object.prototype,bd=xd.toString;function Td(F){return bd.call(F)}var Md="[object Null]",_d="[object Undefined]",Ci=Cr?Cr.toStringTag:void 0;function Ed(F){return F==null?F===void 0?_d:Md:Ci&&Ci in Object(F)?wd(F):Td(F)}function Id(F){return F!=null&&typeof F=="object"}var Sd="[object Symbol]";function Ad(F){return typeof F=="symbol"||Id(F)&&Ed(F)==Sd}var Rd=/\s/;function Cd(F){for(var W=F.length;W--&&Rd.test(F.charAt(W)););return W}var Pd=/^\s+/;function kd(F){return F&&F.slice(0,Cd(F)+1).replace(Pd,"")}function Pr(F){var W=typeof F;return F!=null&&(W=="object"||W=="function")}var Pi=0/0,Od=/^[-+]0x[0-9a-f]+$/i,Nd=/^0b[01]+$/i,Ld=/^0o[0-7]+$/i,Dd=parseInt;function ki(F){if(typeof F=="number")return F;if(Ad(F))return Pi;if(Pr(F)){var W=typeof F.valueOf=="function"?F.valueOf():F;F=Pr(W)?W+"":W}if(typeof F!="string")return F===0?F:+F;F=kd(F);var q=Nd.test(F);return q||Ld.test(F)?Dd(F.slice(2),q?2:8):Od.test(F)?Pi:+F}var Bd=function(){return ho.Date.now()};const nn$1=Bd;var jd="Expected a function",Gd=Math.max,Fd=Math.min;function Ud(F,W,q){var K,X,tt,rt,ot,ut,yn=0,uo=!1,po=!1,mo=!0;if(typeof F!="function")throw new TypeError(jd);W=ki(W)||0,Pr(q)&&(uo=!!q.leading,po="maxWait"in q,tt=po?Gd(ki(q.maxWait)||0,W):tt,mo="trailing"in q?!!q.trailing:mo);function wo(Cf){var Pf=K,Bf=X;return K=X=void 0,yn=Cf,rt=F.apply(Bf,Pf),rt}function lf(Cf){return yn=Cf,ot=setTimeout(vf,W),uo?wo(Cf):rt}function yf(Cf){var Pf=Cf-ut,Bf=Cf-yn,Hf=W-Pf;return po?Fd(Hf,tt-Bf):Hf}function cf(Cf){var Pf=Cf-ut,Bf=Cf-yn;return ut===void 0||Pf>=W||Pf<0||po&&Bf>=tt}function vf(){var Cf=nn$1();if(cf(Cf))return _f(Cf);ot=setTimeout(vf,yf(Cf))}function _f(Cf){return ot=void 0,mo&&K?wo(Cf):(K=X=void 0,rt)}function $f(){ot!==void 0&&clearTimeout(ot),yn=0,K=ut=X=ot=void 0}function xf(){return ot===void 0?rt:_f(nn$1())}function Af(){var Cf=nn$1(),Pf=cf(Cf);if(K=arguments,X=this,ut=Cf,Pf){if(ot===void 0)return lf(ut);if(po)return clearTimeout(ot),ot=setTimeout(vf,W),wo(ut)}return ot===void 0&&(ot=setTimeout(vf,W)),rt}return Af.cancel=$f,Af.flush=xf,Af}var Wd="Expected a function";function _n(F,W,q){var K=!0,X=!0;if(typeof F!="function")throw new TypeError(Wd);return Pr(q)&&(K="leading"in q?!!q.leading:K,X="trailing"in q?!!q.trailing:X),Ud(F,W,{leading:K,maxWait:W,trailing:X})}function Vd(F){let W=0,q=0;for(const rt of F)W+=rt.w*rt.h,q=Math.max(q,rt.w);F.sort((rt,ot)=>ot.h-rt.h);const K=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(W/.95)),q),h:1/0}];let X=0,tt=0;for(const rt of F)for(let ot=K.length-1;ot>=0;ot--){const ut=K[ot];if(!(rt.w>ut.w||rt.h>ut.h)){if(rt.x=ut.x,rt.y=ut.y,tt=Math.max(tt,rt.y+rt.h),X=Math.max(X,rt.x+rt.w),rt.w===ut.w&&rt.h===ut.h){const yn=K.pop();otse(this.projectedGeoToClipTransform,X));sr(this.gl,this.program,new Float32Array(W.flat()),2,"a_clipCurrentTrianglePoint");const q=this.warpedMap.projectedGeoNewTrianglePoints.map(X=>se(this.projectedGeoToClipTransform,X));sr(this.gl,this.program,new Float32Array(q.flat()),2,"a_clipNewTrianglePoint");let K=new Float32Array(this.warpedMap.resourceTrianglePoints.length);K=K.map((X,tt)=>Math.round((tt-1)/3)),sr(this.gl,this.program,K,1,"a_triangleIndex")}async updateTextures(){const W=this.gl;if(this.CachedTilesByTileUrl.size===0)return;let q=[...this.CachedTilesByTileUrl.values()];q=q.filter(uo=>this.warpedMap.resourceViewportRingBbox?vh(ao(uo.tile),this.warpedMap.resourceViewportRingBbox):!0);const K=q.length,X=q.map((uo,po)=>({w:uo.imageBitmap.width,h:uo.imageBitmap.height,x:0,y:0,index:po})),{w:tt,h:rt}=Vd(X);W.pixelStorei(W.UNPACK_ALIGNMENT,4),W.bindTexture(W.TEXTURE_2D,this.packedTilesTexture),W.texImage2D(W.TEXTURE_2D,0,W.RGBA,tt,rt,0,W.RGBA,W.UNSIGNED_BYTE,null);for(const uo of X){const po=q[uo.index].imageBitmap;W.texSubImage2D(W.TEXTURE_2D,0,uo.x,uo.y,po.width,po.height,W.RGBA,W.UNSIGNED_BYTE,po)}W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MIN_FILTER,W.LINEAR),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MAG_FILTER,W.LINEAR),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_S,W.CLAMP_TO_EDGE),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_T,W.CLAMP_TO_EDGE);const ot=X.map(uo=>[uo.x,uo.y]);W.bindTexture(W.TEXTURE_2D,this.packedTilesPositionsTexture),W.texImage2D(W.TEXTURE_2D,0,W.RG32I,1,K,0,W.RG_INTEGER,W.INT,new Int32Array(ot.flat())),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MIN_FILTER,W.NEAREST),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MAG_FILTER,W.NEAREST),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_S,W.CLAMP_TO_EDGE),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_T,W.CLAMP_TO_EDGE);const ut=X.map(uo=>{const po=q[uo.index];if(po&&po.imageRequest&&po.imageRequest.region)return[po.imageRequest.region.x,po.imageRequest.region.y,po.imageRequest.region.width,po.imageRequest.region.height]});W.bindTexture(W.TEXTURE_2D,this.packedTilesResourcePositionsAndDimensionsTexture),W.texImage2D(W.TEXTURE_2D,0,W.RGBA32I,1,K,0,W.RGBA_INTEGER,W.INT,new Int32Array(ut.flat())),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MIN_FILTER,W.NEAREST),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MAG_FILTER,W.NEAREST),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_S,W.CLAMP_TO_EDGE),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_T,W.CLAMP_TO_EDGE);const yn=X.map(({index:uo})=>q[uo].tile.tileZoomLevel.scaleFactor);W.bindTexture(W.TEXTURE_2D,this.packedTilesScaleFactorsTexture),W.texImage2D(W.TEXTURE_2D,0,W.R32I,1,K,0,W.RED_INTEGER,W.INT,new Int32Array(yn)),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MIN_FILTER,W.NEAREST),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_MAG_FILTER,W.NEAREST),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_S,W.CLAMP_TO_EDGE),W.texParameteri(W.TEXTURE_2D,W.TEXTURE_WRAP_T,W.CLAMP_TO_EDGE),this.dispatchEvent(new z(k.TEXTURESUPDATED))}}const Yd=`#version 300 es precision highp float; @@ -3703,15 +3703,15 @@ void main() { // color = debugColor; } } -`,Kd=500,Qd={leading:!0,trailing:!0},tf=50,ef={leading:!0,trailing:!0},sn=1,on=1,rf=0,nf=.7,sf=5,of=5,Ni=750;class af extends EventTarget{constructor(W,q){super(),this.webgl2WarpedMapsById=new Map,this.tileCache=new ld,this.mapsInViewport=new Set,this.opacity=sn,this.saturation=on,this.renderOptions={},this.animating=!1,this.animationProgress=1,this.warpedMapList=q,this.gl=W;const K=Oi(W,W.VERTEX_SHADER,Yd),X=Oi(W,W.FRAGMENT_SHADER,Jd);this.program=zd(W,K,X),W.deleteShader(K),W.deleteShader(X),W.disable(W.DEPTH_TEST),this.invertedRenderTransform=Xl(),this.addEventListeners(),this.throttledPrepareRenderInternal=_n(this.prepareRenderInternal.bind(this),Kd,Qd),this.throttledChanged=_n(this.changed.bind(this),tf,ef)}getOpacity(){return this.opacity}setOpacity(W){this.opacity=W}resetOpacity(){this.opacity=sn}getMapOpacity(W){const q=this.webgl2WarpedMapsById.get(W);if(q)return q.opacity}setMapOpacity(W,q){const K=this.webgl2WarpedMapsById.get(W);K&&(K.opacity=Math.min(Math.max(q,0),1))}resetMapOpacity(W){const q=this.webgl2WarpedMapsById.get(W);q&&(q.opacity=sn)}getRemoveColorOptions(){return this.renderOptions.removeColorOptions}setRemoveColorOptions(W){this.renderOptions.removeColorOptions=W}resetRemoveColorOptions(){this.renderOptions.removeColorOptions=void 0}getMapRemoveColorOptions(W){const q=this.webgl2WarpedMapsById.get(W);if(q)return q.renderOptions.removeColorOptions}setMapRemoveColorOptions(W,q){const K=this.webgl2WarpedMapsById.get(W);K&&(K.renderOptions.removeColorOptions=q)}resetMapRemoveColorOptions(W){const q=this.webgl2WarpedMapsById.get(W);q&&(q.renderOptions.removeColorOptions=void 0)}getColorizeOptions(){return this.renderOptions.colorizeOptions}setColorizeOptions(W){this.renderOptions.colorizeOptions=W}resetColorizeOptions(){this.renderOptions.colorizeOptions=void 0}getMapColorizeOptions(W){const q=this.webgl2WarpedMapsById.get(W);if(q)return q.renderOptions.colorizeOptions}setMapColorizeOptions(W,q){const K=this.webgl2WarpedMapsById.get(W);K&&(K.renderOptions.colorizeOptions=q)}resetMapColorizeOptions(W){const q=this.webgl2WarpedMapsById.get(W);q&&(q.renderOptions.colorizeOptions=void 0)}getSaturation(){return this.saturation}setSaturation(W){this.saturation=W}resetSaturation(){this.saturation=on}getMapSaturation(W){const q=this.webgl2WarpedMapsById.get(W);if(q)return q.saturation}setMapSaturation(W,q){const K=this.webgl2WarpedMapsById.get(W);K&&(K.saturation=q)}resetMapSaturation(W){const q=this.webgl2WarpedMapsById.get(W);q&&(q.saturation=on)}render(W){this.viewport=W,this.throttledPrepareRenderInternal(),this.renderInternal()}clear(){this.webgl2WarpedMapsById=new Map,this.mapsInViewport=new Set,this.gl.clear(this.gl.DEPTH_BUFFER_BIT|this.gl.COLOR_BUFFER_BIT),this.tileCache.clear()}dispose(){for(const W of this.webgl2WarpedMapsById.values())this.removeEventListenersFromWebGL2WarpedMap(W),W.dispose();this.tileCache.clear(),this.tileCache.dispose(),this.removeEventListeners(),this.gl.deleteProgram(this.program)}startTransformationTransition(){this.lastAnimationFrameRequestId!==void 0&&cancelAnimationFrame(this.lastAnimationFrameRequestId),this.animating=!0,this.transformationTransitionStart=void 0,this.lastAnimationFrameRequestId=requestAnimationFrame(this.transformationTransitionFrame.bind(this))}transformationTransitionFrame(W){if(this.transformationTransitionStart||(this.transformationTransitionStart=W),W-this.transformationTransitionStartjt(gn(this.warpedMapList.getWarpedMap(K).geoMaskBbox),this.viewport.geoCenter)-jt(gn(this.warpedMapList.getWarpedMap(X).geoMaskBbox),this.viewport.geoCenter)),q=[];for(const K of W){const X=this.warpedMapList.getWarpedMap(K);if(!X||!X.visible)continue;if(!X.hasImageInfo()){X.loadImageInfo();continue}if(xh(X.getApproxViewportMaskBbox(this.viewport))of?(this.previousSignificantViewport=this.viewport,!0):!1}else return this.previousSignificantViewport=this.viewport,!1}updateMapsInViewport(W){const q=Array.from(this.mapsInViewport),K=W.map(rt=>rt.mapId).filter((rt,ot,ut)=>ut.indexOf(rt)===ot);this.mapsInViewport=new Set(K.sort((rt,ot)=>{const ut=this.warpedMapList.getMapZIndex(rt),yn=this.warpedMapList.getMapZIndex(ot);return ut!==void 0&&yn!==void 0?ut-yn:0}));const X=K.filter(rt=>!q.includes(rt)),tt=q.filter(rt=>!K.includes(rt));for(const rt in X)this.dispatchEvent(new z(k.WARPEDMAPENTER,rt));for(const rt in tt)this.dispatchEvent(new z(k.WARPEDMAPLEAVE,rt))}renderInternal(){if(!this.viewport)return;const W=ql(this.viewport.projectedGeoToClipTransform,this.invertedRenderTransform),q=this.gl;q.viewport(0,0,q.canvas.width,q.canvas.height),q.enable(q.BLEND),q.blendFunc(q.ONE,q.ONE_MINUS_SRC_ALPHA),q.useProgram(this.program);const K=q.getUniformLocation(this.program,"u_renderTransform");q.uniformMatrix4fv(K,!1,Jl(W));const X=q.getUniformLocation(this.program,"u_animationProgress");q.uniform1f(X,this.animationProgress);for(const tt of this.mapsInViewport){const rt=this.webgl2WarpedMapsById.get(tt);if(!rt)continue;this.setRenderOptionsUniforms(this.renderOptions,rt.renderOptions);const ot=q.getUniformLocation(this.program,"u_opacity");q.uniform1f(ot,this.opacity*rt.opacity);const ut=q.getUniformLocation(this.program,"u_saturation");q.uniform1f(ut,this.saturation*rt.saturation);const yn=q.getUniformLocation(this.program,"u_bestScaleFactor"),uo=rt.warpedMap.bestScaleFactor;q.uniform1i(yn,uo);const po=q.getUniformLocation(this.program,"u_packedTilesTexture");q.uniform1i(po,0),q.activeTexture(q.TEXTURE0),q.bindTexture(q.TEXTURE_2D,rt.packedTilesTexture);const mo=q.getUniformLocation(this.program,"u_packedTilesPositionsTexture");q.uniform1i(mo,1),q.activeTexture(q.TEXTURE1),q.bindTexture(q.TEXTURE_2D,rt.packedTilesPositionsTexture);const wo=q.getUniformLocation(this.program,"u_packedTilesResourcePositionsAndDimensionsTexture");q.uniform1i(wo,2),q.activeTexture(q.TEXTURE2),q.bindTexture(q.TEXTURE_2D,rt.packedTilesResourcePositionsAndDimensionsTexture);const lf=q.getUniformLocation(this.program,"u_packedTilesScaleFactorsTexture");q.uniform1i(lf,3),q.activeTexture(q.TEXTURE3),q.bindTexture(q.TEXTURE_2D,rt.packedTilesScaleFactorsTexture);const yf=rt.vao,cf=rt.warpedMap.resourceTrianglePoints.length,vf=this.gl.TRIANGLES,_f=0;q.bindVertexArray(yf),q.drawArrays(vf,_f,cf)}}setRenderOptionsUniforms(W,q){var yn,uo,po,mo,wo,lf,yf,cf,vf,_f;const K=this.gl,X={removeColorOptions:{color:((yn=q.removeColorOptions)==null?void 0:yn.color)||((uo=W.removeColorOptions)==null?void 0:uo.color),hardness:li((po=q.removeColorOptions)==null?void 0:po.hardness,(mo=W.removeColorOptions)==null?void 0:mo.hardness),threshold:li((wo=q.removeColorOptions)==null?void 0:wo.threshold,(lf=W.removeColorOptions)==null?void 0:lf.threshold)},colorizeOptions:{...W.colorizeOptions,...q.colorizeOptions}},tt=(yf=X.removeColorOptions)==null?void 0:yf.color,rt=K.getUniformLocation(this.program,"u_removeColor");if(K.uniform1f(rt,tt?1:0),tt){const $f=K.getUniformLocation(this.program,"u_removeColorOptionsColor");K.uniform3fv($f,tt);const wf=K.getUniformLocation(this.program,"u_removeColorOptionsThreshold");K.uniform1f(wf,((cf=X.removeColorOptions)==null?void 0:cf.threshold)||rf);const Pf=K.getUniformLocation(this.program,"u_removeColorOptionsHardness");K.uniform1f(Pf,((vf=X.removeColorOptions)==null?void 0:vf.hardness)||nf)}const ot=(_f=X.colorizeOptions)==null?void 0:_f.color,ut=K.getUniformLocation(this.program,"u_colorize");if(K.uniform1f(ut,ot?1:0),ot){const $f=K.getUniformLocation(this.program,"u_colorizeOptionsColor");K.uniform3fv($f,ot)}}changed(){this.dispatchEvent(new z(k.CHANGED))}imageInfoLoaded(W){W instanceof z&&this.dispatchEvent(new z(k.IMAGEINFOLOADED))}mapTileLoaded(W){if(W instanceof z){const{mapId:q,tileUrl:K}=W.data,X=this.tileCache.getCacheableTile(K);if(!X||!X.isCachedTile())return;const tt=this.webgl2WarpedMapsById.get(q);if(!tt)return;tt.addCachedTileAndUpdateTextures(X)}}mapTileRemoved(W){if(W instanceof z){const{mapId:q,tileUrl:K}=W.data,X=this.webgl2WarpedMapsById.get(q);if(!X)return;X.removeCachedTileAndUpdateTextures(K)}}warpedMapAdded(W){if(W instanceof z){const q=W.data,K=this.warpedMapList.getWarpedMap(q);if(K){const X=new Hd(this.gl,this.program,K);this.webgl2WarpedMapsById.set(K.mapId,X),this.addEventListenersToWebGL2WarpedMap(X)}}}transformationChanged(W){if(W instanceof z){const q=W.data;for(const K of this.warpedMapList.getWarpedMaps(q))this.animating&&K.mixProjectedGeoCurrentAndNewTrianglePoints(this.animationProgress),K.updateProjectedGeoTrianglePoints(!1);this.updateVertexBuffers(),this.startTransformationTransition()}}resourceMaskUpdated(W){if(W instanceof z){const q=W.data,K=this.warpedMapList.getWarpedMap(q);K&&(K.clearResourceTrianglePointsByBestScaleFactor(),K.updateTriangulation(!1))}}addEventListenersToWebGL2WarpedMap(W){W.addEventListener(k.TEXTURESUPDATED,this.throttledChanged.bind(this))}removeEventListenersFromWebGL2WarpedMap(W){W.removeEventListener(k.TEXTURESUPDATED,this.throttledChanged.bind(this))}addEventListeners(){this.tileCache.addEventListener(k.MAPTILELOADED,this.mapTileLoaded.bind(this)),this.tileCache.addEventListener(k.MAPTILEREMOVED,this.mapTileRemoved.bind(this)),this.warpedMapList.addEventListener(k.IMAGEINFOLOADED,this.imageInfoLoaded.bind(this)),this.warpedMapList.addEventListener(k.WARPEDMAPADDED,this.warpedMapAdded.bind(this)),this.warpedMapList.addEventListener(k.TRANSFORMATIONCHANGED,this.transformationChanged.bind(this)),this.warpedMapList.addEventListener(k.RESOURCEMASKUPDATED,this.resourceMaskUpdated.bind(this)),this.warpedMapList.addEventListener(k.CLEARED,this.clear.bind(this))}removeEventListeners(){this.tileCache.removeEventListener(k.MAPTILELOADED,this.mapTileLoaded.bind(this)),this.tileCache.removeEventListener(k.MAPTILEREMOVED,this.mapTileRemoved.bind(this)),this.warpedMapList.removeEventListener(k.IMAGEINFOLOADED,this.imageInfoLoaded.bind(this)),this.warpedMapList.removeEventListener(k.WARPEDMAPADDED,this.warpedMapAdded.bind(this)),this.warpedMapList.removeEventListener(k.TRANSFORMATIONCHANGED,this.transformationChanged.bind(this)),this.warpedMapList.removeEventListener(k.RESOURCEMASKUPDATED,this.resourceMaskUpdated.bind(this)),this.warpedMapList.removeEventListener(k.CLEARED,this.clear.bind(this))}}const hf=leafletSrcExports.Layer.extend({options:{opacity:1,interactive:!1,className:"",pane:"tilePane",zIndex:"1"},initialize(F,W){this._annotation=F,leafletSrcExports.setOptions(this,W),this._initGl()},async onAdd(F){const W=this.getPaneName();return this._map.getPane(W).appendChild(this.container),F.on("zoomend viewreset move",this._update,this),F.on("zoomanim",this._animateZoom,this),F.on("unload",this._unload,this),this.resizeObserver=new ResizeObserver(this._resized.bind(this)),this.resizeObserver.observe(this._map.getContainer(),{box:"content-box"}),this._annotation&&(_h(this._annotation)?await this.addGeoreferenceAnnotationByUrl(this._annotation):await this.addGeoreferenceAnnotation(this._annotation)),this._update(),this},onRemove(F){this.container.remove(),F.off("zoomend viewreset move",this._update,this),F.off("zoomanim",this._animateZoom,this)},async addGeoreferenceAnnotation(F){const W=await this.renderer.warpedMapList.addGeoreferenceAnnotation(F);return this._update(),W},async removeGeoreferenceAnnotation(F){const W=await this.renderer.warpedMapList.removeGeoreferenceAnnotation(F);return this._update(),W},async addGeoreferenceAnnotationByUrl(F){const W=await fetch(F).then(q=>q.json());return this.addGeoreferenceAnnotation(W)},async removeGeoreferenceAnnotationByUrl(F){const W=await fetch(F).then(q=>q.json());return this.removeGeoreferenceAnnotation(W)},async addGeoreferencedMap(F){const W=this.renderer.warpedMapList.addGeoreferencedMap(F);return this._update(),W},async removeGeoreferencedMap(F){const W=this.renderer.warpedMapList.removeGeoreferencedMap(F);return this._update(),W},getContainer(){return this.container},getCanvas(){return this.canvas},getWarpedMapList(){return this.renderer.warpedMapList},getWarpedMap(F){return this.renderer.warpedMapList.getWarpedMap(F)},showMap(F){this.renderer.warpedMapList.showMaps([F]),this._update()},showMaps(F){this.renderer.warpedMapList.showMaps(F),this._update()},hideMap(F){this.renderer.warpedMapList.hideMaps([F]),this._update()},hideMaps(F){this.renderer.warpedMapList.hideMaps(F),this._update()},isMapVisible(F){var W;return(W=this.renderer.warpedMapList.getWarpedMap(F))==null?void 0:W.visible},setMapResourceMask(F,W){this.renderer.warpedMapList.setMapResourceMask(F,W),this._update()},setMapsTransformationType(F,W){this.renderer.warpedMapList.setMapsTransformationType(F,W),this._update()},getTotalBbox(){return this.renderer.warpedMapList.getBbox()},getTotalProjectedBbox(){return this.renderer.warpedMapList.getProjectedBbox()},getTotalBounds(){const F=this.getTotalBbox();return leafletSrcExports.latLngBounds(leafletSrcExports.latLng(F[1],F[0]),leafletSrcExports.latLng(F[3],F[2]))},getTotalProjectedBounds(){const F=this.getTotalProjectedBbox();return leafletSrcExports.latLngBounds(leafletSrcExports.latLng(F[1],F[0]),leafletSrcExports.latLng(F[3],F[2]))},bringMapsToFront(F){this.renderer.warpedMapList.bringMapsToFront(F),this._update()},sendMapsToBack(F){this.renderer.warpedMapList.sendMapsToBack(F),this._update()},bringMapsForward(F){this.renderer.warpedMapList.bringMapsForward(F),this._update()},sendMapsBackward(F){this.renderer.warpedMapList.sendMapsBackward(F),this._update()},bringToFront(){return this._map&&leafletSrcExports.DomUtil.toFront(this.container),this},bringToBack(){return this._map&&leafletSrcExports.DomUtil.toBack(this.container),this},getMapZIndex(F){return this.renderer.warpedMapList.getMapZIndex(F)},getZIndex(){return this.options.zIndex},setZIndex(F){return this.options.zIndex=F,this._updateZIndex(),this},setImageInfoCache(F){this.renderer.warpedMapList.setImageInfoCache(F)},getPaneName(){return this._map.getPane(this.options.pane)?this.options.pane:"tilePane"},getOpacity(){return this.options.opacity},setOpacity(F){return this.options.opacity=F,this._update(),this},resetOpacity(){return this.options.opacity=1,this._update(),this},getMapOpacity(F){return this.renderer.getMapOpacity(F)},setMapOpacity(F,W){return this.renderer.setMapOpacity(F,W),this._update(),this},resetMapOpacity(F){return this.renderer.resetMapOpacity(F),this._update(),this},setSaturation(F){return this.renderer.setSaturation(F),this._update(),this},resetSaturation(){return this.renderer.resetSaturation(),this._update(),this},setMapSaturation(F,W){return this.renderer.setMapSaturation(F,W),this._update(),this},resetMapSaturation(F){return this.renderer.resetMapSaturation(F),this._update(),this},setRemoveColor(F){const W=F.hexColor?ci(F.hexColor):void 0;return this.renderer.setRemoveColorOptions({color:W,threshold:F.threshold,hardness:F.hardness}),this._update(),this},resetRemoveColor(){return this.renderer.resetRemoveColorOptions(),this._update(),this},setMapRemoveColor(F,W){const q=W.hexColor?ci(W.hexColor):void 0;return this.renderer.setMapRemoveColorOptions(F,{color:q,threshold:W.threshold,hardness:W.hardness}),this._update(),this},resetMapRemoveColor(F){return this.renderer.resetMapRemoveColorOptions(F),this},setColorize(F){const W=this.hexToRgb(F);return W&&(this.renderer.setColorizeOptions({color:W}),this._update()),this},resetColorize(){return this.renderer.resetColorizeOptions(),this._update(),this},setMapColorize(F,W){const q=this.hexToRgb(W);return q&&(this.renderer.setMapColorizeOptions(F,{color:q}),this._update()),this},resetMapColorize(F){return this.renderer.resetMapColorizeOptions(F),this._update(),this},_initGl(){if(this.container=leafletSrcExports.DomUtil.create("div"),this.container.classList.add("leaflet-layer"),this.container.classList.add("allmaps-warped-map-layer"),this.options.zIndex&&this._updateZIndex(),this.canvas=leafletSrcExports.DomUtil.create("canvas",void 0,this.container),this.canvas.classList.add("leaflet-zoom-animated"),this.canvas.classList.add("leaflet-image-layer"),this.options.interactive&&this.canvas.classList.add("leaflet-interactive"),this.options.className&&this.canvas.classList.add(this.options.className),this.gl=this.canvas.getContext("webgl2",{premultipliedAlpha:!0}),!this.gl)throw new Error("WebGL 2 not available");const F=new qu(this.options.imageInfoCache);this.renderer=new af(this.gl,F),this._addEventListeners()},_resized(F){for(const W of F){const q=W.contentRect.width,K=W.contentRect.height,X=window.devicePixelRatio,tt=Math.round(q*X),rt=Math.round(K*X);this.canvas.width=tt,this.canvas.height=rt,this.canvas.style.width=q+"px",this.canvas.style.height=K+"px"}this._update()},_animateZoom(F){const W=this._map.getZoomScale(F.zoom),q=this._map._latLngBoundsToNewLayerBounds(this._map.getBounds(),F.zoom,F.center).min;leafletSrcExports.DomUtil.setTransform(this.canvas,q,W)},_updateZIndex(){this.container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this.container.style.zIndex=this.options.zIndex)},_update(){if(!this._map)return;const F=this._map.containerPointToLayerPoint([0,0]);leafletSrcExports.DomUtil.setPosition(this.canvas,F),this.renderer.setOpacity(this.getOpacity());const W=this._map.getCenter(),q=this._map.options.crs.project(W),K=[q.x,q.y],X=this._map.getSize(),tt=[X.x,X.y],rt=this._map.getBounds(),ot=this._map.options.crs.project(rt.getNorthEast()),ut=this._map.options.crs.project(rt.getSouthWest()),yn=[ut.x,ut.y,ot.x,ot.y],uo=Ir(yn),po=ys(uo,tt),mo=new Hu(K,tt,0,po,window.devicePixelRatio);return this.renderer.render(mo),this.container},_addEventListeners(){this.renderer.addEventListener(k.CHANGED,this._update.bind(this)),this.renderer.addEventListener(k.IMAGEINFOLOADED,this._update.bind(this)),this.renderer.addEventListener(k.WARPEDMAPENTER,this._passWarpedMapEvent.bind(this)),this.renderer.addEventListener(k.WARPEDMAPLEAVE,this._passWarpedMapEvent.bind(this)),this.renderer.tileCache.addEventListener(k.FIRSTMAPTILELOADED,this._passWarpedMapEvent.bind(this)),this.renderer.tileCache.addEventListener(k.ALLREQUESTEDTILESLOADED,this._passWarpedMapEvent.bind(this)),this.renderer.warpedMapList.addEventListener(k.WARPEDMAPADDED,this._passWarpedMapEvent.bind(this)),this.renderer.warpedMapList.addEventListener(k.WARPEDMAPREMOVED,this._passWarpedMapEvent.bind(this)),this.renderer.warpedMapList.addEventListener(k.VISIBILITYCHANGED,this._update.bind(this)),this.renderer.warpedMapList.addEventListener(k.CLEARED,this._update.bind(this))},_removeEventListeners(){this.renderer.removeEventListener(k.CHANGED,this._update.bind(this)),this.renderer.removeEventListener(k.IMAGEINFOLOADED,this._update.bind(this)),this.renderer.removeEventListener(k.WARPEDMAPENTER,this._passWarpedMapEvent.bind(this)),this.renderer.removeEventListener(k.WARPEDMAPLEAVE,this._passWarpedMapEvent.bind(this)),this.renderer.tileCache.removeEventListener(k.FIRSTMAPTILELOADED,this._passWarpedMapEvent.bind(this)),this.renderer.tileCache.removeEventListener(k.ALLREQUESTEDTILESLOADED,this._passWarpedMapEvent.bind(this)),this.renderer.warpedMapList.removeEventListener(k.WARPEDMAPADDED,this._passWarpedMapEvent.bind(this)),this.renderer.warpedMapList.removeEventListener(k.WARPEDMAPREMOVED,this._passWarpedMapEvent.bind(this)),this.renderer.warpedMapList.removeEventListener(k.VISIBILITYCHANGED,this._update.bind(this)),this.renderer.warpedMapList.removeEventListener(k.CLEARED,this._update.bind(this))},_passWarpedMapEvent(F){F instanceof z&&this._map&&this._map.fire(F.type,F.data)},_unload(){this.renderer.dispose();const F=this.gl.getExtension("WEBGL_lose_context");F&&F.loseContext();const W=this.gl.canvas;W.width=1,W.height=1,this.resizeObserver.disconnect(),this._removeEventListeners()}}),_hoisted_1$8=["innerHTML"],_hoisted_2$6={key:0,class:"caption"},_hoisted_3$6=["src"],_hoisted_4$6={slot:"footer",class:"footer"},_hoisted_5$4=["src"],_hoisted_6$3={class:"push"},_sfc_main$a=defineComponent({__name:"Map.ce",props:{active:{type:Boolean,default:!1},base:{type:String},basemaps:{type:String,default:"OpenStreetMap"},center:{type:String,default:"0,0"},caption:{type:String},data:{type:String},entities:{type:String},fit:{type:Boolean,default:!1},height:{type:Number},gestureHandling:{type:Boolean,default:isMobile$1()},ghDir:{type:String},marker:{type:Boolean},overlay:{type:String},popupOnHover:{type:Boolean},preferGeojson:{type:Boolean},scrollWheelZoom:{type:Boolean,default:!1},slot:{type:String},title:{type:String},zoom:{type:Number,default:2},zoomOnClick:{type:Boolean}},setup(F){const W=F,q=self.window,K=q.turf;let X;const tt=ref(!1);watch$1(tt,()=>{X.open=tt.value});const rt=ref("100vw"),ot=ref();onMounted(()=>{var Bp;X=(Bp=lf.value)==null?void 0:Bp.querySelector(".dialog"),X.addEventListener("sl-hide",Rp=>tt.value=!1),EventBus$1.on("imageSelected",Rp=>{ot.value=Rp.src,tt.value=!0})});const ut={iconUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-icon.png",iconRetinaUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-icon-2x.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png",shadowSize:[41,41]};watch$1(W,()=>{rp()});const yn={CartoDB_DarkMatter:["https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_DarkMatterNoLabels:["https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_DarkMatterOnlyLabels:["https://{s}.basemaps.cartocdn.com/dark_only_labels/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_Positron:["https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_PositronNoLabels:["https://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_PositronOnlyLabels:["https://{s}.basemaps.cartocdn.com/light_only_labels/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_Voyager:["https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_VoyagerNoLabels:["https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_VoyagerOnlyLabels:["https://{s}.basemaps.cartocdn.com/rastertiles/voyager_only_labels/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_VoyagerLabelsUnder:["https://{s}.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],Esri_DeLorme:["https://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Copyright: ©2012 DeLorme",minZoom:1,maxZoom:11}],Esri_NatGeoWorldMap:["https://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC",maxZoom:16}],Esri_OceanBasemap:["https://server.arcgisonline.com/ArcGIS/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri",maxZoom:13}],Esri_WorldGrayCanvas:["https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Esri, DeLorme, NAVTEQ",maxZoom:16}],Esri_WorldImagery:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"}],Esri_WorldPhysical:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer/tile/{z}/{y}/{x}",{maxZoom:8,attribution:"Tiles © Esri — Source: US National Park Service"}],Esri_WorldShadedRelief:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Source: Esri",maxZoom:13}],Esri_WorldStreetMap:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012"}],Esri_WorldTerrain:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Source: USGS, Esri, TANA, DeLorme, and NPS",maxZoom:13}],Esri_WorldTopoMap:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community"}],MtbMap:["http://tile.mtbmap.cz/mtbmap_tiles/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors & USGS'}],OpenStreetMap:["https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:18,attribution:'© OpenStreetMap'}],OpenStreetMap_DE:["https://{s}.tile.openstreetmap.de/{z}/{x}/{y}.png",{maxZoom:18,attribution:'© OpenStreetMap contributors'}],OpenStreetMap_France:["https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png",{maxZoom:20,attribution:'© OpenStreetMap France | © OpenStreetMap contributors'}],OpenStreetMap_HOT:["https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors, Tiles style by Humanitarian OpenStreetMap Team hosted by OpenStreetMap France',maxZoom:19}],OpenStreetMap_Mapnik:["https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors',maxZoom:19}],OpenTopoMap:["https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",{maxZoom:17,attribution:'Map data: © OpenStreetMap contributors, SRTM | Map style: © OpenTopoMap (CC-BY-SA)'}],OPNVKarte:["https://tileserver.memomaps.de/tilegen/{z}/{x}/{y}.png",{attribution:'Map memomaps.de CC-BY-SA, map data © OpenStreetMap contributors',maxZoom:18}],Stadia_AlidadeSmooth:["https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png",{attribution:'© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors',maxZoom:20}],Stadia_AlidadeSmoothDark:["https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png",{attribution:'© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors',maxZoom:20}],Stadia_OSMBright:["https://tiles.stadiamaps.com/tiles/osm_bright/{z}/{x}/{y}{r}.png",{attribution:'© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors',maxZoom:20}],Stadia_Outdoors:["https://tiles.stadiamaps.com/tiles/outdoors/{z}/{x}/{y}{r}.png",{maxZoom:20,attribution:'© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors'}],Stamen_Terrain:["https://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}{r}.{ext}",{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors',subdomains:"abcd",minZoom:0,maxZoom:18,ext:"png"}],Stamen_TerrainBackground:["https://stamen-tiles-{s}.a.ssl.fastly.net/terrain-background/{z}/{x}/{y}{r}.{ext}",{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors',subdomains:"abcd",minZoom:0,maxZoom:18,ext:"png"}],Stamen_TerrainLabels:["https://stamen-tiles-{s}.a.ssl.fastly.net/terrain-labels/{z}/{x}/{y}{r}.{ext}",{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors',subdomains:"abcd",minZoom:0,maxZoom:18,ext:"png"}],Stamen_Toner:["https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}{r}.{ext}",{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors',subdomains:"abcd",minZoom:0,maxZoom:20,ext:"png"}],Stamen_TonerBackground:["https://stamen-tiles-{s}.a.ssl.fastly.net/toner-background/{z}/{x}/{y}{r}.{ext}",{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors',subdomains:"abcd",minZoom:0,maxZoom:20,ext:"png"}],Stamen_TonerLite:["https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}{r}.{ext}",{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors',subdomains:"abcd",minZoom:0,maxZoom:20,ext:"png"}],Stamen_Watercolor:["https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.{ext}",{subdomains:"abcd",minZoom:1,maxZoom:16,ext:"jpg",attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors'}],USGS_USTopo:["https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/{z}/{y}/{x}",{maxZoom:20,attribution:'Tiles courtesy of the U.S. Geological Survey'}],USGS_USImagery:["https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}",{maxZoom:20,attribution:'Tiles courtesy of the U.S. Geological Survey'}],USGS_USImageryTopo:["https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer/tile/{z}/{y}/{x}",{maxZoom:20,attribution:'Tiles courtesy of the U.S. Geological Survey'}]},uo=ref(null),po=computed(()=>{var Bp,Rp;return(Rp=(Bp=uo.value)==null?void 0:Bp.getRootNode())==null?void 0:Rp.host}),mo=ref(null),wo=ref(null),lf=computed(()=>{var Bp;return(Bp=uo==null?void 0:uo.value)==null?void 0:Bp.parentNode}),yf=ref(1),cf=ref(),vf=ref([]),_f=ref(),$f=ref([]),wf=ref(),Pf=ref(),Cf=ref(),Af=ref(q.config||{}),Bf=computed(()=>{var Bp;if((Bp=Af.value.source)!=null&&Bp.owner)return Af.value.source;if(W.base){let[Rp,Fp,Op,...Kp]=W.base.split("/");return{owner:Rp,repository:Fp,branch:Op,dir:Kp?`/${Kp.join("/")}/`:"/"}}return null}),Hf=computed(()=>{var Bp,Rp,Fp,Op;return`https://raw.githubusercontent.com/${(Bp=Bf.value)==null?void 0:Bp.owner}/${(Rp=Bf.value)==null?void 0:Rp.repository}/${(Fp=Bf.value)==null?void 0:Fp.branch}${(Op=Bf.value)==null?void 0:Op.dir}`}),Df=computed(()=>W.caption||W.title),Lf=ref(10),kf=ref(),Nf=ref(),Yf=ref();function Gf(){mo.value&&(mo.value.style.height=W.height?`${W.height}px`:`${mo.value.clientWidth*yf.value}px`)}function rp(){Gf()}const ip=ref(0);watch$1(po,Bp=>{var Rp,Fp;Bp&&(ip.value=((Rp=mo.value)==null?void 0:Rp.clientWidth)||0,rp(),Bp&&new ResizeObserver(Op=>{var Kp,Kf;ip.value!==((Kp=mo.value)==null?void 0:Kp.clientWidth)&&Gf(),!cf.value&&(((Kf=mo.value)==null?void 0:Kf.clientHeight)||0)>0&&yp()}).observe(Bp),(((Fp=mo.value)==null?void 0:Fp.clientHeight)||0)>0&&yp())}),watch$1($f,async()=>{let Bp=await Promise.all($f.value),Rp=Bp.filter(Xf=>Xf["ve-map-marker"]===void 0).filter(Xf=>Xf.geojson!==void 0).map(Xf=>{var wp,dg,mg;let gp=Xf.url||Xf.geojson;return gp.indexOf("http")===0?Xf.geojson=gp:gp[0]==="/"?Xf.geojson=`https://raw.githubusercontent.com/${(wp=Bf.value)==null?void 0:wp.owner}/${(dg=Bf.value)==null?void 0:dg.repository}/${(mg=Bf.value)==null?void 0:mg.branch}${gp}`:Xf.geojson=`${Hf.value}${gp}`,Xf}).map(Xf=>({url:Xf.geojson,item:Xf})),Fp=await Promise.all(Rp.map(Xf=>fetch(Xf.url).catch(gp=>{console.log("Error fetching",Xf.url),console.log(gp)}))),Op=await Promise.all(Fp.map(async(Xf,gp)=>{try{return JSON.parse(await Xf.text())}catch(wp){return console.log("Error parsing JSON",Rp[gp].url),console.log(wp),null}})),Kp={};for(let Xf=0;Xfwp.properties={...wp.properties,...Rp[Xf].item}):Op[Xf].properties={...Op[Xf].properties,...Rp[Xf].item};let gp=Rp[Xf].item.layer||"Locations";Kp[gp]||(Kp[gp]=[]),Kp[gp].push(Op[Xf])}let Kf={};Bp.filter(Xf=>!Xf.geojson||!Xf.preferGeojson).filter(Xf=>!Xf.allmaps).forEach(Xf=>{let gp=Xf.layer||"Locations";Kf[gp]||(Kf[gp]=[]),Kf[gp].push(Xf)}),Bp.filter(Xf=>!Xf.allmaps).forEach(Xf=>{let gp=Xf.layer||"Locations";Kp[gp]?Kf[gp]&&(Kp[gp].push(og(Kf[gp])),delete Kf[gp]):(Kp[gp]=[og(Kf[gp])],delete Kf[gp])}),Cf.value=Kp,Pf.value=Bp.filter(Xf=>Xf.allmaps!==void 0).map(Xf=>({name:Xf.layer||"Image layer",type:"allmaps",id:Xf["allmaps-id"]||Xf.allmaps,disabled:Xf.disabled,opacity:Xf.opacity||100,layer:new hf(`https://annotations.allmaps.org/maps/${Xf["allmaps-id"]||Xf.allmaps}`)}))}),watch$1(Cf,()=>ng());let ap=!1;function yp(){var Rp;if(ap)return;ap=!0,vf.value=W.entities?W.entities.split(/\s+/).filter(Fp=>Fp):[];let Bp=document.querySelector("p.active");Bp&&Bp.getAttribute("data-entities")&&(vf.value=[...vf.value,...((Rp=Bp.getAttribute("data-entities"))==null?void 0:Rp.split(/\s+/).filter(Fp=>vf.value.indexOf(Fp)<0))||[]]),Lp(),xp(),vp(),Mp()}async function vp(){Lf.value=W.zoom;let Bp;if(W.center){let Op=W.center.split(",");if(isQid(Op[0])){let Kp=await getEntity(Op[0]);Bp=$p(Kp.coords),Lf.value=Op.length>1?Number(Op[1]):W.zoom}else{let[Kp,Kf,Xf]=Op.map(Number);Bp=new L$2.LatLng(Kp,Kf),Xf&&(Lf.value=Xf)}}else if(vf.value.length){let Op=await getEntity(vf.value[0]);Bp=$p(Op.coords),Lf.value=9}else Bp=new L$2.LatLng(0,0),Lf.value=6;if(cf.value&&(cf.value.off(),cf.value.remove()),!wo.value)return;W.gestureHandling===!0&&L$2.Map.addInitHook("addHandler","gestureHandling",leafletGestureHandling_minExports.GestureHandling),wo.value.style.cursor="default";let Rp=W.basemaps.split(",").map(Op=>{let[Kp,Kf]=yn[Op];return[Op.replace(/_/," "),L$2.tileLayer(Kp,Kf)]}),Fp={preferCanvas:!1,smoothWheelZoom:!0,smoothSensitivity:1.5,zoomSnap:.1,center:Bp,zoom:Lf.value,zoomAnimation:!0,scrollWheelZoom:W.scrollWheelZoom,gestureHandling:W.gestureHandling===!0,layers:[Rp[0][1]]};cf.value=L$2.map(wo.value,Fp),(Rp.length>1||Object.keys(Cf.value||{}).length>1)&&(wf.value=L$2.control.layers(Object.fromEntries(Rp),{}).addTo(cf.value)),cf.value.on("click",Op=>{var Kp;Np(Op),_f.value&&Vp((Kp=_f.value)==null?void 0:Kp.split(",").slice(0,2).join(",")),W.zoomOnClick&&Dg()}),cf.value.on("zoomend",Op=>{Np(Op),Yf.value&&Yf.value.layer.openPopup()}),cf.value.on("movestart",()=>{wo.value&&(wo.value.style.cursor="move")}),cf.value.on("moveend",Op=>{wo.value&&(wo.value.style.cursor="default"),Np(Op)}),cf.value.on("layeradd",Op=>{var Kp,Kf;if(Op.layer.feature){let Xf=Op.layer;((Kp=Xf.feature)==null?void 0:Kp.type)=="Feature"&&((Kf=Xf.feature)!=null&&Kf.properties.qid)&&Xf.feature}}),ng(),_f.value=`${Number(Bp.lat.toFixed(5))},${Number(Bp.lng.toFixed(5))},${Lf.value}`,kf.value=`${Number(Bp.lat.toFixed(5))},${Number(Bp.lng.toFixed(5))},${Lf.value}`}function Np(Bp){let Rp=Bp.type==="click"?Bp.latlng:Bp.target.getCenter(),Fp=Bp.target.getZoom(),Op=[Rp.lat,Rp.lng,Fp];return _f.value=`${Number(Rp.lat.toFixed(5))},${Number(Rp.lng.toFixed(5))},${Fp}`,Nf.value||(kf.value=`${Number(Rp.lat.toFixed(5))},${Number(Rp.lng.toFixed(5))},${Fp}`),Op}function jp(Bp){return L$2.geoJSON(Bp,{pointToLayer:(Rp,Fp)=>{const Op=Rp.properties;let Kp;if(Op["ve-map-marker"]!==void 0&&Op.url){let[Kf,Xf]=Op.size?Op.size.split(",").map(mg=>Number(mg)):[100,100],gp=`width:${Kf}px;height:${Xf}px;`;Op.circle&&(gp+=`border-radius:50%;border:4px solid ${Op.color||"#555555"};`);let dg=``;Kp=new L$2.Marker(Fp,{icon:L$2.divIcon({html:dg,className:"image-icon",iconSize:[52,52]})})}else{let Kf={...ut};if(Rp.properties.icon&&(Kf.iconUrl=Rp.properties.icon),Rp.properties.shadowUrl&&(Kf.shadowUrl=Rp.properties.shadowUrl),Rp.properties.iconRetinaUrl&&(Kf.iconRetinaUrl=Rp.properties.iconRetinaUrl),Rp.properties.size&&(Kf.iconSize=Op.size.split(",").map(Xf=>Number(Xf))),Op.markerType==="circle"||Op["marker-symbol"]==="circle"){let Xf=Op.radius?Number(Op.radius):Op["marker-size"]?Op["marker-size"]==="small"?8:Op["marker-size"]==="medium"?16:32:4,gp=Op["marker-color"]||"#2C84CB",wp=Op.fill||gp,dg=Number(Op["stroke-width"])||0,mg=dg>0,pg={radius:Xf,fillColor:wp,stroke:mg,color:gp,weight:dg};Kp=L$2.circleMarker(Fp,pg)}else Kp=L$2.marker(Fp,{icon:new L$2.Icon(Kf)})}return Kp},onEachFeature:async(Rp,Fp)=>{var Kp;let Op=Fp;if(!Rp.properties.coords){if((Kp=Op.feature)!=null&&Kp.bbox){let Kf=Op.getBounds().getCenter();Rp.properties.coords=`${Kf.lat},${Kf.lng}`}else if(Rp.geometry.type==="Polygon"){let Kf=K.centroid(Rp);Rp.properties.coords=`${Kf.geometry.coordinates[1]},${Kf.geometry.coordinates[0]}`}}if(Rp.properties.qid){let Kf=await getEntity(Rp.properties.qid);Rp.properties.entityData=Kf;let gp=``;Fp.bindPopup(gp)}else if(Rp.properties.label||Rp.properties.title||Rp.properties.description||Rp.properties["marker-description"]||Rp.properties.image){Rp.properties.url&&(Rp.properties.image=Rp.properties.url);let Xf=``;Fp.bindPopup(Xf)}W.popupOnHover&&(Fp.on("mouseover",()=>Fp.openPopup()),Fp.on("mouseout",()=>Fp.closePopup())),Fp.on("click",()=>{Nf.value?(Fp.closePopup(),Nf.value=void 0):(Fp.openPopup(),Nf.value={},W.zoomOnClick&&xg(Rp.properties.coords))})},style:Rp=>{const Fp=Rp==null?void 0:Rp.properties,Op=Rp==null?void 0:Rp.geometry.type;for(let[Kf,Xf]of Object.entries(Fp))Xf==="null"&&(Fp[Kf]=null);return{color:Fp.color||"#FB683F",weight:Fp.weight||(Op==="Polygon"||Op==="MultiPolygon"?0:4),opacity:Fp.opacity||1,fillColor:Fp.fillColor||"#32C125",fillOpacity:Fp.fillOpacity||.5}}})}let Ip=()=>{var Rp;let Bp=Object.values(Cf.value).map(Fp=>Fp[0]).flatMap(Fp=>Fp.features||Fp).flatMap(Fp=>Fp.bbox?[Fp.bbox.slice(0,2),Fp.bbox.slice(2)]:Fp.geometry.type==="Point"?[Fp.geometry.coordinates]:Fp.geometry.coordinates.flat());Bp.length>1&&((Rp=cf.value)==null||Rp.fitBounds(Bp.map(Fp=>[Fp[1],Fp[0]]),{padding:[100,100]}))},Jp=!1;function ng(){var Bp;if(cf.value&&Cf.value&&Pf.value&&!Jp){let Rp=Object.keys(Cf.value||{}),Fp=Pf.value?Pf.value.length:0;!wf.value&&(Rp.length>1||Rp.length===1&&Rp[0]!=="Locations"||Fp>0)&&(wf.value=L$2.control.layers(Object.fromEntries([]),{}).addTo(cf.value));let Op={};if((Bp=Pf.value)==null||Bp.forEach(Kp=>{var Kf;wf.value&&wf.value.addOverlay(Kp.layer,Kp.name),Kp.disabled||(Kf=cf.value)==null||Kf.addLayer(Kp.layer),Op[Kp.name]=Kp.layer}),Object.keys(Cf.value||{}).forEach(Kp=>{var gp;let Kf=new L$2.LayerGroup,Xf=!1;Cf.value[Kp].forEach(wp=>{var mg;let dg=jp(wp);Kf.addLayer(dg),(mg=wp.properties)!=null&&mg.disabled&&(Xf=!0)}),Xf||(gp=cf.value)==null||gp.addLayer(Kf),wf.value&&wf.value.addOverlay(Kf,Kp)}),Object.keys(Op).length>0){let Kp=L$2.control.opacity(Op,{label:null,collapsed:!0,position:"topright"});Kp.addTo(cf.value),Array.from(Kp.getContainer().querySelectorAll(".leaflet-control-layers-overlays label")).forEach(Kf=>{var wp;let Xf=Kf.children[0].textContent.trim(),gp;if((wp=Pf.value)==null||wp.forEach(dg=>{dg.name===Xf&&(gp=dg)}),gp){let dg=gp.opacity,mg=Kf.children[1].children[0];mg.value=dg,gp.layer.setOpacity(dg/100),mg.addEventListener("input",pg=>{pg.preventDefault(),pg.stopPropagation(),gp.layer.setOpacity(parseInt(mg.value)/100)})}})}W.fit&&Ip()}}function og(Bp){const Rp={type:"FeatureCollection",features:[]};return Bp.filter(Fp=>Fp.coords).forEach(Fp=>{let[Op,Kp]=Fp.coords.split(",").map(Kf=>parseFloat(Kf.trim()));Rp.features.push({type:"Feature",properties:Fp,geometry:{type:"Point",coordinates:[Kp,Op]}})}),Rp}async function vg(Bp){let Rp=await fetch(`https://iiif.mdpress.io/gh-dir/${Bp}?filter=images`).then(Op=>Op.json()).then(Op=>Op.map(Kp=>`https://iiif.mdpress.io/gh:${Bp}/${Kp.name}/manifest.json`));return(await loadManifests(Rp)).filter(Op=>Op.navPlace).map(Op=>qf(Op,Op.id))}async function Dp(){return vf.value.length?Object.values(await getEntityData(vf.value)).filter(Rp=>Rp.coords).map(Rp=>cp(Rp)):[]}async function Lp(){if(!po.value)return;W.ghDir&&($f.value=[...$f.value||[],...await vg(W.ghDir)]);let Bp=null;if(W.data){let Fp=po.value.parentElement;for(;!Bp&&Fp;)Bp=Fp.querySelector(`#${W.data}`),Fp=Fp.parentElement}else Bp=po.value;let Rp=Array.from((Bp==null?void 0:Bp.querySelectorAll("li"))||[]).map(Fp=>(Array.from(Fp.querySelectorAll("a")).forEach(Op=>Op.replaceWith(Op.href)),hp(Fp.innerHTML)));if(W.marker&&W.center){let Fp=W.center.split(",");if(isQid(Fp[0])){let Op=await getEntity(Fp[0]);Rp.push(Promise.resolve(cp(Op)))}else{let[Op,Kp,Kf]=Fp;Rp.push(Promise.resolve({coords:`${Op},${Kp}`,zoom:Kf||W.zoom||10}))}}$f.value=[...$f.value||[],...Rp,...await Dp()]}function xp(){po.value&&new MutationObserver(Bp=>{for(let Rp of Bp)Rp.type==="childList"&&Array.from(Rp.target.classList).indexOf("hydrated")>=0&&Lp()}).observe(po.value,{childList:!0,subtree:!0,characterData:!0})}function kp(Bp){return/^[+-]?\d+(.\d*|\d*),{1}[+-]?\d+(.\d*|\d*)$/.test(Bp)}function lp(Bp){return/^\d{1,2}(\.\d{1})?$/.test(Bp)}function Of(Bp){Bp=Bp||"";let Rp=[];Bp=Bp.replace(/“/,'"').replace(/”/,'"').replace(/’/,"'");let Fp=Bp.match(/[^\s"]+|"([^"]*)"/gmi);return Fp&&Fp.forEach(Op=>{Rp.length>0&&Rp[Rp.length-1].indexOf("=")===Rp[Rp.length-1].length-1?Rp[Rp.length-1]=`${Rp[Rp.length-1]}${Op}`:Rp.push(Op)}),Rp}function qf(Bp,Rp){var Op,Kp,Kf,Xf;let Fp={id:Rp};return Bp.navPlace&&(Fp.coords=Bp.navPlace.features[0].geometry.coordinates.map(gp=>gp.toFixed(5)).join(",")),Bp.label&&(Fp.label=Bp.label.en||Bp.label.none),Bp.summary&&(Fp.description=((Kp=(Op=Bp.summary)==null?void 0:Op.en)==null?void 0:Kp[0])||((Xf=(Kf=Bp.summary)==null?void 0:Kf.none)==null?void 0:Xf[0])),Bp.thumbnail&&(Fp.image=Bp.thumbnail[0].id),Fp}function cp(Bp,Rp=""){let Fp={id:Rp||Bp.id};return Bp.coords&&(Fp.coords=Bp.coords),W.preferGeojson&&Bp.geojson&&(Fp.geojson=Bp.geojson),Bp.label&&(Fp.label=Bp.label),Bp.description&&(Fp.description=Bp.description),Bp.thumbnail&&(Fp.image=Bp.thumbnail),Fp}async function hp(Bp){let Rp=Of(Bp),Fp=/\.(geo)?json$/i,Op=/^[a-z0-9\-]+:.+/,Kp={},Kf=new Set(["disabled","prefer-geojson"]);for(let Xf=0;Xf0){let[wp,...dg]=gp.split("="),mg=dg.join("=");if(mg=mg[mg.length-1]==='"'?mg.slice(1,-1):mg,wp==="qid"){let pg=await getEntity(mg);Kp={...cp(pg,gp),...Kp}}else if(wp==="iiif"){let pg=await getManifest(gp);Kp={...qf(pg,gp),...Kp}}else Kp[wp]=mg}else if(lp(gp))Kp.zoom=parseInt(gp);else if(kp(gp))Kp.coords=gp,Kp.id=gp;else if(isQid(gp)){let wp=await getEntity(gp);Kp={...cp(wp,gp),...Kp}}else if(Fp.test(gp))Kp.geojson=gp;else if(Op.test(gp)){let wp=await getManifest(gp);Kp={...qf(wp,gp),...Kp}}else if(Kf.has(gp))Kp[kebabToCamel(gp)]=!0;else{let wp=gp[0]==='"'&&gp[gp.length-1]==='"'?gp.slice(1,-1):gp;Kp.label?Kp.description=wp:Kp.label=wp}}return Kp.preferGeojson=!!(Kp.preferGeojson||W.preferGeojson&&Kp.geojson||Kp.geojson&&!Kp.coords),Kp}function $p(Bp){let[Rp,Fp]=Bp.split(",").map(Op=>parseFloat(Op.trim()));return new leafletSrcExports.LatLng(Rp,Fp)}function Vp(Bp){console.log("copyTextToClipboard",Bp),navigator.clipboard&&navigator.clipboard.writeText(Bp)}function bp(Bp="",Rp=""){return Object.values(Cf.value).map(Op=>{let Kp=Op[0];return Kp.type==="FeatureCollection"?Kp.features:[Kp]}).flat().find(Op=>{var Kp,Kf;return Op.id===Bp||((Kp=Op.properties)==null?void 0:Kp.id)===Bp||((Kf=Op.properties)==null?void 0:Kf.coords)===Rp})}function Ep(Bp=""){var gp,wp,dg;let Rp=Bp.split("/").filter(mg=>mg).filter(mg=>mg!=="flyto"),Fp="",Op="";Rp.length===1?Fp=Rp[0]:Rp.length>1&&(Op=`${Rp[0]},${Rp[1]}`);let Kp=bp(Fp,Op),Kf=((gp=Kp==null?void 0:Kp.properties)==null?void 0:gp.zoom)||10,Xf;return(wp=cf.value)==null||wp.eachLayer(mg=>{var pg,wg,Cg,Bg;(((wg=(pg=mg==null?void 0:mg.feature)==null?void 0:pg.properties)==null?void 0:wg.id)===Fp||((Bg=(Cg=mg==null?void 0:mg.feature)==null?void 0:Cg.properties)==null?void 0:Bg.coords)===Fp)&&(Xf=mg)}),Xf||(dg=cf.value)==null||dg.eachLayer(mg=>Xf=mg),{id:Fp||Op,zoom:Kf,layer:Xf}}function _p(){var Fp,Op;let Bp=((Fp=cf.value)==null?void 0:Fp.getCenter())||new L$2.LatLng(0,0),Rp=((Op=cf.value)==null?void 0:Op.getZoom())||10;return`${Number(Bp.lat.toFixed(5))},${Number(Bp.lng.toFixed(5))},${Rp}`}function Mp(){var Fp,Op;let Bp=(Fp=po.value)==null?void 0:Fp.parentElement,Rp=new Set;for(;Bp!=null&&Bp.parentElement&&Bp.tagName!=="MAIN";)Array.from(Bp.querySelectorAll("[enter],[exit]")).forEach(Kp=>{Rp.has(Kp)||(hg(Kp),Rp.add(Kp))}),Bp=Bp.parentElement;for(Bp=(Op=po.value)==null?void 0:Op.parentElement;Bp;)Array.from(Bp.querySelectorAll("a")).forEach(async Kp=>{var wp;let Xf=new URL(Kp.href).pathname.split("/").filter(dg=>dg),gp=Xf.indexOf("flyto");if(gp>=0){let dg=Xf[gp+1],mg=Xf.slice(gp+2).filter(mm=>mm==="click"||mm==="mouseover")[0]||"click",pg=Xf.slice(gp+2).filter(mm=>mm!=="click"&&mm!=="mouseover")[0],wg,Cg=dg.split(",");if(isQid(Cg[0])){let mm=await ug(Cg[0]),Hg=Cg.length>1?Number(Cg[1]):W.zoom||10;dg=`${mm},${Hg}`}let Bg,Xg=Kp.parentElement;for(;Xg&&!Bg;)Bg=Xg.dataset.id,Xg=Xg.parentElement;if(Bg){let mm=(wp=po.value)==null?void 0:wp.dataset.id;if(mm&&mm!==Bg)return}if(pg&&(wg=document.getElementById(pg),!wg)||(wg=Yp(Kp),wg!==po.value))return;Kp.classList.add("flyto"),Kp.href="javascript:;",Kp.setAttribute("data-location",dg),Kp.addEventListener(mg,mm=>{var Yy;let Hg=mm.target,Iy=Hg.getAttribute("data-location")||((Yy=Hg==null?void 0:Hg.parentElement)==null?void 0:Yy.getAttribute("data-location")),py=_p();Iy===py?kg():Iy&&lm(Iy)})}}),Bp=Bp.parentElement}function Yp(Bp){let Rp,Fp=Bp.parentElement;for(;Fp&&!Rp;)Rp=Fp.querySelector("ve-map"),Fp=Fp.parentElement;return Rp}async function ug(Bp){return(await getEntity(Bp)).coords.split(",").map(Fp=>Number(Fp).toFixed(5)).map(Fp=>parseFloat(Fp)).join(",")}function hg(Bp){let Rp=Bp.classList.contains("active");new MutationObserver(Op=>{Op.forEach(Kp=>{if(Kp.attributeName=="class"){let Kf=Kp.target.classList.contains("active");if(Rp!==Kf){Rp=Kf;let Xf=Bp.attributes.getNamedItem(Kf?"enter":"exit");if(Xf){const[gp,...wp]=Xf.value.split(":");let dg=wp.join(":");gp==="flyto"&&xg(dg,!0),Xf.name==="exit"&&Dg()}}}})}).observe(Bp,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}async function xg(Bp,Rp=!1){var Fp,Op;if(Yf.value=Ep(Bp),Yf.value.layer){if(Yf.value.id===Nf.value&&!Rp)Yf.value.layer.closePopup(),Dg();else if(Nf.value=Yf.value.id,(Fp=Yf.value.layer.feature)!=null&&Fp.properties){let Kp=$p(Yf.value.layer.feature.properties.coords);(Op=cf.value)==null||Op.flyTo(Kp,Yf.value.zoom)}}else Dg()}async function kg(){var Op;if(!W.center)return;let Bp,Rp=W.zoom||10,Fp=W.center.split(",");if(isQid(Fp[0])){let Kp=await getEntity(Fp[0]);Bp=$p(Kp.coords),Rp=Fp.length>1?Number(Fp[1]):Rp}else{let[Kp,Kf,Xf]=Fp.map(Number);Bp=new L$2.LatLng(Kp,Kf),Xf&&(Rp=Xf)}(Op=cf.value)==null||Op.flyTo(Bp,Rp)}function Dg(){var Bp,Rp;if(Yf.value=null,kf.value){let[Fp,Op,Kp]=kf.value.split(",").map(Xf=>parseFloat(Xf)),Kf=new L$2.LatLng(Fp,Op);(Bp=cf.value)==null||Bp.flyTo(Kf,Kp),(Rp=cf.value)==null||Rp.closePopup()}Nf.value=void 0}async function lm(Bp){var Kp;let Rp,Fp=10,Op=Bp.split(",");if(isQid(Op[0])){let Kf=await getEntity(Op[0]);Rp=$p(Kf.coords),Fp=Op.length>1?Number(Op[1]):W.zoom||Fp}else{let[Kf,Xf,gp]=Op.map(Number);Rp=new L$2.LatLng(Kf,Xf),gp&&(Fp=gp||W.zoom||Fp)}(Kp=cf.value)==null||Kp.flyTo(Rp,Fp)}return(Bp,Rp)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:uo,style:{width:"100%",height:"100%"}},[createBaseVNode("div",{class:"content",ref_key:"contentEl",ref:mo},[createBaseVNode("div",{id:"lat-lng-zoom",innerHTML:_f.value,onClick:Rp[0]||(Rp[0]=Fp=>Vp(`${_f.value}`))},null,8,_hoisted_1$8),createBaseVNode("div",{id:"map",ref_key:"mapEl",ref:wo},null,512),Df.value?(openBlock(),createElementBlock("div",_hoisted_2$6,toDisplayString(Df.value),1)):createCommentVNode("",!0)],512),createBaseVNode("sl-dialog",{class:"dialog","no-header":"",style:normalizeStyle({"--width":rt.value,"--body-spacing":0,"--footer-spacing":"0.5em"})},[ot.value?(openBlock(),createElementBlock("ve-image",{key:0,"no-caption":"",src:ot.value,fit:"cover"},null,8,_hoisted_3$6)):createCommentVNode("",!0),createBaseVNode("div",_hoisted_4$6,[createBaseVNode("ve-caption",{src:ot.value},null,8,_hoisted_5$4),createBaseVNode("div",_hoisted_6$3,[createBaseVNode("sl-button",{variant:"primary",onClick:Rp[1]||(Rp[1]=Fp=>ot.value=null)},"Close")])])],4)],512))}}),_style_0$8=`.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,.5)}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255,255,255,.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:rgba(255,255,255,.8);text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}input[type=range]{-webkit-appearance:none;-webkit-tap-highlight-color:rgba(255,255,255,0);width:110px;height:10px;margin:0;border:none;padding:1px 2px;border-radius:30px;background:#f1f0ee;outline:none}input[type=range]::-ms-track{border:inherit;color:transparent;background:transparent}input[type=range]::-ms-fill-lower,input[type=range]::-ms-fill-upper{background:transparent}input[type=range]::-ms-tooltip{display:none}input[type=range]::-ms-thumb{width:15px;height:18px;border-radius:12px;border:0;background-image:linear-gradient(to bottom,#1253a4 0,#1253a4 100%)}.leaflet-control-layers-label{margin:0 0 8px 1px}@keyframes leaflet-gestures-fadein{0%{opacity:0}to{opacity:1}}.leaflet-container:after{animation:leaflet-gestures-fadein .8s backwards;color:#fff;font-family:Roboto,Arial,sans-serif;font-size:22px;justify-content:center;display:flex;align-items:center;padding:15px;position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);z-index:461;pointer-events:none}.leaflet-gesture-handling-touch-warning:after,.leaflet-gesture-handling-scroll-warning:after{animation:leaflet-gestures-fadein .8s forwards}.leaflet-gesture-handling-touch-warning:after{content:attr(data-gesture-handling-touch-content)}.leaflet-gesture-handling-scroll-warning:after{content:attr(data-gesture-handling-scroll-content)}:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}@supports (scrollbar-gutter: stable){.sl-scroll-lock{scrollbar-gutter:stable!important;overflow:hidden!important}}@supports not (scrollbar-gutter: stable){.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}:host{display:flex;align-content:center;justify-content:center;position:relative;background-color:inherit;z-index:0}.content{display:flex;flex-direction:column;width:100%;height:100%;margin:auto}#map{width:100%;height:100%}.caption{background-color:#fff;color:#000;padding:6px;line-height:1.2}#lat-lng-zoom{position:absolute;font-family:sans-serif;bottom:24px;right:0;width:150px;height:32px;padding:3px 6px;font-size:.8rem;background-color:#ffffff80;color:#000;z-index:2;opacity:0;text-align:right}#lat-lng-zoom:hover{visibility:visible;opacity:1;transition:all .3s ease-in;cursor:copy;z-index:1000}.card{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto auto 1fr 0px;border-radius:4px;padding:0}.card p{border:none}.card-image{grid-area:1 / 1 / 2 / 2;width:100%;height:190px}.card-title{grid-area:2 / 1 / 3 / 2;font-weight:700;font-size:1.5rem;line-height:1;padding:1.3rem .5rem .2rem;text-decoration:none}.card-metadata{grid-area:3 / 1 / 4 / 2;list-style:none;padding:.2rem .5rem;margin:0;font-size:.9rem;font-weight:400}.card-abstract{grid-area:4 / 1 / 5 / 2;align-self:flex-end;height:110px;line-height:1.4;font-size:1rem;padding:.5rem .5rem 0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;margin:0 0 .5rem}.leaflet-popup-content{width:280px;margin:0}.leaflet-control-layers-toggle{background-image:url(https://unpkg.com/leaflet@1.9.3/dist/images/layers.png)}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(https://unpkg.com/leaflet@1.9.3/dist/images/layers-2x.png)}sl-dialog::part(panel){max-width:unset;max-height:unset;height:100dvh}sl-dialog::part(overlay){--sl-overlay-background-color: rgba(100, 100, 100, .8)}sl-dialog::part(footer){background-color:#64646480}.leaflet-top,.leaflet-bottom{z-index:unset}.dialog .footer{display:flex;align-items:center;gap:.5em;padding:.5em;text-align:left}.push{margin-left:auto} -`,Map$3=_export_sfc(_sfc_main$a,[["styles",[_style_0$8]]]),_hoisted_1$7=createBaseVNode("sl-button",{slot:"trigger"},[createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",slot:"prefix",width:"16",height:"16",fill:"currentColor",class:"bi bi-list",viewBox:"0 0 16 16"},[createBaseVNode("path",{"fill-rule":"evenodd",d:"M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"})])],-1),_hoisted_2$5=["onClick"],_hoisted_3$5=["innerHTML"],_hoisted_4$5=["innerHTML"],_hoisted_5$3={key:1,slot:"prefix",style:{width:"1em","margin-right":"1em"}},_hoisted_6$2=createBaseVNode("span",null,"Download as PDF",-1),_hoisted_7$2=createBaseVNode("img",{slot:"prefix",width:"16",src:"https://upload.wikimedia.org/wikipedia/commons/2/2a/Noun_Project_PDF_icon_117327_cc.svg",alt:"PDF Download Icon"},null,-1),_hoisted_8$1=[_hoisted_6$2,_hoisted_7$2],_hoisted_9$2={class:"font-medium"},_hoisted_10$2=createBaseVNode("span",{class:"font-medium"}," Logout",-1),_hoisted_11$2=["innerHTML"],_hoisted_12$2={class:"font-medium"},_hoisted_13$2=["innerHTML"],_hoisted_14$1={class:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto min-h-[calc(100%-3.5rem)] flex items-center"},_hoisted_15$1={class:"flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"},_hoisted_16$1={class:"p-4 overflow-y-auto flex items-center gap-4 text-black"},_hoisted_17$1=createBaseVNode("sl-spinner",{style:{"font-size":"3rem","--indicator-color":"deeppink","--track-color":"pink"}},null,-1),_hoisted_18$1=["innerHTML"],_sfc_main$9=defineComponent({__name:"Menu.ce",props:{auth:{type:String},contact:{type:String},pdfDownloadEnabled:{type:Boolean,default:!1}},setup(F){const W=F,q=ref(null),K=computed(()=>{var Gf,rp;return(rp=(Gf=q.value)==null?void 0:Gf.getRootNode())==null?void 0:rp.host});watch$1(K,()=>{mo()});const X=ref(null),tt=computed(()=>X==null?void 0:X.value),rt=computed(()=>new HSOverlay(tt.value)),ot=ref(null),ut=computed(()=>ot==null?void 0:ot.value),yn=ref("Generating PDF...");watch$1(ut,Gf=>{rt.value.init(),Gf.addEventListener("open.hs.overlay",rp=>uo.value=!0),Gf.addEventListener("close.hs.overlay",rp=>uo.value=!1)});const uo=ref(!1);watch$1(uo,Gf=>{Gf?rt.value.open(ut.value):rt.value.close(ut.value)}),onMounted(async()=>{W.auth==="github"&&Df()});const po=ref([]);function mo(){function Gf(){let rp=Array.from(K.value.querySelectorAll("li")).map(ip=>{var Np,jp;const ap=ip.querySelector("a");let yp=ap==null?void 0:ap.innerText.trim(),vp=(Np=ip.querySelector("svg"))==null?void 0:Np.outerHTML;if(!vp){let Ip=((jp=ap==null?void 0:ap.href.split("/").filter(Jp=>Jp).pop())==null?void 0:jp.toLowerCase())||"";location.host===Ip?Ip="home":Ip.indexOf("search")===0?Ip="search":Ip==="docs.juncture-digital.org"&&(Ip="docs"),cf[Ip]&&(vp=cf[Ip])}return{label:yp,icon:vp,href:ap==null?void 0:ap.href}});W.contact&&rp.push({label:"Contact Us",icon:cf.contact,href:"/contact"}),po.value=rp}Gf(),new MutationObserver(rp=>{for(let ip of rp)ip.type==="childList"&&Gf()}).observe(K.value,{childList:!0,subtree:!0})}function wo(Gf,rp){let ip=Gf.href.split("/").filter(ap=>ap).pop().toLowerCase();if(ip=location.host===ip?"home":ip.indexOf("search")===0?"search":ip,ip==="contact")lf();else if(ip==="search")vf.open(Gf.href,"_blank");else{let ap=new URL(Gf.href),yp=(vf==null?void 0:vf.config)||{};if(console.log(ap,location,yp),ap.origin===location.origin){let vp,Np=new URL(location.href).searchParams.get("source");if(Np&&ap.pathname===location.pathname){console.log("source",Np);let[jp,Ip,Jp]=Np.split("/").filter(ng=>ng)||[];vp=`${location.origin}${location.pathname}?source=${jp}/${Ip}/${Jp}/`}else vp=`${ap.origin}${yp.baseurl||""}${ap.pathname}`;console.log("href",vp),location.href=vp}else location.href=Gf.href}}function lf(){const Gf=W.contact,rp=`${vf.config.title} Contact`,ap=`mailto:${Gf}?subject=${rp}&body=`;vf.open(ap,"_blank")}async function yf(){var vp,Np;yn.value="Generating PDF...",uo.value=!uo.value;let Gf=(vp=vf.config)==null?void 0:vp.source,rp=new URL(location.href),ip=rp.hostname=="localhost"?`https://v3.juncture-digital.org?source=${Gf.owner}/${Gf.repository}/${Gf.branch}/${Gf.path}`:rp.href;console.log("generatePDF for url:",ip);let ap=!!document.querySelector("article.j1"),yp=await fetch(`https://ezsitepdf-drnxe7pzjq-uc.a.run.app/pdf?url=${encodeURIComponent(ip)}${ap?"&landscape=true":""}`);if(yp.ok){let jp=((Np=Gf.path.split("/").filter(og=>og).filter(og=>og!=="README.md"&&og!=="index.md"))==null?void 0:Np.pop().replace(".md",""))||"document";yn.value="Downloading PDF...";let Ip=await yp.blob();const Jp=document.createElement("a");Jp.setAttribute("download",`${jp}.pdf`);const ng=URL.createObjectURL(Ip);Jp.href=ng,Jp.setAttribute("target","_blank"),Jp.click(),Jp.addEventListener,URL.revokeObjectURL(ng)}setTimeout(()=>uo.value=!1,2e3)}const cf={about:'',contact:'',docs:'',examples:'',editor:'',home:'',login:'',search:'',tools:'',user:'',wb:'',workbench:''},vf=self.window,_f=ref(vf.config||{}),$f=ref(null),wf=ref(!1);watch$1($f,()=>{$f.value?(localStorage.setItem("auth-user",JSON.stringify($f.value)),localStorage.setItem("gh-auth-token",$f.value.token),localStorage.setItem("gh-username",$f.value.username)):(localStorage.getItem("auth-user")&&localStorage.removeItem("auth-user"),localStorage.getItem("gh-auth-token")&&localStorage.removeItem("gh-auth-token"),localStorage.getItem("gh-username")&&localStorage.removeItem("gh-username"))});const Pf=computed(()=>{var Gf,rp;return((Gf=$f.value)==null?void 0:Gf.token)||((rp=$f.value)==null?void 0:rp.token)||!1});watch$1(Pf,()=>{Pf.value||(wf.value=!1)});function Cf(Gf){return Gf[0].toUpperCase()+Gf.slice(1).toLowerCase()}function Af(Gf){Gf.preventDefault(),Lf()}function Bf(Gf){Gf.preventDefault(),$f.value=null,kf()}const Hf={"iiif.mdpress.io":"9baccef56771878fd304","www.mdpress.io":"12548925f073dccf16d4","v3.juncture-digital.org":"Ov23li6BZxay7BGbQwHe"};async function Df(){var yp,vp,Np;let Gf=localStorage.getItem("auth-user")&&JSON.parse(localStorage.getItem("auth-user")||"{}");(Gf==null?void 0:Gf.provider)==="github"?$f.value=Gf:$f.value=null;let rp=new URL(vf.location.href).searchParams,ip=rp.get("code"),ap=rp.get("source");if(ip){let jp=`${location.pathname}${location.hash}`+(ap?`?source=${ap}`:"");vf.history.replaceState({},"",jp);let Ip=`https://iiif.mdpress.io/gh-token?code=${ip}&hostname=${vf.location.hostname}`,Jp=await fetch(Ip);if(Jp.ok){let ng=await Jp.text(),og=await Nf(ng);$f.value=og}}$f.value&&((yp=_f.value)!=null&&yp.github)&&(wf.value=await Yf((vp=_f.value)==null?void 0:vp.github.owner_name,(Np=_f.value)==null?void 0:Np.github.repository_name,$f.value.username,$f.value.token))}async function Lf(){var ip,ap,yp,vp;let Gf=new URL(vf.location.href).hostname;if(Gf==="localhost"||Gf.indexOf("192.168.")===0){let Np=await fetch("https:iiif.mdpress.io/gh-token?hostname=localhost&code=testing");if(Np.ok){let jp=await Np.text(),Ip=await Nf(jp);$f.value=Ip,wf.value=await Yf((ap=(ip=_f.value)==null?void 0:ip.github)==null?void 0:ap.owner_name,(vp=(yp=_f.value)==null?void 0:yp.github)==null?void 0:vp.repository_name,$f.value.username,jp),location.reload()}}else{let Np=new URL(location.href).searchParams.get("source"),jp=`${vf.location.href}`,Ip=Hf[location.hostname]!==void 0?`https://github.com/login/oauth/authorize?client_id=${Hf[location.hostname]}&scope=repo&state=juncture&redirect_uri=${jp}`+(Np?`&source=${Np}`:""):null;Ip&&(vf.location.href=Ip)}}function kf(){Object.keys(localStorage).filter(Gf=>Gf==="auth-user"||Gf==="gh-auth-token"||Gf==="gh-username").forEach(Gf=>localStorage.removeItem(Gf)),$f.value=null,location.reload()}async function Nf(Gf){let rp=await fetch("https://api.github.com/user",{headers:{Accept:"application/vnd.github+json",Authorization:`token ${Gf}`}});if(rp.ok){let ip=await rp.json();return{provider:"github",username:ip.login,name:ip.name,email:ip.email,token:Gf}}}async function Yf(Gf,rp,ip,ap){let yp=`https://api.github.com/repos/${Gf}/${rp}/collaborators/${ip}`,vp=await fetch(yp,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${ap}`}});return vp.ok&&vp.status===204}return(Gf,rp)=>{var ip,ap;return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("sl-dropdown",{ref_key:"root",ref:q},[_hoisted_1$7,createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(po.value,yp=>(openBlock(),createElementBlock("sl-menu-item",{onClick:vp=>wo(yp)},[createBaseVNode("span",{innerHTML:yp.label},null,8,_hoisted_3$5),yp.icon?(openBlock(),createElementBlock("svg",{key:0,slot:"prefix",innerHTML:yp.icon},null,8,_hoisted_4$5)):(openBlock(),createElementBlock("span",_hoisted_5$3))],8,_hoisted_2$5))),256)),F.pdfDownloadEnabled?(openBlock(),createElementBlock("sl-menu-item",{key:0,onClick:yf},_hoisted_8$1)):createCommentVNode("",!0),W.auth&&Pf.value?(openBlock(),createElementBlock("sl-menu-item",{key:1,onClick:Bf},[createBaseVNode("span",_hoisted_9$2,"("+toDisplayString(((ip=$f.value)==null?void 0:ip.name)||((ap=$f.value)==null?void 0:ap.email))+")",1),_hoisted_10$2,(openBlock(),createElementBlock("svg",{slot:"prefix",innerHTML:cf.user},null,8,_hoisted_11$2))])):createCommentVNode("",!0),W.auth&&!Pf.value?(openBlock(),createElementBlock("sl-menu-item",{key:2,onClick:Af},[createBaseVNode("span",_hoisted_12$2,"Login with "+toDisplayString(Cf(W.auth)),1),(openBlock(),createElementBlock("svg",{slot:"prefix",innerHTML:cf.login},null,8,_hoisted_13$2))])):createCommentVNode("",!0)])],512),createBaseVNode("div",{ref_key:"overlayRef",ref:X},[createBaseVNode("div",{ref_key:"modalRef",ref:ot,id:"hs-basic-modal",class:"hs-overlay hidden w-full h-full fixed top-0 start-0 z-[80] overflow-x-hidden overflow-y-auto pointer-events-none"},[createBaseVNode("div",_hoisted_14$1,[createBaseVNode("div",_hoisted_15$1,[createBaseVNode("div",_hoisted_16$1,[_hoisted_17$1,createBaseVNode("p",{innerHTML:yn.value},null,8,_hoisted_18$1)])])])],512)],512)],64)}}}),_style_0$7=`:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}@supports (scrollbar-gutter: stable){.sl-scroll-lock{scrollbar-gutter:stable!important;overflow:hidden!important}}@supports not (scrollbar-gutter: stable){.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.\\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.\\!relative{position:relative!important}.relative{position:relative}.sticky{position:sticky}.-inset-1{top:-.25rem;right:-.25rem;bottom:-.25rem;left:-.25rem}.inset-0{top:0;right:0;bottom:0;left:0}.end-1{inset-inline-end:.25rem}.right-\\[10px\\]{right:10px}.start-0{inset-inline-start:0px}.top-0{top:0}.top-\\[12px\\]{top:12px}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.z-\\[80\\]{z-index:80}.float-right{float:right}.float-left{float:left}.float-none{float:none}.clear-left{clear:left}.clear-right{clear:right}.clear-both{clear:both}.clear-none{clear:none}.m-1{margin:.25rem}.m-3{margin:.75rem}.me-1{margin-inline-end:.25rem}.ml-1{margin-left:.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-none{overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.\\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\\!table{display:table!important}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.\\!grid{display:grid!important}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.h-1{height:.25rem}.h-40{height:10rem}.h-8{height:2rem}.h-80{height:20rem}.h-auto{height:auto}.h-full{height:100%}.min-h-\\[calc\\(100\\%-3\\.5rem\\)\\]{min-height:calc(100% - 3.5rem)}.w-1{width:.25rem}.w-\\[a-z0-9-\\]{width:a-z0-9-}.w-full{width:100%}.max-w-\\[24px\\]{max-width:24px}.max-w-xs{max-width:20rem}.flex-shrink,.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.caption-top{caption-side:top}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.\\!transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform,.transform-cpu{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}.cursor-pointer{cursor:pointer}.touch-auto{touch-action:auto}.touch-none{touch-action:none}.touch-pan-x{--tw-pan-x: pan-x;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-left{--tw-pan-x: pan-left;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-right{--tw-pan-x: pan-right;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-up{--tw-pan-y: pan-up;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-down{--tw-pan-y: pan-down;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pinch-zoom{--tw-pinch-zoom: pinch-zoom;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-manipulation{touch-action:manipulation}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize-none{resize:none}.resize-y{resize:vertical}.resize-x{resize:horizontal}.resize{resize:both}.snap-none{scroll-snap-type:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-both{scroll-snap-type:both var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.snap-proximity{--tw-scroll-snap-strictness: proximity}.snap-start{scroll-snap-align:start}.snap-end{scroll-snap-align:end}.snap-center{scroll-snap-align:center}.snap-align-none{scroll-snap-align:none}.snap-normal{scroll-snap-stop:normal}.snap-always{scroll-snap-stop:always}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.columns-1{-moz-columns:1;columns:1}.break-before-auto{-moz-column-break-before:auto;break-before:auto}.break-before-avoid{-moz-column-break-before:avoid;break-before:avoid}.break-before-all{-moz-column-break-before:all;break-before:all}.break-before-avoid-page{-moz-column-break-before:avoid;break-before:avoid-page}.break-before-page{-moz-column-break-before:page;break-before:page}.break-before-left{-moz-column-break-before:left;break-before:left}.break-before-right{-moz-column-break-before:right;break-before:right}.break-before-column{-moz-column-break-before:column;break-before:column}.break-inside-auto{-moz-column-break-inside:auto;break-inside:auto}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-inside-avoid-page{break-inside:avoid-page}.break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.break-after-auto{-moz-column-break-after:auto;break-after:auto}.break-after-avoid{-moz-column-break-after:avoid;break-after:avoid}.break-after-all{-moz-column-break-after:all;break-after:all}.break-after-avoid-page{-moz-column-break-after:avoid;break-after:avoid-page}.break-after-page{-moz-column-break-after:page;break-after:page}.break-after-left{-moz-column-break-after:left;break-after:left}.break-after-right{-moz-column-break-after:right;break-after:right}.break-after-column{-moz-column-break-after:column;break-after:column}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row-dense{grid-auto-flow:row dense}.grid-flow-col-dense{grid-auto-flow:column dense}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.flex-nowrap{flex-wrap:nowrap}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-content-end{place-content:end}.place-content-between{place-content:space-between}.place-content-around{place-content:space-around}.place-content-evenly{place-content:space-evenly}.place-content-baseline{place-content:baseline}.place-content-stretch{place-content:stretch}.place-items-start{place-items:start}.place-items-end{place-items:end}.place-items-center{place-items:center}.place-items-baseline{place-items:baseline}.place-items-stretch{place-items:stretch}.content-normal{align-content:normal}.content-center{align-content:center}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-evenly{align-content:space-evenly}.content-baseline{align-content:baseline}.content-stretch{align-content:stretch}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-normal{justify-content:normal}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-stretch{justify-content:stretch}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.divide-dashed>:not([hidden])~:not([hidden]){border-style:dashed}.divide-dotted>:not([hidden])~:not([hidden]){border-style:dotted}.divide-double>:not([hidden])~:not([hidden]){border-style:double}.divide-none>:not([hidden])~:not([hidden]){border-style:none}.place-self-auto{place-self:auto}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.place-self-stretch{place-self:stretch}.self-auto{align-self:auto}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.self-baseline{align-self:baseline}.justify-self-auto{justify-self:auto}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.justify-self-stretch{justify-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-x-clip{overflow-x:clip}.overflow-y-clip{overflow-y:clip}.overflow-x-visible{overflow-x:visible}.overflow-y-visible{overflow-y:visible}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.overscroll-auto{overscroll-behavior:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.overscroll-y-auto{overscroll-behavior-y:auto}.overscroll-y-contain{overscroll-behavior-y:contain}.overscroll-y-none{overscroll-behavior-y:none}.overscroll-x-auto{overscroll-behavior-x:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-x-none{overscroll-behavior-x:none}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.hyphens-none{-webkit-hyphens:none;hyphens:none}.hyphens-manual{-webkit-hyphens:manual;hyphens:manual}.hyphens-auto{-webkit-hyphens:auto;hyphens:auto}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.whitespace-break-spaces{white-space:break-spaces}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-e{border-inline-end-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-double{border-style:double}.border-hidden{border-style:hidden}.border-none{border-style:none}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-\\[rgb\\(255\\,0\\,0\\)\\]{--tw-bg-opacity: 1;background-color:rgb(255 0 0 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-content{background-clip:content-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-origin-border{background-origin:border-box}.bg-origin-padding{background-origin:padding-box}.bg-origin-content{background-origin:content-box}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.object-none{-o-object-fit:none;object-fit:none}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-14{padding:3.5rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-8{padding:2rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pe-1{padding-inline-end:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-top{vertical-align:text-top}.align-text-bottom{vertical-align:text-bottom}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.\\!ordinal{--tw-ordinal: ordinal !important;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero: slashed-zero;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure: lining-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure: oldstyle-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing: proportional-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction: diagonal-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction: stacked-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.text-\\[\\#336699\\]\\/\\[\\.35\\]{color:#33669959}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.bg-blend-normal{background-blend-mode:normal}.bg-blend-multiply{background-blend-mode:multiply}.bg-blend-screen{background-blend-mode:screen}.bg-blend-overlay{background-blend-mode:overlay}.bg-blend-darken{background-blend-mode:darken}.bg-blend-lighten{background-blend-mode:lighten}.bg-blend-color-dodge{background-blend-mode:color-dodge}.bg-blend-color-burn{background-blend-mode:color-burn}.bg-blend-hard-light{background-blend-mode:hard-light}.bg-blend-soft-light{background-blend-mode:soft-light}.bg-blend-difference{background-blend-mode:difference}.bg-blend-exclusion{background-blend-mode:exclusion}.bg-blend-hue{background-blend-mode:hue}.bg-blend-saturation{background-blend-mode:saturation}.bg-blend-color{background-blend-mode:color}.bg-blend-luminosity{background-blend-mode:luminosity}.mix-blend-normal{mix-blend-mode:normal}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-screen{mix-blend-mode:screen}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-darken{mix-blend-mode:darken}.mix-blend-lighten{mix-blend-mode:lighten}.mix-blend-color-dodge{mix-blend-mode:color-dodge}.mix-blend-color-burn{mix-blend-mode:color-burn}.mix-blend-hard-light{mix-blend-mode:hard-light}.mix-blend-soft-light{mix-blend-mode:soft-light}.mix-blend-difference{mix-blend-mode:difference}.mix-blend-exclusion{mix-blend-mode:exclusion}.mix-blend-hue{mix-blend-mode:hue}.mix-blend-saturation{mix-blend-mode:saturation}.mix-blend-color{mix-blend-mode:color}.mix-blend-luminosity{mix-blend-mode:luminosity}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-dashed{outline-style:dashed}.outline-dotted{outline-style:dotted}.outline-double{outline-style:double}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!invert{--tw-invert: invert(100%) !important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter-none{filter:none}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-grayscale{--tw-backdrop-grayscale: grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-invert{--tw-backdrop-invert: invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-sepia{--tw-backdrop-sepia: sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter-none{-webkit-backdrop-filter:none;backdrop-filter:none}.\\!transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.content-\\[\\'this-is-also-valid\\]-weirdly-enough\\'\\]{--tw-content: "this-is-also-valid]-weirdly-enough";content:var(--tw-content)}.\\[--placement\\:bottom\\]{--placement: bottom}.\\[--placement\\:top\\]{--placement: top}.\\[--trigger\\:click\\]{--trigger: click}.\\[-\\:\\=\\]{-: =}.\\[a-zA-Z0-9\\:\\\\\\\\-\\\\\\\\\\._\\$\\]{a-z-a--z0-9:\\\\-\\\\. $}.\\[a-zA-Z0-9\\:_-\\]{a-z-a--z0-9:-}.\\[a-zA-Z\\:_\\]{a-z-a--z:}.\\[a\\:a\\]{a:a}.\\[vite\\:css\\]{vite:css}.\\[vite\\:html\\]{vite:html}html{padding:1rem;font-family:sans-serif}ve-header ul,ve-menu ul{display:none}@media (min-width: 640px){.sm\\:container{width:100%}@media (min-width: 640px){.sm\\:container{max-width:640px}}@media (min-width: 768px){.sm\\:container{max-width:768px}}@media (min-width: 1024px){.sm\\:container{max-width:1024px}}@media (min-width: 1280px){.sm\\:container{max-width:1280px}}@media (min-width: 1536px){.sm\\:container{max-width:1536px}}}.hover\\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\\:font-bold:hover{font-weight:700}.before\\:hover\\:text-center:hover:before{content:var(--tw-content);text-align:center}.hover\\:before\\:text-center:hover:before{content:var(--tw-content);text-align:center}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\\:hover\\:text-center:hover:focus{text-align:center}.hover\\:focus\\:text-center:focus:hover{text-align:center}.hs-tooltip.show .hs-tooltip-shown\\:visible{visibility:visible}.hs-tooltip.show .hs-tooltip-shown\\:opacity-100{opacity:1}.open.hs-overlay-open\\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\\:opacity-100{opacity:1}.open.hs-overlay-open\\:duration-500{transition-duration:.5s}.open .hs-overlay-open\\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\\:opacity-100{opacity:1}.open .hs-overlay-open\\:duration-500{transition-duration:.5s}:is(.dark .dark\\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\\:shadow-slate-700\\/\\[\\.7\\]){--tw-shadow-color: rgb(51 65 85 / .7);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\\:focus\\:ring-offset-gray-800:focus){--tw-ring-offset-color: #1f2937}@media (min-width: 640px){.sm\\:mx-auto{margin-left:auto;margin-right:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:underline{text-decoration-line:underline}}@media (min-width: 768px){.md\\:p-5{padding:1.25rem}}@media (min-width: 1024px){:is(.dark .dark\\:lg\\:hover\\:\\[paint-order\\:markers\\]:hover){paint-order:markers}}sl-menu-item svg{width:1em;height:1em;vertical-align:middle;margin-right:1em} +`,Kd=500,Qd={leading:!0,trailing:!0},tf=50,ef={leading:!0,trailing:!0},sn=1,on=1,rf=0,nf=.7,sf=5,of=5,Ni=750;class af extends EventTarget{constructor(W,q){super(),this.webgl2WarpedMapsById=new Map,this.tileCache=new ld,this.mapsInViewport=new Set,this.opacity=sn,this.saturation=on,this.renderOptions={},this.animating=!1,this.animationProgress=1,this.warpedMapList=q,this.gl=W;const K=Oi(W,W.VERTEX_SHADER,Yd),X=Oi(W,W.FRAGMENT_SHADER,Jd);this.program=zd(W,K,X),W.deleteShader(K),W.deleteShader(X),W.disable(W.DEPTH_TEST),this.invertedRenderTransform=Xl(),this.addEventListeners(),this.throttledPrepareRenderInternal=_n(this.prepareRenderInternal.bind(this),Kd,Qd),this.throttledChanged=_n(this.changed.bind(this),tf,ef)}getOpacity(){return this.opacity}setOpacity(W){this.opacity=W}resetOpacity(){this.opacity=sn}getMapOpacity(W){const q=this.webgl2WarpedMapsById.get(W);if(q)return q.opacity}setMapOpacity(W,q){const K=this.webgl2WarpedMapsById.get(W);K&&(K.opacity=Math.min(Math.max(q,0),1))}resetMapOpacity(W){const q=this.webgl2WarpedMapsById.get(W);q&&(q.opacity=sn)}getRemoveColorOptions(){return this.renderOptions.removeColorOptions}setRemoveColorOptions(W){this.renderOptions.removeColorOptions=W}resetRemoveColorOptions(){this.renderOptions.removeColorOptions=void 0}getMapRemoveColorOptions(W){const q=this.webgl2WarpedMapsById.get(W);if(q)return q.renderOptions.removeColorOptions}setMapRemoveColorOptions(W,q){const K=this.webgl2WarpedMapsById.get(W);K&&(K.renderOptions.removeColorOptions=q)}resetMapRemoveColorOptions(W){const q=this.webgl2WarpedMapsById.get(W);q&&(q.renderOptions.removeColorOptions=void 0)}getColorizeOptions(){return this.renderOptions.colorizeOptions}setColorizeOptions(W){this.renderOptions.colorizeOptions=W}resetColorizeOptions(){this.renderOptions.colorizeOptions=void 0}getMapColorizeOptions(W){const q=this.webgl2WarpedMapsById.get(W);if(q)return q.renderOptions.colorizeOptions}setMapColorizeOptions(W,q){const K=this.webgl2WarpedMapsById.get(W);K&&(K.renderOptions.colorizeOptions=q)}resetMapColorizeOptions(W){const q=this.webgl2WarpedMapsById.get(W);q&&(q.renderOptions.colorizeOptions=void 0)}getSaturation(){return this.saturation}setSaturation(W){this.saturation=W}resetSaturation(){this.saturation=on}getMapSaturation(W){const q=this.webgl2WarpedMapsById.get(W);if(q)return q.saturation}setMapSaturation(W,q){const K=this.webgl2WarpedMapsById.get(W);K&&(K.saturation=q)}resetMapSaturation(W){const q=this.webgl2WarpedMapsById.get(W);q&&(q.saturation=on)}render(W){this.viewport=W,this.throttledPrepareRenderInternal(),this.renderInternal()}clear(){this.webgl2WarpedMapsById=new Map,this.mapsInViewport=new Set,this.gl.clear(this.gl.DEPTH_BUFFER_BIT|this.gl.COLOR_BUFFER_BIT),this.tileCache.clear()}dispose(){for(const W of this.webgl2WarpedMapsById.values())this.removeEventListenersFromWebGL2WarpedMap(W),W.dispose();this.tileCache.clear(),this.tileCache.dispose(),this.removeEventListeners(),this.gl.deleteProgram(this.program)}startTransformationTransition(){this.lastAnimationFrameRequestId!==void 0&&cancelAnimationFrame(this.lastAnimationFrameRequestId),this.animating=!0,this.transformationTransitionStart=void 0,this.lastAnimationFrameRequestId=requestAnimationFrame(this.transformationTransitionFrame.bind(this))}transformationTransitionFrame(W){if(this.transformationTransitionStart||(this.transformationTransitionStart=W),W-this.transformationTransitionStartjt(gn(this.warpedMapList.getWarpedMap(K).geoMaskBbox),this.viewport.geoCenter)-jt(gn(this.warpedMapList.getWarpedMap(X).geoMaskBbox),this.viewport.geoCenter)),q=[];for(const K of W){const X=this.warpedMapList.getWarpedMap(K);if(!X||!X.visible)continue;if(!X.hasImageInfo()){X.loadImageInfo();continue}if(xh(X.getApproxViewportMaskBbox(this.viewport))of?(this.previousSignificantViewport=this.viewport,!0):!1}else return this.previousSignificantViewport=this.viewport,!1}updateMapsInViewport(W){const q=Array.from(this.mapsInViewport),K=W.map(rt=>rt.mapId).filter((rt,ot,ut)=>ut.indexOf(rt)===ot);this.mapsInViewport=new Set(K.sort((rt,ot)=>{const ut=this.warpedMapList.getMapZIndex(rt),yn=this.warpedMapList.getMapZIndex(ot);return ut!==void 0&&yn!==void 0?ut-yn:0}));const X=K.filter(rt=>!q.includes(rt)),tt=q.filter(rt=>!K.includes(rt));for(const rt in X)this.dispatchEvent(new z(k.WARPEDMAPENTER,rt));for(const rt in tt)this.dispatchEvent(new z(k.WARPEDMAPLEAVE,rt))}renderInternal(){if(!this.viewport)return;const W=ql(this.viewport.projectedGeoToClipTransform,this.invertedRenderTransform),q=this.gl;q.viewport(0,0,q.canvas.width,q.canvas.height),q.enable(q.BLEND),q.blendFunc(q.ONE,q.ONE_MINUS_SRC_ALPHA),q.useProgram(this.program);const K=q.getUniformLocation(this.program,"u_renderTransform");q.uniformMatrix4fv(K,!1,Jl(W));const X=q.getUniformLocation(this.program,"u_animationProgress");q.uniform1f(X,this.animationProgress);for(const tt of this.mapsInViewport){const rt=this.webgl2WarpedMapsById.get(tt);if(!rt)continue;this.setRenderOptionsUniforms(this.renderOptions,rt.renderOptions);const ot=q.getUniformLocation(this.program,"u_opacity");q.uniform1f(ot,this.opacity*rt.opacity);const ut=q.getUniformLocation(this.program,"u_saturation");q.uniform1f(ut,this.saturation*rt.saturation);const yn=q.getUniformLocation(this.program,"u_bestScaleFactor"),uo=rt.warpedMap.bestScaleFactor;q.uniform1i(yn,uo);const po=q.getUniformLocation(this.program,"u_packedTilesTexture");q.uniform1i(po,0),q.activeTexture(q.TEXTURE0),q.bindTexture(q.TEXTURE_2D,rt.packedTilesTexture);const mo=q.getUniformLocation(this.program,"u_packedTilesPositionsTexture");q.uniform1i(mo,1),q.activeTexture(q.TEXTURE1),q.bindTexture(q.TEXTURE_2D,rt.packedTilesPositionsTexture);const wo=q.getUniformLocation(this.program,"u_packedTilesResourcePositionsAndDimensionsTexture");q.uniform1i(wo,2),q.activeTexture(q.TEXTURE2),q.bindTexture(q.TEXTURE_2D,rt.packedTilesResourcePositionsAndDimensionsTexture);const lf=q.getUniformLocation(this.program,"u_packedTilesScaleFactorsTexture");q.uniform1i(lf,3),q.activeTexture(q.TEXTURE3),q.bindTexture(q.TEXTURE_2D,rt.packedTilesScaleFactorsTexture);const yf=rt.vao,cf=rt.warpedMap.resourceTrianglePoints.length,vf=this.gl.TRIANGLES,_f=0;q.bindVertexArray(yf),q.drawArrays(vf,_f,cf)}}setRenderOptionsUniforms(W,q){var yn,uo,po,mo,wo,lf,yf,cf,vf,_f;const K=this.gl,X={removeColorOptions:{color:((yn=q.removeColorOptions)==null?void 0:yn.color)||((uo=W.removeColorOptions)==null?void 0:uo.color),hardness:li((po=q.removeColorOptions)==null?void 0:po.hardness,(mo=W.removeColorOptions)==null?void 0:mo.hardness),threshold:li((wo=q.removeColorOptions)==null?void 0:wo.threshold,(lf=W.removeColorOptions)==null?void 0:lf.threshold)},colorizeOptions:{...W.colorizeOptions,...q.colorizeOptions}},tt=(yf=X.removeColorOptions)==null?void 0:yf.color,rt=K.getUniformLocation(this.program,"u_removeColor");if(K.uniform1f(rt,tt?1:0),tt){const $f=K.getUniformLocation(this.program,"u_removeColorOptionsColor");K.uniform3fv($f,tt);const xf=K.getUniformLocation(this.program,"u_removeColorOptionsThreshold");K.uniform1f(xf,((cf=X.removeColorOptions)==null?void 0:cf.threshold)||rf);const Af=K.getUniformLocation(this.program,"u_removeColorOptionsHardness");K.uniform1f(Af,((vf=X.removeColorOptions)==null?void 0:vf.hardness)||nf)}const ot=(_f=X.colorizeOptions)==null?void 0:_f.color,ut=K.getUniformLocation(this.program,"u_colorize");if(K.uniform1f(ut,ot?1:0),ot){const $f=K.getUniformLocation(this.program,"u_colorizeOptionsColor");K.uniform3fv($f,ot)}}changed(){this.dispatchEvent(new z(k.CHANGED))}imageInfoLoaded(W){W instanceof z&&this.dispatchEvent(new z(k.IMAGEINFOLOADED))}mapTileLoaded(W){if(W instanceof z){const{mapId:q,tileUrl:K}=W.data,X=this.tileCache.getCacheableTile(K);if(!X||!X.isCachedTile())return;const tt=this.webgl2WarpedMapsById.get(q);if(!tt)return;tt.addCachedTileAndUpdateTextures(X)}}mapTileRemoved(W){if(W instanceof z){const{mapId:q,tileUrl:K}=W.data,X=this.webgl2WarpedMapsById.get(q);if(!X)return;X.removeCachedTileAndUpdateTextures(K)}}warpedMapAdded(W){if(W instanceof z){const q=W.data,K=this.warpedMapList.getWarpedMap(q);if(K){const X=new Hd(this.gl,this.program,K);this.webgl2WarpedMapsById.set(K.mapId,X),this.addEventListenersToWebGL2WarpedMap(X)}}}transformationChanged(W){if(W instanceof z){const q=W.data;for(const K of this.warpedMapList.getWarpedMaps(q))this.animating&&K.mixProjectedGeoCurrentAndNewTrianglePoints(this.animationProgress),K.updateProjectedGeoTrianglePoints(!1);this.updateVertexBuffers(),this.startTransformationTransition()}}resourceMaskUpdated(W){if(W instanceof z){const q=W.data,K=this.warpedMapList.getWarpedMap(q);K&&(K.clearResourceTrianglePointsByBestScaleFactor(),K.updateTriangulation(!1))}}addEventListenersToWebGL2WarpedMap(W){W.addEventListener(k.TEXTURESUPDATED,this.throttledChanged.bind(this))}removeEventListenersFromWebGL2WarpedMap(W){W.removeEventListener(k.TEXTURESUPDATED,this.throttledChanged.bind(this))}addEventListeners(){this.tileCache.addEventListener(k.MAPTILELOADED,this.mapTileLoaded.bind(this)),this.tileCache.addEventListener(k.MAPTILEREMOVED,this.mapTileRemoved.bind(this)),this.warpedMapList.addEventListener(k.IMAGEINFOLOADED,this.imageInfoLoaded.bind(this)),this.warpedMapList.addEventListener(k.WARPEDMAPADDED,this.warpedMapAdded.bind(this)),this.warpedMapList.addEventListener(k.TRANSFORMATIONCHANGED,this.transformationChanged.bind(this)),this.warpedMapList.addEventListener(k.RESOURCEMASKUPDATED,this.resourceMaskUpdated.bind(this)),this.warpedMapList.addEventListener(k.CLEARED,this.clear.bind(this))}removeEventListeners(){this.tileCache.removeEventListener(k.MAPTILELOADED,this.mapTileLoaded.bind(this)),this.tileCache.removeEventListener(k.MAPTILEREMOVED,this.mapTileRemoved.bind(this)),this.warpedMapList.removeEventListener(k.IMAGEINFOLOADED,this.imageInfoLoaded.bind(this)),this.warpedMapList.removeEventListener(k.WARPEDMAPADDED,this.warpedMapAdded.bind(this)),this.warpedMapList.removeEventListener(k.TRANSFORMATIONCHANGED,this.transformationChanged.bind(this)),this.warpedMapList.removeEventListener(k.RESOURCEMASKUPDATED,this.resourceMaskUpdated.bind(this)),this.warpedMapList.removeEventListener(k.CLEARED,this.clear.bind(this))}}const hf=leafletSrcExports.Layer.extend({options:{opacity:1,interactive:!1,className:"",pane:"tilePane",zIndex:"1"},initialize(F,W){this._annotation=F,leafletSrcExports.setOptions(this,W),this._initGl()},async onAdd(F){const W=this.getPaneName();return this._map.getPane(W).appendChild(this.container),F.on("zoomend viewreset move",this._update,this),F.on("zoomanim",this._animateZoom,this),F.on("unload",this._unload,this),this.resizeObserver=new ResizeObserver(this._resized.bind(this)),this.resizeObserver.observe(this._map.getContainer(),{box:"content-box"}),this._annotation&&(_h(this._annotation)?await this.addGeoreferenceAnnotationByUrl(this._annotation):await this.addGeoreferenceAnnotation(this._annotation)),this._update(),this},onRemove(F){this.container.remove(),F.off("zoomend viewreset move",this._update,this),F.off("zoomanim",this._animateZoom,this)},async addGeoreferenceAnnotation(F){const W=await this.renderer.warpedMapList.addGeoreferenceAnnotation(F);return this._update(),W},async removeGeoreferenceAnnotation(F){const W=await this.renderer.warpedMapList.removeGeoreferenceAnnotation(F);return this._update(),W},async addGeoreferenceAnnotationByUrl(F){const W=await fetch(F).then(q=>q.json());return this.addGeoreferenceAnnotation(W)},async removeGeoreferenceAnnotationByUrl(F){const W=await fetch(F).then(q=>q.json());return this.removeGeoreferenceAnnotation(W)},async addGeoreferencedMap(F){const W=this.renderer.warpedMapList.addGeoreferencedMap(F);return this._update(),W},async removeGeoreferencedMap(F){const W=this.renderer.warpedMapList.removeGeoreferencedMap(F);return this._update(),W},getContainer(){return this.container},getCanvas(){return this.canvas},getWarpedMapList(){return this.renderer.warpedMapList},getWarpedMap(F){return this.renderer.warpedMapList.getWarpedMap(F)},showMap(F){this.renderer.warpedMapList.showMaps([F]),this._update()},showMaps(F){this.renderer.warpedMapList.showMaps(F),this._update()},hideMap(F){this.renderer.warpedMapList.hideMaps([F]),this._update()},hideMaps(F){this.renderer.warpedMapList.hideMaps(F),this._update()},isMapVisible(F){var W;return(W=this.renderer.warpedMapList.getWarpedMap(F))==null?void 0:W.visible},setMapResourceMask(F,W){this.renderer.warpedMapList.setMapResourceMask(F,W),this._update()},setMapsTransformationType(F,W){this.renderer.warpedMapList.setMapsTransformationType(F,W),this._update()},getTotalBbox(){return this.renderer.warpedMapList.getBbox()},getTotalProjectedBbox(){return this.renderer.warpedMapList.getProjectedBbox()},getTotalBounds(){const F=this.getTotalBbox();return leafletSrcExports.latLngBounds(leafletSrcExports.latLng(F[1],F[0]),leafletSrcExports.latLng(F[3],F[2]))},getTotalProjectedBounds(){const F=this.getTotalProjectedBbox();return leafletSrcExports.latLngBounds(leafletSrcExports.latLng(F[1],F[0]),leafletSrcExports.latLng(F[3],F[2]))},bringMapsToFront(F){this.renderer.warpedMapList.bringMapsToFront(F),this._update()},sendMapsToBack(F){this.renderer.warpedMapList.sendMapsToBack(F),this._update()},bringMapsForward(F){this.renderer.warpedMapList.bringMapsForward(F),this._update()},sendMapsBackward(F){this.renderer.warpedMapList.sendMapsBackward(F),this._update()},bringToFront(){return this._map&&leafletSrcExports.DomUtil.toFront(this.container),this},bringToBack(){return this._map&&leafletSrcExports.DomUtil.toBack(this.container),this},getMapZIndex(F){return this.renderer.warpedMapList.getMapZIndex(F)},getZIndex(){return this.options.zIndex},setZIndex(F){return this.options.zIndex=F,this._updateZIndex(),this},setImageInfoCache(F){this.renderer.warpedMapList.setImageInfoCache(F)},getPaneName(){return this._map.getPane(this.options.pane)?this.options.pane:"tilePane"},getOpacity(){return this.options.opacity},setOpacity(F){return this.options.opacity=F,this._update(),this},resetOpacity(){return this.options.opacity=1,this._update(),this},getMapOpacity(F){return this.renderer.getMapOpacity(F)},setMapOpacity(F,W){return this.renderer.setMapOpacity(F,W),this._update(),this},resetMapOpacity(F){return this.renderer.resetMapOpacity(F),this._update(),this},setSaturation(F){return this.renderer.setSaturation(F),this._update(),this},resetSaturation(){return this.renderer.resetSaturation(),this._update(),this},setMapSaturation(F,W){return this.renderer.setMapSaturation(F,W),this._update(),this},resetMapSaturation(F){return this.renderer.resetMapSaturation(F),this._update(),this},setRemoveColor(F){const W=F.hexColor?ci(F.hexColor):void 0;return this.renderer.setRemoveColorOptions({color:W,threshold:F.threshold,hardness:F.hardness}),this._update(),this},resetRemoveColor(){return this.renderer.resetRemoveColorOptions(),this._update(),this},setMapRemoveColor(F,W){const q=W.hexColor?ci(W.hexColor):void 0;return this.renderer.setMapRemoveColorOptions(F,{color:q,threshold:W.threshold,hardness:W.hardness}),this._update(),this},resetMapRemoveColor(F){return this.renderer.resetMapRemoveColorOptions(F),this},setColorize(F){const W=this.hexToRgb(F);return W&&(this.renderer.setColorizeOptions({color:W}),this._update()),this},resetColorize(){return this.renderer.resetColorizeOptions(),this._update(),this},setMapColorize(F,W){const q=this.hexToRgb(W);return q&&(this.renderer.setMapColorizeOptions(F,{color:q}),this._update()),this},resetMapColorize(F){return this.renderer.resetMapColorizeOptions(F),this._update(),this},_initGl(){if(this.container=leafletSrcExports.DomUtil.create("div"),this.container.classList.add("leaflet-layer"),this.container.classList.add("allmaps-warped-map-layer"),this.options.zIndex&&this._updateZIndex(),this.canvas=leafletSrcExports.DomUtil.create("canvas",void 0,this.container),this.canvas.classList.add("leaflet-zoom-animated"),this.canvas.classList.add("leaflet-image-layer"),this.options.interactive&&this.canvas.classList.add("leaflet-interactive"),this.options.className&&this.canvas.classList.add(this.options.className),this.gl=this.canvas.getContext("webgl2",{premultipliedAlpha:!0}),!this.gl)throw new Error("WebGL 2 not available");const F=new qu(this.options.imageInfoCache);this.renderer=new af(this.gl,F),this._addEventListeners()},_resized(F){for(const W of F){const q=W.contentRect.width,K=W.contentRect.height,X=window.devicePixelRatio,tt=Math.round(q*X),rt=Math.round(K*X);this.canvas.width=tt,this.canvas.height=rt,this.canvas.style.width=q+"px",this.canvas.style.height=K+"px"}this._update()},_animateZoom(F){const W=this._map.getZoomScale(F.zoom),q=this._map._latLngBoundsToNewLayerBounds(this._map.getBounds(),F.zoom,F.center).min;leafletSrcExports.DomUtil.setTransform(this.canvas,q,W)},_updateZIndex(){this.container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this.container.style.zIndex=this.options.zIndex)},_update(){if(!this._map)return;const F=this._map.containerPointToLayerPoint([0,0]);leafletSrcExports.DomUtil.setPosition(this.canvas,F),this.renderer.setOpacity(this.getOpacity());const W=this._map.getCenter(),q=this._map.options.crs.project(W),K=[q.x,q.y],X=this._map.getSize(),tt=[X.x,X.y],rt=this._map.getBounds(),ot=this._map.options.crs.project(rt.getNorthEast()),ut=this._map.options.crs.project(rt.getSouthWest()),yn=[ut.x,ut.y,ot.x,ot.y],uo=Ir(yn),po=ys(uo,tt),mo=new Hu(K,tt,0,po,window.devicePixelRatio);return this.renderer.render(mo),this.container},_addEventListeners(){this.renderer.addEventListener(k.CHANGED,this._update.bind(this)),this.renderer.addEventListener(k.IMAGEINFOLOADED,this._update.bind(this)),this.renderer.addEventListener(k.WARPEDMAPENTER,this._passWarpedMapEvent.bind(this)),this.renderer.addEventListener(k.WARPEDMAPLEAVE,this._passWarpedMapEvent.bind(this)),this.renderer.tileCache.addEventListener(k.FIRSTMAPTILELOADED,this._passWarpedMapEvent.bind(this)),this.renderer.tileCache.addEventListener(k.ALLREQUESTEDTILESLOADED,this._passWarpedMapEvent.bind(this)),this.renderer.warpedMapList.addEventListener(k.WARPEDMAPADDED,this._passWarpedMapEvent.bind(this)),this.renderer.warpedMapList.addEventListener(k.WARPEDMAPREMOVED,this._passWarpedMapEvent.bind(this)),this.renderer.warpedMapList.addEventListener(k.VISIBILITYCHANGED,this._update.bind(this)),this.renderer.warpedMapList.addEventListener(k.CLEARED,this._update.bind(this))},_removeEventListeners(){this.renderer.removeEventListener(k.CHANGED,this._update.bind(this)),this.renderer.removeEventListener(k.IMAGEINFOLOADED,this._update.bind(this)),this.renderer.removeEventListener(k.WARPEDMAPENTER,this._passWarpedMapEvent.bind(this)),this.renderer.removeEventListener(k.WARPEDMAPLEAVE,this._passWarpedMapEvent.bind(this)),this.renderer.tileCache.removeEventListener(k.FIRSTMAPTILELOADED,this._passWarpedMapEvent.bind(this)),this.renderer.tileCache.removeEventListener(k.ALLREQUESTEDTILESLOADED,this._passWarpedMapEvent.bind(this)),this.renderer.warpedMapList.removeEventListener(k.WARPEDMAPADDED,this._passWarpedMapEvent.bind(this)),this.renderer.warpedMapList.removeEventListener(k.WARPEDMAPREMOVED,this._passWarpedMapEvent.bind(this)),this.renderer.warpedMapList.removeEventListener(k.VISIBILITYCHANGED,this._update.bind(this)),this.renderer.warpedMapList.removeEventListener(k.CLEARED,this._update.bind(this))},_passWarpedMapEvent(F){F instanceof z&&this._map&&this._map.fire(F.type,F.data)},_unload(){this.renderer.dispose();const F=this.gl.getExtension("WEBGL_lose_context");F&&F.loseContext();const W=this.gl.canvas;W.width=1,W.height=1,this.resizeObserver.disconnect(),this._removeEventListeners()}}),_hoisted_1$8=["innerHTML"],_hoisted_2$6={key:0,class:"caption"},_hoisted_3$6=["src"],_hoisted_4$6={slot:"footer",class:"footer"},_hoisted_5$4=["src"],_hoisted_6$3={class:"push"},_sfc_main$a=defineComponent({__name:"Map.ce",props:{active:{type:Boolean,default:!1},base:{type:String},basemaps:{type:String,default:"OpenStreetMap"},center:{type:String,default:"0,0"},caption:{type:String},data:{type:String},entities:{type:String},fit:{type:Boolean,default:!1},height:{type:Number},gestureHandling:{type:Boolean,default:isMobile()},ghDir:{type:String},marker:{type:Boolean},overlay:{type:String},popupOnHover:{type:Boolean},preferGeojson:{type:Boolean},scrollWheelZoom:{type:Boolean,default:!1},slot:{type:String},title:{type:String},zoom:{type:Number,default:2},zoomOnClick:{type:Boolean}},setup(F){const W=F,q=self.window,K=q.turf;let X;const tt=ref(!1);watch$1(tt,()=>{X.open=tt.value});const rt=ref("100vw"),ot=ref();onMounted(()=>{var Bp;X=(Bp=lf.value)==null?void 0:Bp.querySelector(".dialog"),X.addEventListener("sl-hide",Rp=>tt.value=!1),EventBus$1.on("imageSelected",Rp=>{ot.value=Rp.src,tt.value=!0})});const ut={iconUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-icon.png",iconRetinaUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-icon-2x.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png",shadowSize:[41,41]};watch$1(W,()=>{rp()});const yn={CartoDB_DarkMatter:["https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_DarkMatterNoLabels:["https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_DarkMatterOnlyLabels:["https://{s}.basemaps.cartocdn.com/dark_only_labels/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_Positron:["https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_PositronNoLabels:["https://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_PositronOnlyLabels:["https://{s}.basemaps.cartocdn.com/light_only_labels/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_Voyager:["https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_VoyagerNoLabels:["https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_VoyagerOnlyLabels:["https://{s}.basemaps.cartocdn.com/rastertiles/voyager_only_labels/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],CartoDB_VoyagerLabelsUnder:["https://{s}.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',subdomains:"abcd",maxZoom:20}],Esri_DeLorme:["https://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Copyright: ©2012 DeLorme",minZoom:1,maxZoom:11}],Esri_NatGeoWorldMap:["https://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC",maxZoom:16}],Esri_OceanBasemap:["https://server.arcgisonline.com/ArcGIS/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri",maxZoom:13}],Esri_WorldGrayCanvas:["https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Esri, DeLorme, NAVTEQ",maxZoom:16}],Esri_WorldImagery:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"}],Esri_WorldPhysical:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer/tile/{z}/{y}/{x}",{maxZoom:8,attribution:"Tiles © Esri — Source: US National Park Service"}],Esri_WorldShadedRelief:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Source: Esri",maxZoom:13}],Esri_WorldStreetMap:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012"}],Esri_WorldTerrain:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Source: USGS, Esri, TANA, DeLorme, and NPS",maxZoom:13}],Esri_WorldTopoMap:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri — Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community"}],MtbMap:["http://tile.mtbmap.cz/mtbmap_tiles/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors & USGS'}],OpenStreetMap:["https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:18,attribution:'© OpenStreetMap'}],OpenStreetMap_DE:["https://{s}.tile.openstreetmap.de/{z}/{x}/{y}.png",{maxZoom:18,attribution:'© OpenStreetMap contributors'}],OpenStreetMap_France:["https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png",{maxZoom:20,attribution:'© OpenStreetMap France | © OpenStreetMap contributors'}],OpenStreetMap_HOT:["https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors, Tiles style by Humanitarian OpenStreetMap Team hosted by OpenStreetMap France',maxZoom:19}],OpenStreetMap_Mapnik:["https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors',maxZoom:19}],OpenTopoMap:["https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",{maxZoom:17,attribution:'Map data: © OpenStreetMap contributors, SRTM | Map style: © OpenTopoMap (CC-BY-SA)'}],OPNVKarte:["https://tileserver.memomaps.de/tilegen/{z}/{x}/{y}.png",{attribution:'Map memomaps.de CC-BY-SA, map data © OpenStreetMap contributors',maxZoom:18}],Stadia_AlidadeSmooth:["https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png",{attribution:'© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors',maxZoom:20}],Stadia_AlidadeSmoothDark:["https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png",{attribution:'© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors',maxZoom:20}],Stadia_OSMBright:["https://tiles.stadiamaps.com/tiles/osm_bright/{z}/{x}/{y}{r}.png",{attribution:'© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors',maxZoom:20}],Stadia_Outdoors:["https://tiles.stadiamaps.com/tiles/outdoors/{z}/{x}/{y}{r}.png",{maxZoom:20,attribution:'© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors'}],Stamen_Terrain:["https://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}{r}.{ext}",{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors',subdomains:"abcd",minZoom:0,maxZoom:18,ext:"png"}],Stamen_TerrainBackground:["https://stamen-tiles-{s}.a.ssl.fastly.net/terrain-background/{z}/{x}/{y}{r}.{ext}",{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors',subdomains:"abcd",minZoom:0,maxZoom:18,ext:"png"}],Stamen_TerrainLabels:["https://stamen-tiles-{s}.a.ssl.fastly.net/terrain-labels/{z}/{x}/{y}{r}.{ext}",{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors',subdomains:"abcd",minZoom:0,maxZoom:18,ext:"png"}],Stamen_Toner:["https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}{r}.{ext}",{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors',subdomains:"abcd",minZoom:0,maxZoom:20,ext:"png"}],Stamen_TonerBackground:["https://stamen-tiles-{s}.a.ssl.fastly.net/toner-background/{z}/{x}/{y}{r}.{ext}",{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors',subdomains:"abcd",minZoom:0,maxZoom:20,ext:"png"}],Stamen_TonerLite:["https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}{r}.{ext}",{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors',subdomains:"abcd",minZoom:0,maxZoom:20,ext:"png"}],Stamen_Watercolor:["https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.{ext}",{subdomains:"abcd",minZoom:1,maxZoom:16,ext:"jpg",attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap contributors'}],USGS_USTopo:["https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/{z}/{y}/{x}",{maxZoom:20,attribution:'Tiles courtesy of the U.S. Geological Survey'}],USGS_USImagery:["https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}",{maxZoom:20,attribution:'Tiles courtesy of the U.S. Geological Survey'}],USGS_USImageryTopo:["https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer/tile/{z}/{y}/{x}",{maxZoom:20,attribution:'Tiles courtesy of the U.S. Geological Survey'}]},uo=ref(null),po=computed(()=>{var Bp,Rp;return(Rp=(Bp=uo.value)==null?void 0:Bp.getRootNode())==null?void 0:Rp.host}),mo=ref(null),wo=ref(null),lf=computed(()=>{var Bp;return(Bp=uo==null?void 0:uo.value)==null?void 0:Bp.parentNode}),yf=ref(1),cf=ref(),vf=ref([]),_f=ref(),$f=ref([]),xf=ref(),Af=ref(),Cf=ref(),Pf=ref(q.config||{}),Bf=computed(()=>{var Bp;if((Bp=Pf.value.source)!=null&&Bp.owner)return Pf.value.source;if(W.base){let[Rp,Fp,Op,...Kp]=W.base.split("/");return{owner:Rp,repository:Fp,branch:Op,dir:Kp?`/${Kp.join("/")}/`:"/"}}return null}),Hf=computed(()=>{var Bp,Rp,Fp,Op;return`https://raw.githubusercontent.com/${(Bp=Bf.value)==null?void 0:Bp.owner}/${(Rp=Bf.value)==null?void 0:Rp.repository}/${(Fp=Bf.value)==null?void 0:Fp.branch}${(Op=Bf.value)==null?void 0:Op.dir}`}),Df=computed(()=>W.caption||W.title),Lf=ref(10),kf=ref(),Nf=ref(),Yf=ref();function Gf(){mo.value&&(mo.value.style.height=W.height?`${W.height}px`:`${mo.value.clientWidth*yf.value}px`)}function rp(){Gf()}const ip=ref(0);watch$1(po,Bp=>{var Rp,Fp;Bp&&(ip.value=((Rp=mo.value)==null?void 0:Rp.clientWidth)||0,rp(),Bp&&new ResizeObserver(Op=>{var Kp,Kf;ip.value!==((Kp=mo.value)==null?void 0:Kp.clientWidth)&&Gf(),!cf.value&&(((Kf=mo.value)==null?void 0:Kf.clientHeight)||0)>0&&yp()}).observe(Bp),(((Fp=mo.value)==null?void 0:Fp.clientHeight)||0)>0&&yp())}),watch$1($f,async()=>{let Bp=await Promise.all($f.value),Rp=Bp.filter(Xf=>Xf["ve-map-marker"]===void 0).filter(Xf=>Xf.geojson!==void 0).map(Xf=>{var wp,dg,mg;let gp=Xf.url||Xf.geojson;return gp.indexOf("http")===0?Xf.geojson=gp:gp[0]==="/"?Xf.geojson=`https://raw.githubusercontent.com/${(wp=Bf.value)==null?void 0:wp.owner}/${(dg=Bf.value)==null?void 0:dg.repository}/${(mg=Bf.value)==null?void 0:mg.branch}${gp}`:Xf.geojson=`${Hf.value}${gp}`,Xf}).map(Xf=>({url:Xf.geojson,item:Xf})),Fp=await Promise.all(Rp.map(Xf=>fetch(Xf.url).catch(gp=>{console.log("Error fetching",Xf.url),console.log(gp)}))),Op=await Promise.all(Fp.map(async(Xf,gp)=>{try{return JSON.parse(await Xf.text())}catch(wp){return console.log("Error parsing JSON",Rp[gp].url),console.log(wp),null}})),Kp={};for(let Xf=0;Xfwp.properties={...wp.properties,...Rp[Xf].item}):Op[Xf].properties={...Op[Xf].properties,...Rp[Xf].item};let gp=Rp[Xf].item.layer||"Locations";Kp[gp]||(Kp[gp]=[]),Kp[gp].push(Op[Xf])}let Kf={};Bp.filter(Xf=>!Xf.geojson||!Xf.preferGeojson).filter(Xf=>!Xf.allmaps).forEach(Xf=>{let gp=Xf.layer||"Locations";Kf[gp]||(Kf[gp]=[]),Kf[gp].push(Xf)}),Bp.filter(Xf=>!Xf.allmaps).forEach(Xf=>{let gp=Xf.layer||"Locations";Kp[gp]?Kf[gp]&&(Kp[gp].push(og(Kf[gp])),delete Kf[gp]):(Kp[gp]=[og(Kf[gp])],delete Kf[gp])}),Cf.value=Kp,Af.value=Bp.filter(Xf=>Xf.allmaps!==void 0).map(Xf=>({name:Xf.layer||"Image layer",type:"allmaps",id:Xf["allmaps-id"]||Xf.allmaps,disabled:Xf.disabled,opacity:Xf.opacity||100,layer:new hf(`https://annotations.allmaps.org/maps/${Xf["allmaps-id"]||Xf.allmaps}`)}))}),watch$1(Cf,()=>ng());let ap=!1;function yp(){var Rp;if(ap)return;ap=!0,vf.value=W.entities?W.entities.split(/\s+/).filter(Fp=>Fp):[];let Bp=document.querySelector("p.active");Bp&&Bp.getAttribute("data-entities")&&(vf.value=[...vf.value,...((Rp=Bp.getAttribute("data-entities"))==null?void 0:Rp.split(/\s+/).filter(Fp=>vf.value.indexOf(Fp)<0))||[]]),Lp(),xp(),vp(),Mp()}async function vp(){Lf.value=W.zoom;let Bp;if(W.center){let Op=W.center.split(",");if(isQid(Op[0])){let Kp=await getEntity(Op[0]);Bp=$p(Kp.coords),Lf.value=Op.length>1?Number(Op[1]):W.zoom}else{let[Kp,Kf,Xf]=Op.map(Number);Bp=new L$2.LatLng(Kp,Kf),Xf&&(Lf.value=Xf)}}else if(vf.value.length){let Op=await getEntity(vf.value[0]);Bp=$p(Op.coords),Lf.value=9}else Bp=new L$2.LatLng(0,0),Lf.value=6;if(cf.value&&(cf.value.off(),cf.value.remove()),!wo.value)return;W.gestureHandling===!0&&L$2.Map.addInitHook("addHandler","gestureHandling",leafletGestureHandling_minExports.GestureHandling),wo.value.style.cursor="default";let Rp=W.basemaps.split(",").map(Op=>{let[Kp,Kf]=yn[Op];return[Op.replace(/_/," "),L$2.tileLayer(Kp,Kf)]}),Fp={preferCanvas:!1,smoothWheelZoom:!0,smoothSensitivity:1.5,zoomSnap:.1,center:Bp,zoom:Lf.value,zoomAnimation:!0,scrollWheelZoom:W.scrollWheelZoom,gestureHandling:W.gestureHandling===!0,layers:[Rp[0][1]]};cf.value=L$2.map(wo.value,Fp),(Rp.length>1||Object.keys(Cf.value||{}).length>1)&&(xf.value=L$2.control.layers(Object.fromEntries(Rp),{}).addTo(cf.value)),cf.value.on("click",Op=>{var Kp;Np(Op),_f.value&&Vp((Kp=_f.value)==null?void 0:Kp.split(",").slice(0,2).join(",")),W.zoomOnClick&&Dg()}),cf.value.on("zoomend",Op=>{Np(Op),Yf.value&&Yf.value.layer.openPopup()}),cf.value.on("movestart",()=>{wo.value&&(wo.value.style.cursor="move")}),cf.value.on("moveend",Op=>{wo.value&&(wo.value.style.cursor="default"),Np(Op)}),cf.value.on("layeradd",Op=>{var Kp,Kf;if(Op.layer.feature){let Xf=Op.layer;((Kp=Xf.feature)==null?void 0:Kp.type)=="Feature"&&((Kf=Xf.feature)!=null&&Kf.properties.qid)&&Xf.feature}}),ng(),_f.value=`${Number(Bp.lat.toFixed(5))},${Number(Bp.lng.toFixed(5))},${Lf.value}`,kf.value=`${Number(Bp.lat.toFixed(5))},${Number(Bp.lng.toFixed(5))},${Lf.value}`}function Np(Bp){let Rp=Bp.type==="click"?Bp.latlng:Bp.target.getCenter(),Fp=Bp.target.getZoom(),Op=[Rp.lat,Rp.lng,Fp];return _f.value=`${Number(Rp.lat.toFixed(5))},${Number(Rp.lng.toFixed(5))},${Fp}`,Nf.value||(kf.value=`${Number(Rp.lat.toFixed(5))},${Number(Rp.lng.toFixed(5))},${Fp}`),Op}function jp(Bp){return L$2.geoJSON(Bp,{pointToLayer:(Rp,Fp)=>{const Op=Rp.properties;let Kp;if(Op["ve-map-marker"]!==void 0&&Op.url){let[Kf,Xf]=Op.size?Op.size.split(",").map(mg=>Number(mg)):[100,100],gp=`width:${Kf}px;height:${Xf}px;`;Op.circle&&(gp+=`border-radius:50%;border:4px solid ${Op.color||"#555555"};`);let dg=``;Kp=new L$2.Marker(Fp,{icon:L$2.divIcon({html:dg,className:"image-icon",iconSize:[52,52]})})}else{let Kf={...ut};if(Rp.properties.icon&&(Kf.iconUrl=Rp.properties.icon),Rp.properties.shadowUrl&&(Kf.shadowUrl=Rp.properties.shadowUrl),Rp.properties.iconRetinaUrl&&(Kf.iconRetinaUrl=Rp.properties.iconRetinaUrl),Rp.properties.size&&(Kf.iconSize=Op.size.split(",").map(Xf=>Number(Xf))),Op.markerType==="circle"||Op["marker-symbol"]==="circle"){let Xf=Op.radius?Number(Op.radius):Op["marker-size"]?Op["marker-size"]==="small"?8:Op["marker-size"]==="medium"?16:32:4,gp=Op["marker-color"]||"#2C84CB",wp=Op.fill||gp,dg=Number(Op["stroke-width"])||0,mg=dg>0,pg={radius:Xf,fillColor:wp,stroke:mg,color:gp,weight:dg};Kp=L$2.circleMarker(Fp,pg)}else Kp=L$2.marker(Fp,{icon:new L$2.Icon(Kf)})}return Kp},onEachFeature:async(Rp,Fp)=>{var Kp;let Op=Fp;if(!Rp.properties.coords){if((Kp=Op.feature)!=null&&Kp.bbox){let Kf=Op.getBounds().getCenter();Rp.properties.coords=`${Kf.lat},${Kf.lng}`}else if(Rp.geometry.type==="Polygon"){let Kf=K.centroid(Rp);Rp.properties.coords=`${Kf.geometry.coordinates[1]},${Kf.geometry.coordinates[0]}`}}if(Rp.properties.qid){let Kf=await getEntity(Rp.properties.qid);Rp.properties.entityData=Kf;let gp=``;Fp.bindPopup(gp)}else if(Rp.properties.label||Rp.properties.title||Rp.properties.description||Rp.properties["marker-description"]||Rp.properties.image){Rp.properties.url&&(Rp.properties.image=Rp.properties.url);let Xf=``;Fp.bindPopup(Xf)}W.popupOnHover&&(Fp.on("mouseover",()=>Fp.openPopup()),Fp.on("mouseout",()=>Fp.closePopup())),Fp.on("click",()=>{Nf.value?(Fp.closePopup(),Nf.value=void 0):(Fp.openPopup(),Nf.value={},W.zoomOnClick&&xg(Rp.properties.coords))})},style:Rp=>{const Fp=Rp==null?void 0:Rp.properties,Op=Rp==null?void 0:Rp.geometry.type;for(let[Kf,Xf]of Object.entries(Fp))Xf==="null"&&(Fp[Kf]=null);return{color:Fp.color||"#FB683F",weight:Fp.weight||(Op==="Polygon"||Op==="MultiPolygon"?0:4),opacity:Fp.opacity||1,fillColor:Fp.fillColor||"#32C125",fillOpacity:Fp.fillOpacity||.5}}})}let Ip=()=>{var Rp;let Bp=Object.values(Cf.value).map(Fp=>Fp[0]).flatMap(Fp=>Fp.features||Fp).flatMap(Fp=>Fp.bbox?[Fp.bbox.slice(0,2),Fp.bbox.slice(2)]:Fp.geometry.type==="Point"?[Fp.geometry.coordinates]:Fp.geometry.coordinates.flat());Bp.length>1&&((Rp=cf.value)==null||Rp.fitBounds(Bp.map(Fp=>[Fp[1],Fp[0]]),{padding:[100,100]}))},Jp=!1;function ng(){var Bp;if(cf.value&&Cf.value&&Af.value&&!Jp){let Rp=Object.keys(Cf.value||{}),Fp=Af.value?Af.value.length:0;!xf.value&&(Rp.length>1||Rp.length===1&&Rp[0]!=="Locations"||Fp>0)&&(xf.value=L$2.control.layers(Object.fromEntries([]),{}).addTo(cf.value));let Op={};if((Bp=Af.value)==null||Bp.forEach(Kp=>{var Kf;xf.value&&xf.value.addOverlay(Kp.layer,Kp.name),Kp.disabled||(Kf=cf.value)==null||Kf.addLayer(Kp.layer),Op[Kp.name]=Kp.layer}),Object.keys(Cf.value||{}).forEach(Kp=>{var gp;let Kf=new L$2.LayerGroup,Xf=!1;Cf.value[Kp].forEach(wp=>{var mg;let dg=jp(wp);Kf.addLayer(dg),(mg=wp.properties)!=null&&mg.disabled&&(Xf=!0)}),Xf||(gp=cf.value)==null||gp.addLayer(Kf),xf.value&&xf.value.addOverlay(Kf,Kp)}),Object.keys(Op).length>0){let Kp=L$2.control.opacity(Op,{label:null,collapsed:!0,position:"topright"});Kp.addTo(cf.value),Array.from(Kp.getContainer().querySelectorAll(".leaflet-control-layers-overlays label")).forEach(Kf=>{var wp;let Xf=Kf.children[0].textContent.trim(),gp;if((wp=Af.value)==null||wp.forEach(dg=>{dg.name===Xf&&(gp=dg)}),gp){let dg=gp.opacity,mg=Kf.children[1].children[0];mg.value=dg,gp.layer.setOpacity(dg/100),mg.addEventListener("input",pg=>{pg.preventDefault(),pg.stopPropagation(),gp.layer.setOpacity(parseInt(mg.value)/100)})}})}W.fit&&Ip()}}function og(Bp){const Rp={type:"FeatureCollection",features:[]};return Bp.filter(Fp=>Fp.coords).forEach(Fp=>{let[Op,Kp]=Fp.coords.split(",").map(Kf=>parseFloat(Kf.trim()));Rp.features.push({type:"Feature",properties:Fp,geometry:{type:"Point",coordinates:[Kp,Op]}})}),Rp}async function vg(Bp){let Rp=await fetch(`https://iiif.mdpress.io/gh-dir/${Bp}?filter=images`).then(Op=>Op.json()).then(Op=>Op.map(Kp=>`https://iiif.mdpress.io/gh:${Bp}/${Kp.name}/manifest.json`));return(await loadManifests(Rp)).filter(Op=>Op.navPlace).map(Op=>qf(Op,Op.id))}async function Dp(){return vf.value.length?Object.values(await getEntityData(vf.value)).filter(Rp=>Rp.coords).map(Rp=>cp(Rp)):[]}async function Lp(){if(!po.value)return;W.ghDir&&($f.value=[...$f.value||[],...await vg(W.ghDir)]);let Bp=null;if(W.data){let Fp=po.value.parentElement;for(;!Bp&&Fp;)Bp=Fp.querySelector(`#${W.data}`),Fp=Fp.parentElement}else Bp=po.value;let Rp=Array.from((Bp==null?void 0:Bp.querySelectorAll("li"))||[]).map(Fp=>(Array.from(Fp.querySelectorAll("a")).forEach(Op=>Op.replaceWith(Op.href)),hp(Fp.innerHTML)));if(W.marker&&W.center){let Fp=W.center.split(",");if(isQid(Fp[0])){let Op=await getEntity(Fp[0]);Rp.push(Promise.resolve(cp(Op)))}else{let[Op,Kp,Kf]=Fp;Rp.push(Promise.resolve({coords:`${Op},${Kp}`,zoom:Kf||W.zoom||10}))}}$f.value=[...$f.value||[],...Rp,...await Dp()]}function xp(){po.value&&new MutationObserver(Bp=>{for(let Rp of Bp)Rp.type==="childList"&&Array.from(Rp.target.classList).indexOf("hydrated")>=0&&Lp()}).observe(po.value,{childList:!0,subtree:!0,characterData:!0})}function kp(Bp){return/^[+-]?\d+(.\d*|\d*),{1}[+-]?\d+(.\d*|\d*)$/.test(Bp)}function lp(Bp){return/^\d{1,2}(\.\d{1})?$/.test(Bp)}function Of(Bp){Bp=Bp||"";let Rp=[];Bp=Bp.replace(/“/,'"').replace(/”/,'"').replace(/’/,"'");let Fp=Bp.match(/[^\s"]+|"([^"]*)"/gmi);return Fp&&Fp.forEach(Op=>{Rp.length>0&&Rp[Rp.length-1].indexOf("=")===Rp[Rp.length-1].length-1?Rp[Rp.length-1]=`${Rp[Rp.length-1]}${Op}`:Rp.push(Op)}),Rp}function qf(Bp,Rp){var Op,Kp,Kf,Xf;let Fp={id:Rp};return Bp.navPlace&&(Fp.coords=Bp.navPlace.features[0].geometry.coordinates.map(gp=>gp.toFixed(5)).join(",")),Bp.label&&(Fp.label=Bp.label.en||Bp.label.none),Bp.summary&&(Fp.description=((Kp=(Op=Bp.summary)==null?void 0:Op.en)==null?void 0:Kp[0])||((Xf=(Kf=Bp.summary)==null?void 0:Kf.none)==null?void 0:Xf[0])),Bp.thumbnail&&(Fp.image=Bp.thumbnail[0].id),Fp}function cp(Bp,Rp=""){let Fp={id:Rp||Bp.id};return Bp.coords&&(Fp.coords=Bp.coords),W.preferGeojson&&Bp.geojson&&(Fp.geojson=Bp.geojson),Bp.label&&(Fp.label=Bp.label),Bp.description&&(Fp.description=Bp.description),Bp.thumbnail&&(Fp.image=Bp.thumbnail),Fp}async function hp(Bp){let Rp=Of(Bp),Fp=/\.(geo)?json$/i,Op=/^[a-z0-9\-]+:.+/,Kp={},Kf=new Set(["disabled","prefer-geojson"]);for(let Xf=0;Xf0){let[wp,...dg]=gp.split("="),mg=dg.join("=");if(mg=mg[mg.length-1]==='"'?mg.slice(1,-1):mg,wp==="qid"){let pg=await getEntity(mg);Kp={...cp(pg,gp),...Kp}}else if(wp==="iiif"){let pg=await getManifest(gp);Kp={...qf(pg,gp),...Kp}}else Kp[wp]=mg}else if(lp(gp))Kp.zoom=parseInt(gp);else if(kp(gp))Kp.coords=gp,Kp.id=gp;else if(isQid(gp)){let wp=await getEntity(gp);Kp={...cp(wp,gp),...Kp}}else if(Fp.test(gp))Kp.geojson=gp;else if(Op.test(gp)){let wp=await getManifest(gp);Kp={...qf(wp,gp),...Kp}}else if(Kf.has(gp))Kp[kebabToCamel(gp)]=!0;else{let wp=gp[0]==='"'&&gp[gp.length-1]==='"'?gp.slice(1,-1):gp;Kp.label?Kp.description=wp:Kp.label=wp}}return Kp.preferGeojson=!!(Kp.preferGeojson||W.preferGeojson&&Kp.geojson||Kp.geojson&&!Kp.coords),Kp}function $p(Bp){let[Rp,Fp]=Bp.split(",").map(Op=>parseFloat(Op.trim()));return new leafletSrcExports.LatLng(Rp,Fp)}function Vp(Bp){console.log("copyTextToClipboard",Bp),navigator.clipboard&&navigator.clipboard.writeText(Bp)}function bp(Bp="",Rp=""){return Object.values(Cf.value).map(Op=>{let Kp=Op[0];return Kp.type==="FeatureCollection"?Kp.features:[Kp]}).flat().find(Op=>{var Kp,Kf;return Op.id===Bp||((Kp=Op.properties)==null?void 0:Kp.id)===Bp||((Kf=Op.properties)==null?void 0:Kf.coords)===Rp})}function Ep(Bp=""){var gp,wp,dg;let Rp=Bp.split("/").filter(mg=>mg).filter(mg=>mg!=="flyto"),Fp="",Op="";Rp.length===1?Fp=Rp[0]:Rp.length>1&&(Op=`${Rp[0]},${Rp[1]}`);let Kp=bp(Fp,Op),Kf=((gp=Kp==null?void 0:Kp.properties)==null?void 0:gp.zoom)||10,Xf;return(wp=cf.value)==null||wp.eachLayer(mg=>{var pg,wg,Cg,Bg;(((wg=(pg=mg==null?void 0:mg.feature)==null?void 0:pg.properties)==null?void 0:wg.id)===Fp||((Bg=(Cg=mg==null?void 0:mg.feature)==null?void 0:Cg.properties)==null?void 0:Bg.coords)===Fp)&&(Xf=mg)}),Xf||(dg=cf.value)==null||dg.eachLayer(mg=>Xf=mg),{id:Fp||Op,zoom:Kf,layer:Xf}}function _p(){var Fp,Op;let Bp=((Fp=cf.value)==null?void 0:Fp.getCenter())||new L$2.LatLng(0,0),Rp=((Op=cf.value)==null?void 0:Op.getZoom())||10;return`${Number(Bp.lat.toFixed(5))},${Number(Bp.lng.toFixed(5))},${Rp}`}function Mp(){var Fp,Op;let Bp=(Fp=po.value)==null?void 0:Fp.parentElement,Rp=new Set;for(;Bp!=null&&Bp.parentElement&&Bp.tagName!=="MAIN";)Array.from(Bp.querySelectorAll("[enter],[exit]")).forEach(Kp=>{Rp.has(Kp)||(hg(Kp),Rp.add(Kp))}),Bp=Bp.parentElement;for(Bp=(Op=po.value)==null?void 0:Op.parentElement;Bp;)Array.from(Bp.querySelectorAll("a")).forEach(async Kp=>{var wp;let Xf=new URL(Kp.href).pathname.split("/").filter(dg=>dg),gp=Xf.indexOf("flyto");if(gp>=0){let dg=Xf[gp+1],mg=Xf.slice(gp+2).filter(mm=>mm==="click"||mm==="mouseover")[0]||"click",pg=Xf.slice(gp+2).filter(mm=>mm!=="click"&&mm!=="mouseover")[0],wg,Cg=dg.split(",");if(isQid(Cg[0])){let mm=await ug(Cg[0]),Hg=Cg.length>1?Number(Cg[1]):W.zoom||10;dg=`${mm},${Hg}`}let Bg,Xg=Kp.parentElement;for(;Xg&&!Bg;)Bg=Xg.dataset.id,Xg=Xg.parentElement;if(Bg){let mm=(wp=po.value)==null?void 0:wp.dataset.id;if(mm&&mm!==Bg)return}if(pg&&(wg=document.getElementById(pg),!wg)||(wg=Yp(Kp),wg!==po.value))return;Kp.classList.add("flyto"),Kp.href="javascript:;",Kp.setAttribute("data-location",dg),Kp.addEventListener(mg,mm=>{var Yy;let Hg=mm.target,Iy=Hg.getAttribute("data-location")||((Yy=Hg==null?void 0:Hg.parentElement)==null?void 0:Yy.getAttribute("data-location")),py=_p();Iy===py?kg():Iy&&lm(Iy)})}}),Bp=Bp.parentElement}function Yp(Bp){let Rp,Fp=Bp.parentElement;for(;Fp&&!Rp;)Rp=Fp.querySelector("ve-map"),Fp=Fp.parentElement;return Rp}async function ug(Bp){return(await getEntity(Bp)).coords.split(",").map(Fp=>Number(Fp).toFixed(5)).map(Fp=>parseFloat(Fp)).join(",")}function hg(Bp){let Rp=Bp.classList.contains("active");new MutationObserver(Op=>{Op.forEach(Kp=>{if(Kp.attributeName=="class"){let Kf=Kp.target.classList.contains("active");if(Rp!==Kf){Rp=Kf;let Xf=Bp.attributes.getNamedItem(Kf?"enter":"exit");if(Xf){const[gp,...wp]=Xf.value.split(":");let dg=wp.join(":");gp==="flyto"&&xg(dg,!0),Xf.name==="exit"&&Dg()}}}})}).observe(Bp,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}async function xg(Bp,Rp=!1){var Fp,Op;if(Yf.value=Ep(Bp),Yf.value.layer){if(Yf.value.id===Nf.value&&!Rp)Yf.value.layer.closePopup(),Dg();else if(Nf.value=Yf.value.id,(Fp=Yf.value.layer.feature)!=null&&Fp.properties){let Kp=$p(Yf.value.layer.feature.properties.coords);(Op=cf.value)==null||Op.flyTo(Kp,Yf.value.zoom)}}else Dg()}async function kg(){var Op;if(!W.center)return;let Bp,Rp=W.zoom||10,Fp=W.center.split(",");if(isQid(Fp[0])){let Kp=await getEntity(Fp[0]);Bp=$p(Kp.coords),Rp=Fp.length>1?Number(Fp[1]):Rp}else{let[Kp,Kf,Xf]=Fp.map(Number);Bp=new L$2.LatLng(Kp,Kf),Xf&&(Rp=Xf)}(Op=cf.value)==null||Op.flyTo(Bp,Rp)}function Dg(){var Bp,Rp;if(Yf.value=null,kf.value){let[Fp,Op,Kp]=kf.value.split(",").map(Xf=>parseFloat(Xf)),Kf=new L$2.LatLng(Fp,Op);(Bp=cf.value)==null||Bp.flyTo(Kf,Kp),(Rp=cf.value)==null||Rp.closePopup()}Nf.value=void 0}async function lm(Bp){var Kp;let Rp,Fp=10,Op=Bp.split(",");if(isQid(Op[0])){let Kf=await getEntity(Op[0]);Rp=$p(Kf.coords),Fp=Op.length>1?Number(Op[1]):W.zoom||Fp}else{let[Kf,Xf,gp]=Op.map(Number);Rp=new L$2.LatLng(Kf,Xf),gp&&(Fp=gp||W.zoom||Fp)}(Kp=cf.value)==null||Kp.flyTo(Rp,Fp)}return(Bp,Rp)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:uo,style:{width:"100%",height:"100%"}},[createBaseVNode("div",{class:"content",ref_key:"contentEl",ref:mo},[createBaseVNode("div",{id:"lat-lng-zoom",innerHTML:_f.value,onClick:Rp[0]||(Rp[0]=Fp=>Vp(`${_f.value}`))},null,8,_hoisted_1$8),createBaseVNode("div",{id:"map",ref_key:"mapEl",ref:wo},null,512),Df.value?(openBlock(),createElementBlock("div",_hoisted_2$6,toDisplayString(Df.value),1)):createCommentVNode("",!0)],512),createBaseVNode("sl-dialog",{class:"dialog","no-header":"",style:normalizeStyle({"--width":rt.value,"--body-spacing":0,"--footer-spacing":"0.5em"})},[ot.value?(openBlock(),createElementBlock("ve-image",{key:0,"no-caption":"",src:ot.value,fit:"cover"},null,8,_hoisted_3$6)):createCommentVNode("",!0),createBaseVNode("div",_hoisted_4$6,[createBaseVNode("ve-caption",{src:ot.value},null,8,_hoisted_5$4),createBaseVNode("div",_hoisted_6$3,[createBaseVNode("sl-button",{variant:"primary",onClick:Rp[1]||(Rp[1]=Fp=>ot.value=null)},"Close")])])],4)],512))}}),_style_0$8=`.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,.5)}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255,255,255,.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:rgba(255,255,255,.8);text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}input[type=range]{-webkit-appearance:none;-webkit-tap-highlight-color:rgba(255,255,255,0);width:110px;height:10px;margin:0;border:none;padding:1px 2px;border-radius:30px;background:#f1f0ee;outline:none}input[type=range]::-ms-track{border:inherit;color:transparent;background:transparent}input[type=range]::-ms-fill-lower,input[type=range]::-ms-fill-upper{background:transparent}input[type=range]::-ms-tooltip{display:none}input[type=range]::-ms-thumb{width:15px;height:18px;border-radius:12px;border:0;background-image:linear-gradient(to bottom,#1253a4 0,#1253a4 100%)}.leaflet-control-layers-label{margin:0 0 8px 1px}@keyframes leaflet-gestures-fadein{0%{opacity:0}to{opacity:1}}.leaflet-container:after{animation:leaflet-gestures-fadein .8s backwards;color:#fff;font-family:Roboto,Arial,sans-serif;font-size:22px;justify-content:center;display:flex;align-items:center;padding:15px;position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);z-index:461;pointer-events:none}.leaflet-gesture-handling-touch-warning:after,.leaflet-gesture-handling-scroll-warning:after{animation:leaflet-gestures-fadein .8s forwards}.leaflet-gesture-handling-touch-warning:after{content:attr(data-gesture-handling-touch-content)}.leaflet-gesture-handling-scroll-warning:after{content:attr(data-gesture-handling-scroll-content)}:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}@supports (scrollbar-gutter: stable){.sl-scroll-lock{scrollbar-gutter:stable!important;overflow:hidden!important}}@supports not (scrollbar-gutter: stable){.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}:host{display:flex;align-content:center;justify-content:center;position:relative;background-color:inherit;z-index:0}.content{display:flex;flex-direction:column;width:100%;height:100%;margin:auto}#map{width:100%;height:100%}.caption{background-color:#fff;color:#000;padding:6px;line-height:1.2}#lat-lng-zoom{position:absolute;font-family:sans-serif;bottom:24px;right:0;width:150px;height:32px;padding:3px 6px;font-size:.8rem;background-color:#ffffff80;color:#000;z-index:2;opacity:0;text-align:right}#lat-lng-zoom:hover{visibility:visible;opacity:1;transition:all .3s ease-in;cursor:copy;z-index:1000}.card{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto auto 1fr 0px;border-radius:4px;padding:0}.card p{border:none}.card-image{grid-area:1 / 1 / 2 / 2;width:100%;height:190px}.card-title{grid-area:2 / 1 / 3 / 2;font-weight:700;font-size:1.5rem;line-height:1;padding:1.3rem .5rem .2rem;text-decoration:none}.card-metadata{grid-area:3 / 1 / 4 / 2;list-style:none;padding:.2rem .5rem;margin:0;font-size:.9rem;font-weight:400}.card-abstract{grid-area:4 / 1 / 5 / 2;align-self:flex-end;height:110px;line-height:1.4;font-size:1rem;padding:.5rem .5rem 0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;margin:0 0 .5rem}.leaflet-popup-content{width:280px;margin:0}.leaflet-control-layers-toggle{background-image:url(https://unpkg.com/leaflet@1.9.3/dist/images/layers.png)}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(https://unpkg.com/leaflet@1.9.3/dist/images/layers-2x.png)}sl-dialog::part(panel){max-width:unset;max-height:unset;height:100dvh}sl-dialog::part(overlay){--sl-overlay-background-color: rgba(100, 100, 100, .8)}sl-dialog::part(footer){background-color:#64646480}.leaflet-top,.leaflet-bottom{z-index:unset}.dialog .footer{display:flex;align-items:center;gap:.5em;padding:.5em;text-align:left}.push{margin-left:auto} +`,Map$3=_export_sfc(_sfc_main$a,[["styles",[_style_0$8]]]),_hoisted_1$7=createBaseVNode("sl-button",{slot:"trigger"},[createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",slot:"prefix",width:"16",height:"16",fill:"currentColor",class:"bi bi-list",viewBox:"0 0 16 16"},[createBaseVNode("path",{"fill-rule":"evenodd",d:"M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"})])],-1),_hoisted_2$5=["onClick"],_hoisted_3$5=["innerHTML"],_hoisted_4$5=["innerHTML"],_hoisted_5$3={key:1,slot:"prefix",style:{width:"1em","margin-right":"1em"}},_hoisted_6$2=createBaseVNode("span",null,"Download as PDF",-1),_hoisted_7$2=createBaseVNode("img",{slot:"prefix",width:"16",src:"https://upload.wikimedia.org/wikipedia/commons/2/2a/Noun_Project_PDF_icon_117327_cc.svg",alt:"PDF Download Icon"},null,-1),_hoisted_8$1=[_hoisted_6$2,_hoisted_7$2],_hoisted_9$2={class:"font-medium"},_hoisted_10$2=createBaseVNode("span",{class:"font-medium"}," Logout",-1),_hoisted_11$2=["innerHTML"],_hoisted_12$2={class:"font-medium"},_hoisted_13$2=["innerHTML"],_hoisted_14$1={class:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto min-h-[calc(100%-3.5rem)] flex items-center"},_hoisted_15$1={class:"flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"},_hoisted_16$1={class:"p-4 overflow-y-auto flex items-center gap-4 text-black"},_hoisted_17$1=createBaseVNode("sl-spinner",{style:{"font-size":"3rem","--indicator-color":"deeppink","--track-color":"pink"}},null,-1),_hoisted_18$1=["innerHTML"],_sfc_main$9=defineComponent({__name:"Menu.ce",props:{auth:{type:String},contact:{type:String},pdfDownloadEnabled:{type:Boolean,default:!1}},setup(F){const W=F,q=ref(null),K=computed(()=>{var Gf,rp;return(rp=(Gf=q.value)==null?void 0:Gf.getRootNode())==null?void 0:rp.host});watch$1(K,()=>{mo()});const X=ref(null),tt=computed(()=>X==null?void 0:X.value),rt=computed(()=>new HSOverlay(tt.value)),ot=ref(null),ut=computed(()=>ot==null?void 0:ot.value),yn=ref("Generating PDF...");watch$1(ut,Gf=>{rt.value.init(),Gf.addEventListener("open.hs.overlay",rp=>uo.value=!0),Gf.addEventListener("close.hs.overlay",rp=>uo.value=!1)});const uo=ref(!1);watch$1(uo,Gf=>{Gf?rt.value.open(ut.value):rt.value.close(ut.value)}),onMounted(async()=>{W.auth==="github"&&Df()});const po=ref([]);function mo(){function Gf(){let rp=Array.from(K.value.querySelectorAll("li")).map(ip=>{var Np,jp;const ap=ip.querySelector("a");let yp=ap==null?void 0:ap.innerText.trim(),vp=(Np=ip.querySelector("svg"))==null?void 0:Np.outerHTML;if(!vp){let Ip=((jp=ap==null?void 0:ap.href.split("/").filter(Jp=>Jp).pop())==null?void 0:jp.toLowerCase())||"";location.host===Ip?Ip="home":Ip.indexOf("search")===0?Ip="search":Ip==="docs.juncture-digital.org"&&(Ip="docs"),cf[Ip]&&(vp=cf[Ip])}return{label:yp,icon:vp,href:ap==null?void 0:ap.href}});W.contact&&rp.push({label:"Contact Us",icon:cf.contact,href:"/contact"}),po.value=rp}Gf(),new MutationObserver(rp=>{for(let ip of rp)ip.type==="childList"&&Gf()}).observe(K.value,{childList:!0,subtree:!0})}function wo(Gf,rp){let ip=Gf.href.split("/").filter(ap=>ap).pop().toLowerCase();if(ip=location.host===ip?"home":ip.indexOf("search")===0?"search":ip,ip==="contact")lf();else if(ip==="search")vf.open(Gf.href,"_blank");else{let ap=new URL(Gf.href),yp=(vf==null?void 0:vf.config)||{};if(console.log(ap,location,yp),ap.origin===location.origin){let vp,Np=new URL(location.href).searchParams.get("source");if(Np&&ap.pathname===location.pathname){console.log("source",Np);let[jp,Ip,Jp]=Np.split("/").filter(ng=>ng)||[];vp=`${location.origin}${location.pathname}?source=${jp}/${Ip}/${Jp}/`}else vp=`${ap.origin}${yp.baseurl||""}${ap.pathname}`;console.log("href",vp),location.href=vp}else location.href=Gf.href}}function lf(){const Gf=W.contact,rp=`${vf.config.title} Contact`,ap=`mailto:${Gf}?subject=${rp}&body=`;vf.open(ap,"_blank")}async function yf(){var vp,Np;yn.value="Generating PDF...",uo.value=!uo.value;let Gf=(vp=vf.config)==null?void 0:vp.source,rp=new URL(location.href),ip=rp.hostname=="localhost"?`https://v3.juncture-digital.org?source=${Gf.owner}/${Gf.repository}/${Gf.branch}/${Gf.path}`:rp.href;console.log("generatePDF for url:",ip);let ap=!!document.querySelector("article.j1"),yp=await fetch(`https://ezsitepdf-drnxe7pzjq-uc.a.run.app/pdf?url=${encodeURIComponent(ip)}${ap?"&landscape=true":""}`);if(yp.ok){let jp=((Np=Gf.path.split("/").filter(og=>og).filter(og=>og!=="README.md"&&og!=="index.md"))==null?void 0:Np.pop().replace(".md",""))||"document";yn.value="Downloading PDF...";let Ip=await yp.blob();const Jp=document.createElement("a");Jp.setAttribute("download",`${jp}.pdf`);const ng=URL.createObjectURL(Ip);Jp.href=ng,Jp.setAttribute("target","_blank"),Jp.click(),Jp.addEventListener,URL.revokeObjectURL(ng)}setTimeout(()=>uo.value=!1,2e3)}const cf={about:'',contact:'',docs:'',examples:'',editor:'',home:'',login:'',search:'',tools:'',user:'',wb:'',workbench:''},vf=self.window,_f=ref(vf.config||{}),$f=ref(null),xf=ref(!1);watch$1($f,()=>{$f.value?(localStorage.setItem("auth-user",JSON.stringify($f.value)),localStorage.setItem("gh-auth-token",$f.value.token),localStorage.setItem("gh-username",$f.value.username)):(localStorage.getItem("auth-user")&&localStorage.removeItem("auth-user"),localStorage.getItem("gh-auth-token")&&localStorage.removeItem("gh-auth-token"),localStorage.getItem("gh-username")&&localStorage.removeItem("gh-username"))});const Af=computed(()=>{var Gf,rp;return((Gf=$f.value)==null?void 0:Gf.token)||((rp=$f.value)==null?void 0:rp.token)||!1});watch$1(Af,()=>{Af.value||(xf.value=!1)});function Cf(Gf){return Gf[0].toUpperCase()+Gf.slice(1).toLowerCase()}function Pf(Gf){Gf.preventDefault(),Lf()}function Bf(Gf){Gf.preventDefault(),$f.value=null,kf()}const Hf={"iiif.mdpress.io":"9baccef56771878fd304","www.mdpress.io":"12548925f073dccf16d4","v3.juncture-digital.org":"Ov23li6BZxay7BGbQwHe"};async function Df(){var yp,vp,Np;let Gf=localStorage.getItem("auth-user")&&JSON.parse(localStorage.getItem("auth-user")||"{}");(Gf==null?void 0:Gf.provider)==="github"?$f.value=Gf:$f.value=null;let rp=new URL(vf.location.href).searchParams,ip=rp.get("code"),ap=rp.get("source");if(ip){let jp=`${location.pathname}${location.hash}`+(ap?`?source=${ap}`:"");vf.history.replaceState({},"",jp);let Ip=`https://iiif.mdpress.io/gh-token?code=${ip}&hostname=${vf.location.hostname}`,Jp=await fetch(Ip);if(Jp.ok){let ng=await Jp.text(),og=await Nf(ng);$f.value=og}}$f.value&&((yp=_f.value)!=null&&yp.github)&&(xf.value=await Yf((vp=_f.value)==null?void 0:vp.github.owner_name,(Np=_f.value)==null?void 0:Np.github.repository_name,$f.value.username,$f.value.token))}async function Lf(){var ip,ap,yp,vp;let Gf=new URL(vf.location.href).hostname;if(Gf==="localhost"||Gf.indexOf("192.168.")===0){let Np=await fetch("https:iiif.mdpress.io/gh-token?hostname=localhost&code=testing");if(Np.ok){let jp=await Np.text(),Ip=await Nf(jp);$f.value=Ip,xf.value=await Yf((ap=(ip=_f.value)==null?void 0:ip.github)==null?void 0:ap.owner_name,(vp=(yp=_f.value)==null?void 0:yp.github)==null?void 0:vp.repository_name,$f.value.username,jp),location.reload()}}else{let Np=new URL(location.href).searchParams.get("source"),jp=`${vf.location.href}`,Ip=Hf[location.hostname]!==void 0?`https://github.com/login/oauth/authorize?client_id=${Hf[location.hostname]}&scope=repo&state=juncture&redirect_uri=${jp}`+(Np?`&source=${Np}`:""):null;Ip&&(vf.location.href=Ip)}}function kf(){Object.keys(localStorage).filter(Gf=>Gf==="auth-user"||Gf==="gh-auth-token"||Gf==="gh-username").forEach(Gf=>localStorage.removeItem(Gf)),$f.value=null,location.reload()}async function Nf(Gf){let rp=await fetch("https://api.github.com/user",{headers:{Accept:"application/vnd.github+json",Authorization:`token ${Gf}`}});if(rp.ok){let ip=await rp.json();return{provider:"github",username:ip.login,name:ip.name,email:ip.email,token:Gf}}}async function Yf(Gf,rp,ip,ap){let yp=`https://api.github.com/repos/${Gf}/${rp}/collaborators/${ip}`,vp=await fetch(yp,{headers:{Accept:"application/vnd.github+json",Authorization:`token ${ap}`}});return vp.ok&&vp.status===204}return(Gf,rp)=>{var ip,ap;return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("sl-dropdown",{ref_key:"root",ref:q},[_hoisted_1$7,createBaseVNode("sl-menu",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(po.value,yp=>(openBlock(),createElementBlock("sl-menu-item",{onClick:vp=>wo(yp)},[createBaseVNode("span",{innerHTML:yp.label},null,8,_hoisted_3$5),yp.icon?(openBlock(),createElementBlock("svg",{key:0,slot:"prefix",innerHTML:yp.icon},null,8,_hoisted_4$5)):(openBlock(),createElementBlock("span",_hoisted_5$3))],8,_hoisted_2$5))),256)),F.pdfDownloadEnabled?(openBlock(),createElementBlock("sl-menu-item",{key:0,onClick:yf},_hoisted_8$1)):createCommentVNode("",!0),W.auth&&Af.value?(openBlock(),createElementBlock("sl-menu-item",{key:1,onClick:Bf},[createBaseVNode("span",_hoisted_9$2,"("+toDisplayString(((ip=$f.value)==null?void 0:ip.name)||((ap=$f.value)==null?void 0:ap.email))+")",1),_hoisted_10$2,(openBlock(),createElementBlock("svg",{slot:"prefix",innerHTML:cf.user},null,8,_hoisted_11$2))])):createCommentVNode("",!0),W.auth&&!Af.value?(openBlock(),createElementBlock("sl-menu-item",{key:2,onClick:Pf},[createBaseVNode("span",_hoisted_12$2,"Login with "+toDisplayString(Cf(W.auth)),1),(openBlock(),createElementBlock("svg",{slot:"prefix",innerHTML:cf.login},null,8,_hoisted_13$2))])):createCommentVNode("",!0)])],512),createBaseVNode("div",{ref_key:"overlayRef",ref:X},[createBaseVNode("div",{ref_key:"modalRef",ref:ot,id:"hs-basic-modal",class:"hs-overlay hidden w-full h-full fixed top-0 start-0 z-[80] overflow-x-hidden overflow-y-auto pointer-events-none"},[createBaseVNode("div",_hoisted_14$1,[createBaseVNode("div",_hoisted_15$1,[createBaseVNode("div",_hoisted_16$1,[_hoisted_17$1,createBaseVNode("p",{innerHTML:yn.value},null,8,_hoisted_18$1)])])])],512)],512)],64)}}}),_style_0$7=`:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}@supports (scrollbar-gutter: stable){.sl-scroll-lock{scrollbar-gutter:stable!important;overflow:hidden!important}}@supports not (scrollbar-gutter: stable){.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.\\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.\\!relative{position:relative!important}.relative{position:relative}.sticky{position:sticky}.-inset-1{top:-.25rem;right:-.25rem;bottom:-.25rem;left:-.25rem}.inset-0{top:0;right:0;bottom:0;left:0}.end-1{inset-inline-end:.25rem}.right-\\[10px\\]{right:10px}.start-0{inset-inline-start:0px}.top-0{top:0}.top-\\[12px\\]{top:12px}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.z-\\[80\\]{z-index:80}.float-right{float:right}.float-left{float:left}.float-none{float:none}.clear-left{clear:left}.clear-right{clear:right}.clear-both{clear:both}.clear-none{clear:none}.m-1{margin:.25rem}.m-3{margin:.75rem}.me-1{margin-inline-end:.25rem}.ml-1{margin-left:.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-none{overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.\\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\\!table{display:table!important}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.\\!grid{display:grid!important}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.h-1{height:.25rem}.h-40{height:10rem}.h-8{height:2rem}.h-80{height:20rem}.h-auto{height:auto}.h-full{height:100%}.min-h-\\[calc\\(100\\%-3\\.5rem\\)\\]{min-height:calc(100% - 3.5rem)}.w-1{width:.25rem}.w-\\[a-z0-9-\\]{width:a-z0-9-}.w-full{width:100%}.max-w-\\[24px\\]{max-width:24px}.max-w-xs{max-width:20rem}.flex-shrink,.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.caption-top{caption-side:top}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.\\!transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform,.transform-cpu{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}.cursor-pointer{cursor:pointer}.touch-auto{touch-action:auto}.touch-none{touch-action:none}.touch-pan-x{--tw-pan-x: pan-x;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-left{--tw-pan-x: pan-left;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-right{--tw-pan-x: pan-right;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-up{--tw-pan-y: pan-up;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-down{--tw-pan-y: pan-down;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pinch-zoom{--tw-pinch-zoom: pinch-zoom;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-manipulation{touch-action:manipulation}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize-none{resize:none}.resize-y{resize:vertical}.resize-x{resize:horizontal}.resize{resize:both}.snap-none{scroll-snap-type:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-both{scroll-snap-type:both var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.snap-proximity{--tw-scroll-snap-strictness: proximity}.snap-start{scroll-snap-align:start}.snap-end{scroll-snap-align:end}.snap-center{scroll-snap-align:center}.snap-align-none{scroll-snap-align:none}.snap-normal{scroll-snap-stop:normal}.snap-always{scroll-snap-stop:always}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.columns-1{-moz-columns:1;columns:1}.break-before-auto{-moz-column-break-before:auto;break-before:auto}.break-before-avoid{-moz-column-break-before:avoid;break-before:avoid}.break-before-all{-moz-column-break-before:all;break-before:all}.break-before-avoid-page{-moz-column-break-before:avoid;break-before:avoid-page}.break-before-page{-moz-column-break-before:page;break-before:page}.break-before-left{-moz-column-break-before:left;break-before:left}.break-before-right{-moz-column-break-before:right;break-before:right}.break-before-column{-moz-column-break-before:column;break-before:column}.break-inside-auto{-moz-column-break-inside:auto;break-inside:auto}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-inside-avoid-page{break-inside:avoid-page}.break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.break-after-auto{-moz-column-break-after:auto;break-after:auto}.break-after-avoid{-moz-column-break-after:avoid;break-after:avoid}.break-after-all{-moz-column-break-after:all;break-after:all}.break-after-avoid-page{-moz-column-break-after:avoid;break-after:avoid-page}.break-after-page{-moz-column-break-after:page;break-after:page}.break-after-left{-moz-column-break-after:left;break-after:left}.break-after-right{-moz-column-break-after:right;break-after:right}.break-after-column{-moz-column-break-after:column;break-after:column}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row-dense{grid-auto-flow:row dense}.grid-flow-col-dense{grid-auto-flow:column dense}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.flex-nowrap{flex-wrap:nowrap}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-content-end{place-content:end}.place-content-between{place-content:space-between}.place-content-around{place-content:space-around}.place-content-evenly{place-content:space-evenly}.place-content-baseline{place-content:baseline}.place-content-stretch{place-content:stretch}.place-items-start{place-items:start}.place-items-end{place-items:end}.place-items-center{place-items:center}.place-items-baseline{place-items:baseline}.place-items-stretch{place-items:stretch}.content-normal{align-content:normal}.content-center{align-content:center}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-evenly{align-content:space-evenly}.content-baseline{align-content:baseline}.content-stretch{align-content:stretch}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-normal{justify-content:normal}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-stretch{justify-content:stretch}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.divide-dashed>:not([hidden])~:not([hidden]){border-style:dashed}.divide-dotted>:not([hidden])~:not([hidden]){border-style:dotted}.divide-double>:not([hidden])~:not([hidden]){border-style:double}.divide-none>:not([hidden])~:not([hidden]){border-style:none}.place-self-auto{place-self:auto}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.place-self-stretch{place-self:stretch}.self-auto{align-self:auto}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.self-baseline{align-self:baseline}.justify-self-auto{justify-self:auto}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.justify-self-stretch{justify-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-x-clip{overflow-x:clip}.overflow-y-clip{overflow-y:clip}.overflow-x-visible{overflow-x:visible}.overflow-y-visible{overflow-y:visible}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.overscroll-auto{overscroll-behavior:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.overscroll-y-auto{overscroll-behavior-y:auto}.overscroll-y-contain{overscroll-behavior-y:contain}.overscroll-y-none{overscroll-behavior-y:none}.overscroll-x-auto{overscroll-behavior-x:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-x-none{overscroll-behavior-x:none}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.hyphens-none{-webkit-hyphens:none;hyphens:none}.hyphens-manual{-webkit-hyphens:manual;hyphens:manual}.hyphens-auto{-webkit-hyphens:auto;hyphens:auto}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.whitespace-break-spaces{white-space:break-spaces}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-e{border-inline-end-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-double{border-style:double}.border-hidden{border-style:hidden}.border-none{border-style:none}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-\\[rgb\\(255\\,0\\,0\\)\\]{--tw-bg-opacity: 1;background-color:rgb(255 0 0 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-content{background-clip:content-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-origin-border{background-origin:border-box}.bg-origin-padding{background-origin:padding-box}.bg-origin-content{background-origin:content-box}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.object-none{-o-object-fit:none;object-fit:none}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-14{padding:3.5rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-8{padding:2rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pe-1{padding-inline-end:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-top{vertical-align:text-top}.align-text-bottom{vertical-align:text-bottom}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.\\!ordinal{--tw-ordinal: ordinal !important;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero: slashed-zero;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure: lining-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure: oldstyle-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing: proportional-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction: diagonal-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction: stacked-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.text-\\[\\#336699\\]\\/\\[\\.35\\]{color:#33669959}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.bg-blend-normal{background-blend-mode:normal}.bg-blend-multiply{background-blend-mode:multiply}.bg-blend-screen{background-blend-mode:screen}.bg-blend-overlay{background-blend-mode:overlay}.bg-blend-darken{background-blend-mode:darken}.bg-blend-lighten{background-blend-mode:lighten}.bg-blend-color-dodge{background-blend-mode:color-dodge}.bg-blend-color-burn{background-blend-mode:color-burn}.bg-blend-hard-light{background-blend-mode:hard-light}.bg-blend-soft-light{background-blend-mode:soft-light}.bg-blend-difference{background-blend-mode:difference}.bg-blend-exclusion{background-blend-mode:exclusion}.bg-blend-hue{background-blend-mode:hue}.bg-blend-saturation{background-blend-mode:saturation}.bg-blend-color{background-blend-mode:color}.bg-blend-luminosity{background-blend-mode:luminosity}.mix-blend-normal{mix-blend-mode:normal}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-screen{mix-blend-mode:screen}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-darken{mix-blend-mode:darken}.mix-blend-lighten{mix-blend-mode:lighten}.mix-blend-color-dodge{mix-blend-mode:color-dodge}.mix-blend-color-burn{mix-blend-mode:color-burn}.mix-blend-hard-light{mix-blend-mode:hard-light}.mix-blend-soft-light{mix-blend-mode:soft-light}.mix-blend-difference{mix-blend-mode:difference}.mix-blend-exclusion{mix-blend-mode:exclusion}.mix-blend-hue{mix-blend-mode:hue}.mix-blend-saturation{mix-blend-mode:saturation}.mix-blend-color{mix-blend-mode:color}.mix-blend-luminosity{mix-blend-mode:luminosity}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-dashed{outline-style:dashed}.outline-dotted{outline-style:dotted}.outline-double{outline-style:double}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!invert{--tw-invert: invert(100%) !important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter-none{filter:none}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-grayscale{--tw-backdrop-grayscale: grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-invert{--tw-backdrop-invert: invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-sepia{--tw-backdrop-sepia: sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter-none{-webkit-backdrop-filter:none;backdrop-filter:none}.\\!transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.content-\\[\\'this-is-also-valid\\]-weirdly-enough\\'\\]{--tw-content: "this-is-also-valid]-weirdly-enough";content:var(--tw-content)}.\\[--placement\\:bottom\\]{--placement: bottom}.\\[--placement\\:top\\]{--placement: top}.\\[--trigger\\:click\\]{--trigger: click}.\\[-\\:\\=\\]{-: =}.\\[a-zA-Z0-9\\:\\\\\\\\-\\\\\\\\\\._\\$\\]{a-z-a--z0-9:\\\\-\\\\. $}.\\[a-zA-Z0-9\\:_-\\]{a-z-a--z0-9:-}.\\[a-zA-Z\\:_\\]{a-z-a--z:}.\\[a\\:a\\]{a:a}.\\[vite\\:css\\]{vite:css}.\\[vite\\:html\\]{vite:html}html{padding:1rem;font-family:sans-serif}ve-header ul,ve-menu ul{display:none}@media (min-width: 640px){.sm\\:container{width:100%}@media (min-width: 640px){.sm\\:container{max-width:640px}}@media (min-width: 768px){.sm\\:container{max-width:768px}}@media (min-width: 1024px){.sm\\:container{max-width:1024px}}@media (min-width: 1280px){.sm\\:container{max-width:1280px}}@media (min-width: 1536px){.sm\\:container{max-width:1536px}}}.hover\\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\\:font-bold:hover{font-weight:700}.before\\:hover\\:text-center:hover:before{content:var(--tw-content);text-align:center}.hover\\:before\\:text-center:hover:before{content:var(--tw-content);text-align:center}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\\:hover\\:text-center:hover:focus{text-align:center}.hover\\:focus\\:text-center:focus:hover{text-align:center}.hs-tooltip.show .hs-tooltip-shown\\:visible{visibility:visible}.hs-tooltip.show .hs-tooltip-shown\\:opacity-100{opacity:1}.open.hs-overlay-open\\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\\:opacity-100{opacity:1}.open.hs-overlay-open\\:duration-500{transition-duration:.5s}.open .hs-overlay-open\\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\\:opacity-100{opacity:1}.open .hs-overlay-open\\:duration-500{transition-duration:.5s}:is(.dark .dark\\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\\:shadow-slate-700\\/\\[\\.7\\]){--tw-shadow-color: rgb(51 65 85 / .7);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\\:focus\\:ring-offset-gray-800:focus){--tw-ring-offset-color: #1f2937}@media (min-width: 640px){.sm\\:mx-auto{margin-left:auto;margin-right:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:underline{text-decoration-line:underline}}@media (min-width: 768px){.md\\:p-5{padding:1.25rem}}@media (min-width: 1024px){:is(.dark .dark\\:lg\\:hover\\:\\[paint-order\\:markers\\]:hover){paint-order:markers}}sl-menu-item svg{width:1em;height:1em;vertical-align:middle;margin-right:1em} `,Menu=_export_sfc(_sfc_main$9,[["styles",[_style_0$7]]]);function dedent(F){for(var W=[],q=1;q=Gf?Yf:""+Array(Gf+1-ip.length).join(rp)+Yf},wf={s:$f,z:function(Yf){var Gf=-Yf.utcOffset(),rp=Math.abs(Gf),ip=Math.floor(rp/60),ap=rp%60;return(Gf<=0?"+":"-")+$f(ip,2,"0")+":"+$f(ap,2,"0")},m:function Yf(Gf,rp){if(Gf.date()1)return Yf(vp[0])}else{var Np=Gf.name;Cf[Np]=Gf,ap=Np}return!ip&&ap&&(Pf=ap),ap||!ip&&Pf},Df=function(Yf,Gf){if(Bf(Yf))return Yf.clone();var rp=typeof Gf=="object"?Gf:{};return rp.date=Yf,rp.args=arguments,new kf(rp)},Lf=wf;Lf.l=Hf,Lf.i=Bf,Lf.w=function(Yf,Gf){return Df(Yf,{locale:Gf.$L,utc:Gf.$u,x:Gf.$x,$offset:Gf.$offset})};var kf=function(){function Yf(rp){this.$L=Hf(rp.locale,null,!0),this.parse(rp),this.$x=this.$x||rp.x||{},this[Af]=!0}var Gf=Yf.prototype;return Gf.parse=function(rp){this.$d=function(ip){var ap=ip.date,yp=ip.utc;if(ap===null)return new Date(NaN);if(Lf.u(ap))return new Date;if(ap instanceof Date)return new Date(ap);if(typeof ap=="string"&&!/Z$/i.test(ap)){var vp=ap.match(cf);if(vp){var Np=vp[2]-1||0,jp=(vp[7]||"0").substring(0,3);return yp?new Date(Date.UTC(vp[1],Np,vp[3]||1,vp[4]||0,vp[5]||0,vp[6]||0,jp)):new Date(vp[1],Np,vp[3]||1,vp[4]||0,vp[5]||0,vp[6]||0,jp)}}return new Date(ap)}(rp),this.init()},Gf.init=function(){var rp=this.$d;this.$y=rp.getFullYear(),this.$M=rp.getMonth(),this.$D=rp.getDate(),this.$W=rp.getDay(),this.$H=rp.getHours(),this.$m=rp.getMinutes(),this.$s=rp.getSeconds(),this.$ms=rp.getMilliseconds()},Gf.$utils=function(){return Lf},Gf.isValid=function(){return this.$d.toString()!==yf},Gf.isSame=function(rp,ip){var ap=Df(rp);return this.startOf(ip)<=ap&&ap<=this.endOf(ip)},Gf.isAfter=function(rp,ip){return Df(rp)-1}function ut(uo){var po=uo.replace(X,"");return po.replace(q,function(mo,wo){return String.fromCharCode(wo)})}function yn(uo){if(!uo)return F.BLANK_URL;var po=ut(uo).replace(K,"").replace(X,"").trim();if(!po)return F.BLANK_URL;if(ot(po))return po;var mo=po.match(tt);if(!mo)return po;var wo=mo[0];return W.test(wo)?F.BLANK_URL:po}F.sanitizeUrl=yn})(dist$2);var noop$4={value:()=>{}};function dispatch(){for(var F=0,W=arguments.length,q={},K;F=0&&(K=q.slice(X+1),q=q.slice(0,X)),q&&!W.hasOwnProperty(q))throw new Error("unknown type: "+q);return{type:q,name:K}})}Dispatch$1.prototype=dispatch.prototype={constructor:Dispatch$1,on:function(F,W){var q=this._,K=parseTypenames$1(F+"",q),X,tt=-1,rt=K.length;if(arguments.length<2){for(;++tt0)for(var q=new Array(X),K=0,X,tt;K=0&&(W=F.slice(0,q))!=="xmlns"&&(F=F.slice(q+1)),namespaces.hasOwnProperty(W)?{space:namespaces[W],local:F}:F}function creatorInherit(F){return function(){var W=this.ownerDocument,q=this.namespaceURI;return q===xhtml&&W.documentElement.namespaceURI===xhtml?W.createElement(F):W.createElementNS(q,F)}}function creatorFixed(F){return function(){return this.ownerDocument.createElementNS(F.space,F.local)}}function creator(F){var W=namespace(F);return(W.local?creatorFixed:creatorInherit)(W)}function none(){}function selector(F){return F==null?none:function(){return this.querySelector(F)}}function selection_select(F){typeof F!="function"&&(F=selector(F));for(var W=this._groups,q=W.length,K=new Array(q),X=0;X=$f&&($f=_f+1);!(Pf=cf[$f])&&++$f=0;)(rt=K[X])&&(tt&&rt.compareDocumentPosition(tt)^4&&tt.parentNode.insertBefore(rt,tt),tt=rt);return this}function selection_sort(F){F||(F=ascending);function W(po,mo){return po&&mo?F(po.__data__,mo.__data__):!po-!mo}for(var q=this._groups,K=q.length,X=new Array(K),tt=0;ttW?1:F>=W?0:NaN}function selection_call(){var F=arguments[0];return arguments[0]=this,F.apply(null,arguments),this}function selection_nodes(){return Array.from(this)}function selection_node(){for(var F=this._groups,W=0,q=F.length;W1?this.each((W==null?styleRemove$1:typeof W=="function"?styleFunction$1:styleConstant$1)(F,W,q??"")):styleValue(this.node(),F)}function styleValue(F,W){return F.style.getPropertyValue(W)||defaultView(F).getComputedStyle(F,null).getPropertyValue(W)}function propertyRemove(F){return function(){delete this[F]}}function propertyConstant(F,W){return function(){this[F]=W}}function propertyFunction(F,W){return function(){var q=W.apply(this,arguments);q==null?delete this[F]:this[F]=q}}function selection_property(F,W){return arguments.length>1?this.each((W==null?propertyRemove:typeof W=="function"?propertyFunction:propertyConstant)(F,W)):this.node()[F]}function classArray(F){return F.trim().split(/^|\s+/)}function classList(F){return F.classList||new ClassList(F)}function ClassList(F){this._node=F,this._names=classArray(F.getAttribute("class")||"")}ClassList.prototype={add:function(F){var W=this._names.indexOf(F);W<0&&(this._names.push(F),this._node.setAttribute("class",this._names.join(" ")))},remove:function(F){var W=this._names.indexOf(F);W>=0&&(this._names.splice(W,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(F){return this._names.indexOf(F)>=0}};function classedAdd(F,W){for(var q=classList(F),K=-1,X=W.length;++K=0&&(q=W.slice(K+1),W=W.slice(0,K)),{type:W,name:q}})}function onRemove(F){return function(){var W=this.__on;if(W){for(var q=0,K=-1,X=W.length,tt;q>8&15|W>>4&240,W>>4&15|W&240,(W&15)<<4|W&15,1):q===8?rgba$2(W>>24&255,W>>16&255,W>>8&255,(W&255)/255):q===4?rgba$2(W>>12&15|W>>8&240,W>>8&15|W>>4&240,W>>4&15|W&240,((W&15)<<4|W&15)/255):null):(W=reRgbInteger.exec(F))?new Rgb(W[1],W[2],W[3],1):(W=reRgbPercent.exec(F))?new Rgb(W[1]*255/100,W[2]*255/100,W[3]*255/100,1):(W=reRgbaInteger.exec(F))?rgba$2(W[1],W[2],W[3],W[4]):(W=reRgbaPercent.exec(F))?rgba$2(W[1]*255/100,W[2]*255/100,W[3]*255/100,W[4]):(W=reHslPercent.exec(F))?hsla(W[1],W[2]/100,W[3]/100,1):(W=reHslaPercent.exec(F))?hsla(W[1],W[2]/100,W[3]/100,W[4]):named.hasOwnProperty(F)?rgbn(named[F]):F==="transparent"?new Rgb(NaN,NaN,NaN,0):null}function rgbn(F){return new Rgb(F>>16&255,F>>8&255,F&255,1)}function rgba$2(F,W,q,K){return K<=0&&(F=W=q=NaN),new Rgb(F,W,q,K)}function rgbConvert(F){return F instanceof Color$2||(F=color(F)),F?(F=F.rgb(),new Rgb(F.r,F.g,F.b,F.opacity)):new Rgb}function rgb(F,W,q,K){return arguments.length===1?rgbConvert(F):new Rgb(F,W,q,K??1)}function Rgb(F,W,q,K){this.r=+F,this.g=+W,this.b=+q,this.opacity=+K}define$1(Rgb,rgb,extend$6(Color$2,{brighter(F){return F=F==null?brighter:Math.pow(brighter,F),new Rgb(this.r*F,this.g*F,this.b*F,this.opacity)},darker(F){return F=F==null?darker:Math.pow(darker,F),new Rgb(this.r*F,this.g*F,this.b*F,this.opacity)},rgb(){return this},clamp(){return new Rgb(clampi(this.r),clampi(this.g),clampi(this.b),clampa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rgb_formatHex,formatHex:rgb_formatHex,formatHex8:rgb_formatHex8,formatRgb:rgb_formatRgb,toString:rgb_formatRgb}));function rgb_formatHex(){return`#${hex$2(this.r)}${hex$2(this.g)}${hex$2(this.b)}`}function rgb_formatHex8(){return`#${hex$2(this.r)}${hex$2(this.g)}${hex$2(this.b)}${hex$2((isNaN(this.opacity)?1:this.opacity)*255)}`}function rgb_formatRgb(){const F=clampa(this.opacity);return`${F===1?"rgb(":"rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${F===1?")":`, ${F})`}`}function clampa(F){return isNaN(F)?1:Math.max(0,Math.min(1,F))}function clampi(F){return Math.max(0,Math.min(255,Math.round(F)||0))}function hex$2(F){return F=clampi(F),(F<16?"0":"")+F.toString(16)}function hsla(F,W,q,K){return K<=0?F=W=q=NaN:q<=0||q>=1?F=W=NaN:W<=0&&(F=NaN),new Hsl(F,W,q,K)}function hslConvert(F){if(F instanceof Hsl)return new Hsl(F.h,F.s,F.l,F.opacity);if(F instanceof Color$2||(F=color(F)),!F)return new Hsl;if(F instanceof Hsl)return F;F=F.rgb();var W=F.r/255,q=F.g/255,K=F.b/255,X=Math.min(W,q,K),tt=Math.max(W,q,K),rt=NaN,ot=tt-X,ut=(tt+X)/2;return ot?(W===tt?rt=(q-K)/ot+(q0&&ut<1?0:rt,new Hsl(rt,ot,ut,F.opacity)}function hsl(F,W,q,K){return arguments.length===1?hslConvert(F):new Hsl(F,W,q,K??1)}function Hsl(F,W,q,K){this.h=+F,this.s=+W,this.l=+q,this.opacity=+K}define$1(Hsl,hsl,extend$6(Color$2,{brighter(F){return F=F==null?brighter:Math.pow(brighter,F),new Hsl(this.h,this.s,this.l*F,this.opacity)},darker(F){return F=F==null?darker:Math.pow(darker,F),new Hsl(this.h,this.s,this.l*F,this.opacity)},rgb(){var F=this.h%360+(this.h<0)*360,W=isNaN(F)||isNaN(this.s)?0:this.s,q=this.l,K=q+(q<.5?q:1-q)*W,X=2*q-K;return new Rgb(hsl2rgb(F>=240?F-240:F+120,X,K),hsl2rgb(F,X,K),hsl2rgb(F<120?F+240:F-120,X,K),this.opacity)},clamp(){return new Hsl(clamph(this.h),clampt(this.s),clampt(this.l),clampa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const F=clampa(this.opacity);return`${F===1?"hsl(":"hsla("}${clamph(this.h)}, ${clampt(this.s)*100}%, ${clampt(this.l)*100}%${F===1?")":`, ${F})`}`}}));function clamph(F){return F=(F||0)%360,F<0?F+360:F}function clampt(F){return Math.max(0,Math.min(1,F||0))}function hsl2rgb(F,W,q){return(F<60?W+(q-W)*F/60:F<180?q:F<240?W+(q-W)*(240-F)/60:W)*255}const constant$1=F=>()=>F;function linear(F,W){return function(q){return F+q*W}}function exponential(F,W,q){return F=Math.pow(F,q),W=Math.pow(W,q)-F,q=1/q,function(K){return Math.pow(F+K*W,q)}}function hue(F,W){var q=W-F;return q?linear(F,q>180||q<-180?q-360*Math.round(q/360):q):constant$1(isNaN(F)?W:F)}function gamma(F){return(F=+F)==1?nogamma:function(W,q){return q-W?exponential(W,q,F):constant$1(isNaN(W)?q:W)}}function nogamma(F,W){var q=W-F;return q?linear(F,q):constant$1(isNaN(F)?W:F)}const interpolateRgb=function F(W){var q=gamma(W);function K(X,tt){var rt=q((X=rgb(X)).r,(tt=rgb(tt)).r),ot=q(X.g,tt.g),ut=q(X.b,tt.b),yn=nogamma(X.opacity,tt.opacity);return function(uo){return X.r=rt(uo),X.g=ot(uo),X.b=ut(uo),X.opacity=yn(uo),X+""}}return K.gamma=F,K}(1);function interpolateNumber(F,W){return F=+F,W=+W,function(q){return F*(1-q)+W*q}}var reA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,reB=new RegExp(reA.source,"g");function zero(F){return function(){return F}}function one(F){return function(W){return F(W)+""}}function interpolateString(F,W){var q=reA.lastIndex=reB.lastIndex=0,K,X,tt,rt=-1,ot=[],ut=[];for(F=F+"",W=W+"";(K=reA.exec(F))&&(X=reB.exec(W));)(tt=X.index)>q&&(tt=W.slice(q,tt),ot[rt]?ot[rt]+=tt:ot[++rt]=tt),(K=K[0])===(X=X[0])?ot[rt]?ot[rt]+=X:ot[++rt]=X:(ot[++rt]=null,ut.push({i:rt,x:interpolateNumber(K,X)})),q=reB.lastIndex;return q180?uo+=360:uo-yn>180&&(yn+=360),mo.push({i:po.push(X(po)+"rotate(",null,K)-2,x:interpolateNumber(yn,uo)})):uo&&po.push(X(po)+"rotate("+uo+K)}function ot(yn,uo,po,mo){yn!==uo?mo.push({i:po.push(X(po)+"skewX(",null,K)-2,x:interpolateNumber(yn,uo)}):uo&&po.push(X(po)+"skewX("+uo+K)}function ut(yn,uo,po,mo,wo,lf){if(yn!==po||uo!==mo){var yf=wo.push(X(wo)+"scale(",null,",",null,")");lf.push({i:yf-4,x:interpolateNumber(yn,po)},{i:yf-2,x:interpolateNumber(uo,mo)})}else(po!==1||mo!==1)&&wo.push(X(wo)+"scale("+po+","+mo+")")}return function(yn,uo){var po=[],mo=[];return yn=F(yn),uo=F(uo),tt(yn.translateX,yn.translateY,uo.translateX,uo.translateY,po,mo),rt(yn.rotate,uo.rotate,po,mo),ot(yn.skewX,uo.skewX,po,mo),ut(yn.scaleX,yn.scaleY,uo.scaleX,uo.scaleY,po,mo),yn=uo=null,function(wo){for(var lf=-1,yf=mo.length,cf;++lf=0&&F._call.call(void 0,W),F=F._next;--frame$1}function wake(){clockNow=(clockLast=clock.now())+clockSkew,frame$1=timeout$1=0;try{timerFlush()}finally{frame$1=0,nap(),clockNow=0}}function poke(){var F=clock.now(),W=F-clockLast;W>pokeDelay&&(clockSkew-=W,clockLast=F)}function nap(){for(var F,W=taskHead,q,K=1/0;W;)W._call?(K>W._time&&(K=W._time),F=W,W=W._next):(q=W._next,W._next=null,W=F?F._next=q:taskHead=q);taskTail=F,sleep(K)}function sleep(F){if(!frame$1){timeout$1&&(timeout$1=clearTimeout(timeout$1));var W=F-clockNow;W>24?(F<1/0&&(timeout$1=setTimeout(wake,F-clock.now()-clockSkew)),interval&&(interval=clearInterval(interval))):(interval||(clockLast=clock.now(),interval=setInterval(poke,pokeDelay)),frame$1=1,setFrame(wake))}}function timeout(F,W,q){var K=new Timer;return W=W==null?0:+W,K.restart(X=>{K.stop(),F(X+W)},W,q),K}var emptyOn=dispatch("start","end","cancel","interrupt"),emptyTween=[],CREATED=0,SCHEDULED=1,STARTING=2,STARTED=3,RUNNING=4,ENDING=5,ENDED=6;function schedule(F,W,q,K,X,tt){var rt=F.__transition;if(!rt)F.__transition={};else if(q in rt)return;create$e(F,q,{name:W,index:K,group:X,on:emptyOn,tween:emptyTween,time:tt.time,delay:tt.delay,duration:tt.duration,ease:tt.ease,timer:null,state:CREATED})}function init$1(F,W){var q=get$a(F,W);if(q.state>CREATED)throw new Error("too late; already scheduled");return q}function set$8(F,W){var q=get$a(F,W);if(q.state>STARTED)throw new Error("too late; already running");return q}function get$a(F,W){var q=F.__transition;if(!q||!(q=q[W]))throw new Error("transition not found");return q}function create$e(F,W,q){var K=F.__transition,X;K[W]=q,q.timer=timer(tt,0,q.time);function tt(yn){q.state=SCHEDULED,q.timer.restart(rt,q.delay,q.time),q.delay<=yn&&rt(yn-q.delay)}function rt(yn){var uo,po,mo,wo;if(q.state!==SCHEDULED)return ut();for(uo in K)if(wo=K[uo],wo.name===q.name){if(wo.state===STARTED)return timeout(rt);wo.state===RUNNING?(wo.state=ENDED,wo.timer.stop(),wo.on.call("interrupt",F,F.__data__,wo.index,wo.group),delete K[uo]):+uoSTARTING&&K.state=0&&(W=W.slice(0,q)),!W||W==="start"})}function onFunction(F,W,q){var K,X,tt=start(W)?init$1:set$8;return function(){var rt=tt(this,F),ot=rt.on;ot!==K&&(X=(K=ot).copy()).on(W,q),rt.on=X}}function transition_on(F,W){var q=this._id;return arguments.length<2?get$a(this.node(),q).on.on(F):this.each(onFunction(q,F,W))}function removeFunction(F){return function(){var W=this.parentNode;for(var q in this.__transition)if(+q!==F)return;W&&W.removeChild(this)}}function transition_remove(){return this.on("end.remove",removeFunction(this._id))}function transition_select(F){var W=this._name,q=this._id;typeof F!="function"&&(F=selector(F));for(var K=this._groups,X=K.length,tt=new Array(X),rt=0;rt1?0:F<-1?pi:Math.acos(F)}function asin(F){return F>=1?halfPi:F<=-1?-halfPi:Math.asin(F)}function Linear(F){this._context=F}Linear.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1,this._line?this._context.lineTo(F,W):this._context.moveTo(F,W);break;case 1:this._point=2;default:this._context.lineTo(F,W);break}}};function curveLinear(F){return new Linear(F)}class Bump{constructor(W,q){this._context=W,this._x=q}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(W,q){switch(W=+W,q=+q,this._point){case 0:{this._point=1,this._line?this._context.lineTo(W,q):this._context.moveTo(W,q);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+W)/2,this._y0,this._x0,q,W,q):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+q)/2,W,this._y0,W,q);break}}this._x0=W,this._y0=q}}function bumpX(F){return new Bump(F,!0)}function bumpY(F){return new Bump(F,!1)}function noop$3(){}function point$3(F,W,q){F._context.bezierCurveTo((2*F._x0+F._x1)/3,(2*F._y0+F._y1)/3,(F._x0+2*F._x1)/3,(F._y0+2*F._y1)/3,(F._x0+4*F._x1+W)/6,(F._y0+4*F._y1+q)/6)}function Basis(F){this._context=F}Basis.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:point$3(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1,this._line?this._context.lineTo(F,W):this._context.moveTo(F,W);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:point$3(this,F,W);break}this._x0=this._x1,this._x1=F,this._y0=this._y1,this._y1=W}};function curveBasis(F){return new Basis(F)}function BasisClosed(F){this._context=F}BasisClosed.prototype={areaStart:noop$3,areaEnd:noop$3,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1,this._x2=F,this._y2=W;break;case 1:this._point=2,this._x3=F,this._y3=W;break;case 2:this._point=3,this._x4=F,this._y4=W,this._context.moveTo((this._x0+4*this._x1+F)/6,(this._y0+4*this._y1+W)/6);break;default:point$3(this,F,W);break}this._x0=this._x1,this._x1=F,this._y0=this._y1,this._y1=W}};function curveBasisClosed(F){return new BasisClosed(F)}function BasisOpen(F){this._context=F}BasisOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var q=(this._x0+4*this._x1+F)/6,K=(this._y0+4*this._y1+W)/6;this._line?this._context.lineTo(q,K):this._context.moveTo(q,K);break;case 3:this._point=4;default:point$3(this,F,W);break}this._x0=this._x1,this._x1=F,this._y0=this._y1,this._y1=W}};function curveBasisOpen(F){return new BasisOpen(F)}function Bundle(F,W){this._basis=new Basis(F),this._beta=W}Bundle.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var F=this._x,W=this._y,q=F.length-1;if(q>0)for(var K=F[0],X=W[0],tt=F[q]-K,rt=W[q]-X,ot=-1,ut;++ot<=q;)ut=ot/q,this._basis.point(this._beta*F[ot]+(1-this._beta)*(K+ut*tt),this._beta*W[ot]+(1-this._beta)*(X+ut*rt));this._x=this._y=null,this._basis.lineEnd()},point:function(F,W){this._x.push(+F),this._y.push(+W)}};const curveBundle=function F(W){function q(K){return W===1?new Basis(K):new Bundle(K,W)}return q.beta=function(K){return F(+K)},q}(.85);function point$2(F,W,q){F._context.bezierCurveTo(F._x1+F._k*(F._x2-F._x0),F._y1+F._k*(F._y2-F._y0),F._x2+F._k*(F._x1-W),F._y2+F._k*(F._y1-q),F._x2,F._y2)}function Cardinal(F,W){this._context=F,this._k=(1-W)/6}Cardinal.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:point$2(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1,this._line?this._context.lineTo(F,W):this._context.moveTo(F,W);break;case 1:this._point=2,this._x1=F,this._y1=W;break;case 2:this._point=3;default:point$2(this,F,W);break}this._x0=this._x1,this._x1=this._x2,this._x2=F,this._y0=this._y1,this._y1=this._y2,this._y2=W}};const curveCardinal=function F(W){function q(K){return new Cardinal(K,W)}return q.tension=function(K){return F(+K)},q}(0);function CardinalClosed(F,W){this._context=F,this._k=(1-W)/6}CardinalClosed.prototype={areaStart:noop$3,areaEnd:noop$3,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1,this._x3=F,this._y3=W;break;case 1:this._point=2,this._context.moveTo(this._x4=F,this._y4=W);break;case 2:this._point=3,this._x5=F,this._y5=W;break;default:point$2(this,F,W);break}this._x0=this._x1,this._x1=this._x2,this._x2=F,this._y0=this._y1,this._y1=this._y2,this._y2=W}};const curveCardinalClosed=function F(W){function q(K){return new CardinalClosed(K,W)}return q.tension=function(K){return F(+K)},q}(0);function CardinalOpen(F,W){this._context=F,this._k=(1-W)/6}CardinalOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:point$2(this,F,W);break}this._x0=this._x1,this._x1=this._x2,this._x2=F,this._y0=this._y1,this._y1=this._y2,this._y2=W}};const curveCardinalOpen=function F(W){function q(K){return new CardinalOpen(K,W)}return q.tension=function(K){return F(+K)},q}(0);function point$1(F,W,q){var K=F._x1,X=F._y1,tt=F._x2,rt=F._y2;if(F._l01_a>epsilon){var ot=2*F._l01_2a+3*F._l01_a*F._l12_a+F._l12_2a,ut=3*F._l01_a*(F._l01_a+F._l12_a);K=(K*ot-F._x0*F._l12_2a+F._x2*F._l01_2a)/ut,X=(X*ot-F._y0*F._l12_2a+F._y2*F._l01_2a)/ut}if(F._l23_a>epsilon){var yn=2*F._l23_2a+3*F._l23_a*F._l12_a+F._l12_2a,uo=3*F._l23_a*(F._l23_a+F._l12_a);tt=(tt*yn+F._x1*F._l23_2a-W*F._l12_2a)/uo,rt=(rt*yn+F._y1*F._l23_2a-q*F._l12_2a)/uo}F._context.bezierCurveTo(K,X,tt,rt,F._x2,F._y2)}function CatmullRom(F,W){this._context=F,this._alpha=W}CatmullRom.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){if(F=+F,W=+W,this._point){var q=this._x2-F,K=this._y2-W;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(q*q+K*K,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(F,W):this._context.moveTo(F,W);break;case 1:this._point=2;break;case 2:this._point=3;default:point$1(this,F,W);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=F,this._y0=this._y1,this._y1=this._y2,this._y2=W}};const curveCatmullRom=function F(W){function q(K){return W?new CatmullRom(K,W):new Cardinal(K,0)}return q.alpha=function(K){return F(+K)},q}(.5);function CatmullRomClosed(F,W){this._context=F,this._alpha=W}CatmullRomClosed.prototype={areaStart:noop$3,areaEnd:noop$3,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(F,W){if(F=+F,W=+W,this._point){var q=this._x2-F,K=this._y2-W;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(q*q+K*K,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=F,this._y3=W;break;case 1:this._point=2,this._context.moveTo(this._x4=F,this._y4=W);break;case 2:this._point=3,this._x5=F,this._y5=W;break;default:point$1(this,F,W);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=F,this._y0=this._y1,this._y1=this._y2,this._y2=W}};const curveCatmullRomClosed=function F(W){function q(K){return W?new CatmullRomClosed(K,W):new CardinalClosed(K,0)}return q.alpha=function(K){return F(+K)},q}(.5);function CatmullRomOpen(F,W){this._context=F,this._alpha=W}CatmullRomOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){if(F=+F,W=+W,this._point){var q=this._x2-F,K=this._y2-W;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(q*q+K*K,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:point$1(this,F,W);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=F,this._y0=this._y1,this._y1=this._y2,this._y2=W}};const curveCatmullRomOpen=function F(W){function q(K){return W?new CatmullRomOpen(K,W):new CardinalOpen(K,0)}return q.alpha=function(K){return F(+K)},q}(.5);function LinearClosed(F){this._context=F}LinearClosed.prototype={areaStart:noop$3,areaEnd:noop$3,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(F,W){F=+F,W=+W,this._point?this._context.lineTo(F,W):(this._point=1,this._context.moveTo(F,W))}};function curveLinearClosed(F){return new LinearClosed(F)}function sign$1(F){return F<0?-1:1}function slope3(F,W,q){var K=F._x1-F._x0,X=W-F._x1,tt=(F._y1-F._y0)/(K||X<0&&-0),rt=(q-F._y1)/(X||K<0&&-0),ot=(tt*X+rt*K)/(K+X);return(sign$1(tt)+sign$1(rt))*Math.min(Math.abs(tt),Math.abs(rt),.5*Math.abs(ot))||0}function slope2(F,W){var q=F._x1-F._x0;return q?(3*(F._y1-F._y0)/q-W)/2:W}function point(F,W,q){var K=F._x0,X=F._y0,tt=F._x1,rt=F._y1,ot=(tt-K)/3;F._context.bezierCurveTo(K+ot,X+ot*W,tt-ot,rt-ot*q,tt,rt)}function MonotoneX(F){this._context=F}MonotoneX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:point(this,this._t0,slope2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){var q=NaN;if(F=+F,W=+W,!(F===this._x1&&W===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(F,W):this._context.moveTo(F,W);break;case 1:this._point=2;break;case 2:this._point=3,point(this,slope2(this,q=slope3(this,F,W)),q);break;default:point(this,this._t0,q=slope3(this,F,W));break}this._x0=this._x1,this._x1=F,this._y0=this._y1,this._y1=W,this._t0=q}}};function MonotoneY(F){this._context=new ReflectContext(F)}(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(F,W){MonotoneX.prototype.point.call(this,W,F)};function ReflectContext(F){this._context=F}ReflectContext.prototype={moveTo:function(F,W){this._context.moveTo(W,F)},closePath:function(){this._context.closePath()},lineTo:function(F,W){this._context.lineTo(W,F)},bezierCurveTo:function(F,W,q,K,X,tt){this._context.bezierCurveTo(W,F,K,q,tt,X)}};function monotoneX(F){return new MonotoneX(F)}function monotoneY(F){return new MonotoneY(F)}function Natural(F){this._context=F}Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var F=this._x,W=this._y,q=F.length;if(q)if(this._line?this._context.lineTo(F[0],W[0]):this._context.moveTo(F[0],W[0]),q===2)this._context.lineTo(F[1],W[1]);else for(var K=controlPoints(F),X=controlPoints(W),tt=0,rt=1;rt=0;--W)X[W]=(rt[W]-X[W+1])/tt[W];for(tt[q-1]=(F[q]+X[q-1])/2,W=0;W=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1,this._line?this._context.lineTo(F,W):this._context.moveTo(F,W);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,W),this._context.lineTo(F,W);else{var q=this._x*(1-this._t)+F*this._t;this._context.lineTo(q,this._y),this._context.lineTo(q,W)}break}}this._x=F,this._y=W}};function curveStep(F){return new Step(F,.5)}function stepBefore(F){return new Step(F,0)}function stepAfter(F){return new Step(F,1)}function Transform(F,W,q){this.k=F,this.x=W,this.y=q}Transform.prototype={constructor:Transform,scale:function(F){return F===1?this:new Transform(this.k*F,this.x,this.y)},translate:function(F,W){return F===0&W===0?this:new Transform(this.k,this.x+this.k*F,this.y+this.k*W)},apply:function(F){return[F[0]*this.k+this.x,F[1]*this.k+this.y]},applyX:function(F){return F*this.k+this.x},applyY:function(F){return F*this.k+this.y},invert:function(F){return[(F[0]-this.x)/this.k,(F[1]-this.y)/this.k]},invertX:function(F){return(F-this.x)/this.k},invertY:function(F){return(F-this.y)/this.k},rescaleX:function(F){return F.copy().domain(F.range().map(this.invertX,this).map(F.invert,F))},rescaleY:function(F){return F.copy().domain(F.range().map(this.invertY,this).map(F.invert,F))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Transform.prototype;/*! @license DOMPurify 3.1.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.0/LICENSE */const{entries:entries$5,setPrototypeOf:setPrototypeOf$8,isFrozen:isFrozen$1,getPrototypeOf:getPrototypeOf$b,getOwnPropertyDescriptor:getOwnPropertyDescriptor$c}=Object;let{freeze:freeze$1,seal:seal$1,create:create$d}=Object,{apply:apply$9,construct:construct$7}=typeof Reflect<"u"&&Reflect;freeze$1||(freeze$1=function(W){return W});seal$1||(seal$1=function(W){return W});apply$9||(apply$9=function(W,q,K){return W.apply(q,K)});construct$7||(construct$7=function(W,q){return new W(...q)});const arrayForEach$3=unapply(Array.prototype.forEach),arrayPop=unapply(Array.prototype.pop),arrayPush=unapply(Array.prototype.push),stringToLowerCase=unapply(String.prototype.toLowerCase),stringToString=unapply(String.prototype.toString),stringMatch=unapply(String.prototype.match),stringReplace=unapply(String.prototype.replace),stringIndexOf$2=unapply(String.prototype.indexOf),stringTrim$2=unapply(String.prototype.trim),objectHasOwnProperty=unapply(Object.prototype.hasOwnProperty),regExpTest=unapply(RegExp.prototype.test),typeErrorCreate=unconstruct(TypeError);function unapply(F){return function(W){for(var q=arguments.length,K=new Array(q>1?q-1:0),X=1;X2&&arguments[2]!==void 0?arguments[2]:stringToLowerCase;setPrototypeOf$8&&setPrototypeOf$8(F,null);let K=W.length;for(;K--;){let X=W[K];if(typeof X=="string"){const tt=q(X);tt!==X&&(isFrozen$1(W)||(W[K]=tt),X=tt)}F[X]=!0}return F}function cleanArray(F){for(let W=0;W/gm),TMPLIT_EXPR=seal$1(/\${[\w\W]*}/gm),DATA_ATTR=seal$1(/^data-[\-\w.\u00B7-\uFFFF]/),ARIA_ATTR=seal$1(/^aria-[\-\w]+$/),IS_ALLOWED_URI=seal$1(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IS_SCRIPT_OR_DATA=seal$1(/^(?:\w+script|data):/i),ATTR_WHITESPACE=seal$1(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DOCTYPE_NAME=seal$1(/^html$/i),CUSTOM_ELEMENT=seal$1(/^[a-z][.\w]*(-[.\w]+)+$/i);var EXPRESSIONS=Object.freeze({__proto__:null,MUSTACHE_EXPR,ERB_EXPR,TMPLIT_EXPR,DATA_ATTR,ARIA_ATTR,IS_ALLOWED_URI,IS_SCRIPT_OR_DATA,ATTR_WHITESPACE,DOCTYPE_NAME,CUSTOM_ELEMENT});const getGlobal=function F(){return typeof window>"u"?null:window},_createTrustedTypesPolicy=function F(W,q){if(typeof W!="object"||typeof W.createPolicy!="function")return null;let K=null;const X="data-tt-policy-suffix";q&&q.hasAttribute(X)&&(K=q.getAttribute(X));const tt="dompurify"+(K?"#"+K:"");try{return W.createPolicy(tt,{createHTML(rt){return rt},createScriptURL(rt){return rt}})}catch{return console.warn("TrustedTypes policy "+tt+" could not be created."),null}};function createDOMPurify(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal();const W=Jg=>createDOMPurify(Jg);if(W.version="3.1.0",W.removed=[],!F||!F.document||F.document.nodeType!==9)return W.isSupported=!1,W;let{document:q}=F;const K=q,X=K.currentScript,{DocumentFragment:tt,HTMLTemplateElement:rt,Node:ot,Element:ut,NodeFilter:yn,NamedNodeMap:uo=F.NamedNodeMap||F.MozNamedAttrMap,HTMLFormElement:po,DOMParser:mo,trustedTypes:wo}=F,lf=ut.prototype,yf=lookupGetter(lf,"cloneNode"),cf=lookupGetter(lf,"nextSibling"),vf=lookupGetter(lf,"childNodes"),_f=lookupGetter(lf,"parentNode");if(typeof rt=="function"){const Jg=q.createElement("template");Jg.content&&Jg.content.ownerDocument&&(q=Jg.content.ownerDocument)}let $f,wf="";const{implementation:Pf,createNodeIterator:Cf,createDocumentFragment:Af,getElementsByTagName:Bf}=q,{importNode:Hf}=K;let Df={};W.isSupported=typeof entries$5=="function"&&typeof _f=="function"&&Pf&&Pf.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Lf,ERB_EXPR:kf,TMPLIT_EXPR:Nf,DATA_ATTR:Yf,ARIA_ATTR:Gf,IS_SCRIPT_OR_DATA:rp,ATTR_WHITESPACE:ip,CUSTOM_ELEMENT:ap}=EXPRESSIONS;let{IS_ALLOWED_URI:yp}=EXPRESSIONS,vp=null;const Np=addToSet({},[...html$1$3,...svg$1,...svgFilters,...mathMl$1,...text]);let jp=null;const Ip=addToSet({},[...html$4,...svg,...mathMl,...xml]);let Jp=Object.seal(create$d(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ng=null,og=null,vg=!0,Dp=!0,Lp=!1,xp=!0,kp=!1,lp=!0,Of=!1,qf=!1,cp=!1,hp=!1,$p=!1,Vp=!1,bp=!0,Ep=!1;const _p="user-content-";let Mp=!0,Yp=!1,ug={},hg=null;const xg=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let kg=null;const Dg=addToSet({},["audio","video","img","source","image","track"]);let lm=null;const Bp=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rp="http://www.w3.org/1998/Math/MathML",Fp="http://www.w3.org/2000/svg",Op="http://www.w3.org/1999/xhtml";let Kp=Op,Kf=!1,Xf=null;const gp=addToSet({},[Rp,Fp,Op],stringToString);let wp=null;const dg=["application/xhtml+xml","text/html"],mg="text/html";let pg=null,wg=null;const Cg=q.createElement("form"),Bg=function(Hp){return Hp instanceof RegExp||Hp instanceof Function},Xg=function(){let Hp=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(wg&&wg===Hp)){if((!Hp||typeof Hp!="object")&&(Hp={}),Hp=clone$3(Hp),wp=dg.indexOf(Hp.PARSER_MEDIA_TYPE)===-1?mg:Hp.PARSER_MEDIA_TYPE,pg=wp==="application/xhtml+xml"?stringToString:stringToLowerCase,vp=objectHasOwnProperty(Hp,"ALLOWED_TAGS")?addToSet({},Hp.ALLOWED_TAGS,pg):Np,jp=objectHasOwnProperty(Hp,"ALLOWED_ATTR")?addToSet({},Hp.ALLOWED_ATTR,pg):Ip,Xf=objectHasOwnProperty(Hp,"ALLOWED_NAMESPACES")?addToSet({},Hp.ALLOWED_NAMESPACES,stringToString):gp,lm=objectHasOwnProperty(Hp,"ADD_URI_SAFE_ATTR")?addToSet(clone$3(Bp),Hp.ADD_URI_SAFE_ATTR,pg):Bp,kg=objectHasOwnProperty(Hp,"ADD_DATA_URI_TAGS")?addToSet(clone$3(Dg),Hp.ADD_DATA_URI_TAGS,pg):Dg,hg=objectHasOwnProperty(Hp,"FORBID_CONTENTS")?addToSet({},Hp.FORBID_CONTENTS,pg):xg,ng=objectHasOwnProperty(Hp,"FORBID_TAGS")?addToSet({},Hp.FORBID_TAGS,pg):{},og=objectHasOwnProperty(Hp,"FORBID_ATTR")?addToSet({},Hp.FORBID_ATTR,pg):{},ug=objectHasOwnProperty(Hp,"USE_PROFILES")?Hp.USE_PROFILES:!1,vg=Hp.ALLOW_ARIA_ATTR!==!1,Dp=Hp.ALLOW_DATA_ATTR!==!1,Lp=Hp.ALLOW_UNKNOWN_PROTOCOLS||!1,xp=Hp.ALLOW_SELF_CLOSE_IN_ATTR!==!1,kp=Hp.SAFE_FOR_TEMPLATES||!1,lp=Hp.SAFE_FOR_XML!==!1,Of=Hp.WHOLE_DOCUMENT||!1,hp=Hp.RETURN_DOM||!1,$p=Hp.RETURN_DOM_FRAGMENT||!1,Vp=Hp.RETURN_TRUSTED_TYPE||!1,cp=Hp.FORCE_BODY||!1,bp=Hp.SANITIZE_DOM!==!1,Ep=Hp.SANITIZE_NAMED_PROPS||!1,Mp=Hp.KEEP_CONTENT!==!1,Yp=Hp.IN_PLACE||!1,yp=Hp.ALLOWED_URI_REGEXP||IS_ALLOWED_URI,Kp=Hp.NAMESPACE||Op,Jp=Hp.CUSTOM_ELEMENT_HANDLING||{},Hp.CUSTOM_ELEMENT_HANDLING&&Bg(Hp.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Jp.tagNameCheck=Hp.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Hp.CUSTOM_ELEMENT_HANDLING&&Bg(Hp.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Jp.attributeNameCheck=Hp.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Hp.CUSTOM_ELEMENT_HANDLING&&typeof Hp.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Jp.allowCustomizedBuiltInElements=Hp.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),kp&&(Dp=!1),$p&&(hp=!0),ug&&(vp=addToSet({},text),jp=[],ug.html===!0&&(addToSet(vp,html$1$3),addToSet(jp,html$4)),ug.svg===!0&&(addToSet(vp,svg$1),addToSet(jp,svg),addToSet(jp,xml)),ug.svgFilters===!0&&(addToSet(vp,svgFilters),addToSet(jp,svg),addToSet(jp,xml)),ug.mathMl===!0&&(addToSet(vp,mathMl$1),addToSet(jp,mathMl),addToSet(jp,xml))),Hp.ADD_TAGS&&(vp===Np&&(vp=clone$3(vp)),addToSet(vp,Hp.ADD_TAGS,pg)),Hp.ADD_ATTR&&(jp===Ip&&(jp=clone$3(jp)),addToSet(jp,Hp.ADD_ATTR,pg)),Hp.ADD_URI_SAFE_ATTR&&addToSet(lm,Hp.ADD_URI_SAFE_ATTR,pg),Hp.FORBID_CONTENTS&&(hg===xg&&(hg=clone$3(hg)),addToSet(hg,Hp.FORBID_CONTENTS,pg)),Mp&&(vp["#text"]=!0),Of&&addToSet(vp,["html","head","body"]),vp.table&&(addToSet(vp,["tbody"]),delete ng.tbody),Hp.TRUSTED_TYPES_POLICY){if(typeof Hp.TRUSTED_TYPES_POLICY.createHTML!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Hp.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$f=Hp.TRUSTED_TYPES_POLICY,wf=$f.createHTML("")}else $f===void 0&&($f=_createTrustedTypesPolicy(wo,X)),$f!==null&&typeof wf=="string"&&(wf=$f.createHTML(""));freeze$1&&freeze$1(Hp),wg=Hp}},mm=addToSet({},["mi","mo","mn","ms","mtext"]),Hg=addToSet({},["foreignobject","desc","title","annotation-xml"]),Iy=addToSet({},["title","style","font","a","script"]),py=addToSet({},[...svg$1,...svgFilters,...svgDisallowed]),Yy=addToSet({},[...mathMl$1,...mathMlDisallowed]),Yb=function(Hp){let Eg=_f(Hp);(!Eg||!Eg.tagName)&&(Eg={namespaceURI:Kp,tagName:"template"});const Gg=stringToLowerCase(Hp.tagName),yv=stringToLowerCase(Eg.tagName);return Xf[Hp.namespaceURI]?Hp.namespaceURI===Fp?Eg.namespaceURI===Op?Gg==="svg":Eg.namespaceURI===Rp?Gg==="svg"&&(yv==="annotation-xml"||mm[yv]):!!py[Gg]:Hp.namespaceURI===Rp?Eg.namespaceURI===Op?Gg==="math":Eg.namespaceURI===Fp?Gg==="math"&&Hg[yv]:!!Yy[Gg]:Hp.namespaceURI===Op?Eg.namespaceURI===Fp&&!Hg[yv]||Eg.namespaceURI===Rp&&!mm[yv]?!1:!Yy[Gg]&&(Iy[Gg]||!py[Gg]):!!(wp==="application/xhtml+xml"&&Xf[Hp.namespaceURI]):!1},p0=function(Hp){arrayPush(W.removed,{element:Hp});try{Hp.parentNode.removeChild(Hp)}catch{Hp.remove()}},_b=function(Hp,Eg){try{arrayPush(W.removed,{attribute:Eg.getAttributeNode(Hp),from:Eg})}catch{arrayPush(W.removed,{attribute:null,from:Eg})}if(Eg.removeAttribute(Hp),Hp==="is"&&!jp[Hp])if(hp||$p)try{p0(Eg)}catch{}else try{Eg.setAttribute(Hp,"")}catch{}},Fy=function(Hp){let Eg=null,Gg=null;if(cp)Hp=""+Hp;else{const Cv=stringMatch(Hp,/^[\r\n\t ]+/);Gg=Cv&&Cv[0]}wp==="application/xhtml+xml"&&Kp===Op&&(Hp=''+Hp+"");const yv=$f?$f.createHTML(Hp):Hp;if(Kp===Op)try{Eg=new mo().parseFromString(yv,wp)}catch{}if(!Eg||!Eg.documentElement){Eg=Pf.createDocument(Kp,"template",null);try{Eg.documentElement.innerHTML=Kf?wf:yv}catch{}}const Py=Eg.body||Eg.documentElement;return Hp&&Gg&&Py.insertBefore(q.createTextNode(Gg),Py.childNodes[0]||null),Kp===Op?Bf.call(Eg,Of?"html":"body")[0]:Of?Eg.documentElement:Py},qg=function(Hp){return Cf.call(Hp.ownerDocument||Hp,Hp,yn.SHOW_ELEMENT|yn.SHOW_COMMENT|yn.SHOW_TEXT|yn.SHOW_PROCESSING_INSTRUCTION|yn.SHOW_CDATA_SECTION,null)},E1=function(Hp){return Hp instanceof po&&(typeof Hp.nodeName!="string"||typeof Hp.textContent!="string"||typeof Hp.removeChild!="function"||!(Hp.attributes instanceof uo)||typeof Hp.removeAttribute!="function"||typeof Hp.setAttribute!="function"||typeof Hp.namespaceURI!="string"||typeof Hp.insertBefore!="function"||typeof Hp.hasChildNodes!="function")},A$=function(Hp){return typeof ot=="function"&&Hp instanceof ot},qv=function(Hp,Eg,Gg){Df[Hp]&&arrayForEach$3(Df[Hp],yv=>{yv.call(W,Eg,Gg,wg)})},H0=function(Hp){let Eg=null;if(qv("beforeSanitizeElements",Hp,null),E1(Hp))return p0(Hp),!0;const Gg=pg(Hp.nodeName);if(qv("uponSanitizeElement",Hp,{tagName:Gg,allowedTags:vp}),Hp.hasChildNodes()&&!A$(Hp.firstElementChild)&®ExpTest(/<[/\w]/g,Hp.innerHTML)&®ExpTest(/<[/\w]/g,Hp.textContent)||Hp.nodeType===7||lp&&Hp.nodeType===8&®ExpTest(/<[/\w]/g,Hp.data))return p0(Hp),!0;if(!vp[Gg]||ng[Gg]){if(!ng[Gg]&&R$(Gg)&&(Jp.tagNameCheck instanceof RegExp&®ExpTest(Jp.tagNameCheck,Gg)||Jp.tagNameCheck instanceof Function&&Jp.tagNameCheck(Gg)))return!1;if(Mp&&!hg[Gg]){const yv=_f(Hp)||Hp.parentNode,Py=vf(Hp)||Hp.childNodes;if(Py&&yv){const Cv=Py.length;for(let By=Cv-1;By>=0;--By)yv.insertBefore(yf(Py[By],!0),cf(Hp))}}return p0(Hp),!0}return Hp instanceof ut&&!Yb(Hp)||(Gg==="noscript"||Gg==="noembed"||Gg==="noframes")&®ExpTest(/<\/no(script|embed|frames)/i,Hp.innerHTML)?(p0(Hp),!0):(kp&&Hp.nodeType===3&&(Eg=Hp.textContent,arrayForEach$3([Lf,kf,Nf],yv=>{Eg=stringReplace(Eg,yv," ")}),Hp.textContent!==Eg&&(arrayPush(W.removed,{element:Hp.cloneNode()}),Hp.textContent=Eg)),qv("afterSanitizeElements",Hp,null),!1)},wb=function(Hp,Eg,Gg){if(bp&&(Eg==="id"||Eg==="name")&&(Gg in q||Gg in Cg))return!1;if(!(Dp&&!og[Eg]&®ExpTest(Yf,Eg))){if(!(vg&®ExpTest(Gf,Eg))){if(!jp[Eg]||og[Eg]){if(!(R$(Hp)&&(Jp.tagNameCheck instanceof RegExp&®ExpTest(Jp.tagNameCheck,Hp)||Jp.tagNameCheck instanceof Function&&Jp.tagNameCheck(Hp))&&(Jp.attributeNameCheck instanceof RegExp&®ExpTest(Jp.attributeNameCheck,Eg)||Jp.attributeNameCheck instanceof Function&&Jp.attributeNameCheck(Eg))||Eg==="is"&&Jp.allowCustomizedBuiltInElements&&(Jp.tagNameCheck instanceof RegExp&®ExpTest(Jp.tagNameCheck,Gg)||Jp.tagNameCheck instanceof Function&&Jp.tagNameCheck(Gg))))return!1}else if(!lm[Eg]){if(!regExpTest(yp,stringReplace(Gg,ip,""))){if(!((Eg==="src"||Eg==="xlink:href"||Eg==="href")&&Hp!=="script"&&stringIndexOf$2(Gg,"data:")===0&&kg[Hp])){if(!(Lp&&!regExpTest(rp,stringReplace(Gg,ip,"")))){if(Gg)return!1}}}}}}return!0},R$=function(Hp){return Hp!=="annotation-xml"&&stringMatch(Hp,ap)},g0=function(Hp){qv("beforeSanitizeAttributes",Hp,null);const{attributes:Eg}=Hp;if(!Eg)return;const Gg={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:jp};let yv=Eg.length;for(;yv--;){const Py=Eg[yv],{name:Cv,namespaceURI:By,value:S1}=Py,T1=pg(Cv);let jy=Cv==="value"?S1:stringTrim$2(S1);if(Gg.attrName=T1,Gg.attrValue=jy,Gg.keepAttr=!0,Gg.forceKeepAttr=void 0,qv("uponSanitizeAttribute",Hp,Gg),jy=Gg.attrValue,Gg.forceKeepAttr||(_b(Cv,Hp),!Gg.keepAttr))continue;if(!xp&®ExpTest(/\/>/i,jy)){_b(Cv,Hp);continue}kp&&arrayForEach$3([Lf,kf,Nf],xb=>{jy=stringReplace(jy,xb," ")});const cw=pg(Hp.nodeName);if(wb(cw,T1,jy)){if(Ep&&(T1==="id"||T1==="name")&&(_b(Cv,Hp),jy=_p+jy),$f&&typeof wo=="object"&&typeof wo.getAttributeType=="function"&&!By)switch(wo.getAttributeType(cw,T1)){case"TrustedHTML":{jy=$f.createHTML(jy);break}case"TrustedScriptURL":{jy=$f.createScriptURL(jy);break}}try{By?Hp.setAttributeNS(By,Cv,jy):Hp.setAttribute(Cv,jy),arrayPop(W.removed)}catch{}}}qv("afterSanitizeAttributes",Hp,null)},m_=function Jg(Hp){let Eg=null;const Gg=qg(Hp);for(qv("beforeSanitizeShadowDOM",Hp,null);Eg=Gg.nextNode();)qv("uponSanitizeShadowNode",Eg,null),!H0(Eg)&&(Eg.content instanceof tt&&Jg(Eg.content),g0(Eg));qv("afterSanitizeShadowDOM",Hp,null)};return W.sanitize=function(Jg){let Hp=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Eg=null,Gg=null,yv=null,Py=null;if(Kf=!Jg,Kf&&(Jg=""),typeof Jg!="string"&&!A$(Jg))if(typeof Jg.toString=="function"){if(Jg=Jg.toString(),typeof Jg!="string")throw typeErrorCreate("dirty is not a string, aborting")}else throw typeErrorCreate("toString is not a function");if(!W.isSupported)return Jg;if(qf||Xg(Hp),W.removed=[],typeof Jg=="string"&&(Yp=!1),Yp){if(Jg.nodeName){const S1=pg(Jg.nodeName);if(!vp[S1]||ng[S1])throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place")}}else if(Jg instanceof ot)Eg=Fy(""),Gg=Eg.ownerDocument.importNode(Jg,!0),Gg.nodeType===1&&Gg.nodeName==="BODY"||Gg.nodeName==="HTML"?Eg=Gg:Eg.appendChild(Gg);else{if(!hp&&!kp&&!Of&&Jg.indexOf("<")===-1)return $f&&Vp?$f.createHTML(Jg):Jg;if(Eg=Fy(Jg),!Eg)return hp?null:Vp?wf:""}Eg&&cp&&p0(Eg.firstChild);const Cv=qg(Yp?Jg:Eg);for(;yv=Cv.nextNode();)H0(yv)||(yv.content instanceof tt&&m_(yv.content),g0(yv));if(Yp)return Jg;if(hp){if($p)for(Py=Af.call(Eg.ownerDocument);Eg.firstChild;)Py.appendChild(Eg.firstChild);else Py=Eg;return(jp.shadowroot||jp.shadowrootmode)&&(Py=Hf.call(K,Py,!0)),Py}let By=Of?Eg.outerHTML:Eg.innerHTML;return Of&&vp["!doctype"]&&Eg.ownerDocument&&Eg.ownerDocument.doctype&&Eg.ownerDocument.doctype.name&®ExpTest(DOCTYPE_NAME,Eg.ownerDocument.doctype.name)&&(By=" -`+By),kp&&arrayForEach$3([Lf,kf,Nf],S1=>{By=stringReplace(By,S1," ")}),$f&&Vp?$f.createHTML(By):By},W.setConfig=function(){let Jg=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Xg(Jg),qf=!0},W.clearConfig=function(){wg=null,qf=!1},W.isValidAttribute=function(Jg,Hp,Eg){wg||Xg({});const Gg=pg(Jg),yv=pg(Hp);return wb(Gg,yv,Eg)},W.addHook=function(Jg,Hp){typeof Hp=="function"&&(Df[Jg]=Df[Jg]||[],arrayPush(Df[Jg],Hp))},W.removeHook=function(Jg){if(Df[Jg])return arrayPop(Df[Jg])},W.removeHooks=function(Jg){Df[Jg]&&(Df[Jg]=[])},W.removeAllHooks=function(){Df={}},W}var purify=createDOMPurify();const Channel={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:F=>F>=255?255:F<0?0:F,g:F=>F>=255?255:F<0?0:F,b:F=>F>=255?255:F<0?0:F,h:F=>F%360,s:F=>F>=100?100:F<0?0:F,l:F=>F>=100?100:F<0?0:F,a:F=>F>=1?1:F<0?0:F},toLinear:F=>{const W=F/255;return F>.03928?Math.pow((W+.055)/1.055,2.4):W/12.92},hue2rgb:(F,W,q)=>(q<0&&(q+=1),q>1&&(q-=1),q<1/6?F+(W-F)*6*q:q<1/2?W:q<2/3?F+(W-F)*(2/3-q)*6:F),hsl2rgb:({h:F,s:W,l:q},K)=>{if(!W)return q*2.55;F/=360,W/=100,q/=100;const X=q<.5?q*(1+W):q+W-q*W,tt=2*q-X;switch(K){case"r":return Channel.hue2rgb(tt,X,F+1/3)*255;case"g":return Channel.hue2rgb(tt,X,F)*255;case"b":return Channel.hue2rgb(tt,X,F-1/3)*255}},rgb2hsl:({r:F,g:W,b:q},K)=>{F/=255,W/=255,q/=255;const X=Math.max(F,W,q),tt=Math.min(F,W,q),rt=(X+tt)/2;if(K==="l")return rt*100;if(X===tt)return 0;const ot=X-tt,ut=rt>.5?ot/(2-X-tt):ot/(X+tt);if(K==="s")return ut*100;switch(X){case F:return((W-q)/ot+(WW>q?Math.min(W,Math.max(q,F)):Math.min(q,Math.max(W,F)),round:F=>Math.round(F*1e10)/1e10},lang$1=Lang,Unit={dec2hex:F=>{const W=Math.round(F).toString(16);return W.length>1?W:`0${W}`}},unit=Unit,Utils={channel:channel$1,lang:lang$1,unit},_$4=Utils,DEC2HEX={};for(let F=0;F<=255;F++)DEC2HEX[F]=_$4.unit.dec2hex(F);const TYPE={ALL:0,RGB:1,HSL:2};class Type{constructor(){this.type=TYPE.ALL}get(){return this.type}set(W){if(this.type&&this.type!==W)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=W}reset(){this.type=TYPE.ALL}is(W){return this.type===W}}const Type$2=Type;class Channels{constructor(W,q){this.color=q,this.changed=!1,this.data=W,this.type=new Type$2}set(W,q){return this.color=q,this.changed=!1,this.data=W,this.type.type=TYPE.ALL,this}_ensureHSL(){const W=this.data,{h:q,s:K,l:X}=W;q===void 0&&(W.h=_$4.channel.rgb2hsl(W,"h")),K===void 0&&(W.s=_$4.channel.rgb2hsl(W,"s")),X===void 0&&(W.l=_$4.channel.rgb2hsl(W,"l"))}_ensureRGB(){const W=this.data,{r:q,g:K,b:X}=W;q===void 0&&(W.r=_$4.channel.hsl2rgb(W,"r")),K===void 0&&(W.g=_$4.channel.hsl2rgb(W,"g")),X===void 0&&(W.b=_$4.channel.hsl2rgb(W,"b"))}get r(){const W=this.data,q=W.r;return!this.type.is(TYPE.HSL)&&q!==void 0?q:(this._ensureHSL(),_$4.channel.hsl2rgb(W,"r"))}get g(){const W=this.data,q=W.g;return!this.type.is(TYPE.HSL)&&q!==void 0?q:(this._ensureHSL(),_$4.channel.hsl2rgb(W,"g"))}get b(){const W=this.data,q=W.b;return!this.type.is(TYPE.HSL)&&q!==void 0?q:(this._ensureHSL(),_$4.channel.hsl2rgb(W,"b"))}get h(){const W=this.data,q=W.h;return!this.type.is(TYPE.RGB)&&q!==void 0?q:(this._ensureRGB(),_$4.channel.rgb2hsl(W,"h"))}get s(){const W=this.data,q=W.s;return!this.type.is(TYPE.RGB)&&q!==void 0?q:(this._ensureRGB(),_$4.channel.rgb2hsl(W,"s"))}get l(){const W=this.data,q=W.l;return!this.type.is(TYPE.RGB)&&q!==void 0?q:(this._ensureRGB(),_$4.channel.rgb2hsl(W,"l"))}get a(){return this.data.a}set r(W){this.type.set(TYPE.RGB),this.changed=!0,this.data.r=W}set g(W){this.type.set(TYPE.RGB),this.changed=!0,this.data.g=W}set b(W){this.type.set(TYPE.RGB),this.changed=!0,this.data.b=W}set h(W){this.type.set(TYPE.HSL),this.changed=!0,this.data.h=W}set s(W){this.type.set(TYPE.HSL),this.changed=!0,this.data.s=W}set l(W){this.type.set(TYPE.HSL),this.changed=!0,this.data.l=W}set a(W){this.changed=!0,this.data.a=W}}const Channels$1=Channels,channels=new Channels$1({r:0,g:0,b:0,a:0},"transparent"),ChannelsReusable=channels,Hex={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:F=>{if(F.charCodeAt(0)!==35)return;const W=F.match(Hex.re);if(!W)return;const q=W[1],K=parseInt(q,16),X=q.length,tt=X%4===0,rt=X>4,ot=rt?1:17,ut=rt?8:4,yn=tt?0:-1,uo=rt?255:15;return ChannelsReusable.set({r:(K>>ut*(yn+3)&uo)*ot,g:(K>>ut*(yn+2)&uo)*ot,b:(K>>ut*(yn+1)&uo)*ot,a:tt?(K&uo)*ot/255:1},F)},stringify:F=>{const{r:W,g:q,b:K,a:X}=F;return X<1?`#${DEC2HEX[Math.round(W)]}${DEC2HEX[Math.round(q)]}${DEC2HEX[Math.round(K)]}${DEC2HEX[Math.round(X*255)]}`:`#${DEC2HEX[Math.round(W)]}${DEC2HEX[Math.round(q)]}${DEC2HEX[Math.round(K)]}`}},Hex$1=Hex,HSL={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:F=>{const W=F.match(HSL.hueRe);if(W){const[,q,K]=W;switch(K){case"grad":return _$4.channel.clamp.h(parseFloat(q)*.9);case"rad":return _$4.channel.clamp.h(parseFloat(q)*180/Math.PI);case"turn":return _$4.channel.clamp.h(parseFloat(q)*360)}}return _$4.channel.clamp.h(parseFloat(F))},parse:F=>{const W=F.charCodeAt(0);if(W!==104&&W!==72)return;const q=F.match(HSL.re);if(!q)return;const[,K,X,tt,rt,ot]=q;return ChannelsReusable.set({h:HSL._hue2deg(K),s:_$4.channel.clamp.s(parseFloat(X)),l:_$4.channel.clamp.l(parseFloat(tt)),a:rt?_$4.channel.clamp.a(ot?parseFloat(rt)/100:parseFloat(rt)):1},F)},stringify:F=>{const{h:W,s:q,l:K,a:X}=F;return X<1?`hsla(${_$4.lang.round(W)}, ${_$4.lang.round(q)}%, ${_$4.lang.round(K)}%, ${X})`:`hsl(${_$4.lang.round(W)}, ${_$4.lang.round(q)}%, ${_$4.lang.round(K)}%)`}},HSL$1=HSL,Keyword={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:F=>{F=F.toLowerCase();const W=Keyword.colors[F];if(W)return Hex$1.parse(W)},stringify:F=>{const W=Hex$1.stringify(F);for(const q in Keyword.colors)if(Keyword.colors[q]===W)return q}},Keyword$1=Keyword,RGB={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:F=>{const W=F.charCodeAt(0);if(W!==114&&W!==82)return;const q=F.match(RGB.re);if(!q)return;const[,K,X,tt,rt,ot,ut,yn,uo]=q;return ChannelsReusable.set({r:_$4.channel.clamp.r(X?parseFloat(K)*2.55:parseFloat(K)),g:_$4.channel.clamp.g(rt?parseFloat(tt)*2.55:parseFloat(tt)),b:_$4.channel.clamp.b(ut?parseFloat(ot)*2.55:parseFloat(ot)),a:yn?_$4.channel.clamp.a(uo?parseFloat(yn)/100:parseFloat(yn)):1},F)},stringify:F=>{const{r:W,g:q,b:K,a:X}=F;return X<1?`rgba(${_$4.lang.round(W)}, ${_$4.lang.round(q)}, ${_$4.lang.round(K)}, ${_$4.lang.round(X)})`:`rgb(${_$4.lang.round(W)}, ${_$4.lang.round(q)}, ${_$4.lang.round(K)})`}},RGB$1=RGB,Color={format:{keyword:Keyword$1,hex:Hex$1,rgb:RGB$1,rgba:RGB$1,hsl:HSL$1,hsla:HSL$1},parse:F=>{if(typeof F!="string")return F;const W=Hex$1.parse(F)||RGB$1.parse(F)||HSL$1.parse(F)||Keyword$1.parse(F);if(W)return W;throw new Error(`Unsupported color format: "${F}"`)},stringify:F=>!F.changed&&F.color?F.color:F.type.is(TYPE.HSL)||F.data.r===void 0?HSL$1.stringify(F):F.a<1||!Number.isInteger(F.r)||!Number.isInteger(F.g)||!Number.isInteger(F.b)?RGB$1.stringify(F):Hex$1.stringify(F)},Color$1=Color,change=(F,W)=>{const q=Color$1.parse(F);for(const K in W)q[K]=_$4.channel.clamp[K](W[K]);return Color$1.stringify(q)},change$1=change,rgba=(F,W,q=0,K=1)=>{if(typeof F!="number")return change$1(F,{a:W});const X=ChannelsReusable.set({r:_$4.channel.clamp.r(F),g:_$4.channel.clamp.g(W),b:_$4.channel.clamp.b(q),a:_$4.channel.clamp.a(K)});return Color$1.stringify(X)},rgba$1=rgba,luminance=F=>{const{r:W,g:q,b:K}=Color$1.parse(F),X=.2126*_$4.channel.toLinear(W)+.7152*_$4.channel.toLinear(q)+.0722*_$4.channel.toLinear(K);return _$4.lang.round(X)},luminance$1=luminance,isLight=F=>luminance$1(F)>=.5,isLight$1=isLight,isDark=F=>!isLight$1(F),isDark$1=isDark,adjustChannel=(F,W,q)=>{const K=Color$1.parse(F),X=K[W],tt=_$4.channel.clamp[W](X+q);return X!==tt&&(K[W]=tt),Color$1.stringify(K)},adjustChannel$1=adjustChannel,lighten=(F,W)=>adjustChannel$1(F,"l",W),lighten$1=lighten,darken=(F,W)=>adjustChannel$1(F,"l",-W),darken$1=darken,adjust=(F,W)=>{const q=Color$1.parse(F),K={};for(const X in W)W[X]&&(K[X]=q[X]+W[X]);return change$1(F,K)},adjust$1=adjust,mix=(F,W,q=50)=>{const{r:K,g:X,b:tt,a:rt}=Color$1.parse(F),{r:ot,g:ut,b:yn,a:uo}=Color$1.parse(W),po=q/100,mo=po*2-1,wo=rt-uo,yf=((mo*wo===-1?mo:(mo+wo)/(1+mo*wo))+1)/2,cf=1-yf,vf=K*yf+ot*cf,_f=X*yf+ut*cf,$f=tt*yf+yn*cf,wf=rt*po+uo*(1-po);return rgba$1(vf,_f,$f,wf)},mix$1=mix,invert=(F,W=100)=>{const q=Color$1.parse(F);return q.r=255-q.r,q.g=255-q.g,q.b=255-q.b,mix$1(q,F,W)},invert$1=invert;var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;const freeGlobal$1=freeGlobal;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal$1||freeSelf||Function("return this")();const root$1=root;var Symbol$6=root$1.Symbol;const Symbol$7=Symbol$6;var objectProto$c=Object.prototype,hasOwnProperty$d=objectProto$c.hasOwnProperty,nativeObjectToString$1=objectProto$c.toString,symToStringTag$1=Symbol$7?Symbol$7.toStringTag:void 0;function getRawTag(F){var W=hasOwnProperty$d.call(F,symToStringTag$1),q=F[symToStringTag$1];try{F[symToStringTag$1]=void 0;var K=!0}catch{}var X=nativeObjectToString$1.call(F);return K&&(W?F[symToStringTag$1]=q:delete F[symToStringTag$1]),X}var objectProto$b=Object.prototype,nativeObjectToString=objectProto$b.toString;function objectToString$3(F){return nativeObjectToString.call(F)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$7?Symbol$7.toStringTag:void 0;function baseGetTag(F){return F==null?F===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(F)?getRawTag(F):objectToString$3(F)}function isObject$n(F){var W=typeof F;return F!=null&&(W=="object"||W=="function")}var asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$1(F){if(!isObject$n(F))return!1;var W=baseGetTag(F);return W==funcTag$1||W==genTag||W==asyncTag||W==proxyTag}var coreJsData=root$1["__core-js_shared__"];const coreJsData$1=coreJsData;var maskSrcKey=function(){var F=/[^.]+$/.exec(coreJsData$1&&coreJsData$1.keys&&coreJsData$1.keys.IE_PROTO||"");return F?"Symbol(src)_1."+F:""}();function isMasked(F){return!!maskSrcKey&&maskSrcKey in F}var funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource(F){if(F!=null){try{return funcToString$2.call(F)}catch{}try{return F+""}catch{}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$a=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$c=objectProto$a.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$c).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(F){if(!isObject$n(F)||isMasked(F))return!1;var W=isFunction$1(F)?reIsNative:reIsHostCtor;return W.test(toSource(F))}function getValue(F,W){return F==null?void 0:F[W]}function getNative(F,W){var q=getValue(F,W);return baseIsNative(q)?q:void 0}var nativeCreate=getNative(Object,"create");const nativeCreate$1=nativeCreate;function hashClear(){this.__data__=nativeCreate$1?nativeCreate$1(null):{},this.size=0}function hashDelete(F){var W=this.has(F)&&delete this.__data__[F];return this.size-=W?1:0,W}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$9=Object.prototype,hasOwnProperty$b=objectProto$9.hasOwnProperty;function hashGet(F){var W=this.__data__;if(nativeCreate$1){var q=W[F];return q===HASH_UNDEFINED$1?void 0:q}return hasOwnProperty$b.call(W,F)?W[F]:void 0}var objectProto$8=Object.prototype,hasOwnProperty$a=objectProto$8.hasOwnProperty;function hashHas(F){var W=this.__data__;return nativeCreate$1?W[F]!==void 0:hasOwnProperty$a.call(W,F)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(F,W){var q=this.__data__;return this.size+=this.has(F)?0:1,q[F]=nativeCreate$1&&W===void 0?HASH_UNDEFINED:W,this}function Hash(F){var W=-1,q=F==null?0:F.length;for(this.clear();++W-1}function listCacheSet(F,W){var q=this.__data__,K=assocIndexOf(q,F);return K<0?(++this.size,q.push([F,W])):q[K][1]=W,this}function ListCache(F){var W=-1,q=F==null?0:F.length;for(this.clear();++W-1&&F%1==0&&F<=MAX_SAFE_INTEGER$4}function isArrayLike(F){return F!=null&&isLength(F.length)&&!isFunction$1(F)}function isArrayLikeObject(F){return isObjectLike(F)&&isArrayLike(F)}function stubFalse(){return!1}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,Buffer=moduleExports$1?root$1.Buffer:void 0,nativeIsBuffer=Buffer?Buffer.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse;const isBuffer$1=isBuffer;var objectTag$2="[object Object]",funcProto=Function.prototype,objectProto$5=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$8=objectProto$5.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject(F){if(!isObjectLike(F)||baseGetTag(F)!=objectTag$2)return!1;var W=getPrototype$1(F);if(W===null)return!0;var q=hasOwnProperty$8.call(W,"constructor")&&W.constructor;return typeof q=="function"&&q instanceof q&&funcToString.call(q)==objectCtorString}var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$2="[object Map]",numberTag="[object Number]",objectTag$1="[object Object]",regexpTag="[object RegExp]",setTag$2="[object Set]",stringTag="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$2]=typedArrayTags[numberTag]=typedArrayTags[objectTag$1]=typedArrayTags[regexpTag]=typedArrayTags[setTag$2]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag$1]=!1;function baseIsTypedArray(F){return isObjectLike(F)&&isLength(F.length)&&!!typedArrayTags[baseGetTag(F)]}function baseUnary(F){return function(W){return F(W)}}var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,freeProcess=moduleExports&&freeGlobal$1.process,nodeUtil=function(){try{var F=freeModule&&freeModule.require&&freeModule.require("util").types;return F||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}}();const nodeUtil$1=nodeUtil;var nodeIsTypedArray=nodeUtil$1&&nodeUtil$1.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;const isTypedArray$1=isTypedArray;function safeGet(F,W){if(!(W==="constructor"&&typeof F[W]=="function")&&W!="__proto__")return F[W]}var objectProto$4=Object.prototype,hasOwnProperty$7=objectProto$4.hasOwnProperty;function assignValue(F,W,q){var K=F[W];(!(hasOwnProperty$7.call(F,W)&&eq(K,q))||q===void 0&&!(W in F))&&baseAssignValue(F,W,q)}function copyObject(F,W,q,K){var X=!q;q||(q={});for(var tt=-1,rt=W.length;++tt-1&&F%1==0&&F0){if(++W>=HOT_COUNT)return arguments[0]}else W=0;return F.apply(void 0,arguments)}}var setToString=shortOut(baseSetToString$1);const setToString$1=setToString;function baseRest(F,W){return setToString$1(overRest(F,W,identity),F+"")}function isIterateeCall(F,W,q){if(!isObject$n(q))return!1;var K=typeof W;return(K=="number"?isArrayLike(q)&&isIndex(W,q.length):K=="string"&&W in q)?eq(q[W],F):!1}function createAssigner(F){return baseRest(function(W,q){var K=-1,X=q.length,tt=X>1?q[X-1]:void 0,rt=X>2?q[2]:void 0;for(tt=F.length>3&&typeof tt=="function"?(X--,tt):void 0,rt&&isIterateeCall(q[0],q[1],rt)&&(tt=X<3?void 0:tt,X=1),W=Object(W);++K0?charat(characters,--position):0,column--,character===10&&(column=1,line--),character}function next$1(){return character=position2||token$2(character)>3?"":" "}function escaping(F,W){for(;--W&&next$1()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice$9(F,caret()+(W<6&&peek()==32&&next$1()==32))}function delimiter(F){for(;next$1();)switch(character){case F:return position;case 34:case 39:F!==34&&F!==39&&delimiter(character);break;case 40:F===41&&delimiter(F);break;case 92:next$1();break}return position}function commenter(F,W){for(;next$1()&&F+character!==47+10;)if(F+character===42+42&&peek()===47)break;return"/*"+slice$9(W,position-1)+"*"+from$a(F===47?F:next$1())}function identifier(F){for(;!token$2(peek());)next$1();return slice$9(F,position)}function compile(F){return dealloc(parse$2("",null,null,null,[""],F=alloc(F),0,[0],F))}function parse$2(F,W,q,K,X,tt,rt,ot,ut){for(var yn=0,uo=0,po=rt,mo=0,wo=0,lf=0,yf=1,cf=1,vf=1,_f=0,$f="",wf=X,Pf=tt,Cf=K,Af=$f;cf;)switch(lf=_f,_f=next$1()){case 40:if(lf!=108&&charat(Af,po-1)==58){indexof(Af+=replace$4(delimit(_f),"&","&\f"),"&\f")!=-1&&(vf=-1);break}case 34:case 39:case 91:Af+=delimit(_f);break;case 9:case 10:case 13:case 32:Af+=whitespace(lf);break;case 92:Af+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next$1(),caret()),W,q),ut);break;default:Af+="/"}break;case 123*yf:ot[yn++]=strlen(Af)*vf;case 125*yf:case 59:case 0:switch(_f){case 0:case 125:cf=0;case 59+uo:vf==-1&&(Af=replace$4(Af,/\f/g,"")),wo>0&&strlen(Af)-po&&append(wo>32?declaration(Af+";",K,q,po-1):declaration(replace$4(Af," ","")+";",K,q,po-2),ut);break;case 59:Af+=";";default:if(append(Cf=ruleset(Af,W,q,yn,uo,X,ot,$f,wf=[],Pf=[],po),tt),_f===123)if(uo===0)parse$2(Af,W,Cf,Cf,wf,tt,po,ot,Pf);else switch(mo===99&&charat(Af,3)===110?100:mo){case 100:case 108:case 109:case 115:parse$2(F,Cf,Cf,K&&append(ruleset(F,Cf,Cf,0,0,X,ot,$f,X,wf=[],po),Pf),X,Pf,po,ot,K?wf:Pf);break;default:parse$2(Af,Cf,Cf,Cf,[""],Pf,0,ot,Pf)}}yn=uo=wo=0,yf=vf=1,$f=Af="",po=rt;break;case 58:po=1+strlen(Af),wo=lf;default:if(yf<1){if(_f==123)--yf;else if(_f==125&&yf++==0&&prev()==125)continue}switch(Af+=from$a(_f),_f*yf){case 38:vf=uo>0?1:(Af+="\f",-1);break;case 44:ot[yn++]=(strlen(Af)-1)*vf,vf=1;break;case 64:peek()===45&&(Af+=delimit(next$1())),mo=peek(),uo=po=strlen($f=Af+=identifier(caret())),_f++;break;case 45:lf===45&&strlen(Af)==2&&(yf=0)}}return tt}function ruleset(F,W,q,K,X,tt,rt,ot,ut,yn,uo){for(var po=X-1,mo=X===0?tt:[""],wo=sizeof(mo),lf=0,yf=0,cf=0;lf0?mo[vf]+" "+_f:replace$4(_f,/&\f/g,mo[vf])))&&(ut[cf++]=$f);return node$1(F,W,q,X===0?RULESET:ot,ut,yn,uo)}function comment(F,W,q){return node$1(F,W,q,COMMENT,from$a(char()),substr(F,2,-2),0)}function declaration(F,W,q,K){return node$1(F,W,q,DECLARATION,substr(F,0,K),substr(F,K+1,-1),K)}function serialize(F,W){for(var q="",K=sizeof(F),X=0;X{},debug:(...F)=>{},info:(...F)=>{},warn:(...F)=>{},error:(...F)=>{},fatal:(...F)=>{}},setLogLevel$1=function(F="fatal"){let W=LEVELS.fatal;typeof F=="string"?(F=F.toLowerCase(),F in LEVELS&&(W=LEVELS[F])):typeof F=="number"&&(W=F),log$1.trace=()=>{},log$1.debug=()=>{},log$1.info=()=>{},log$1.warn=()=>{},log$1.error=()=>{},log$1.fatal=()=>{},W<=LEVELS.fatal&&(log$1.fatal=console.error?console.error.bind(console,format$1("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",format$1("FATAL"))),W<=LEVELS.error&&(log$1.error=console.error?console.error.bind(console,format$1("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",format$1("ERROR"))),W<=LEVELS.warn&&(log$1.warn=console.warn?console.warn.bind(console,format$1("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",format$1("WARN"))),W<=LEVELS.info&&(log$1.info=console.info?console.info.bind(console,format$1("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",format$1("INFO"))),W<=LEVELS.debug&&(log$1.debug=console.debug?console.debug.bind(console,format$1("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",format$1("DEBUG"))),W<=LEVELS.trace&&(log$1.trace=console.debug?console.debug.bind(console,format$1("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",format$1("TRACE")))},format$1=F=>`%c${dayjs().format("ss.SSS")} : ${F} : `,lineBreakRegex=//gi,getRows=F=>F?breakToPlaceholder(F).replace(/\\n/g,"#br#").split("#br#"):[""],setupDompurifyHooksIfNotSetup=(()=>{let F=!1;return()=>{F||(setupDompurifyHooks(),F=!0)}})();function setupDompurifyHooks(){const F="data-temp-href-target";purify.addHook("beforeSanitizeAttributes",W=>{W.tagName==="A"&&W.hasAttribute("target")&&W.setAttribute(F,W.getAttribute("target")||"")}),purify.addHook("afterSanitizeAttributes",W=>{W.tagName==="A"&&W.hasAttribute(F)&&(W.setAttribute("target",W.getAttribute(F)||""),W.removeAttribute(F),W.getAttribute("target")==="_blank"&&W.setAttribute("rel","noopener"))})}const removeScript=F=>(setupDompurifyHooksIfNotSetup(),purify.sanitize(F)),sanitizeMore=(F,W)=>{var q;if(((q=W.flowchart)==null?void 0:q.htmlLabels)!==!1){const K=W.securityLevel;K==="antiscript"||K==="strict"?F=removeScript(F):K!=="loose"&&(F=breakToPlaceholder(F),F=F.replace(//g,">"),F=F.replace(/=/g,"="),F=placeholderToBreak(F))}return F},sanitizeText$2=(F,W)=>F&&(W.dompurifyConfig?F=purify.sanitize(sanitizeMore(F,W),W.dompurifyConfig).toString():F=purify.sanitize(sanitizeMore(F,W),{FORBID_TAGS:["style"]}).toString(),F),sanitizeTextOrArray=(F,W)=>typeof F=="string"?sanitizeText$2(F,W):F.flat().map(q=>sanitizeText$2(q,W)),hasBreaks=F=>lineBreakRegex.test(F),splitBreaks=F=>F.split(lineBreakRegex),placeholderToBreak=F=>F.replace(/#br#/g,"
"),breakToPlaceholder=F=>F.replace(lineBreakRegex,"#br#"),getUrl=F=>{let W="";return F&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replaceAll(/\(/g,"\\("),W=W.replaceAll(/\)/g,"\\)")),W},evaluate=F=>!(F===!1||["false","null","0"].includes(String(F).trim().toLowerCase())),getMax=function(...F){const W=F.filter(q=>!isNaN(q));return Math.max(...W)},getMin=function(...F){const W=F.filter(q=>!isNaN(q));return Math.min(...W)},parseGenericTypes=function(F){const W=F.split(/(,)/),q=[];for(let K=0;K0&&K+1Math.max(0,F.split(W).length-1),shouldCombineSets=(F,W)=>{const q=countOccurrence(F,"~"),K=countOccurrence(W,"~");return q===1&&K===1},processSet=F=>{const W=countOccurrence(F,"~");let q=!1;if(W<=1)return F;W%2!==0&&F.startsWith("~")&&(F=F.substring(1),q=!0);const K=[...F];let X=K.indexOf("~"),tt=K.lastIndexOf("~");for(;X!==-1&&tt!==-1&&X!==tt;)K[X]="<",K[tt]=">",X=K.indexOf("~"),tt=K.lastIndexOf("~");return q&&K.unshift("~"),K.join("")},isMathMLSupported=()=>window.MathMLElement!==void 0,katexRegex=/\$\$(.*)\$\$/g,hasKatex=F=>{var W;return(((W=F.match(katexRegex))==null?void 0:W.length)??0)>0},calculateMathMLDimensions=async(F,W)=>{F=await renderKatex(F,W);const q=document.createElement("div");q.innerHTML=F,q.id="katex-temp",q.style.visibility="hidden",q.style.position="absolute",q.style.top="0";const K=document.querySelector("body");K==null||K.insertAdjacentElement("beforeend",q);const X={width:q.clientWidth,height:q.clientHeight};return q.remove(),X},renderKatex=async(F,W)=>{if(!hasKatex(F))return F;if(!isMathMLSupported()&&!W.legacyMathML)return F.replace(katexRegex,"MathML is unsupported in this environment.");const{default:q}=await __vitePreload(()=>import("./katex-3eb4982e.js"),[]);return F.split(lineBreakRegex).map(K=>hasKatex(K)?` +`)),rt+=po+K[ut+1]}),rt}var dayjs_min={exports:{}};(function(F,W){(function(q,K){F.exports=K()})(commonjsGlobal$3,function(){var q=1e3,K=6e4,X=36e5,tt="millisecond",rt="second",ot="minute",ut="hour",yn="day",uo="week",po="month",mo="quarter",wo="year",lf="date",yf="Invalid Date",cf=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,vf=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Yf){var Gf=["th","st","nd","rd"],rp=Yf%100;return"["+Yf+(Gf[(rp-20)%10]||Gf[rp]||Gf[0])+"]"}},$f=function(Yf,Gf,rp){var ip=String(Yf);return!ip||ip.length>=Gf?Yf:""+Array(Gf+1-ip.length).join(rp)+Yf},xf={s:$f,z:function(Yf){var Gf=-Yf.utcOffset(),rp=Math.abs(Gf),ip=Math.floor(rp/60),ap=rp%60;return(Gf<=0?"+":"-")+$f(ip,2,"0")+":"+$f(ap,2,"0")},m:function Yf(Gf,rp){if(Gf.date()1)return Yf(vp[0])}else{var Np=Gf.name;Cf[Np]=Gf,ap=Np}return!ip&&ap&&(Af=ap),ap||!ip&&Af},Df=function(Yf,Gf){if(Bf(Yf))return Yf.clone();var rp=typeof Gf=="object"?Gf:{};return rp.date=Yf,rp.args=arguments,new kf(rp)},Lf=xf;Lf.l=Hf,Lf.i=Bf,Lf.w=function(Yf,Gf){return Df(Yf,{locale:Gf.$L,utc:Gf.$u,x:Gf.$x,$offset:Gf.$offset})};var kf=function(){function Yf(rp){this.$L=Hf(rp.locale,null,!0),this.parse(rp),this.$x=this.$x||rp.x||{},this[Pf]=!0}var Gf=Yf.prototype;return Gf.parse=function(rp){this.$d=function(ip){var ap=ip.date,yp=ip.utc;if(ap===null)return new Date(NaN);if(Lf.u(ap))return new Date;if(ap instanceof Date)return new Date(ap);if(typeof ap=="string"&&!/Z$/i.test(ap)){var vp=ap.match(cf);if(vp){var Np=vp[2]-1||0,jp=(vp[7]||"0").substring(0,3);return yp?new Date(Date.UTC(vp[1],Np,vp[3]||1,vp[4]||0,vp[5]||0,vp[6]||0,jp)):new Date(vp[1],Np,vp[3]||1,vp[4]||0,vp[5]||0,vp[6]||0,jp)}}return new Date(ap)}(rp),this.init()},Gf.init=function(){var rp=this.$d;this.$y=rp.getFullYear(),this.$M=rp.getMonth(),this.$D=rp.getDate(),this.$W=rp.getDay(),this.$H=rp.getHours(),this.$m=rp.getMinutes(),this.$s=rp.getSeconds(),this.$ms=rp.getMilliseconds()},Gf.$utils=function(){return Lf},Gf.isValid=function(){return this.$d.toString()!==yf},Gf.isSame=function(rp,ip){var ap=Df(rp);return this.startOf(ip)<=ap&&ap<=this.endOf(ip)},Gf.isAfter=function(rp,ip){return Df(rp)-1}function ut(uo){var po=uo.replace(X,"");return po.replace(q,function(mo,wo){return String.fromCharCode(wo)})}function yn(uo){if(!uo)return F.BLANK_URL;var po=ut(uo).replace(K,"").replace(X,"").trim();if(!po)return F.BLANK_URL;if(ot(po))return po;var mo=po.match(tt);if(!mo)return po;var wo=mo[0];return W.test(wo)?F.BLANK_URL:po}F.sanitizeUrl=yn})(dist$2);var noop$4={value:()=>{}};function dispatch(){for(var F=0,W=arguments.length,q={},K;F=0&&(K=q.slice(X+1),q=q.slice(0,X)),q&&!W.hasOwnProperty(q))throw new Error("unknown type: "+q);return{type:q,name:K}})}Dispatch$1.prototype=dispatch.prototype={constructor:Dispatch$1,on:function(F,W){var q=this._,K=parseTypenames$1(F+"",q),X,tt=-1,rt=K.length;if(arguments.length<2){for(;++tt0)for(var q=new Array(X),K=0,X,tt;K=0&&(W=F.slice(0,q))!=="xmlns"&&(F=F.slice(q+1)),namespaces.hasOwnProperty(W)?{space:namespaces[W],local:F}:F}function creatorInherit(F){return function(){var W=this.ownerDocument,q=this.namespaceURI;return q===xhtml&&W.documentElement.namespaceURI===xhtml?W.createElement(F):W.createElementNS(q,F)}}function creatorFixed(F){return function(){return this.ownerDocument.createElementNS(F.space,F.local)}}function creator(F){var W=namespace(F);return(W.local?creatorFixed:creatorInherit)(W)}function none(){}function selector(F){return F==null?none:function(){return this.querySelector(F)}}function selection_select(F){typeof F!="function"&&(F=selector(F));for(var W=this._groups,q=W.length,K=new Array(q),X=0;X=$f&&($f=_f+1);!(Af=cf[$f])&&++$f=0;)(rt=K[X])&&(tt&&rt.compareDocumentPosition(tt)^4&&tt.parentNode.insertBefore(rt,tt),tt=rt);return this}function selection_sort(F){F||(F=ascending);function W(po,mo){return po&&mo?F(po.__data__,mo.__data__):!po-!mo}for(var q=this._groups,K=q.length,X=new Array(K),tt=0;ttW?1:F>=W?0:NaN}function selection_call(){var F=arguments[0];return arguments[0]=this,F.apply(null,arguments),this}function selection_nodes(){return Array.from(this)}function selection_node(){for(var F=this._groups,W=0,q=F.length;W1?this.each((W==null?styleRemove$1:typeof W=="function"?styleFunction$1:styleConstant$1)(F,W,q??"")):styleValue(this.node(),F)}function styleValue(F,W){return F.style.getPropertyValue(W)||defaultView(F).getComputedStyle(F,null).getPropertyValue(W)}function propertyRemove(F){return function(){delete this[F]}}function propertyConstant(F,W){return function(){this[F]=W}}function propertyFunction(F,W){return function(){var q=W.apply(this,arguments);q==null?delete this[F]:this[F]=q}}function selection_property(F,W){return arguments.length>1?this.each((W==null?propertyRemove:typeof W=="function"?propertyFunction:propertyConstant)(F,W)):this.node()[F]}function classArray(F){return F.trim().split(/^|\s+/)}function classList(F){return F.classList||new ClassList(F)}function ClassList(F){this._node=F,this._names=classArray(F.getAttribute("class")||"")}ClassList.prototype={add:function(F){var W=this._names.indexOf(F);W<0&&(this._names.push(F),this._node.setAttribute("class",this._names.join(" ")))},remove:function(F){var W=this._names.indexOf(F);W>=0&&(this._names.splice(W,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(F){return this._names.indexOf(F)>=0}};function classedAdd(F,W){for(var q=classList(F),K=-1,X=W.length;++K=0&&(q=W.slice(K+1),W=W.slice(0,K)),{type:W,name:q}})}function onRemove(F){return function(){var W=this.__on;if(W){for(var q=0,K=-1,X=W.length,tt;q>8&15|W>>4&240,W>>4&15|W&240,(W&15)<<4|W&15,1):q===8?rgba$2(W>>24&255,W>>16&255,W>>8&255,(W&255)/255):q===4?rgba$2(W>>12&15|W>>8&240,W>>8&15|W>>4&240,W>>4&15|W&240,((W&15)<<4|W&15)/255):null):(W=reRgbInteger.exec(F))?new Rgb(W[1],W[2],W[3],1):(W=reRgbPercent.exec(F))?new Rgb(W[1]*255/100,W[2]*255/100,W[3]*255/100,1):(W=reRgbaInteger.exec(F))?rgba$2(W[1],W[2],W[3],W[4]):(W=reRgbaPercent.exec(F))?rgba$2(W[1]*255/100,W[2]*255/100,W[3]*255/100,W[4]):(W=reHslPercent.exec(F))?hsla(W[1],W[2]/100,W[3]/100,1):(W=reHslaPercent.exec(F))?hsla(W[1],W[2]/100,W[3]/100,W[4]):named.hasOwnProperty(F)?rgbn(named[F]):F==="transparent"?new Rgb(NaN,NaN,NaN,0):null}function rgbn(F){return new Rgb(F>>16&255,F>>8&255,F&255,1)}function rgba$2(F,W,q,K){return K<=0&&(F=W=q=NaN),new Rgb(F,W,q,K)}function rgbConvert(F){return F instanceof Color$2||(F=color(F)),F?(F=F.rgb(),new Rgb(F.r,F.g,F.b,F.opacity)):new Rgb}function rgb(F,W,q,K){return arguments.length===1?rgbConvert(F):new Rgb(F,W,q,K??1)}function Rgb(F,W,q,K){this.r=+F,this.g=+W,this.b=+q,this.opacity=+K}define$1(Rgb,rgb,extend$6(Color$2,{brighter(F){return F=F==null?brighter:Math.pow(brighter,F),new Rgb(this.r*F,this.g*F,this.b*F,this.opacity)},darker(F){return F=F==null?darker:Math.pow(darker,F),new Rgb(this.r*F,this.g*F,this.b*F,this.opacity)},rgb(){return this},clamp(){return new Rgb(clampi(this.r),clampi(this.g),clampi(this.b),clampa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rgb_formatHex,formatHex:rgb_formatHex,formatHex8:rgb_formatHex8,formatRgb:rgb_formatRgb,toString:rgb_formatRgb}));function rgb_formatHex(){return`#${hex$2(this.r)}${hex$2(this.g)}${hex$2(this.b)}`}function rgb_formatHex8(){return`#${hex$2(this.r)}${hex$2(this.g)}${hex$2(this.b)}${hex$2((isNaN(this.opacity)?1:this.opacity)*255)}`}function rgb_formatRgb(){const F=clampa(this.opacity);return`${F===1?"rgb(":"rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${F===1?")":`, ${F})`}`}function clampa(F){return isNaN(F)?1:Math.max(0,Math.min(1,F))}function clampi(F){return Math.max(0,Math.min(255,Math.round(F)||0))}function hex$2(F){return F=clampi(F),(F<16?"0":"")+F.toString(16)}function hsla(F,W,q,K){return K<=0?F=W=q=NaN:q<=0||q>=1?F=W=NaN:W<=0&&(F=NaN),new Hsl(F,W,q,K)}function hslConvert(F){if(F instanceof Hsl)return new Hsl(F.h,F.s,F.l,F.opacity);if(F instanceof Color$2||(F=color(F)),!F)return new Hsl;if(F instanceof Hsl)return F;F=F.rgb();var W=F.r/255,q=F.g/255,K=F.b/255,X=Math.min(W,q,K),tt=Math.max(W,q,K),rt=NaN,ot=tt-X,ut=(tt+X)/2;return ot?(W===tt?rt=(q-K)/ot+(q0&&ut<1?0:rt,new Hsl(rt,ot,ut,F.opacity)}function hsl(F,W,q,K){return arguments.length===1?hslConvert(F):new Hsl(F,W,q,K??1)}function Hsl(F,W,q,K){this.h=+F,this.s=+W,this.l=+q,this.opacity=+K}define$1(Hsl,hsl,extend$6(Color$2,{brighter(F){return F=F==null?brighter:Math.pow(brighter,F),new Hsl(this.h,this.s,this.l*F,this.opacity)},darker(F){return F=F==null?darker:Math.pow(darker,F),new Hsl(this.h,this.s,this.l*F,this.opacity)},rgb(){var F=this.h%360+(this.h<0)*360,W=isNaN(F)||isNaN(this.s)?0:this.s,q=this.l,K=q+(q<.5?q:1-q)*W,X=2*q-K;return new Rgb(hsl2rgb(F>=240?F-240:F+120,X,K),hsl2rgb(F,X,K),hsl2rgb(F<120?F+240:F-120,X,K),this.opacity)},clamp(){return new Hsl(clamph(this.h),clampt(this.s),clampt(this.l),clampa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const F=clampa(this.opacity);return`${F===1?"hsl(":"hsla("}${clamph(this.h)}, ${clampt(this.s)*100}%, ${clampt(this.l)*100}%${F===1?")":`, ${F})`}`}}));function clamph(F){return F=(F||0)%360,F<0?F+360:F}function clampt(F){return Math.max(0,Math.min(1,F||0))}function hsl2rgb(F,W,q){return(F<60?W+(q-W)*F/60:F<180?q:F<240?W+(q-W)*(240-F)/60:W)*255}const constant$1=F=>()=>F;function linear(F,W){return function(q){return F+q*W}}function exponential(F,W,q){return F=Math.pow(F,q),W=Math.pow(W,q)-F,q=1/q,function(K){return Math.pow(F+K*W,q)}}function hue(F,W){var q=W-F;return q?linear(F,q>180||q<-180?q-360*Math.round(q/360):q):constant$1(isNaN(F)?W:F)}function gamma(F){return(F=+F)==1?nogamma:function(W,q){return q-W?exponential(W,q,F):constant$1(isNaN(W)?q:W)}}function nogamma(F,W){var q=W-F;return q?linear(F,q):constant$1(isNaN(F)?W:F)}const interpolateRgb=function F(W){var q=gamma(W);function K(X,tt){var rt=q((X=rgb(X)).r,(tt=rgb(tt)).r),ot=q(X.g,tt.g),ut=q(X.b,tt.b),yn=nogamma(X.opacity,tt.opacity);return function(uo){return X.r=rt(uo),X.g=ot(uo),X.b=ut(uo),X.opacity=yn(uo),X+""}}return K.gamma=F,K}(1);function interpolateNumber(F,W){return F=+F,W=+W,function(q){return F*(1-q)+W*q}}var reA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,reB=new RegExp(reA.source,"g");function zero(F){return function(){return F}}function one(F){return function(W){return F(W)+""}}function interpolateString(F,W){var q=reA.lastIndex=reB.lastIndex=0,K,X,tt,rt=-1,ot=[],ut=[];for(F=F+"",W=W+"";(K=reA.exec(F))&&(X=reB.exec(W));)(tt=X.index)>q&&(tt=W.slice(q,tt),ot[rt]?ot[rt]+=tt:ot[++rt]=tt),(K=K[0])===(X=X[0])?ot[rt]?ot[rt]+=X:ot[++rt]=X:(ot[++rt]=null,ut.push({i:rt,x:interpolateNumber(K,X)})),q=reB.lastIndex;return q180?uo+=360:uo-yn>180&&(yn+=360),mo.push({i:po.push(X(po)+"rotate(",null,K)-2,x:interpolateNumber(yn,uo)})):uo&&po.push(X(po)+"rotate("+uo+K)}function ot(yn,uo,po,mo){yn!==uo?mo.push({i:po.push(X(po)+"skewX(",null,K)-2,x:interpolateNumber(yn,uo)}):uo&&po.push(X(po)+"skewX("+uo+K)}function ut(yn,uo,po,mo,wo,lf){if(yn!==po||uo!==mo){var yf=wo.push(X(wo)+"scale(",null,",",null,")");lf.push({i:yf-4,x:interpolateNumber(yn,po)},{i:yf-2,x:interpolateNumber(uo,mo)})}else(po!==1||mo!==1)&&wo.push(X(wo)+"scale("+po+","+mo+")")}return function(yn,uo){var po=[],mo=[];return yn=F(yn),uo=F(uo),tt(yn.translateX,yn.translateY,uo.translateX,uo.translateY,po,mo),rt(yn.rotate,uo.rotate,po,mo),ot(yn.skewX,uo.skewX,po,mo),ut(yn.scaleX,yn.scaleY,uo.scaleX,uo.scaleY,po,mo),yn=uo=null,function(wo){for(var lf=-1,yf=mo.length,cf;++lf=0&&F._call.call(void 0,W),F=F._next;--frame$1}function wake(){clockNow=(clockLast=clock.now())+clockSkew,frame$1=timeout$1=0;try{timerFlush()}finally{frame$1=0,nap(),clockNow=0}}function poke(){var F=clock.now(),W=F-clockLast;W>pokeDelay&&(clockSkew-=W,clockLast=F)}function nap(){for(var F,W=taskHead,q,K=1/0;W;)W._call?(K>W._time&&(K=W._time),F=W,W=W._next):(q=W._next,W._next=null,W=F?F._next=q:taskHead=q);taskTail=F,sleep(K)}function sleep(F){if(!frame$1){timeout$1&&(timeout$1=clearTimeout(timeout$1));var W=F-clockNow;W>24?(F<1/0&&(timeout$1=setTimeout(wake,F-clock.now()-clockSkew)),interval&&(interval=clearInterval(interval))):(interval||(clockLast=clock.now(),interval=setInterval(poke,pokeDelay)),frame$1=1,setFrame(wake))}}function timeout(F,W,q){var K=new Timer;return W=W==null?0:+W,K.restart(X=>{K.stop(),F(X+W)},W,q),K}var emptyOn=dispatch("start","end","cancel","interrupt"),emptyTween=[],CREATED=0,SCHEDULED=1,STARTING=2,STARTED=3,RUNNING=4,ENDING=5,ENDED=6;function schedule(F,W,q,K,X,tt){var rt=F.__transition;if(!rt)F.__transition={};else if(q in rt)return;create$e(F,q,{name:W,index:K,group:X,on:emptyOn,tween:emptyTween,time:tt.time,delay:tt.delay,duration:tt.duration,ease:tt.ease,timer:null,state:CREATED})}function init$1(F,W){var q=get$a(F,W);if(q.state>CREATED)throw new Error("too late; already scheduled");return q}function set$8(F,W){var q=get$a(F,W);if(q.state>STARTED)throw new Error("too late; already running");return q}function get$a(F,W){var q=F.__transition;if(!q||!(q=q[W]))throw new Error("transition not found");return q}function create$e(F,W,q){var K=F.__transition,X;K[W]=q,q.timer=timer(tt,0,q.time);function tt(yn){q.state=SCHEDULED,q.timer.restart(rt,q.delay,q.time),q.delay<=yn&&rt(yn-q.delay)}function rt(yn){var uo,po,mo,wo;if(q.state!==SCHEDULED)return ut();for(uo in K)if(wo=K[uo],wo.name===q.name){if(wo.state===STARTED)return timeout(rt);wo.state===RUNNING?(wo.state=ENDED,wo.timer.stop(),wo.on.call("interrupt",F,F.__data__,wo.index,wo.group),delete K[uo]):+uoSTARTING&&K.state=0&&(W=W.slice(0,q)),!W||W==="start"})}function onFunction(F,W,q){var K,X,tt=start(W)?init$1:set$8;return function(){var rt=tt(this,F),ot=rt.on;ot!==K&&(X=(K=ot).copy()).on(W,q),rt.on=X}}function transition_on(F,W){var q=this._id;return arguments.length<2?get$a(this.node(),q).on.on(F):this.each(onFunction(q,F,W))}function removeFunction(F){return function(){var W=this.parentNode;for(var q in this.__transition)if(+q!==F)return;W&&W.removeChild(this)}}function transition_remove(){return this.on("end.remove",removeFunction(this._id))}function transition_select(F){var W=this._name,q=this._id;typeof F!="function"&&(F=selector(F));for(var K=this._groups,X=K.length,tt=new Array(X),rt=0;rt1?0:F<-1?pi:Math.acos(F)}function asin(F){return F>=1?halfPi:F<=-1?-halfPi:Math.asin(F)}function Linear(F){this._context=F}Linear.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1,this._line?this._context.lineTo(F,W):this._context.moveTo(F,W);break;case 1:this._point=2;default:this._context.lineTo(F,W);break}}};function curveLinear(F){return new Linear(F)}class Bump{constructor(W,q){this._context=W,this._x=q}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(W,q){switch(W=+W,q=+q,this._point){case 0:{this._point=1,this._line?this._context.lineTo(W,q):this._context.moveTo(W,q);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+W)/2,this._y0,this._x0,q,W,q):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+q)/2,W,this._y0,W,q);break}}this._x0=W,this._y0=q}}function bumpX(F){return new Bump(F,!0)}function bumpY(F){return new Bump(F,!1)}function noop$3(){}function point$3(F,W,q){F._context.bezierCurveTo((2*F._x0+F._x1)/3,(2*F._y0+F._y1)/3,(F._x0+2*F._x1)/3,(F._y0+2*F._y1)/3,(F._x0+4*F._x1+W)/6,(F._y0+4*F._y1+q)/6)}function Basis(F){this._context=F}Basis.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:point$3(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1,this._line?this._context.lineTo(F,W):this._context.moveTo(F,W);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:point$3(this,F,W);break}this._x0=this._x1,this._x1=F,this._y0=this._y1,this._y1=W}};function curveBasis(F){return new Basis(F)}function BasisClosed(F){this._context=F}BasisClosed.prototype={areaStart:noop$3,areaEnd:noop$3,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1,this._x2=F,this._y2=W;break;case 1:this._point=2,this._x3=F,this._y3=W;break;case 2:this._point=3,this._x4=F,this._y4=W,this._context.moveTo((this._x0+4*this._x1+F)/6,(this._y0+4*this._y1+W)/6);break;default:point$3(this,F,W);break}this._x0=this._x1,this._x1=F,this._y0=this._y1,this._y1=W}};function curveBasisClosed(F){return new BasisClosed(F)}function BasisOpen(F){this._context=F}BasisOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var q=(this._x0+4*this._x1+F)/6,K=(this._y0+4*this._y1+W)/6;this._line?this._context.lineTo(q,K):this._context.moveTo(q,K);break;case 3:this._point=4;default:point$3(this,F,W);break}this._x0=this._x1,this._x1=F,this._y0=this._y1,this._y1=W}};function curveBasisOpen(F){return new BasisOpen(F)}function Bundle(F,W){this._basis=new Basis(F),this._beta=W}Bundle.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var F=this._x,W=this._y,q=F.length-1;if(q>0)for(var K=F[0],X=W[0],tt=F[q]-K,rt=W[q]-X,ot=-1,ut;++ot<=q;)ut=ot/q,this._basis.point(this._beta*F[ot]+(1-this._beta)*(K+ut*tt),this._beta*W[ot]+(1-this._beta)*(X+ut*rt));this._x=this._y=null,this._basis.lineEnd()},point:function(F,W){this._x.push(+F),this._y.push(+W)}};const curveBundle=function F(W){function q(K){return W===1?new Basis(K):new Bundle(K,W)}return q.beta=function(K){return F(+K)},q}(.85);function point$2(F,W,q){F._context.bezierCurveTo(F._x1+F._k*(F._x2-F._x0),F._y1+F._k*(F._y2-F._y0),F._x2+F._k*(F._x1-W),F._y2+F._k*(F._y1-q),F._x2,F._y2)}function Cardinal(F,W){this._context=F,this._k=(1-W)/6}Cardinal.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:point$2(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1,this._line?this._context.lineTo(F,W):this._context.moveTo(F,W);break;case 1:this._point=2,this._x1=F,this._y1=W;break;case 2:this._point=3;default:point$2(this,F,W);break}this._x0=this._x1,this._x1=this._x2,this._x2=F,this._y0=this._y1,this._y1=this._y2,this._y2=W}};const curveCardinal=function F(W){function q(K){return new Cardinal(K,W)}return q.tension=function(K){return F(+K)},q}(0);function CardinalClosed(F,W){this._context=F,this._k=(1-W)/6}CardinalClosed.prototype={areaStart:noop$3,areaEnd:noop$3,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1,this._x3=F,this._y3=W;break;case 1:this._point=2,this._context.moveTo(this._x4=F,this._y4=W);break;case 2:this._point=3,this._x5=F,this._y5=W;break;default:point$2(this,F,W);break}this._x0=this._x1,this._x1=this._x2,this._x2=F,this._y0=this._y1,this._y1=this._y2,this._y2=W}};const curveCardinalClosed=function F(W){function q(K){return new CardinalClosed(K,W)}return q.tension=function(K){return F(+K)},q}(0);function CardinalOpen(F,W){this._context=F,this._k=(1-W)/6}CardinalOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:point$2(this,F,W);break}this._x0=this._x1,this._x1=this._x2,this._x2=F,this._y0=this._y1,this._y1=this._y2,this._y2=W}};const curveCardinalOpen=function F(W){function q(K){return new CardinalOpen(K,W)}return q.tension=function(K){return F(+K)},q}(0);function point$1(F,W,q){var K=F._x1,X=F._y1,tt=F._x2,rt=F._y2;if(F._l01_a>epsilon){var ot=2*F._l01_2a+3*F._l01_a*F._l12_a+F._l12_2a,ut=3*F._l01_a*(F._l01_a+F._l12_a);K=(K*ot-F._x0*F._l12_2a+F._x2*F._l01_2a)/ut,X=(X*ot-F._y0*F._l12_2a+F._y2*F._l01_2a)/ut}if(F._l23_a>epsilon){var yn=2*F._l23_2a+3*F._l23_a*F._l12_a+F._l12_2a,uo=3*F._l23_a*(F._l23_a+F._l12_a);tt=(tt*yn+F._x1*F._l23_2a-W*F._l12_2a)/uo,rt=(rt*yn+F._y1*F._l23_2a-q*F._l12_2a)/uo}F._context.bezierCurveTo(K,X,tt,rt,F._x2,F._y2)}function CatmullRom(F,W){this._context=F,this._alpha=W}CatmullRom.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){if(F=+F,W=+W,this._point){var q=this._x2-F,K=this._y2-W;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(q*q+K*K,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(F,W):this._context.moveTo(F,W);break;case 1:this._point=2;break;case 2:this._point=3;default:point$1(this,F,W);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=F,this._y0=this._y1,this._y1=this._y2,this._y2=W}};const curveCatmullRom=function F(W){function q(K){return W?new CatmullRom(K,W):new Cardinal(K,0)}return q.alpha=function(K){return F(+K)},q}(.5);function CatmullRomClosed(F,W){this._context=F,this._alpha=W}CatmullRomClosed.prototype={areaStart:noop$3,areaEnd:noop$3,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(F,W){if(F=+F,W=+W,this._point){var q=this._x2-F,K=this._y2-W;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(q*q+K*K,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=F,this._y3=W;break;case 1:this._point=2,this._context.moveTo(this._x4=F,this._y4=W);break;case 2:this._point=3,this._x5=F,this._y5=W;break;default:point$1(this,F,W);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=F,this._y0=this._y1,this._y1=this._y2,this._y2=W}};const curveCatmullRomClosed=function F(W){function q(K){return W?new CatmullRomClosed(K,W):new CardinalClosed(K,0)}return q.alpha=function(K){return F(+K)},q}(.5);function CatmullRomOpen(F,W){this._context=F,this._alpha=W}CatmullRomOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){if(F=+F,W=+W,this._point){var q=this._x2-F,K=this._y2-W;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(q*q+K*K,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:point$1(this,F,W);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=F,this._y0=this._y1,this._y1=this._y2,this._y2=W}};const curveCatmullRomOpen=function F(W){function q(K){return W?new CatmullRomOpen(K,W):new CardinalOpen(K,0)}return q.alpha=function(K){return F(+K)},q}(.5);function LinearClosed(F){this._context=F}LinearClosed.prototype={areaStart:noop$3,areaEnd:noop$3,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(F,W){F=+F,W=+W,this._point?this._context.lineTo(F,W):(this._point=1,this._context.moveTo(F,W))}};function curveLinearClosed(F){return new LinearClosed(F)}function sign$1(F){return F<0?-1:1}function slope3(F,W,q){var K=F._x1-F._x0,X=W-F._x1,tt=(F._y1-F._y0)/(K||X<0&&-0),rt=(q-F._y1)/(X||K<0&&-0),ot=(tt*X+rt*K)/(K+X);return(sign$1(tt)+sign$1(rt))*Math.min(Math.abs(tt),Math.abs(rt),.5*Math.abs(ot))||0}function slope2(F,W){var q=F._x1-F._x0;return q?(3*(F._y1-F._y0)/q-W)/2:W}function point(F,W,q){var K=F._x0,X=F._y0,tt=F._x1,rt=F._y1,ot=(tt-K)/3;F._context.bezierCurveTo(K+ot,X+ot*W,tt-ot,rt-ot*q,tt,rt)}function MonotoneX(F){this._context=F}MonotoneX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:point(this,this._t0,slope2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(F,W){var q=NaN;if(F=+F,W=+W,!(F===this._x1&&W===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(F,W):this._context.moveTo(F,W);break;case 1:this._point=2;break;case 2:this._point=3,point(this,slope2(this,q=slope3(this,F,W)),q);break;default:point(this,this._t0,q=slope3(this,F,W));break}this._x0=this._x1,this._x1=F,this._y0=this._y1,this._y1=W,this._t0=q}}};function MonotoneY(F){this._context=new ReflectContext(F)}(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(F,W){MonotoneX.prototype.point.call(this,W,F)};function ReflectContext(F){this._context=F}ReflectContext.prototype={moveTo:function(F,W){this._context.moveTo(W,F)},closePath:function(){this._context.closePath()},lineTo:function(F,W){this._context.lineTo(W,F)},bezierCurveTo:function(F,W,q,K,X,tt){this._context.bezierCurveTo(W,F,K,q,tt,X)}};function monotoneX(F){return new MonotoneX(F)}function monotoneY(F){return new MonotoneY(F)}function Natural(F){this._context=F}Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var F=this._x,W=this._y,q=F.length;if(q)if(this._line?this._context.lineTo(F[0],W[0]):this._context.moveTo(F[0],W[0]),q===2)this._context.lineTo(F[1],W[1]);else for(var K=controlPoints(F),X=controlPoints(W),tt=0,rt=1;rt=0;--W)X[W]=(rt[W]-X[W+1])/tt[W];for(tt[q-1]=(F[q]+X[q-1])/2,W=0;W=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(F,W){switch(F=+F,W=+W,this._point){case 0:this._point=1,this._line?this._context.lineTo(F,W):this._context.moveTo(F,W);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,W),this._context.lineTo(F,W);else{var q=this._x*(1-this._t)+F*this._t;this._context.lineTo(q,this._y),this._context.lineTo(q,W)}break}}this._x=F,this._y=W}};function curveStep(F){return new Step(F,.5)}function stepBefore(F){return new Step(F,0)}function stepAfter(F){return new Step(F,1)}function Transform(F,W,q){this.k=F,this.x=W,this.y=q}Transform.prototype={constructor:Transform,scale:function(F){return F===1?this:new Transform(this.k*F,this.x,this.y)},translate:function(F,W){return F===0&W===0?this:new Transform(this.k,this.x+this.k*F,this.y+this.k*W)},apply:function(F){return[F[0]*this.k+this.x,F[1]*this.k+this.y]},applyX:function(F){return F*this.k+this.x},applyY:function(F){return F*this.k+this.y},invert:function(F){return[(F[0]-this.x)/this.k,(F[1]-this.y)/this.k]},invertX:function(F){return(F-this.x)/this.k},invertY:function(F){return(F-this.y)/this.k},rescaleX:function(F){return F.copy().domain(F.range().map(this.invertX,this).map(F.invert,F))},rescaleY:function(F){return F.copy().domain(F.range().map(this.invertY,this).map(F.invert,F))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Transform.prototype;/*! @license DOMPurify 3.1.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.0/LICENSE */const{entries:entries$5,setPrototypeOf:setPrototypeOf$8,isFrozen:isFrozen$1,getPrototypeOf:getPrototypeOf$b,getOwnPropertyDescriptor:getOwnPropertyDescriptor$c}=Object;let{freeze:freeze$1,seal:seal$1,create:create$d}=Object,{apply:apply$9,construct:construct$7}=typeof Reflect<"u"&&Reflect;freeze$1||(freeze$1=function(W){return W});seal$1||(seal$1=function(W){return W});apply$9||(apply$9=function(W,q,K){return W.apply(q,K)});construct$7||(construct$7=function(W,q){return new W(...q)});const arrayForEach$3=unapply(Array.prototype.forEach),arrayPop=unapply(Array.prototype.pop),arrayPush=unapply(Array.prototype.push),stringToLowerCase=unapply(String.prototype.toLowerCase),stringToString=unapply(String.prototype.toString),stringMatch=unapply(String.prototype.match),stringReplace=unapply(String.prototype.replace),stringIndexOf$2=unapply(String.prototype.indexOf),stringTrim$2=unapply(String.prototype.trim),objectHasOwnProperty=unapply(Object.prototype.hasOwnProperty),regExpTest=unapply(RegExp.prototype.test),typeErrorCreate=unconstruct(TypeError);function unapply(F){return function(W){for(var q=arguments.length,K=new Array(q>1?q-1:0),X=1;X2&&arguments[2]!==void 0?arguments[2]:stringToLowerCase;setPrototypeOf$8&&setPrototypeOf$8(F,null);let K=W.length;for(;K--;){let X=W[K];if(typeof X=="string"){const tt=q(X);tt!==X&&(isFrozen$1(W)||(W[K]=tt),X=tt)}F[X]=!0}return F}function cleanArray(F){for(let W=0;W/gm),TMPLIT_EXPR=seal$1(/\${[\w\W]*}/gm),DATA_ATTR=seal$1(/^data-[\-\w.\u00B7-\uFFFF]/),ARIA_ATTR=seal$1(/^aria-[\-\w]+$/),IS_ALLOWED_URI=seal$1(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IS_SCRIPT_OR_DATA=seal$1(/^(?:\w+script|data):/i),ATTR_WHITESPACE=seal$1(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DOCTYPE_NAME=seal$1(/^html$/i),CUSTOM_ELEMENT=seal$1(/^[a-z][.\w]*(-[.\w]+)+$/i);var EXPRESSIONS=Object.freeze({__proto__:null,MUSTACHE_EXPR,ERB_EXPR,TMPLIT_EXPR,DATA_ATTR,ARIA_ATTR,IS_ALLOWED_URI,IS_SCRIPT_OR_DATA,ATTR_WHITESPACE,DOCTYPE_NAME,CUSTOM_ELEMENT});const getGlobal=function F(){return typeof window>"u"?null:window},_createTrustedTypesPolicy=function F(W,q){if(typeof W!="object"||typeof W.createPolicy!="function")return null;let K=null;const X="data-tt-policy-suffix";q&&q.hasAttribute(X)&&(K=q.getAttribute(X));const tt="dompurify"+(K?"#"+K:"");try{return W.createPolicy(tt,{createHTML(rt){return rt},createScriptURL(rt){return rt}})}catch{return console.warn("TrustedTypes policy "+tt+" could not be created."),null}};function createDOMPurify(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal();const W=Jg=>createDOMPurify(Jg);if(W.version="3.1.0",W.removed=[],!F||!F.document||F.document.nodeType!==9)return W.isSupported=!1,W;let{document:q}=F;const K=q,X=K.currentScript,{DocumentFragment:tt,HTMLTemplateElement:rt,Node:ot,Element:ut,NodeFilter:yn,NamedNodeMap:uo=F.NamedNodeMap||F.MozNamedAttrMap,HTMLFormElement:po,DOMParser:mo,trustedTypes:wo}=F,lf=ut.prototype,yf=lookupGetter(lf,"cloneNode"),cf=lookupGetter(lf,"nextSibling"),vf=lookupGetter(lf,"childNodes"),_f=lookupGetter(lf,"parentNode");if(typeof rt=="function"){const Jg=q.createElement("template");Jg.content&&Jg.content.ownerDocument&&(q=Jg.content.ownerDocument)}let $f,xf="";const{implementation:Af,createNodeIterator:Cf,createDocumentFragment:Pf,getElementsByTagName:Bf}=q,{importNode:Hf}=K;let Df={};W.isSupported=typeof entries$5=="function"&&typeof _f=="function"&&Af&&Af.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Lf,ERB_EXPR:kf,TMPLIT_EXPR:Nf,DATA_ATTR:Yf,ARIA_ATTR:Gf,IS_SCRIPT_OR_DATA:rp,ATTR_WHITESPACE:ip,CUSTOM_ELEMENT:ap}=EXPRESSIONS;let{IS_ALLOWED_URI:yp}=EXPRESSIONS,vp=null;const Np=addToSet({},[...html$1$3,...svg$1,...svgFilters,...mathMl$1,...text]);let jp=null;const Ip=addToSet({},[...html$4,...svg,...mathMl,...xml]);let Jp=Object.seal(create$d(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ng=null,og=null,vg=!0,Dp=!0,Lp=!1,xp=!0,kp=!1,lp=!0,Of=!1,qf=!1,cp=!1,hp=!1,$p=!1,Vp=!1,bp=!0,Ep=!1;const _p="user-content-";let Mp=!0,Yp=!1,ug={},hg=null;const xg=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let kg=null;const Dg=addToSet({},["audio","video","img","source","image","track"]);let lm=null;const Bp=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rp="http://www.w3.org/1998/Math/MathML",Fp="http://www.w3.org/2000/svg",Op="http://www.w3.org/1999/xhtml";let Kp=Op,Kf=!1,Xf=null;const gp=addToSet({},[Rp,Fp,Op],stringToString);let wp=null;const dg=["application/xhtml+xml","text/html"],mg="text/html";let pg=null,wg=null;const Cg=q.createElement("form"),Bg=function(Hp){return Hp instanceof RegExp||Hp instanceof Function},Xg=function(){let Hp=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(wg&&wg===Hp)){if((!Hp||typeof Hp!="object")&&(Hp={}),Hp=clone$3(Hp),wp=dg.indexOf(Hp.PARSER_MEDIA_TYPE)===-1?mg:Hp.PARSER_MEDIA_TYPE,pg=wp==="application/xhtml+xml"?stringToString:stringToLowerCase,vp=objectHasOwnProperty(Hp,"ALLOWED_TAGS")?addToSet({},Hp.ALLOWED_TAGS,pg):Np,jp=objectHasOwnProperty(Hp,"ALLOWED_ATTR")?addToSet({},Hp.ALLOWED_ATTR,pg):Ip,Xf=objectHasOwnProperty(Hp,"ALLOWED_NAMESPACES")?addToSet({},Hp.ALLOWED_NAMESPACES,stringToString):gp,lm=objectHasOwnProperty(Hp,"ADD_URI_SAFE_ATTR")?addToSet(clone$3(Bp),Hp.ADD_URI_SAFE_ATTR,pg):Bp,kg=objectHasOwnProperty(Hp,"ADD_DATA_URI_TAGS")?addToSet(clone$3(Dg),Hp.ADD_DATA_URI_TAGS,pg):Dg,hg=objectHasOwnProperty(Hp,"FORBID_CONTENTS")?addToSet({},Hp.FORBID_CONTENTS,pg):xg,ng=objectHasOwnProperty(Hp,"FORBID_TAGS")?addToSet({},Hp.FORBID_TAGS,pg):{},og=objectHasOwnProperty(Hp,"FORBID_ATTR")?addToSet({},Hp.FORBID_ATTR,pg):{},ug=objectHasOwnProperty(Hp,"USE_PROFILES")?Hp.USE_PROFILES:!1,vg=Hp.ALLOW_ARIA_ATTR!==!1,Dp=Hp.ALLOW_DATA_ATTR!==!1,Lp=Hp.ALLOW_UNKNOWN_PROTOCOLS||!1,xp=Hp.ALLOW_SELF_CLOSE_IN_ATTR!==!1,kp=Hp.SAFE_FOR_TEMPLATES||!1,lp=Hp.SAFE_FOR_XML!==!1,Of=Hp.WHOLE_DOCUMENT||!1,hp=Hp.RETURN_DOM||!1,$p=Hp.RETURN_DOM_FRAGMENT||!1,Vp=Hp.RETURN_TRUSTED_TYPE||!1,cp=Hp.FORCE_BODY||!1,bp=Hp.SANITIZE_DOM!==!1,Ep=Hp.SANITIZE_NAMED_PROPS||!1,Mp=Hp.KEEP_CONTENT!==!1,Yp=Hp.IN_PLACE||!1,yp=Hp.ALLOWED_URI_REGEXP||IS_ALLOWED_URI,Kp=Hp.NAMESPACE||Op,Jp=Hp.CUSTOM_ELEMENT_HANDLING||{},Hp.CUSTOM_ELEMENT_HANDLING&&Bg(Hp.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Jp.tagNameCheck=Hp.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Hp.CUSTOM_ELEMENT_HANDLING&&Bg(Hp.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Jp.attributeNameCheck=Hp.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Hp.CUSTOM_ELEMENT_HANDLING&&typeof Hp.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Jp.allowCustomizedBuiltInElements=Hp.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),kp&&(Dp=!1),$p&&(hp=!0),ug&&(vp=addToSet({},text),jp=[],ug.html===!0&&(addToSet(vp,html$1$3),addToSet(jp,html$4)),ug.svg===!0&&(addToSet(vp,svg$1),addToSet(jp,svg),addToSet(jp,xml)),ug.svgFilters===!0&&(addToSet(vp,svgFilters),addToSet(jp,svg),addToSet(jp,xml)),ug.mathMl===!0&&(addToSet(vp,mathMl$1),addToSet(jp,mathMl),addToSet(jp,xml))),Hp.ADD_TAGS&&(vp===Np&&(vp=clone$3(vp)),addToSet(vp,Hp.ADD_TAGS,pg)),Hp.ADD_ATTR&&(jp===Ip&&(jp=clone$3(jp)),addToSet(jp,Hp.ADD_ATTR,pg)),Hp.ADD_URI_SAFE_ATTR&&addToSet(lm,Hp.ADD_URI_SAFE_ATTR,pg),Hp.FORBID_CONTENTS&&(hg===xg&&(hg=clone$3(hg)),addToSet(hg,Hp.FORBID_CONTENTS,pg)),Mp&&(vp["#text"]=!0),Of&&addToSet(vp,["html","head","body"]),vp.table&&(addToSet(vp,["tbody"]),delete ng.tbody),Hp.TRUSTED_TYPES_POLICY){if(typeof Hp.TRUSTED_TYPES_POLICY.createHTML!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Hp.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$f=Hp.TRUSTED_TYPES_POLICY,xf=$f.createHTML("")}else $f===void 0&&($f=_createTrustedTypesPolicy(wo,X)),$f!==null&&typeof xf=="string"&&(xf=$f.createHTML(""));freeze$1&&freeze$1(Hp),wg=Hp}},mm=addToSet({},["mi","mo","mn","ms","mtext"]),Hg=addToSet({},["foreignobject","desc","title","annotation-xml"]),Iy=addToSet({},["title","style","font","a","script"]),py=addToSet({},[...svg$1,...svgFilters,...svgDisallowed]),Yy=addToSet({},[...mathMl$1,...mathMlDisallowed]),Yb=function(Hp){let Eg=_f(Hp);(!Eg||!Eg.tagName)&&(Eg={namespaceURI:Kp,tagName:"template"});const Gg=stringToLowerCase(Hp.tagName),yv=stringToLowerCase(Eg.tagName);return Xf[Hp.namespaceURI]?Hp.namespaceURI===Fp?Eg.namespaceURI===Op?Gg==="svg":Eg.namespaceURI===Rp?Gg==="svg"&&(yv==="annotation-xml"||mm[yv]):!!py[Gg]:Hp.namespaceURI===Rp?Eg.namespaceURI===Op?Gg==="math":Eg.namespaceURI===Fp?Gg==="math"&&Hg[yv]:!!Yy[Gg]:Hp.namespaceURI===Op?Eg.namespaceURI===Fp&&!Hg[yv]||Eg.namespaceURI===Rp&&!mm[yv]?!1:!Yy[Gg]&&(Iy[Gg]||!py[Gg]):!!(wp==="application/xhtml+xml"&&Xf[Hp.namespaceURI]):!1},p0=function(Hp){arrayPush(W.removed,{element:Hp});try{Hp.parentNode.removeChild(Hp)}catch{Hp.remove()}},_b=function(Hp,Eg){try{arrayPush(W.removed,{attribute:Eg.getAttributeNode(Hp),from:Eg})}catch{arrayPush(W.removed,{attribute:null,from:Eg})}if(Eg.removeAttribute(Hp),Hp==="is"&&!jp[Hp])if(hp||$p)try{p0(Eg)}catch{}else try{Eg.setAttribute(Hp,"")}catch{}},Fy=function(Hp){let Eg=null,Gg=null;if(cp)Hp=""+Hp;else{const Cv=stringMatch(Hp,/^[\r\n\t ]+/);Gg=Cv&&Cv[0]}wp==="application/xhtml+xml"&&Kp===Op&&(Hp=''+Hp+"");const yv=$f?$f.createHTML(Hp):Hp;if(Kp===Op)try{Eg=new mo().parseFromString(yv,wp)}catch{}if(!Eg||!Eg.documentElement){Eg=Af.createDocument(Kp,"template",null);try{Eg.documentElement.innerHTML=Kf?xf:yv}catch{}}const Py=Eg.body||Eg.documentElement;return Hp&&Gg&&Py.insertBefore(q.createTextNode(Gg),Py.childNodes[0]||null),Kp===Op?Bf.call(Eg,Of?"html":"body")[0]:Of?Eg.documentElement:Py},qg=function(Hp){return Cf.call(Hp.ownerDocument||Hp,Hp,yn.SHOW_ELEMENT|yn.SHOW_COMMENT|yn.SHOW_TEXT|yn.SHOW_PROCESSING_INSTRUCTION|yn.SHOW_CDATA_SECTION,null)},E1=function(Hp){return Hp instanceof po&&(typeof Hp.nodeName!="string"||typeof Hp.textContent!="string"||typeof Hp.removeChild!="function"||!(Hp.attributes instanceof uo)||typeof Hp.removeAttribute!="function"||typeof Hp.setAttribute!="function"||typeof Hp.namespaceURI!="string"||typeof Hp.insertBefore!="function"||typeof Hp.hasChildNodes!="function")},A$=function(Hp){return typeof ot=="function"&&Hp instanceof ot},qv=function(Hp,Eg,Gg){Df[Hp]&&arrayForEach$3(Df[Hp],yv=>{yv.call(W,Eg,Gg,wg)})},H0=function(Hp){let Eg=null;if(qv("beforeSanitizeElements",Hp,null),E1(Hp))return p0(Hp),!0;const Gg=pg(Hp.nodeName);if(qv("uponSanitizeElement",Hp,{tagName:Gg,allowedTags:vp}),Hp.hasChildNodes()&&!A$(Hp.firstElementChild)&®ExpTest(/<[/\w]/g,Hp.innerHTML)&®ExpTest(/<[/\w]/g,Hp.textContent)||Hp.nodeType===7||lp&&Hp.nodeType===8&®ExpTest(/<[/\w]/g,Hp.data))return p0(Hp),!0;if(!vp[Gg]||ng[Gg]){if(!ng[Gg]&&R$(Gg)&&(Jp.tagNameCheck instanceof RegExp&®ExpTest(Jp.tagNameCheck,Gg)||Jp.tagNameCheck instanceof Function&&Jp.tagNameCheck(Gg)))return!1;if(Mp&&!hg[Gg]){const yv=_f(Hp)||Hp.parentNode,Py=vf(Hp)||Hp.childNodes;if(Py&&yv){const Cv=Py.length;for(let By=Cv-1;By>=0;--By)yv.insertBefore(yf(Py[By],!0),cf(Hp))}}return p0(Hp),!0}return Hp instanceof ut&&!Yb(Hp)||(Gg==="noscript"||Gg==="noembed"||Gg==="noframes")&®ExpTest(/<\/no(script|embed|frames)/i,Hp.innerHTML)?(p0(Hp),!0):(kp&&Hp.nodeType===3&&(Eg=Hp.textContent,arrayForEach$3([Lf,kf,Nf],yv=>{Eg=stringReplace(Eg,yv," ")}),Hp.textContent!==Eg&&(arrayPush(W.removed,{element:Hp.cloneNode()}),Hp.textContent=Eg)),qv("afterSanitizeElements",Hp,null),!1)},wb=function(Hp,Eg,Gg){if(bp&&(Eg==="id"||Eg==="name")&&(Gg in q||Gg in Cg))return!1;if(!(Dp&&!og[Eg]&®ExpTest(Yf,Eg))){if(!(vg&®ExpTest(Gf,Eg))){if(!jp[Eg]||og[Eg]){if(!(R$(Hp)&&(Jp.tagNameCheck instanceof RegExp&®ExpTest(Jp.tagNameCheck,Hp)||Jp.tagNameCheck instanceof Function&&Jp.tagNameCheck(Hp))&&(Jp.attributeNameCheck instanceof RegExp&®ExpTest(Jp.attributeNameCheck,Eg)||Jp.attributeNameCheck instanceof Function&&Jp.attributeNameCheck(Eg))||Eg==="is"&&Jp.allowCustomizedBuiltInElements&&(Jp.tagNameCheck instanceof RegExp&®ExpTest(Jp.tagNameCheck,Gg)||Jp.tagNameCheck instanceof Function&&Jp.tagNameCheck(Gg))))return!1}else if(!lm[Eg]){if(!regExpTest(yp,stringReplace(Gg,ip,""))){if(!((Eg==="src"||Eg==="xlink:href"||Eg==="href")&&Hp!=="script"&&stringIndexOf$2(Gg,"data:")===0&&kg[Hp])){if(!(Lp&&!regExpTest(rp,stringReplace(Gg,ip,"")))){if(Gg)return!1}}}}}}return!0},R$=function(Hp){return Hp!=="annotation-xml"&&stringMatch(Hp,ap)},g0=function(Hp){qv("beforeSanitizeAttributes",Hp,null);const{attributes:Eg}=Hp;if(!Eg)return;const Gg={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:jp};let yv=Eg.length;for(;yv--;){const Py=Eg[yv],{name:Cv,namespaceURI:By,value:S1}=Py,T1=pg(Cv);let jy=Cv==="value"?S1:stringTrim$2(S1);if(Gg.attrName=T1,Gg.attrValue=jy,Gg.keepAttr=!0,Gg.forceKeepAttr=void 0,qv("uponSanitizeAttribute",Hp,Gg),jy=Gg.attrValue,Gg.forceKeepAttr||(_b(Cv,Hp),!Gg.keepAttr))continue;if(!xp&®ExpTest(/\/>/i,jy)){_b(Cv,Hp);continue}kp&&arrayForEach$3([Lf,kf,Nf],xb=>{jy=stringReplace(jy,xb," ")});const cw=pg(Hp.nodeName);if(wb(cw,T1,jy)){if(Ep&&(T1==="id"||T1==="name")&&(_b(Cv,Hp),jy=_p+jy),$f&&typeof wo=="object"&&typeof wo.getAttributeType=="function"&&!By)switch(wo.getAttributeType(cw,T1)){case"TrustedHTML":{jy=$f.createHTML(jy);break}case"TrustedScriptURL":{jy=$f.createScriptURL(jy);break}}try{By?Hp.setAttributeNS(By,Cv,jy):Hp.setAttribute(Cv,jy),arrayPop(W.removed)}catch{}}}qv("afterSanitizeAttributes",Hp,null)},m_=function Jg(Hp){let Eg=null;const Gg=qg(Hp);for(qv("beforeSanitizeShadowDOM",Hp,null);Eg=Gg.nextNode();)qv("uponSanitizeShadowNode",Eg,null),!H0(Eg)&&(Eg.content instanceof tt&&Jg(Eg.content),g0(Eg));qv("afterSanitizeShadowDOM",Hp,null)};return W.sanitize=function(Jg){let Hp=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Eg=null,Gg=null,yv=null,Py=null;if(Kf=!Jg,Kf&&(Jg=""),typeof Jg!="string"&&!A$(Jg))if(typeof Jg.toString=="function"){if(Jg=Jg.toString(),typeof Jg!="string")throw typeErrorCreate("dirty is not a string, aborting")}else throw typeErrorCreate("toString is not a function");if(!W.isSupported)return Jg;if(qf||Xg(Hp),W.removed=[],typeof Jg=="string"&&(Yp=!1),Yp){if(Jg.nodeName){const S1=pg(Jg.nodeName);if(!vp[S1]||ng[S1])throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place")}}else if(Jg instanceof ot)Eg=Fy(""),Gg=Eg.ownerDocument.importNode(Jg,!0),Gg.nodeType===1&&Gg.nodeName==="BODY"||Gg.nodeName==="HTML"?Eg=Gg:Eg.appendChild(Gg);else{if(!hp&&!kp&&!Of&&Jg.indexOf("<")===-1)return $f&&Vp?$f.createHTML(Jg):Jg;if(Eg=Fy(Jg),!Eg)return hp?null:Vp?xf:""}Eg&&cp&&p0(Eg.firstChild);const Cv=qg(Yp?Jg:Eg);for(;yv=Cv.nextNode();)H0(yv)||(yv.content instanceof tt&&m_(yv.content),g0(yv));if(Yp)return Jg;if(hp){if($p)for(Py=Pf.call(Eg.ownerDocument);Eg.firstChild;)Py.appendChild(Eg.firstChild);else Py=Eg;return(jp.shadowroot||jp.shadowrootmode)&&(Py=Hf.call(K,Py,!0)),Py}let By=Of?Eg.outerHTML:Eg.innerHTML;return Of&&vp["!doctype"]&&Eg.ownerDocument&&Eg.ownerDocument.doctype&&Eg.ownerDocument.doctype.name&®ExpTest(DOCTYPE_NAME,Eg.ownerDocument.doctype.name)&&(By=" +`+By),kp&&arrayForEach$3([Lf,kf,Nf],S1=>{By=stringReplace(By,S1," ")}),$f&&Vp?$f.createHTML(By):By},W.setConfig=function(){let Jg=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Xg(Jg),qf=!0},W.clearConfig=function(){wg=null,qf=!1},W.isValidAttribute=function(Jg,Hp,Eg){wg||Xg({});const Gg=pg(Jg),yv=pg(Hp);return wb(Gg,yv,Eg)},W.addHook=function(Jg,Hp){typeof Hp=="function"&&(Df[Jg]=Df[Jg]||[],arrayPush(Df[Jg],Hp))},W.removeHook=function(Jg){if(Df[Jg])return arrayPop(Df[Jg])},W.removeHooks=function(Jg){Df[Jg]&&(Df[Jg]=[])},W.removeAllHooks=function(){Df={}},W}var purify=createDOMPurify();const Channel={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:F=>F>=255?255:F<0?0:F,g:F=>F>=255?255:F<0?0:F,b:F=>F>=255?255:F<0?0:F,h:F=>F%360,s:F=>F>=100?100:F<0?0:F,l:F=>F>=100?100:F<0?0:F,a:F=>F>=1?1:F<0?0:F},toLinear:F=>{const W=F/255;return F>.03928?Math.pow((W+.055)/1.055,2.4):W/12.92},hue2rgb:(F,W,q)=>(q<0&&(q+=1),q>1&&(q-=1),q<1/6?F+(W-F)*6*q:q<1/2?W:q<2/3?F+(W-F)*(2/3-q)*6:F),hsl2rgb:({h:F,s:W,l:q},K)=>{if(!W)return q*2.55;F/=360,W/=100,q/=100;const X=q<.5?q*(1+W):q+W-q*W,tt=2*q-X;switch(K){case"r":return Channel.hue2rgb(tt,X,F+1/3)*255;case"g":return Channel.hue2rgb(tt,X,F)*255;case"b":return Channel.hue2rgb(tt,X,F-1/3)*255}},rgb2hsl:({r:F,g:W,b:q},K)=>{F/=255,W/=255,q/=255;const X=Math.max(F,W,q),tt=Math.min(F,W,q),rt=(X+tt)/2;if(K==="l")return rt*100;if(X===tt)return 0;const ot=X-tt,ut=rt>.5?ot/(2-X-tt):ot/(X+tt);if(K==="s")return ut*100;switch(X){case F:return((W-q)/ot+(WW>q?Math.min(W,Math.max(q,F)):Math.min(q,Math.max(W,F)),round:F=>Math.round(F*1e10)/1e10},lang$1=Lang,Unit={dec2hex:F=>{const W=Math.round(F).toString(16);return W.length>1?W:`0${W}`}},unit=Unit,Utils={channel:channel$1,lang:lang$1,unit},_$4=Utils,DEC2HEX={};for(let F=0;F<=255;F++)DEC2HEX[F]=_$4.unit.dec2hex(F);const TYPE={ALL:0,RGB:1,HSL:2};class Type{constructor(){this.type=TYPE.ALL}get(){return this.type}set(W){if(this.type&&this.type!==W)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=W}reset(){this.type=TYPE.ALL}is(W){return this.type===W}}const Type$2=Type;class Channels{constructor(W,q){this.color=q,this.changed=!1,this.data=W,this.type=new Type$2}set(W,q){return this.color=q,this.changed=!1,this.data=W,this.type.type=TYPE.ALL,this}_ensureHSL(){const W=this.data,{h:q,s:K,l:X}=W;q===void 0&&(W.h=_$4.channel.rgb2hsl(W,"h")),K===void 0&&(W.s=_$4.channel.rgb2hsl(W,"s")),X===void 0&&(W.l=_$4.channel.rgb2hsl(W,"l"))}_ensureRGB(){const W=this.data,{r:q,g:K,b:X}=W;q===void 0&&(W.r=_$4.channel.hsl2rgb(W,"r")),K===void 0&&(W.g=_$4.channel.hsl2rgb(W,"g")),X===void 0&&(W.b=_$4.channel.hsl2rgb(W,"b"))}get r(){const W=this.data,q=W.r;return!this.type.is(TYPE.HSL)&&q!==void 0?q:(this._ensureHSL(),_$4.channel.hsl2rgb(W,"r"))}get g(){const W=this.data,q=W.g;return!this.type.is(TYPE.HSL)&&q!==void 0?q:(this._ensureHSL(),_$4.channel.hsl2rgb(W,"g"))}get b(){const W=this.data,q=W.b;return!this.type.is(TYPE.HSL)&&q!==void 0?q:(this._ensureHSL(),_$4.channel.hsl2rgb(W,"b"))}get h(){const W=this.data,q=W.h;return!this.type.is(TYPE.RGB)&&q!==void 0?q:(this._ensureRGB(),_$4.channel.rgb2hsl(W,"h"))}get s(){const W=this.data,q=W.s;return!this.type.is(TYPE.RGB)&&q!==void 0?q:(this._ensureRGB(),_$4.channel.rgb2hsl(W,"s"))}get l(){const W=this.data,q=W.l;return!this.type.is(TYPE.RGB)&&q!==void 0?q:(this._ensureRGB(),_$4.channel.rgb2hsl(W,"l"))}get a(){return this.data.a}set r(W){this.type.set(TYPE.RGB),this.changed=!0,this.data.r=W}set g(W){this.type.set(TYPE.RGB),this.changed=!0,this.data.g=W}set b(W){this.type.set(TYPE.RGB),this.changed=!0,this.data.b=W}set h(W){this.type.set(TYPE.HSL),this.changed=!0,this.data.h=W}set s(W){this.type.set(TYPE.HSL),this.changed=!0,this.data.s=W}set l(W){this.type.set(TYPE.HSL),this.changed=!0,this.data.l=W}set a(W){this.changed=!0,this.data.a=W}}const Channels$1=Channels,channels=new Channels$1({r:0,g:0,b:0,a:0},"transparent"),ChannelsReusable=channels,Hex={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:F=>{if(F.charCodeAt(0)!==35)return;const W=F.match(Hex.re);if(!W)return;const q=W[1],K=parseInt(q,16),X=q.length,tt=X%4===0,rt=X>4,ot=rt?1:17,ut=rt?8:4,yn=tt?0:-1,uo=rt?255:15;return ChannelsReusable.set({r:(K>>ut*(yn+3)&uo)*ot,g:(K>>ut*(yn+2)&uo)*ot,b:(K>>ut*(yn+1)&uo)*ot,a:tt?(K&uo)*ot/255:1},F)},stringify:F=>{const{r:W,g:q,b:K,a:X}=F;return X<1?`#${DEC2HEX[Math.round(W)]}${DEC2HEX[Math.round(q)]}${DEC2HEX[Math.round(K)]}${DEC2HEX[Math.round(X*255)]}`:`#${DEC2HEX[Math.round(W)]}${DEC2HEX[Math.round(q)]}${DEC2HEX[Math.round(K)]}`}},Hex$1=Hex,HSL={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:F=>{const W=F.match(HSL.hueRe);if(W){const[,q,K]=W;switch(K){case"grad":return _$4.channel.clamp.h(parseFloat(q)*.9);case"rad":return _$4.channel.clamp.h(parseFloat(q)*180/Math.PI);case"turn":return _$4.channel.clamp.h(parseFloat(q)*360)}}return _$4.channel.clamp.h(parseFloat(F))},parse:F=>{const W=F.charCodeAt(0);if(W!==104&&W!==72)return;const q=F.match(HSL.re);if(!q)return;const[,K,X,tt,rt,ot]=q;return ChannelsReusable.set({h:HSL._hue2deg(K),s:_$4.channel.clamp.s(parseFloat(X)),l:_$4.channel.clamp.l(parseFloat(tt)),a:rt?_$4.channel.clamp.a(ot?parseFloat(rt)/100:parseFloat(rt)):1},F)},stringify:F=>{const{h:W,s:q,l:K,a:X}=F;return X<1?`hsla(${_$4.lang.round(W)}, ${_$4.lang.round(q)}%, ${_$4.lang.round(K)}%, ${X})`:`hsl(${_$4.lang.round(W)}, ${_$4.lang.round(q)}%, ${_$4.lang.round(K)}%)`}},HSL$1=HSL,Keyword={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:F=>{F=F.toLowerCase();const W=Keyword.colors[F];if(W)return Hex$1.parse(W)},stringify:F=>{const W=Hex$1.stringify(F);for(const q in Keyword.colors)if(Keyword.colors[q]===W)return q}},Keyword$1=Keyword,RGB={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:F=>{const W=F.charCodeAt(0);if(W!==114&&W!==82)return;const q=F.match(RGB.re);if(!q)return;const[,K,X,tt,rt,ot,ut,yn,uo]=q;return ChannelsReusable.set({r:_$4.channel.clamp.r(X?parseFloat(K)*2.55:parseFloat(K)),g:_$4.channel.clamp.g(rt?parseFloat(tt)*2.55:parseFloat(tt)),b:_$4.channel.clamp.b(ut?parseFloat(ot)*2.55:parseFloat(ot)),a:yn?_$4.channel.clamp.a(uo?parseFloat(yn)/100:parseFloat(yn)):1},F)},stringify:F=>{const{r:W,g:q,b:K,a:X}=F;return X<1?`rgba(${_$4.lang.round(W)}, ${_$4.lang.round(q)}, ${_$4.lang.round(K)}, ${_$4.lang.round(X)})`:`rgb(${_$4.lang.round(W)}, ${_$4.lang.round(q)}, ${_$4.lang.round(K)})`}},RGB$1=RGB,Color={format:{keyword:Keyword$1,hex:Hex$1,rgb:RGB$1,rgba:RGB$1,hsl:HSL$1,hsla:HSL$1},parse:F=>{if(typeof F!="string")return F;const W=Hex$1.parse(F)||RGB$1.parse(F)||HSL$1.parse(F)||Keyword$1.parse(F);if(W)return W;throw new Error(`Unsupported color format: "${F}"`)},stringify:F=>!F.changed&&F.color?F.color:F.type.is(TYPE.HSL)||F.data.r===void 0?HSL$1.stringify(F):F.a<1||!Number.isInteger(F.r)||!Number.isInteger(F.g)||!Number.isInteger(F.b)?RGB$1.stringify(F):Hex$1.stringify(F)},Color$1=Color,change=(F,W)=>{const q=Color$1.parse(F);for(const K in W)q[K]=_$4.channel.clamp[K](W[K]);return Color$1.stringify(q)},change$1=change,rgba=(F,W,q=0,K=1)=>{if(typeof F!="number")return change$1(F,{a:W});const X=ChannelsReusable.set({r:_$4.channel.clamp.r(F),g:_$4.channel.clamp.g(W),b:_$4.channel.clamp.b(q),a:_$4.channel.clamp.a(K)});return Color$1.stringify(X)},rgba$1=rgba,luminance=F=>{const{r:W,g:q,b:K}=Color$1.parse(F),X=.2126*_$4.channel.toLinear(W)+.7152*_$4.channel.toLinear(q)+.0722*_$4.channel.toLinear(K);return _$4.lang.round(X)},luminance$1=luminance,isLight=F=>luminance$1(F)>=.5,isLight$1=isLight,isDark=F=>!isLight$1(F),isDark$1=isDark,adjustChannel=(F,W,q)=>{const K=Color$1.parse(F),X=K[W],tt=_$4.channel.clamp[W](X+q);return X!==tt&&(K[W]=tt),Color$1.stringify(K)},adjustChannel$1=adjustChannel,lighten=(F,W)=>adjustChannel$1(F,"l",W),lighten$1=lighten,darken=(F,W)=>adjustChannel$1(F,"l",-W),darken$1=darken,adjust=(F,W)=>{const q=Color$1.parse(F),K={};for(const X in W)W[X]&&(K[X]=q[X]+W[X]);return change$1(F,K)},adjust$1=adjust,mix=(F,W,q=50)=>{const{r:K,g:X,b:tt,a:rt}=Color$1.parse(F),{r:ot,g:ut,b:yn,a:uo}=Color$1.parse(W),po=q/100,mo=po*2-1,wo=rt-uo,yf=((mo*wo===-1?mo:(mo+wo)/(1+mo*wo))+1)/2,cf=1-yf,vf=K*yf+ot*cf,_f=X*yf+ut*cf,$f=tt*yf+yn*cf,xf=rt*po+uo*(1-po);return rgba$1(vf,_f,$f,xf)},mix$1=mix,invert=(F,W=100)=>{const q=Color$1.parse(F);return q.r=255-q.r,q.g=255-q.g,q.b=255-q.b,mix$1(q,F,W)},invert$1=invert;var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;const freeGlobal$1=freeGlobal;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal$1||freeSelf||Function("return this")();const root$1=root;var Symbol$6=root$1.Symbol;const Symbol$7=Symbol$6;var objectProto$c=Object.prototype,hasOwnProperty$d=objectProto$c.hasOwnProperty,nativeObjectToString$1=objectProto$c.toString,symToStringTag$1=Symbol$7?Symbol$7.toStringTag:void 0;function getRawTag(F){var W=hasOwnProperty$d.call(F,symToStringTag$1),q=F[symToStringTag$1];try{F[symToStringTag$1]=void 0;var K=!0}catch{}var X=nativeObjectToString$1.call(F);return K&&(W?F[symToStringTag$1]=q:delete F[symToStringTag$1]),X}var objectProto$b=Object.prototype,nativeObjectToString=objectProto$b.toString;function objectToString$3(F){return nativeObjectToString.call(F)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$7?Symbol$7.toStringTag:void 0;function baseGetTag(F){return F==null?F===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(F)?getRawTag(F):objectToString$3(F)}function isObject$n(F){var W=typeof F;return F!=null&&(W=="object"||W=="function")}var asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$1(F){if(!isObject$n(F))return!1;var W=baseGetTag(F);return W==funcTag$1||W==genTag||W==asyncTag||W==proxyTag}var coreJsData=root$1["__core-js_shared__"];const coreJsData$1=coreJsData;var maskSrcKey=function(){var F=/[^.]+$/.exec(coreJsData$1&&coreJsData$1.keys&&coreJsData$1.keys.IE_PROTO||"");return F?"Symbol(src)_1."+F:""}();function isMasked(F){return!!maskSrcKey&&maskSrcKey in F}var funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource(F){if(F!=null){try{return funcToString$2.call(F)}catch{}try{return F+""}catch{}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$a=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$c=objectProto$a.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$c).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(F){if(!isObject$n(F)||isMasked(F))return!1;var W=isFunction$1(F)?reIsNative:reIsHostCtor;return W.test(toSource(F))}function getValue(F,W){return F==null?void 0:F[W]}function getNative(F,W){var q=getValue(F,W);return baseIsNative(q)?q:void 0}var nativeCreate=getNative(Object,"create");const nativeCreate$1=nativeCreate;function hashClear(){this.__data__=nativeCreate$1?nativeCreate$1(null):{},this.size=0}function hashDelete(F){var W=this.has(F)&&delete this.__data__[F];return this.size-=W?1:0,W}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$9=Object.prototype,hasOwnProperty$b=objectProto$9.hasOwnProperty;function hashGet(F){var W=this.__data__;if(nativeCreate$1){var q=W[F];return q===HASH_UNDEFINED$1?void 0:q}return hasOwnProperty$b.call(W,F)?W[F]:void 0}var objectProto$8=Object.prototype,hasOwnProperty$a=objectProto$8.hasOwnProperty;function hashHas(F){var W=this.__data__;return nativeCreate$1?W[F]!==void 0:hasOwnProperty$a.call(W,F)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(F,W){var q=this.__data__;return this.size+=this.has(F)?0:1,q[F]=nativeCreate$1&&W===void 0?HASH_UNDEFINED:W,this}function Hash(F){var W=-1,q=F==null?0:F.length;for(this.clear();++W-1}function listCacheSet(F,W){var q=this.__data__,K=assocIndexOf(q,F);return K<0?(++this.size,q.push([F,W])):q[K][1]=W,this}function ListCache(F){var W=-1,q=F==null?0:F.length;for(this.clear();++W-1&&F%1==0&&F<=MAX_SAFE_INTEGER$4}function isArrayLike(F){return F!=null&&isLength(F.length)&&!isFunction$1(F)}function isArrayLikeObject(F){return isObjectLike(F)&&isArrayLike(F)}function stubFalse(){return!1}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,Buffer=moduleExports$1?root$1.Buffer:void 0,nativeIsBuffer=Buffer?Buffer.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse;const isBuffer$1=isBuffer;var objectTag$2="[object Object]",funcProto=Function.prototype,objectProto$5=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$8=objectProto$5.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject(F){if(!isObjectLike(F)||baseGetTag(F)!=objectTag$2)return!1;var W=getPrototype$1(F);if(W===null)return!0;var q=hasOwnProperty$8.call(W,"constructor")&&W.constructor;return typeof q=="function"&&q instanceof q&&funcToString.call(q)==objectCtorString}var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$2="[object Map]",numberTag="[object Number]",objectTag$1="[object Object]",regexpTag="[object RegExp]",setTag$2="[object Set]",stringTag="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$2]=typedArrayTags[numberTag]=typedArrayTags[objectTag$1]=typedArrayTags[regexpTag]=typedArrayTags[setTag$2]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag$1]=!1;function baseIsTypedArray(F){return isObjectLike(F)&&isLength(F.length)&&!!typedArrayTags[baseGetTag(F)]}function baseUnary(F){return function(W){return F(W)}}var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,freeProcess=moduleExports&&freeGlobal$1.process,nodeUtil=function(){try{var F=freeModule&&freeModule.require&&freeModule.require("util").types;return F||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}}();const nodeUtil$1=nodeUtil;var nodeIsTypedArray=nodeUtil$1&&nodeUtil$1.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;const isTypedArray$1=isTypedArray;function safeGet(F,W){if(!(W==="constructor"&&typeof F[W]=="function")&&W!="__proto__")return F[W]}var objectProto$4=Object.prototype,hasOwnProperty$7=objectProto$4.hasOwnProperty;function assignValue(F,W,q){var K=F[W];(!(hasOwnProperty$7.call(F,W)&&eq(K,q))||q===void 0&&!(W in F))&&baseAssignValue(F,W,q)}function copyObject(F,W,q,K){var X=!q;q||(q={});for(var tt=-1,rt=W.length;++tt-1&&F%1==0&&F0){if(++W>=HOT_COUNT)return arguments[0]}else W=0;return F.apply(void 0,arguments)}}var setToString=shortOut(baseSetToString$1);const setToString$1=setToString;function baseRest(F,W){return setToString$1(overRest(F,W,identity),F+"")}function isIterateeCall(F,W,q){if(!isObject$n(q))return!1;var K=typeof W;return(K=="number"?isArrayLike(q)&&isIndex(W,q.length):K=="string"&&W in q)?eq(q[W],F):!1}function createAssigner(F){return baseRest(function(W,q){var K=-1,X=q.length,tt=X>1?q[X-1]:void 0,rt=X>2?q[2]:void 0;for(tt=F.length>3&&typeof tt=="function"?(X--,tt):void 0,rt&&isIterateeCall(q[0],q[1],rt)&&(tt=X<3?void 0:tt,X=1),W=Object(W);++K0?charat(characters,--position):0,column--,character===10&&(column=1,line--),character}function next$1(){return character=position2||token$2(character)>3?"":" "}function escaping(F,W){for(;--W&&next$1()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice$9(F,caret()+(W<6&&peek()==32&&next$1()==32))}function delimiter(F){for(;next$1();)switch(character){case F:return position;case 34:case 39:F!==34&&F!==39&&delimiter(character);break;case 40:F===41&&delimiter(F);break;case 92:next$1();break}return position}function commenter(F,W){for(;next$1()&&F+character!==47+10;)if(F+character===42+42&&peek()===47)break;return"/*"+slice$9(W,position-1)+"*"+from$a(F===47?F:next$1())}function identifier(F){for(;!token$2(peek());)next$1();return slice$9(F,position)}function compile(F){return dealloc(parse$2("",null,null,null,[""],F=alloc(F),0,[0],F))}function parse$2(F,W,q,K,X,tt,rt,ot,ut){for(var yn=0,uo=0,po=rt,mo=0,wo=0,lf=0,yf=1,cf=1,vf=1,_f=0,$f="",xf=X,Af=tt,Cf=K,Pf=$f;cf;)switch(lf=_f,_f=next$1()){case 40:if(lf!=108&&charat(Pf,po-1)==58){indexof(Pf+=replace$4(delimit(_f),"&","&\f"),"&\f")!=-1&&(vf=-1);break}case 34:case 39:case 91:Pf+=delimit(_f);break;case 9:case 10:case 13:case 32:Pf+=whitespace(lf);break;case 92:Pf+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next$1(),caret()),W,q),ut);break;default:Pf+="/"}break;case 123*yf:ot[yn++]=strlen(Pf)*vf;case 125*yf:case 59:case 0:switch(_f){case 0:case 125:cf=0;case 59+uo:vf==-1&&(Pf=replace$4(Pf,/\f/g,"")),wo>0&&strlen(Pf)-po&&append(wo>32?declaration(Pf+";",K,q,po-1):declaration(replace$4(Pf," ","")+";",K,q,po-2),ut);break;case 59:Pf+=";";default:if(append(Cf=ruleset(Pf,W,q,yn,uo,X,ot,$f,xf=[],Af=[],po),tt),_f===123)if(uo===0)parse$2(Pf,W,Cf,Cf,xf,tt,po,ot,Af);else switch(mo===99&&charat(Pf,3)===110?100:mo){case 100:case 108:case 109:case 115:parse$2(F,Cf,Cf,K&&append(ruleset(F,Cf,Cf,0,0,X,ot,$f,X,xf=[],po),Af),X,Af,po,ot,K?xf:Af);break;default:parse$2(Pf,Cf,Cf,Cf,[""],Af,0,ot,Af)}}yn=uo=wo=0,yf=vf=1,$f=Pf="",po=rt;break;case 58:po=1+strlen(Pf),wo=lf;default:if(yf<1){if(_f==123)--yf;else if(_f==125&&yf++==0&&prev()==125)continue}switch(Pf+=from$a(_f),_f*yf){case 38:vf=uo>0?1:(Pf+="\f",-1);break;case 44:ot[yn++]=(strlen(Pf)-1)*vf,vf=1;break;case 64:peek()===45&&(Pf+=delimit(next$1())),mo=peek(),uo=po=strlen($f=Pf+=identifier(caret())),_f++;break;case 45:lf===45&&strlen(Pf)==2&&(yf=0)}}return tt}function ruleset(F,W,q,K,X,tt,rt,ot,ut,yn,uo){for(var po=X-1,mo=X===0?tt:[""],wo=sizeof(mo),lf=0,yf=0,cf=0;lf0?mo[vf]+" "+_f:replace$4(_f,/&\f/g,mo[vf])))&&(ut[cf++]=$f);return node$1(F,W,q,X===0?RULESET:ot,ut,yn,uo)}function comment(F,W,q){return node$1(F,W,q,COMMENT,from$a(char()),substr(F,2,-2),0)}function declaration(F,W,q,K){return node$1(F,W,q,DECLARATION,substr(F,0,K),substr(F,K+1,-1),K)}function serialize(F,W){for(var q="",K=sizeof(F),X=0;X{},debug:(...F)=>{},info:(...F)=>{},warn:(...F)=>{},error:(...F)=>{},fatal:(...F)=>{}},setLogLevel$1=function(F="fatal"){let W=LEVELS.fatal;typeof F=="string"?(F=F.toLowerCase(),F in LEVELS&&(W=LEVELS[F])):typeof F=="number"&&(W=F),log$1.trace=()=>{},log$1.debug=()=>{},log$1.info=()=>{},log$1.warn=()=>{},log$1.error=()=>{},log$1.fatal=()=>{},W<=LEVELS.fatal&&(log$1.fatal=console.error?console.error.bind(console,format$1("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",format$1("FATAL"))),W<=LEVELS.error&&(log$1.error=console.error?console.error.bind(console,format$1("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",format$1("ERROR"))),W<=LEVELS.warn&&(log$1.warn=console.warn?console.warn.bind(console,format$1("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",format$1("WARN"))),W<=LEVELS.info&&(log$1.info=console.info?console.info.bind(console,format$1("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",format$1("INFO"))),W<=LEVELS.debug&&(log$1.debug=console.debug?console.debug.bind(console,format$1("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",format$1("DEBUG"))),W<=LEVELS.trace&&(log$1.trace=console.debug?console.debug.bind(console,format$1("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",format$1("TRACE")))},format$1=F=>`%c${dayjs().format("ss.SSS")} : ${F} : `,lineBreakRegex=//gi,getRows=F=>F?breakToPlaceholder(F).replace(/\\n/g,"#br#").split("#br#"):[""],setupDompurifyHooksIfNotSetup=(()=>{let F=!1;return()=>{F||(setupDompurifyHooks(),F=!0)}})();function setupDompurifyHooks(){const F="data-temp-href-target";purify.addHook("beforeSanitizeAttributes",W=>{W.tagName==="A"&&W.hasAttribute("target")&&W.setAttribute(F,W.getAttribute("target")||"")}),purify.addHook("afterSanitizeAttributes",W=>{W.tagName==="A"&&W.hasAttribute(F)&&(W.setAttribute("target",W.getAttribute(F)||""),W.removeAttribute(F),W.getAttribute("target")==="_blank"&&W.setAttribute("rel","noopener"))})}const removeScript=F=>(setupDompurifyHooksIfNotSetup(),purify.sanitize(F)),sanitizeMore=(F,W)=>{var q;if(((q=W.flowchart)==null?void 0:q.htmlLabels)!==!1){const K=W.securityLevel;K==="antiscript"||K==="strict"?F=removeScript(F):K!=="loose"&&(F=breakToPlaceholder(F),F=F.replace(//g,">"),F=F.replace(/=/g,"="),F=placeholderToBreak(F))}return F},sanitizeText$2=(F,W)=>F&&(W.dompurifyConfig?F=purify.sanitize(sanitizeMore(F,W),W.dompurifyConfig).toString():F=purify.sanitize(sanitizeMore(F,W),{FORBID_TAGS:["style"]}).toString(),F),sanitizeTextOrArray=(F,W)=>typeof F=="string"?sanitizeText$2(F,W):F.flat().map(q=>sanitizeText$2(q,W)),hasBreaks=F=>lineBreakRegex.test(F),splitBreaks=F=>F.split(lineBreakRegex),placeholderToBreak=F=>F.replace(/#br#/g,"
"),breakToPlaceholder=F=>F.replace(lineBreakRegex,"#br#"),getUrl=F=>{let W="";return F&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replaceAll(/\(/g,"\\("),W=W.replaceAll(/\)/g,"\\)")),W},evaluate=F=>!(F===!1||["false","null","0"].includes(String(F).trim().toLowerCase())),getMax=function(...F){const W=F.filter(q=>!isNaN(q));return Math.max(...W)},getMin=function(...F){const W=F.filter(q=>!isNaN(q));return Math.min(...W)},parseGenericTypes=function(F){const W=F.split(/(,)/),q=[];for(let K=0;K0&&K+1Math.max(0,F.split(W).length-1),shouldCombineSets=(F,W)=>{const q=countOccurrence(F,"~"),K=countOccurrence(W,"~");return q===1&&K===1},processSet=F=>{const W=countOccurrence(F,"~");let q=!1;if(W<=1)return F;W%2!==0&&F.startsWith("~")&&(F=F.substring(1),q=!0);const K=[...F];let X=K.indexOf("~"),tt=K.lastIndexOf("~");for(;X!==-1&&tt!==-1&&X!==tt;)K[X]="<",K[tt]=">",X=K.indexOf("~"),tt=K.lastIndexOf("~");return q&&K.unshift("~"),K.join("")},isMathMLSupported=()=>window.MathMLElement!==void 0,katexRegex=/\$\$(.*)\$\$/g,hasKatex=F=>{var W;return(((W=F.match(katexRegex))==null?void 0:W.length)??0)>0},calculateMathMLDimensions=async(F,W)=>{F=await renderKatex(F,W);const q=document.createElement("div");q.innerHTML=F,q.id="katex-temp",q.style.visibility="hidden",q.style.position="absolute",q.style.top="0";const K=document.querySelector("body");K==null||K.insertAdjacentElement("beforeend",q);const X={width:q.clientWidth,height:q.clientHeight};return q.remove(),X},renderKatex=async(F,W)=>{if(!hasKatex(F))return F;if(!isMathMLSupported()&&!W.legacyMathML)return F.replace(katexRegex,"MathML is unsupported in this environment.");const{default:q}=await __vitePreload(()=>import("./katex-3eb4982e.js"),[]);return F.split(lineBreakRegex).map(K=>hasKatex(K)?`
${K}
@@ -3792,11 +3792,11 @@ ${F.themeCSS}`),F.fontFamily!==void 0&&(K+=` :root { --mermaid-font-family: ${F.fontFamily}}`),F.altFontFamily!==void 0&&(K+=` :root { --mermaid-alt-font-family: ${F.altFontFamily}}`),!isEmpty(W)){const ot=F.htmlLabels||((q=F.flowchart)==null?void 0:q.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const ut in W){const yn=W[ut];isEmpty(yn.styles)||ot.forEach(uo=>{K+=cssImportantStyles(yn.id,uo,yn.styles)}),isEmpty(yn.textStyles)||(K+=cssImportantStyles(yn.id,"tspan",yn.textStyles))}}return K},createUserStyles=(F,W,q,K)=>{const X=createCssStyles(F,q),tt=getStyles$1(W,X,F.themeVariables);return serialize(compile(`${K}{${tt}}`),stringify$5)},cleanUpSvgCode=(F="",W,q)=>{let K=F;return!q&&!W&&(K=K.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),K=decodeEntities(K),K=K.replace(/
/g,"
"),K},putIntoIFrame=(F="",W)=>{var q,K;const X=(K=(q=W==null?void 0:W.viewBox)==null?void 0:q.baseVal)!=null&&K.height?W.viewBox.baseVal.height+"px":IFRAME_HEIGHT,tt=btoa(''+F+"");return``},appendDivSvgG=(F,W,q,K,X)=>{const tt=F.append("div");tt.attr("id",q),K&&tt.attr("style",K);const rt=tt.append("svg").attr("id",W).attr("width","100%").attr("xmlns",XMLNS_SVG_STD);return X&&rt.attr("xmlns:xlink",X),rt.append("g"),F};function sandboxedIframe(F,W){return F.append("iframe").attr("id",W).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const removeExistingElements=(F,W,q,K)=>{var X,tt,rt;(X=F.getElementById(W))==null||X.remove(),(tt=F.getElementById(q))==null||tt.remove(),(rt=F.getElementById(K))==null||rt.remove()},render$1=async function(F,W,q){var K,X,tt,rt,ot,ut;addDiagrams();const yn=processAndSetConfigs(W);W=yn.code;const uo=getConfig$1();log$1.debug(uo),W.length>((uo==null?void 0:uo.maxTextSize)??MAX_TEXTLENGTH)&&(W=MAX_TEXTLENGTH_EXCEEDED_MSG);const po="#"+F,mo="i"+F,wo="#"+mo,lf="d"+F,yf="#"+lf;let cf=select("body");const vf=uo.securityLevel===SECURITY_LVL_SANDBOX,_f=uo.securityLevel===SECURITY_LVL_LOOSE,$f=uo.fontFamily;if(q!==void 0){if(q&&(q.innerHTML=""),vf){const yp=sandboxedIframe(select(q),mo);cf=select(yp.nodes()[0].contentDocument.body),cf.node().style.margin=0}else cf=select(q);appendDivSvgG(cf,F,lf,`font-family: ${$f}`,XMLNS_XLINK_STD)}else{if(removeExistingElements(document,F,lf,mo),vf){const yp=sandboxedIframe(select("body"),mo);cf=select(yp.nodes()[0].contentDocument.body),cf.node().style.margin=0}else cf=select("body");appendDivSvgG(cf,F,lf)}let wf,Pf;try{wf=await getDiagramFromText(W,{title:yn.title})}catch(yp){wf=new Diagram("error"),Pf=yp}const Cf=cf.select(yf).node(),Af=wf.type,Bf=Cf.firstChild,Hf=Bf.firstChild,Df=(X=(K=wf.renderer).getClasses)==null?void 0:X.call(K,W,wf),Lf=createUserStyles(uo,Af,Df,po),kf=document.createElement("style");kf.innerHTML=Lf,Bf.insertBefore(kf,Hf);try{await wf.renderer.draw(W,F,version$3,wf)}catch(yp){throw errorRenderer.draw(W,F,version$3),yp}const Nf=cf.select(`${yf} svg`),Yf=(rt=(tt=wf.db).getAccTitle)==null?void 0:rt.call(tt),Gf=(ut=(ot=wf.db).getAccDescription)==null?void 0:ut.call(ot);addA11yInfo(Af,Nf,Yf,Gf),cf.select(`[id="${F}"]`).selectAll("foreignobject > *").attr("xmlns",XMLNS_XHTML_STD);let rp=cf.select(yf).node().innerHTML;if(log$1.debug("config.arrowMarkerAbsolute",uo.arrowMarkerAbsolute),rp=cleanUpSvgCode(rp,vf,evaluate(uo.arrowMarkerAbsolute)),vf){const yp=cf.select(yf+" svg").node();rp=putIntoIFrame(rp,yp)}else _f||(rp=purify.sanitize(rp,{ADD_TAGS:DOMPURIFY_TAGS,ADD_ATTR:DOMPURIFY_ATTR}));if(attachFunctions(),Pf)throw Pf;const ap=select(vf?wo:yf).node();return ap&&"remove"in ap&&ap.remove(),{svg:rp,bindFunctions:wf.db.bindFunctions}};function initialize$1(F={}){var W;F!=null&&F.fontFamily&&!((W=F.themeVariables)!=null&&W.fontFamily)&&(F.themeVariables||(F.themeVariables={}),F.themeVariables.fontFamily=F.fontFamily),saveConfigFromInitialize(F),F!=null&&F.theme&&F.theme in theme?F.themeVariables=theme[F.theme].getThemeVariables(F.themeVariables):F&&(F.themeVariables=theme.default.getThemeVariables(F.themeVariables));const q=typeof F=="object"?setSiteConfig(F):getSiteConfig();setLogLevel$1(q.logLevel),addDiagrams()}const getDiagramFromText=(F,W={})=>{const{code:q}=preprocessDiagram(F);return getDiagramFromText$1(q,W)};function addA11yInfo(F,W,q,K){setA11yDiagramInfo(W,F),addSVGa11yTitleDescription(W,q,K,W.attr("id"))}const mermaidAPI=Object.freeze({render:render$1,parse:parse$1,getDiagramFromText,initialize:initialize$1,getConfig:getConfig$1,setConfig:setConfig$1,getSiteConfig,updateSiteConfig,reset:()=>{reset()},globalReset:()=>{reset(defaultConfig$1)},defaultConfig:defaultConfig$1});setLogLevel$1(getConfig$1().logLevel);reset(getConfig$1());const loadRegisteredDiagrams=async()=>{log$1.debug("Loading registered diagrams");const W=(await Promise.allSettled(Object.entries(detectors).map(async([q,{detector:K,loader:X}])=>{if(X)try{getDiagram(q)}catch{try{const{diagram:rt,id:ot}=await X();registerDiagram(ot,rt,K)}catch(rt){throw log$1.error(`Failed to load external diagram with key ${q}. Removing from detectors.`),delete detectors[q],rt}}}))).filter(q=>q.status==="rejected");if(W.length>0){log$1.error(`Failed to load ${W.length} external diagrams`);for(const q of W)log$1.error(q);throw new Error(`Failed to load ${W.length} external diagrams`)}},handleError=(F,W,q)=>{log$1.warn(F),isDetailedError(F)?(q&&q(F.str,F.hash),W.push({...F,message:F.str,error:F})):(q&&q(F),F instanceof Error&&W.push({str:F.message,message:F.message,hash:F.name,error:F}))},run$1=async function(F={querySelector:".mermaid"}){try{await runThrowsErrors(F)}catch(W){if(isDetailedError(W)&&log$1.error(W.str),mermaid.parseError&&mermaid.parseError(W),!F.suppressErrors)throw log$1.error("Use the suppressErrors option to suppress these errors"),W}},runThrowsErrors=async function({postRenderCallback:F,querySelector:W,nodes:q}={querySelector:".mermaid"}){const K=mermaidAPI.getConfig();log$1.debug(`${F?"":"No "}Callback function found`);let X;if(q)X=q;else if(W)X=document.querySelectorAll(W);else throw new Error("Nodes and querySelector are both undefined");log$1.debug(`Found ${X.length} diagrams`),(K==null?void 0:K.startOnLoad)!==void 0&&(log$1.debug("Start On Load: "+(K==null?void 0:K.startOnLoad)),mermaidAPI.updateSiteConfig({startOnLoad:K==null?void 0:K.startOnLoad}));const tt=new utils.InitIDGenerator(K.deterministicIds,K.deterministicIDSeed);let rt;const ot=[];for(const ut of Array.from(X)){log$1.info("Rendering diagram: "+ut.id);/*! Check if previously processed */if(ut.getAttribute("data-processed"))continue;ut.setAttribute("data-processed","true");const yn=`mermaid-${tt.next()}`;rt=ut.innerHTML,rt=dedent(utils.entityDecode(rt)).trim().replace(//gi,"
");const uo=utils.detectInit(rt);uo&&log$1.debug("Detected early reinit: ",uo);try{const{svg:po,bindFunctions:mo}=await render(yn,rt,ut);ut.innerHTML=po,F&&await F(yn),mo&&mo(ut)}catch(po){handleError(po,ot,mermaid.parseError)}}if(ot.length>0)throw ot[0]},initialize=function(F){mermaidAPI.initialize(F)},init=async function(F,W,q){log$1.warn("mermaid.init is deprecated. Please use run instead."),F&&initialize(F);const K={postRenderCallback:q,querySelector:".mermaid"};typeof W=="string"?K.querySelector=W:W&&(W instanceof HTMLElement?K.nodes=[W]:K.nodes=W),await run$1(K)},registerExternalDiagrams=async(F,{lazyLoad:W=!0}={})=>{registerLazyLoadedDiagrams(...F),W===!1&&await loadRegisteredDiagrams()},contentLoaded=function(){if(mermaid.startOnLoad){const{startOnLoad:F}=mermaidAPI.getConfig();F&&mermaid.run().catch(W=>log$1.error("Mermaid failed to initialize",W))}};if(typeof document<"u"){/*! +`},appendDivSvgG=(F,W,q,K,X)=>{const tt=F.append("div");tt.attr("id",q),K&&tt.attr("style",K);const rt=tt.append("svg").attr("id",W).attr("width","100%").attr("xmlns",XMLNS_SVG_STD);return X&&rt.attr("xmlns:xlink",X),rt.append("g"),F};function sandboxedIframe(F,W){return F.append("iframe").attr("id",W).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const removeExistingElements=(F,W,q,K)=>{var X,tt,rt;(X=F.getElementById(W))==null||X.remove(),(tt=F.getElementById(q))==null||tt.remove(),(rt=F.getElementById(K))==null||rt.remove()},render$1=async function(F,W,q){var K,X,tt,rt,ot,ut;addDiagrams();const yn=processAndSetConfigs(W);W=yn.code;const uo=getConfig$1();log$1.debug(uo),W.length>((uo==null?void 0:uo.maxTextSize)??MAX_TEXTLENGTH)&&(W=MAX_TEXTLENGTH_EXCEEDED_MSG);const po="#"+F,mo="i"+F,wo="#"+mo,lf="d"+F,yf="#"+lf;let cf=select("body");const vf=uo.securityLevel===SECURITY_LVL_SANDBOX,_f=uo.securityLevel===SECURITY_LVL_LOOSE,$f=uo.fontFamily;if(q!==void 0){if(q&&(q.innerHTML=""),vf){const yp=sandboxedIframe(select(q),mo);cf=select(yp.nodes()[0].contentDocument.body),cf.node().style.margin=0}else cf=select(q);appendDivSvgG(cf,F,lf,`font-family: ${$f}`,XMLNS_XLINK_STD)}else{if(removeExistingElements(document,F,lf,mo),vf){const yp=sandboxedIframe(select("body"),mo);cf=select(yp.nodes()[0].contentDocument.body),cf.node().style.margin=0}else cf=select("body");appendDivSvgG(cf,F,lf)}let xf,Af;try{xf=await getDiagramFromText(W,{title:yn.title})}catch(yp){xf=new Diagram("error"),Af=yp}const Cf=cf.select(yf).node(),Pf=xf.type,Bf=Cf.firstChild,Hf=Bf.firstChild,Df=(X=(K=xf.renderer).getClasses)==null?void 0:X.call(K,W,xf),Lf=createUserStyles(uo,Pf,Df,po),kf=document.createElement("style");kf.innerHTML=Lf,Bf.insertBefore(kf,Hf);try{await xf.renderer.draw(W,F,version$3,xf)}catch(yp){throw errorRenderer.draw(W,F,version$3),yp}const Nf=cf.select(`${yf} svg`),Yf=(rt=(tt=xf.db).getAccTitle)==null?void 0:rt.call(tt),Gf=(ut=(ot=xf.db).getAccDescription)==null?void 0:ut.call(ot);addA11yInfo(Pf,Nf,Yf,Gf),cf.select(`[id="${F}"]`).selectAll("foreignobject > *").attr("xmlns",XMLNS_XHTML_STD);let rp=cf.select(yf).node().innerHTML;if(log$1.debug("config.arrowMarkerAbsolute",uo.arrowMarkerAbsolute),rp=cleanUpSvgCode(rp,vf,evaluate(uo.arrowMarkerAbsolute)),vf){const yp=cf.select(yf+" svg").node();rp=putIntoIFrame(rp,yp)}else _f||(rp=purify.sanitize(rp,{ADD_TAGS:DOMPURIFY_TAGS,ADD_ATTR:DOMPURIFY_ATTR}));if(attachFunctions(),Af)throw Af;const ap=select(vf?wo:yf).node();return ap&&"remove"in ap&&ap.remove(),{svg:rp,bindFunctions:xf.db.bindFunctions}};function initialize$1(F={}){var W;F!=null&&F.fontFamily&&!((W=F.themeVariables)!=null&&W.fontFamily)&&(F.themeVariables||(F.themeVariables={}),F.themeVariables.fontFamily=F.fontFamily),saveConfigFromInitialize(F),F!=null&&F.theme&&F.theme in theme?F.themeVariables=theme[F.theme].getThemeVariables(F.themeVariables):F&&(F.themeVariables=theme.default.getThemeVariables(F.themeVariables));const q=typeof F=="object"?setSiteConfig(F):getSiteConfig();setLogLevel$1(q.logLevel),addDiagrams()}const getDiagramFromText=(F,W={})=>{const{code:q}=preprocessDiagram(F);return getDiagramFromText$1(q,W)};function addA11yInfo(F,W,q,K){setA11yDiagramInfo(W,F),addSVGa11yTitleDescription(W,q,K,W.attr("id"))}const mermaidAPI=Object.freeze({render:render$1,parse:parse$1,getDiagramFromText,initialize:initialize$1,getConfig:getConfig$1,setConfig:setConfig$1,getSiteConfig,updateSiteConfig,reset:()=>{reset()},globalReset:()=>{reset(defaultConfig$1)},defaultConfig:defaultConfig$1});setLogLevel$1(getConfig$1().logLevel);reset(getConfig$1());const loadRegisteredDiagrams=async()=>{log$1.debug("Loading registered diagrams");const W=(await Promise.allSettled(Object.entries(detectors).map(async([q,{detector:K,loader:X}])=>{if(X)try{getDiagram(q)}catch{try{const{diagram:rt,id:ot}=await X();registerDiagram(ot,rt,K)}catch(rt){throw log$1.error(`Failed to load external diagram with key ${q}. Removing from detectors.`),delete detectors[q],rt}}}))).filter(q=>q.status==="rejected");if(W.length>0){log$1.error(`Failed to load ${W.length} external diagrams`);for(const q of W)log$1.error(q);throw new Error(`Failed to load ${W.length} external diagrams`)}},handleError=(F,W,q)=>{log$1.warn(F),isDetailedError(F)?(q&&q(F.str,F.hash),W.push({...F,message:F.str,error:F})):(q&&q(F),F instanceof Error&&W.push({str:F.message,message:F.message,hash:F.name,error:F}))},run$1=async function(F={querySelector:".mermaid"}){try{await runThrowsErrors(F)}catch(W){if(isDetailedError(W)&&log$1.error(W.str),mermaid.parseError&&mermaid.parseError(W),!F.suppressErrors)throw log$1.error("Use the suppressErrors option to suppress these errors"),W}},runThrowsErrors=async function({postRenderCallback:F,querySelector:W,nodes:q}={querySelector:".mermaid"}){const K=mermaidAPI.getConfig();log$1.debug(`${F?"":"No "}Callback function found`);let X;if(q)X=q;else if(W)X=document.querySelectorAll(W);else throw new Error("Nodes and querySelector are both undefined");log$1.debug(`Found ${X.length} diagrams`),(K==null?void 0:K.startOnLoad)!==void 0&&(log$1.debug("Start On Load: "+(K==null?void 0:K.startOnLoad)),mermaidAPI.updateSiteConfig({startOnLoad:K==null?void 0:K.startOnLoad}));const tt=new utils.InitIDGenerator(K.deterministicIds,K.deterministicIDSeed);let rt;const ot=[];for(const ut of Array.from(X)){log$1.info("Rendering diagram: "+ut.id);/*! Check if previously processed */if(ut.getAttribute("data-processed"))continue;ut.setAttribute("data-processed","true");const yn=`mermaid-${tt.next()}`;rt=ut.innerHTML,rt=dedent(utils.entityDecode(rt)).trim().replace(//gi,"
");const uo=utils.detectInit(rt);uo&&log$1.debug("Detected early reinit: ",uo);try{const{svg:po,bindFunctions:mo}=await render(yn,rt,ut);ut.innerHTML=po,F&&await F(yn),mo&&mo(ut)}catch(po){handleError(po,ot,mermaid.parseError)}}if(ot.length>0)throw ot[0]},initialize=function(F){mermaidAPI.initialize(F)},init=async function(F,W,q){log$1.warn("mermaid.init is deprecated. Please use run instead."),F&&initialize(F);const K={postRenderCallback:q,querySelector:".mermaid"};typeof W=="string"?K.querySelector=W:W&&(W instanceof HTMLElement?K.nodes=[W]:K.nodes=W),await run$1(K)},registerExternalDiagrams=async(F,{lazyLoad:W=!0}={})=>{registerLazyLoadedDiagrams(...F),W===!1&&await loadRegisteredDiagrams()},contentLoaded=function(){if(mermaid.startOnLoad){const{startOnLoad:F}=mermaidAPI.getConfig();F&&mermaid.run().catch(W=>log$1.error("Mermaid failed to initialize",W))}};if(typeof document<"u"){/*! * Wait for document loaded before starting the execution */window.addEventListener("load",contentLoaded,!1)}const setParseErrorHandler=function(F){mermaid.parseError=F},executionQueue=[];let executionQueueRunning=!1;const executeQueue=async()=>{if(!executionQueueRunning){for(executionQueueRunning=!0;executionQueue.length>0;){const F=executionQueue.shift();if(F)try{await F()}catch(W){log$1.error("Error executing queue",W)}}executionQueueRunning=!1}},parse=async(F,W)=>new Promise((q,K)=>{const X=()=>new Promise((tt,rt)=>{mermaidAPI.parse(F,W).then(ot=>{tt(ot),q(ot)},ot=>{var ut;log$1.error("Error parsing",ot),(ut=mermaid.parseError)==null||ut.call(mermaid,ot),rt(ot),K(ot)})});executionQueue.push(X),executeQueue().catch(K)}),render=(F,W,q)=>new Promise((K,X)=>{const tt=()=>new Promise((rt,ot)=>{mermaidAPI.render(F,W,q).then(ut=>{rt(ut),K(ut)},ut=>{var yn;log$1.error("Error parsing",ut),(yn=mermaid.parseError)==null||yn.call(mermaid,ut),ot(ut),X(ut)})});executionQueue.push(tt),executeQueue().catch(X)}),mermaid={startOnLoad:!0,mermaidAPI,parse,render,init,run:run$1,registerExternalDiagrams,initialize,parseError:void 0,contentLoaded,setParseErrorHandler,detectType},_hoisted_1$6={key:0,class:"caption"},_sfc_main$8=defineComponent({__name:"Mermaid.ce",props:{caption:{type:String},height:{type:String},width:{type:String}},setup(F){const W=F;watch$1(W,()=>{W.width&&(K.value.style.width=`${W.width}px`),W.height&&(K.value.style.height=`${W.height}px`)});const q=ref(null),K=computed(()=>{var ot,ut;return(ut=(ot=q.value)==null?void 0:ot.getRootNode())==null?void 0:ut.host}),X=ref(null);watch$1(K,()=>{W.width&&(K.value.style.width=`${W.width}px`),W.height&&(K.value.style.height=`${W.height}px`),mermaid.initialize({startOnLoad:!1})});const tt=computed(()=>{var ot;return(ot=K.value)==null?void 0:ot.textContent.trim().replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}),rt=computed(()=>W.caption);return watch$1(tt,async ot=>{const{svg:ut}=await mermaid.render("diagram",ot);X.value&&(X.value.innerHTML=ut)}),(ot,ut)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:q,class:"content"},[createBaseVNode("div",{class:"diagram",ref_key:"diagram",ref:X},null,512),rt.value?(openBlock(),createElementBlock("div",_hoisted_1$6,toDisplayString(rt.value),1)):createCommentVNode("",!0)],512))}}),_style_0$6=`*{box-sizing:border-box}.content{display:flex;flex-wrap:wrap;flex-direction:column;justify-content:center;align-content:center;box-shadow:0 2px 4px #00000080!important}.diagram{display:block;margin:auto;padding:12px 0;text-align:center;width:100%}.caption{text-align:start;padding:6px 12px;font-size:1.2em;border:1px solid #ddd} `,Mermaid=_export_sfc(_sfc_main$8,[["styles",[_style_0$6]]]),_sfc_main$7=defineComponent({__name:"Meta.ce",props:{title:{type:String},description:{type:String},author:{type:String},viewport:{type:String},robots:{type:String}},setup(F){return(W,q)=>null}}),_hoisted_1$5={class:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto min-h-[calc(100%-3.5rem)] flex items-center"},_hoisted_2$4={class:"flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"},_hoisted_3$4={class:"p-4 overflow-y-auto"},_hoisted_4$4={class:"mt-1 text-gray-800 dark:text-gray-400"},_sfc_main$6=defineComponent({__name:"Modal.ce",props:{open:{type:Boolean,default:!1}},setup(F){const W=F,q=ref(null),K=ref(null),X=computed(()=>{var yn,uo;return(uo=(yn=q.value)==null?void 0:yn.getRootNode())==null?void 0:uo.host}),tt=computed(()=>q==null?void 0:q.value),rt=computed(()=>K==null?void 0:K.value),ot=computed(()=>new HSOverlay(tt.value));watch$1(rt,()=>{ot.value.init(),rt.value.addEventListener("open.hs.overlay",yn=>ut.value=!0),rt.value.addEventListener("close.hs.overlay",yn=>ut.value=!1)});const ut=ref(!1);return watch$1(ut,yn=>{yn?(ot.value.open(rt.value),X.value.setAttribute("open","")):(ot.value.close(rt.value),X.value.removeAttribute("open"))}),watch$1(W,()=>{ut.value=W.open}),onMounted(()=>{ut.value=W.open}),(yn,uo)=>(openBlock(),createElementBlock("div",{ref_key:"overlayRef",ref:q},[createBaseVNode("div",{ref_key:"modalRef",ref:K,id:"hs-basic-modal",class:"hs-overlay hidden w-full h-full fixed top-0 start-0 z-[80] overflow-x-hidden overflow-y-auto pointer-events-none"},[createBaseVNode("div",_hoisted_1$5,[createBaseVNode("div",_hoisted_2$4,[createBaseVNode("div",_hoisted_3$4,[createBaseVNode("p",_hoisted_4$4,[renderSlot(yn.$slots,"default")])])])])],512)],512))}}),_style_0$5=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.\\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.\\!relative{position:relative!important}.relative{position:relative}.sticky{position:sticky}.-inset-1{top:-.25rem;right:-.25rem;bottom:-.25rem;left:-.25rem}.inset-0{top:0;right:0;bottom:0;left:0}.end-1{inset-inline-end:.25rem}.right-\\[10px\\]{right:10px}.start-0{inset-inline-start:0px}.top-0{top:0}.top-\\[12px\\]{top:12px}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.z-\\[80\\]{z-index:80}.float-right{float:right}.float-left{float:left}.float-none{float:none}.clear-left{clear:left}.clear-right{clear:right}.clear-both{clear:both}.clear-none{clear:none}.m-1{margin:.25rem}.m-3{margin:.75rem}.me-1{margin-inline-end:.25rem}.ml-1{margin-left:.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-none{overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.\\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\\!table{display:table!important}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.\\!grid{display:grid!important}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.h-1{height:.25rem}.h-40{height:10rem}.h-8{height:2rem}.h-80{height:20rem}.h-auto{height:auto}.h-full{height:100%}.min-h-\\[calc\\(100\\%-3\\.5rem\\)\\]{min-height:calc(100% - 3.5rem)}.w-1{width:.25rem}.w-\\[a-z0-9-\\]{width:a-z0-9-}.w-full{width:100%}.max-w-\\[24px\\]{max-width:24px}.max-w-xs{max-width:20rem}.flex-shrink,.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.caption-top{caption-side:top}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.\\!transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform,.transform-cpu{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}.cursor-pointer{cursor:pointer}.touch-auto{touch-action:auto}.touch-none{touch-action:none}.touch-pan-x{--tw-pan-x: pan-x;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-left{--tw-pan-x: pan-left;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-right{--tw-pan-x: pan-right;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-up{--tw-pan-y: pan-up;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-down{--tw-pan-y: pan-down;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pinch-zoom{--tw-pinch-zoom: pinch-zoom;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-manipulation{touch-action:manipulation}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize-none{resize:none}.resize-y{resize:vertical}.resize-x{resize:horizontal}.resize{resize:both}.snap-none{scroll-snap-type:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-both{scroll-snap-type:both var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.snap-proximity{--tw-scroll-snap-strictness: proximity}.snap-start{scroll-snap-align:start}.snap-end{scroll-snap-align:end}.snap-center{scroll-snap-align:center}.snap-align-none{scroll-snap-align:none}.snap-normal{scroll-snap-stop:normal}.snap-always{scroll-snap-stop:always}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.columns-1{-moz-columns:1;columns:1}.break-before-auto{-moz-column-break-before:auto;break-before:auto}.break-before-avoid{-moz-column-break-before:avoid;break-before:avoid}.break-before-all{-moz-column-break-before:all;break-before:all}.break-before-avoid-page{-moz-column-break-before:avoid;break-before:avoid-page}.break-before-page{-moz-column-break-before:page;break-before:page}.break-before-left{-moz-column-break-before:left;break-before:left}.break-before-right{-moz-column-break-before:right;break-before:right}.break-before-column{-moz-column-break-before:column;break-before:column}.break-inside-auto{-moz-column-break-inside:auto;break-inside:auto}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-inside-avoid-page{break-inside:avoid-page}.break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.break-after-auto{-moz-column-break-after:auto;break-after:auto}.break-after-avoid{-moz-column-break-after:avoid;break-after:avoid}.break-after-all{-moz-column-break-after:all;break-after:all}.break-after-avoid-page{-moz-column-break-after:avoid;break-after:avoid-page}.break-after-page{-moz-column-break-after:page;break-after:page}.break-after-left{-moz-column-break-after:left;break-after:left}.break-after-right{-moz-column-break-after:right;break-after:right}.break-after-column{-moz-column-break-after:column;break-after:column}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row-dense{grid-auto-flow:row dense}.grid-flow-col-dense{grid-auto-flow:column dense}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.flex-nowrap{flex-wrap:nowrap}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-content-end{place-content:end}.place-content-between{place-content:space-between}.place-content-around{place-content:space-around}.place-content-evenly{place-content:space-evenly}.place-content-baseline{place-content:baseline}.place-content-stretch{place-content:stretch}.place-items-start{place-items:start}.place-items-end{place-items:end}.place-items-center{place-items:center}.place-items-baseline{place-items:baseline}.place-items-stretch{place-items:stretch}.content-normal{align-content:normal}.content-center{align-content:center}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-evenly{align-content:space-evenly}.content-baseline{align-content:baseline}.content-stretch{align-content:stretch}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-normal{justify-content:normal}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-stretch{justify-content:stretch}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.divide-dashed>:not([hidden])~:not([hidden]){border-style:dashed}.divide-dotted>:not([hidden])~:not([hidden]){border-style:dotted}.divide-double>:not([hidden])~:not([hidden]){border-style:double}.divide-none>:not([hidden])~:not([hidden]){border-style:none}.place-self-auto{place-self:auto}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.place-self-stretch{place-self:stretch}.self-auto{align-self:auto}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.self-baseline{align-self:baseline}.justify-self-auto{justify-self:auto}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.justify-self-stretch{justify-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-x-clip{overflow-x:clip}.overflow-y-clip{overflow-y:clip}.overflow-x-visible{overflow-x:visible}.overflow-y-visible{overflow-y:visible}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.overscroll-auto{overscroll-behavior:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.overscroll-y-auto{overscroll-behavior-y:auto}.overscroll-y-contain{overscroll-behavior-y:contain}.overscroll-y-none{overscroll-behavior-y:none}.overscroll-x-auto{overscroll-behavior-x:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-x-none{overscroll-behavior-x:none}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.hyphens-none{-webkit-hyphens:none;hyphens:none}.hyphens-manual{-webkit-hyphens:manual;hyphens:manual}.hyphens-auto{-webkit-hyphens:auto;hyphens:auto}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.whitespace-break-spaces{white-space:break-spaces}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-e{border-inline-end-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-double{border-style:double}.border-hidden{border-style:hidden}.border-none{border-style:none}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-\\[rgb\\(255\\,0\\,0\\)\\]{--tw-bg-opacity: 1;background-color:rgb(255 0 0 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-content{background-clip:content-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-origin-border{background-origin:border-box}.bg-origin-padding{background-origin:padding-box}.bg-origin-content{background-origin:content-box}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.object-none{-o-object-fit:none;object-fit:none}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-14{padding:3.5rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-8{padding:2rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pe-1{padding-inline-end:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-top{vertical-align:text-top}.align-text-bottom{vertical-align:text-bottom}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.\\!ordinal{--tw-ordinal: ordinal !important;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero: slashed-zero;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure: lining-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure: oldstyle-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing: proportional-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction: diagonal-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction: stacked-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.text-\\[\\#336699\\]\\/\\[\\.35\\]{color:#33669959}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.bg-blend-normal{background-blend-mode:normal}.bg-blend-multiply{background-blend-mode:multiply}.bg-blend-screen{background-blend-mode:screen}.bg-blend-overlay{background-blend-mode:overlay}.bg-blend-darken{background-blend-mode:darken}.bg-blend-lighten{background-blend-mode:lighten}.bg-blend-color-dodge{background-blend-mode:color-dodge}.bg-blend-color-burn{background-blend-mode:color-burn}.bg-blend-hard-light{background-blend-mode:hard-light}.bg-blend-soft-light{background-blend-mode:soft-light}.bg-blend-difference{background-blend-mode:difference}.bg-blend-exclusion{background-blend-mode:exclusion}.bg-blend-hue{background-blend-mode:hue}.bg-blend-saturation{background-blend-mode:saturation}.bg-blend-color{background-blend-mode:color}.bg-blend-luminosity{background-blend-mode:luminosity}.mix-blend-normal{mix-blend-mode:normal}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-screen{mix-blend-mode:screen}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-darken{mix-blend-mode:darken}.mix-blend-lighten{mix-blend-mode:lighten}.mix-blend-color-dodge{mix-blend-mode:color-dodge}.mix-blend-color-burn{mix-blend-mode:color-burn}.mix-blend-hard-light{mix-blend-mode:hard-light}.mix-blend-soft-light{mix-blend-mode:soft-light}.mix-blend-difference{mix-blend-mode:difference}.mix-blend-exclusion{mix-blend-mode:exclusion}.mix-blend-hue{mix-blend-mode:hue}.mix-blend-saturation{mix-blend-mode:saturation}.mix-blend-color{mix-blend-mode:color}.mix-blend-luminosity{mix-blend-mode:luminosity}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-dashed{outline-style:dashed}.outline-dotted{outline-style:dotted}.outline-double{outline-style:double}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!invert{--tw-invert: invert(100%) !important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter-none{filter:none}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-grayscale{--tw-backdrop-grayscale: grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-invert{--tw-backdrop-invert: invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-sepia{--tw-backdrop-sepia: sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter-none{-webkit-backdrop-filter:none;backdrop-filter:none}.\\!transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.content-\\[\\'this-is-also-valid\\]-weirdly-enough\\'\\]{--tw-content: "this-is-also-valid]-weirdly-enough";content:var(--tw-content)}.\\[--placement\\:bottom\\]{--placement: bottom}.\\[--placement\\:top\\]{--placement: top}.\\[--trigger\\:click\\]{--trigger: click}.\\[-\\:\\=\\]{-: =}.\\[a-zA-Z0-9\\:\\\\\\\\-\\\\\\\\\\._\\$\\]{a-z-a--z0-9:\\\\-\\\\. $}.\\[a-zA-Z0-9\\:_-\\]{a-z-a--z0-9:-}.\\[a-zA-Z\\:_\\]{a-z-a--z:}.\\[a\\:a\\]{a:a}.\\[vite\\:css\\]{vite:css}.\\[vite\\:html\\]{vite:html}html{padding:1rem;font-family:sans-serif}ve-header ul,ve-menu ul{display:none}@media (min-width: 640px){.sm\\:container{width:100%}@media (min-width: 640px){.sm\\:container{max-width:640px}}@media (min-width: 768px){.sm\\:container{max-width:768px}}@media (min-width: 1024px){.sm\\:container{max-width:1024px}}@media (min-width: 1280px){.sm\\:container{max-width:1280px}}@media (min-width: 1536px){.sm\\:container{max-width:1536px}}}.hover\\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\\:font-bold:hover{font-weight:700}.before\\:hover\\:text-center:hover:before{content:var(--tw-content);text-align:center}.hover\\:before\\:text-center:hover:before{content:var(--tw-content);text-align:center}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\\:hover\\:text-center:hover:focus{text-align:center}.hover\\:focus\\:text-center:focus:hover{text-align:center}.hs-tooltip.show .hs-tooltip-shown\\:visible{visibility:visible}.hs-tooltip.show .hs-tooltip-shown\\:opacity-100{opacity:1}.open.hs-overlay-open\\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\\:opacity-100{opacity:1}.open.hs-overlay-open\\:duration-500{transition-duration:.5s}.open .hs-overlay-open\\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\\:opacity-100{opacity:1}.open .hs-overlay-open\\:duration-500{transition-duration:.5s}:is(.dark .dark\\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\\:shadow-slate-700\\/\\[\\.7\\]){--tw-shadow-color: rgb(51 65 85 / .7);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\\:focus\\:ring-offset-gray-800:focus){--tw-ring-offset-color: #1f2937}@media (min-width: 640px){.sm\\:mx-auto{margin-left:auto;margin-right:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:underline{text-decoration-line:underline}}@media (min-width: 768px){.md\\:p-5{padding:1.25rem}}@media (min-width: 1024px){:is(.dark .dark\\:lg\\:hover\\:\\[paint-order\\:markers\\]:hover){paint-order:markers}} -`,Modal=_export_sfc(_sfc_main$6,[["styles",[_style_0$5]]]);var lib$2={},IdentifierIssuer_1=class EP{constructor(W,q=new Map,K=0){this.prefix=W,this._existing=q,this.counter=K}clone(){const{prefix:W,_existing:q,counter:K}=this;return new EP(W,new Map(q),K)}getId(W){const q=W&&this._existing.get(W);if(q)return q;const K=this.prefix+this.counter;return this.counter++,W&&this._existing.set(W,K),K}hasId(W){return this._existing.has(W)}getOldIds(){return[...this._existing.keys()]}};(function(F,W){if(F.setImmediate)return;var q=1,K={},X=!1,tt=F.document,rt;function ot(_f){typeof _f!="function"&&(_f=new Function(""+_f));for(var $f=new Array(arguments.length-1),wf=0;wf<$f.length;wf++)$f[wf]=arguments[wf+1];var Pf={callback:_f,args:$f};return K[q]=Pf,rt(q),q++}function ut(_f){delete K[_f]}function yn(_f){var $f=_f.callback,wf=_f.args;switch(wf.length){case 0:$f();break;case 1:$f(wf[0]);break;case 2:$f(wf[0],wf[1]);break;case 3:$f(wf[0],wf[1],wf[2]);break;default:$f.apply(W,wf);break}}function uo(_f){if(X)setTimeout(uo,0,_f);else{var $f=K[_f];if($f){X=!0;try{yn($f)}finally{ut(_f),X=!1}}}}function po(){rt=function(_f){process.nextTick(function(){uo(_f)})}}function mo(){if(F.postMessage&&!F.importScripts){var _f=!0,$f=F.onmessage;return F.onmessage=function(){_f=!1},F.postMessage("","*"),F.onmessage=$f,_f}}function wo(){var _f="setImmediate$"+Math.random()+"$",$f=function(wf){wf.source===F&&typeof wf.data=="string"&&wf.data.indexOf(_f)===0&&uo(+wf.data.slice(_f.length))};F.addEventListener?F.addEventListener("message",$f,!1):F.attachEvent("onmessage",$f),rt=function(wf){F.postMessage(_f+wf,"*")}}function lf(){var _f=new MessageChannel;_f.port1.onmessage=function($f){var wf=$f.data;uo(wf)},rt=function($f){_f.port2.postMessage($f)}}function yf(){var _f=tt.documentElement;rt=function($f){var wf=tt.createElement("script");wf.onreadystatechange=function(){uo($f),wf.onreadystatechange=null,_f.removeChild(wf),wf=null},_f.appendChild(wf)}}function cf(){rt=function(_f){setTimeout(uo,0,_f)}}var vf=Object.getPrototypeOf&&Object.getPrototypeOf(F);vf=vf&&vf.setTimeout?vf:F,{}.toString.call(F.process)==="[object process]"?po():mo()?wo():F.MessageChannel?lf():tt&&"onreadystatechange"in tt.createElement("script")?yf():cf(),vf.setImmediate=ot,vf.clearImmediate=ut})(typeof self>"u"?commonjsGlobal$3:self);/*! +`,Modal=_export_sfc(_sfc_main$6,[["styles",[_style_0$5]]]);var lib$2={},IdentifierIssuer_1=class EP{constructor(W,q=new Map,K=0){this.prefix=W,this._existing=q,this.counter=K}clone(){const{prefix:W,_existing:q,counter:K}=this;return new EP(W,new Map(q),K)}getId(W){const q=W&&this._existing.get(W);if(q)return q;const K=this.prefix+this.counter;return this.counter++,W&&this._existing.set(W,K),K}hasId(W){return this._existing.has(W)}getOldIds(){return[...this._existing.keys()]}};(function(F,W){if(F.setImmediate)return;var q=1,K={},X=!1,tt=F.document,rt;function ot(_f){typeof _f!="function"&&(_f=new Function(""+_f));for(var $f=new Array(arguments.length-1),xf=0;xf<$f.length;xf++)$f[xf]=arguments[xf+1];var Af={callback:_f,args:$f};return K[q]=Af,rt(q),q++}function ut(_f){delete K[_f]}function yn(_f){var $f=_f.callback,xf=_f.args;switch(xf.length){case 0:$f();break;case 1:$f(xf[0]);break;case 2:$f(xf[0],xf[1]);break;case 3:$f(xf[0],xf[1],xf[2]);break;default:$f.apply(W,xf);break}}function uo(_f){if(X)setTimeout(uo,0,_f);else{var $f=K[_f];if($f){X=!0;try{yn($f)}finally{ut(_f),X=!1}}}}function po(){rt=function(_f){process.nextTick(function(){uo(_f)})}}function mo(){if(F.postMessage&&!F.importScripts){var _f=!0,$f=F.onmessage;return F.onmessage=function(){_f=!1},F.postMessage("","*"),F.onmessage=$f,_f}}function wo(){var _f="setImmediate$"+Math.random()+"$",$f=function(xf){xf.source===F&&typeof xf.data=="string"&&xf.data.indexOf(_f)===0&&uo(+xf.data.slice(_f.length))};F.addEventListener?F.addEventListener("message",$f,!1):F.attachEvent("onmessage",$f),rt=function(xf){F.postMessage(_f+xf,"*")}}function lf(){var _f=new MessageChannel;_f.port1.onmessage=function($f){var xf=$f.data;uo(xf)},rt=function($f){_f.port2.postMessage($f)}}function yf(){var _f=tt.documentElement;rt=function($f){var xf=tt.createElement("script");xf.onreadystatechange=function(){uo($f),xf.onreadystatechange=null,_f.removeChild(xf),xf=null},_f.appendChild(xf)}}function cf(){rt=function(_f){setTimeout(uo,0,_f)}}var vf=Object.getPrototypeOf&&Object.getPrototypeOf(F);vf=vf&&vf.setTimeout?vf:F,{}.toString.call(F.process)==="[object process]"?po():mo()?wo():F.MessageChannel?lf():tt&&"onreadystatechange"in tt.createElement("script")?yf():cf(),vf.setImmediate=ot,vf.clearImmediate=ut})(typeof self>"u"?commonjsGlobal$3:self);/*! * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved. */const crypto$1=self.crypto||self.msCrypto;var MessageDigestBrowser=class{constructor(W){if(!(crypto$1&&crypto$1.subtle))throw new Error("crypto.subtle not found.");if(W==="sha256")this.algorithm={name:"SHA-256"};else if(W==="sha1")this.algorithm={name:"SHA-1"};else throw new Error(`Unsupported algorithm "${W}".`);this._content=""}update(W){this._content+=W}async digest(){const W=new TextEncoder().encode(this._content),q=new Uint8Array(await crypto$1.subtle.digest(this.algorithm,W));let K="";for(let X=0;Xnew MessageDigest$1("sha256"),canonicalIdMap:q=new Map,maxDeepIterations:K=1/0}={}){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new IdentifierIssuer$2("_:c14n",q),this.createMessageDigest=W,this.maxDeepIterations=K,this.quads=null,this.deepIterations=null}main(W){this.deepIterations=new Map,this.quads=W;for(const ot of W)this._addBlankNodeQuadInfo({quad:ot,component:ot.subject}),this._addBlankNodeQuadInfo({quad:ot,component:ot.object}),this._addBlankNodeQuadInfo({quad:ot,component:ot.graph});const q=new Map,K=[...this.blankNodeInfo.keys()];for(const ot of K)this._hashAndTrackBlankNode({id:ot,hashToBlankNodes:q});const X=[...q.keys()].sort(),tt=[];for(const ot of X){const ut=q.get(ot);if(ut.length>1){tt.push(ut);continue}const yn=ut[0];this.canonicalIssuer.getId(yn)}for(const ot of tt){const ut=[];for(const yn of ot){if(this.canonicalIssuer.hasId(yn))continue;const uo=new IdentifierIssuer$2("_:b");uo.getId(yn);const po=this.hashNDegreeQuads(yn,uo);ut.push(po)}ut.sort(_stringHashCompare);for(const yn of ut){const uo=yn.issuer.getOldIds();for(const po of uo)this.canonicalIssuer.getId(po)}}const rt=[];for(const ot of this.quads){const ut=NQuads$2.serializeQuadComponents(this._componentWithCanonicalId({component:ot.subject}),ot.predicate,this._componentWithCanonicalId({component:ot.object}),this._componentWithCanonicalId({component:ot.graph}));rt.push(ut)}return rt.sort(),rt.join("")}hashFirstDegreeQuads(W){const q=[],K=this.blankNodeInfo.get(W),X=K.quads;for(const rt of X){const ot={subject:null,predicate:rt.predicate,object:null,graph:null};ot.subject=this.modifyFirstDegreeComponent(W,rt.subject,"subject"),ot.object=this.modifyFirstDegreeComponent(W,rt.object,"object"),ot.graph=this.modifyFirstDegreeComponent(W,rt.graph,"graph"),q.push(NQuads$2.serializeQuad(ot))}q.sort();const tt=this.createMessageDigest();for(const rt of q)tt.update(rt);return K.hash=tt.digest(),K.hash}hashRelatedBlankNode(W,q,K,X){let tt;this.canonicalIssuer.hasId(W)?tt=this.canonicalIssuer.getId(W):K.hasId(W)?tt=K.getId(W):tt=this.blankNodeInfo.get(W).hash;const rt=this.createMessageDigest();return rt.update(X),X!=="g"&&rt.update(this.getRelatedPredicate(q)),rt.update(tt),rt.digest()}hashNDegreeQuads(W,q){const K=this.deepIterations.get(W)||0;if(K>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(W,K+1);const X=this.createMessageDigest(),tt=this.createHashToRelated(W,q),rt=[...tt.keys()].sort();for(const ot of rt){X.update(ot);let ut="",yn;const uo=new Permuter(tt.get(ot));for(;uo.hasNext();){const po=uo.next();let mo=q.clone(),wo="";const lf=[];let yf=!1;for(const cf of po)if(this.canonicalIssuer.hasId(cf)?wo+=this.canonicalIssuer.getId(cf):(mo.hasId(cf)||lf.push(cf),wo+=mo.getId(cf)),ut.length!==0&&wo>ut){yf=!0;break}if(!yf){for(const cf of lf){const vf=this.hashNDegreeQuads(cf,mo);if(wo+=mo.getId(cf),wo+=`<${vf.hash}>`,mo=vf.issuer,ut.length!==0&&wo>ut){yf=!0;break}}yf||(ut.length===0||wo`}createHashToRelated(W,q){const K=new Map,X=this.blankNodeInfo.get(W).quads;for(const tt of X)this._addRelatedBlankNodeHash({quad:tt,component:tt.subject,position:"s",id:W,issuer:q,hashToRelated:K}),this._addRelatedBlankNodeHash({quad:tt,component:tt.object,position:"o",id:W,issuer:q,hashToRelated:K}),this._addRelatedBlankNodeHash({quad:tt,component:tt.graph,position:"g",id:W,issuer:q,hashToRelated:K});return K}_hashAndTrackBlankNode({id:W,hashToBlankNodes:q}){const K=this.hashFirstDegreeQuads(W),X=q.get(K);X?X.push(W):q.set(K,[W])}_addBlankNodeQuadInfo({quad:W,component:q}){if(q.termType!=="BlankNode")return;const K=q.value,X=this.blankNodeInfo.get(K);X?X.quads.add(W):this.blankNodeInfo.set(K,{quads:new Set([W]),hash:null})}_addRelatedBlankNodeHash({quad:W,component:q,position:K,id:X,issuer:tt,hashToRelated:rt}){if(!(q.termType==="BlankNode"&&q.value!==X))return;const ot=q.value,ut=this.hashRelatedBlankNode(ot,W,tt,K),yn=rt.get(ut);yn?yn.push(ot):rt.set(ut,[ot])}_componentWithCanonicalId({component:W}){return W.termType==="BlankNode"&&!W.value.startsWith(this.canonicalIssuer.prefix)?{termType:"BlankNode",value:this.canonicalIssuer.getId(W.value)}:W}};function _stringHashCompare(F,W){return F.hashW.hash?1:0}/*! * Copyright (c) 2016-2021 Digital Bazaar, Inc. All rights reserved. - */const MessageDigest=MessageDigestBrowser,URDNA2015Sync=URDNA2015Sync_1;var URGNA2012Sync=class extends URDNA2015Sync{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new MessageDigest("sha1")}modifyFirstDegreeComponent(W,q,K){return q.termType!=="BlankNode"?q:K==="graph"?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:q.value===W?"_:a":"_:z"}}getRelatedPredicate(W){return W.predicate.value}createHashToRelated(W,q){const K=new Map,X=this.blankNodeInfo.get(W).quads;for(const tt of X){let rt,ot;if(tt.subject.termType==="BlankNode"&&tt.subject.value!==W)ot=tt.subject.value,rt="p";else if(tt.object.termType==="BlankNode"&&tt.object.value!==W)ot=tt.object.value,rt="r";else continue;const ut=this.hashRelatedBlankNode(ot,tt,q,rt),yn=K.get(ut);yn?yn.push(ot):K.set(ut,[ot])}return K}};(function(F){const W=URDNA2015_1,q=URGNA2012,K=URDNA2015Sync_1,X=URGNA2012Sync;let tt;try{tt=require$$4}catch{}function rt(ot){return Array.isArray(ot)?ot:F.NQuads.legacyDatasetToQuads(ot)}F.NQuads=NQuads_1,F.IdentifierIssuer=IdentifierIssuer_1,F._rdfCanonizeNative=function(ot){return ot&&(tt=ot),tt},F.canonize=async function(ot,ut){const yn=rt(ot);if(ut.useNative){if(!tt)throw new Error("rdf-canonize-native not available");if(ut.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return new Promise((uo,po)=>tt.canonize(yn,ut,(mo,wo)=>mo?po(mo):uo(wo)))}if(ut.algorithm==="URDNA2015")return new W(ut).main(yn);if(ut.algorithm==="URGNA2012"){if(ut.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new q(ut).main(yn)}throw"algorithm"in ut?new Error("Invalid RDF Dataset Canonicalization algorithm: "+ut.algorithm):new Error("No RDF Dataset Canonicalization algorithm specified.")},F._canonizeSync=function(ot,ut){const yn=rt(ot);if(ut.useNative){if(!tt)throw new Error("rdf-canonize-native not available");if(ut.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return tt.canonizeSync(yn,ut)}if(ut.algorithm==="URDNA2015")return new K(ut).main(yn);if(ut.algorithm==="URGNA2012"){if(ut.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new X(ut).main(yn)}throw"algorithm"in ut?new Error("Invalid RDF Dataset Canonicalization algorithm: "+ut.algorithm):new Error("No RDF Dataset Canonicalization algorithm specified.")}})(lib$2);var rdfCanonize=lib$2;const api$d={};var types$7=api$d;api$d.isArray=Array.isArray;api$d.isBoolean=F=>typeof F=="boolean"||Object.prototype.toString.call(F)==="[object Boolean]";api$d.isDouble=F=>api$d.isNumber(F)&&(String(F).indexOf(".")!==-1||Math.abs(F)>=1e21);api$d.isEmptyObject=F=>api$d.isObject(F)&&Object.keys(F).length===0;api$d.isNumber=F=>typeof F=="number"||Object.prototype.toString.call(F)==="[object Number]";api$d.isNumeric=F=>!isNaN(parseFloat(F))&&isFinite(F);api$d.isObject=F=>Object.prototype.toString.call(F)==="[object Object]";api$d.isString=F=>typeof F=="string"||Object.prototype.toString.call(F)==="[object String]";api$d.isUndefined=F=>typeof F>"u";const types$6=types$7,api$c={};var graphTypes$5=api$c;api$c.isSubject=F=>types$6.isObject(F)&&!("@value"in F||"@set"in F||"@list"in F)?Object.keys(F).length>1||!("@id"in F):!1;api$c.isSubjectReference=F=>types$6.isObject(F)&&Object.keys(F).length===1&&"@id"in F;api$c.isValue=F=>types$6.isObject(F)&&"@value"in F;api$c.isList=F=>types$6.isObject(F)&&"@list"in F;api$c.isGraph=F=>types$6.isObject(F)&&"@graph"in F&&Object.keys(F).filter(W=>W!=="@id"&&W!=="@index").length===1;api$c.isSimpleGraph=F=>api$c.isGraph(F)&&!("@id"in F);api$c.isBlankNode=F=>{if(types$6.isObject(F)){if("@id"in F){const W=F["@id"];return!types$6.isString(W)||W.indexOf("_:")===0}return Object.keys(F).length===0||!("@value"in F||"@set"in F||"@list"in F)}return!1};var JsonLdError_1=class extends Error{constructor(W="An unspecified JSON-LD error occurred.",q="jsonld.Error",K={}){super(W),this.name=q,this.message=W,this.details=K}};const graphTypes$4=graphTypes$5,types$5=types$7,IdentifierIssuer$1=rdfCanonize.IdentifierIssuer,JsonLdError$b=JsonLdError_1,REGEX_BCP47$3=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/,REGEX_LINK_HEADERS=/(?:<[^>]*?>|"[^"]*?"|[^,])+/g,REGEX_LINK_HEADER$1=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,REGEX_LINK_HEADER_PARAMS=/(.*?)=(?:(?:"([^"]*?)")|([^"]*?))\s*(?:(?:;\s*)|$)/g,REGEX_KEYWORD$3=/^@[a-zA-Z]+$/,DEFAULTS={headers:{accept:"application/ld+json, application/json"}},api$b={};var util$8=api$b;api$b.IdentifierIssuer=IdentifierIssuer$1;api$b.REGEX_BCP47=REGEX_BCP47$3;api$b.REGEX_KEYWORD=REGEX_KEYWORD$3;api$b.clone=function(F){if(F&&typeof F=="object"){let W;if(types$5.isArray(F)){W=[];for(let q=0;q{if(Object.keys(F).some(q=>q.toLowerCase()==="accept"))throw new RangeError('Accept header may not be specified; only "'+DEFAULTS.headers.accept+'" is supported.');return Object.assign({Accept:DEFAULTS.headers.accept},F)};api$b.parseLinkHeader=F=>{const W={},q=F.match(REGEX_LINK_HEADERS);for(let K=0;K{if(!types$5.isString(F)&&!(types$5.isArray(F)&&F.every(q=>types$5.isString(q)))){if(W&&types$5.isObject(F))switch(Object.keys(F).length){case 0:return;case 1:if("@default"in F&&api$b.asArray(F["@default"]).every(q=>types$5.isString(q)))return}throw new JsonLdError$b('Invalid JSON-LD syntax; "@type" value must a string, an array of strings, an empty object, or a default object.',"jsonld.SyntaxError",{code:"invalid type value",value:F})}};api$b.hasProperty=(F,W)=>{if(F.hasOwnProperty(W)){const q=F[W];return!types$5.isArray(q)||q.length>0}return!1};api$b.hasValue=(F,W,q)=>{if(api$b.hasProperty(F,W)){let K=F[W];const X=graphTypes$4.isList(K);if(types$5.isArray(K)||X){X&&(K=K["@list"]);for(let tt=0;tt{if(K=K||{},"propertyIsArray"in K||(K.propertyIsArray=!1),"valueIsArray"in K||(K.valueIsArray=!1),"allowDuplicate"in K||(K.allowDuplicate=!0),"prependValue"in K||(K.prependValue=!1),K.valueIsArray)F[W]=q;else if(types$5.isArray(q)){q.length===0&&K.propertyIsArray&&!F.hasOwnProperty(W)&&(F[W]=[]),K.prependValue&&(q=q.concat(F[W]),F[W]=[]);for(let X=0;X[].concat(F[W]||[]);api$b.removeProperty=(F,W)=>{delete F[W]};api$b.removeValue=(F,W,q,K)=>{K=K||{},"propertyIsArray"in K||(K.propertyIsArray=!1);const X=api$b.getValues(F,W).filter(tt=>!api$b.compareValues(tt,q));X.length===0?api$b.removeProperty(F,W):X.length===1&&!K.propertyIsArray?F[W]=X[0]:F[W]=X};api$b.relabelBlankNodes=(F,W)=>{W=W||{};const q=W.issuer||new IdentifierIssuer$1("_:b");return _labelBlankNodes(q,F)};api$b.compareValues=(F,W)=>F===W||graphTypes$4.isValue(F)&&graphTypes$4.isValue(W)&&F["@value"]===W["@value"]&&F["@type"]===W["@type"]&&F["@language"]===W["@language"]&&F["@index"]===W["@index"]?!0:types$5.isObject(F)&&"@id"in F&&types$5.isObject(W)&&"@id"in W?F["@id"]===W["@id"]:!1;api$b.compareShortestLeast=(F,W)=>F.length{const q={},K=api$a.parsers[W||"full"],X=K.regex.exec(F);let tt=K.keys.length;for(;tt--;)q[K.keys[tt]]=X[tt]===void 0?null:X[tt];return(q.scheme==="https"&&q.port==="443"||q.scheme==="http"&&q.port==="80")&&(q.href=q.href.replace(":"+q.port,""),q.authority=q.authority.replace(":"+q.port,""),q.port=null),q.normalizedPath=api$a.removeDotSegments(q.path),q};api$a.prependBase=(F,W)=>{if(F===null||api$a.isAbsolute(W))return W;(!F||types$4.isString(F))&&(F=api$a.parse(F||""));const q=api$a.parse(W),K={protocol:F.protocol||""};if(q.authority!==null)K.authority=q.authority,K.path=q.path,K.query=q.query;else if(K.authority=F.authority,q.path==="")K.path=F.path,q.query!==null?K.query=q.query:K.query=F.query;else{if(q.path.indexOf("/")===0)K.path=q.path;else{let tt=F.path;tt=tt.substr(0,tt.lastIndexOf("/")+1),(tt.length>0||F.authority)&&tt.substr(-1)!=="/"&&(tt+="/"),tt+=q.path,K.path=tt}K.query=q.query}q.path!==""&&(K.path=api$a.removeDotSegments(K.path));let X=K.protocol;return K.authority!==null&&(X+="//"+K.authority),X+=K.path,K.query!==null&&(X+="?"+K.query),q.fragment!==null&&(X+="#"+q.fragment),X===""&&(X="./"),X};api$a.removeBase=(F,W)=>{if(F===null)return W;(!F||types$4.isString(F))&&(F=api$a.parse(F||""));let q="";if(F.href!==""?q+=(F.protocol||"")+"//"+(F.authority||""):W.indexOf("//")&&(q+="//"),W.indexOf(q)!==0)return W;const K=api$a.parse(W.substr(q.length)),X=F.normalizedPath.split("/"),tt=K.normalizedPath.split("/"),rt=K.fragment||K.query?0:1;for(;X.length>0&&tt.length>rt&&X[0]===tt[0];)X.shift(),tt.shift();let ot="";if(X.length>0){X.pop();for(let ut=0;ut{if(F.length===0)return"";const W=F.split("/"),q=[];for(;W.length>0;){const K=W.shift(),X=W.length===0;if(K==="."){X&&q.push("");continue}if(K===".."){q.pop(),X&&q.push("");continue}q.push(K)}return F[0]==="/"&&q.length>0&&q[0]!==""&&q.unshift(""),q.length===1&&q[0]===""?"/":q.join("/")};const isAbsoluteRegex=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;api$a.isAbsolute=F=>types$4.isString(F)&&isAbsoluteRegex.test(F);api$a.isRelative=F=>types$4.isString(F);const{parseLinkHeader,buildHeaders}=util$8,{LINK_HEADER_CONTEXT}=constants,JsonLdError$a=JsonLdError_1,RequestQueue=requireRequestQueue(),{prependBase:prependBase$2}=url$1,REGEX_LINK_HEADER=/(^|(\r\n))link:/i;var xhr=({secure:F,headers:W={},xhr:q}={headers:{}})=>{return W=buildHeaders(W),new RequestQueue().wrapLoader(X);async function X(tt){if(tt.indexOf("http:")!==0&&tt.indexOf("https:")!==0)throw new JsonLdError$a('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:tt});if(F&&tt.indexOf("https")!==0)throw new JsonLdError$a(`URL could not be dereferenced; secure mode is enabled and the URL's scheme is not "https".`,"jsonld.InvalidUrl",{code:"loading document failed",url:tt});let rt;try{rt=await _get$1(q,tt,W)}catch(po){throw new JsonLdError$a("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:tt,cause:po})}if(rt.status>=400)throw new JsonLdError$a("URL could not be dereferenced: "+rt.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:tt,httpStatusCode:rt.status});let ot={contextUrl:null,documentUrl:tt,document:rt.response},ut=null;const yn=rt.getResponseHeader("Content-Type");let uo;if(REGEX_LINK_HEADER.test(rt.getAllResponseHeaders())&&(uo=rt.getResponseHeader("Link")),uo&&yn!=="application/ld+json"){const po=parseLinkHeader(uo),mo=po[LINK_HEADER_CONTEXT];if(Array.isArray(mo))throw new JsonLdError$a("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:tt});mo&&(ot.contextUrl=mo.target),ut=po.alternate,ut&&ut.type=="application/ld+json"&&!(yn||"").match(/^application\/(\w*\+)?json$/)&&(ot=await X(prependBase$2(tt,ut.target)))}return ot}};function _get$1(F,W,q){F=F||XMLHttpRequest;const K=new F;return new Promise((X,tt)=>{K.onload=()=>X(K),K.onerror=rt=>tt(rt),K.open("GET",W,!0);for(const rt in q)K.setRequestHeader(rt,q[rt]);K.send()})}const xhrLoader=xhr,api$9={};var platformBrowser=api$9;api$9.setupDocumentLoaders=function(F){typeof XMLHttpRequest<"u"&&(F.documentLoaders.xhr=xhrLoader,F.useDocumentLoader("xhr"))};api$9.setupGlobals=function(F){typeof globalThis.JsonLdProcessor>"u"&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:F.JsonLdProcessor})};var iterator$7,hasRequiredIterator;function requireIterator(){return hasRequiredIterator||(hasRequiredIterator=1,iterator$7=function(F){F.prototype[Symbol.iterator]=function*(){for(let W=this.head;W;W=W.next)yield W.value}}),iterator$7}var yallist=Yallist$1;Yallist$1.Node=Node$2;Yallist$1.create=Yallist$1;function Yallist$1(F){var W=this;if(W instanceof Yallist$1||(W=new Yallist$1),W.tail=null,W.head=null,W.length=0,F&&typeof F.forEach=="function")F.forEach(function(X){W.push(X)});else if(arguments.length>0)for(var q=0,K=arguments.length;q1)q=W;else if(this.head)K=this.head.next,q=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var X=0;K!==null;X++)q=F(q,K.value,X),K=K.next;return q};Yallist$1.prototype.reduceReverse=function(F,W){var q,K=this.tail;if(arguments.length>1)q=W;else if(this.tail)K=this.tail.prev,q=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var X=this.length-1;K!==null;X--)q=F(q,K.value,X),K=K.prev;return q};Yallist$1.prototype.toArray=function(){for(var F=new Array(this.length),W=0,q=this.head;q!==null;W++)F[W]=q.value,q=q.next;return F};Yallist$1.prototype.toArrayReverse=function(){for(var F=new Array(this.length),W=0,q=this.tail;q!==null;W++)F[W]=q.value,q=q.prev;return F};Yallist$1.prototype.slice=function(F,W){W=W||this.length,W<0&&(W+=this.length),F=F||0,F<0&&(F+=this.length);var q=new Yallist$1;if(Wthis.length&&(W=this.length);for(var K=0,X=this.head;X!==null&&Kthis.length&&(W=this.length);for(var K=this.length,X=this.tail;X!==null&&K>W;K--)X=X.prev;for(;X!==null&&K>F;K--,X=X.prev)q.push(X.value);return q};Yallist$1.prototype.splice=function(F,W,...q){F>this.length&&(F=this.length-1),F<0&&(F=this.length+F);for(var K=0,X=this.head;X!==null&&K1;class LRUCache{constructor(W){if(typeof W=="number"&&(W={max:W}),W||(W={}),W.max&&(typeof W.max!="number"||W.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=W.max||1/0;const q=W.length||naiveLength;if(this[LENGTH_CALCULATOR]=typeof q!="function"?naiveLength:q,this[ALLOW_STALE]=W.stale||!1,W.maxAge&&typeof W.maxAge!="number")throw new TypeError("maxAge must be a number");this[MAX_AGE]=W.maxAge||0,this[DISPOSE]=W.dispose,this[NO_DISPOSE_ON_SET]=W.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=W.updateAgeOnGet||!1,this.reset()}set max(W){if(typeof W!="number"||W<0)throw new TypeError("max must be a non-negative number");this[MAX]=W||1/0,trim$3(this)}get max(){return this[MAX]}set allowStale(W){this[ALLOW_STALE]=!!W}get allowStale(){return this[ALLOW_STALE]}set maxAge(W){if(typeof W!="number")throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=W,trim$3(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(W){typeof W!="function"&&(W=naiveLength),W!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=W,this[LENGTH]=0,this[LRU_LIST].forEach(q=>{q.length=this[LENGTH_CALCULATOR](q.value,q.key),this[LENGTH]+=q.length})),trim$3(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(W,q){q=q||this;for(let K=this[LRU_LIST].tail;K!==null;){const X=K.prev;forEachStep(this,W,K,q),K=X}}forEach(W,q){q=q||this;for(let K=this[LRU_LIST].head;K!==null;){const X=K.next;forEachStep(this,W,K,q),K=X}}keys(){return this[LRU_LIST].toArray().map(W=>W.key)}values(){return this[LRU_LIST].toArray().map(W=>W.value)}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach(W=>this[DISPOSE](W.key,W.value)),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map(W=>isStale(this,W)?!1:{k:W.key,v:W.value,e:W.now+(W.maxAge||0)}).toArray().filter(W=>W)}dumpLru(){return this[LRU_LIST]}set(W,q,K){if(K=K||this[MAX_AGE],K&&typeof K!="number")throw new TypeError("maxAge must be a number");const X=K?Date.now():0,tt=this[LENGTH_CALCULATOR](q,W);if(this[CACHE].has(W)){if(tt>this[MAX])return del(this,this[CACHE].get(W)),!1;const ut=this[CACHE].get(W).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](W,ut.value)),ut.now=X,ut.maxAge=K,ut.value=q,this[LENGTH]+=tt-ut.length,ut.length=tt,this.get(W),trim$3(this),!0}const rt=new Entry(W,q,tt,X,K);return rt.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](W,q),!1):(this[LENGTH]+=rt.length,this[LRU_LIST].unshift(rt),this[CACHE].set(W,this[LRU_LIST].head),trim$3(this),!0)}has(W){if(!this[CACHE].has(W))return!1;const q=this[CACHE].get(W).value;return!isStale(this,q)}get(W){return get$9(this,W,!0)}peek(W){return get$9(this,W,!1)}pop(){const W=this[LRU_LIST].tail;return W?(del(this,W),W.value):null}del(W){del(this,this[CACHE].get(W))}load(W){this.reset();const q=Date.now();for(let K=W.length-1;K>=0;K--){const X=W[K],tt=X.e||0;if(tt===0)this.set(X.k,X.v);else{const rt=tt-q;rt>0&&this.set(X.k,X.v,rt)}}}prune(){this[CACHE].forEach((W,q)=>get$9(this,q,!1))}}const get$9=(F,W,q)=>{const K=F[CACHE].get(W);if(K){const X=K.value;if(isStale(F,X)){if(del(F,K),!F[ALLOW_STALE])return}else q&&(F[UPDATE_AGE_ON_GET]&&(K.value.now=Date.now()),F[LRU_LIST].unshiftNode(K));return X.value}},isStale=(F,W)=>{if(!W||!W.maxAge&&!F[MAX_AGE])return!1;const q=Date.now()-W.now;return W.maxAge?q>W.maxAge:F[MAX_AGE]&&q>F[MAX_AGE]},trim$3=F=>{if(F[LENGTH]>F[MAX])for(let W=F[LRU_LIST].tail;F[LENGTH]>F[MAX]&&W!==null;){const q=W.prev;del(F,W),W=q}},del=(F,W)=>{if(W){const q=W.value;F[DISPOSE]&&F[DISPOSE](q.key,q.value),F[LENGTH]-=q.length,F[CACHE].delete(q.key),F[LRU_LIST].removeNode(W)}};class Entry{constructor(W,q,K,X,tt){this.key=W,this.value=q,this.length=K,this.now=X,this.maxAge=tt||0}}const forEachStep=(F,W,q,K)=>{let X=q.value;isStale(F,X)&&(del(F,q),F[ALLOW_STALE]||(X=void 0)),X&&W.call(K,X.value,X.key,F)};var lruCache=LRUCache;const LRU$1=lruCache,MAX_ACTIVE_CONTEXTS=10;var ResolvedContext_1=class{constructor({document:W}){this.document=W,this.cache=new LRU$1({max:MAX_ACTIVE_CONTEXTS})}getProcessed(W){return this.cache.get(W)}setProcessed(W,q){this.cache.set(W,q)}};const{isArray:_isArray$5,isObject:_isObject$4,isString:_isString$4}=types$7,{asArray:_asArray$4}=util$8,{prependBase:prependBase$1}=url$1,JsonLdError$9=JsonLdError_1,ResolvedContext=ResolvedContext_1,MAX_CONTEXT_URLS=10;var ContextResolver_1=class{constructor({sharedCache:W}){this.perOpCache=new Map,this.sharedCache=W}async resolve({activeCtx:W,context:q,documentLoader:K,base:X,cycles:tt=new Set}){q&&_isObject$4(q)&&q["@context"]&&(q=q["@context"]),q=_asArray$4(q);const rt=[];for(const ot of q){if(_isString$4(ot)){let uo=this._get(ot);uo||(uo=await this._resolveRemoteContext({activeCtx:W,url:ot,documentLoader:K,base:X,cycles:tt})),_isArray$5(uo)?rt.push(...uo):rt.push(uo);continue}if(ot===null){rt.push(new ResolvedContext({document:null}));continue}_isObject$4(ot)||_throwInvalidLocalContext(q);const ut=JSON.stringify(ot);let yn=this._get(ut);yn||(yn=new ResolvedContext({document:ot}),this._cacheResolvedContext({key:ut,resolved:yn,tag:"static"})),rt.push(yn)}return rt}_get(W){let q=this.perOpCache.get(W);if(!q){const K=this.sharedCache.get(W);K&&(q=K.get("static"),q&&this.perOpCache.set(W,q))}return q}_cacheResolvedContext({key:W,resolved:q,tag:K}){if(this.perOpCache.set(W,q),K!==void 0){let X=this.sharedCache.get(W);X||(X=new Map,this.sharedCache.set(W,X)),X.set(K,q)}return q}async _resolveRemoteContext({activeCtx:W,url:q,documentLoader:K,base:X,cycles:tt}){q=prependBase$1(X,q);const{context:rt,remoteDoc:ot}=await this._fetchContext({activeCtx:W,url:q,documentLoader:K,cycles:tt});X=ot.documentUrl||q,_resolveContextUrls({context:rt,base:X});const ut=await this.resolve({activeCtx:W,context:rt,documentLoader:K,base:X,cycles:tt});return this._cacheResolvedContext({key:q,resolved:ut,tag:ot.tag}),ut}async _fetchContext({activeCtx:W,url:q,documentLoader:K,cycles:X}){if(X.size>MAX_CONTEXT_URLS)throw new JsonLdError$9("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:W.processingMode==="json-ld-1.0"?"loading remote context failed":"context overflow",max:MAX_CONTEXT_URLS});if(X.has(q))throw new JsonLdError$9("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:W.processingMode==="json-ld-1.0"?"recursive context inclusion":"context overflow",url:q});X.add(q);let tt,rt;try{rt=await K(q),tt=rt.document||null,_isString$4(tt)&&(tt=JSON.parse(tt))}catch(ot){throw new JsonLdError$9("Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.","jsonld.InvalidUrl",{code:"loading remote context failed",url:q,cause:ot})}if(!_isObject$4(tt))throw new JsonLdError$9("Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.","jsonld.InvalidUrl",{code:"invalid remote context",url:q});return"@context"in tt?tt={"@context":tt["@context"]}:tt={"@context":{}},rt.contextUrl&&(_isArray$5(tt["@context"])||(tt["@context"]=[tt["@context"]]),tt["@context"].push(rt.contextUrl)),{context:tt,remoteDoc:rt}}};function _throwInvalidLocalContext(F){throw new JsonLdError$9("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:F})}function _resolveContextUrls({context:F,base:W}){if(!F)return;const q=F["@context"];if(_isString$4(q)){F["@context"]=prependBase$1(W,q);return}if(_isArray$5(q)){for(let K=0;K{const W=[].concat(F.safe?api$8.safeEventHandler:[],F.eventHandler?_asArray$3(F.eventHandler):[],api$8.defaultEventHandler?api$8.defaultEventHandler:[]);return W.length===0?null:W};api$8.handleEvent=({event:F,options:W})=>{_handle({event:F,handlers:W.eventHandler})};function _handle({event:F,handlers:W}){let q=!0;for(let K=0;q&&K{q=!0}});else if(typeof X=="object")F.code in X?X[F.code]({event:F,next:()=>{q=!0}}):q=!0;else throw new JsonLdError$8("Invalid event handler.","jsonld.InvalidEventHandler",{event:F})}return q}const _notSafeEventCodes=new Set(["empty object","free-floating scalar","invalid @language value","invalid property","null @id value","null @value value","object with only @id","object with only @language","object with only @list","object with only @value","relative @id reference","relative @type reference","relative @vocab reference","reserved @id value","reserved @reverse value","reserved term","blank node predicate","relative graph reference","relative object reference","relative predicate reference","relative subject reference","rdfDirection not set"]);api$8.safeEventHandler=function F({event:W,next:q}){if(W.level==="warning"&&_notSafeEventCodes.has(W.code))throw new JsonLdError$8("Safe mode validation error.","jsonld.ValidationError",{event:W});q()};api$8.logEventHandler=function F({event:W,next:q}){console.log(`EVENT: ${W.message}`,{event:W}),q()};api$8.logWarningEventHandler=function F({event:W,next:q}){W.level==="warning"&&console.warn(`WARNING: ${W.message}`,{event:W}),q()};api$8.unhandledEventHandler=function F({event:W}){throw new JsonLdError$8("No handler for event.","jsonld.UnhandledEvent",{event:W})};api$8.setDefaultEventHandler=function({eventHandler:F}={}){api$8.defaultEventHandler=F?_asArray$3(F):null};const util$7=util$8,JsonLdError$7=JsonLdError_1,{isArray:_isArray$3,isObject:_isObject$3,isString:_isString$3,isUndefined:_isUndefined$2}=types$7,{isAbsolute:_isAbsoluteIri$2,isRelative:_isRelativeIri,prependBase}=url$1,{handleEvent:_handleEvent$3}=events,{REGEX_BCP47:REGEX_BCP47$2,REGEX_KEYWORD:REGEX_KEYWORD$2,asArray:_asArray$2,compareShortestLeast:_compareShortestLeast$1}=util$8,INITIAL_CONTEXT_CACHE=new Map,INITIAL_CONTEXT_CACHE_MAX_SIZE=1e4,api$7={};var context=api$7;api$7.process=async({activeCtx:F,localCtx:W,options:q,propagate:K=!0,overrideProtected:X=!1,cycles:tt=new Set})=>{if(_isObject$3(W)&&"@context"in W&&_isArray$3(W["@context"])&&(W=W["@context"]),_asArray$2(W).length===0)return F;const ot=[],ut=[({event:mo,next:wo})=>{ot.push(mo),wo()}];q.eventHandler&&ut.push(q.eventHandler);const yn=q;q={...q,eventHandler:ut};const uo=await q.contextResolver.resolve({activeCtx:F,context:W,documentLoader:q.documentLoader,base:q.base});_isObject$3(uo[0].document)&&typeof uo[0].document["@propagate"]=="boolean"&&(K=uo[0].document["@propagate"]);let po=F;!K&&!po.previousContext&&(po=po.clone(),po.previousContext=F);for(const mo of uo){let{document:wo}=mo;if(F=po,wo===null){if(!X&&Object.keys(F.protected).length!==0)throw new JsonLdError$7("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"});po=F=api$7.getInitialContext(q).clone();continue}const lf=mo.getProcessed(F);if(lf){if(yn.eventHandler)for(const cf of lf.events)_handleEvent$3({event:cf,options:yn});po=F=lf.context;continue}if(_isObject$3(wo)&&"@context"in wo&&(wo=wo["@context"]),!_isObject$3(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:wo});po=po.clone();const yf=new Map;if("@version"in wo){if(wo["@version"]!==1.1)throw new JsonLdError$7("Unsupported JSON-LD version: "+wo["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:wo});if(F.processingMode&&F.processingMode==="json-ld-1.0")throw new JsonLdError$7("@version: "+wo["@version"]+" not compatible with "+F.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:wo});po.processingMode="json-ld-1.1",po["@version"]=wo["@version"],yf.set("@version",!0)}if(po.processingMode=po.processingMode||F.processingMode,"@base"in wo){let cf=wo["@base"];if(!(cf===null||_isAbsoluteIri$2(cf)))if(_isRelativeIri(cf))cf=prependBase(po["@base"],cf);else throw new JsonLdError$7('Invalid JSON-LD syntax; the value of "@base" in a @context must be an absolute IRI, a relative IRI, or null.',"jsonld.SyntaxError",{code:"invalid base IRI",context:wo});po["@base"]=cf,yf.set("@base",!0)}if("@vocab"in wo){const cf=wo["@vocab"];if(cf===null)delete po["@vocab"];else if(_isString$3(cf)){if(!_isAbsoluteIri$2(cf)&&api$7.processingMode(po,1))throw new JsonLdError$7('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:wo});{const vf=_expandIri$3(po,cf,{vocab:!0,base:!0},void 0,void 0,q);_isAbsoluteIri$2(vf)||q.eventHandler&&_handleEvent$3({event:{type:["JsonLdEvent"],code:"relative @vocab reference",level:"warning",message:"Relative @vocab reference found.",details:{vocab:vf}},options:q}),po["@vocab"]=vf}}else throw new JsonLdError$7('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:wo});yf.set("@vocab",!0)}if("@language"in wo){const cf=wo["@language"];if(cf===null)delete po["@language"];else if(_isString$3(cf))cf.match(REGEX_BCP47$2)||q.eventHandler&&_handleEvent$3({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:cf}},options:q}),po["@language"]=cf.toLowerCase();else throw new JsonLdError$7('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:wo});yf.set("@language",!0)}if("@direction"in wo){const cf=wo["@direction"];if(F.processingMode==="json-ld-1.0")throw new JsonLdError$7("Invalid JSON-LD syntax; @direction not compatible with "+F.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:wo});if(cf===null)delete po["@direction"];else{if(cf!=="ltr"&&cf!=="rtl")throw new JsonLdError$7('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:wo});po["@direction"]=cf}yf.set("@direction",!0)}if("@propagate"in wo){const cf=wo["@propagate"];if(F.processingMode==="json-ld-1.0")throw new JsonLdError$7("Invalid JSON-LD syntax; @propagate not compatible with "+F.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:wo});if(typeof cf!="boolean")throw new JsonLdError$7("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:W});yf.set("@propagate",!0)}if("@import"in wo){const cf=wo["@import"];if(F.processingMode==="json-ld-1.0")throw new JsonLdError$7("Invalid JSON-LD syntax; @import not compatible with "+F.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:wo});if(!_isString$3(cf))throw new JsonLdError$7("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:W});const vf=await q.contextResolver.resolve({activeCtx:F,context:cf,documentLoader:q.documentLoader,base:q.base});if(vf.length!==1)throw new JsonLdError$7("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:W});const _f=vf[0].getProcessed(F);if(_f)wo=_f;else{const $f=vf[0].document;if("@import"in $f)throw new JsonLdError$7("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:W});for(const wf in $f)wo.hasOwnProperty(wf)||(wo[wf]=$f[wf]);vf[0].setProcessed(F,wo)}yf.set("@import",!0)}yf.set("@protected",wo["@protected"]||!1);for(const cf in wo)if(api$7.createTermDefinition({activeCtx:po,localCtx:wo,term:cf,defined:yf,options:q,overrideProtected:X}),_isObject$3(wo[cf])&&"@context"in wo[cf]){const vf=wo[cf]["@context"];let _f=!0;if(_isString$3(vf)){const $f=prependBase(q.base,vf);tt.has($f)?_f=!1:tt.add($f)}if(_f)try{await api$7.process({activeCtx:po.clone(),localCtx:wo[cf]["@context"],overrideProtected:!0,options:q,cycles:tt})}catch{throw new JsonLdError$7("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:wo[cf]["@context"],term:cf})}}mo.setProcessed(F,{context:po,events:ot})}return po};api$7.createTermDefinition=({activeCtx:F,localCtx:W,term:q,defined:K,options:X,overrideProtected:tt=!1})=>{if(K.has(q)){if(K.get(q))return;throw new JsonLdError$7("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:W,term:q})}K.set(q,!1);let rt;if(W.hasOwnProperty(q)&&(rt=W[q]),q==="@type"&&_isObject$3(rt)&&(rt["@container"]||"@set")==="@set"&&api$7.processingMode(F,1.1)){const wo=["@container","@id","@protected"],lf=Object.keys(rt);if(lf.length===0||lf.some(yf=>!wo.includes(yf)))throw new JsonLdError$7("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:W,term:q})}else{if(api$7.isKeyword(q))throw new JsonLdError$7("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:W,term:q});if(q.match(REGEX_KEYWORD$2)){X.eventHandler&&_handleEvent$3({event:{type:["JsonLdEvent"],code:"reserved term",level:"warning",message:'Terms beginning with "@" are reserved for future use and dropped.',details:{term:q}},options:X});return}else if(q==="")throw new JsonLdError$7("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:W})}const ot=F.mappings.get(q);F.mappings.has(q)&&F.mappings.delete(q);let ut=!1;if((_isString$3(rt)||rt===null)&&(ut=!0,rt={"@id":rt}),!_isObject$3(rt))throw new JsonLdError$7("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:W});const yn={};F.mappings.set(q,yn),yn.reverse=!1;const uo=["@container","@id","@language","@reverse","@type"];api$7.processingMode(F,1.1)&&uo.push("@context","@direction","@index","@nest","@prefix","@protected");for(const wo in rt)if(!uo.includes(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; a term definition must not contain "+wo,"jsonld.SyntaxError",{code:"invalid term definition",context:W});const po=q.indexOf(":");if(yn._termHasColon=po>0,"@reverse"in rt){if("@id"in rt)throw new JsonLdError$7("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:W});if("@nest"in rt)throw new JsonLdError$7("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:W});const wo=rt["@reverse"];if(!_isString$3(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:W});if(wo.match(REGEX_KEYWORD$2)){X.eventHandler&&_handleEvent$3({event:{type:["JsonLdEvent"],code:"reserved @reverse value",level:"warning",message:'@reverse values beginning with "@" are reserved for future use and dropped.',details:{reverse:wo}},options:X}),ot?F.mappings.set(q,ot):F.mappings.delete(q);return}const lf=_expandIri$3(F,wo,{vocab:!0,base:!1},W,K,X);if(!_isAbsoluteIri$2(lf))throw new JsonLdError$7("Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:W});yn["@id"]=lf,yn.reverse=!0}else if("@id"in rt){let wo=rt["@id"];if(wo&&!_isString$3(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:W});if(wo===null)yn["@id"]=null;else if(!api$7.isKeyword(wo)&&wo.match(REGEX_KEYWORD$2)){X.eventHandler&&_handleEvent$3({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:'@id values beginning with "@" are reserved for future use and dropped.',details:{id:wo}},options:X}),ot?F.mappings.set(q,ot):F.mappings.delete(q);return}else if(wo!==q){if(wo=_expandIri$3(F,wo,{vocab:!0,base:!1},W,K,X),!_isAbsoluteIri$2(wo)&&!api$7.isKeyword(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:W});if(q.match(/(?::[^:])|\//)){const lf=new Map(K).set(q,!0);if(_expandIri$3(F,q,{vocab:!0,base:!1},W,lf,X)!==wo)throw new JsonLdError$7("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:W})}yn["@id"]=wo,yn._prefix=ut&&!yn._termHasColon&&wo.match(/[:\/\?#\[\]@]$/)!==null}}if(!("@id"in yn))if(yn._termHasColon){const wo=q.substr(0,po);if(W.hasOwnProperty(wo)&&api$7.createTermDefinition({activeCtx:F,localCtx:W,term:wo,defined:K,options:X}),F.mappings.has(wo)){const lf=q.substr(po+1);yn["@id"]=F.mappings.get(wo)["@id"]+lf}else yn["@id"]=q}else if(q==="@type")yn["@id"]=q;else{if(!("@vocab"in F))throw new JsonLdError$7("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:W,term:q});yn["@id"]=F["@vocab"]+q}if((rt["@protected"]===!0||K.get("@protected")===!0&&rt["@protected"]!==!1)&&(F.protected[q]=!0,yn.protected=!0),K.set(q,!0),"@type"in rt){let wo=rt["@type"];if(!_isString$3(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:W});if(wo==="@json"||wo==="@none"){if(api$7.processingMode(F,1))throw new JsonLdError$7(`Invalid JSON-LD syntax; an @context @type value must not be "${wo}" in JSON-LD 1.0 mode.`,"jsonld.SyntaxError",{code:"invalid type mapping",context:W})}else if(wo!=="@id"&&wo!=="@vocab"){if(wo=_expandIri$3(F,wo,{vocab:!0,base:!1},W,K,X),!_isAbsoluteIri$2(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:W});if(wo.indexOf("_:")===0)throw new JsonLdError$7("Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.","jsonld.SyntaxError",{code:"invalid type mapping",context:W})}yn["@type"]=wo}if("@container"in rt){const wo=_isString$3(rt["@container"])?[rt["@container"]]:rt["@container"]||[],lf=["@list","@set","@index","@language"];let yf=!0;const cf=wo.includes("@set");if(api$7.processingMode(F,1.1)){if(lf.push("@graph","@id","@type"),wo.includes("@list")){if(wo.length!==1)throw new JsonLdError$7("Invalid JSON-LD syntax; @context @container with @list must have no other values","jsonld.SyntaxError",{code:"invalid container mapping",context:W})}else if(wo.includes("@graph")){if(wo.some(vf=>vf!=="@graph"&&vf!=="@id"&&vf!=="@index"&&vf!=="@set"))throw new JsonLdError$7("Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set","jsonld.SyntaxError",{code:"invalid container mapping",context:W})}else yf&=wo.length<=(cf?2:1);if(wo.includes("@type")&&(yn["@type"]=yn["@type"]||"@id",!["@id","@vocab"].includes(yn["@type"])))throw new JsonLdError$7("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:W})}else yf&=!_isArray$3(rt["@container"]),yf&=wo.length<=1;if(yf&=wo.every(vf=>lf.includes(vf)),yf&=!(cf&&wo.includes("@list")),!yf)throw new JsonLdError$7("Invalid JSON-LD syntax; @context @container value must be one of the following: "+lf.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:W});if(yn.reverse&&!wo.every(vf=>["@index","@set"].includes(vf)))throw new JsonLdError$7("Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.","jsonld.SyntaxError",{code:"invalid reverse property",context:W});yn["@container"]=wo}if("@index"in rt){if(!("@container"in rt)||!yn["@container"].includes("@index"))throw new JsonLdError$7(`Invalid JSON-LD syntax; @index without @index in @container: "${rt["@index"]}" on term "${q}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:W});if(!_isString$3(rt["@index"])||rt["@index"].indexOf("@")===0)throw new JsonLdError$7(`Invalid JSON-LD syntax; @index must expand to an IRI: "${rt["@index"]}" on term "${q}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:W});yn["@index"]=rt["@index"]}if("@context"in rt&&(yn["@context"]=rt["@context"]),"@language"in rt&&!("@type"in rt)){let wo=rt["@language"];if(wo!==null&&!_isString$3(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:W});wo!==null&&(wo=wo.toLowerCase()),yn["@language"]=wo}if("@prefix"in rt){if(q.match(/:|\//))throw new JsonLdError$7("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:W});if(api$7.isKeyword(yn["@id"]))throw new JsonLdError$7("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:W});if(typeof rt["@prefix"]=="boolean")yn._prefix=rt["@prefix"]===!0;else throw new JsonLdError$7("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:W})}if("@direction"in rt){const wo=rt["@direction"];if(wo!==null&&wo!=="ltr"&&wo!=="rtl")throw new JsonLdError$7('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:W});yn["@direction"]=wo}if("@nest"in rt){const wo=rt["@nest"];if(!_isString$3(wo)||wo!=="@nest"&&wo.indexOf("@")===0)throw new JsonLdError$7("Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.","jsonld.SyntaxError",{code:"invalid @nest value",context:W});yn["@nest"]=wo}// disallow aliasing @context and @preserve -const mo=yn["@id"];if(mo==="@context"||mo==="@preserve")throw new JsonLdError$7("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:W});if(ot&&ot.protected&&!tt&&(F.protected[q]=!0,yn.protected=!0,!_deepCompare(ot,yn)))throw new JsonLdError$7("Invalid JSON-LD syntax; tried to redefine a protected term.","jsonld.SyntaxError",{code:"protected term redefinition",context:W,term:q})};api$7.expandIri=(F,W,q,K)=>_expandIri$3(F,W,q,void 0,void 0,K);function _expandIri$3(F,W,q,K,X,tt){if(W===null||!_isString$3(W)||api$7.isKeyword(W))return W;if(W.match(REGEX_KEYWORD$2))return null;if(K&&K.hasOwnProperty(W)&&X.get(W)!==!0&&api$7.createTermDefinition({activeCtx:F,localCtx:K,term:W,defined:X,options:tt}),q=q||{},q.vocab){const ot=F.mappings.get(W);if(ot===null)return null;if(_isObject$3(ot)&&"@id"in ot)return ot["@id"]}const rt=W.indexOf(":");if(rt>0){const ot=W.substr(0,rt),ut=W.substr(rt+1);if(ot==="_"||ut.indexOf("//")===0)return W;K&&K.hasOwnProperty(ot)&&api$7.createTermDefinition({activeCtx:F,localCtx:K,term:ot,defined:X,options:tt});const yn=F.mappings.get(ot);if(yn&&yn._prefix)return yn["@id"]+ut;if(_isAbsoluteIri$2(W))return W}if(q.vocab&&"@vocab"in F)W=F["@vocab"]+W;else if(q.base){let ot,ut;"@base"in F?F["@base"]?(ut=prependBase(tt.base,F["@base"]),ot=prependBase(ut,W)):(ut=F["@base"],ot=W):(ut=tt.base,ot=prependBase(tt.base,W)),W=ot}return W}api$7.getInitialContext=F=>{const W=JSON.stringify({processingMode:F.processingMode}),q=INITIAL_CONTEXT_CACHE.get(W);if(q)return q;const K={processingMode:F.processingMode,mappings:new Map,inverse:null,getInverse:X,clone:ot,revertToPreviousContext:ut,protected:{}};return INITIAL_CONTEXT_CACHE.size===INITIAL_CONTEXT_CACHE_MAX_SIZE&&INITIAL_CONTEXT_CACHE.clear(),INITIAL_CONTEXT_CACHE.set(W,K),K;function X(){const yn=this;if(yn.inverse)return yn.inverse;const uo=yn.inverse={},po=yn.fastCurieMap={},mo={},wo=(yn["@language"]||"@none").toLowerCase(),lf=yn["@direction"],yf=yn.mappings,cf=[...yf.keys()].sort(_compareShortestLeast$1);for(const vf of cf){const _f=yf.get(vf);if(_f===null)continue;let $f=_f["@container"]||"@none";if($f=[].concat($f).sort().join(""),_f["@id"]===null)continue;const wf=_asArray$2(_f["@id"]);for(const Pf of wf){let Cf=uo[Pf];const Af=api$7.isKeyword(Pf);if(Cf)!Af&&!_f._termHasColon&&mo[Pf].push(vf);else if(uo[Pf]=Cf={},!Af&&!_f._termHasColon){mo[Pf]=[vf];const Bf={iri:Pf,terms:mo[Pf]};Pf[0]in po?po[Pf[0]].push(Bf):po[Pf[0]]=[Bf]}if(Cf[$f]||(Cf[$f]={"@language":{},"@type":{},"@any":{}}),Cf=Cf[$f],rt(vf,Cf["@any"],"@none"),_f.reverse)rt(vf,Cf["@type"],"@reverse");else if(_f["@type"]==="@none")rt(vf,Cf["@any"],"@none"),rt(vf,Cf["@language"],"@none"),rt(vf,Cf["@type"],"@none");else if("@type"in _f)rt(vf,Cf["@type"],_f["@type"]);else if("@language"in _f&&"@direction"in _f){const Bf=_f["@language"],Hf=_f["@direction"];Bf&&Hf?rt(vf,Cf["@language"],`${Bf}_${Hf}`.toLowerCase()):Bf?rt(vf,Cf["@language"],Bf.toLowerCase()):Hf?rt(vf,Cf["@language"],`_${Hf}`):rt(vf,Cf["@language"],"@null")}else"@language"in _f?rt(vf,Cf["@language"],(_f["@language"]||"@null").toLowerCase()):"@direction"in _f?_f["@direction"]?rt(vf,Cf["@language"],`_${_f["@direction"]}`):rt(vf,Cf["@language"],"@none"):lf?(rt(vf,Cf["@language"],`_${lf}`),rt(vf,Cf["@language"],"@none"),rt(vf,Cf["@type"],"@none")):(rt(vf,Cf["@language"],wo),rt(vf,Cf["@language"],"@none"),rt(vf,Cf["@type"],"@none"))}}for(const vf in po)tt(po,vf,1);return uo}function tt(yn,uo,po){const mo=yn[uo],wo=yn[uo]={};let lf,yf;for(const cf of mo)lf=cf.iri,po>=lf.length?yf="":yf=lf[po],yf in wo?wo[yf].push(cf):wo[yf]=[cf];for(const cf in wo)cf!==""&&tt(wo,cf,po+1)}function rt(yn,uo,po){uo.hasOwnProperty(po)||(uo[po]=yn)}function ot(){const yn={};return yn.mappings=util$7.clone(this.mappings),yn.clone=this.clone,yn.inverse=null,yn.getInverse=this.getInverse,yn.protected=util$7.clone(this.protected),this.previousContext&&(yn.previousContext=this.previousContext.clone()),yn.revertToPreviousContext=this.revertToPreviousContext,"@base"in this&&(yn["@base"]=this["@base"]),"@language"in this&&(yn["@language"]=this["@language"]),"@vocab"in this&&(yn["@vocab"]=this["@vocab"]),yn}function ut(){return this.previousContext?this.previousContext.clone():this}};api$7.getContextValue=(F,W,q)=>{if(W===null)return q==="@context"?void 0:null;if(F.mappings.has(W)){const K=F.mappings.get(W);if(_isUndefined$2(q))return K;if(K.hasOwnProperty(q))return K[q]}if(q==="@language"&&q in F||q==="@direction"&&q in F)return F[q];if(q!=="@context")return null};api$7.processingMode=(F,W)=>W.toString()>="1.1"?!F.processingMode||F.processingMode>="json-ld-"+W.toString():F.processingMode==="json-ld-1.0";api$7.isKeyword=F=>{if(!_isString$3(F)||F[0]!=="@")return!1;switch(F){case"@base":case"@container":case"@context":case"@default":case"@direction":case"@embed":case"@explicit":case"@graph":case"@id":case"@included":case"@index":case"@json":case"@language":case"@list":case"@nest":case"@none":case"@omitDefault":case"@prefix":case"@preserve":case"@protected":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@version":case"@vocab":return!0}return!1};function _deepCompare(F,W){if(!(F&&typeof F=="object")||!(W&&typeof W=="object"))return F===W;const q=Array.isArray(F);if(q!==Array.isArray(W))return!1;if(q){if(F.length!==W.length)return!1;for(let tt=0;tt{if(q==null)return null;if(W==="@default"&&(K=Object.assign({},K,{isFrame:!1})),!_isArray$2(q)&&!_isObject$2(q))return!X&&(W===null||_expandIri$2(F,W,{vocab:!0},K)==="@graph")?(K.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"free-floating scalar",level:"warning",message:"Dropping free-floating scalar not in a list.",details:{value:q}},options:K}),null):_expandValue({activeCtx:F,activeProperty:W,value:q,options:K});if(_isArray$2(q)){let lf=[];const yf=_getContextValue$1(F,W,"@container")||[];X=X||yf.includes("@list");for(let cf=0;cf1?cf.slice().sort():cf:[cf];for(const _f of vf){const $f=_getContextValue$1(rt,_f,"@context");_isUndefined$1($f)||(F=await _processContext$2({activeCtx:F,localCtx:$f,options:K,propagate:!1}))}}let mo={};await _expandObject({activeCtx:F,activeProperty:W,expandedActiveProperty:ot,element:q,expandedParent:mo,options:K,insideList:X,typeKey:po,typeScopedContext:rt}),yn=Object.keys(mo);let wo=yn.length;if("@value"in mo){if("@type"in mo&&("@language"in mo||"@direction"in mo))throw new JsonLdError$6('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:mo});let lf=wo-1;if("@type"in mo&&(lf-=1),"@index"in mo&&(lf-=1),"@language"in mo&&(lf-=1),"@direction"in mo&&(lf-=1),lf!==0)throw new JsonLdError$6('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:mo});const yf=mo["@value"]===null?[]:_asArray$1(mo["@value"]),cf=_getValues(mo,"@type");if(!(_processingMode$2(F,1.1)&&cf.includes("@json")&&cf.length===1))if(yf.length===0)K.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"null @value value",level:"warning",message:"Dropping null @value value.",details:{value:mo}},options:K}),mo=null;else{if(!yf.every(vf=>_isString$2(vf)||_isEmptyObject(vf))&&"@language"in mo)throw new JsonLdError$6("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:mo});if(!cf.every(vf=>_isAbsoluteIri$1(vf)&&!(_isString$2(vf)&&vf.indexOf("_:")===0)||_isEmptyObject(vf)))throw new JsonLdError$6('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:mo})}}else if("@type"in mo&&!_isArray$2(mo["@type"]))mo["@type"]=[mo["@type"]];else if("@set"in mo||"@list"in mo){if(wo>1&&!(wo===2&&"@index"in mo))throw new JsonLdError$6('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:mo});"@set"in mo&&(mo=mo["@set"],yn=Object.keys(mo),wo=yn.length)}else wo===1&&"@language"in mo&&(K.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"object with only @language",level:"warning",message:"Dropping object with only @language.",details:{value:mo}},options:K}),mo=null);return _isObject$2(mo)&&!K.keepFreeFloatingNodes&&!X&&(W===null||ot==="@graph"||(_getContextValue$1(F,W,"@container")||[]).includes("@graph"))&&(mo=_dropUnsafeObject({value:mo,count:wo,options:K})),mo};function _dropUnsafeObject({value:F,count:W,options:q}){if(W===0||"@value"in F||"@list"in F||W===1&&"@id"in F){if(q.eventHandler){let K,X;W===0?(K="empty object",X="Dropping empty object."):"@value"in F?(K="object with only @value",X="Dropping object with only @value."):"@list"in F?(K="object with only @list",X="Dropping object with only @list."):W===1&&"@id"in F&&(K="object with only @id",X="Dropping object with only @id."),_handleEvent$2({event:{type:["JsonLdEvent"],code:K,level:"warning",message:X,details:{value:F}},options:q})}return null}return F}async function _expandObject({activeCtx:F,activeProperty:W,expandedActiveProperty:q,element:K,expandedParent:X,options:tt={},insideList:rt,typeKey:ot,typeScopedContext:ut}){const yn=Object.keys(K).sort(),uo=[];let po;const mo=K[ot]&&_expandIri$2(F,_isArray$2(K[ot])?K[ot][0]:K[ot],{vocab:!0},{...tt,typeExpansion:!0})==="@json";for(const wo of yn){let lf=K[wo],yf;if(wo==="@context")continue;const cf=_expandIri$2(F,wo,{vocab:!0},tt);if(cf===null||!(_isAbsoluteIri$1(cf)||_isKeyword$1(cf))){tt.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"invalid property",level:"warning",message:"Dropping property that did not expand into an absolute IRI or keyword.",details:{property:wo,expandedProperty:cf}},options:tt});continue}if(_isKeyword$1(cf)){if(q==="@reverse")throw new JsonLdError$6("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:lf});if(cf in X&&cf!=="@included"&&cf!=="@type")throw new JsonLdError$6("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:cf})}if(cf==="@id"){if(!_isString$2(lf)){if(!tt.isFrame)throw new JsonLdError$6('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:lf});if(_isObject$2(lf)){if(!_isEmptyObject(lf))throw new JsonLdError$6('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:lf})}else if(_isArray$2(lf)){if(!lf.every(wf=>_isString$2(wf)))throw new JsonLdError$6('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:lf})}else throw new JsonLdError$6('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:lf})}_addValue$2(X,"@id",_asArray$1(lf).map(wf=>{if(_isString$2(wf)){const Pf=_expandIri$2(F,wf,{base:!0},tt);return tt.eventHandler&&(Pf===null?_handleEvent$2(wf===null?{event:{type:["JsonLdEvent"],code:"null @id value",level:"warning",message:"Null @id found.",details:{id:wf}},options:tt}:{event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:wf}},options:tt}):_isAbsoluteIri$1(Pf)||_handleEvent$2({event:{type:["JsonLdEvent"],code:"relative @id reference",level:"warning",message:"Relative @id reference found.",details:{id:wf,expandedId:Pf}},options:tt})),Pf}return wf}),{propertyIsArray:tt.isFrame});continue}if(cf==="@type"){_isObject$2(lf)&&(lf=Object.fromEntries(Object.entries(lf).map(([wf,Pf])=>[_expandIri$2(ut,wf,{vocab:!0}),_asArray$1(Pf).map(Cf=>_expandIri$2(ut,Cf,{base:!0,vocab:!0},{...tt,typeExpansion:!0}))]))),_validateTypeValue(lf,tt.isFrame),_addValue$2(X,"@type",_asArray$1(lf).map(wf=>{if(_isString$2(wf)){const Pf=_expandIri$2(ut,wf,{base:!0,vocab:!0},{...tt,typeExpansion:!0});return Pf!=="@json"&&!_isAbsoluteIri$1(Pf)&&tt.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"relative @type reference",level:"warning",message:"Relative @type reference found.",details:{type:wf}},options:tt}),Pf}return wf}),{propertyIsArray:!!tt.isFrame});continue}if(cf==="@included"&&_processingMode$2(F,1.1)){const wf=_asArray$1(await api$6.expand({activeCtx:F,activeProperty:W,element:lf,options:tt}));if(!wf.every(Pf=>_isSubject(Pf)))throw new JsonLdError$6("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:lf});_addValue$2(X,"@included",wf,{propertyIsArray:!0});continue}if(cf==="@graph"&&!(_isObject$2(lf)||_isArray$2(lf)))throw new JsonLdError$6('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:lf});if(cf==="@value"){po=lf,mo&&_processingMode$2(F,1.1)?X["@value"]=lf:_addValue$2(X,"@value",lf,{propertyIsArray:tt.isFrame});continue}if(cf==="@language"){if(lf===null)continue;if(!_isString$2(lf)&&!tt.isFrame)throw new JsonLdError$6('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:lf});lf=_asArray$1(lf).map(wf=>_isString$2(wf)?wf.toLowerCase():wf);for(const wf of lf)_isString$2(wf)&&!wf.match(REGEX_BCP47$1)&&tt.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:wf}},options:tt});_addValue$2(X,"@language",lf,{propertyIsArray:tt.isFrame});continue}if(cf==="@direction"){if(!_isString$2(lf)&&!tt.isFrame)throw new JsonLdError$6('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:lf});lf=_asArray$1(lf);for(const wf of lf)if(_isString$2(wf)&&wf!=="ltr"&&wf!=="rtl")throw new JsonLdError$6('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:lf});_addValue$2(X,"@direction",lf,{propertyIsArray:tt.isFrame});continue}if(cf==="@index"){if(!_isString$2(lf))throw new JsonLdError$6('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:lf});_addValue$2(X,"@index",lf);continue}if(cf==="@reverse"){if(!_isObject$2(lf))throw new JsonLdError$6('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:lf});if(yf=await api$6.expand({activeCtx:F,activeProperty:"@reverse",element:lf,options:tt}),"@reverse"in yf)for(const Pf in yf["@reverse"])_addValue$2(X,Pf,yf["@reverse"][Pf],{propertyIsArray:!0});let wf=X["@reverse"]||null;for(const Pf in yf){if(Pf==="@reverse")continue;wf===null&&(wf=X["@reverse"]={}),_addValue$2(wf,Pf,[],{propertyIsArray:!0});const Cf=yf[Pf];for(let Af=0;Afwf==="@id"||wf==="@index")){if(yf=_asArray$1(yf),tt.isFrame||(yf=yf.filter(wf=>{const Pf=Object.keys(wf).length;return _dropUnsafeObject({value:wf,count:Pf,options:tt})!==null})),yf.length===0)continue;yf=yf.map(wf=>({"@graph":_asArray$1(wf)}))}if(vf.mappings.has(wo)&&vf.mappings.get(wo).reverse){const wf=X["@reverse"]=X["@reverse"]||{};yf=_asArray$1(yf);for(let Pf=0;Pf_expandIri$2(F,cf,{vocab:!0},tt)==="@value"))throw new JsonLdError$6("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:yf});await _expandObject({activeCtx:F,activeProperty:W,expandedActiveProperty:q,element:yf,expandedParent:X,options:tt,insideList:rt,typeScopedContext:ut,typeKey:ot})}}}function _expandValue({activeCtx:F,activeProperty:W,value:q,options:K}){if(q==null)return null;const X=_expandIri$2(F,W,{vocab:!0},K);if(X==="@id")return _expandIri$2(F,q,{base:!0},K);if(X==="@type")return _expandIri$2(F,q,{vocab:!0,base:!0},{...K,typeExpansion:!0});const tt=_getContextValue$1(F,W,"@type");if((tt==="@id"||X==="@graph")&&_isString$2(q)){const ot=_expandIri$2(F,q,{base:!0},K);return ot===null&&q.match(REGEX_KEYWORD$1)&&K.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:W}},options:K}),{"@id":ot}}if(tt==="@vocab"&&_isString$2(q))return{"@id":_expandIri$2(F,q,{vocab:!0,base:!0},K)};if(_isKeyword$1(X))return q;const rt={};if(tt&&!["@id","@vocab","@none"].includes(tt))rt["@type"]=tt;else if(_isString$2(q)){const ot=_getContextValue$1(F,W,"@language");ot!==null&&(rt["@language"]=ot);const ut=_getContextValue$1(F,W,"@direction");ut!==null&&(rt["@direction"]=ut)}return["boolean","number","string"].includes(typeof q)||(q=q.toString()),rt["@value"]=q,rt}function _expandLanguageMap(F,W,q,K){const X=[],tt=Object.keys(W).sort();for(const rt of tt){const ot=_expandIri$2(F,rt,{vocab:!0},K);let ut=W[rt];_isArray$2(ut)||(ut=[ut]);for(const yn of ut){if(yn===null)continue;if(!_isString$2(yn))throw new JsonLdError$6("Invalid JSON-LD syntax; language map values must be strings.","jsonld.SyntaxError",{code:"invalid language map value",languageMap:W});const uo={"@value":yn};ot!=="@none"&&(rt.match(REGEX_BCP47$1)||K.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:rt}},options:K}),uo["@language"]=rt.toLowerCase()),q&&(uo["@direction"]=q),X.push(uo)}}return X}async function _expandIndexMap({activeCtx:F,options:W,activeProperty:q,value:K,asGraph:X,indexKey:tt,propertyIndex:rt}){const ot=[],ut=Object.keys(K).sort(),yn=tt==="@type";for(let uo of ut){if(yn){const wo=_getContextValue$1(F,uo,"@context");_isUndefined$1(wo)||(F=await _processContext$2({activeCtx:F,localCtx:wo,propagate:!1,options:W}))}let po=K[uo];_isArray$2(po)||(po=[po]),po=await api$6.expand({activeCtx:F,activeProperty:q,element:po,options:W,insideList:!1,insideIndex:!0});let mo;rt?uo==="@none"?mo="@none":mo=_expandValue({activeCtx:F,activeProperty:tt,value:uo,options:W}):mo=_expandIri$2(F,uo,{vocab:!0},W),tt==="@id"?uo=_expandIri$2(F,uo,{base:!0},W):yn&&(uo=mo);for(let wo of po){if(X&&!_isGraph$1(wo)&&(wo={"@graph":[wo]}),tt==="@type")mo==="@none"||(wo["@type"]?wo["@type"]=[uo].concat(wo["@type"]):wo["@type"]=[uo]);else{if(_isValue$1(wo)&&!["@language","@type","@index"].includes(tt))throw new JsonLdError$6(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: "${tt}".`,"jsonld.SyntaxError",{code:"invalid value object",value:wo});rt?mo!=="@none"&&_addValue$2(wo,rt,mo,{propertyIsArray:!0,prependValue:!0}):mo!=="@none"&&!(tt in wo)&&(wo[tt]=uo)}ot.push(wo)}}return ot}const{isKeyword:isKeyword$2}=context,graphTypes$3=graphTypes$5,types$3=types$7,util$6=util$8,JsonLdError$5=JsonLdError_1,api$5={};var nodeMap=api$5;api$5.createMergedNodeMap=(F,W)=>{W=W||{};const q=W.issuer||new util$6.IdentifierIssuer("_:b"),K={"@default":{}};return api$5.createNodeMap(F,K,"@default",q),api$5.mergeNodeMaps(K)};api$5.createNodeMap=(F,W,q,K,X,tt)=>{if(types$3.isArray(F)){for(const yn of F)api$5.createNodeMap(yn,W,q,K,void 0,tt);return}if(!types$3.isObject(F)){tt&&tt.push(F);return}if(graphTypes$3.isValue(F)){if("@type"in F){let yn=F["@type"];yn.indexOf("_:")===0&&(F["@type"]=yn=K.getId(yn))}tt&&tt.push(F);return}else if(tt&&graphTypes$3.isList(F)){const yn=[];api$5.createNodeMap(F["@list"],W,q,K,X,yn),tt.push({"@list":yn});return}if("@type"in F){const yn=F["@type"];for(const uo of yn)uo.indexOf("_:")===0&&K.getId(uo)}types$3.isUndefined(X)&&(X=graphTypes$3.isBlankNode(F)?K.getId(F["@id"]):F["@id"]),tt&&tt.push({"@id":X});const rt=W[q],ot=rt[X]=rt[X]||{};ot["@id"]=X;const ut=Object.keys(F).sort();for(let yn of ut){if(yn==="@id")continue;if(yn==="@reverse"){const po={"@id":X},mo=F["@reverse"];for(const wo in mo){const lf=mo[wo];for(const yf of lf){let cf=yf["@id"];graphTypes$3.isBlankNode(yf)&&(cf=K.getId(cf)),api$5.createNodeMap(yf,W,q,K,cf),util$6.addValue(rt[cf],wo,po,{propertyIsArray:!0,allowDuplicate:!1})}}continue}if(yn==="@graph"){X in W||(W[X]={}),api$5.createNodeMap(F[yn],W,X,K);continue}if(yn==="@included"){api$5.createNodeMap(F[yn],W,q,K);continue}if(yn!=="@type"&&isKeyword$2(yn)){if(yn==="@index"&&yn in ot&&(F[yn]!==ot[yn]||F[yn]["@id"]!==ot[yn]["@id"]))throw new JsonLdError$5("Invalid JSON-LD syntax; conflicting @index property detected.","jsonld.SyntaxError",{code:"conflicting indexes",subject:ot});ot[yn]=F[yn];continue}const uo=F[yn];if(yn.indexOf("_:")===0&&(yn=K.getId(yn)),uo.length===0){util$6.addValue(ot,yn,[],{propertyIsArray:!0});continue}for(let po of uo)if(yn==="@type"&&(po=po.indexOf("_:")===0?K.getId(po):po),graphTypes$3.isSubject(po)||graphTypes$3.isSubjectReference(po)){if("@id"in po&&!po["@id"])continue;const mo=graphTypes$3.isBlankNode(po)?K.getId(po["@id"]):po["@id"];util$6.addValue(ot,yn,{"@id":mo},{propertyIsArray:!0,allowDuplicate:!1}),api$5.createNodeMap(po,W,q,K,mo)}else if(graphTypes$3.isValue(po))util$6.addValue(ot,yn,po,{propertyIsArray:!0,allowDuplicate:!1});else if(graphTypes$3.isList(po)){const mo=[];api$5.createNodeMap(po["@list"],W,q,K,X,mo),po={"@list":mo},util$6.addValue(ot,yn,po,{propertyIsArray:!0,allowDuplicate:!1})}else api$5.createNodeMap(po,W,q,K,X),util$6.addValue(ot,yn,po,{propertyIsArray:!0,allowDuplicate:!1})}};api$5.mergeNodeMapGraphs=F=>{const W={};for(const q of Object.keys(F).sort())for(const K of Object.keys(F[q]).sort()){const X=F[q][K];K in W||(W[K]={"@id":K});const tt=W[K];for(const rt of Object.keys(X).sort())if(isKeyword$2(rt)&&rt!=="@type")tt[rt]=util$6.clone(X[rt]);else for(const ot of X[rt])util$6.addValue(tt,rt,util$6.clone(ot),{propertyIsArray:!0,allowDuplicate:!1})}return W};api$5.mergeNodeMaps=F=>{const W=F["@default"],q=Object.keys(F).sort();for(const K of q){if(K==="@default")continue;const X=F[K];let tt=W[K];tt?"@graph"in tt||(tt["@graph"]=[]):W[K]=tt={"@id":K,"@graph":[]};const rt=tt["@graph"];for(const ot of Object.keys(X).sort()){const ut=X[ot];graphTypes$3.isSubjectReference(ut)||rt.push(ut)}}return W};const{isSubjectReference:_isSubjectReference$2}=graphTypes$5,{createMergedNodeMap:_createMergedNodeMap$1}=nodeMap,api$4={};var flatten=api$4;api$4.flatten=F=>{const W=_createMergedNodeMap$1(F),q=[],K=Object.keys(W).sort();for(let X=0;X{const{useRdfType:q=!1,useNativeTypes:K=!1,rdfDirection:X=null}=W,tt={},rt={"@default":tt},ot={};if(X){if(X==="compound-literal")throw new JsonLdError$4("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:X});if(X!=="i18n-datatype")throw new JsonLdError$4("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:X})}for(const uo of F){const po=uo.graph.termType==="DefaultGraph"?"@default":uo.graph.value;po in rt||(rt[po]={}),po!=="@default"&&!(po in tt)&&(tt[po]={"@id":po});const mo=rt[po],wo=uo.subject.value,lf=uo.predicate.value,yf=uo.object;wo in mo||(mo[wo]={"@id":wo});const cf=mo[wo],vf=yf.termType.endsWith("Node");if(vf&&!(yf.value in mo)&&(mo[yf.value]={"@id":yf.value}),lf===RDF_TYPE$1&&!q&&vf){_addValue$1(cf,"@type",yf.value,{propertyIsArray:!0});continue}const _f=_RDFToObject(yf,K,X,W);if(_addValue$1(cf,lf,_f,{propertyIsArray:!0}),vf)if(yf.value===RDF_NIL$1){const $f=mo[yf.value];"usages"in $f||($f.usages=[]),$f.usages.push({node:cf,property:lf,value:_f})}else yf.value in ot?ot[yf.value]=!1:ot[yf.value]={node:cf,property:lf,value:_f}}for(const uo in rt){const po=rt[uo];if(!(RDF_NIL$1 in po))continue;const mo=po[RDF_NIL$1];if(mo.usages){for(let wo of mo.usages){let lf=wo.node,yf=wo.property,cf=wo.value;const vf=[],_f=[];let $f=Object.keys(lf).length;for(;yf===RDF_REST$1&&types$2.isObject(ot[lf["@id"]])&&types$2.isArray(lf[RDF_FIRST$1])&&lf[RDF_FIRST$1].length===1&&types$2.isArray(lf[RDF_REST$1])&&lf[RDF_REST$1].length===1&&($f===3||$f===4&&types$2.isArray(lf["@type"])&&lf["@type"].length===1&&lf["@type"][0]===RDF_LIST)&&(vf.push(lf[RDF_FIRST$1][0]),_f.push(lf["@id"]),wo=ot[lf["@id"]],lf=wo.node,yf=wo.property,cf=wo.value,$f=Object.keys(lf).length,!!graphTypes$2.isBlankNode(lf)););delete cf["@id"],cf["@list"]=vf.reverse();for(const wf of _f)delete po[wf]}delete mo.usages}}const ut=[],yn=Object.keys(tt).sort();for(const uo of yn){const po=tt[uo];if(uo in rt){const mo=po["@graph"]=[],wo=rt[uo],lf=Object.keys(wo).sort();for(const yf of lf){const cf=wo[yf];graphTypes$2.isSubjectReference(cf)||mo.push(cf)}}graphTypes$2.isSubjectReference(po)||ut.push(po)}return ut};function _RDFToObject(F,W,q,K){if(F.termType.endsWith("Node"))return{"@id":F.value};const X={"@value":F.value};if(F.language)F.language.match(REGEX_BCP47)||K.eventHandler&&_handleEvent$1({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:F.language}},options:K}),X["@language"]=F.language;else{let tt=F.datatype.value;if(tt||(tt=XSD_STRING$1),tt===RDF_JSON_LITERAL$1){tt="@json";try{X["@value"]=JSON.parse(X["@value"])}catch(rt){throw new JsonLdError$4("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:X["@value"],cause:rt})}}if(W){if(tt===XSD_BOOLEAN$1)X["@value"]==="true"?X["@value"]=!0:X["@value"]==="false"&&(X["@value"]=!1);else if(types$2.isNumeric(X["@value"]))if(tt===XSD_INTEGER$1){const rt=parseInt(X["@value"],10);rt.toFixed(0)===X["@value"]&&(X["@value"]=rt)}else tt===XSD_DOUBLE$1&&(X["@value"]=parseFloat(X["@value"]));[XSD_BOOLEAN$1,XSD_INTEGER$1,XSD_DOUBLE$1,XSD_STRING$1].includes(tt)||(X["@type"]=tt)}else if(q==="i18n-datatype"&&tt.startsWith("https://www.w3.org/ns/i18n#")){const[,rt,ot]=tt.split(/[#_]/);rt.length>0&&(X["@language"]=rt,rt.match(REGEX_BCP47)||K.eventHandler&&_handleEvent$1({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:rt}},options:K})),X["@direction"]=ot}else tt!==XSD_STRING$1&&(X["@type"]=tt)}return X}var canonicalize=function F(W){return W===null||typeof W!="object"||W.toJSON!=null?JSON.stringify(W):Array.isArray(W)?"["+W.reduce((q,K,X)=>{const tt=X===0?"":",",rt=K===void 0||typeof K=="symbol"?null:K;return q+tt+F(rt)},"")+"]":"{"+Object.keys(W).sort().reduce((q,K,X)=>{if(W[K]===void 0||typeof W[K]=="symbol")return q;const tt=q.length===0?"":",";return q+tt+F(K)+":"+F(W[K])},"")+"}"};const{createNodeMap}=nodeMap,{isKeyword:isKeyword$1}=context,graphTypes$1=graphTypes$5,jsonCanonicalize=canonicalize,JsonLdError$3=JsonLdError_1,types$1=types$7,util$5=util$8,{handleEvent:_handleEvent}=events,{RDF_FIRST,RDF_REST,RDF_NIL,RDF_TYPE,RDF_JSON_LITERAL,RDF_LANGSTRING,XSD_BOOLEAN,XSD_DOUBLE,XSD_INTEGER,XSD_STRING}=constants,{isAbsolute:_isAbsoluteIri}=url$1,api$2={};var toRdf=api$2;api$2.toRDF=(F,W)=>{const q=new util$5.IdentifierIssuer("_:b"),K={"@default":{}};createNodeMap(F,K,"@default",q);const X=[],tt=Object.keys(K).sort();for(const rt of tt){let ot;if(rt==="@default")ot={termType:"DefaultGraph",value:""};else if(_isAbsoluteIri(rt))rt.startsWith("_:")?ot={termType:"BlankNode"}:ot={termType:"NamedNode"},ot.value=rt;else{W.eventHandler&&_handleEvent({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:rt}},options:W});continue}_graphToRDF(X,K[rt],ot,q,W)}return X};function _graphToRDF(F,W,q,K,X){const tt=Object.keys(W).sort();for(const rt of tt){const ot=W[rt],ut=Object.keys(ot).sort();for(let yn of ut){const uo=ot[yn];if(yn==="@type")yn=RDF_TYPE;else if(isKeyword$1(yn))continue;for(const po of uo){const mo={termType:rt.startsWith("_:")?"BlankNode":"NamedNode",value:rt};if(!_isAbsoluteIri(rt)){X.eventHandler&&_handleEvent({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:rt}},options:X});continue}const wo={termType:yn.startsWith("_:")?"BlankNode":"NamedNode",value:yn};if(!_isAbsoluteIri(yn)){X.eventHandler&&_handleEvent({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:yn}},options:X});continue}if(wo.termType==="BlankNode"&&!X.produceGeneralizedRdf){X.eventHandler&&_handleEvent({event:{type:["JsonLdEvent"],code:"blank node predicate",level:"warning",message:"Dropping blank node predicate.",details:{property:K.getOldIds().find(yf=>K.getId(yf)===yn)}},options:X});continue}const lf=_objectToRDF(po,K,F,q,X.rdfDirection,X);lf&&F.push({subject:mo,predicate:wo,object:lf,graph:q})}}}}function _listToRDF(F,W,q,K,X,tt){const rt={termType:"NamedNode",value:RDF_FIRST},ot={termType:"NamedNode",value:RDF_REST},ut={termType:"NamedNode",value:RDF_NIL},yn=F.pop(),uo=yn?{termType:"BlankNode",value:W.getId()}:ut;let po=uo;for(const mo of F){const wo=_objectToRDF(mo,W,q,K,X,tt),lf={termType:"BlankNode",value:W.getId()};q.push({subject:po,predicate:rt,object:wo,graph:K}),q.push({subject:po,predicate:ot,object:lf,graph:K}),po=lf}if(yn){const mo=_objectToRDF(yn,W,q,K,X,tt);q.push({subject:po,predicate:rt,object:mo,graph:K}),q.push({subject:po,predicate:ot,object:ut,graph:K})}return uo}function _objectToRDF(F,W,q,K,X,tt){const rt={};if(graphTypes$1.isValue(F)){rt.termType="Literal",rt.value=void 0,rt.datatype={termType:"NamedNode"};let ot=F["@value"];const ut=F["@type"]||null;if(ut==="@json")rt.value=jsonCanonicalize(ot),rt.datatype.value=RDF_JSON_LITERAL;else if(types$1.isBoolean(ot))rt.value=ot.toString(),rt.datatype.value=ut||XSD_BOOLEAN;else if(types$1.isDouble(ot)||ut===XSD_DOUBLE)types$1.isDouble(ot)||(ot=parseFloat(ot)),rt.value=ot.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),rt.datatype.value=ut||XSD_DOUBLE;else if(types$1.isNumber(ot))rt.value=ot.toFixed(0),rt.datatype.value=ut||XSD_INTEGER;else if("@direction"in F&&X==="i18n-datatype"){const yn=(F["@language"]||"").toLowerCase(),uo=F["@direction"],po=`https://www.w3.org/ns/i18n#${yn}_${uo}`;rt.datatype.value=po,rt.value=ot}else{if("@direction"in F&&X==="compound-literal")throw new JsonLdError$3("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:X});if("@direction"in F&&X)throw new JsonLdError$3("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:X});"@language"in F?("@direction"in F&&!X&&tt.eventHandler&&_handleEvent({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:rt.value}},options:tt}),rt.value=ot,rt.datatype.value=ut||RDF_LANGSTRING,rt.language=F["@language"]):("@direction"in F&&!X&&tt.eventHandler&&_handleEvent({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:rt.value}},options:tt}),rt.value=ot,rt.datatype.value=ut||XSD_STRING)}}else if(graphTypes$1.isList(F)){const ot=_listToRDF(F["@list"],W,q,K,X,tt);rt.termType=ot.termType,rt.value=ot.value}else{const ot=types$1.isObject(F)?F["@id"]:F;rt.termType=ot.startsWith("_:")?"BlankNode":"NamedNode",rt.value=ot}return rt.termType==="NamedNode"&&!_isAbsoluteIri(rt.value)?(tt.eventHandler&&_handleEvent({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:rt.value}},options:tt}),null):rt}const{isKeyword}=context,graphTypes=graphTypes$5,types=types$7,util$4=util$8,url=url$1,JsonLdError$2=JsonLdError_1,{createNodeMap:_createNodeMap$1,mergeNodeMapGraphs:_mergeNodeMapGraphs}=nodeMap,api$1={};var frame=api$1;api$1.frameMergedOrDefault=(F,W,q)=>{const K={options:q,embedded:!1,graph:"@default",graphMap:{"@default":{}},subjectStack:[],link:{},bnodeMap:{}},X=new util$4.IdentifierIssuer("_:b");_createNodeMap$1(F,K.graphMap,"@default",X),q.merged&&(K.graphMap["@merged"]=_mergeNodeMapGraphs(K.graphMap),K.graph="@merged"),K.subjects=K.graphMap[K.graph];const tt=[];api$1.frame(K,Object.keys(K.subjects).sort(),W,tt),q.pruneBlankNodeIdentifiers&&(q.bnodesToClear=Object.keys(K.bnodeMap).filter(rt=>K.bnodeMap[rt].length===1));// remove @preserve from results + */const MessageDigest=MessageDigestBrowser,URDNA2015Sync=URDNA2015Sync_1;var URGNA2012Sync=class extends URDNA2015Sync{constructor(){super(),this.name="URGNA2012",this.createMessageDigest=()=>new MessageDigest("sha1")}modifyFirstDegreeComponent(W,q,K){return q.termType!=="BlankNode"?q:K==="graph"?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:q.value===W?"_:a":"_:z"}}getRelatedPredicate(W){return W.predicate.value}createHashToRelated(W,q){const K=new Map,X=this.blankNodeInfo.get(W).quads;for(const tt of X){let rt,ot;if(tt.subject.termType==="BlankNode"&&tt.subject.value!==W)ot=tt.subject.value,rt="p";else if(tt.object.termType==="BlankNode"&&tt.object.value!==W)ot=tt.object.value,rt="r";else continue;const ut=this.hashRelatedBlankNode(ot,tt,q,rt),yn=K.get(ut);yn?yn.push(ot):K.set(ut,[ot])}return K}};(function(F){const W=URDNA2015_1,q=URGNA2012,K=URDNA2015Sync_1,X=URGNA2012Sync;let tt;try{tt=require$$4}catch{}function rt(ot){return Array.isArray(ot)?ot:F.NQuads.legacyDatasetToQuads(ot)}F.NQuads=NQuads_1,F.IdentifierIssuer=IdentifierIssuer_1,F._rdfCanonizeNative=function(ot){return ot&&(tt=ot),tt},F.canonize=async function(ot,ut){const yn=rt(ot);if(ut.useNative){if(!tt)throw new Error("rdf-canonize-native not available");if(ut.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return new Promise((uo,po)=>tt.canonize(yn,ut,(mo,wo)=>mo?po(mo):uo(wo)))}if(ut.algorithm==="URDNA2015")return new W(ut).main(yn);if(ut.algorithm==="URGNA2012"){if(ut.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new q(ut).main(yn)}throw"algorithm"in ut?new Error("Invalid RDF Dataset Canonicalization algorithm: "+ut.algorithm):new Error("No RDF Dataset Canonicalization algorithm specified.")},F._canonizeSync=function(ot,ut){const yn=rt(ot);if(ut.useNative){if(!tt)throw new Error("rdf-canonize-native not available");if(ut.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "useNative".');return tt.canonizeSync(yn,ut)}if(ut.algorithm==="URDNA2015")return new K(ut).main(yn);if(ut.algorithm==="URGNA2012"){if(ut.createMessageDigest)throw new Error('"createMessageDigest" cannot be used with "URGNA2012".');return new X(ut).main(yn)}throw"algorithm"in ut?new Error("Invalid RDF Dataset Canonicalization algorithm: "+ut.algorithm):new Error("No RDF Dataset Canonicalization algorithm specified.")}})(lib$2);var rdfCanonize=lib$2;const api$d={};var types$7=api$d;api$d.isArray=Array.isArray;api$d.isBoolean=F=>typeof F=="boolean"||Object.prototype.toString.call(F)==="[object Boolean]";api$d.isDouble=F=>api$d.isNumber(F)&&(String(F).indexOf(".")!==-1||Math.abs(F)>=1e21);api$d.isEmptyObject=F=>api$d.isObject(F)&&Object.keys(F).length===0;api$d.isNumber=F=>typeof F=="number"||Object.prototype.toString.call(F)==="[object Number]";api$d.isNumeric=F=>!isNaN(parseFloat(F))&&isFinite(F);api$d.isObject=F=>Object.prototype.toString.call(F)==="[object Object]";api$d.isString=F=>typeof F=="string"||Object.prototype.toString.call(F)==="[object String]";api$d.isUndefined=F=>typeof F>"u";const types$6=types$7,api$c={};var graphTypes$5=api$c;api$c.isSubject=F=>types$6.isObject(F)&&!("@value"in F||"@set"in F||"@list"in F)?Object.keys(F).length>1||!("@id"in F):!1;api$c.isSubjectReference=F=>types$6.isObject(F)&&Object.keys(F).length===1&&"@id"in F;api$c.isValue=F=>types$6.isObject(F)&&"@value"in F;api$c.isList=F=>types$6.isObject(F)&&"@list"in F;api$c.isGraph=F=>types$6.isObject(F)&&"@graph"in F&&Object.keys(F).filter(W=>W!=="@id"&&W!=="@index").length===1;api$c.isSimpleGraph=F=>api$c.isGraph(F)&&!("@id"in F);api$c.isBlankNode=F=>{if(types$6.isObject(F)){if("@id"in F){const W=F["@id"];return!types$6.isString(W)||W.indexOf("_:")===0}return Object.keys(F).length===0||!("@value"in F||"@set"in F||"@list"in F)}return!1};var JsonLdError_1=class extends Error{constructor(W="An unspecified JSON-LD error occurred.",q="jsonld.Error",K={}){super(W),this.name=q,this.message=W,this.details=K}};const graphTypes$4=graphTypes$5,types$5=types$7,IdentifierIssuer$1=rdfCanonize.IdentifierIssuer,JsonLdError$b=JsonLdError_1,REGEX_BCP47$3=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/,REGEX_LINK_HEADERS=/(?:<[^>]*?>|"[^"]*?"|[^,])+/g,REGEX_LINK_HEADER$1=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,REGEX_LINK_HEADER_PARAMS=/(.*?)=(?:(?:"([^"]*?)")|([^"]*?))\s*(?:(?:;\s*)|$)/g,REGEX_KEYWORD$3=/^@[a-zA-Z]+$/,DEFAULTS={headers:{accept:"application/ld+json, application/json"}},api$b={};var util$8=api$b;api$b.IdentifierIssuer=IdentifierIssuer$1;api$b.REGEX_BCP47=REGEX_BCP47$3;api$b.REGEX_KEYWORD=REGEX_KEYWORD$3;api$b.clone=function(F){if(F&&typeof F=="object"){let W;if(types$5.isArray(F)){W=[];for(let q=0;q{if(Object.keys(F).some(q=>q.toLowerCase()==="accept"))throw new RangeError('Accept header may not be specified; only "'+DEFAULTS.headers.accept+'" is supported.');return Object.assign({Accept:DEFAULTS.headers.accept},F)};api$b.parseLinkHeader=F=>{const W={},q=F.match(REGEX_LINK_HEADERS);for(let K=0;K{if(!types$5.isString(F)&&!(types$5.isArray(F)&&F.every(q=>types$5.isString(q)))){if(W&&types$5.isObject(F))switch(Object.keys(F).length){case 0:return;case 1:if("@default"in F&&api$b.asArray(F["@default"]).every(q=>types$5.isString(q)))return}throw new JsonLdError$b('Invalid JSON-LD syntax; "@type" value must a string, an array of strings, an empty object, or a default object.',"jsonld.SyntaxError",{code:"invalid type value",value:F})}};api$b.hasProperty=(F,W)=>{if(F.hasOwnProperty(W)){const q=F[W];return!types$5.isArray(q)||q.length>0}return!1};api$b.hasValue=(F,W,q)=>{if(api$b.hasProperty(F,W)){let K=F[W];const X=graphTypes$4.isList(K);if(types$5.isArray(K)||X){X&&(K=K["@list"]);for(let tt=0;tt{if(K=K||{},"propertyIsArray"in K||(K.propertyIsArray=!1),"valueIsArray"in K||(K.valueIsArray=!1),"allowDuplicate"in K||(K.allowDuplicate=!0),"prependValue"in K||(K.prependValue=!1),K.valueIsArray)F[W]=q;else if(types$5.isArray(q)){q.length===0&&K.propertyIsArray&&!F.hasOwnProperty(W)&&(F[W]=[]),K.prependValue&&(q=q.concat(F[W]),F[W]=[]);for(let X=0;X[].concat(F[W]||[]);api$b.removeProperty=(F,W)=>{delete F[W]};api$b.removeValue=(F,W,q,K)=>{K=K||{},"propertyIsArray"in K||(K.propertyIsArray=!1);const X=api$b.getValues(F,W).filter(tt=>!api$b.compareValues(tt,q));X.length===0?api$b.removeProperty(F,W):X.length===1&&!K.propertyIsArray?F[W]=X[0]:F[W]=X};api$b.relabelBlankNodes=(F,W)=>{W=W||{};const q=W.issuer||new IdentifierIssuer$1("_:b");return _labelBlankNodes(q,F)};api$b.compareValues=(F,W)=>F===W||graphTypes$4.isValue(F)&&graphTypes$4.isValue(W)&&F["@value"]===W["@value"]&&F["@type"]===W["@type"]&&F["@language"]===W["@language"]&&F["@index"]===W["@index"]?!0:types$5.isObject(F)&&"@id"in F&&types$5.isObject(W)&&"@id"in W?F["@id"]===W["@id"]:!1;api$b.compareShortestLeast=(F,W)=>F.length{const q={},K=api$a.parsers[W||"full"],X=K.regex.exec(F);let tt=K.keys.length;for(;tt--;)q[K.keys[tt]]=X[tt]===void 0?null:X[tt];return(q.scheme==="https"&&q.port==="443"||q.scheme==="http"&&q.port==="80")&&(q.href=q.href.replace(":"+q.port,""),q.authority=q.authority.replace(":"+q.port,""),q.port=null),q.normalizedPath=api$a.removeDotSegments(q.path),q};api$a.prependBase=(F,W)=>{if(F===null||api$a.isAbsolute(W))return W;(!F||types$4.isString(F))&&(F=api$a.parse(F||""));const q=api$a.parse(W),K={protocol:F.protocol||""};if(q.authority!==null)K.authority=q.authority,K.path=q.path,K.query=q.query;else if(K.authority=F.authority,q.path==="")K.path=F.path,q.query!==null?K.query=q.query:K.query=F.query;else{if(q.path.indexOf("/")===0)K.path=q.path;else{let tt=F.path;tt=tt.substr(0,tt.lastIndexOf("/")+1),(tt.length>0||F.authority)&&tt.substr(-1)!=="/"&&(tt+="/"),tt+=q.path,K.path=tt}K.query=q.query}q.path!==""&&(K.path=api$a.removeDotSegments(K.path));let X=K.protocol;return K.authority!==null&&(X+="//"+K.authority),X+=K.path,K.query!==null&&(X+="?"+K.query),q.fragment!==null&&(X+="#"+q.fragment),X===""&&(X="./"),X};api$a.removeBase=(F,W)=>{if(F===null)return W;(!F||types$4.isString(F))&&(F=api$a.parse(F||""));let q="";if(F.href!==""?q+=(F.protocol||"")+"//"+(F.authority||""):W.indexOf("//")&&(q+="//"),W.indexOf(q)!==0)return W;const K=api$a.parse(W.substr(q.length)),X=F.normalizedPath.split("/"),tt=K.normalizedPath.split("/"),rt=K.fragment||K.query?0:1;for(;X.length>0&&tt.length>rt&&X[0]===tt[0];)X.shift(),tt.shift();let ot="";if(X.length>0){X.pop();for(let ut=0;ut{if(F.length===0)return"";const W=F.split("/"),q=[];for(;W.length>0;){const K=W.shift(),X=W.length===0;if(K==="."){X&&q.push("");continue}if(K===".."){q.pop(),X&&q.push("");continue}q.push(K)}return F[0]==="/"&&q.length>0&&q[0]!==""&&q.unshift(""),q.length===1&&q[0]===""?"/":q.join("/")};const isAbsoluteRegex=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;api$a.isAbsolute=F=>types$4.isString(F)&&isAbsoluteRegex.test(F);api$a.isRelative=F=>types$4.isString(F);const{parseLinkHeader,buildHeaders}=util$8,{LINK_HEADER_CONTEXT}=constants,JsonLdError$a=JsonLdError_1,RequestQueue=requireRequestQueue(),{prependBase:prependBase$2}=url$1,REGEX_LINK_HEADER=/(^|(\r\n))link:/i;var xhr=({secure:F,headers:W={},xhr:q}={headers:{}})=>{return W=buildHeaders(W),new RequestQueue().wrapLoader(X);async function X(tt){if(tt.indexOf("http:")!==0&&tt.indexOf("https:")!==0)throw new JsonLdError$a('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:tt});if(F&&tt.indexOf("https")!==0)throw new JsonLdError$a(`URL could not be dereferenced; secure mode is enabled and the URL's scheme is not "https".`,"jsonld.InvalidUrl",{code:"loading document failed",url:tt});let rt;try{rt=await _get$1(q,tt,W)}catch(po){throw new JsonLdError$a("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:tt,cause:po})}if(rt.status>=400)throw new JsonLdError$a("URL could not be dereferenced: "+rt.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:tt,httpStatusCode:rt.status});let ot={contextUrl:null,documentUrl:tt,document:rt.response},ut=null;const yn=rt.getResponseHeader("Content-Type");let uo;if(REGEX_LINK_HEADER.test(rt.getAllResponseHeaders())&&(uo=rt.getResponseHeader("Link")),uo&&yn!=="application/ld+json"){const po=parseLinkHeader(uo),mo=po[LINK_HEADER_CONTEXT];if(Array.isArray(mo))throw new JsonLdError$a("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:tt});mo&&(ot.contextUrl=mo.target),ut=po.alternate,ut&&ut.type=="application/ld+json"&&!(yn||"").match(/^application\/(\w*\+)?json$/)&&(ot=await X(prependBase$2(tt,ut.target)))}return ot}};function _get$1(F,W,q){F=F||XMLHttpRequest;const K=new F;return new Promise((X,tt)=>{K.onload=()=>X(K),K.onerror=rt=>tt(rt),K.open("GET",W,!0);for(const rt in q)K.setRequestHeader(rt,q[rt]);K.send()})}const xhrLoader=xhr,api$9={};var platformBrowser=api$9;api$9.setupDocumentLoaders=function(F){typeof XMLHttpRequest<"u"&&(F.documentLoaders.xhr=xhrLoader,F.useDocumentLoader("xhr"))};api$9.setupGlobals=function(F){typeof globalThis.JsonLdProcessor>"u"&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:F.JsonLdProcessor})};var iterator$7,hasRequiredIterator;function requireIterator(){return hasRequiredIterator||(hasRequiredIterator=1,iterator$7=function(F){F.prototype[Symbol.iterator]=function*(){for(let W=this.head;W;W=W.next)yield W.value}}),iterator$7}var yallist=Yallist$1;Yallist$1.Node=Node$2;Yallist$1.create=Yallist$1;function Yallist$1(F){var W=this;if(W instanceof Yallist$1||(W=new Yallist$1),W.tail=null,W.head=null,W.length=0,F&&typeof F.forEach=="function")F.forEach(function(X){W.push(X)});else if(arguments.length>0)for(var q=0,K=arguments.length;q1)q=W;else if(this.head)K=this.head.next,q=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var X=0;K!==null;X++)q=F(q,K.value,X),K=K.next;return q};Yallist$1.prototype.reduceReverse=function(F,W){var q,K=this.tail;if(arguments.length>1)q=W;else if(this.tail)K=this.tail.prev,q=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var X=this.length-1;K!==null;X--)q=F(q,K.value,X),K=K.prev;return q};Yallist$1.prototype.toArray=function(){for(var F=new Array(this.length),W=0,q=this.head;q!==null;W++)F[W]=q.value,q=q.next;return F};Yallist$1.prototype.toArrayReverse=function(){for(var F=new Array(this.length),W=0,q=this.tail;q!==null;W++)F[W]=q.value,q=q.prev;return F};Yallist$1.prototype.slice=function(F,W){W=W||this.length,W<0&&(W+=this.length),F=F||0,F<0&&(F+=this.length);var q=new Yallist$1;if(Wthis.length&&(W=this.length);for(var K=0,X=this.head;X!==null&&Kthis.length&&(W=this.length);for(var K=this.length,X=this.tail;X!==null&&K>W;K--)X=X.prev;for(;X!==null&&K>F;K--,X=X.prev)q.push(X.value);return q};Yallist$1.prototype.splice=function(F,W,...q){F>this.length&&(F=this.length-1),F<0&&(F=this.length+F);for(var K=0,X=this.head;X!==null&&K1;class LRUCache{constructor(W){if(typeof W=="number"&&(W={max:W}),W||(W={}),W.max&&(typeof W.max!="number"||W.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=W.max||1/0;const q=W.length||naiveLength;if(this[LENGTH_CALCULATOR]=typeof q!="function"?naiveLength:q,this[ALLOW_STALE]=W.stale||!1,W.maxAge&&typeof W.maxAge!="number")throw new TypeError("maxAge must be a number");this[MAX_AGE]=W.maxAge||0,this[DISPOSE]=W.dispose,this[NO_DISPOSE_ON_SET]=W.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=W.updateAgeOnGet||!1,this.reset()}set max(W){if(typeof W!="number"||W<0)throw new TypeError("max must be a non-negative number");this[MAX]=W||1/0,trim$3(this)}get max(){return this[MAX]}set allowStale(W){this[ALLOW_STALE]=!!W}get allowStale(){return this[ALLOW_STALE]}set maxAge(W){if(typeof W!="number")throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=W,trim$3(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(W){typeof W!="function"&&(W=naiveLength),W!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=W,this[LENGTH]=0,this[LRU_LIST].forEach(q=>{q.length=this[LENGTH_CALCULATOR](q.value,q.key),this[LENGTH]+=q.length})),trim$3(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(W,q){q=q||this;for(let K=this[LRU_LIST].tail;K!==null;){const X=K.prev;forEachStep(this,W,K,q),K=X}}forEach(W,q){q=q||this;for(let K=this[LRU_LIST].head;K!==null;){const X=K.next;forEachStep(this,W,K,q),K=X}}keys(){return this[LRU_LIST].toArray().map(W=>W.key)}values(){return this[LRU_LIST].toArray().map(W=>W.value)}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach(W=>this[DISPOSE](W.key,W.value)),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map(W=>isStale(this,W)?!1:{k:W.key,v:W.value,e:W.now+(W.maxAge||0)}).toArray().filter(W=>W)}dumpLru(){return this[LRU_LIST]}set(W,q,K){if(K=K||this[MAX_AGE],K&&typeof K!="number")throw new TypeError("maxAge must be a number");const X=K?Date.now():0,tt=this[LENGTH_CALCULATOR](q,W);if(this[CACHE].has(W)){if(tt>this[MAX])return del(this,this[CACHE].get(W)),!1;const ut=this[CACHE].get(W).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](W,ut.value)),ut.now=X,ut.maxAge=K,ut.value=q,this[LENGTH]+=tt-ut.length,ut.length=tt,this.get(W),trim$3(this),!0}const rt=new Entry(W,q,tt,X,K);return rt.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](W,q),!1):(this[LENGTH]+=rt.length,this[LRU_LIST].unshift(rt),this[CACHE].set(W,this[LRU_LIST].head),trim$3(this),!0)}has(W){if(!this[CACHE].has(W))return!1;const q=this[CACHE].get(W).value;return!isStale(this,q)}get(W){return get$9(this,W,!0)}peek(W){return get$9(this,W,!1)}pop(){const W=this[LRU_LIST].tail;return W?(del(this,W),W.value):null}del(W){del(this,this[CACHE].get(W))}load(W){this.reset();const q=Date.now();for(let K=W.length-1;K>=0;K--){const X=W[K],tt=X.e||0;if(tt===0)this.set(X.k,X.v);else{const rt=tt-q;rt>0&&this.set(X.k,X.v,rt)}}}prune(){this[CACHE].forEach((W,q)=>get$9(this,q,!1))}}const get$9=(F,W,q)=>{const K=F[CACHE].get(W);if(K){const X=K.value;if(isStale(F,X)){if(del(F,K),!F[ALLOW_STALE])return}else q&&(F[UPDATE_AGE_ON_GET]&&(K.value.now=Date.now()),F[LRU_LIST].unshiftNode(K));return X.value}},isStale=(F,W)=>{if(!W||!W.maxAge&&!F[MAX_AGE])return!1;const q=Date.now()-W.now;return W.maxAge?q>W.maxAge:F[MAX_AGE]&&q>F[MAX_AGE]},trim$3=F=>{if(F[LENGTH]>F[MAX])for(let W=F[LRU_LIST].tail;F[LENGTH]>F[MAX]&&W!==null;){const q=W.prev;del(F,W),W=q}},del=(F,W)=>{if(W){const q=W.value;F[DISPOSE]&&F[DISPOSE](q.key,q.value),F[LENGTH]-=q.length,F[CACHE].delete(q.key),F[LRU_LIST].removeNode(W)}};class Entry{constructor(W,q,K,X,tt){this.key=W,this.value=q,this.length=K,this.now=X,this.maxAge=tt||0}}const forEachStep=(F,W,q,K)=>{let X=q.value;isStale(F,X)&&(del(F,q),F[ALLOW_STALE]||(X=void 0)),X&&W.call(K,X.value,X.key,F)};var lruCache=LRUCache;const LRU$1=lruCache,MAX_ACTIVE_CONTEXTS=10;var ResolvedContext_1=class{constructor({document:W}){this.document=W,this.cache=new LRU$1({max:MAX_ACTIVE_CONTEXTS})}getProcessed(W){return this.cache.get(W)}setProcessed(W,q){this.cache.set(W,q)}};const{isArray:_isArray$5,isObject:_isObject$4,isString:_isString$4}=types$7,{asArray:_asArray$4}=util$8,{prependBase:prependBase$1}=url$1,JsonLdError$9=JsonLdError_1,ResolvedContext=ResolvedContext_1,MAX_CONTEXT_URLS=10;var ContextResolver_1=class{constructor({sharedCache:W}){this.perOpCache=new Map,this.sharedCache=W}async resolve({activeCtx:W,context:q,documentLoader:K,base:X,cycles:tt=new Set}){q&&_isObject$4(q)&&q["@context"]&&(q=q["@context"]),q=_asArray$4(q);const rt=[];for(const ot of q){if(_isString$4(ot)){let uo=this._get(ot);uo||(uo=await this._resolveRemoteContext({activeCtx:W,url:ot,documentLoader:K,base:X,cycles:tt})),_isArray$5(uo)?rt.push(...uo):rt.push(uo);continue}if(ot===null){rt.push(new ResolvedContext({document:null}));continue}_isObject$4(ot)||_throwInvalidLocalContext(q);const ut=JSON.stringify(ot);let yn=this._get(ut);yn||(yn=new ResolvedContext({document:ot}),this._cacheResolvedContext({key:ut,resolved:yn,tag:"static"})),rt.push(yn)}return rt}_get(W){let q=this.perOpCache.get(W);if(!q){const K=this.sharedCache.get(W);K&&(q=K.get("static"),q&&this.perOpCache.set(W,q))}return q}_cacheResolvedContext({key:W,resolved:q,tag:K}){if(this.perOpCache.set(W,q),K!==void 0){let X=this.sharedCache.get(W);X||(X=new Map,this.sharedCache.set(W,X)),X.set(K,q)}return q}async _resolveRemoteContext({activeCtx:W,url:q,documentLoader:K,base:X,cycles:tt}){q=prependBase$1(X,q);const{context:rt,remoteDoc:ot}=await this._fetchContext({activeCtx:W,url:q,documentLoader:K,cycles:tt});X=ot.documentUrl||q,_resolveContextUrls({context:rt,base:X});const ut=await this.resolve({activeCtx:W,context:rt,documentLoader:K,base:X,cycles:tt});return this._cacheResolvedContext({key:q,resolved:ut,tag:ot.tag}),ut}async _fetchContext({activeCtx:W,url:q,documentLoader:K,cycles:X}){if(X.size>MAX_CONTEXT_URLS)throw new JsonLdError$9("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:W.processingMode==="json-ld-1.0"?"loading remote context failed":"context overflow",max:MAX_CONTEXT_URLS});if(X.has(q))throw new JsonLdError$9("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:W.processingMode==="json-ld-1.0"?"recursive context inclusion":"context overflow",url:q});X.add(q);let tt,rt;try{rt=await K(q),tt=rt.document||null,_isString$4(tt)&&(tt=JSON.parse(tt))}catch(ot){throw new JsonLdError$9("Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.","jsonld.InvalidUrl",{code:"loading remote context failed",url:q,cause:ot})}if(!_isObject$4(tt))throw new JsonLdError$9("Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.","jsonld.InvalidUrl",{code:"invalid remote context",url:q});return"@context"in tt?tt={"@context":tt["@context"]}:tt={"@context":{}},rt.contextUrl&&(_isArray$5(tt["@context"])||(tt["@context"]=[tt["@context"]]),tt["@context"].push(rt.contextUrl)),{context:tt,remoteDoc:rt}}};function _throwInvalidLocalContext(F){throw new JsonLdError$9("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:F})}function _resolveContextUrls({context:F,base:W}){if(!F)return;const q=F["@context"];if(_isString$4(q)){F["@context"]=prependBase$1(W,q);return}if(_isArray$5(q)){for(let K=0;K{const W=[].concat(F.safe?api$8.safeEventHandler:[],F.eventHandler?_asArray$3(F.eventHandler):[],api$8.defaultEventHandler?api$8.defaultEventHandler:[]);return W.length===0?null:W};api$8.handleEvent=({event:F,options:W})=>{_handle({event:F,handlers:W.eventHandler})};function _handle({event:F,handlers:W}){let q=!0;for(let K=0;q&&K{q=!0}});else if(typeof X=="object")F.code in X?X[F.code]({event:F,next:()=>{q=!0}}):q=!0;else throw new JsonLdError$8("Invalid event handler.","jsonld.InvalidEventHandler",{event:F})}return q}const _notSafeEventCodes=new Set(["empty object","free-floating scalar","invalid @language value","invalid property","null @id value","null @value value","object with only @id","object with only @language","object with only @list","object with only @value","relative @id reference","relative @type reference","relative @vocab reference","reserved @id value","reserved @reverse value","reserved term","blank node predicate","relative graph reference","relative object reference","relative predicate reference","relative subject reference","rdfDirection not set"]);api$8.safeEventHandler=function F({event:W,next:q}){if(W.level==="warning"&&_notSafeEventCodes.has(W.code))throw new JsonLdError$8("Safe mode validation error.","jsonld.ValidationError",{event:W});q()};api$8.logEventHandler=function F({event:W,next:q}){console.log(`EVENT: ${W.message}`,{event:W}),q()};api$8.logWarningEventHandler=function F({event:W,next:q}){W.level==="warning"&&console.warn(`WARNING: ${W.message}`,{event:W}),q()};api$8.unhandledEventHandler=function F({event:W}){throw new JsonLdError$8("No handler for event.","jsonld.UnhandledEvent",{event:W})};api$8.setDefaultEventHandler=function({eventHandler:F}={}){api$8.defaultEventHandler=F?_asArray$3(F):null};const util$7=util$8,JsonLdError$7=JsonLdError_1,{isArray:_isArray$3,isObject:_isObject$3,isString:_isString$3,isUndefined:_isUndefined$2}=types$7,{isAbsolute:_isAbsoluteIri$2,isRelative:_isRelativeIri,prependBase}=url$1,{handleEvent:_handleEvent$3}=events,{REGEX_BCP47:REGEX_BCP47$2,REGEX_KEYWORD:REGEX_KEYWORD$2,asArray:_asArray$2,compareShortestLeast:_compareShortestLeast$1}=util$8,INITIAL_CONTEXT_CACHE=new Map,INITIAL_CONTEXT_CACHE_MAX_SIZE=1e4,api$7={};var context=api$7;api$7.process=async({activeCtx:F,localCtx:W,options:q,propagate:K=!0,overrideProtected:X=!1,cycles:tt=new Set})=>{if(_isObject$3(W)&&"@context"in W&&_isArray$3(W["@context"])&&(W=W["@context"]),_asArray$2(W).length===0)return F;const ot=[],ut=[({event:mo,next:wo})=>{ot.push(mo),wo()}];q.eventHandler&&ut.push(q.eventHandler);const yn=q;q={...q,eventHandler:ut};const uo=await q.contextResolver.resolve({activeCtx:F,context:W,documentLoader:q.documentLoader,base:q.base});_isObject$3(uo[0].document)&&typeof uo[0].document["@propagate"]=="boolean"&&(K=uo[0].document["@propagate"]);let po=F;!K&&!po.previousContext&&(po=po.clone(),po.previousContext=F);for(const mo of uo){let{document:wo}=mo;if(F=po,wo===null){if(!X&&Object.keys(F.protected).length!==0)throw new JsonLdError$7("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"});po=F=api$7.getInitialContext(q).clone();continue}const lf=mo.getProcessed(F);if(lf){if(yn.eventHandler)for(const cf of lf.events)_handleEvent$3({event:cf,options:yn});po=F=lf.context;continue}if(_isObject$3(wo)&&"@context"in wo&&(wo=wo["@context"]),!_isObject$3(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:wo});po=po.clone();const yf=new Map;if("@version"in wo){if(wo["@version"]!==1.1)throw new JsonLdError$7("Unsupported JSON-LD version: "+wo["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:wo});if(F.processingMode&&F.processingMode==="json-ld-1.0")throw new JsonLdError$7("@version: "+wo["@version"]+" not compatible with "+F.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:wo});po.processingMode="json-ld-1.1",po["@version"]=wo["@version"],yf.set("@version",!0)}if(po.processingMode=po.processingMode||F.processingMode,"@base"in wo){let cf=wo["@base"];if(!(cf===null||_isAbsoluteIri$2(cf)))if(_isRelativeIri(cf))cf=prependBase(po["@base"],cf);else throw new JsonLdError$7('Invalid JSON-LD syntax; the value of "@base" in a @context must be an absolute IRI, a relative IRI, or null.',"jsonld.SyntaxError",{code:"invalid base IRI",context:wo});po["@base"]=cf,yf.set("@base",!0)}if("@vocab"in wo){const cf=wo["@vocab"];if(cf===null)delete po["@vocab"];else if(_isString$3(cf)){if(!_isAbsoluteIri$2(cf)&&api$7.processingMode(po,1))throw new JsonLdError$7('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:wo});{const vf=_expandIri$3(po,cf,{vocab:!0,base:!0},void 0,void 0,q);_isAbsoluteIri$2(vf)||q.eventHandler&&_handleEvent$3({event:{type:["JsonLdEvent"],code:"relative @vocab reference",level:"warning",message:"Relative @vocab reference found.",details:{vocab:vf}},options:q}),po["@vocab"]=vf}}else throw new JsonLdError$7('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:wo});yf.set("@vocab",!0)}if("@language"in wo){const cf=wo["@language"];if(cf===null)delete po["@language"];else if(_isString$3(cf))cf.match(REGEX_BCP47$2)||q.eventHandler&&_handleEvent$3({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:cf}},options:q}),po["@language"]=cf.toLowerCase();else throw new JsonLdError$7('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:wo});yf.set("@language",!0)}if("@direction"in wo){const cf=wo["@direction"];if(F.processingMode==="json-ld-1.0")throw new JsonLdError$7("Invalid JSON-LD syntax; @direction not compatible with "+F.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:wo});if(cf===null)delete po["@direction"];else{if(cf!=="ltr"&&cf!=="rtl")throw new JsonLdError$7('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:wo});po["@direction"]=cf}yf.set("@direction",!0)}if("@propagate"in wo){const cf=wo["@propagate"];if(F.processingMode==="json-ld-1.0")throw new JsonLdError$7("Invalid JSON-LD syntax; @propagate not compatible with "+F.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:wo});if(typeof cf!="boolean")throw new JsonLdError$7("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:W});yf.set("@propagate",!0)}if("@import"in wo){const cf=wo["@import"];if(F.processingMode==="json-ld-1.0")throw new JsonLdError$7("Invalid JSON-LD syntax; @import not compatible with "+F.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:wo});if(!_isString$3(cf))throw new JsonLdError$7("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:W});const vf=await q.contextResolver.resolve({activeCtx:F,context:cf,documentLoader:q.documentLoader,base:q.base});if(vf.length!==1)throw new JsonLdError$7("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:W});const _f=vf[0].getProcessed(F);if(_f)wo=_f;else{const $f=vf[0].document;if("@import"in $f)throw new JsonLdError$7("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:W});for(const xf in $f)wo.hasOwnProperty(xf)||(wo[xf]=$f[xf]);vf[0].setProcessed(F,wo)}yf.set("@import",!0)}yf.set("@protected",wo["@protected"]||!1);for(const cf in wo)if(api$7.createTermDefinition({activeCtx:po,localCtx:wo,term:cf,defined:yf,options:q,overrideProtected:X}),_isObject$3(wo[cf])&&"@context"in wo[cf]){const vf=wo[cf]["@context"];let _f=!0;if(_isString$3(vf)){const $f=prependBase(q.base,vf);tt.has($f)?_f=!1:tt.add($f)}if(_f)try{await api$7.process({activeCtx:po.clone(),localCtx:wo[cf]["@context"],overrideProtected:!0,options:q,cycles:tt})}catch{throw new JsonLdError$7("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:wo[cf]["@context"],term:cf})}}mo.setProcessed(F,{context:po,events:ot})}return po};api$7.createTermDefinition=({activeCtx:F,localCtx:W,term:q,defined:K,options:X,overrideProtected:tt=!1})=>{if(K.has(q)){if(K.get(q))return;throw new JsonLdError$7("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:W,term:q})}K.set(q,!1);let rt;if(W.hasOwnProperty(q)&&(rt=W[q]),q==="@type"&&_isObject$3(rt)&&(rt["@container"]||"@set")==="@set"&&api$7.processingMode(F,1.1)){const wo=["@container","@id","@protected"],lf=Object.keys(rt);if(lf.length===0||lf.some(yf=>!wo.includes(yf)))throw new JsonLdError$7("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:W,term:q})}else{if(api$7.isKeyword(q))throw new JsonLdError$7("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:W,term:q});if(q.match(REGEX_KEYWORD$2)){X.eventHandler&&_handleEvent$3({event:{type:["JsonLdEvent"],code:"reserved term",level:"warning",message:'Terms beginning with "@" are reserved for future use and dropped.',details:{term:q}},options:X});return}else if(q==="")throw new JsonLdError$7("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:W})}const ot=F.mappings.get(q);F.mappings.has(q)&&F.mappings.delete(q);let ut=!1;if((_isString$3(rt)||rt===null)&&(ut=!0,rt={"@id":rt}),!_isObject$3(rt))throw new JsonLdError$7("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:W});const yn={};F.mappings.set(q,yn),yn.reverse=!1;const uo=["@container","@id","@language","@reverse","@type"];api$7.processingMode(F,1.1)&&uo.push("@context","@direction","@index","@nest","@prefix","@protected");for(const wo in rt)if(!uo.includes(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; a term definition must not contain "+wo,"jsonld.SyntaxError",{code:"invalid term definition",context:W});const po=q.indexOf(":");if(yn._termHasColon=po>0,"@reverse"in rt){if("@id"in rt)throw new JsonLdError$7("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:W});if("@nest"in rt)throw new JsonLdError$7("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:W});const wo=rt["@reverse"];if(!_isString$3(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:W});if(wo.match(REGEX_KEYWORD$2)){X.eventHandler&&_handleEvent$3({event:{type:["JsonLdEvent"],code:"reserved @reverse value",level:"warning",message:'@reverse values beginning with "@" are reserved for future use and dropped.',details:{reverse:wo}},options:X}),ot?F.mappings.set(q,ot):F.mappings.delete(q);return}const lf=_expandIri$3(F,wo,{vocab:!0,base:!1},W,K,X);if(!_isAbsoluteIri$2(lf))throw new JsonLdError$7("Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:W});yn["@id"]=lf,yn.reverse=!0}else if("@id"in rt){let wo=rt["@id"];if(wo&&!_isString$3(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:W});if(wo===null)yn["@id"]=null;else if(!api$7.isKeyword(wo)&&wo.match(REGEX_KEYWORD$2)){X.eventHandler&&_handleEvent$3({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:'@id values beginning with "@" are reserved for future use and dropped.',details:{id:wo}},options:X}),ot?F.mappings.set(q,ot):F.mappings.delete(q);return}else if(wo!==q){if(wo=_expandIri$3(F,wo,{vocab:!0,base:!1},W,K,X),!_isAbsoluteIri$2(wo)&&!api$7.isKeyword(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:W});if(q.match(/(?::[^:])|\//)){const lf=new Map(K).set(q,!0);if(_expandIri$3(F,q,{vocab:!0,base:!1},W,lf,X)!==wo)throw new JsonLdError$7("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:W})}yn["@id"]=wo,yn._prefix=ut&&!yn._termHasColon&&wo.match(/[:\/\?#\[\]@]$/)!==null}}if(!("@id"in yn))if(yn._termHasColon){const wo=q.substr(0,po);if(W.hasOwnProperty(wo)&&api$7.createTermDefinition({activeCtx:F,localCtx:W,term:wo,defined:K,options:X}),F.mappings.has(wo)){const lf=q.substr(po+1);yn["@id"]=F.mappings.get(wo)["@id"]+lf}else yn["@id"]=q}else if(q==="@type")yn["@id"]=q;else{if(!("@vocab"in F))throw new JsonLdError$7("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:W,term:q});yn["@id"]=F["@vocab"]+q}if((rt["@protected"]===!0||K.get("@protected")===!0&&rt["@protected"]!==!1)&&(F.protected[q]=!0,yn.protected=!0),K.set(q,!0),"@type"in rt){let wo=rt["@type"];if(!_isString$3(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:W});if(wo==="@json"||wo==="@none"){if(api$7.processingMode(F,1))throw new JsonLdError$7(`Invalid JSON-LD syntax; an @context @type value must not be "${wo}" in JSON-LD 1.0 mode.`,"jsonld.SyntaxError",{code:"invalid type mapping",context:W})}else if(wo!=="@id"&&wo!=="@vocab"){if(wo=_expandIri$3(F,wo,{vocab:!0,base:!1},W,K,X),!_isAbsoluteIri$2(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:W});if(wo.indexOf("_:")===0)throw new JsonLdError$7("Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.","jsonld.SyntaxError",{code:"invalid type mapping",context:W})}yn["@type"]=wo}if("@container"in rt){const wo=_isString$3(rt["@container"])?[rt["@container"]]:rt["@container"]||[],lf=["@list","@set","@index","@language"];let yf=!0;const cf=wo.includes("@set");if(api$7.processingMode(F,1.1)){if(lf.push("@graph","@id","@type"),wo.includes("@list")){if(wo.length!==1)throw new JsonLdError$7("Invalid JSON-LD syntax; @context @container with @list must have no other values","jsonld.SyntaxError",{code:"invalid container mapping",context:W})}else if(wo.includes("@graph")){if(wo.some(vf=>vf!=="@graph"&&vf!=="@id"&&vf!=="@index"&&vf!=="@set"))throw new JsonLdError$7("Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set","jsonld.SyntaxError",{code:"invalid container mapping",context:W})}else yf&=wo.length<=(cf?2:1);if(wo.includes("@type")&&(yn["@type"]=yn["@type"]||"@id",!["@id","@vocab"].includes(yn["@type"])))throw new JsonLdError$7("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:W})}else yf&=!_isArray$3(rt["@container"]),yf&=wo.length<=1;if(yf&=wo.every(vf=>lf.includes(vf)),yf&=!(cf&&wo.includes("@list")),!yf)throw new JsonLdError$7("Invalid JSON-LD syntax; @context @container value must be one of the following: "+lf.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:W});if(yn.reverse&&!wo.every(vf=>["@index","@set"].includes(vf)))throw new JsonLdError$7("Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.","jsonld.SyntaxError",{code:"invalid reverse property",context:W});yn["@container"]=wo}if("@index"in rt){if(!("@container"in rt)||!yn["@container"].includes("@index"))throw new JsonLdError$7(`Invalid JSON-LD syntax; @index without @index in @container: "${rt["@index"]}" on term "${q}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:W});if(!_isString$3(rt["@index"])||rt["@index"].indexOf("@")===0)throw new JsonLdError$7(`Invalid JSON-LD syntax; @index must expand to an IRI: "${rt["@index"]}" on term "${q}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:W});yn["@index"]=rt["@index"]}if("@context"in rt&&(yn["@context"]=rt["@context"]),"@language"in rt&&!("@type"in rt)){let wo=rt["@language"];if(wo!==null&&!_isString$3(wo))throw new JsonLdError$7("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:W});wo!==null&&(wo=wo.toLowerCase()),yn["@language"]=wo}if("@prefix"in rt){if(q.match(/:|\//))throw new JsonLdError$7("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:W});if(api$7.isKeyword(yn["@id"]))throw new JsonLdError$7("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:W});if(typeof rt["@prefix"]=="boolean")yn._prefix=rt["@prefix"]===!0;else throw new JsonLdError$7("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:W})}if("@direction"in rt){const wo=rt["@direction"];if(wo!==null&&wo!=="ltr"&&wo!=="rtl")throw new JsonLdError$7('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:W});yn["@direction"]=wo}if("@nest"in rt){const wo=rt["@nest"];if(!_isString$3(wo)||wo!=="@nest"&&wo.indexOf("@")===0)throw new JsonLdError$7("Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.","jsonld.SyntaxError",{code:"invalid @nest value",context:W});yn["@nest"]=wo}// disallow aliasing @context and @preserve +const mo=yn["@id"];if(mo==="@context"||mo==="@preserve")throw new JsonLdError$7("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:W});if(ot&&ot.protected&&!tt&&(F.protected[q]=!0,yn.protected=!0,!_deepCompare(ot,yn)))throw new JsonLdError$7("Invalid JSON-LD syntax; tried to redefine a protected term.","jsonld.SyntaxError",{code:"protected term redefinition",context:W,term:q})};api$7.expandIri=(F,W,q,K)=>_expandIri$3(F,W,q,void 0,void 0,K);function _expandIri$3(F,W,q,K,X,tt){if(W===null||!_isString$3(W)||api$7.isKeyword(W))return W;if(W.match(REGEX_KEYWORD$2))return null;if(K&&K.hasOwnProperty(W)&&X.get(W)!==!0&&api$7.createTermDefinition({activeCtx:F,localCtx:K,term:W,defined:X,options:tt}),q=q||{},q.vocab){const ot=F.mappings.get(W);if(ot===null)return null;if(_isObject$3(ot)&&"@id"in ot)return ot["@id"]}const rt=W.indexOf(":");if(rt>0){const ot=W.substr(0,rt),ut=W.substr(rt+1);if(ot==="_"||ut.indexOf("//")===0)return W;K&&K.hasOwnProperty(ot)&&api$7.createTermDefinition({activeCtx:F,localCtx:K,term:ot,defined:X,options:tt});const yn=F.mappings.get(ot);if(yn&&yn._prefix)return yn["@id"]+ut;if(_isAbsoluteIri$2(W))return W}if(q.vocab&&"@vocab"in F)W=F["@vocab"]+W;else if(q.base){let ot,ut;"@base"in F?F["@base"]?(ut=prependBase(tt.base,F["@base"]),ot=prependBase(ut,W)):(ut=F["@base"],ot=W):(ut=tt.base,ot=prependBase(tt.base,W)),W=ot}return W}api$7.getInitialContext=F=>{const W=JSON.stringify({processingMode:F.processingMode}),q=INITIAL_CONTEXT_CACHE.get(W);if(q)return q;const K={processingMode:F.processingMode,mappings:new Map,inverse:null,getInverse:X,clone:ot,revertToPreviousContext:ut,protected:{}};return INITIAL_CONTEXT_CACHE.size===INITIAL_CONTEXT_CACHE_MAX_SIZE&&INITIAL_CONTEXT_CACHE.clear(),INITIAL_CONTEXT_CACHE.set(W,K),K;function X(){const yn=this;if(yn.inverse)return yn.inverse;const uo=yn.inverse={},po=yn.fastCurieMap={},mo={},wo=(yn["@language"]||"@none").toLowerCase(),lf=yn["@direction"],yf=yn.mappings,cf=[...yf.keys()].sort(_compareShortestLeast$1);for(const vf of cf){const _f=yf.get(vf);if(_f===null)continue;let $f=_f["@container"]||"@none";if($f=[].concat($f).sort().join(""),_f["@id"]===null)continue;const xf=_asArray$2(_f["@id"]);for(const Af of xf){let Cf=uo[Af];const Pf=api$7.isKeyword(Af);if(Cf)!Pf&&!_f._termHasColon&&mo[Af].push(vf);else if(uo[Af]=Cf={},!Pf&&!_f._termHasColon){mo[Af]=[vf];const Bf={iri:Af,terms:mo[Af]};Af[0]in po?po[Af[0]].push(Bf):po[Af[0]]=[Bf]}if(Cf[$f]||(Cf[$f]={"@language":{},"@type":{},"@any":{}}),Cf=Cf[$f],rt(vf,Cf["@any"],"@none"),_f.reverse)rt(vf,Cf["@type"],"@reverse");else if(_f["@type"]==="@none")rt(vf,Cf["@any"],"@none"),rt(vf,Cf["@language"],"@none"),rt(vf,Cf["@type"],"@none");else if("@type"in _f)rt(vf,Cf["@type"],_f["@type"]);else if("@language"in _f&&"@direction"in _f){const Bf=_f["@language"],Hf=_f["@direction"];Bf&&Hf?rt(vf,Cf["@language"],`${Bf}_${Hf}`.toLowerCase()):Bf?rt(vf,Cf["@language"],Bf.toLowerCase()):Hf?rt(vf,Cf["@language"],`_${Hf}`):rt(vf,Cf["@language"],"@null")}else"@language"in _f?rt(vf,Cf["@language"],(_f["@language"]||"@null").toLowerCase()):"@direction"in _f?_f["@direction"]?rt(vf,Cf["@language"],`_${_f["@direction"]}`):rt(vf,Cf["@language"],"@none"):lf?(rt(vf,Cf["@language"],`_${lf}`),rt(vf,Cf["@language"],"@none"),rt(vf,Cf["@type"],"@none")):(rt(vf,Cf["@language"],wo),rt(vf,Cf["@language"],"@none"),rt(vf,Cf["@type"],"@none"))}}for(const vf in po)tt(po,vf,1);return uo}function tt(yn,uo,po){const mo=yn[uo],wo=yn[uo]={};let lf,yf;for(const cf of mo)lf=cf.iri,po>=lf.length?yf="":yf=lf[po],yf in wo?wo[yf].push(cf):wo[yf]=[cf];for(const cf in wo)cf!==""&&tt(wo,cf,po+1)}function rt(yn,uo,po){uo.hasOwnProperty(po)||(uo[po]=yn)}function ot(){const yn={};return yn.mappings=util$7.clone(this.mappings),yn.clone=this.clone,yn.inverse=null,yn.getInverse=this.getInverse,yn.protected=util$7.clone(this.protected),this.previousContext&&(yn.previousContext=this.previousContext.clone()),yn.revertToPreviousContext=this.revertToPreviousContext,"@base"in this&&(yn["@base"]=this["@base"]),"@language"in this&&(yn["@language"]=this["@language"]),"@vocab"in this&&(yn["@vocab"]=this["@vocab"]),yn}function ut(){return this.previousContext?this.previousContext.clone():this}};api$7.getContextValue=(F,W,q)=>{if(W===null)return q==="@context"?void 0:null;if(F.mappings.has(W)){const K=F.mappings.get(W);if(_isUndefined$2(q))return K;if(K.hasOwnProperty(q))return K[q]}if(q==="@language"&&q in F||q==="@direction"&&q in F)return F[q];if(q!=="@context")return null};api$7.processingMode=(F,W)=>W.toString()>="1.1"?!F.processingMode||F.processingMode>="json-ld-"+W.toString():F.processingMode==="json-ld-1.0";api$7.isKeyword=F=>{if(!_isString$3(F)||F[0]!=="@")return!1;switch(F){case"@base":case"@container":case"@context":case"@default":case"@direction":case"@embed":case"@explicit":case"@graph":case"@id":case"@included":case"@index":case"@json":case"@language":case"@list":case"@nest":case"@none":case"@omitDefault":case"@prefix":case"@preserve":case"@protected":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@version":case"@vocab":return!0}return!1};function _deepCompare(F,W){if(!(F&&typeof F=="object")||!(W&&typeof W=="object"))return F===W;const q=Array.isArray(F);if(q!==Array.isArray(W))return!1;if(q){if(F.length!==W.length)return!1;for(let tt=0;tt{if(q==null)return null;if(W==="@default"&&(K=Object.assign({},K,{isFrame:!1})),!_isArray$2(q)&&!_isObject$2(q))return!X&&(W===null||_expandIri$2(F,W,{vocab:!0},K)==="@graph")?(K.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"free-floating scalar",level:"warning",message:"Dropping free-floating scalar not in a list.",details:{value:q}},options:K}),null):_expandValue({activeCtx:F,activeProperty:W,value:q,options:K});if(_isArray$2(q)){let lf=[];const yf=_getContextValue$1(F,W,"@container")||[];X=X||yf.includes("@list");for(let cf=0;cf1?cf.slice().sort():cf:[cf];for(const _f of vf){const $f=_getContextValue$1(rt,_f,"@context");_isUndefined$1($f)||(F=await _processContext$2({activeCtx:F,localCtx:$f,options:K,propagate:!1}))}}let mo={};await _expandObject({activeCtx:F,activeProperty:W,expandedActiveProperty:ot,element:q,expandedParent:mo,options:K,insideList:X,typeKey:po,typeScopedContext:rt}),yn=Object.keys(mo);let wo=yn.length;if("@value"in mo){if("@type"in mo&&("@language"in mo||"@direction"in mo))throw new JsonLdError$6('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:mo});let lf=wo-1;if("@type"in mo&&(lf-=1),"@index"in mo&&(lf-=1),"@language"in mo&&(lf-=1),"@direction"in mo&&(lf-=1),lf!==0)throw new JsonLdError$6('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:mo});const yf=mo["@value"]===null?[]:_asArray$1(mo["@value"]),cf=_getValues(mo,"@type");if(!(_processingMode$2(F,1.1)&&cf.includes("@json")&&cf.length===1))if(yf.length===0)K.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"null @value value",level:"warning",message:"Dropping null @value value.",details:{value:mo}},options:K}),mo=null;else{if(!yf.every(vf=>_isString$2(vf)||_isEmptyObject(vf))&&"@language"in mo)throw new JsonLdError$6("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:mo});if(!cf.every(vf=>_isAbsoluteIri$1(vf)&&!(_isString$2(vf)&&vf.indexOf("_:")===0)||_isEmptyObject(vf)))throw new JsonLdError$6('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:mo})}}else if("@type"in mo&&!_isArray$2(mo["@type"]))mo["@type"]=[mo["@type"]];else if("@set"in mo||"@list"in mo){if(wo>1&&!(wo===2&&"@index"in mo))throw new JsonLdError$6('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:mo});"@set"in mo&&(mo=mo["@set"],yn=Object.keys(mo),wo=yn.length)}else wo===1&&"@language"in mo&&(K.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"object with only @language",level:"warning",message:"Dropping object with only @language.",details:{value:mo}},options:K}),mo=null);return _isObject$2(mo)&&!K.keepFreeFloatingNodes&&!X&&(W===null||ot==="@graph"||(_getContextValue$1(F,W,"@container")||[]).includes("@graph"))&&(mo=_dropUnsafeObject({value:mo,count:wo,options:K})),mo};function _dropUnsafeObject({value:F,count:W,options:q}){if(W===0||"@value"in F||"@list"in F||W===1&&"@id"in F){if(q.eventHandler){let K,X;W===0?(K="empty object",X="Dropping empty object."):"@value"in F?(K="object with only @value",X="Dropping object with only @value."):"@list"in F?(K="object with only @list",X="Dropping object with only @list."):W===1&&"@id"in F&&(K="object with only @id",X="Dropping object with only @id."),_handleEvent$2({event:{type:["JsonLdEvent"],code:K,level:"warning",message:X,details:{value:F}},options:q})}return null}return F}async function _expandObject({activeCtx:F,activeProperty:W,expandedActiveProperty:q,element:K,expandedParent:X,options:tt={},insideList:rt,typeKey:ot,typeScopedContext:ut}){const yn=Object.keys(K).sort(),uo=[];let po;const mo=K[ot]&&_expandIri$2(F,_isArray$2(K[ot])?K[ot][0]:K[ot],{vocab:!0},{...tt,typeExpansion:!0})==="@json";for(const wo of yn){let lf=K[wo],yf;if(wo==="@context")continue;const cf=_expandIri$2(F,wo,{vocab:!0},tt);if(cf===null||!(_isAbsoluteIri$1(cf)||_isKeyword$1(cf))){tt.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"invalid property",level:"warning",message:"Dropping property that did not expand into an absolute IRI or keyword.",details:{property:wo,expandedProperty:cf}},options:tt});continue}if(_isKeyword$1(cf)){if(q==="@reverse")throw new JsonLdError$6("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:lf});if(cf in X&&cf!=="@included"&&cf!=="@type")throw new JsonLdError$6("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:cf})}if(cf==="@id"){if(!_isString$2(lf)){if(!tt.isFrame)throw new JsonLdError$6('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:lf});if(_isObject$2(lf)){if(!_isEmptyObject(lf))throw new JsonLdError$6('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:lf})}else if(_isArray$2(lf)){if(!lf.every(xf=>_isString$2(xf)))throw new JsonLdError$6('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:lf})}else throw new JsonLdError$6('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:lf})}_addValue$2(X,"@id",_asArray$1(lf).map(xf=>{if(_isString$2(xf)){const Af=_expandIri$2(F,xf,{base:!0},tt);return tt.eventHandler&&(Af===null?_handleEvent$2(xf===null?{event:{type:["JsonLdEvent"],code:"null @id value",level:"warning",message:"Null @id found.",details:{id:xf}},options:tt}:{event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:xf}},options:tt}):_isAbsoluteIri$1(Af)||_handleEvent$2({event:{type:["JsonLdEvent"],code:"relative @id reference",level:"warning",message:"Relative @id reference found.",details:{id:xf,expandedId:Af}},options:tt})),Af}return xf}),{propertyIsArray:tt.isFrame});continue}if(cf==="@type"){_isObject$2(lf)&&(lf=Object.fromEntries(Object.entries(lf).map(([xf,Af])=>[_expandIri$2(ut,xf,{vocab:!0}),_asArray$1(Af).map(Cf=>_expandIri$2(ut,Cf,{base:!0,vocab:!0},{...tt,typeExpansion:!0}))]))),_validateTypeValue(lf,tt.isFrame),_addValue$2(X,"@type",_asArray$1(lf).map(xf=>{if(_isString$2(xf)){const Af=_expandIri$2(ut,xf,{base:!0,vocab:!0},{...tt,typeExpansion:!0});return Af!=="@json"&&!_isAbsoluteIri$1(Af)&&tt.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"relative @type reference",level:"warning",message:"Relative @type reference found.",details:{type:xf}},options:tt}),Af}return xf}),{propertyIsArray:!!tt.isFrame});continue}if(cf==="@included"&&_processingMode$2(F,1.1)){const xf=_asArray$1(await api$6.expand({activeCtx:F,activeProperty:W,element:lf,options:tt}));if(!xf.every(Af=>_isSubject(Af)))throw new JsonLdError$6("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:lf});_addValue$2(X,"@included",xf,{propertyIsArray:!0});continue}if(cf==="@graph"&&!(_isObject$2(lf)||_isArray$2(lf)))throw new JsonLdError$6('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:lf});if(cf==="@value"){po=lf,mo&&_processingMode$2(F,1.1)?X["@value"]=lf:_addValue$2(X,"@value",lf,{propertyIsArray:tt.isFrame});continue}if(cf==="@language"){if(lf===null)continue;if(!_isString$2(lf)&&!tt.isFrame)throw new JsonLdError$6('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:lf});lf=_asArray$1(lf).map(xf=>_isString$2(xf)?xf.toLowerCase():xf);for(const xf of lf)_isString$2(xf)&&!xf.match(REGEX_BCP47$1)&&tt.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:xf}},options:tt});_addValue$2(X,"@language",lf,{propertyIsArray:tt.isFrame});continue}if(cf==="@direction"){if(!_isString$2(lf)&&!tt.isFrame)throw new JsonLdError$6('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:lf});lf=_asArray$1(lf);for(const xf of lf)if(_isString$2(xf)&&xf!=="ltr"&&xf!=="rtl")throw new JsonLdError$6('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:lf});_addValue$2(X,"@direction",lf,{propertyIsArray:tt.isFrame});continue}if(cf==="@index"){if(!_isString$2(lf))throw new JsonLdError$6('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:lf});_addValue$2(X,"@index",lf);continue}if(cf==="@reverse"){if(!_isObject$2(lf))throw new JsonLdError$6('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:lf});if(yf=await api$6.expand({activeCtx:F,activeProperty:"@reverse",element:lf,options:tt}),"@reverse"in yf)for(const Af in yf["@reverse"])_addValue$2(X,Af,yf["@reverse"][Af],{propertyIsArray:!0});let xf=X["@reverse"]||null;for(const Af in yf){if(Af==="@reverse")continue;xf===null&&(xf=X["@reverse"]={}),_addValue$2(xf,Af,[],{propertyIsArray:!0});const Cf=yf[Af];for(let Pf=0;Pfxf==="@id"||xf==="@index")){if(yf=_asArray$1(yf),tt.isFrame||(yf=yf.filter(xf=>{const Af=Object.keys(xf).length;return _dropUnsafeObject({value:xf,count:Af,options:tt})!==null})),yf.length===0)continue;yf=yf.map(xf=>({"@graph":_asArray$1(xf)}))}if(vf.mappings.has(wo)&&vf.mappings.get(wo).reverse){const xf=X["@reverse"]=X["@reverse"]||{};yf=_asArray$1(yf);for(let Af=0;Af_expandIri$2(F,cf,{vocab:!0},tt)==="@value"))throw new JsonLdError$6("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:yf});await _expandObject({activeCtx:F,activeProperty:W,expandedActiveProperty:q,element:yf,expandedParent:X,options:tt,insideList:rt,typeScopedContext:ut,typeKey:ot})}}}function _expandValue({activeCtx:F,activeProperty:W,value:q,options:K}){if(q==null)return null;const X=_expandIri$2(F,W,{vocab:!0},K);if(X==="@id")return _expandIri$2(F,q,{base:!0},K);if(X==="@type")return _expandIri$2(F,q,{vocab:!0,base:!0},{...K,typeExpansion:!0});const tt=_getContextValue$1(F,W,"@type");if((tt==="@id"||X==="@graph")&&_isString$2(q)){const ot=_expandIri$2(F,q,{base:!0},K);return ot===null&&q.match(REGEX_KEYWORD$1)&&K.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:W}},options:K}),{"@id":ot}}if(tt==="@vocab"&&_isString$2(q))return{"@id":_expandIri$2(F,q,{vocab:!0,base:!0},K)};if(_isKeyword$1(X))return q;const rt={};if(tt&&!["@id","@vocab","@none"].includes(tt))rt["@type"]=tt;else if(_isString$2(q)){const ot=_getContextValue$1(F,W,"@language");ot!==null&&(rt["@language"]=ot);const ut=_getContextValue$1(F,W,"@direction");ut!==null&&(rt["@direction"]=ut)}return["boolean","number","string"].includes(typeof q)||(q=q.toString()),rt["@value"]=q,rt}function _expandLanguageMap(F,W,q,K){const X=[],tt=Object.keys(W).sort();for(const rt of tt){const ot=_expandIri$2(F,rt,{vocab:!0},K);let ut=W[rt];_isArray$2(ut)||(ut=[ut]);for(const yn of ut){if(yn===null)continue;if(!_isString$2(yn))throw new JsonLdError$6("Invalid JSON-LD syntax; language map values must be strings.","jsonld.SyntaxError",{code:"invalid language map value",languageMap:W});const uo={"@value":yn};ot!=="@none"&&(rt.match(REGEX_BCP47$1)||K.eventHandler&&_handleEvent$2({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:rt}},options:K}),uo["@language"]=rt.toLowerCase()),q&&(uo["@direction"]=q),X.push(uo)}}return X}async function _expandIndexMap({activeCtx:F,options:W,activeProperty:q,value:K,asGraph:X,indexKey:tt,propertyIndex:rt}){const ot=[],ut=Object.keys(K).sort(),yn=tt==="@type";for(let uo of ut){if(yn){const wo=_getContextValue$1(F,uo,"@context");_isUndefined$1(wo)||(F=await _processContext$2({activeCtx:F,localCtx:wo,propagate:!1,options:W}))}let po=K[uo];_isArray$2(po)||(po=[po]),po=await api$6.expand({activeCtx:F,activeProperty:q,element:po,options:W,insideList:!1,insideIndex:!0});let mo;rt?uo==="@none"?mo="@none":mo=_expandValue({activeCtx:F,activeProperty:tt,value:uo,options:W}):mo=_expandIri$2(F,uo,{vocab:!0},W),tt==="@id"?uo=_expandIri$2(F,uo,{base:!0},W):yn&&(uo=mo);for(let wo of po){if(X&&!_isGraph$1(wo)&&(wo={"@graph":[wo]}),tt==="@type")mo==="@none"||(wo["@type"]?wo["@type"]=[uo].concat(wo["@type"]):wo["@type"]=[uo]);else{if(_isValue$1(wo)&&!["@language","@type","@index"].includes(tt))throw new JsonLdError$6(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: "${tt}".`,"jsonld.SyntaxError",{code:"invalid value object",value:wo});rt?mo!=="@none"&&_addValue$2(wo,rt,mo,{propertyIsArray:!0,prependValue:!0}):mo!=="@none"&&!(tt in wo)&&(wo[tt]=uo)}ot.push(wo)}}return ot}const{isKeyword:isKeyword$2}=context,graphTypes$3=graphTypes$5,types$3=types$7,util$6=util$8,JsonLdError$5=JsonLdError_1,api$5={};var nodeMap=api$5;api$5.createMergedNodeMap=(F,W)=>{W=W||{};const q=W.issuer||new util$6.IdentifierIssuer("_:b"),K={"@default":{}};return api$5.createNodeMap(F,K,"@default",q),api$5.mergeNodeMaps(K)};api$5.createNodeMap=(F,W,q,K,X,tt)=>{if(types$3.isArray(F)){for(const yn of F)api$5.createNodeMap(yn,W,q,K,void 0,tt);return}if(!types$3.isObject(F)){tt&&tt.push(F);return}if(graphTypes$3.isValue(F)){if("@type"in F){let yn=F["@type"];yn.indexOf("_:")===0&&(F["@type"]=yn=K.getId(yn))}tt&&tt.push(F);return}else if(tt&&graphTypes$3.isList(F)){const yn=[];api$5.createNodeMap(F["@list"],W,q,K,X,yn),tt.push({"@list":yn});return}if("@type"in F){const yn=F["@type"];for(const uo of yn)uo.indexOf("_:")===0&&K.getId(uo)}types$3.isUndefined(X)&&(X=graphTypes$3.isBlankNode(F)?K.getId(F["@id"]):F["@id"]),tt&&tt.push({"@id":X});const rt=W[q],ot=rt[X]=rt[X]||{};ot["@id"]=X;const ut=Object.keys(F).sort();for(let yn of ut){if(yn==="@id")continue;if(yn==="@reverse"){const po={"@id":X},mo=F["@reverse"];for(const wo in mo){const lf=mo[wo];for(const yf of lf){let cf=yf["@id"];graphTypes$3.isBlankNode(yf)&&(cf=K.getId(cf)),api$5.createNodeMap(yf,W,q,K,cf),util$6.addValue(rt[cf],wo,po,{propertyIsArray:!0,allowDuplicate:!1})}}continue}if(yn==="@graph"){X in W||(W[X]={}),api$5.createNodeMap(F[yn],W,X,K);continue}if(yn==="@included"){api$5.createNodeMap(F[yn],W,q,K);continue}if(yn!=="@type"&&isKeyword$2(yn)){if(yn==="@index"&&yn in ot&&(F[yn]!==ot[yn]||F[yn]["@id"]!==ot[yn]["@id"]))throw new JsonLdError$5("Invalid JSON-LD syntax; conflicting @index property detected.","jsonld.SyntaxError",{code:"conflicting indexes",subject:ot});ot[yn]=F[yn];continue}const uo=F[yn];if(yn.indexOf("_:")===0&&(yn=K.getId(yn)),uo.length===0){util$6.addValue(ot,yn,[],{propertyIsArray:!0});continue}for(let po of uo)if(yn==="@type"&&(po=po.indexOf("_:")===0?K.getId(po):po),graphTypes$3.isSubject(po)||graphTypes$3.isSubjectReference(po)){if("@id"in po&&!po["@id"])continue;const mo=graphTypes$3.isBlankNode(po)?K.getId(po["@id"]):po["@id"];util$6.addValue(ot,yn,{"@id":mo},{propertyIsArray:!0,allowDuplicate:!1}),api$5.createNodeMap(po,W,q,K,mo)}else if(graphTypes$3.isValue(po))util$6.addValue(ot,yn,po,{propertyIsArray:!0,allowDuplicate:!1});else if(graphTypes$3.isList(po)){const mo=[];api$5.createNodeMap(po["@list"],W,q,K,X,mo),po={"@list":mo},util$6.addValue(ot,yn,po,{propertyIsArray:!0,allowDuplicate:!1})}else api$5.createNodeMap(po,W,q,K,X),util$6.addValue(ot,yn,po,{propertyIsArray:!0,allowDuplicate:!1})}};api$5.mergeNodeMapGraphs=F=>{const W={};for(const q of Object.keys(F).sort())for(const K of Object.keys(F[q]).sort()){const X=F[q][K];K in W||(W[K]={"@id":K});const tt=W[K];for(const rt of Object.keys(X).sort())if(isKeyword$2(rt)&&rt!=="@type")tt[rt]=util$6.clone(X[rt]);else for(const ot of X[rt])util$6.addValue(tt,rt,util$6.clone(ot),{propertyIsArray:!0,allowDuplicate:!1})}return W};api$5.mergeNodeMaps=F=>{const W=F["@default"],q=Object.keys(F).sort();for(const K of q){if(K==="@default")continue;const X=F[K];let tt=W[K];tt?"@graph"in tt||(tt["@graph"]=[]):W[K]=tt={"@id":K,"@graph":[]};const rt=tt["@graph"];for(const ot of Object.keys(X).sort()){const ut=X[ot];graphTypes$3.isSubjectReference(ut)||rt.push(ut)}}return W};const{isSubjectReference:_isSubjectReference$2}=graphTypes$5,{createMergedNodeMap:_createMergedNodeMap$1}=nodeMap,api$4={};var flatten=api$4;api$4.flatten=F=>{const W=_createMergedNodeMap$1(F),q=[],K=Object.keys(W).sort();for(let X=0;X{const{useRdfType:q=!1,useNativeTypes:K=!1,rdfDirection:X=null}=W,tt={},rt={"@default":tt},ot={};if(X){if(X==="compound-literal")throw new JsonLdError$4("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:X});if(X!=="i18n-datatype")throw new JsonLdError$4("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:X})}for(const uo of F){const po=uo.graph.termType==="DefaultGraph"?"@default":uo.graph.value;po in rt||(rt[po]={}),po!=="@default"&&!(po in tt)&&(tt[po]={"@id":po});const mo=rt[po],wo=uo.subject.value,lf=uo.predicate.value,yf=uo.object;wo in mo||(mo[wo]={"@id":wo});const cf=mo[wo],vf=yf.termType.endsWith("Node");if(vf&&!(yf.value in mo)&&(mo[yf.value]={"@id":yf.value}),lf===RDF_TYPE$1&&!q&&vf){_addValue$1(cf,"@type",yf.value,{propertyIsArray:!0});continue}const _f=_RDFToObject(yf,K,X,W);if(_addValue$1(cf,lf,_f,{propertyIsArray:!0}),vf)if(yf.value===RDF_NIL$1){const $f=mo[yf.value];"usages"in $f||($f.usages=[]),$f.usages.push({node:cf,property:lf,value:_f})}else yf.value in ot?ot[yf.value]=!1:ot[yf.value]={node:cf,property:lf,value:_f}}for(const uo in rt){const po=rt[uo];if(!(RDF_NIL$1 in po))continue;const mo=po[RDF_NIL$1];if(mo.usages){for(let wo of mo.usages){let lf=wo.node,yf=wo.property,cf=wo.value;const vf=[],_f=[];let $f=Object.keys(lf).length;for(;yf===RDF_REST$1&&types$2.isObject(ot[lf["@id"]])&&types$2.isArray(lf[RDF_FIRST$1])&&lf[RDF_FIRST$1].length===1&&types$2.isArray(lf[RDF_REST$1])&&lf[RDF_REST$1].length===1&&($f===3||$f===4&&types$2.isArray(lf["@type"])&&lf["@type"].length===1&&lf["@type"][0]===RDF_LIST)&&(vf.push(lf[RDF_FIRST$1][0]),_f.push(lf["@id"]),wo=ot[lf["@id"]],lf=wo.node,yf=wo.property,cf=wo.value,$f=Object.keys(lf).length,!!graphTypes$2.isBlankNode(lf)););delete cf["@id"],cf["@list"]=vf.reverse();for(const xf of _f)delete po[xf]}delete mo.usages}}const ut=[],yn=Object.keys(tt).sort();for(const uo of yn){const po=tt[uo];if(uo in rt){const mo=po["@graph"]=[],wo=rt[uo],lf=Object.keys(wo).sort();for(const yf of lf){const cf=wo[yf];graphTypes$2.isSubjectReference(cf)||mo.push(cf)}}graphTypes$2.isSubjectReference(po)||ut.push(po)}return ut};function _RDFToObject(F,W,q,K){if(F.termType.endsWith("Node"))return{"@id":F.value};const X={"@value":F.value};if(F.language)F.language.match(REGEX_BCP47)||K.eventHandler&&_handleEvent$1({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:F.language}},options:K}),X["@language"]=F.language;else{let tt=F.datatype.value;if(tt||(tt=XSD_STRING$1),tt===RDF_JSON_LITERAL$1){tt="@json";try{X["@value"]=JSON.parse(X["@value"])}catch(rt){throw new JsonLdError$4("JSON literal could not be parsed.","jsonld.InvalidJsonLiteral",{code:"invalid JSON literal",value:X["@value"],cause:rt})}}if(W){if(tt===XSD_BOOLEAN$1)X["@value"]==="true"?X["@value"]=!0:X["@value"]==="false"&&(X["@value"]=!1);else if(types$2.isNumeric(X["@value"]))if(tt===XSD_INTEGER$1){const rt=parseInt(X["@value"],10);rt.toFixed(0)===X["@value"]&&(X["@value"]=rt)}else tt===XSD_DOUBLE$1&&(X["@value"]=parseFloat(X["@value"]));[XSD_BOOLEAN$1,XSD_INTEGER$1,XSD_DOUBLE$1,XSD_STRING$1].includes(tt)||(X["@type"]=tt)}else if(q==="i18n-datatype"&&tt.startsWith("https://www.w3.org/ns/i18n#")){const[,rt,ot]=tt.split(/[#_]/);rt.length>0&&(X["@language"]=rt,rt.match(REGEX_BCP47)||K.eventHandler&&_handleEvent$1({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:rt}},options:K})),X["@direction"]=ot}else tt!==XSD_STRING$1&&(X["@type"]=tt)}return X}var canonicalize=function F(W){return W===null||typeof W!="object"||W.toJSON!=null?JSON.stringify(W):Array.isArray(W)?"["+W.reduce((q,K,X)=>{const tt=X===0?"":",",rt=K===void 0||typeof K=="symbol"?null:K;return q+tt+F(rt)},"")+"]":"{"+Object.keys(W).sort().reduce((q,K,X)=>{if(W[K]===void 0||typeof W[K]=="symbol")return q;const tt=q.length===0?"":",";return q+tt+F(K)+":"+F(W[K])},"")+"}"};const{createNodeMap}=nodeMap,{isKeyword:isKeyword$1}=context,graphTypes$1=graphTypes$5,jsonCanonicalize=canonicalize,JsonLdError$3=JsonLdError_1,types$1=types$7,util$5=util$8,{handleEvent:_handleEvent}=events,{RDF_FIRST,RDF_REST,RDF_NIL,RDF_TYPE,RDF_JSON_LITERAL,RDF_LANGSTRING,XSD_BOOLEAN,XSD_DOUBLE,XSD_INTEGER,XSD_STRING}=constants,{isAbsolute:_isAbsoluteIri}=url$1,api$2={};var toRdf=api$2;api$2.toRDF=(F,W)=>{const q=new util$5.IdentifierIssuer("_:b"),K={"@default":{}};createNodeMap(F,K,"@default",q);const X=[],tt=Object.keys(K).sort();for(const rt of tt){let ot;if(rt==="@default")ot={termType:"DefaultGraph",value:""};else if(_isAbsoluteIri(rt))rt.startsWith("_:")?ot={termType:"BlankNode"}:ot={termType:"NamedNode"},ot.value=rt;else{W.eventHandler&&_handleEvent({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:rt}},options:W});continue}_graphToRDF(X,K[rt],ot,q,W)}return X};function _graphToRDF(F,W,q,K,X){const tt=Object.keys(W).sort();for(const rt of tt){const ot=W[rt],ut=Object.keys(ot).sort();for(let yn of ut){const uo=ot[yn];if(yn==="@type")yn=RDF_TYPE;else if(isKeyword$1(yn))continue;for(const po of uo){const mo={termType:rt.startsWith("_:")?"BlankNode":"NamedNode",value:rt};if(!_isAbsoluteIri(rt)){X.eventHandler&&_handleEvent({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:rt}},options:X});continue}const wo={termType:yn.startsWith("_:")?"BlankNode":"NamedNode",value:yn};if(!_isAbsoluteIri(yn)){X.eventHandler&&_handleEvent({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:yn}},options:X});continue}if(wo.termType==="BlankNode"&&!X.produceGeneralizedRdf){X.eventHandler&&_handleEvent({event:{type:["JsonLdEvent"],code:"blank node predicate",level:"warning",message:"Dropping blank node predicate.",details:{property:K.getOldIds().find(yf=>K.getId(yf)===yn)}},options:X});continue}const lf=_objectToRDF(po,K,F,q,X.rdfDirection,X);lf&&F.push({subject:mo,predicate:wo,object:lf,graph:q})}}}}function _listToRDF(F,W,q,K,X,tt){const rt={termType:"NamedNode",value:RDF_FIRST},ot={termType:"NamedNode",value:RDF_REST},ut={termType:"NamedNode",value:RDF_NIL},yn=F.pop(),uo=yn?{termType:"BlankNode",value:W.getId()}:ut;let po=uo;for(const mo of F){const wo=_objectToRDF(mo,W,q,K,X,tt),lf={termType:"BlankNode",value:W.getId()};q.push({subject:po,predicate:rt,object:wo,graph:K}),q.push({subject:po,predicate:ot,object:lf,graph:K}),po=lf}if(yn){const mo=_objectToRDF(yn,W,q,K,X,tt);q.push({subject:po,predicate:rt,object:mo,graph:K}),q.push({subject:po,predicate:ot,object:ut,graph:K})}return uo}function _objectToRDF(F,W,q,K,X,tt){const rt={};if(graphTypes$1.isValue(F)){rt.termType="Literal",rt.value=void 0,rt.datatype={termType:"NamedNode"};let ot=F["@value"];const ut=F["@type"]||null;if(ut==="@json")rt.value=jsonCanonicalize(ot),rt.datatype.value=RDF_JSON_LITERAL;else if(types$1.isBoolean(ot))rt.value=ot.toString(),rt.datatype.value=ut||XSD_BOOLEAN;else if(types$1.isDouble(ot)||ut===XSD_DOUBLE)types$1.isDouble(ot)||(ot=parseFloat(ot)),rt.value=ot.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),rt.datatype.value=ut||XSD_DOUBLE;else if(types$1.isNumber(ot))rt.value=ot.toFixed(0),rt.datatype.value=ut||XSD_INTEGER;else if("@direction"in F&&X==="i18n-datatype"){const yn=(F["@language"]||"").toLowerCase(),uo=F["@direction"],po=`https://www.w3.org/ns/i18n#${yn}_${uo}`;rt.datatype.value=po,rt.value=ot}else{if("@direction"in F&&X==="compound-literal")throw new JsonLdError$3("Unsupported rdfDirection value.","jsonld.InvalidRdfDirection",{value:X});if("@direction"in F&&X)throw new JsonLdError$3("Unknown rdfDirection value.","jsonld.InvalidRdfDirection",{value:X});"@language"in F?("@direction"in F&&!X&&tt.eventHandler&&_handleEvent({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:rt.value}},options:tt}),rt.value=ot,rt.datatype.value=ut||RDF_LANGSTRING,rt.language=F["@language"]):("@direction"in F&&!X&&tt.eventHandler&&_handleEvent({event:{type:["JsonLdEvent"],code:"rdfDirection not set",level:"warning",message:"rdfDirection not set for @direction.",details:{object:rt.value}},options:tt}),rt.value=ot,rt.datatype.value=ut||XSD_STRING)}}else if(graphTypes$1.isList(F)){const ot=_listToRDF(F["@list"],W,q,K,X,tt);rt.termType=ot.termType,rt.value=ot.value}else{const ot=types$1.isObject(F)?F["@id"]:F;rt.termType=ot.startsWith("_:")?"BlankNode":"NamedNode",rt.value=ot}return rt.termType==="NamedNode"&&!_isAbsoluteIri(rt.value)?(tt.eventHandler&&_handleEvent({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:rt.value}},options:tt}),null):rt}const{isKeyword}=context,graphTypes=graphTypes$5,types=types$7,util$4=util$8,url=url$1,JsonLdError$2=JsonLdError_1,{createNodeMap:_createNodeMap$1,mergeNodeMapGraphs:_mergeNodeMapGraphs}=nodeMap,api$1={};var frame=api$1;api$1.frameMergedOrDefault=(F,W,q)=>{const K={options:q,embedded:!1,graph:"@default",graphMap:{"@default":{}},subjectStack:[],link:{},bnodeMap:{}},X=new util$4.IdentifierIssuer("_:b");_createNodeMap$1(F,K.graphMap,"@default",X),q.merged&&(K.graphMap["@merged"]=_mergeNodeMapGraphs(K.graphMap),K.graph="@merged"),K.subjects=K.graphMap[K.graph];const tt=[];api$1.frame(K,Object.keys(K.subjects).sort(),W,tt),q.pruneBlankNodeIdentifiers&&(q.bnodesToClear=Object.keys(K.bnodeMap).filter(rt=>K.bnodeMap[rt].length===1));// remove @preserve from results return q.link={},_cleanupPreserve(tt,q)};api$1.frame=(F,W,q,K,X=null)=>{_validateFrame(q),q=q[0];const tt=F.options,rt={embed:_getFrameFlag(q,tt,"embed"),explicit:_getFrameFlag(q,tt,"explicit"),requireAll:_getFrameFlag(q,tt,"requireAll")};F.link.hasOwnProperty(F.graph)||(F.link[F.graph]={});const ot=F.link[F.graph],ut=_filterSubjects(F,W,q,rt),yn=Object.keys(ut).sort();for(const uo of yn){const po=ut[uo];if(X===null?F.uniqueEmbeds={[F.graph]:{}}:F.uniqueEmbeds[F.graph]=F.uniqueEmbeds[F.graph]||{},rt.embed==="@link"&&uo in ot){_addFrameOutput(K,X,ot[uo]);continue}const mo={"@id":uo};if(uo.indexOf("_:")===0&&util$4.addValue(F.bnodeMap,uo,mo,{propertyIsArray:!0}),ot[uo]=mo,(rt.embed==="@first"||rt.embed==="@last")&&F.is11)throw new JsonLdError$2("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:q});if(!(!F.embedded&&F.uniqueEmbeds[F.graph].hasOwnProperty(uo))){if(F.embedded&&(rt.embed==="@never"||_createsCircularReference(po,F.graph,F.subjectStack))){_addFrameOutput(K,X,mo);continue}if(F.embedded&&(rt.embed=="@first"||rt.embed=="@once")&&F.uniqueEmbeds[F.graph].hasOwnProperty(uo)){_addFrameOutput(K,X,mo);continue}if(rt.embed==="@last"&&uo in F.uniqueEmbeds[F.graph]&&_removeEmbed(F,uo),F.uniqueEmbeds[F.graph][uo]={parent:K,property:X},F.subjectStack.push({subject:po,graph:F.graph}),uo in F.graphMap){let wo=!1,lf=null;"@graph"in q?(lf=q["@graph"][0],wo=!(uo==="@merged"||uo==="@default"),types.isObject(lf)||(lf={})):(wo=F.graph!=="@merged",lf={}),wo&&api$1.frame({...F,graph:uo,embedded:!1},Object.keys(F.graphMap[uo]).sort(),[lf],mo,"@graph")}"@included"in q&&api$1.frame({...F,embedded:!1},W,q["@included"],mo,"@included");for(const wo of Object.keys(po).sort()){if(isKeyword(wo)){if(mo[wo]=util$4.clone(po[wo]),wo==="@type")for(const lf of po["@type"])lf.indexOf("_:")===0&&util$4.addValue(F.bnodeMap,lf,mo,{propertyIsArray:!0});continue}if(!(rt.explicit&&!(wo in q)))for(const lf of po[wo]){const yf=wo in q?q[wo]:_createImplicitFrame(rt);if(graphTypes.isList(lf)){const cf=q[wo]&&q[wo][0]&&q[wo][0]["@list"]?q[wo][0]["@list"]:_createImplicitFrame(rt),vf={"@list":[]};_addFrameOutput(mo,wo,vf);const _f=lf["@list"];for(const $f of _f)graphTypes.isSubjectReference($f)?api$1.frame({...F,embedded:!0},[$f["@id"]],cf,vf,"@list"):_addFrameOutput(vf,"@list",util$4.clone($f))}else graphTypes.isSubjectReference(lf)?api$1.frame({...F,embedded:!0},[lf["@id"]],yf,mo,wo):_valueMatch(yf[0],lf)&&_addFrameOutput(mo,wo,util$4.clone(lf))}}for(const wo of Object.keys(q).sort()){if(wo==="@type"){if(!types.isObject(q[wo][0])||!("@default"in q[wo][0]))continue}else if(isKeyword(wo))continue;const lf=q[wo][0]||{};if(!_getFrameFlag(lf,tt,"omitDefault")&&!(wo in mo)){let cf="@null";"@default"in lf&&(cf=util$4.clone(lf["@default"])),types.isArray(cf)||(cf=[cf]),mo[wo]=[{"@preserve":cf}]}}for(const wo of Object.keys(q["@reverse"]||{}).sort()){const lf=q["@reverse"][wo];for(const yf of Object.keys(F.subjects))util$4.getValues(F.subjects[yf],wo).some(vf=>vf["@id"]===uo)&&(mo["@reverse"]=mo["@reverse"]||{},util$4.addValue(mo["@reverse"],wo,[],{propertyIsArray:!0}),api$1.frame({...F,embedded:!0},[yf],lf,mo["@reverse"][wo],X))}_addFrameOutput(K,X,mo),F.subjectStack.pop()}}};api$1.cleanupNull=(F,W)=>{if(types.isArray(F))return F.map(K=>api$1.cleanupNull(K,W)).filter(K=>K);if(F==="@null")return null;if(types.isObject(F)){if("@id"in F){const q=F["@id"];if(W.link.hasOwnProperty(q)){const K=W.link[q].indexOf(F);if(K!==-1)return W.link[q][K];W.link[q].push(F)}else W.link[q]=[F]}for(const q in F)F[q]=api$1.cleanupNull(F[q],W)}return F};function _createImplicitFrame(F){const W={};for(const q in F)F[q]!==void 0&&(W["@"+q]=[F[q]]);return[W]}function _createsCircularReference(F,W,q){for(let K=q.length-1;K>=0;--K){const X=q[K];if(X.graph===W&&X.subject["@id"]===F["@id"])return!0}return!1}function _getFrameFlag(F,W,q){const K="@"+q;let X=K in F?F[K][0]:W[q];if(q==="embed"){if(X===!0)X="@once";else if(X===!1)X="@never";else if(X!=="@always"&&X!=="@never"&&X!=="@link"&&X!=="@first"&&X!=="@last"&&X!=="@once")throw new JsonLdError$2("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:F})}return X}function _validateFrame(F){if(!types.isArray(F)||F.length!==1||!types.isObject(F[0]))throw new JsonLdError$2("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:F});if("@id"in F[0]){for(const W of util$4.asArray(F[0]["@id"]))if(!(types.isObject(W)||url.isAbsolute(W))||types.isString(W)&&W.indexOf("_:")===0)throw new JsonLdError$2("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:F})}if("@type"in F[0]){for(const W of util$4.asArray(F[0]["@type"]))if(!(types.isObject(W)||url.isAbsolute(W)||W==="@json")||types.isString(W)&&W.indexOf("_:")===0)throw new JsonLdError$2("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:F})}}function _filterSubjects(F,W,q,K){const X={};for(const tt of W){const rt=F.graphMap[F.graph][tt];_filterSubject(F,rt,q,K)&&(X[tt]=rt)}return X}function _filterSubject(F,W,q,K){let X=!0,tt=!1;for(const rt in q){let ot=!1;const ut=util$4.getValues(W,rt),yn=util$4.getValues(q,rt).length===0;if(rt==="@id"){if(types.isEmptyObject(q["@id"][0]||{})?ot=!0:q["@id"].length>=0&&(ot=q["@id"].includes(ut[0])),!K.requireAll)return ot}else if(rt==="@type"){if(X=!1,yn){if(ut.length>0)return!1;ot=!0}else if(q["@type"].length===1&&types.isEmptyObject(q["@type"][0]))ot=ut.length>0;else for(const uo of q["@type"])types.isObject(uo)&&"@default"in uo?ot=!0:ot=ot||ut.some(po=>po===uo);if(!K.requireAll)return ot}else{if(isKeyword(rt))continue;{const uo=util$4.getValues(q,rt)[0];let po=!1;if(uo&&(_validateFrame([uo]),po="@default"in uo),X=!1,ut.length===0&&po)continue;if(ut.length>0&&yn)return!1;if(uo===void 0){if(ut.length>0)return!1;ot=!0}else if(graphTypes.isList(uo)){const mo=uo["@list"][0];if(graphTypes.isList(ut[0])){const wo=ut[0]["@list"];graphTypes.isValue(mo)?ot=wo.some(lf=>_valueMatch(mo,lf)):(graphTypes.isSubject(mo)||graphTypes.isSubjectReference(mo))&&(ot=wo.some(lf=>_nodeMatch(F,mo,lf,K)))}}else graphTypes.isValue(uo)?ot=ut.some(mo=>_valueMatch(uo,mo)):graphTypes.isSubjectReference(uo)?ot=ut.some(mo=>_nodeMatch(F,uo,mo,K)):types.isObject(uo)?ot=ut.length>0:ot=!1}}if(!ot&&K.requireAll)return!1;tt=tt||ot}return X||tt}function _removeEmbed(F,W){const q=F.uniqueEmbeds[F.graph],K=q[W],X=K.parent,tt=K.property,rt={"@id":W};if(types.isArray(X)){for(let ut=0;ut{const yn=Object.keys(q);for(const uo of yn)uo in q&&types.isObject(q[uo].parent)&&q[uo].parent["@id"]===ut&&(delete q[uo],ot(uo))};ot(W)}/** * Removes the @preserve keywords from expanded result of framing. * @@ -3823,7 +3823,7 @@ return q.link={},_cleanupPreserve(tt,q)};api$1.frame=(F,W,q,K,X=null)=>{_validat * * @return the resulting output. */function _cleanupPreserve(F,W){if(types.isArray(F))return F.map(q=>_cleanupPreserve(q,W));if(types.isObject(F)){// remove @preserve -if("@preserve"in F)return F["@preserve"][0];if(graphTypes.isValue(F))return F;if(graphTypes.isList(F))return F["@list"]=_cleanupPreserve(F["@list"],W),F;if("@id"in F){const q=F["@id"];if(W.link.hasOwnProperty(q)){const K=W.link[q].indexOf(F);if(K!==-1)return W.link[q][K];W.link[q].push(F)}else W.link[q]=[F]}for(const q in F){if(q==="@id"&&W.bnodesToClear.includes(F[q])){delete F["@id"];continue}F[q]=_cleanupPreserve(F[q],W)}}return F}function _addFrameOutput(F,W,q){types.isObject(F)?util$4.addValue(F,W,q,{propertyIsArray:!0}):F.push(q)}function _nodeMatch(F,W,q,K){if(!("@id"in q))return!1;const X=F.subjects[q["@id"]];return X&&_filterSubject(F,X,W,K)}function _valueMatch(F,W){const q=W["@value"],K=W["@type"],X=W["@language"],tt=F["@value"]?types.isArray(F["@value"])?F["@value"]:[F["@value"]]:[],rt=F["@type"]?types.isArray(F["@type"])?F["@type"]:[F["@type"]]:[],ot=F["@language"]?types.isArray(F["@language"])?F["@language"]:[F["@language"]]:[];return tt.length===0&&rt.length===0&&ot.length===0?!0:!(!(tt.includes(q)||types.isEmptyObject(tt[0]))||!(!K&&rt.length===0||rt.includes(K)||K&&types.isEmptyObject(rt[0]))||!(!X&&ot.length===0||ot.includes(X)||X&&types.isEmptyObject(ot[0])))}const JsonLdError$1=JsonLdError_1,{isArray:_isArray$1,isObject:_isObject$1,isString:_isString$1,isUndefined:_isUndefined}=types$7,{isList:_isList,isValue:_isValue,isGraph:_isGraph,isSimpleGraph:_isSimpleGraph,isSubjectReference:_isSubjectReference$1}=graphTypes$5,{expandIri:_expandIri$1,getContextValue:_getContextValue,isKeyword:_isKeyword,process:_processContext$1,processingMode:_processingMode$1}=context,{removeBase:_removeBase,prependBase:_prependBase}=url$1,{REGEX_KEYWORD,addValue:_addValue,asArray:_asArray,compareShortestLeast:_compareShortestLeast}=util$8,api={};var compact=api;api.compact=async({activeCtx:F,activeProperty:W=null,element:q,options:K={}})=>{if(_isArray$1(q)){let tt=[];for(let rt=0;rt1&&(yn=Array.from(yn).sort());const uo=F;for(const mo of yn){const wo=api.compactIri({activeCtx:uo,iri:mo,relativeTo:{vocab:!0}}),lf=_getContextValue(ot,wo,"@context");_isUndefined(lf)||(F=await _processContext$1({activeCtx:F,localCtx:lf,options:K,propagate:!1}))}const po=Object.keys(q).sort();for(const mo of po){const wo=q[mo];if(mo==="@id"){let lf=_asArray(wo).map(cf=>api.compactIri({activeCtx:F,iri:cf,relativeTo:{vocab:!1},base:K.base}));lf.length===1&&(lf=lf[0]);const yf=api.compactIri({activeCtx:F,iri:"@id",relativeTo:{vocab:!0}});rt[yf]=lf;continue}if(mo==="@type"){let lf=_asArray(wo).map($f=>api.compactIri({activeCtx:ot,iri:$f,relativeTo:{vocab:!0}}));lf.length===1&&(lf=lf[0]);const yf=api.compactIri({activeCtx:F,iri:"@type",relativeTo:{vocab:!0}}),_f=(_getContextValue(F,yf,"@container")||[]).includes("@set")&&_processingMode$1(F,1.1)||_isArray$1(lf)&&wo.length===0;_addValue(rt,yf,lf,{propertyIsArray:_f});continue}if(mo==="@reverse"){const lf=await api.compact({activeCtx:F,activeProperty:"@reverse",element:wo,options:K});for(const yf in lf)if(F.mappings.has(yf)&&F.mappings.get(yf).reverse){const cf=lf[yf],_f=(_getContextValue(F,yf,"@container")||[]).includes("@set")||!K.compactArrays;_addValue(rt,yf,cf,{propertyIsArray:_f}),delete lf[yf]}if(Object.keys(lf).length>0){const yf=api.compactIri({activeCtx:F,iri:mo,relativeTo:{vocab:!0}});_addValue(rt,yf,lf)}continue}if(mo==="@preserve"){const lf=await api.compact({activeCtx:F,activeProperty:W,element:wo,options:K});_isArray$1(lf)&&lf.length===0||_addValue(rt,mo,lf);continue}if(mo==="@index"){if((_getContextValue(F,W,"@container")||[]).includes("@index"))continue;const yf=api.compactIri({activeCtx:F,iri:mo,relativeTo:{vocab:!0}});_addValue(rt,yf,wo);continue}if(mo!=="@graph"&&mo!=="@list"&&mo!=="@included"&&_isKeyword(mo)){const lf=api.compactIri({activeCtx:F,iri:mo,relativeTo:{vocab:!0}});_addValue(rt,lf,wo);continue}if(!_isArray$1(wo))throw new JsonLdError$1("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError");if(wo.length===0){const lf=api.compactIri({activeCtx:F,iri:mo,value:wo,relativeTo:{vocab:!0},reverse:tt}),yf=F.mappings.has(lf)?F.mappings.get(lf)["@nest"]:null;let cf=rt;yf&&(_checkNestProperty(F,yf,K),_isObject$1(rt[yf])||(rt[yf]={}),cf=rt[yf]),_addValue(cf,lf,wo,{propertyIsArray:!0})}for(const lf of wo){const yf=api.compactIri({activeCtx:F,iri:mo,value:lf,relativeTo:{vocab:!0},reverse:tt}),cf=F.mappings.has(yf)?F.mappings.get(yf)["@nest"]:null;let vf=rt;cf&&(_checkNestProperty(F,cf,K),_isObject$1(rt[cf])||(rt[cf]={}),vf=rt[cf]);const _f=_getContextValue(F,yf,"@container")||[],$f=_isGraph(lf),wf=_isList(lf);let Pf;wf?Pf=lf["@list"]:$f&&(Pf=lf["@graph"]);let Cf=await api.compact({activeCtx:F,activeProperty:yf,element:wf||$f?Pf:lf,options:K});if(wf)if(_isArray$1(Cf)||(Cf=[Cf]),!_f.includes("@list"))Cf={[api.compactIri({activeCtx:F,iri:"@list",relativeTo:{vocab:!0}})]:Cf},"@index"in lf&&(Cf[api.compactIri({activeCtx:F,iri:"@index",relativeTo:{vocab:!0}})]=lf["@index"]);else{_addValue(vf,yf,Cf,{valueIsArray:!0,allowDuplicate:!0});continue}if($f)if(_f.includes("@graph")&&(_f.includes("@id")||_f.includes("@index")&&_isSimpleGraph(lf))){let Af;vf.hasOwnProperty(yf)?Af=vf[yf]:vf[yf]=Af={};const Bf=(_f.includes("@id")?lf["@id"]:lf["@index"])||api.compactIri({activeCtx:F,iri:"@none",relativeTo:{vocab:!0}});_addValue(Af,Bf,Cf,{propertyIsArray:!K.compactArrays||_f.includes("@set")})}else _f.includes("@graph")&&_isSimpleGraph(lf)?(_isArray$1(Cf)&&Cf.length>1&&(Cf={"@included":Cf}),_addValue(vf,yf,Cf,{propertyIsArray:!K.compactArrays||_f.includes("@set")})):(_isArray$1(Cf)&&Cf.length===1&&K.compactArrays&&(Cf=Cf[0]),Cf={[api.compactIri({activeCtx:F,iri:"@graph",relativeTo:{vocab:!0}})]:Cf},"@id"in lf&&(Cf[api.compactIri({activeCtx:F,iri:"@id",relativeTo:{vocab:!0}})]=lf["@id"]),"@index"in lf&&(Cf[api.compactIri({activeCtx:F,iri:"@index",relativeTo:{vocab:!0}})]=lf["@index"]),_addValue(vf,yf,Cf,{propertyIsArray:!K.compactArrays||_f.includes("@set")}));else if(_f.includes("@language")||_f.includes("@index")||_f.includes("@id")||_f.includes("@type")){let Af;vf.hasOwnProperty(yf)?Af=vf[yf]:vf[yf]=Af={};let Bf;if(_f.includes("@language"))_isValue(Cf)&&(Cf=Cf["@value"]),Bf=lf["@language"];else if(_f.includes("@index")){const Hf=_getContextValue(F,yf,"@index")||"@index",Df=api.compactIri({activeCtx:F,iri:Hf,relativeTo:{vocab:!0}});if(Hf==="@index")Bf=lf["@index"],delete Cf[Df];else{let Lf;if([Bf,...Lf]=_asArray(Cf[Hf]||[]),!_isString$1(Bf))Bf=null;else switch(Lf.length){case 0:delete Cf[Hf];break;case 1:Cf[Hf]=Lf[0];break;default:Cf[Hf]=Lf;break}}}else if(_f.includes("@id")){const Hf=api.compactIri({activeCtx:F,iri:"@id",relativeTo:{vocab:!0}});Bf=Cf[Hf],delete Cf[Hf]}else if(_f.includes("@type")){const Hf=api.compactIri({activeCtx:F,iri:"@type",relativeTo:{vocab:!0}});let Df;switch([Bf,...Df]=_asArray(Cf[Hf]||[]),Df.length){case 0:delete Cf[Hf];break;case 1:Cf[Hf]=Df[0];break;default:Cf[Hf]=Df;break}Object.keys(Cf).length===1&&"@id"in lf&&(Cf=await api.compact({activeCtx:F,activeProperty:yf,element:{"@id":lf["@id"]},options:K}))}Bf||(Bf=api.compactIri({activeCtx:F,iri:"@none",relativeTo:{vocab:!0}})),_addValue(Af,Bf,Cf,{propertyIsArray:_f.includes("@set")})}else{const Af=!K.compactArrays||_f.includes("@set")||_f.includes("@list")||_isArray$1(Cf)&&Cf.length===0||mo==="@list"||mo==="@graph";_addValue(vf,yf,Cf,{propertyIsArray:Af})}}}return rt}return q};api.compactIri=({activeCtx:F,iri:W,value:q=null,relativeTo:K={vocab:!1},reverse:X=!1,base:tt=null})=>{if(W===null)return W;F.isPropertyTermScoped&&F.previousContext&&(F=F.previousContext);const rt=F.getInverse();if(_isKeyword(W)&&W in rt&&"@none"in rt[W]&&"@type"in rt[W]["@none"]&&"@none"in rt[W]["@none"]["@type"])return rt[W]["@none"]["@type"]["@none"];if(K.vocab&&W in rt){const po=F["@language"]||"@none",mo=[];_isObject$1(q)&&"@index"in q&&!("@graph"in q)&&mo.push("@index","@index@set"),_isObject$1(q)&&"@preserve"in q&&(q=q["@preserve"][0]),_isGraph(q)?("@index"in q&&mo.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in q&&mo.push("@graph@id","@graph@id@set"),mo.push("@graph","@graph@set","@set"),"@index"in q||mo.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in q||mo.push("@graph@id","@graph@id@set")):_isObject$1(q)&&!_isValue(q)&&mo.push("@id","@id@set","@type","@set@type");let wo="@language",lf="@null";if(X)wo="@type",lf="@reverse",mo.push("@set");else if(_isList(q)){"@index"in q||mo.push("@list");const cf=q["@list"];if(cf.length===0)wo="@any",lf="@none";else{let vf=cf.length===0?po:null,_f=null;for(let $f=0;$f=0;--po){const mo=ut[po],wo=mo.terms;for(const lf of wo){const yf=lf+":"+W.substr(mo.iri.length);F.mappings.get(lf)._prefix&&(!F.mappings.has(yf)||q===null&&F.mappings.get(yf)["@id"]===W)&&(ot===null||_compareShortestLeast(yf,ot)<0)&&(ot=yf)}}if(ot!==null)return ot;for(const[po,mo]of F.mappings)if(mo&&mo._prefix&&W.startsWith(po+":"))throw new JsonLdError$1(`Absolute IRI "${W}" confused with prefix "${po}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:F});if(!K.vocab)if("@base"in F)if(F["@base"]){const po=_removeBase(_prependBase(tt,F["@base"]),W);return REGEX_KEYWORD.test(po)?`./${po}`:po}else return W;else return _removeBase(tt,W);return W};api.compactValue=({activeCtx:F,activeProperty:W,value:q,options:K})=>{if(_isValue(q)){const ot=_getContextValue(F,W,"@type"),ut=_getContextValue(F,W,"@language"),yn=_getContextValue(F,W,"@direction"),uo=_getContextValue(F,W,"@container")||[],po="@index"in q&&!uo.includes("@index");if(!po&&ot!=="@none"&&(q["@type"]===ot||"@language"in q&&q["@language"]===ut&&"@direction"in q&&q["@direction"]===yn||"@language"in q&&q["@language"]===ut||"@direction"in q&&q["@direction"]===yn))return q["@value"];const mo=Object.keys(q).length,wo=mo===1||mo===2&&"@index"in q&&!po,lf="@language"in F,yf=_isString$1(q["@value"]),cf=F.mappings.has(W)&&F.mappings.get(W)["@language"]===null;if(wo&&ot!=="@none"&&(!lf||!yf||cf))return q["@value"];const vf={};return po&&(vf[api.compactIri({activeCtx:F,iri:"@index",relativeTo:{vocab:!0}})]=q["@index"]),"@type"in q?vf[api.compactIri({activeCtx:F,iri:"@type",relativeTo:{vocab:!0}})]=api.compactIri({activeCtx:F,iri:q["@type"],relativeTo:{vocab:!0}}):"@language"in q&&(vf[api.compactIri({activeCtx:F,iri:"@language",relativeTo:{vocab:!0}})]=q["@language"]),"@direction"in q&&(vf[api.compactIri({activeCtx:F,iri:"@direction",relativeTo:{vocab:!0}})]=q["@direction"]),vf[api.compactIri({activeCtx:F,iri:"@value",relativeTo:{vocab:!0}})]=q["@value"],vf}const X=_expandIri$1(F,W,{vocab:!0},K),tt=_getContextValue(F,W,"@type"),rt=api.compactIri({activeCtx:F,iri:q["@id"],relativeTo:{vocab:tt==="@vocab"},base:K.base});return tt==="@id"||tt==="@vocab"||X==="@graph"?rt:{[api.compactIri({activeCtx:F,iri:"@id",relativeTo:{vocab:!0}})]:rt}};function _selectTerm(F,W,q,K,X,tt){tt===null&&(tt="@null");const rt=[];if((tt==="@id"||tt==="@reverse")&&_isObject$1(q)&&"@id"in q){tt==="@reverse"&&rt.push("@reverse");const ut=api.compactIri({activeCtx:F,iri:q["@id"],relativeTo:{vocab:!0}});F.mappings.has(ut)&&F.mappings.get(ut)&&F.mappings.get(ut)["@id"]===q["@id"]?rt.push.apply(rt,["@vocab","@id"]):rt.push.apply(rt,["@id","@vocab"])}else{rt.push(tt);const ut=rt.find(yn=>yn.includes("_"));ut&&rt.push(ut.replace(/^[^_]+_/,"_"))}rt.push("@none");const ot=F.inverse[W];for(const ut of K){if(!(ut in ot))continue;const yn=ot[ut][X];for(const uo of rt)if(uo in yn)return yn[uo]}return null}function _checkNestProperty(F,W,q){if(_expandIri$1(F,W,{vocab:!0},q)!=="@nest")throw new JsonLdError$1("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}var JsonLdProcessor,hasRequiredJsonLdProcessor;function requireJsonLdProcessor(){return hasRequiredJsonLdProcessor||(hasRequiredJsonLdProcessor=1,JsonLdProcessor=F=>{class W{toString(){return"[object JsonLdProcessor]"}}return Object.defineProperty(W,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(W.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:W}),W.compact=function(q,K){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):F.compact(q,K)},W.expand=function(q){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):F.expand(q)},W.flatten=function(q){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):F.flatten(q)},W}),JsonLdProcessor}/** +if("@preserve"in F)return F["@preserve"][0];if(graphTypes.isValue(F))return F;if(graphTypes.isList(F))return F["@list"]=_cleanupPreserve(F["@list"],W),F;if("@id"in F){const q=F["@id"];if(W.link.hasOwnProperty(q)){const K=W.link[q].indexOf(F);if(K!==-1)return W.link[q][K];W.link[q].push(F)}else W.link[q]=[F]}for(const q in F){if(q==="@id"&&W.bnodesToClear.includes(F[q])){delete F["@id"];continue}F[q]=_cleanupPreserve(F[q],W)}}return F}function _addFrameOutput(F,W,q){types.isObject(F)?util$4.addValue(F,W,q,{propertyIsArray:!0}):F.push(q)}function _nodeMatch(F,W,q,K){if(!("@id"in q))return!1;const X=F.subjects[q["@id"]];return X&&_filterSubject(F,X,W,K)}function _valueMatch(F,W){const q=W["@value"],K=W["@type"],X=W["@language"],tt=F["@value"]?types.isArray(F["@value"])?F["@value"]:[F["@value"]]:[],rt=F["@type"]?types.isArray(F["@type"])?F["@type"]:[F["@type"]]:[],ot=F["@language"]?types.isArray(F["@language"])?F["@language"]:[F["@language"]]:[];return tt.length===0&&rt.length===0&&ot.length===0?!0:!(!(tt.includes(q)||types.isEmptyObject(tt[0]))||!(!K&&rt.length===0||rt.includes(K)||K&&types.isEmptyObject(rt[0]))||!(!X&&ot.length===0||ot.includes(X)||X&&types.isEmptyObject(ot[0])))}const JsonLdError$1=JsonLdError_1,{isArray:_isArray$1,isObject:_isObject$1,isString:_isString$1,isUndefined:_isUndefined}=types$7,{isList:_isList,isValue:_isValue,isGraph:_isGraph,isSimpleGraph:_isSimpleGraph,isSubjectReference:_isSubjectReference$1}=graphTypes$5,{expandIri:_expandIri$1,getContextValue:_getContextValue,isKeyword:_isKeyword,process:_processContext$1,processingMode:_processingMode$1}=context,{removeBase:_removeBase,prependBase:_prependBase}=url$1,{REGEX_KEYWORD,addValue:_addValue,asArray:_asArray,compareShortestLeast:_compareShortestLeast}=util$8,api={};var compact=api;api.compact=async({activeCtx:F,activeProperty:W=null,element:q,options:K={}})=>{if(_isArray$1(q)){let tt=[];for(let rt=0;rt1&&(yn=Array.from(yn).sort());const uo=F;for(const mo of yn){const wo=api.compactIri({activeCtx:uo,iri:mo,relativeTo:{vocab:!0}}),lf=_getContextValue(ot,wo,"@context");_isUndefined(lf)||(F=await _processContext$1({activeCtx:F,localCtx:lf,options:K,propagate:!1}))}const po=Object.keys(q).sort();for(const mo of po){const wo=q[mo];if(mo==="@id"){let lf=_asArray(wo).map(cf=>api.compactIri({activeCtx:F,iri:cf,relativeTo:{vocab:!1},base:K.base}));lf.length===1&&(lf=lf[0]);const yf=api.compactIri({activeCtx:F,iri:"@id",relativeTo:{vocab:!0}});rt[yf]=lf;continue}if(mo==="@type"){let lf=_asArray(wo).map($f=>api.compactIri({activeCtx:ot,iri:$f,relativeTo:{vocab:!0}}));lf.length===1&&(lf=lf[0]);const yf=api.compactIri({activeCtx:F,iri:"@type",relativeTo:{vocab:!0}}),_f=(_getContextValue(F,yf,"@container")||[]).includes("@set")&&_processingMode$1(F,1.1)||_isArray$1(lf)&&wo.length===0;_addValue(rt,yf,lf,{propertyIsArray:_f});continue}if(mo==="@reverse"){const lf=await api.compact({activeCtx:F,activeProperty:"@reverse",element:wo,options:K});for(const yf in lf)if(F.mappings.has(yf)&&F.mappings.get(yf).reverse){const cf=lf[yf],_f=(_getContextValue(F,yf,"@container")||[]).includes("@set")||!K.compactArrays;_addValue(rt,yf,cf,{propertyIsArray:_f}),delete lf[yf]}if(Object.keys(lf).length>0){const yf=api.compactIri({activeCtx:F,iri:mo,relativeTo:{vocab:!0}});_addValue(rt,yf,lf)}continue}if(mo==="@preserve"){const lf=await api.compact({activeCtx:F,activeProperty:W,element:wo,options:K});_isArray$1(lf)&&lf.length===0||_addValue(rt,mo,lf);continue}if(mo==="@index"){if((_getContextValue(F,W,"@container")||[]).includes("@index"))continue;const yf=api.compactIri({activeCtx:F,iri:mo,relativeTo:{vocab:!0}});_addValue(rt,yf,wo);continue}if(mo!=="@graph"&&mo!=="@list"&&mo!=="@included"&&_isKeyword(mo)){const lf=api.compactIri({activeCtx:F,iri:mo,relativeTo:{vocab:!0}});_addValue(rt,lf,wo);continue}if(!_isArray$1(wo))throw new JsonLdError$1("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError");if(wo.length===0){const lf=api.compactIri({activeCtx:F,iri:mo,value:wo,relativeTo:{vocab:!0},reverse:tt}),yf=F.mappings.has(lf)?F.mappings.get(lf)["@nest"]:null;let cf=rt;yf&&(_checkNestProperty(F,yf,K),_isObject$1(rt[yf])||(rt[yf]={}),cf=rt[yf]),_addValue(cf,lf,wo,{propertyIsArray:!0})}for(const lf of wo){const yf=api.compactIri({activeCtx:F,iri:mo,value:lf,relativeTo:{vocab:!0},reverse:tt}),cf=F.mappings.has(yf)?F.mappings.get(yf)["@nest"]:null;let vf=rt;cf&&(_checkNestProperty(F,cf,K),_isObject$1(rt[cf])||(rt[cf]={}),vf=rt[cf]);const _f=_getContextValue(F,yf,"@container")||[],$f=_isGraph(lf),xf=_isList(lf);let Af;xf?Af=lf["@list"]:$f&&(Af=lf["@graph"]);let Cf=await api.compact({activeCtx:F,activeProperty:yf,element:xf||$f?Af:lf,options:K});if(xf)if(_isArray$1(Cf)||(Cf=[Cf]),!_f.includes("@list"))Cf={[api.compactIri({activeCtx:F,iri:"@list",relativeTo:{vocab:!0}})]:Cf},"@index"in lf&&(Cf[api.compactIri({activeCtx:F,iri:"@index",relativeTo:{vocab:!0}})]=lf["@index"]);else{_addValue(vf,yf,Cf,{valueIsArray:!0,allowDuplicate:!0});continue}if($f)if(_f.includes("@graph")&&(_f.includes("@id")||_f.includes("@index")&&_isSimpleGraph(lf))){let Pf;vf.hasOwnProperty(yf)?Pf=vf[yf]:vf[yf]=Pf={};const Bf=(_f.includes("@id")?lf["@id"]:lf["@index"])||api.compactIri({activeCtx:F,iri:"@none",relativeTo:{vocab:!0}});_addValue(Pf,Bf,Cf,{propertyIsArray:!K.compactArrays||_f.includes("@set")})}else _f.includes("@graph")&&_isSimpleGraph(lf)?(_isArray$1(Cf)&&Cf.length>1&&(Cf={"@included":Cf}),_addValue(vf,yf,Cf,{propertyIsArray:!K.compactArrays||_f.includes("@set")})):(_isArray$1(Cf)&&Cf.length===1&&K.compactArrays&&(Cf=Cf[0]),Cf={[api.compactIri({activeCtx:F,iri:"@graph",relativeTo:{vocab:!0}})]:Cf},"@id"in lf&&(Cf[api.compactIri({activeCtx:F,iri:"@id",relativeTo:{vocab:!0}})]=lf["@id"]),"@index"in lf&&(Cf[api.compactIri({activeCtx:F,iri:"@index",relativeTo:{vocab:!0}})]=lf["@index"]),_addValue(vf,yf,Cf,{propertyIsArray:!K.compactArrays||_f.includes("@set")}));else if(_f.includes("@language")||_f.includes("@index")||_f.includes("@id")||_f.includes("@type")){let Pf;vf.hasOwnProperty(yf)?Pf=vf[yf]:vf[yf]=Pf={};let Bf;if(_f.includes("@language"))_isValue(Cf)&&(Cf=Cf["@value"]),Bf=lf["@language"];else if(_f.includes("@index")){const Hf=_getContextValue(F,yf,"@index")||"@index",Df=api.compactIri({activeCtx:F,iri:Hf,relativeTo:{vocab:!0}});if(Hf==="@index")Bf=lf["@index"],delete Cf[Df];else{let Lf;if([Bf,...Lf]=_asArray(Cf[Hf]||[]),!_isString$1(Bf))Bf=null;else switch(Lf.length){case 0:delete Cf[Hf];break;case 1:Cf[Hf]=Lf[0];break;default:Cf[Hf]=Lf;break}}}else if(_f.includes("@id")){const Hf=api.compactIri({activeCtx:F,iri:"@id",relativeTo:{vocab:!0}});Bf=Cf[Hf],delete Cf[Hf]}else if(_f.includes("@type")){const Hf=api.compactIri({activeCtx:F,iri:"@type",relativeTo:{vocab:!0}});let Df;switch([Bf,...Df]=_asArray(Cf[Hf]||[]),Df.length){case 0:delete Cf[Hf];break;case 1:Cf[Hf]=Df[0];break;default:Cf[Hf]=Df;break}Object.keys(Cf).length===1&&"@id"in lf&&(Cf=await api.compact({activeCtx:F,activeProperty:yf,element:{"@id":lf["@id"]},options:K}))}Bf||(Bf=api.compactIri({activeCtx:F,iri:"@none",relativeTo:{vocab:!0}})),_addValue(Pf,Bf,Cf,{propertyIsArray:_f.includes("@set")})}else{const Pf=!K.compactArrays||_f.includes("@set")||_f.includes("@list")||_isArray$1(Cf)&&Cf.length===0||mo==="@list"||mo==="@graph";_addValue(vf,yf,Cf,{propertyIsArray:Pf})}}}return rt}return q};api.compactIri=({activeCtx:F,iri:W,value:q=null,relativeTo:K={vocab:!1},reverse:X=!1,base:tt=null})=>{if(W===null)return W;F.isPropertyTermScoped&&F.previousContext&&(F=F.previousContext);const rt=F.getInverse();if(_isKeyword(W)&&W in rt&&"@none"in rt[W]&&"@type"in rt[W]["@none"]&&"@none"in rt[W]["@none"]["@type"])return rt[W]["@none"]["@type"]["@none"];if(K.vocab&&W in rt){const po=F["@language"]||"@none",mo=[];_isObject$1(q)&&"@index"in q&&!("@graph"in q)&&mo.push("@index","@index@set"),_isObject$1(q)&&"@preserve"in q&&(q=q["@preserve"][0]),_isGraph(q)?("@index"in q&&mo.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in q&&mo.push("@graph@id","@graph@id@set"),mo.push("@graph","@graph@set","@set"),"@index"in q||mo.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in q||mo.push("@graph@id","@graph@id@set")):_isObject$1(q)&&!_isValue(q)&&mo.push("@id","@id@set","@type","@set@type");let wo="@language",lf="@null";if(X)wo="@type",lf="@reverse",mo.push("@set");else if(_isList(q)){"@index"in q||mo.push("@list");const cf=q["@list"];if(cf.length===0)wo="@any",lf="@none";else{let vf=cf.length===0?po:null,_f=null;for(let $f=0;$f=0;--po){const mo=ut[po],wo=mo.terms;for(const lf of wo){const yf=lf+":"+W.substr(mo.iri.length);F.mappings.get(lf)._prefix&&(!F.mappings.has(yf)||q===null&&F.mappings.get(yf)["@id"]===W)&&(ot===null||_compareShortestLeast(yf,ot)<0)&&(ot=yf)}}if(ot!==null)return ot;for(const[po,mo]of F.mappings)if(mo&&mo._prefix&&W.startsWith(po+":"))throw new JsonLdError$1(`Absolute IRI "${W}" confused with prefix "${po}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:F});if(!K.vocab)if("@base"in F)if(F["@base"]){const po=_removeBase(_prependBase(tt,F["@base"]),W);return REGEX_KEYWORD.test(po)?`./${po}`:po}else return W;else return _removeBase(tt,W);return W};api.compactValue=({activeCtx:F,activeProperty:W,value:q,options:K})=>{if(_isValue(q)){const ot=_getContextValue(F,W,"@type"),ut=_getContextValue(F,W,"@language"),yn=_getContextValue(F,W,"@direction"),uo=_getContextValue(F,W,"@container")||[],po="@index"in q&&!uo.includes("@index");if(!po&&ot!=="@none"&&(q["@type"]===ot||"@language"in q&&q["@language"]===ut&&"@direction"in q&&q["@direction"]===yn||"@language"in q&&q["@language"]===ut||"@direction"in q&&q["@direction"]===yn))return q["@value"];const mo=Object.keys(q).length,wo=mo===1||mo===2&&"@index"in q&&!po,lf="@language"in F,yf=_isString$1(q["@value"]),cf=F.mappings.has(W)&&F.mappings.get(W)["@language"]===null;if(wo&&ot!=="@none"&&(!lf||!yf||cf))return q["@value"];const vf={};return po&&(vf[api.compactIri({activeCtx:F,iri:"@index",relativeTo:{vocab:!0}})]=q["@index"]),"@type"in q?vf[api.compactIri({activeCtx:F,iri:"@type",relativeTo:{vocab:!0}})]=api.compactIri({activeCtx:F,iri:q["@type"],relativeTo:{vocab:!0}}):"@language"in q&&(vf[api.compactIri({activeCtx:F,iri:"@language",relativeTo:{vocab:!0}})]=q["@language"]),"@direction"in q&&(vf[api.compactIri({activeCtx:F,iri:"@direction",relativeTo:{vocab:!0}})]=q["@direction"]),vf[api.compactIri({activeCtx:F,iri:"@value",relativeTo:{vocab:!0}})]=q["@value"],vf}const X=_expandIri$1(F,W,{vocab:!0},K),tt=_getContextValue(F,W,"@type"),rt=api.compactIri({activeCtx:F,iri:q["@id"],relativeTo:{vocab:tt==="@vocab"},base:K.base});return tt==="@id"||tt==="@vocab"||X==="@graph"?rt:{[api.compactIri({activeCtx:F,iri:"@id",relativeTo:{vocab:!0}})]:rt}};function _selectTerm(F,W,q,K,X,tt){tt===null&&(tt="@null");const rt=[];if((tt==="@id"||tt==="@reverse")&&_isObject$1(q)&&"@id"in q){tt==="@reverse"&&rt.push("@reverse");const ut=api.compactIri({activeCtx:F,iri:q["@id"],relativeTo:{vocab:!0}});F.mappings.has(ut)&&F.mappings.get(ut)&&F.mappings.get(ut)["@id"]===q["@id"]?rt.push.apply(rt,["@vocab","@id"]):rt.push.apply(rt,["@id","@vocab"])}else{rt.push(tt);const ut=rt.find(yn=>yn.includes("_"));ut&&rt.push(ut.replace(/^[^_]+_/,"_"))}rt.push("@none");const ot=F.inverse[W];for(const ut of K){if(!(ut in ot))continue;const yn=ot[ut][X];for(const uo of rt)if(uo in yn)return yn[uo]}return null}function _checkNestProperty(F,W,q){if(_expandIri$1(F,W,{vocab:!0},q)!=="@nest")throw new JsonLdError$1("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}var JsonLdProcessor,hasRequiredJsonLdProcessor;function requireJsonLdProcessor(){return hasRequiredJsonLdProcessor||(hasRequiredJsonLdProcessor=1,JsonLdProcessor=F=>{class W{toString(){return"[object JsonLdProcessor]"}}return Object.defineProperty(W,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(W.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:W}),W.compact=function(q,K){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):F.compact(q,K)},W.expand=function(q){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):F.expand(q)},W.flatten=function(q){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):F.flatten(q)},W}),JsonLdProcessor}/** * A JavaScript implementation of the JSON-LD API. * * @author Dave Longley @@ -3857,7 +3857,7 @@ if("@preserve"in F)return F["@preserve"][0];if(graphTypes.isValue(F))return F;if * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */const canonize=rdfCanonize,platform=platformBrowser,util$3=util$8,ContextResolver=ContextResolver_1,IdentifierIssuer=util$3.IdentifierIssuer,JsonLdError=JsonLdError_1,LRU=lruCache,NQuads=NQuads$1,{expand:_expand}=expand,{flatten:_flatten}=flatten,{fromRDF:_fromRDF}=fromRdf,{toRDF:_toRDF}=toRdf,{frameMergedOrDefault:_frameMergedOrDefault,cleanupNull:_cleanupNull}=frame,{isArray:_isArray,isObject:_isObject,isString:_isString}=types$7,{isSubjectReference:_isSubjectReference}=graphTypes$5,{expandIri:_expandIri,getInitialContext:_getInitialContext,process:_processContext,processingMode:_processingMode}=context,{compact:_compact,compactIri:_compactIri}=compact,{createNodeMap:_createNodeMap,createMergedNodeMap:_createMergedNodeMap,mergeNodeMaps:_mergeNodeMaps}=nodeMap,{logEventHandler:_logEventHandler,logWarningEventHandler:_logWarningEventHandler,safeEventHandler:_safeEventHandler,setDefaultEventHandler:_setDefaultEventHandler,setupEventHandler:_setupEventHandler,strictEventHandler:_strictEventHandler,unhandledEventHandler:_unhandledEventHandler}=events,wrapper$1=function(F){const W={},K=new LRU({max:100});F.compact=async function(tt,rt,ot){if(arguments.length<2)throw new TypeError("Could not compact, too few arguments.");if(rt===null)throw new JsonLdError("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"});if(tt===null)return null;ot=X(ot,{base:_isString(tt)?tt:"",compactArrays:!0,compactToRelative:!0,graph:!1,skipExpansion:!1,link:!1,issuer:new IdentifierIssuer("_:b"),contextResolver:new ContextResolver({sharedCache:K})}),ot.link&&(ot.skipExpansion=!0),ot.compactToRelative||delete ot.base;let ut;ot.skipExpansion?ut=tt:ut=await F.expand(tt,ot);const yn=await F.processContext(_getInitialContext(ot),rt,ot);let uo=await _compact({activeCtx:yn,element:ut,options:ot});ot.compactArrays&&!ot.graph&&_isArray(uo)?uo.length===1?uo=uo[0]:uo.length===0&&(uo={}):ot.graph&&_isObject(uo)&&(uo=[uo]),_isObject(rt)&&"@context"in rt&&(rt=rt["@context"]),rt=util$3.clone(rt),_isArray(rt)||(rt=[rt]);const po=rt;rt=[];for(let wo=0;wo0)&&rt.push(po[wo]);const mo=rt.length>0;if(rt.length===1&&(rt=rt[0]),_isArray(uo)){const wo=_compactIri({activeCtx:yn,iri:"@graph",relativeTo:{vocab:!0}}),lf=uo;uo={},mo&&(uo["@context"]=rt),uo[wo]=lf}else if(_isObject(uo)&&mo){const wo=uo;uo={"@context":rt};for(const lf in wo)uo[lf]=wo[lf]}return uo},F.expand=async function(tt,rt){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");rt=X(rt,{keepFreeFloatingNodes:!1,contextResolver:new ContextResolver({sharedCache:K})});const ot={},ut=[];if("expandContext"in rt){const mo=util$3.clone(rt.expandContext);_isObject(mo)&&"@context"in mo?ot.expandContext=mo:ot.expandContext={"@context":mo},ut.push(ot.expandContext)}let yn;if(!_isString(tt))ot.input=util$3.clone(tt);else{const mo=await F.get(tt,rt);yn=mo.documentUrl,ot.input=mo.document,mo.contextUrl&&(ot.remoteContext={"@context":mo.contextUrl},ut.push(ot.remoteContext))}"base"in rt||(rt.base=yn||"");let uo=_getInitialContext(rt);for(const mo of ut)uo=await _processContext({activeCtx:uo,localCtx:mo,options:rt});let po=await _expand({activeCtx:uo,element:ot.input,options:rt});return _isObject(po)&&"@graph"in po&&Object.keys(po).length===1?po=po["@graph"]:po===null&&(po=[]),_isArray(po)||(po=[po]),po},F.flatten=async function(tt,rt,ot){if(arguments.length<1)return new TypeError("Could not flatten, too few arguments.");typeof rt=="function"?rt=null:rt=rt||null,ot=X(ot,{base:_isString(tt)?tt:"",contextResolver:new ContextResolver({sharedCache:K})});const ut=await F.expand(tt,ot),yn=_flatten(ut);return rt===null?yn:(ot.graph=!0,ot.skipExpansion=!0,await F.compact(yn,rt,ot))},F.frame=async function(tt,rt,ot){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");if(ot=X(ot,{base:_isString(tt)?tt:"",embed:"@once",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new ContextResolver({sharedCache:K})}),_isString(rt)){const cf=await F.get(rt,ot);if(rt=cf.document,cf.contextUrl){let vf=rt["@context"];vf?_isArray(vf)?vf.push(cf.contextUrl):vf=[vf,cf.contextUrl]:vf=cf.contextUrl,rt["@context"]=vf}}const ut=rt?rt["@context"]||{}:{},yn=await F.processContext(_getInitialContext(ot),ut,ot);ot.hasOwnProperty("omitGraph")||(ot.omitGraph=_processingMode(yn,1.1)),ot.hasOwnProperty("pruneBlankNodeIdentifiers")||(ot.pruneBlankNodeIdentifiers=_processingMode(yn,1.1));const uo=await F.expand(tt,ot),po={...ot};po.isFrame=!0,po.keepFreeFloatingNodes=!0;const mo=await F.expand(rt,po),wo=Object.keys(rt).map(cf=>_expandIri(yn,cf,{vocab:!0}));po.merged=!wo.includes("@graph"),po.is11=_processingMode(yn,1.1);const lf=_frameMergedOrDefault(uo,mo,po);po.graph=!ot.omitGraph,po.skipExpansion=!0,po.link={},po.framing=!0;let yf=await F.compact(lf,ut,po);return po.link={},yf=_cleanupNull(yf,po),yf},F.link=async function(tt,rt,ot){const ut={};return rt&&(ut["@context"]=rt),ut["@embed"]="@link",F.frame(tt,ut,ot)},F.normalize=F.canonize=async function(tt,rt){if(arguments.length<1)throw new TypeError("Could not canonize, too few arguments.");if(rt=X(rt,{base:_isString(tt)?tt:null,algorithm:"URDNA2015",skipExpansion:!1,safe:!0,contextResolver:new ContextResolver({sharedCache:K})}),"inputFormat"in rt){if(rt.inputFormat!=="application/n-quads"&&rt.inputFormat!=="application/nquads")throw new JsonLdError("Unknown canonicalization input format.","jsonld.CanonizeError");const yn=NQuads.parse(tt);return canonize.canonize(yn,rt)}const ot={...rt};delete ot.format,ot.produceGeneralizedRdf=!1;const ut=await F.toRDF(tt,ot);return canonize.canonize(ut,rt)},F.fromRDF=async function(tt,rt){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");rt=X(rt,{format:_isString(tt)?"application/n-quads":void 0});const{format:ot}=rt;let{rdfParser:ut}=rt;if(ot){if(ut=ut||W[ot],!ut)throw new JsonLdError("Unknown input format.","jsonld.UnknownFormat",{format:ot})}else ut=()=>tt;const yn=await ut(tt);return _fromRDF(yn,rt)},F.toRDF=async function(tt,rt){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");rt=X(rt,{base:_isString(tt)?tt:"",skipExpansion:!1,contextResolver:new ContextResolver({sharedCache:K})});let ot;rt.skipExpansion?ot=tt:ot=await F.expand(tt,rt);const ut=_toRDF(ot,rt);if(rt.format){if(rt.format==="application/n-quads"||rt.format==="application/nquads")return NQuads.serialize(ut);throw new JsonLdError("Unknown output format.","jsonld.UnknownFormat",{format:rt.format})}return ut},F.createNodeMap=async function(tt,rt){if(arguments.length<1)throw new TypeError("Could not create node map, too few arguments.");rt=X(rt,{base:_isString(tt)?tt:"",contextResolver:new ContextResolver({sharedCache:K})});const ot=await F.expand(tt,rt);return _createMergedNodeMap(ot,rt)},F.merge=async function(tt,rt,ot){if(arguments.length<1)throw new TypeError("Could not merge, too few arguments.");if(!_isArray(tt))throw new TypeError('Could not merge, "docs" must be an array.');typeof rt=="function"?rt=null:rt=rt||null,ot=X(ot,{contextResolver:new ContextResolver({sharedCache:K})});const ut=await Promise.all(tt.map(cf=>{const vf={...ot};return F.expand(cf,vf)}));let yn=!0;"mergeNodes"in ot&&(yn=ot.mergeNodes);const uo=ot.issuer||new IdentifierIssuer("_:b"),po={"@default":{}};for(let cf=0;cfF._documentLoader,set:tt=>F._documentLoader=tt}),F.documentLoader=async tt=>{throw new JsonLdError("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:tt})},F.get=async function(tt,rt){let ot;typeof rt.documentLoader=="function"?ot=rt.documentLoader:ot=F.documentLoader;const ut=await ot(tt);try{if(!ut.document)throw new JsonLdError("No remote document found at the given URL.","jsonld.NullRemoteDocument");_isString(ut.document)&&(ut.document=JSON.parse(ut.document))}catch(yn){throw new JsonLdError("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:yn,remoteDoc:ut})}return ut},F.processContext=async function(tt,rt,ot){return ot=X(ot,{base:"",contextResolver:new ContextResolver({sharedCache:K})}),rt===null?_getInitialContext(ot):(rt=util$3.clone(rt),_isObject(rt)&&"@context"in rt||(rt={"@context":rt}),_processContext({activeCtx:tt,localCtx:rt,options:ot}))},F.getContextValue=context.getContextValue,F.documentLoaders={},F.useDocumentLoader=function(tt){if(!(tt in F.documentLoaders))throw new JsonLdError('Unknown document loader type: "'+tt+'"',"jsonld.UnknownDocumentLoader",{type:tt});F.documentLoader=F.documentLoaders[tt].apply(F,Array.prototype.slice.call(arguments,1))},F.registerRDFParser=function(tt,rt){W[tt]=rt},F.unregisterRDFParser=function(tt){delete W[tt]},F.registerRDFParser("application/n-quads",NQuads.parse),F.registerRDFParser("application/nquads",NQuads.parse),F.url=url$1,F.logEventHandler=_logEventHandler,F.logWarningEventHandler=_logWarningEventHandler,F.safeEventHandler=_safeEventHandler,F.setDefaultEventHandler=_setDefaultEventHandler,F.strictEventHandler=_strictEventHandler,F.unhandledEventHandler=_unhandledEventHandler,F.util=util$3,Object.assign(F,util$3),F.promises=F,F.RequestQueue=requireRequestQueue(),F.JsonLdProcessor=requireJsonLdProcessor()(F),platform.setupGlobals(F),platform.setupDocumentLoaders(F);function X(tt,{documentLoader:rt=F.documentLoader,...ot}){if(tt&&"compactionMap"in tt)throw new JsonLdError('"compactionMap" not supported.',"jsonld.OptionsError");if(tt&&"expansionMap"in tt)throw new JsonLdError('"expansionMap" not supported.',"jsonld.OptionsError");return Object.assign({},{documentLoader:rt},ot,tt,{eventHandler:_setupEventHandler({options:tt})})}return F},factory=function(){return wrapper$1(function(){return factory()})};wrapper$1(factory);var jsonld=factory;const _hoisted_1$4=["height","caption"],sparqlEndpoint="https://cy9in0xsv5.execute-api.us-east-1.amazonaws.com/prod/sparql",iiifService="https://iiif.juncture-digital.org",sparql=` + */const canonize=rdfCanonize,platform=platformBrowser,util$3=util$8,ContextResolver=ContextResolver_1,IdentifierIssuer=util$3.IdentifierIssuer,JsonLdError=JsonLdError_1,LRU=lruCache,NQuads=NQuads$1,{expand:_expand}=expand,{flatten:_flatten}=flatten,{fromRDF:_fromRDF}=fromRdf,{toRDF:_toRDF}=toRdf,{frameMergedOrDefault:_frameMergedOrDefault,cleanupNull:_cleanupNull}=frame,{isArray:_isArray,isObject:_isObject,isString:_isString}=types$7,{isSubjectReference:_isSubjectReference}=graphTypes$5,{expandIri:_expandIri,getInitialContext:_getInitialContext,process:_processContext,processingMode:_processingMode}=context,{compact:_compact,compactIri:_compactIri}=compact,{createNodeMap:_createNodeMap,createMergedNodeMap:_createMergedNodeMap,mergeNodeMaps:_mergeNodeMaps}=nodeMap,{logEventHandler:_logEventHandler,logWarningEventHandler:_logWarningEventHandler,safeEventHandler:_safeEventHandler,setDefaultEventHandler:_setDefaultEventHandler,setupEventHandler:_setupEventHandler,strictEventHandler:_strictEventHandler,unhandledEventHandler:_unhandledEventHandler}=events,wrapper$1=function(F){const W={},K=new LRU({max:100});F.compact=async function(tt,rt,ot){if(arguments.length<2)throw new TypeError("Could not compact, too few arguments.");if(rt===null)throw new JsonLdError("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"});if(tt===null)return null;ot=X(ot,{base:_isString(tt)?tt:"",compactArrays:!0,compactToRelative:!0,graph:!1,skipExpansion:!1,link:!1,issuer:new IdentifierIssuer("_:b"),contextResolver:new ContextResolver({sharedCache:K})}),ot.link&&(ot.skipExpansion=!0),ot.compactToRelative||delete ot.base;let ut;ot.skipExpansion?ut=tt:ut=await F.expand(tt,ot);const yn=await F.processContext(_getInitialContext(ot),rt,ot);let uo=await _compact({activeCtx:yn,element:ut,options:ot});ot.compactArrays&&!ot.graph&&_isArray(uo)?uo.length===1?uo=uo[0]:uo.length===0&&(uo={}):ot.graph&&_isObject(uo)&&(uo=[uo]),_isObject(rt)&&"@context"in rt&&(rt=rt["@context"]),rt=util$3.clone(rt),_isArray(rt)||(rt=[rt]);const po=rt;rt=[];for(let wo=0;wo0)&&rt.push(po[wo]);const mo=rt.length>0;if(rt.length===1&&(rt=rt[0]),_isArray(uo)){const wo=_compactIri({activeCtx:yn,iri:"@graph",relativeTo:{vocab:!0}}),lf=uo;uo={},mo&&(uo["@context"]=rt),uo[wo]=lf}else if(_isObject(uo)&&mo){const wo=uo;uo={"@context":rt};for(const lf in wo)uo[lf]=wo[lf]}return uo},F.expand=async function(tt,rt){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");rt=X(rt,{keepFreeFloatingNodes:!1,contextResolver:new ContextResolver({sharedCache:K})});const ot={},ut=[];if("expandContext"in rt){const mo=util$3.clone(rt.expandContext);_isObject(mo)&&"@context"in mo?ot.expandContext=mo:ot.expandContext={"@context":mo},ut.push(ot.expandContext)}let yn;if(!_isString(tt))ot.input=util$3.clone(tt);else{const mo=await F.get(tt,rt);yn=mo.documentUrl,ot.input=mo.document,mo.contextUrl&&(ot.remoteContext={"@context":mo.contextUrl},ut.push(ot.remoteContext))}"base"in rt||(rt.base=yn||"");let uo=_getInitialContext(rt);for(const mo of ut)uo=await _processContext({activeCtx:uo,localCtx:mo,options:rt});let po=await _expand({activeCtx:uo,element:ot.input,options:rt});return _isObject(po)&&"@graph"in po&&Object.keys(po).length===1?po=po["@graph"]:po===null&&(po=[]),_isArray(po)||(po=[po]),po},F.flatten=async function(tt,rt,ot){if(arguments.length<1)return new TypeError("Could not flatten, too few arguments.");typeof rt=="function"?rt=null:rt=rt||null,ot=X(ot,{base:_isString(tt)?tt:"",contextResolver:new ContextResolver({sharedCache:K})});const ut=await F.expand(tt,ot),yn=_flatten(ut);return rt===null?yn:(ot.graph=!0,ot.skipExpansion=!0,await F.compact(yn,rt,ot))},F.frame=async function(tt,rt,ot){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");if(ot=X(ot,{base:_isString(tt)?tt:"",embed:"@once",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new ContextResolver({sharedCache:K})}),_isString(rt)){const cf=await F.get(rt,ot);if(rt=cf.document,cf.contextUrl){let vf=rt["@context"];vf?_isArray(vf)?vf.push(cf.contextUrl):vf=[vf,cf.contextUrl]:vf=cf.contextUrl,rt["@context"]=vf}}const ut=rt?rt["@context"]||{}:{},yn=await F.processContext(_getInitialContext(ot),ut,ot);ot.hasOwnProperty("omitGraph")||(ot.omitGraph=_processingMode(yn,1.1)),ot.hasOwnProperty("pruneBlankNodeIdentifiers")||(ot.pruneBlankNodeIdentifiers=_processingMode(yn,1.1));const uo=await F.expand(tt,ot),po={...ot};po.isFrame=!0,po.keepFreeFloatingNodes=!0;const mo=await F.expand(rt,po),wo=Object.keys(rt).map(cf=>_expandIri(yn,cf,{vocab:!0}));po.merged=!wo.includes("@graph"),po.is11=_processingMode(yn,1.1);const lf=_frameMergedOrDefault(uo,mo,po);po.graph=!ot.omitGraph,po.skipExpansion=!0,po.link={},po.framing=!0;let yf=await F.compact(lf,ut,po);return po.link={},yf=_cleanupNull(yf,po),yf},F.link=async function(tt,rt,ot){const ut={};return rt&&(ut["@context"]=rt),ut["@embed"]="@link",F.frame(tt,ut,ot)},F.normalize=F.canonize=async function(tt,rt){if(arguments.length<1)throw new TypeError("Could not canonize, too few arguments.");if(rt=X(rt,{base:_isString(tt)?tt:null,algorithm:"URDNA2015",skipExpansion:!1,safe:!0,contextResolver:new ContextResolver({sharedCache:K})}),"inputFormat"in rt){if(rt.inputFormat!=="application/n-quads"&&rt.inputFormat!=="application/nquads")throw new JsonLdError("Unknown canonicalization input format.","jsonld.CanonizeError");const yn=NQuads.parse(tt);return canonize.canonize(yn,rt)}const ot={...rt};delete ot.format,ot.produceGeneralizedRdf=!1;const ut=await F.toRDF(tt,ot);return canonize.canonize(ut,rt)},F.fromRDF=async function(tt,rt){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");rt=X(rt,{format:_isString(tt)?"application/n-quads":void 0});const{format:ot}=rt;let{rdfParser:ut}=rt;if(ot){if(ut=ut||W[ot],!ut)throw new JsonLdError("Unknown input format.","jsonld.UnknownFormat",{format:ot})}else ut=()=>tt;const yn=await ut(tt);return _fromRDF(yn,rt)},F.toRDF=async function(tt,rt){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");rt=X(rt,{base:_isString(tt)?tt:"",skipExpansion:!1,contextResolver:new ContextResolver({sharedCache:K})});let ot;rt.skipExpansion?ot=tt:ot=await F.expand(tt,rt);const ut=_toRDF(ot,rt);if(rt.format){if(rt.format==="application/n-quads"||rt.format==="application/nquads")return NQuads.serialize(ut);throw new JsonLdError("Unknown output format.","jsonld.UnknownFormat",{format:rt.format})}return ut},F.createNodeMap=async function(tt,rt){if(arguments.length<1)throw new TypeError("Could not create node map, too few arguments.");rt=X(rt,{base:_isString(tt)?tt:"",contextResolver:new ContextResolver({sharedCache:K})});const ot=await F.expand(tt,rt);return _createMergedNodeMap(ot,rt)},F.merge=async function(tt,rt,ot){if(arguments.length<1)throw new TypeError("Could not merge, too few arguments.");if(!_isArray(tt))throw new TypeError('Could not merge, "docs" must be an array.');typeof rt=="function"?rt=null:rt=rt||null,ot=X(ot,{contextResolver:new ContextResolver({sharedCache:K})});const ut=await Promise.all(tt.map(cf=>{const vf={...ot};return F.expand(cf,vf)}));let yn=!0;"mergeNodes"in ot&&(yn=ot.mergeNodes);const uo=ot.issuer||new IdentifierIssuer("_:b"),po={"@default":{}};for(let cf=0;cfF._documentLoader,set:tt=>F._documentLoader=tt}),F.documentLoader=async tt=>{throw new JsonLdError("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:tt})},F.get=async function(tt,rt){let ot;typeof rt.documentLoader=="function"?ot=rt.documentLoader:ot=F.documentLoader;const ut=await ot(tt);try{if(!ut.document)throw new JsonLdError("No remote document found at the given URL.","jsonld.NullRemoteDocument");_isString(ut.document)&&(ut.document=JSON.parse(ut.document))}catch(yn){throw new JsonLdError("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:yn,remoteDoc:ut})}return ut},F.processContext=async function(tt,rt,ot){return ot=X(ot,{base:"",contextResolver:new ContextResolver({sharedCache:K})}),rt===null?_getInitialContext(ot):(rt=util$3.clone(rt),_isObject(rt)&&"@context"in rt||(rt={"@context":rt}),_processContext({activeCtx:tt,localCtx:rt,options:ot}))},F.getContextValue=context.getContextValue,F.documentLoaders={},F.useDocumentLoader=function(tt){if(!(tt in F.documentLoaders))throw new JsonLdError('Unknown document loader type: "'+tt+'"',"jsonld.UnknownDocumentLoader",{type:tt});F.documentLoader=F.documentLoaders[tt].apply(F,Array.prototype.slice.call(arguments,1))},F.registerRDFParser=function(tt,rt){W[tt]=rt},F.unregisterRDFParser=function(tt){delete W[tt]},F.registerRDFParser("application/n-quads",NQuads.parse),F.registerRDFParser("application/nquads",NQuads.parse),F.url=url$1,F.logEventHandler=_logEventHandler,F.logWarningEventHandler=_logWarningEventHandler,F.safeEventHandler=_safeEventHandler,F.setDefaultEventHandler=_setDefaultEventHandler,F.strictEventHandler=_strictEventHandler,F.unhandledEventHandler=_unhandledEventHandler,F.util=util$3,Object.assign(F,util$3),F.promises=F,F.RequestQueue=requireRequestQueue(),F.JsonLdProcessor=requireJsonLdProcessor()(F),platform.setupGlobals(F),platform.setupDocumentLoaders(F);function X(tt,{documentLoader:rt=F.documentLoader,...ot}){if(tt&&"compactionMap"in tt)throw new JsonLdError('"compactionMap" not supported.',"jsonld.OptionsError");if(tt&&"expansionMap"in tt)throw new JsonLdError('"expansionMap" not supported.',"jsonld.OptionsError");return Object.assign({},{documentLoader:rt},ot,tt,{eventHandler:_setupEventHandler({options:tt})})}return F},factory=function(){return wrapper$1(function(){return factory()})};wrapper$1(factory);var jsonld=factory;const _hoisted_1$4=["height","caption"],sparqlEndpoint="https://cy9in0xsv5.execute-api.us-east-1.amazonaws.com/prod/sparql",iiifService="https://iiif.juncture-digital.org",sparql=` PREFIX jwd: PREFIX jwdt: PREFIX jp: @@ -3910,19 +3910,19 @@ if("@preserve"in F)return F["@preserve"][0];if(graphTypes.isValue(F))return F;if } } } - LIMIT <>`,_sfc_main$5=defineComponent({__name:"PlantSpecimen.ce",props:{eid:{type:String},qid:{type:String},jpid:{type:String},wdid:{type:String},taxonName:{type:String},caption:{type:String},max:{type:Number,default:1},full:{type:Boolean},left:{type:Boolean},right:{type:Boolean},sticky:{type:Boolean},width:{type:String},height:{type:Number}},setup(F){const W=F,q=ref(null),K=ref([]),X=ref([]),tt=computed(()=>X.value.map(po=>po.id||po["@id"]));watch$1(K,async()=>{var po;X.value=await Promise.all((((po=K.value)==null?void 0:po.length)===1?[K.value[0]]:K.value||[]).map(mo=>fetch(`${iiifService}/manifest/`,{method:"POST",headers:{"Content-type":"application/json"},body:JSON.stringify(uo(mo))}).then(wo=>wo.json())))});const rt=computed(()=>{var po;return W.caption||(((po=K.value)==null?void 0:po.length)>0?K.value[0].description:"")});onMounted(()=>ut());const ot={"@context":{jwd:"http://kg.jstor.org/entity/",jwdt:"http://kg.jstor.org/prop/direct/",jp:"http://kg.jstor.org/prop/",jps:"http://kg.jstor.org/prop/statement/",jpq:"http://kg.jstor.org/prop/qualifier/",rdfs:"http://www.w3.org/2000/01/rdf-schema#",schema:"http://schema.org/",wd:"http://www.wikidata.org/entity/",wdt:"http://www.wikidata.org/prop/direct/",xsd:"http://www.w3.org/2001/XMLSchema#",Specimen:"jwd:Q14316",id:"@id",collectionDate:{"@id":"jwdt:P1663","@type":"xsd:dateTime"},collector:{"@id":"jwdt:P1662","@container":"@set"},description:{"@id":"schema:description","@language":"en"},herbarium:{"@id":"jwdt:P1666","@type":"@id"},images:{"@id":"jp:P1467","@type":"@id","@container":"@set"},imgSize:{"@id":"jpq:P1669"},"instance of":{"@id":"jwdt:P17","@type":"@id"},jstorPlantsId:{"@id":"jwdt:P1106"},locationCollected:{"@id":"jwdt:P1665"},label:{"@id":"rdfs:label","@language":"en"},specimenOf:{"@id":"jwdt:P1660","@type":"@id"},specimenType:{"@id":"jwdt:P1661"},taxonName:{"@id":"jwdt:P501"},wofId:{"@id":"wdt:P6766"}}};async function ut(){let po=W.jpid?`jwdt:P1106 "${W.jpid}" ;`:W.eid||W.qid||W.wdid?`jwdt:P1660 ;`:`jwdt:P501 "${W.taxonName}" ;`,mo=sparql.replace(/<>/,po).replace(/<>/,`${W.max}`),wo=await yn(mo);wo["@graph"]?K.value=(await yn(mo))["@graph"]:(delete wo["@context"],K.value=[wo])}async function yn(po){let wo=await(await fetch(sparqlEndpoint,{method:"POST",body:new URLSearchParams({query:po}),headers:{Accept:"text/plain","Content-type":"application/x-www-form-urlencoded"}})).text(),lf=await jsonld.fromRDF(wo,{format:"application/n-quads"});return jsonld.frame(lf,{"@context":ot,"@type":"Specimen"})}function uo(po){if(!po.images)return{};let wo=po.images.find(yf=>yf.imgSize==="best").id.match(/rft_id=([^&]*)/)[1],lf={url:`${iiifService}/gp-proxy${wo}`};return po.taxonName&&(lf["Taxon name"]=po.taxonName),po.jstorPlantsId&&(lf["Global Plants ID"]=po.jstorPlantsId),po.description&&(lf.Description=po.description),po.description&&(lf.Label=po.description),po.specimenType&&(lf["Specimen type"]=po.specimenType),po.collector&&(lf.Collector=po.collector.join("; ")),po.locationCollected&&(lf["Location collected"]=po.locationCollected.label),po.collectionDate&&(lf["Date collected"]=po.collectionDate),po.herbarium&&(lf.Herbarium=po.herbarium.label),lf}return(po,mo)=>(openBlock(),createElementBlock("div",{class:"osd",id:"osd",ref_key:"root",ref:q},[createBaseVNode("ve-image",{height:F.height,caption:rt.value},[createBaseVNode("ul",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(tt.value,(wo,lf)=>(openBlock(),createElementBlock("li",{key:`specimen-${lf}`},"src="+toDisplayString(wo),1))),128))])],8,_hoisted_1$4)],512))}}),_hoisted_1$3=createBaseVNode("input",{class:"search-btn",type:"checkbox",id:"search-btn"},null,-1),_hoisted_2$3={class:"wrapper"},_hoisted_3$3={class:"search-form"},_hoisted_4$3={class:"input-wrapper relative"},_hoisted_5$2=createBaseVNode("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"},null,-1),_hoisted_6$1=[_hoisted_5$2],_hoisted_7$1={key:0,class:"search-results"},_hoisted_8=["href"],_hoisted_9$1=["innerHTML"],_hoisted_10$1=["innerHTML"],_hoisted_11$1={key:0},_hoisted_12$1=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",fill:"#fff"},[createBaseVNode("path",{d:"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"})],-1),_hoisted_13$1=[_hoisted_12$1],searchEndpoint="https://www.googleapis.com/customsearch/v1",_sfc_main$4=defineComponent({__name:"SiteSearch.ce",props:{searchDomain:{type:String},searchKey:{type:String},searchCx:{type:String}},setup(F){const W=F,q=ref(cf(W.searchDomain||"",W.searchKey||"")),K=ref(null),X=computed(()=>{var vf;return(vf=K==null?void 0:K.value)==null?void 0:vf.parentNode}),tt=ref(),rt=ref(),ot=ref(""),ut=ref([]),yn=ref(0),uo=ref(!1);onMounted(()=>mo());function po(vf){vf.preventDefault(),uo.value=!0}function mo(){var vf,_f;tt.value=(vf=X.value)==null?void 0:vf.querySelector("#search-input"),tt.value.value="",rt.value=(_f=X.value)==null?void 0:_f.querySelector("#search-btn"),ut.value=[]}watch$1(uo,()=>{var vf;rt.value&&(rt.value.checked=uo.value),uo&&((vf=tt.value)==null||vf.focus())});function wo(){var Pf;let vf=(Pf=tt.value)==null?void 0:Pf.value.replace(/ /,"%20"),_f={q:vf,start:vf===ot.value?ut.value.length+1:1,key:q.value,cx:W.searchCx},$f=Object.keys(_f).map(Cf=>`${Cf}=${_f[Cf]}`).join("&"),wf=`${searchEndpoint}?${$f}`;fetch(wf).then(Cf=>Cf.json()).then(Cf=>{yn.value=parseInt(Cf.searchInformation.totalResults);let Af=Cf.items.map(Bf=>{var Df;let Hf=new URL(Bf.link);return Bf.link=`${location.origin}${((Df=window.config)==null?void 0:Df.baseurl)||""}${Hf.pathname}`,Bf});ut.value=vf!==ot.value?Af:[...ut.value,...Af],ot.value=vf||""})}function lf(vf){vf.key==="Enter"&&wo()}function yf(vf){vf.preventDefault(),vf.stopPropagation(),uo.value=!1,tt.value&&(tt.value.value=""),ot.value="",yn.value=0,ut.value=[]}function cf(vf,_f){const $f=Af=>Af.split("").map(Bf=>Bf.charCodeAt(0)),wf=Af=>$f(vf).reduce((Bf,Hf)=>Bf^Hf,Af);let Pf=_f.match(/.{1,2}/g);return Pf?Pf.map(Af=>parseInt(Af,16)).map(wf).map(Af=>String.fromCharCode(Af)).join(""):""}return(vf,_f)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:K,class:"search"},[_hoisted_1$3,createBaseVNode("div",_hoisted_2$3,[createBaseVNode("div",_hoisted_3$3,[createBaseVNode("div",_hoisted_4$3,[createBaseVNode("input",{type:"text",id:"search-input",class:"search-input",onKeyup:lf,autocomplete:"off",role:"textbox",placeholder:"Search site"},null,32)]),(openBlock(),createElementBlock("svg",{onClick:yf,class:"absolute top-[12px] right-[10px] z-10 cursor-pointer",xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 384 512",fill:"#000"},_hoisted_6$1))]),ut.value.length>0?(openBlock(),createElementBlock("ul",_hoisted_7$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(ut.value,($f,wf)=>(openBlock(),createElementBlock("li",{key:`sr=${wf}`},[createBaseVNode("a",{href:$f.link},[createBaseVNode("h3",{innerHTML:$f.htmlTitle},null,8,_hoisted_9$1),createBaseVNode("p",{innerHTML:$f.htmlSnippet},null,8,_hoisted_10$1)],8,_hoisted_8)]))),128)),yn.value>ut.value.length?(openBlock(),createElementBlock("li",_hoisted_11$1,[createBaseVNode("div",{class:"more",onClick:wo},"More")])):createCommentVNode("",!0)])):createCommentVNode("",!0)]),createBaseVNode("label",{class:"search-icon",htmlFor:"search-btn"},[createBaseVNode("span",{onClick:po},_hoisted_13$1)])],512))}}),_style_0$4=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.\\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.\\!relative{position:relative!important}.relative{position:relative}.sticky{position:sticky}.-inset-1{top:-.25rem;right:-.25rem;bottom:-.25rem;left:-.25rem}.inset-0{top:0;right:0;bottom:0;left:0}.end-1{inset-inline-end:.25rem}.right-\\[10px\\]{right:10px}.start-0{inset-inline-start:0px}.top-0{top:0}.top-\\[12px\\]{top:12px}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.z-\\[80\\]{z-index:80}.float-right{float:right}.float-left{float:left}.float-none{float:none}.clear-left{clear:left}.clear-right{clear:right}.clear-both{clear:both}.clear-none{clear:none}.m-1{margin:.25rem}.m-3{margin:.75rem}.me-1{margin-inline-end:.25rem}.ml-1{margin-left:.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-none{overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.\\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\\!table{display:table!important}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.\\!grid{display:grid!important}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.h-1{height:.25rem}.h-40{height:10rem}.h-8{height:2rem}.h-80{height:20rem}.h-auto{height:auto}.h-full{height:100%}.min-h-\\[calc\\(100\\%-3\\.5rem\\)\\]{min-height:calc(100% - 3.5rem)}.w-1{width:.25rem}.w-\\[a-z0-9-\\]{width:a-z0-9-}.w-full{width:100%}.max-w-\\[24px\\]{max-width:24px}.max-w-xs{max-width:20rem}.flex-shrink,.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.caption-top{caption-side:top}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.\\!transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform,.transform-cpu{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}.cursor-pointer{cursor:pointer}.touch-auto{touch-action:auto}.touch-none{touch-action:none}.touch-pan-x{--tw-pan-x: pan-x;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-left{--tw-pan-x: pan-left;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-right{--tw-pan-x: pan-right;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-up{--tw-pan-y: pan-up;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-down{--tw-pan-y: pan-down;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pinch-zoom{--tw-pinch-zoom: pinch-zoom;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-manipulation{touch-action:manipulation}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize-none{resize:none}.resize-y{resize:vertical}.resize-x{resize:horizontal}.resize{resize:both}.snap-none{scroll-snap-type:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-both{scroll-snap-type:both var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.snap-proximity{--tw-scroll-snap-strictness: proximity}.snap-start{scroll-snap-align:start}.snap-end{scroll-snap-align:end}.snap-center{scroll-snap-align:center}.snap-align-none{scroll-snap-align:none}.snap-normal{scroll-snap-stop:normal}.snap-always{scroll-snap-stop:always}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.columns-1{-moz-columns:1;columns:1}.break-before-auto{-moz-column-break-before:auto;break-before:auto}.break-before-avoid{-moz-column-break-before:avoid;break-before:avoid}.break-before-all{-moz-column-break-before:all;break-before:all}.break-before-avoid-page{-moz-column-break-before:avoid;break-before:avoid-page}.break-before-page{-moz-column-break-before:page;break-before:page}.break-before-left{-moz-column-break-before:left;break-before:left}.break-before-right{-moz-column-break-before:right;break-before:right}.break-before-column{-moz-column-break-before:column;break-before:column}.break-inside-auto{-moz-column-break-inside:auto;break-inside:auto}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-inside-avoid-page{break-inside:avoid-page}.break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.break-after-auto{-moz-column-break-after:auto;break-after:auto}.break-after-avoid{-moz-column-break-after:avoid;break-after:avoid}.break-after-all{-moz-column-break-after:all;break-after:all}.break-after-avoid-page{-moz-column-break-after:avoid;break-after:avoid-page}.break-after-page{-moz-column-break-after:page;break-after:page}.break-after-left{-moz-column-break-after:left;break-after:left}.break-after-right{-moz-column-break-after:right;break-after:right}.break-after-column{-moz-column-break-after:column;break-after:column}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row-dense{grid-auto-flow:row dense}.grid-flow-col-dense{grid-auto-flow:column dense}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.flex-nowrap{flex-wrap:nowrap}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-content-end{place-content:end}.place-content-between{place-content:space-between}.place-content-around{place-content:space-around}.place-content-evenly{place-content:space-evenly}.place-content-baseline{place-content:baseline}.place-content-stretch{place-content:stretch}.place-items-start{place-items:start}.place-items-end{place-items:end}.place-items-center{place-items:center}.place-items-baseline{place-items:baseline}.place-items-stretch{place-items:stretch}.content-normal{align-content:normal}.content-center{align-content:center}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-evenly{align-content:space-evenly}.content-baseline{align-content:baseline}.content-stretch{align-content:stretch}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-normal{justify-content:normal}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-stretch{justify-content:stretch}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.divide-dashed>:not([hidden])~:not([hidden]){border-style:dashed}.divide-dotted>:not([hidden])~:not([hidden]){border-style:dotted}.divide-double>:not([hidden])~:not([hidden]){border-style:double}.divide-none>:not([hidden])~:not([hidden]){border-style:none}.place-self-auto{place-self:auto}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.place-self-stretch{place-self:stretch}.self-auto{align-self:auto}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.self-baseline{align-self:baseline}.justify-self-auto{justify-self:auto}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.justify-self-stretch{justify-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-x-clip{overflow-x:clip}.overflow-y-clip{overflow-y:clip}.overflow-x-visible{overflow-x:visible}.overflow-y-visible{overflow-y:visible}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.overscroll-auto{overscroll-behavior:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.overscroll-y-auto{overscroll-behavior-y:auto}.overscroll-y-contain{overscroll-behavior-y:contain}.overscroll-y-none{overscroll-behavior-y:none}.overscroll-x-auto{overscroll-behavior-x:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-x-none{overscroll-behavior-x:none}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.hyphens-none{-webkit-hyphens:none;hyphens:none}.hyphens-manual{-webkit-hyphens:manual;hyphens:manual}.hyphens-auto{-webkit-hyphens:auto;hyphens:auto}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.whitespace-break-spaces{white-space:break-spaces}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-e{border-inline-end-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-double{border-style:double}.border-hidden{border-style:hidden}.border-none{border-style:none}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-\\[rgb\\(255\\,0\\,0\\)\\]{--tw-bg-opacity: 1;background-color:rgb(255 0 0 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-content{background-clip:content-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-origin-border{background-origin:border-box}.bg-origin-padding{background-origin:padding-box}.bg-origin-content{background-origin:content-box}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.object-none{-o-object-fit:none;object-fit:none}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-14{padding:3.5rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-8{padding:2rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pe-1{padding-inline-end:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-top{vertical-align:text-top}.align-text-bottom{vertical-align:text-bottom}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.\\!ordinal{--tw-ordinal: ordinal !important;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero: slashed-zero;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure: lining-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure: oldstyle-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing: proportional-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction: diagonal-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction: stacked-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.text-\\[\\#336699\\]\\/\\[\\.35\\]{color:#33669959}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.bg-blend-normal{background-blend-mode:normal}.bg-blend-multiply{background-blend-mode:multiply}.bg-blend-screen{background-blend-mode:screen}.bg-blend-overlay{background-blend-mode:overlay}.bg-blend-darken{background-blend-mode:darken}.bg-blend-lighten{background-blend-mode:lighten}.bg-blend-color-dodge{background-blend-mode:color-dodge}.bg-blend-color-burn{background-blend-mode:color-burn}.bg-blend-hard-light{background-blend-mode:hard-light}.bg-blend-soft-light{background-blend-mode:soft-light}.bg-blend-difference{background-blend-mode:difference}.bg-blend-exclusion{background-blend-mode:exclusion}.bg-blend-hue{background-blend-mode:hue}.bg-blend-saturation{background-blend-mode:saturation}.bg-blend-color{background-blend-mode:color}.bg-blend-luminosity{background-blend-mode:luminosity}.mix-blend-normal{mix-blend-mode:normal}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-screen{mix-blend-mode:screen}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-darken{mix-blend-mode:darken}.mix-blend-lighten{mix-blend-mode:lighten}.mix-blend-color-dodge{mix-blend-mode:color-dodge}.mix-blend-color-burn{mix-blend-mode:color-burn}.mix-blend-hard-light{mix-blend-mode:hard-light}.mix-blend-soft-light{mix-blend-mode:soft-light}.mix-blend-difference{mix-blend-mode:difference}.mix-blend-exclusion{mix-blend-mode:exclusion}.mix-blend-hue{mix-blend-mode:hue}.mix-blend-saturation{mix-blend-mode:saturation}.mix-blend-color{mix-blend-mode:color}.mix-blend-luminosity{mix-blend-mode:luminosity}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-dashed{outline-style:dashed}.outline-dotted{outline-style:dotted}.outline-double{outline-style:double}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!invert{--tw-invert: invert(100%) !important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter-none{filter:none}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-grayscale{--tw-backdrop-grayscale: grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-invert{--tw-backdrop-invert: invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-sepia{--tw-backdrop-sepia: sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter-none{-webkit-backdrop-filter:none;backdrop-filter:none}.\\!transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.content-\\[\\'this-is-also-valid\\]-weirdly-enough\\'\\]{--tw-content: "this-is-also-valid]-weirdly-enough";content:var(--tw-content)}.\\[--placement\\:bottom\\]{--placement: bottom}.\\[--placement\\:top\\]{--placement: top}.\\[--trigger\\:click\\]{--trigger: click}.\\[-\\:\\=\\]{-: =}.\\[a-zA-Z0-9\\:\\\\\\\\-\\\\\\\\\\._\\$\\]{a-z-a--z0-9:\\\\-\\\\. $}.\\[a-zA-Z0-9\\:_-\\]{a-z-a--z0-9:-}.\\[a-zA-Z\\:_\\]{a-z-a--z:}.\\[a\\:a\\]{a:a}.\\[vite\\:css\\]{vite:css}.\\[vite\\:html\\]{vite:html}html{padding:1rem;font-family:sans-serif}ve-header ul,ve-menu ul{display:none}@media (min-width: 640px){.sm\\:container{width:100%}@media (min-width: 640px){.sm\\:container{max-width:640px}}@media (min-width: 768px){.sm\\:container{max-width:768px}}@media (min-width: 1024px){.sm\\:container{max-width:1024px}}@media (min-width: 1280px){.sm\\:container{max-width:1280px}}@media (min-width: 1536px){.sm\\:container{max-width:1536px}}}.hover\\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\\:font-bold:hover{font-weight:700}.before\\:hover\\:text-center:hover:before{content:var(--tw-content);text-align:center}.hover\\:before\\:text-center:hover:before{content:var(--tw-content);text-align:center}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\\:hover\\:text-center:hover:focus{text-align:center}.hover\\:focus\\:text-center:focus:hover{text-align:center}.hs-tooltip.show .hs-tooltip-shown\\:visible{visibility:visible}.hs-tooltip.show .hs-tooltip-shown\\:opacity-100{opacity:1}.open.hs-overlay-open\\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\\:opacity-100{opacity:1}.open.hs-overlay-open\\:duration-500{transition-duration:.5s}.open .hs-overlay-open\\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\\:opacity-100{opacity:1}.open .hs-overlay-open\\:duration-500{transition-duration:.5s}:is(.dark .dark\\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\\:shadow-slate-700\\/\\[\\.7\\]){--tw-shadow-color: rgb(51 65 85 / .7);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\\:focus\\:ring-offset-gray-800:focus){--tw-ring-offset-color: #1f2937}@media (min-width: 640px){.sm\\:mx-auto{margin-left:auto;margin-right:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:underline{text-decoration-line:underline}}@media (min-width: 768px){.md\\:p-5{padding:1.25rem}}@media (min-width: 1024px){:is(.dark .dark\\:lg\\:hover\\:\\[paint-order\\:markers\\]:hover){paint-order:markers}}*{box-sizing:border-box}.search-icon{color:#fff;font-size:28px}.search-icon:hover{cursor:pointer}.search{position:relative;display:flex;align-items:center;gap:10px}.search-btn,.search-form,.wrapper{display:none}.wrapper{flex-direction:column;position:absolute;right:-4px}.search-form{display:flex;align-items:center}.search-input{height:42px;width:250px;border-radius:6px;padding:3px 10px;font-size:1rem;color:#000}.search-submit{background-color:#fff;border-radius:6px;padding:8px 8px 4px;height:24px;z-index:4}.search-submit:hover{background-color:#ddd;cursor:pointer}.search-results{position:absolute;top:42px;left:0;width:326px;max-height:50vh;overflow-y:scroll;z-index:2;background-color:#fff;margin:0 0 0 2px;list-style:none;padding:6px;border-radius:6px;font-size:.9rem;box-shadow:0 6px 20px #00000030}.search-results li:nth-of-type(2n){background-color:#e6e6df}.search-results li{padding:6px;margin:3px;border:1px solid #E6E6DF}.search-results li h3,.search-results li p{margin:8px 0}.search-results li a{text-decoration:none;color:#444}.search-results li a h3{font-weight:700}.search-results li a p{font-weight:300}.search-results li:hover{cursor:pointer;box-shadow:0 4px 8px #0003}.search-btn:checked~.wrapper .search-form{display:flex;width:100%}.search-btn:checked~.wrapper{display:flex}.input-wrapper{display:inline-block;position:relative} + LIMIT <>`,_sfc_main$5=defineComponent({__name:"PlantSpecimen.ce",props:{eid:{type:String},qid:{type:String},jpid:{type:String},wdid:{type:String},taxonName:{type:String},caption:{type:String},max:{type:Number,default:1},full:{type:Boolean},left:{type:Boolean},right:{type:Boolean},sticky:{type:Boolean},width:{type:String},height:{type:Number}},setup(F){const W=F,q=ref(null),K=ref([]),X=ref([]),tt=computed(()=>X.value.map(po=>po.id||po["@id"]));watch$1(K,async()=>{var po;X.value=await Promise.all((((po=K.value)==null?void 0:po.length)===1?[K.value[0]]:K.value||[]).map(mo=>fetch(`${iiifService}/manifest/`,{method:"POST",headers:{"Content-type":"application/json"},body:JSON.stringify(uo(mo))}).then(wo=>wo.json())))});const rt=computed(()=>{var po;return W.caption||(((po=K.value)==null?void 0:po.length)>0?K.value[0].description:"")});onMounted(()=>ut());const ot={"@context":{jwd:"http://kg.jstor.org/entity/",jwdt:"http://kg.jstor.org/prop/direct/",jp:"http://kg.jstor.org/prop/",jps:"http://kg.jstor.org/prop/statement/",jpq:"http://kg.jstor.org/prop/qualifier/",rdfs:"http://www.w3.org/2000/01/rdf-schema#",schema:"http://schema.org/",wd:"http://www.wikidata.org/entity/",wdt:"http://www.wikidata.org/prop/direct/",xsd:"http://www.w3.org/2001/XMLSchema#",Specimen:"jwd:Q14316",id:"@id",collectionDate:{"@id":"jwdt:P1663","@type":"xsd:dateTime"},collector:{"@id":"jwdt:P1662","@container":"@set"},description:{"@id":"schema:description","@language":"en"},herbarium:{"@id":"jwdt:P1666","@type":"@id"},images:{"@id":"jp:P1467","@type":"@id","@container":"@set"},imgSize:{"@id":"jpq:P1669"},"instance of":{"@id":"jwdt:P17","@type":"@id"},jstorPlantsId:{"@id":"jwdt:P1106"},locationCollected:{"@id":"jwdt:P1665"},label:{"@id":"rdfs:label","@language":"en"},specimenOf:{"@id":"jwdt:P1660","@type":"@id"},specimenType:{"@id":"jwdt:P1661"},taxonName:{"@id":"jwdt:P501"},wofId:{"@id":"wdt:P6766"}}};async function ut(){let po=W.jpid?`jwdt:P1106 "${W.jpid}" ;`:W.eid||W.qid||W.wdid?`jwdt:P1660 ;`:`jwdt:P501 "${W.taxonName}" ;`,mo=sparql.replace(/<>/,po).replace(/<>/,`${W.max}`),wo=await yn(mo);wo["@graph"]?K.value=(await yn(mo))["@graph"]:(delete wo["@context"],K.value=[wo])}async function yn(po){let wo=await(await fetch(sparqlEndpoint,{method:"POST",body:new URLSearchParams({query:po}),headers:{Accept:"text/plain","Content-type":"application/x-www-form-urlencoded"}})).text(),lf=await jsonld.fromRDF(wo,{format:"application/n-quads"});return jsonld.frame(lf,{"@context":ot,"@type":"Specimen"})}function uo(po){if(!po.images)return{};let wo=po.images.find(yf=>yf.imgSize==="best").id.match(/rft_id=([^&]*)/)[1],lf={url:`${iiifService}/gp-proxy${wo}`};return po.taxonName&&(lf["Taxon name"]=po.taxonName),po.jstorPlantsId&&(lf["Global Plants ID"]=po.jstorPlantsId),po.description&&(lf.Description=po.description),po.description&&(lf.Label=po.description),po.specimenType&&(lf["Specimen type"]=po.specimenType),po.collector&&(lf.Collector=po.collector.join("; ")),po.locationCollected&&(lf["Location collected"]=po.locationCollected.label),po.collectionDate&&(lf["Date collected"]=po.collectionDate),po.herbarium&&(lf.Herbarium=po.herbarium.label),lf}return(po,mo)=>(openBlock(),createElementBlock("div",{class:"osd",id:"osd",ref_key:"root",ref:q},[createBaseVNode("ve-image",{height:F.height,caption:rt.value},[createBaseVNode("ul",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(tt.value,(wo,lf)=>(openBlock(),createElementBlock("li",{key:`specimen-${lf}`},"src="+toDisplayString(wo),1))),128))])],8,_hoisted_1$4)],512))}}),_hoisted_1$3=createBaseVNode("input",{class:"search-btn",type:"checkbox",id:"search-btn"},null,-1),_hoisted_2$3={class:"wrapper"},_hoisted_3$3={class:"search-form"},_hoisted_4$3={class:"input-wrapper relative"},_hoisted_5$2=createBaseVNode("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"},null,-1),_hoisted_6$1=[_hoisted_5$2],_hoisted_7$1={key:0,class:"search-results"},_hoisted_8=["href"],_hoisted_9$1=["innerHTML"],_hoisted_10$1=["innerHTML"],_hoisted_11$1={key:0},_hoisted_12$1=createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",fill:"#fff"},[createBaseVNode("path",{d:"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"})],-1),_hoisted_13$1=[_hoisted_12$1],searchEndpoint="https://www.googleapis.com/customsearch/v1",_sfc_main$4=defineComponent({__name:"SiteSearch.ce",props:{searchDomain:{type:String},searchKey:{type:String},searchCx:{type:String}},setup(F){const W=F,q=ref(cf(W.searchDomain||"",W.searchKey||"")),K=ref(null),X=computed(()=>{var vf;return(vf=K==null?void 0:K.value)==null?void 0:vf.parentNode}),tt=ref(),rt=ref(),ot=ref(""),ut=ref([]),yn=ref(0),uo=ref(!1);onMounted(()=>mo());function po(vf){vf.preventDefault(),uo.value=!0}function mo(){var vf,_f;tt.value=(vf=X.value)==null?void 0:vf.querySelector("#search-input"),tt.value.value="",rt.value=(_f=X.value)==null?void 0:_f.querySelector("#search-btn"),ut.value=[]}watch$1(uo,()=>{var vf;rt.value&&(rt.value.checked=uo.value),uo&&((vf=tt.value)==null||vf.focus())});function wo(){var Af;let vf=(Af=tt.value)==null?void 0:Af.value.replace(/ /,"%20"),_f={q:vf,start:vf===ot.value?ut.value.length+1:1,key:q.value,cx:W.searchCx},$f=Object.keys(_f).map(Cf=>`${Cf}=${_f[Cf]}`).join("&"),xf=`${searchEndpoint}?${$f}`;fetch(xf).then(Cf=>Cf.json()).then(Cf=>{yn.value=parseInt(Cf.searchInformation.totalResults);let Pf=Cf.items.map(Bf=>{var Df;let Hf=new URL(Bf.link);return Bf.link=`${location.origin}${((Df=window.config)==null?void 0:Df.baseurl)||""}${Hf.pathname}`,Bf});ut.value=vf!==ot.value?Pf:[...ut.value,...Pf],ot.value=vf||""})}function lf(vf){vf.key==="Enter"&&wo()}function yf(vf){vf.preventDefault(),vf.stopPropagation(),uo.value=!1,tt.value&&(tt.value.value=""),ot.value="",yn.value=0,ut.value=[]}function cf(vf,_f){const $f=Pf=>Pf.split("").map(Bf=>Bf.charCodeAt(0)),xf=Pf=>$f(vf).reduce((Bf,Hf)=>Bf^Hf,Pf);let Af=_f.match(/.{1,2}/g);return Af?Af.map(Pf=>parseInt(Pf,16)).map(xf).map(Pf=>String.fromCharCode(Pf)).join(""):""}return(vf,_f)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:K,class:"search"},[_hoisted_1$3,createBaseVNode("div",_hoisted_2$3,[createBaseVNode("div",_hoisted_3$3,[createBaseVNode("div",_hoisted_4$3,[createBaseVNode("input",{type:"text",id:"search-input",class:"search-input",onKeyup:lf,autocomplete:"off",role:"textbox",placeholder:"Search site"},null,32)]),(openBlock(),createElementBlock("svg",{onClick:yf,class:"absolute top-[12px] right-[10px] z-10 cursor-pointer",xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 384 512",fill:"#000"},_hoisted_6$1))]),ut.value.length>0?(openBlock(),createElementBlock("ul",_hoisted_7$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(ut.value,($f,xf)=>(openBlock(),createElementBlock("li",{key:`sr=${xf}`},[createBaseVNode("a",{href:$f.link},[createBaseVNode("h3",{innerHTML:$f.htmlTitle},null,8,_hoisted_9$1),createBaseVNode("p",{innerHTML:$f.htmlSnippet},null,8,_hoisted_10$1)],8,_hoisted_8)]))),128)),yn.value>ut.value.length?(openBlock(),createElementBlock("li",_hoisted_11$1,[createBaseVNode("div",{class:"more",onClick:wo},"More")])):createCommentVNode("",!0)])):createCommentVNode("",!0)]),createBaseVNode("label",{class:"search-icon",htmlFor:"search-btn"},[createBaseVNode("span",{onClick:po},_hoisted_13$1)])],512))}}),_style_0$4=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.\\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.\\!relative{position:relative!important}.relative{position:relative}.sticky{position:sticky}.-inset-1{top:-.25rem;right:-.25rem;bottom:-.25rem;left:-.25rem}.inset-0{top:0;right:0;bottom:0;left:0}.end-1{inset-inline-end:.25rem}.right-\\[10px\\]{right:10px}.start-0{inset-inline-start:0px}.top-0{top:0}.top-\\[12px\\]{top:12px}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.z-\\[80\\]{z-index:80}.float-right{float:right}.float-left{float:left}.float-none{float:none}.clear-left{clear:left}.clear-right{clear:right}.clear-both{clear:both}.clear-none{clear:none}.m-1{margin:.25rem}.m-3{margin:.75rem}.me-1{margin-inline-end:.25rem}.ml-1{margin-left:.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-none{overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.\\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\\!table{display:table!important}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.\\!grid{display:grid!important}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.h-1{height:.25rem}.h-40{height:10rem}.h-8{height:2rem}.h-80{height:20rem}.h-auto{height:auto}.h-full{height:100%}.min-h-\\[calc\\(100\\%-3\\.5rem\\)\\]{min-height:calc(100% - 3.5rem)}.w-1{width:.25rem}.w-\\[a-z0-9-\\]{width:a-z0-9-}.w-full{width:100%}.max-w-\\[24px\\]{max-width:24px}.max-w-xs{max-width:20rem}.flex-shrink,.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.caption-top{caption-side:top}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.\\!transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform,.transform-cpu{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}.cursor-pointer{cursor:pointer}.touch-auto{touch-action:auto}.touch-none{touch-action:none}.touch-pan-x{--tw-pan-x: pan-x;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-left{--tw-pan-x: pan-left;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-right{--tw-pan-x: pan-right;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-up{--tw-pan-y: pan-up;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-down{--tw-pan-y: pan-down;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pinch-zoom{--tw-pinch-zoom: pinch-zoom;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-manipulation{touch-action:manipulation}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize-none{resize:none}.resize-y{resize:vertical}.resize-x{resize:horizontal}.resize{resize:both}.snap-none{scroll-snap-type:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-both{scroll-snap-type:both var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.snap-proximity{--tw-scroll-snap-strictness: proximity}.snap-start{scroll-snap-align:start}.snap-end{scroll-snap-align:end}.snap-center{scroll-snap-align:center}.snap-align-none{scroll-snap-align:none}.snap-normal{scroll-snap-stop:normal}.snap-always{scroll-snap-stop:always}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.columns-1{-moz-columns:1;columns:1}.break-before-auto{-moz-column-break-before:auto;break-before:auto}.break-before-avoid{-moz-column-break-before:avoid;break-before:avoid}.break-before-all{-moz-column-break-before:all;break-before:all}.break-before-avoid-page{-moz-column-break-before:avoid;break-before:avoid-page}.break-before-page{-moz-column-break-before:page;break-before:page}.break-before-left{-moz-column-break-before:left;break-before:left}.break-before-right{-moz-column-break-before:right;break-before:right}.break-before-column{-moz-column-break-before:column;break-before:column}.break-inside-auto{-moz-column-break-inside:auto;break-inside:auto}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-inside-avoid-page{break-inside:avoid-page}.break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.break-after-auto{-moz-column-break-after:auto;break-after:auto}.break-after-avoid{-moz-column-break-after:avoid;break-after:avoid}.break-after-all{-moz-column-break-after:all;break-after:all}.break-after-avoid-page{-moz-column-break-after:avoid;break-after:avoid-page}.break-after-page{-moz-column-break-after:page;break-after:page}.break-after-left{-moz-column-break-after:left;break-after:left}.break-after-right{-moz-column-break-after:right;break-after:right}.break-after-column{-moz-column-break-after:column;break-after:column}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row-dense{grid-auto-flow:row dense}.grid-flow-col-dense{grid-auto-flow:column dense}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.flex-nowrap{flex-wrap:nowrap}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-content-end{place-content:end}.place-content-between{place-content:space-between}.place-content-around{place-content:space-around}.place-content-evenly{place-content:space-evenly}.place-content-baseline{place-content:baseline}.place-content-stretch{place-content:stretch}.place-items-start{place-items:start}.place-items-end{place-items:end}.place-items-center{place-items:center}.place-items-baseline{place-items:baseline}.place-items-stretch{place-items:stretch}.content-normal{align-content:normal}.content-center{align-content:center}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-evenly{align-content:space-evenly}.content-baseline{align-content:baseline}.content-stretch{align-content:stretch}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-normal{justify-content:normal}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-stretch{justify-content:stretch}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.divide-dashed>:not([hidden])~:not([hidden]){border-style:dashed}.divide-dotted>:not([hidden])~:not([hidden]){border-style:dotted}.divide-double>:not([hidden])~:not([hidden]){border-style:double}.divide-none>:not([hidden])~:not([hidden]){border-style:none}.place-self-auto{place-self:auto}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.place-self-stretch{place-self:stretch}.self-auto{align-self:auto}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.self-baseline{align-self:baseline}.justify-self-auto{justify-self:auto}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.justify-self-stretch{justify-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-x-clip{overflow-x:clip}.overflow-y-clip{overflow-y:clip}.overflow-x-visible{overflow-x:visible}.overflow-y-visible{overflow-y:visible}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.overscroll-auto{overscroll-behavior:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.overscroll-y-auto{overscroll-behavior-y:auto}.overscroll-y-contain{overscroll-behavior-y:contain}.overscroll-y-none{overscroll-behavior-y:none}.overscroll-x-auto{overscroll-behavior-x:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-x-none{overscroll-behavior-x:none}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.hyphens-none{-webkit-hyphens:none;hyphens:none}.hyphens-manual{-webkit-hyphens:manual;hyphens:manual}.hyphens-auto{-webkit-hyphens:auto;hyphens:auto}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.whitespace-break-spaces{white-space:break-spaces}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-e{border-inline-end-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-double{border-style:double}.border-hidden{border-style:hidden}.border-none{border-style:none}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-\\[rgb\\(255\\,0\\,0\\)\\]{--tw-bg-opacity: 1;background-color:rgb(255 0 0 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-content{background-clip:content-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-origin-border{background-origin:border-box}.bg-origin-padding{background-origin:padding-box}.bg-origin-content{background-origin:content-box}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.object-none{-o-object-fit:none;object-fit:none}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-14{padding:3.5rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-8{padding:2rem}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pe-1{padding-inline-end:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-top{vertical-align:text-top}.align-text-bottom{vertical-align:text-bottom}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.\\!ordinal{--tw-ordinal: ordinal !important;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)!important}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero: slashed-zero;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure: lining-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure: oldstyle-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing: proportional-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction: diagonal-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction: stacked-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.text-\\[\\#336699\\]\\/\\[\\.35\\]{color:#33669959}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.bg-blend-normal{background-blend-mode:normal}.bg-blend-multiply{background-blend-mode:multiply}.bg-blend-screen{background-blend-mode:screen}.bg-blend-overlay{background-blend-mode:overlay}.bg-blend-darken{background-blend-mode:darken}.bg-blend-lighten{background-blend-mode:lighten}.bg-blend-color-dodge{background-blend-mode:color-dodge}.bg-blend-color-burn{background-blend-mode:color-burn}.bg-blend-hard-light{background-blend-mode:hard-light}.bg-blend-soft-light{background-blend-mode:soft-light}.bg-blend-difference{background-blend-mode:difference}.bg-blend-exclusion{background-blend-mode:exclusion}.bg-blend-hue{background-blend-mode:hue}.bg-blend-saturation{background-blend-mode:saturation}.bg-blend-color{background-blend-mode:color}.bg-blend-luminosity{background-blend-mode:luminosity}.mix-blend-normal{mix-blend-mode:normal}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-screen{mix-blend-mode:screen}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-darken{mix-blend-mode:darken}.mix-blend-lighten{mix-blend-mode:lighten}.mix-blend-color-dodge{mix-blend-mode:color-dodge}.mix-blend-color-burn{mix-blend-mode:color-burn}.mix-blend-hard-light{mix-blend-mode:hard-light}.mix-blend-soft-light{mix-blend-mode:soft-light}.mix-blend-difference{mix-blend-mode:difference}.mix-blend-exclusion{mix-blend-mode:exclusion}.mix-blend-hue{mix-blend-mode:hue}.mix-blend-saturation{mix-blend-mode:saturation}.mix-blend-color{mix-blend-mode:color}.mix-blend-luminosity{mix-blend-mode:luminosity}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-dashed{outline-style:dashed}.outline-dotted{outline-style:dotted}.outline-double{outline-style:double}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!invert{--tw-invert: invert(100%) !important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter-none{filter:none}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-grayscale{--tw-backdrop-grayscale: grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-invert{--tw-backdrop-invert: invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-sepia{--tw-backdrop-sepia: sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter-none{-webkit-backdrop-filter:none;backdrop-filter:none}.\\!transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.content-\\[\\'this-is-also-valid\\]-weirdly-enough\\'\\]{--tw-content: "this-is-also-valid]-weirdly-enough";content:var(--tw-content)}.\\[--placement\\:bottom\\]{--placement: bottom}.\\[--placement\\:top\\]{--placement: top}.\\[--trigger\\:click\\]{--trigger: click}.\\[-\\:\\=\\]{-: =}.\\[a-zA-Z0-9\\:\\\\\\\\-\\\\\\\\\\._\\$\\]{a-z-a--z0-9:\\\\-\\\\. $}.\\[a-zA-Z0-9\\:_-\\]{a-z-a--z0-9:-}.\\[a-zA-Z\\:_\\]{a-z-a--z:}.\\[a\\:a\\]{a:a}.\\[vite\\:css\\]{vite:css}.\\[vite\\:html\\]{vite:html}html{padding:1rem;font-family:sans-serif}ve-header ul,ve-menu ul{display:none}@media (min-width: 640px){.sm\\:container{width:100%}@media (min-width: 640px){.sm\\:container{max-width:640px}}@media (min-width: 768px){.sm\\:container{max-width:768px}}@media (min-width: 1024px){.sm\\:container{max-width:1024px}}@media (min-width: 1280px){.sm\\:container{max-width:1280px}}@media (min-width: 1536px){.sm\\:container{max-width:1536px}}}.hover\\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\\:font-bold:hover{font-weight:700}.before\\:hover\\:text-center:hover:before{content:var(--tw-content);text-align:center}.hover\\:before\\:text-center:hover:before{content:var(--tw-content);text-align:center}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\\:hover\\:text-center:hover:focus{text-align:center}.hover\\:focus\\:text-center:focus:hover{text-align:center}.hs-tooltip.show .hs-tooltip-shown\\:visible{visibility:visible}.hs-tooltip.show .hs-tooltip-shown\\:opacity-100{opacity:1}.open.hs-overlay-open\\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\\:opacity-100{opacity:1}.open.hs-overlay-open\\:duration-500{transition-duration:.5s}.open .hs-overlay-open\\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\\:opacity-100{opacity:1}.open .hs-overlay-open\\:duration-500{transition-duration:.5s}:is(.dark .dark\\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\\:shadow-slate-700\\/\\[\\.7\\]){--tw-shadow-color: rgb(51 65 85 / .7);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\\:focus\\:ring-offset-gray-800:focus){--tw-ring-offset-color: #1f2937}@media (min-width: 640px){.sm\\:mx-auto{margin-left:auto;margin-right:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:underline{text-decoration-line:underline}}@media (min-width: 768px){.md\\:p-5{padding:1.25rem}}@media (min-width: 1024px){:is(.dark .dark\\:lg\\:hover\\:\\[paint-order\\:markers\\]:hover){paint-order:markers}}*{box-sizing:border-box}.search-icon{color:#fff;font-size:28px}.search-icon:hover{cursor:pointer}.search{position:relative;display:flex;align-items:center;gap:10px}.search-btn,.search-form,.wrapper{display:none}.wrapper{flex-direction:column;position:absolute;right:-4px}.search-form{display:flex;align-items:center}.search-input{height:42px;width:250px;border-radius:6px;padding:3px 10px;font-size:1rem;color:#000}.search-submit{background-color:#fff;border-radius:6px;padding:8px 8px 4px;height:24px;z-index:4}.search-submit:hover{background-color:#ddd;cursor:pointer}.search-results{position:absolute;top:42px;left:0;width:326px;max-height:50vh;overflow-y:scroll;z-index:2;background-color:#fff;margin:0 0 0 2px;list-style:none;padding:6px;border-radius:6px;font-size:.9rem;box-shadow:0 6px 20px #00000030}.search-results li:nth-of-type(2n){background-color:#e6e6df}.search-results li{padding:6px;margin:3px;border:1px solid #E6E6DF}.search-results li h3,.search-results li p{margin:8px 0}.search-results li a{text-decoration:none;color:#444}.search-results li a h3{font-weight:700}.search-results li a p{font-weight:300}.search-results li:hover{cursor:pointer;box-shadow:0 4px 8px #0003}.search-btn:checked~.wrapper .search-form{display:flex;width:100%}.search-btn:checked~.wrapper{display:flex}.input-wrapper{display:inline-block;position:relative} `,SiteSearch=_export_sfc(_sfc_main$4,[["styles",[_style_0$4]]]);var dist$1={exports:{}};(function(F,W){(function(q,K){F.exports?F.exports=K():q.returnExports=K()})(typeof self<"u"?self:commonjsGlobal$3,function(){var q=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"?"node":"browser";function K(ot,ut){var yn,uo,po,mo,wo,lf;ut=ut||{},uo=ut.indent_size||4,po=ut.indent_char||" ",wo=ut.brace_style||"collapse",mo=ut.max_char==0?1/0:ut.max_char||70,lf=ut.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"];function yf(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.Utils={whitespace:` \r `.split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(Lf,kf){for(var Nf=0;Nf=this.input.length)return kf.length?kf.join(""):["","TK_EOF"];if(Lf=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(Lf,this.Utils.whitespace)){kf.length&&(Nf=!0),this.line_char_count--;continue}else if(Nf){if(this.line_char_count>=this.max_char){kf.push(` `);for(var Yf=0;Yf","igm");Nf.lastIndex=this.pos;var Yf=Nf.exec(this.input),Gf=Yf?Yf.index:this.input.length;return this.pos=this.input.length)return kf.length?kf.join(""):["","TK_EOF"];if(Lf=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(Lf,this.Utils.whitespace)){Nf=!0,this.line_char_count--;continue}(Lf==="'"||Lf==='"')&&(!kf[1]||kf[1]!=="!")&&(Lf+=this.get_unformatted(Lf),Nf=!0),Lf==="="&&(Nf=!1),kf.length&&kf[kf.length-1]!=="="&&Lf!==">"&&Nf&&(this.line_char_count>=this.max_char?(this.print_newline(!1,kf),this.line_char_count=0):(kf.push(" "),this.line_char_count++),Nf=!1),Lf==="<"&&(Yf=this.pos-1),kf.push(Lf)}while(Lf!==">");var rp=kf.join(""),ip;rp.indexOf(" ")!=-1?ip=rp.indexOf(" "):ip=rp.indexOf(">");var ap=rp.substring(1,ip).toLowerCase();if(rp.charAt(rp.length-2)==="/"||this.Utils.in_array(ap,this.Utils.single_token))this.tag_type="SINGLE";else if(ap==="script")this.record_tag(ap),this.tag_type="SCRIPT";else if(ap==="style")this.record_tag(ap),this.tag_type="STYLE";else if(this.Utils.in_array(ap,lf)){var yp=this.get_unformatted("",rp);kf.push(yp),Yf>0&&this.Utils.in_array(this.input.charAt(Yf-1),this.Utils.whitespace)&&kf.splice(0,0,this.input.charAt(Yf-1)),Gf=this.pos-1,this.Utils.in_array(this.input.charAt(Gf+1),this.Utils.whitespace)&&kf.push(this.input.charAt(Gf+1)),this.tag_type="SINGLE"}else if(ap.charAt(0)==="!")if(ap.indexOf("[if")!=-1){if(rp.indexOf("!IE")!=-1){var yp=this.get_unformatted("-->",rp);kf.push(yp)}this.tag_type="START"}else if(ap.indexOf("[endif")!=-1)this.tag_type="END",this.unindent();else if(ap.indexOf("[cdata[")!=-1){var yp=this.get_unformatted("]]>",rp);kf.push(yp),this.tag_type="SINGLE"}else{var yp=this.get_unformatted("-->",rp);kf.push(yp),this.tag_type="SINGLE"}else ap.charAt(0)==="/"?(this.retrieve_tag(ap.substring(1)),this.tag_type="END"):(this.record_tag(ap),this.tag_type="START"),this.Utils.in_array(ap,this.Utils.extra_liners)&&this.print_newline(!0,this.output);return kf.join("")},this.get_unformatted=function(Lf,kf){if(kf&&kf.indexOf(Lf)!=-1)return"";var Nf="",Yf="",Gf=!0;do{if(this.pos>=this.input.length)return Yf;if(Nf=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(Nf,this.Utils.whitespace)){if(!Gf){this.line_char_count--;continue}if(Nf===` `||Nf==="\r"){Yf+=` `,this.line_char_count=0;continue}}Yf+=Nf,this.line_char_count++,Gf=!0}while(Yf.indexOf(Lf)==-1);return Yf},this.get_token=function(){var Lf;if(this.last_token==="TK_TAG_SCRIPT"||this.last_token==="TK_TAG_STYLE"){var kf=this.last_token.substr(7);return Lf=this.get_contents_to(kf),typeof Lf!="string"?Lf:[Lf,"TK_"+kf]}if(this.current_mode==="CONTENT")return Lf=this.get_content(),typeof Lf!="string"?Lf:[Lf,"TK_CONTENT"];if(this.current_mode==="TAG"){if(Lf=this.get_tag(),typeof Lf!="string")return Lf;var Nf="TK_TAG_"+this.tag_type;return[Lf,Nf]}},this.get_full_indent=function(Lf){return Lf=this.indent_level+Lf||0,Lf<1?"":Array(Lf+1).join(this.indent_string)},this.printer=function(Lf,kf,Nf,Yf,Gf){this.input=Lf||"",this.output=[],this.indent_character=kf,this.indent_string="",this.indent_size=Nf,this.brace_style=Gf,this.indent_level=0,this.max_char=Yf,this.line_char_count=0;for(var rp=0;rp0&&this.indent_level--}},this}for(yn=new yf,yn.printer(ot,po,uo,mo,wo);;){var cf=yn.get_token();if(yn.token_text=cf[0],yn.token_type=cf[1],yn.token_type==="TK_EOF")break;switch(yn.token_type){case"TK_TAG_START":yn.print_newline(!1,yn.output),yn.print_token(yn.token_text),yn.indent(),yn.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":yn.print_newline(!1,yn.output),yn.print_token(yn.token_text),yn.current_mode="CONTENT";break;case"TK_TAG_END":if(yn.last_token==="TK_CONTENT"&&yn.last_text===""){var vf=yn.token_text.match(/\w+/)[0],_f=yn.output[yn.output.length-1].match(/<\s*(\w+)/);(_f===null||_f[1]!==vf)&&yn.print_newline(!0,yn.output)}yn.print_token(yn.token_text),yn.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var $f=yn.token_text.match(/^\s*<([a-z]+)/i);(!$f||!yn.Utils.in_array($f[1],lf))&&yn.print_newline(!1,yn.output),yn.print_token(yn.token_text),yn.current_mode="CONTENT";break;case"TK_CONTENT":yn.token_text!==""&&yn.print_token(yn.token_text),yn.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(yn.token_text!==""){yn.output.push(` -`);var wf=yn.token_text;if(yn.token_type=="TK_SCRIPT")var Pf=typeof tt=="function"&&tt;else if(yn.token_type=="TK_STYLE")var Pf=typeof X=="function"&&X;if(ut.indent_scripts=="keep")var Cf=0;else if(ut.indent_scripts=="separate")var Cf=-yn.indent_level;else var Cf=1;var Af=yn.get_full_indent(Cf);if(Pf)wf=Pf(wf.replace(/^\s*/,Af),ut);else{var Bf=wf.match(/^\s*/)[0],Hf=Bf.match(/[^\n\r]*$/)[0].split(yn.indent_string).length-1,Df=yn.get_full_indent(Cf-Hf);wf=wf.replace(/^\s*/,Af).replace(/\r\n|\r|\n/g,` -`+Df).replace(/\s*$/,"")}wf&&(yn.print_token(wf),yn.print_newline(!0,yn.output))}yn.current_mode="TAG";break}yn.last_token=yn.token_type,yn.last_text=yn.token_text}return yn.output.join("")}function X(ot,ut){ut=ut||{};var yn=ut.indent_size||4,uo=ut.indent_char||" ";typeof yn=="string"&&(yn=parseInt(yn));var po=/^\s+$/,mo=-1,wo;function lf(){return wo=ot.charAt(++mo)}function yf(){return ot.charAt(mo+1)}function cf(Nf){for(var Yf=mo;lf();)if(wo=="\\")lf(),lf();else{if(wo==Nf)break;if(wo==` -`)break}return ot.substring(Yf,mo+1)}function vf(){for(var Nf=mo;po.test(yf());)mo++;return mo!=Nf}function _f(){var Nf=mo;do;while(po.test(lf()));return mo!=Nf+1}function $f(){var Nf=mo;for(lf();lf();)if(wo=="*"&&yf()=="/"){mo++;break}return ot.substring(Nf,mo+1)}function wf(Nf,Yf){return Df.slice(-Nf.length+(Yf||0),Yf).join("").toLowerCase()==Nf}var Pf=ot.match(/^[\r\n]*[\t ]*/)[0],Cf=Array(yn+1).join(uo);function Af(){Pf+=Cf}function Bf(){Pf=Pf.slice(0,-yn)}var Hf={};Hf["{"]=function(Nf){Hf.singleSpace(),Df.push(Nf),Hf.newLine()},Hf["}"]=function(Nf){Hf.newLine(),Df.push(Nf),Hf.newLine()},Hf.newLine=function(Nf){if(!Nf)for(;po.test(Df[Df.length-1]);)Df.pop();Df.length&&Df.push(` -`),Pf&&Df.push(Pf)},Hf.singleSpace=function(){Df.length&&!po.test(Df[Df.length-1])&&Df.push(" ")};var Df=[];for(Pf&&Df.push(Pf);;){var Lf=_f();if(!wo)break;wo=="{"?(Af(),Hf["{"](wo)):wo=="}"?(Bf(),Hf["}"](wo)):wo=='"'||wo=="'"?Df.push(cf(wo)):wo==";"?Df.push(wo,` -`,Pf):wo=="/"&&yf()=="*"?(Hf.newLine(),Df.push($f(),` -`,Pf)):wo=="("?wf("url",-1)?(Df.push(wo),vf(),lf()&&(wo!=")"&&wo!='"'&&wo!="'"?Df.push(cf(")")):mo--)):(Lf&&Hf.singleSpace(),Df.push(wo),vf()):wo==")"?Df.push(wo):wo==","?(vf(),Df.push(wo),Hf.singleSpace()):wo=="]"?Df.push(wo):wo=="["||wo=="="?(vf(),Df.push(wo)):(Lf&&Hf.singleSpace(),Df.push(wo))}var kf=Df.join("").replace(/[\n ]+$/,"");return kf}W.css_beautify=X;function tt(ot,ut){var yn,uo,po,mo,wo,lf,yf,cf,vf,_f,$f,wf,Pf,Cf,Af,Bf,Hf,Df,Lf,kf,Nf,Yf,Gf="";ut=ut||{};var rp;ut.space_after_anon_function!==void 0&&ut.jslint_happy===void 0&&(ut.jslint_happy=ut.space_after_anon_function),ut.braces_on_own_line!==void 0&&(rp=ut.braces_on_own_line?"expand":"collapse"),rp=ut.brace_style?ut.brace_style:rp||"collapse";var ip=ut.indent_size?ut.indent_size:4,ap=ut.indent_char?ut.indent_char:" ",yp=typeof ut.preserve_newlines>"u"?!0:ut.preserve_newlines,vp=typeof ut.break_chained_methods>"u"?!1:ut.break_chained_methods,Np=typeof ut.max_preserve_newlines>"u"?!1:ut.max_preserve_newlines,jp=ut.jslint_happy==="undefined"?!1:ut.jslint_happy,Ip=typeof ut.keep_array_indentation>"u"?!1:ut.keep_array_indentation,Jp=typeof ut.space_before_conditional>"u"?!0:ut.space_before_conditional,ng=typeof ut.unescape_strings>"u"?!1:ut.unescape_strings;Nf=!1;var og=ot.length;function vg(Op){for(Op=typeof Op>"u"?!1:Op;uo.length&&(uo[uo.length-1]===" "||uo[uo.length-1]===_f||uo[uo.length-1]===Gf||Op&&(uo[uo.length-1]===` +`);var xf=yn.token_text;if(yn.token_type=="TK_SCRIPT")var Af=typeof tt=="function"&&tt;else if(yn.token_type=="TK_STYLE")var Af=typeof X=="function"&&X;if(ut.indent_scripts=="keep")var Cf=0;else if(ut.indent_scripts=="separate")var Cf=-yn.indent_level;else var Cf=1;var Pf=yn.get_full_indent(Cf);if(Af)xf=Af(xf.replace(/^\s*/,Pf),ut);else{var Bf=xf.match(/^\s*/)[0],Hf=Bf.match(/[^\n\r]*$/)[0].split(yn.indent_string).length-1,Df=yn.get_full_indent(Cf-Hf);xf=xf.replace(/^\s*/,Pf).replace(/\r\n|\r|\n/g,` +`+Df).replace(/\s*$/,"")}xf&&(yn.print_token(xf),yn.print_newline(!0,yn.output))}yn.current_mode="TAG";break}yn.last_token=yn.token_type,yn.last_text=yn.token_text}return yn.output.join("")}function X(ot,ut){ut=ut||{};var yn=ut.indent_size||4,uo=ut.indent_char||" ";typeof yn=="string"&&(yn=parseInt(yn));var po=/^\s+$/,mo=-1,wo;function lf(){return wo=ot.charAt(++mo)}function yf(){return ot.charAt(mo+1)}function cf(Nf){for(var Yf=mo;lf();)if(wo=="\\")lf(),lf();else{if(wo==Nf)break;if(wo==` +`)break}return ot.substring(Yf,mo+1)}function vf(){for(var Nf=mo;po.test(yf());)mo++;return mo!=Nf}function _f(){var Nf=mo;do;while(po.test(lf()));return mo!=Nf+1}function $f(){var Nf=mo;for(lf();lf();)if(wo=="*"&&yf()=="/"){mo++;break}return ot.substring(Nf,mo+1)}function xf(Nf,Yf){return Df.slice(-Nf.length+(Yf||0),Yf).join("").toLowerCase()==Nf}var Af=ot.match(/^[\r\n]*[\t ]*/)[0],Cf=Array(yn+1).join(uo);function Pf(){Af+=Cf}function Bf(){Af=Af.slice(0,-yn)}var Hf={};Hf["{"]=function(Nf){Hf.singleSpace(),Df.push(Nf),Hf.newLine()},Hf["}"]=function(Nf){Hf.newLine(),Df.push(Nf),Hf.newLine()},Hf.newLine=function(Nf){if(!Nf)for(;po.test(Df[Df.length-1]);)Df.pop();Df.length&&Df.push(` +`),Af&&Df.push(Af)},Hf.singleSpace=function(){Df.length&&!po.test(Df[Df.length-1])&&Df.push(" ")};var Df=[];for(Af&&Df.push(Af);;){var Lf=_f();if(!wo)break;wo=="{"?(Pf(),Hf["{"](wo)):wo=="}"?(Bf(),Hf["}"](wo)):wo=='"'||wo=="'"?Df.push(cf(wo)):wo==";"?Df.push(wo,` +`,Af):wo=="/"&&yf()=="*"?(Hf.newLine(),Df.push($f(),` +`,Af)):wo=="("?xf("url",-1)?(Df.push(wo),vf(),lf()&&(wo!=")"&&wo!='"'&&wo!="'"?Df.push(cf(")")):mo--)):(Lf&&Hf.singleSpace(),Df.push(wo),vf()):wo==")"?Df.push(wo):wo==","?(vf(),Df.push(wo),Hf.singleSpace()):wo=="]"?Df.push(wo):wo=="["||wo=="="?(vf(),Df.push(wo)):(Lf&&Hf.singleSpace(),Df.push(wo))}var kf=Df.join("").replace(/[\n ]+$/,"");return kf}W.css_beautify=X;function tt(ot,ut){var yn,uo,po,mo,wo,lf,yf,cf,vf,_f,$f,xf,Af,Cf,Pf,Bf,Hf,Df,Lf,kf,Nf,Yf,Gf="";ut=ut||{};var rp;ut.space_after_anon_function!==void 0&&ut.jslint_happy===void 0&&(ut.jslint_happy=ut.space_after_anon_function),ut.braces_on_own_line!==void 0&&(rp=ut.braces_on_own_line?"expand":"collapse"),rp=ut.brace_style?ut.brace_style:rp||"collapse";var ip=ut.indent_size?ut.indent_size:4,ap=ut.indent_char?ut.indent_char:" ",yp=typeof ut.preserve_newlines>"u"?!0:ut.preserve_newlines,vp=typeof ut.break_chained_methods>"u"?!1:ut.break_chained_methods,Np=typeof ut.max_preserve_newlines>"u"?!1:ut.max_preserve_newlines,jp=ut.jslint_happy==="undefined"?!1:ut.jslint_happy,Ip=typeof ut.keep_array_indentation>"u"?!1:ut.keep_array_indentation,Jp=typeof ut.space_before_conditional>"u"?!0:ut.space_before_conditional,ng=typeof ut.unescape_strings>"u"?!1:ut.unescape_strings;Nf=!1;var og=ot.length;function vg(Op){for(Op=typeof Op>"u"?!1:Op;uo.length&&(uo[uo.length-1]===" "||uo[uo.length-1]===_f||uo[uo.length-1]===Gf||Op&&(uo[uo.length-1]===` `||uo[uo.length-1]==="\r"));)uo.pop()}function Dp(Op){return Op.replace(/^\s\s*|\s\s*$/,"")}function Lp(Op){Op=Op.replace(/\x0d/g,"");for(var Kp=[],Kf=Op.indexOf(` `);Kf!==-1;)Kp.push(Op.substring(0,Kf)),Op=Op.substring(Kf+1),Kf=Op.indexOf(` `);return Op.length&&Kp.push(Op),Kp}function xp(){var Op=Ip;Ip=!1,kp(),Ip=Op}function kp(Op,Kp){if(cf.eat_next_space=!1,!(Ip&&$p(cf.mode))&&(Op=typeof Op>"u"?!0:Op,Kp=typeof Kp>"u"?!0:Kp,Kp&&(cf.if_line=!1,cf.chain_extra_indentation=0),vg(),!!uo.length)){(uo[uo.length-1]!==` @@ -3931,13 +3931,13 @@ if("@preserve"in F)return F["@preserve"][0];if(graphTypes.isValue(F))return F;if `&&Op!==_f&&uo.push(" ")}function Of(){Nf=!1,cf.eat_next_space=!1,uo.push(po)}function qf(){cf.indentation_level+=1}function cp(){uo.length&&uo[uo.length-1]===_f&&uo.pop()}function hp(Op){cf&&vf.push(cf),cf={previous_mode:cf?cf.mode:"BLOCK",mode:Op,var_line:!1,var_line_tainted:!1,var_line_reindented:!1,in_html_comment:!1,if_line:!1,chain_extra_indentation:0,in_case_statement:!1,in_case:!1,case_body:!1,eat_next_space:!1,indentation_level:cf?cf.indentation_level+(cf.var_line&&cf.var_line_reindented?1:0):0,ternary_depth:0}}function $p(Op){return Op==="[EXPRESSION]"||Op==="[INDENTED-EXPRESSION]"}function Vp(Op){return Mp(Op,["[EXPRESSION]","(EXPRESSION)","(FOR-EXPRESSION)","(COND-EXPRESSION)"])}function bp(){if(Lf=cf.mode==="DO_BLOCK",vf.length>0){var Op=cf.mode;cf=vf.pop(),cf.previous_mode=Op}}function Ep(Op,Kp){for(var Kf=0;Kf=og)return 0;Kf=yn.charAt(Kp)}return Kf}function ug(){var Op,Kp;if(Yf=0,Cf>=og)return["","TK_EOF"];kf=!1;var Kf=yn.charAt(Cf);Cf+=1;var Xf=Ip&&$p(cf.mode);if(Xf){for(var gp=0;Mp(Kf,$f);){if(Kf===` `?(vg(),uo.push(` `),Nf=!0,gp=0):Kf===" "?gp+=4:Kf==="\r"||(gp+=1),Cf>=og)return["","TK_EOF"];Kf=yn.charAt(Cf),Cf+=1}if(Nf)for(Op=0;Op=og)return["","TK_EOF"];Kf=yn.charAt(Cf),Cf+=1}if(yp&&Yf>1)for(Op=0;Op0}if(Mp(Kf,wf)){if(Cf=og)return["","TK_EOF"];Kf=yn.charAt(Cf),Cf+=1}if(yp&&Yf>1)for(Op=0;Op0}if(Mp(Kf,xf)){if(Cf=og)););return Cf+=2,pg&&Yf===0?["/*"+mg+"*/","TK_INLINE_COMMENT"]:["/*"+mg+"*/","TK_BLOCK_COMMENT"]}if(yn.charAt(Cf)==="/"){for(mg=Kf;yn.charAt(Cf)!=="\r"&&yn.charAt(Cf)!==` -`&&(mg+=yn.charAt(Cf),Cf+=1,!(Cf>=og)););return kf&&kp(),[mg,"TK_COMMENT"]}}if(Kf==="'"||Kf==='"'||Kf==="/"&&(mo==="TK_WORD"&&_p(wo)||wo===")"&&Mp(cf.previous_mode,["(COND-EXPRESSION)","(FOR-EXPRESSION)"])||mo==="TK_COMMA"||mo==="TK_COMMENT"||mo==="TK_START_EXPR"||mo==="TK_START_BLOCK"||mo==="TK_END_BLOCK"||mo==="TK_OPERATOR"||mo==="TK_EQUALS"||mo==="TK_EOF"||mo==="TK_SEMICOLON")){var wg=Kf,Cg=!1,Bg=0,Xg=0;if(Kp=Kf,Cf=og)return[Kp,"TK_STRING"]}else for(;Cg||yn.charAt(Cf)!==wg;)if(Kp+=yn.charAt(Cf),Bg&&Bg>=Xg&&(Bg=parseInt(Kp.substr(-Xg),16),Bg&&Bg>=32&&Bg<=126&&(Bg=String.fromCharCode(Bg),Kp=Kp.substr(0,Kp.length-Xg-2)+(Bg===wg||Bg==="\\"?"\\":"")+Bg),Bg=0),Bg?Bg++:Cg?(Cg=!1,ng&&(yn.charAt(Cf)==="x"?(Bg++,Xg=2):yn.charAt(Cf)==="u"&&(Bg++,Xg=4))):Cg=yn.charAt(Cf)==="\\",Cf+=1,Cf>=og)return[Kp,"TK_STRING"]}if(Cf+=1,Kp+=wg,wg==="/")for(;Cf=og)););return kf&&kp(),[mg,"TK_COMMENT"]}}if(Kf==="'"||Kf==='"'||Kf==="/"&&(mo==="TK_WORD"&&_p(wo)||wo===")"&&Mp(cf.previous_mode,["(COND-EXPRESSION)","(FOR-EXPRESSION)"])||mo==="TK_COMMA"||mo==="TK_COMMENT"||mo==="TK_START_EXPR"||mo==="TK_START_BLOCK"||mo==="TK_END_BLOCK"||mo==="TK_OPERATOR"||mo==="TK_EQUALS"||mo==="TK_EOF"||mo==="TK_SEMICOLON")){var wg=Kf,Cg=!1,Bg=0,Xg=0;if(Kp=Kf,Cf=og)return[Kp,"TK_STRING"]}else for(;Cg||yn.charAt(Cf)!==wg;)if(Kp+=yn.charAt(Cf),Bg&&Bg>=Xg&&(Bg=parseInt(Kp.substr(-Xg),16),Bg&&Bg>=32&&Bg<=126&&(Bg=String.fromCharCode(Bg),Kp=Kp.substr(0,Kp.length-Xg-2)+(Bg===wg||Bg==="\\"?"\\":"")+Bg),Bg=0),Bg?Bg++:Cg?(Cg=!1,ng&&(yn.charAt(Cf)==="x"?(Bg++,Xg=2):yn.charAt(Cf)==="u"&&(Bg++,Xg=4))):Cg=yn.charAt(Cf)==="\\",Cf+=1,Cf>=og)return[Kp,"TK_STRING"]}if(Cf+=1,Kp+=wg,wg==="/")for(;Cf")return cf.in_html_comment=!1,Cf+=2,kf&&kp(),["-->","TK_COMMENT"];if(Kf===".")return[Kf,"TK_DOT"];if(Mp(Kf,Pf)){for(;Cf=og)););return Kf===","?[Kf,"TK_COMMA"]:Kf==="="?[Kf,"TK_EQUALS"]:[Kf,"TK_OPERATOR"]}return[Kf,"TK_UNKNOWN"]}for(_f="";ip>0;)_f+=ap,ip-=1;for(;ot&&(ot.charAt(0)===" "||ot.charAt(0)===" ");)Gf+=ot.charAt(0),ot=ot.substring(1);for(yn=ot,yf="",mo="TK_START_EXPR",wo="",lf="",uo=[],Lf=!1,$f=` -\r `.split(""),wf="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$".split(""),Bf="0123456789".split(""),Pf="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! !! , : ? ^ ^= |= ::",Pf+=" <%= <% %> ",Pf=Pf.split(" "),Af="continue,try,throw,return,var,if,switch,case,default,for,while,break,function".split(","),vf=[],hp("BLOCK"),Cf=0;;){var hg=ug();if(po=hg[0],Df=hg[1],Df==="TK_EOF")break;switch(Df){case"TK_START_EXPR":if(po==="["){if(mo==="TK_WORD"||wo===")"){Mp(wo,Af)&&lp(),hp("(EXPRESSION)"),Of();break}(cf.mode==="[EXPRESSION]"||cf.mode==="[INDENTED-EXPRESSION]")&&(lf==="]"&&wo===","||wo==="[")?(cf.mode==="[EXPRESSION]"&&(cf.mode="[INDENTED-EXPRESSION]",Ip||qf()),hp("[EXPRESSION]"),Ip||kp()):hp("[EXPRESSION]")}else yf==="for"?hp("(FOR-EXPRESSION)"):Mp(yf,["if","while"])?hp("(COND-EXPRESSION)"):hp("(EXPRESSION)");wo===";"||mo==="TK_START_BLOCK"?kp():mo==="TK_END_EXPR"||mo==="TK_START_EXPR"||mo==="TK_END_BLOCK"||wo==="."?kf&&kp():mo!=="TK_WORD"&&mo!=="TK_OPERATOR"?lp():yf==="function"||yf==="typeof"?jp&&lp():(Mp(wo,Af)||wo==="catch")&&Jp&&lp(),Of();break;case"TK_DOT":_p(wo)?lp():wo===")"&&(vp||kf)&&(cf.chain_extra_indentation=1,kp(!0,!1)),Of();break;case"TK_END_EXPR":if(po==="]"){if(Ip){if(wo==="}"){cp(),Of(),bp();break}}else if(cf.mode==="[INDENTED-EXPRESSION]"&&wo==="]"){bp(),kp(),Of();break}}bp(),Of();break;case"TK_START_BLOCK":if(hp(yf==="do"?"DO_BLOCK":"BLOCK"),rp==="expand"||rp==="expand-strict"){var xg=!1;rp==="expand-strict"?(xg=Yp()==="}",xg||kp(!0)):mo!=="TK_OPERATOR"&&(wo==="="||_p(wo)&&wo!=="else"?lp():kp(!0)),Of(),xg||qf()}else mo!=="TK_OPERATOR"&&mo!=="TK_START_EXPR"?mo==="TK_START_BLOCK"?kp():lp():$p(cf.previous_mode)&&wo===","&&(lf==="}"?lp():kp()),qf(),Of();break;case"TK_END_BLOCK":bp(),rp==="expand"||rp==="expand-strict"?(wo!=="{"&&kp(),Of()):(mo==="TK_START_BLOCK"?Nf?cp():vg():$p(cf.mode)&&Ip?(Ip=!1,kp(),Ip=!0):kp(),Of());break;case"TK_WORD":if(Lf){lp(),Of(),lp(),Lf=!1;break}if(Hf="NONE",po==="function"){if(cf.var_line&&mo!=="TK_EQUALS"&&(cf.var_line_reindented=!0),(Nf||wo===";")&&wo!=="{"&&mo!=="TK_BLOCK_COMMENT"&&mo!=="TK_COMMENT"){Yf=Nf?Yf:0,yp||(Yf=1);for(var kg=0;kg<2-Yf;kg++)kp(!1)}mo==="TK_WORD"?wo==="get"||wo==="set"||wo==="new"||wo==="return"?lp():kp():mo==="TK_OPERATOR"||wo==="="?lp():Vp(cf.mode)||kp(),Of(),yf=po;break}if(po==="case"||po==="default"&&cf.in_case_statement){kp(),cf.case_body&&(cf.indentation_level--,cf.case_body=!1,cp()),Of(),cf.in_case=!0,cf.in_case_statement=!0;break}mo==="TK_END_BLOCK"?Mp(po.toLowerCase(),["else","catch","finally"])?rp==="expand"||rp==="end-expand"||rp==="expand-strict"?Hf="NEWLINE":(Hf="SPACE",lp()):Hf="NEWLINE":mo==="TK_SEMICOLON"&&(cf.mode==="BLOCK"||cf.mode==="DO_BLOCK")?Hf="NEWLINE":mo==="TK_SEMICOLON"&&Vp(cf.mode)?Hf="SPACE":mo==="TK_STRING"?Hf="NEWLINE":mo==="TK_WORD"?(wo==="else"&&vg(!0),Hf="SPACE"):mo==="TK_START_BLOCK"?Hf="NEWLINE":mo==="TK_END_EXPR"&&(lp(),Hf="NEWLINE"),Mp(po,Af)&&wo!==")"&&(wo==="else"?Hf="SPACE":Hf="NEWLINE"),cf.if_line&&mo==="TK_END_EXPR"&&(cf.if_line=!1),Mp(po.toLowerCase(),["else","catch","finally"])?mo!=="TK_END_BLOCK"||rp==="expand"||rp==="end-expand"||rp==="expand-strict"?kp():(vg(!0),lp()):Hf==="NEWLINE"?_p(wo)?lp():mo!=="TK_END_EXPR"?(mo!=="TK_START_EXPR"||po!=="var")&&wo!==":"&&(po==="if"&&yf==="else"&&wo!=="{"?lp():(cf.var_line=!1,cf.var_line_reindented=!1,kp())):Mp(po,Af)&&wo!==")"&&(cf.var_line=!1,cf.var_line_reindented=!1,kp()):$p(cf.mode)&&wo===","&&lf==="}"?kp():Hf==="SPACE"&&lp(),Of(),yf=po,po==="var"&&(cf.var_line=!0,cf.var_line_reindented=!1,cf.var_line_tainted=!1),po==="if"&&(cf.if_line=!0),po==="else"&&(cf.if_line=!1);break;case"TK_SEMICOLON":Of(),cf.var_line=!1,cf.var_line_reindented=!1,cf.mode==="OBJECT"&&(cf.mode="BLOCK");break;case"TK_STRING":mo==="TK_END_EXPR"&&Mp(cf.previous_mode,["(COND-EXPRESSION)","(FOR-EXPRESSION)"])?lp():mo==="TK_COMMENT"||mo==="TK_STRING"||mo==="TK_START_BLOCK"||mo==="TK_END_BLOCK"||mo==="TK_SEMICOLON"?kp():mo==="TK_WORD"?lp():yp&&kf&&(kp(),uo.push(_f)),Of();break;case"TK_EQUALS":cf.var_line&&(cf.var_line_tainted=!0),lp(),Of(),lp();break;case"TK_COMMA":if(cf.var_line){if((Vp(cf.mode)||mo==="TK_END_BLOCK")&&(cf.var_line_tainted=!1),cf.var_line_tainted){Of(),cf.var_line_reindented=!0,cf.var_line_tainted=!1,kp();break}else cf.var_line_tainted=!1;Of(),lp();break}mo==="TK_COMMENT"&&kp(),mo==="TK_END_BLOCK"&&cf.mode!=="(EXPRESSION)"?(Of(),cf.mode==="OBJECT"&&wo==="}"?kp():lp()):cf.mode==="OBJECT"?(Of(),kp()):(Of(),lp());break;case"TK_OPERATOR":var Dg=!0,lm=!0;if(_p(wo)){lp(),Of();break}if(po==="*"&&mo==="TK_DOT"&&!lf.match(/^\d+$/)){Of();break}if(po===":"&&cf.in_case){cf.case_body=!0,qf(),Of(),kp(),cf.in_case=!1;break}if(po==="::"){Of();break}Mp(po,["--","++","!"])||Mp(po,["-","+"])&&(Mp(mo,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||Mp(wo,Af)||wo==",")?(Dg=!1,lm=!1,wo===";"&&Vp(cf.mode)&&(Dg=!0),mo==="TK_WORD"&&Mp(wo,Af)&&(Dg=!0),cf.mode==="BLOCK"&&(wo==="{"||wo===";")&&kp()):po===":"?cf.ternary_depth===0?(cf.mode==="BLOCK"&&(cf.mode="OBJECT"),Dg=!1):cf.ternary_depth-=1:po==="?"&&(cf.ternary_depth+=1),Dg&&lp(),Of(),lm&&lp();break;case"TK_BLOCK_COMMENT":var Bp=Lp(po),Rp;if(Ep(Bp.slice(1),"*"))for(kp(),uo.push(Bp[0]),Rp=1;Rp1||mo==="TK_END_BLOCK"?kp():lp(),Rp=0;Rp")return cf.in_html_comment=!1,Cf+=2,kf&&kp(),["-->","TK_COMMENT"];if(Kf===".")return[Kf,"TK_DOT"];if(Mp(Kf,Af)){for(;Cf=og)););return Kf===","?[Kf,"TK_COMMA"]:Kf==="="?[Kf,"TK_EQUALS"]:[Kf,"TK_OPERATOR"]}return[Kf,"TK_UNKNOWN"]}for(_f="";ip>0;)_f+=ap,ip-=1;for(;ot&&(ot.charAt(0)===" "||ot.charAt(0)===" ");)Gf+=ot.charAt(0),ot=ot.substring(1);for(yn=ot,yf="",mo="TK_START_EXPR",wo="",lf="",uo=[],Lf=!1,$f=` +\r `.split(""),xf="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$".split(""),Bf="0123456789".split(""),Af="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! !! , : ? ^ ^= |= ::",Af+=" <%= <% %> ",Af=Af.split(" "),Pf="continue,try,throw,return,var,if,switch,case,default,for,while,break,function".split(","),vf=[],hp("BLOCK"),Cf=0;;){var hg=ug();if(po=hg[0],Df=hg[1],Df==="TK_EOF")break;switch(Df){case"TK_START_EXPR":if(po==="["){if(mo==="TK_WORD"||wo===")"){Mp(wo,Pf)&&lp(),hp("(EXPRESSION)"),Of();break}(cf.mode==="[EXPRESSION]"||cf.mode==="[INDENTED-EXPRESSION]")&&(lf==="]"&&wo===","||wo==="[")?(cf.mode==="[EXPRESSION]"&&(cf.mode="[INDENTED-EXPRESSION]",Ip||qf()),hp("[EXPRESSION]"),Ip||kp()):hp("[EXPRESSION]")}else yf==="for"?hp("(FOR-EXPRESSION)"):Mp(yf,["if","while"])?hp("(COND-EXPRESSION)"):hp("(EXPRESSION)");wo===";"||mo==="TK_START_BLOCK"?kp():mo==="TK_END_EXPR"||mo==="TK_START_EXPR"||mo==="TK_END_BLOCK"||wo==="."?kf&&kp():mo!=="TK_WORD"&&mo!=="TK_OPERATOR"?lp():yf==="function"||yf==="typeof"?jp&&lp():(Mp(wo,Pf)||wo==="catch")&&Jp&&lp(),Of();break;case"TK_DOT":_p(wo)?lp():wo===")"&&(vp||kf)&&(cf.chain_extra_indentation=1,kp(!0,!1)),Of();break;case"TK_END_EXPR":if(po==="]"){if(Ip){if(wo==="}"){cp(),Of(),bp();break}}else if(cf.mode==="[INDENTED-EXPRESSION]"&&wo==="]"){bp(),kp(),Of();break}}bp(),Of();break;case"TK_START_BLOCK":if(hp(yf==="do"?"DO_BLOCK":"BLOCK"),rp==="expand"||rp==="expand-strict"){var xg=!1;rp==="expand-strict"?(xg=Yp()==="}",xg||kp(!0)):mo!=="TK_OPERATOR"&&(wo==="="||_p(wo)&&wo!=="else"?lp():kp(!0)),Of(),xg||qf()}else mo!=="TK_OPERATOR"&&mo!=="TK_START_EXPR"?mo==="TK_START_BLOCK"?kp():lp():$p(cf.previous_mode)&&wo===","&&(lf==="}"?lp():kp()),qf(),Of();break;case"TK_END_BLOCK":bp(),rp==="expand"||rp==="expand-strict"?(wo!=="{"&&kp(),Of()):(mo==="TK_START_BLOCK"?Nf?cp():vg():$p(cf.mode)&&Ip?(Ip=!1,kp(),Ip=!0):kp(),Of());break;case"TK_WORD":if(Lf){lp(),Of(),lp(),Lf=!1;break}if(Hf="NONE",po==="function"){if(cf.var_line&&mo!=="TK_EQUALS"&&(cf.var_line_reindented=!0),(Nf||wo===";")&&wo!=="{"&&mo!=="TK_BLOCK_COMMENT"&&mo!=="TK_COMMENT"){Yf=Nf?Yf:0,yp||(Yf=1);for(var kg=0;kg<2-Yf;kg++)kp(!1)}mo==="TK_WORD"?wo==="get"||wo==="set"||wo==="new"||wo==="return"?lp():kp():mo==="TK_OPERATOR"||wo==="="?lp():Vp(cf.mode)||kp(),Of(),yf=po;break}if(po==="case"||po==="default"&&cf.in_case_statement){kp(),cf.case_body&&(cf.indentation_level--,cf.case_body=!1,cp()),Of(),cf.in_case=!0,cf.in_case_statement=!0;break}mo==="TK_END_BLOCK"?Mp(po.toLowerCase(),["else","catch","finally"])?rp==="expand"||rp==="end-expand"||rp==="expand-strict"?Hf="NEWLINE":(Hf="SPACE",lp()):Hf="NEWLINE":mo==="TK_SEMICOLON"&&(cf.mode==="BLOCK"||cf.mode==="DO_BLOCK")?Hf="NEWLINE":mo==="TK_SEMICOLON"&&Vp(cf.mode)?Hf="SPACE":mo==="TK_STRING"?Hf="NEWLINE":mo==="TK_WORD"?(wo==="else"&&vg(!0),Hf="SPACE"):mo==="TK_START_BLOCK"?Hf="NEWLINE":mo==="TK_END_EXPR"&&(lp(),Hf="NEWLINE"),Mp(po,Pf)&&wo!==")"&&(wo==="else"?Hf="SPACE":Hf="NEWLINE"),cf.if_line&&mo==="TK_END_EXPR"&&(cf.if_line=!1),Mp(po.toLowerCase(),["else","catch","finally"])?mo!=="TK_END_BLOCK"||rp==="expand"||rp==="end-expand"||rp==="expand-strict"?kp():(vg(!0),lp()):Hf==="NEWLINE"?_p(wo)?lp():mo!=="TK_END_EXPR"?(mo!=="TK_START_EXPR"||po!=="var")&&wo!==":"&&(po==="if"&&yf==="else"&&wo!=="{"?lp():(cf.var_line=!1,cf.var_line_reindented=!1,kp())):Mp(po,Pf)&&wo!==")"&&(cf.var_line=!1,cf.var_line_reindented=!1,kp()):$p(cf.mode)&&wo===","&&lf==="}"?kp():Hf==="SPACE"&&lp(),Of(),yf=po,po==="var"&&(cf.var_line=!0,cf.var_line_reindented=!1,cf.var_line_tainted=!1),po==="if"&&(cf.if_line=!0),po==="else"&&(cf.if_line=!1);break;case"TK_SEMICOLON":Of(),cf.var_line=!1,cf.var_line_reindented=!1,cf.mode==="OBJECT"&&(cf.mode="BLOCK");break;case"TK_STRING":mo==="TK_END_EXPR"&&Mp(cf.previous_mode,["(COND-EXPRESSION)","(FOR-EXPRESSION)"])?lp():mo==="TK_COMMENT"||mo==="TK_STRING"||mo==="TK_START_BLOCK"||mo==="TK_END_BLOCK"||mo==="TK_SEMICOLON"?kp():mo==="TK_WORD"?lp():yp&&kf&&(kp(),uo.push(_f)),Of();break;case"TK_EQUALS":cf.var_line&&(cf.var_line_tainted=!0),lp(),Of(),lp();break;case"TK_COMMA":if(cf.var_line){if((Vp(cf.mode)||mo==="TK_END_BLOCK")&&(cf.var_line_tainted=!1),cf.var_line_tainted){Of(),cf.var_line_reindented=!0,cf.var_line_tainted=!1,kp();break}else cf.var_line_tainted=!1;Of(),lp();break}mo==="TK_COMMENT"&&kp(),mo==="TK_END_BLOCK"&&cf.mode!=="(EXPRESSION)"?(Of(),cf.mode==="OBJECT"&&wo==="}"?kp():lp()):cf.mode==="OBJECT"?(Of(),kp()):(Of(),lp());break;case"TK_OPERATOR":var Dg=!0,lm=!0;if(_p(wo)){lp(),Of();break}if(po==="*"&&mo==="TK_DOT"&&!lf.match(/^\d+$/)){Of();break}if(po===":"&&cf.in_case){cf.case_body=!0,qf(),Of(),kp(),cf.in_case=!1;break}if(po==="::"){Of();break}Mp(po,["--","++","!"])||Mp(po,["-","+"])&&(Mp(mo,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||Mp(wo,Pf)||wo==",")?(Dg=!1,lm=!1,wo===";"&&Vp(cf.mode)&&(Dg=!0),mo==="TK_WORD"&&Mp(wo,Pf)&&(Dg=!0),cf.mode==="BLOCK"&&(wo==="{"||wo===";")&&kp()):po===":"?cf.ternary_depth===0?(cf.mode==="BLOCK"&&(cf.mode="OBJECT"),Dg=!1):cf.ternary_depth-=1:po==="?"&&(cf.ternary_depth+=1),Dg&&lp(),Of(),lm&&lp();break;case"TK_BLOCK_COMMENT":var Bp=Lp(po),Rp;if(Ep(Bp.slice(1),"*"))for(kp(),uo.push(Bp[0]),Rp=1;Rp1||mo==="TK_END_BLOCK"?kp():lp(),Rp=0;Rp * @namespace * @public - */var q=function(K){var X=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,tt=0,rt={},ot={manual:K.Prism&&K.Prism.manual,disableWorkerMessageHandler:K.Prism&&K.Prism.disableWorkerMessageHandler,util:{encode:function _f($f){return $f instanceof ut?new ut($f.type,_f($f.content),$f.alias):Array.isArray($f)?$f.map(_f):$f.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(Pf){var _f=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(Pf.stack)||[])[1];if(_f){var $f=document.getElementsByTagName("script");for(var wf in $f)if($f[wf].src==_f)return $f[wf]}return null}},isActive:function(_f,$f,wf){for(var Pf="no-"+$f;_f;){var Cf=_f.classList;if(Cf.contains($f))return!0;if(Cf.contains(Pf))return!1;_f=_f.parentElement}return!!wf}},languages:{plain:rt,plaintext:rt,text:rt,txt:rt,extend:function(_f,$f){var wf=ot.util.clone(ot.languages[_f]);for(var Pf in $f)wf[Pf]=$f[Pf];return wf},insertBefore:function(_f,$f,wf,Pf){Pf=Pf||ot.languages;var Cf=Pf[_f],Af={};for(var Bf in Cf)if(Cf.hasOwnProperty(Bf)){if(Bf==$f)for(var Hf in wf)wf.hasOwnProperty(Hf)&&(Af[Hf]=wf[Hf]);wf.hasOwnProperty(Bf)||(Af[Bf]=Cf[Bf])}var Df=Pf[_f];return Pf[_f]=Af,ot.languages.DFS(ot.languages,function(Lf,kf){kf===Df&&Lf!=_f&&(this[Lf]=Af)}),Af},DFS:function _f($f,wf,Pf,Cf){Cf=Cf||{};var Af=ot.util.objId;for(var Bf in $f)if($f.hasOwnProperty(Bf)){wf.call($f,Bf,$f[Bf],Pf||Bf);var Hf=$f[Bf],Df=ot.util.type(Hf);Df==="Object"&&!Cf[Af(Hf)]?(Cf[Af(Hf)]=!0,_f(Hf,wf,null,Cf)):Df==="Array"&&!Cf[Af(Hf)]&&(Cf[Af(Hf)]=!0,_f(Hf,wf,Bf,Cf))}}},plugins:{},highlightAll:function(_f,$f){ot.highlightAllUnder(document,_f,$f)},highlightAllUnder:function(_f,$f,wf){var Pf={callback:wf,container:_f,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};ot.hooks.run("before-highlightall",Pf),Pf.elements=Array.prototype.slice.apply(Pf.container.querySelectorAll(Pf.selector)),ot.hooks.run("before-all-elements-highlight",Pf);for(var Cf=0,Af;Af=Pf.elements[Cf++];)ot.highlightElement(Af,$f===!0,Pf.callback)},highlightElement:function(_f,$f,wf){var Pf=ot.util.getLanguage(_f),Cf=ot.languages[Pf];ot.util.setLanguage(_f,Pf);var Af=_f.parentElement;Af&&Af.nodeName.toLowerCase()==="pre"&&ot.util.setLanguage(Af,Pf);var Bf=_f.textContent,Hf={element:_f,language:Pf,grammar:Cf,code:Bf};function Df(kf){Hf.highlightedCode=kf,ot.hooks.run("before-insert",Hf),Hf.element.innerHTML=Hf.highlightedCode,ot.hooks.run("after-highlight",Hf),ot.hooks.run("complete",Hf),wf&&wf.call(Hf.element)}if(ot.hooks.run("before-sanity-check",Hf),Af=Hf.element.parentElement,Af&&Af.nodeName.toLowerCase()==="pre"&&!Af.hasAttribute("tabindex")&&Af.setAttribute("tabindex","0"),!Hf.code){ot.hooks.run("complete",Hf),wf&&wf.call(Hf.element);return}if(ot.hooks.run("before-highlight",Hf),!Hf.grammar){Df(ot.util.encode(Hf.code));return}if($f&&K.Worker){var Lf=new Worker(ot.filename);Lf.onmessage=function(kf){Df(kf.data)},Lf.postMessage(JSON.stringify({language:Hf.language,code:Hf.code,immediateClose:!0}))}else Df(ot.highlight(Hf.code,Hf.grammar,Hf.language))},highlight:function(_f,$f,wf){var Pf={code:_f,grammar:$f,language:wf};if(ot.hooks.run("before-tokenize",Pf),!Pf.grammar)throw new Error('The language "'+Pf.language+'" has no grammar.');return Pf.tokens=ot.tokenize(Pf.code,Pf.grammar),ot.hooks.run("after-tokenize",Pf),ut.stringify(ot.util.encode(Pf.tokens),Pf.language)},tokenize:function(_f,$f){var wf=$f.rest;if(wf){for(var Pf in wf)$f[Pf]=wf[Pf];delete $f.rest}var Cf=new po;return mo(Cf,Cf.head,_f),uo(_f,Cf,$f,Cf.head,0),lf(Cf)},hooks:{all:{},add:function(_f,$f){var wf=ot.hooks.all;wf[_f]=wf[_f]||[],wf[_f].push($f)},run:function(_f,$f){var wf=ot.hooks.all[_f];if(!(!wf||!wf.length))for(var Pf=0,Cf;Cf=wf[Pf++];)Cf($f)}},Token:ut};K.Prism=ot;function ut(_f,$f,wf,Pf){this.type=_f,this.content=$f,this.alias=wf,this.length=(Pf||"").length|0}ut.stringify=function _f($f,wf){if(typeof $f=="string")return $f;if(Array.isArray($f)){var Pf="";return $f.forEach(function(Df){Pf+=_f(Df,wf)}),Pf}var Cf={type:$f.type,content:_f($f.content,wf),tag:"span",classes:["token",$f.type],attributes:{},language:wf},Af=$f.alias;Af&&(Array.isArray(Af)?Array.prototype.push.apply(Cf.classes,Af):Cf.classes.push(Af)),ot.hooks.run("wrap",Cf);var Bf="";for(var Hf in Cf.attributes)Bf+=" "+Hf+'="'+(Cf.attributes[Hf]||"").replace(/"/g,""")+'"';return"<"+Cf.tag+' class="'+Cf.classes.join(" ")+'"'+Bf+">"+Cf.content+""};function yn(_f,$f,wf,Pf){_f.lastIndex=$f;var Cf=_f.exec(wf);if(Cf&&Pf&&Cf[1]){var Af=Cf[1].length;Cf.index+=Af,Cf[0]=Cf[0].slice(Af)}return Cf}function uo(_f,$f,wf,Pf,Cf,Af){for(var Bf in wf)if(!(!wf.hasOwnProperty(Bf)||!wf[Bf])){var Hf=wf[Bf];Hf=Array.isArray(Hf)?Hf:[Hf];for(var Df=0;Df=Af.reach);yp+=ap.value.length,ap=ap.next){var vp=ap.value;if($f.length>_f.length)return;if(!(vp instanceof ut)){var Np=1,jp;if(Yf){if(jp=yn(ip,yp,_f,Nf),!jp||jp.index>=_f.length)break;var og=jp.index,Ip=jp.index+jp[0].length,Jp=yp;for(Jp+=ap.value.length;og>=Jp;)ap=ap.next,Jp+=ap.value.length;if(Jp-=ap.value.length,yp=Jp,ap.value instanceof ut)continue;for(var ng=ap;ng!==$f.tail&&(JpAf.reach&&(Af.reach=xp);var kp=ap.prev;Dp&&(kp=mo($f,kp,Dp),yp+=Dp.length),wo($f,kp,Np);var lp=new ut(Bf,kf?ot.tokenize(vg,kf):vg,Gf,vg);if(ap=mo($f,kp,lp),Lp&&mo($f,ap,Lp),Np>1){var Of={cause:Bf+","+Df,reach:xp};uo(_f,$f,wf,ap.prev,yp,Of),Af&&Of.reach>Af.reach&&(Af.reach=Of.reach)}}}}}}function po(){var _f={value:null,prev:null,next:null},$f={value:null,prev:_f,next:null};_f.next=$f,this.head=_f,this.tail=$f,this.length=0}function mo(_f,$f,wf){var Pf=$f.next,Cf={value:wf,prev:$f,next:Pf};return $f.next=Cf,Pf.prev=Cf,_f.length++,Cf}function wo(_f,$f,wf){for(var Pf=$f.next,Cf=0;Cf/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},q.languages.markup.tag.inside["attr-value"].inside.entity=q.languages.markup.entity,q.languages.markup.doctype.inside["internal-subset"].inside=q.languages.markup,q.hooks.add("wrap",function(K){K.type==="entity"&&(K.attributes.title=K.content.replace(/&/,"&"))}),Object.defineProperty(q.languages.markup.tag,"addInlined",{value:function(X,tt){var rt={};rt["language-"+tt]={pattern:/(^$)/i,lookbehind:!0,inside:q.languages[tt]},rt.cdata=/^$/i;var ot={"included-cdata":{pattern://i,inside:rt}};ot["language-"+tt]={pattern:/[\s\S]+/,inside:q.languages[tt]};var ut={};ut[X]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return X}),"i"),lookbehind:!0,greedy:!0,inside:ot},q.languages.insertBefore("markup","cdata",ut)}}),Object.defineProperty(q.languages.markup.tag,"addAttribute",{value:function(K,X){q.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+K+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[X,"language-"+X],inside:q.languages[X]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),q.languages.html=q.languages.markup,q.languages.mathml=q.languages.markup,q.languages.svg=q.languages.markup,q.languages.xml=q.languages.extend("markup",{}),q.languages.ssml=q.languages.xml,q.languages.atom=q.languages.xml,q.languages.rss=q.languages.xml,function(K){var X=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;K.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+X.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+X.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+X.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+X.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:X,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},K.languages.css.atrule.inside.rest=K.languages.css;var tt=K.languages.markup;tt&&(tt.tag.addInlined("style","css"),tt.tag.addAttribute("style","css"))}(q),q.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},q.languages.javascript=q.languages.extend("clike",{"class-name":[q.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),q.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,q.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:q.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:q.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:q.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:q.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:q.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),q.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:q.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),q.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),q.languages.markup&&(q.languages.markup.tag.addInlined("script","javascript"),q.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),q.languages.js=q.languages.javascript,function(){if(typeof q>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var K="Loading…",X=function(yf,cf){return"✖ Error "+yf+" while fetching file: "+cf},tt="✖ Error: File does not exist or is empty",rt={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},ot="data-src-status",ut="loading",yn="loaded",uo="failed",po="pre[data-src]:not(["+ot+'="'+yn+'"]):not(['+ot+'="'+ut+'"])';function mo(yf,cf,vf){var _f=new XMLHttpRequest;_f.open("GET",yf,!0),_f.onreadystatechange=function(){_f.readyState==4&&(_f.status<400&&_f.responseText?cf(_f.responseText):_f.status>=400?vf(X(_f.status,_f.statusText)):vf(tt))},_f.send(null)}function wo(yf){var cf=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(yf||"");if(cf){var vf=Number(cf[1]),_f=cf[2],$f=cf[3];return _f?$f?[vf,Number($f)]:[vf,void 0]:[vf,vf]}}q.hooks.add("before-highlightall",function(yf){yf.selector+=", "+po}),q.hooks.add("before-sanity-check",function(yf){var cf=yf.element;if(cf.matches(po)){yf.code="",cf.setAttribute(ot,ut);var vf=cf.appendChild(document.createElement("CODE"));vf.textContent=K;var _f=cf.getAttribute("data-src"),$f=yf.language;if($f==="none"){var wf=(/\.(\w+)$/.exec(_f)||[,"none"])[1];$f=rt[wf]||wf}q.util.setLanguage(vf,$f),q.util.setLanguage(cf,$f);var Pf=q.plugins.autoloader;Pf&&Pf.loadLanguages($f),mo(_f,function(Cf){cf.setAttribute(ot,yn);var Af=wo(cf.getAttribute("data-range"));if(Af){var Bf=Cf.split(/\r\n?|\n/g),Hf=Af[0],Df=Af[1]==null?Bf.length:Af[1];Hf<0&&(Hf+=Bf.length),Hf=Math.max(0,Math.min(Hf-1,Bf.length)),Df<0&&(Df+=Bf.length),Df=Math.max(0,Math.min(Df,Bf.length)),Cf=Bf.slice(Hf,Df).join(` + */var q=function(K){var X=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,tt=0,rt={},ot={manual:K.Prism&&K.Prism.manual,disableWorkerMessageHandler:K.Prism&&K.Prism.disableWorkerMessageHandler,util:{encode:function _f($f){return $f instanceof ut?new ut($f.type,_f($f.content),$f.alias):Array.isArray($f)?$f.map(_f):$f.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(Af){var _f=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(Af.stack)||[])[1];if(_f){var $f=document.getElementsByTagName("script");for(var xf in $f)if($f[xf].src==_f)return $f[xf]}return null}},isActive:function(_f,$f,xf){for(var Af="no-"+$f;_f;){var Cf=_f.classList;if(Cf.contains($f))return!0;if(Cf.contains(Af))return!1;_f=_f.parentElement}return!!xf}},languages:{plain:rt,plaintext:rt,text:rt,txt:rt,extend:function(_f,$f){var xf=ot.util.clone(ot.languages[_f]);for(var Af in $f)xf[Af]=$f[Af];return xf},insertBefore:function(_f,$f,xf,Af){Af=Af||ot.languages;var Cf=Af[_f],Pf={};for(var Bf in Cf)if(Cf.hasOwnProperty(Bf)){if(Bf==$f)for(var Hf in xf)xf.hasOwnProperty(Hf)&&(Pf[Hf]=xf[Hf]);xf.hasOwnProperty(Bf)||(Pf[Bf]=Cf[Bf])}var Df=Af[_f];return Af[_f]=Pf,ot.languages.DFS(ot.languages,function(Lf,kf){kf===Df&&Lf!=_f&&(this[Lf]=Pf)}),Pf},DFS:function _f($f,xf,Af,Cf){Cf=Cf||{};var Pf=ot.util.objId;for(var Bf in $f)if($f.hasOwnProperty(Bf)){xf.call($f,Bf,$f[Bf],Af||Bf);var Hf=$f[Bf],Df=ot.util.type(Hf);Df==="Object"&&!Cf[Pf(Hf)]?(Cf[Pf(Hf)]=!0,_f(Hf,xf,null,Cf)):Df==="Array"&&!Cf[Pf(Hf)]&&(Cf[Pf(Hf)]=!0,_f(Hf,xf,Bf,Cf))}}},plugins:{},highlightAll:function(_f,$f){ot.highlightAllUnder(document,_f,$f)},highlightAllUnder:function(_f,$f,xf){var Af={callback:xf,container:_f,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};ot.hooks.run("before-highlightall",Af),Af.elements=Array.prototype.slice.apply(Af.container.querySelectorAll(Af.selector)),ot.hooks.run("before-all-elements-highlight",Af);for(var Cf=0,Pf;Pf=Af.elements[Cf++];)ot.highlightElement(Pf,$f===!0,Af.callback)},highlightElement:function(_f,$f,xf){var Af=ot.util.getLanguage(_f),Cf=ot.languages[Af];ot.util.setLanguage(_f,Af);var Pf=_f.parentElement;Pf&&Pf.nodeName.toLowerCase()==="pre"&&ot.util.setLanguage(Pf,Af);var Bf=_f.textContent,Hf={element:_f,language:Af,grammar:Cf,code:Bf};function Df(kf){Hf.highlightedCode=kf,ot.hooks.run("before-insert",Hf),Hf.element.innerHTML=Hf.highlightedCode,ot.hooks.run("after-highlight",Hf),ot.hooks.run("complete",Hf),xf&&xf.call(Hf.element)}if(ot.hooks.run("before-sanity-check",Hf),Pf=Hf.element.parentElement,Pf&&Pf.nodeName.toLowerCase()==="pre"&&!Pf.hasAttribute("tabindex")&&Pf.setAttribute("tabindex","0"),!Hf.code){ot.hooks.run("complete",Hf),xf&&xf.call(Hf.element);return}if(ot.hooks.run("before-highlight",Hf),!Hf.grammar){Df(ot.util.encode(Hf.code));return}if($f&&K.Worker){var Lf=new Worker(ot.filename);Lf.onmessage=function(kf){Df(kf.data)},Lf.postMessage(JSON.stringify({language:Hf.language,code:Hf.code,immediateClose:!0}))}else Df(ot.highlight(Hf.code,Hf.grammar,Hf.language))},highlight:function(_f,$f,xf){var Af={code:_f,grammar:$f,language:xf};if(ot.hooks.run("before-tokenize",Af),!Af.grammar)throw new Error('The language "'+Af.language+'" has no grammar.');return Af.tokens=ot.tokenize(Af.code,Af.grammar),ot.hooks.run("after-tokenize",Af),ut.stringify(ot.util.encode(Af.tokens),Af.language)},tokenize:function(_f,$f){var xf=$f.rest;if(xf){for(var Af in xf)$f[Af]=xf[Af];delete $f.rest}var Cf=new po;return mo(Cf,Cf.head,_f),uo(_f,Cf,$f,Cf.head,0),lf(Cf)},hooks:{all:{},add:function(_f,$f){var xf=ot.hooks.all;xf[_f]=xf[_f]||[],xf[_f].push($f)},run:function(_f,$f){var xf=ot.hooks.all[_f];if(!(!xf||!xf.length))for(var Af=0,Cf;Cf=xf[Af++];)Cf($f)}},Token:ut};K.Prism=ot;function ut(_f,$f,xf,Af){this.type=_f,this.content=$f,this.alias=xf,this.length=(Af||"").length|0}ut.stringify=function _f($f,xf){if(typeof $f=="string")return $f;if(Array.isArray($f)){var Af="";return $f.forEach(function(Df){Af+=_f(Df,xf)}),Af}var Cf={type:$f.type,content:_f($f.content,xf),tag:"span",classes:["token",$f.type],attributes:{},language:xf},Pf=$f.alias;Pf&&(Array.isArray(Pf)?Array.prototype.push.apply(Cf.classes,Pf):Cf.classes.push(Pf)),ot.hooks.run("wrap",Cf);var Bf="";for(var Hf in Cf.attributes)Bf+=" "+Hf+'="'+(Cf.attributes[Hf]||"").replace(/"/g,""")+'"';return"<"+Cf.tag+' class="'+Cf.classes.join(" ")+'"'+Bf+">"+Cf.content+""};function yn(_f,$f,xf,Af){_f.lastIndex=$f;var Cf=_f.exec(xf);if(Cf&&Af&&Cf[1]){var Pf=Cf[1].length;Cf.index+=Pf,Cf[0]=Cf[0].slice(Pf)}return Cf}function uo(_f,$f,xf,Af,Cf,Pf){for(var Bf in xf)if(!(!xf.hasOwnProperty(Bf)||!xf[Bf])){var Hf=xf[Bf];Hf=Array.isArray(Hf)?Hf:[Hf];for(var Df=0;Df=Pf.reach);yp+=ap.value.length,ap=ap.next){var vp=ap.value;if($f.length>_f.length)return;if(!(vp instanceof ut)){var Np=1,jp;if(Yf){if(jp=yn(ip,yp,_f,Nf),!jp||jp.index>=_f.length)break;var og=jp.index,Ip=jp.index+jp[0].length,Jp=yp;for(Jp+=ap.value.length;og>=Jp;)ap=ap.next,Jp+=ap.value.length;if(Jp-=ap.value.length,yp=Jp,ap.value instanceof ut)continue;for(var ng=ap;ng!==$f.tail&&(JpPf.reach&&(Pf.reach=xp);var kp=ap.prev;Dp&&(kp=mo($f,kp,Dp),yp+=Dp.length),wo($f,kp,Np);var lp=new ut(Bf,kf?ot.tokenize(vg,kf):vg,Gf,vg);if(ap=mo($f,kp,lp),Lp&&mo($f,ap,Lp),Np>1){var Of={cause:Bf+","+Df,reach:xp};uo(_f,$f,xf,ap.prev,yp,Of),Pf&&Of.reach>Pf.reach&&(Pf.reach=Of.reach)}}}}}}function po(){var _f={value:null,prev:null,next:null},$f={value:null,prev:_f,next:null};_f.next=$f,this.head=_f,this.tail=$f,this.length=0}function mo(_f,$f,xf){var Af=$f.next,Cf={value:xf,prev:$f,next:Af};return $f.next=Cf,Af.prev=Cf,_f.length++,Cf}function wo(_f,$f,xf){for(var Af=$f.next,Cf=0;Cf/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},q.languages.markup.tag.inside["attr-value"].inside.entity=q.languages.markup.entity,q.languages.markup.doctype.inside["internal-subset"].inside=q.languages.markup,q.hooks.add("wrap",function(K){K.type==="entity"&&(K.attributes.title=K.content.replace(/&/,"&"))}),Object.defineProperty(q.languages.markup.tag,"addInlined",{value:function(X,tt){var rt={};rt["language-"+tt]={pattern:/(^$)/i,lookbehind:!0,inside:q.languages[tt]},rt.cdata=/^$/i;var ot={"included-cdata":{pattern://i,inside:rt}};ot["language-"+tt]={pattern:/[\s\S]+/,inside:q.languages[tt]};var ut={};ut[X]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return X}),"i"),lookbehind:!0,greedy:!0,inside:ot},q.languages.insertBefore("markup","cdata",ut)}}),Object.defineProperty(q.languages.markup.tag,"addAttribute",{value:function(K,X){q.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+K+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[X,"language-"+X],inside:q.languages[X]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),q.languages.html=q.languages.markup,q.languages.mathml=q.languages.markup,q.languages.svg=q.languages.markup,q.languages.xml=q.languages.extend("markup",{}),q.languages.ssml=q.languages.xml,q.languages.atom=q.languages.xml,q.languages.rss=q.languages.xml,function(K){var X=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;K.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+X.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+X.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+X.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+X.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:X,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},K.languages.css.atrule.inside.rest=K.languages.css;var tt=K.languages.markup;tt&&(tt.tag.addInlined("style","css"),tt.tag.addAttribute("style","css"))}(q),q.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},q.languages.javascript=q.languages.extend("clike",{"class-name":[q.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),q.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,q.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:q.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:q.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:q.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:q.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:q.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),q.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:q.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),q.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),q.languages.markup&&(q.languages.markup.tag.addInlined("script","javascript"),q.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),q.languages.js=q.languages.javascript,function(){if(typeof q>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var K="Loading…",X=function(yf,cf){return"✖ Error "+yf+" while fetching file: "+cf},tt="✖ Error: File does not exist or is empty",rt={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},ot="data-src-status",ut="loading",yn="loaded",uo="failed",po="pre[data-src]:not(["+ot+'="'+yn+'"]):not(['+ot+'="'+ut+'"])';function mo(yf,cf,vf){var _f=new XMLHttpRequest;_f.open("GET",yf,!0),_f.onreadystatechange=function(){_f.readyState==4&&(_f.status<400&&_f.responseText?cf(_f.responseText):_f.status>=400?vf(X(_f.status,_f.statusText)):vf(tt))},_f.send(null)}function wo(yf){var cf=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(yf||"");if(cf){var vf=Number(cf[1]),_f=cf[2],$f=cf[3];return _f?$f?[vf,Number($f)]:[vf,void 0]:[vf,vf]}}q.hooks.add("before-highlightall",function(yf){yf.selector+=", "+po}),q.hooks.add("before-sanity-check",function(yf){var cf=yf.element;if(cf.matches(po)){yf.code="",cf.setAttribute(ot,ut);var vf=cf.appendChild(document.createElement("CODE"));vf.textContent=K;var _f=cf.getAttribute("data-src"),$f=yf.language;if($f==="none"){var xf=(/\.(\w+)$/.exec(_f)||[,"none"])[1];$f=rt[xf]||xf}q.util.setLanguage(vf,$f),q.util.setLanguage(cf,$f);var Af=q.plugins.autoloader;Af&&Af.loadLanguages($f),mo(_f,function(Cf){cf.setAttribute(ot,yn);var Pf=wo(cf.getAttribute("data-range"));if(Pf){var Bf=Cf.split(/\r\n?|\n/g),Hf=Pf[0],Df=Pf[1]==null?Bf.length:Pf[1];Hf<0&&(Hf+=Bf.length),Hf=Math.max(0,Math.min(Hf-1,Bf.length)),Df<0&&(Df+=Bf.length),Df=Math.max(0,Math.min(Df,Bf.length)),Cf=Bf.slice(Hf,Df).join(` `),cf.hasAttribute("data-start")||cf.setAttribute("data-start",String(Hf+1))}vf.textContent=Cf,q.highlightElement(vf)},function(Cf){cf.setAttribute(ot,uo),vf.textContent=Cf})}}),q.plugins.fileHighlight={highlight:function(cf){for(var vf=(cf||document).querySelectorAll(po),_f=0,$f;$f=vf[_f++];)q.highlightElement($f)}};var lf=!1;q.fileHighlight=function(){lf||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),lf=!0),q.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(prism$1);var prismExports=prism$1.exports;const Prism$1=getDefaultExportFromCjs$3(prismExports);Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(F){F.type==="entity"&&(F.attributes.title=F.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function F(W,q){var K={};K["language-"+q]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[q]},K.cdata=/^$/i;var X={"included-cdata":{pattern://i,inside:K}};X["language-"+q]={pattern:/[\s\S]+/,inside:Prism.languages[q]};var tt={};tt[W]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return W}),"i"),lookbehind:!0,greedy:!0,inside:X},Prism.languages.insertBefore("markup","cdata",tt)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(F,W){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+F+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[W,"language-"+W],inside:Prism.languages[W]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(F){var W=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function q(uo){return uo=uo.replace(//g,function(){return W}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+uo+")")}var K=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,X=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return K}),tt=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;F.languages.markdown=F.languages.extend("markup",{}),F.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:F.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+X+tt+"(?:"+X+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+X+tt+")(?:"+X+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(K),inside:F.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+X+")"+tt+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+X+"$"),inside:{"table-header":{pattern:RegExp(K),alias:"important",inside:F.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:q(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:q(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:q(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:q(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(uo){["url","bold","italic","strike","code-snippet"].forEach(function(po){uo!==po&&(F.languages.markdown[uo].inside.content.inside[po]=F.languages.markdown[po])})}),F.hooks.add("after-tokenize",function(uo){if(uo.language!=="markdown"&&uo.language!=="md")return;function po(mo){if(!(!mo||typeof mo=="string"))for(var wo=0,lf=mo.length;wo",quot:'"'},ut=String.fromCodePoint||String.fromCharCode;function yn(uo){var po=uo.replace(rt,"");return po=po.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(mo,wo){if(wo=wo.toLowerCase(),wo[0]==="#"){var lf;return wo[1]==="x"?lf=parseInt(wo.slice(2),16):lf=Number(wo.slice(1)),ut(lf)}else{var yf=ot[wo];return yf||mo}}),po}F.languages.md=F.languages.markdown})(Prism);(function(F){function W(tt,rt){F.languages[tt]&&F.languages.insertBefore(tt,"comment",{"doc-comment":rt})}var q=F.languages.markup.tag,K={pattern:/\/\/\/.*/,greedy:!0,alias:"comment",inside:{tag:q}},X={pattern:/'''.*/,greedy:!0,alias:"comment",inside:{tag:q}};W("csharp",K),W("fsharp",K),W("vbnet",X)})(Prism);const prism="",_hoisted_1$2=["draggable"],_hoisted_2$2={key:0,id:"html",class:"language-markup",style:{margin:0,whiteSpace:"pre-wrap",wordWrap:"break-word"}},_hoisted_3$2={key:1,id:"juncture",class:"language-markdown",style:{margin:"0","white-space":"pre-wrap","word-wrap":"break-word"}},_hoisted_4$2=["innerHTML"],_sfc_main$3=defineComponent({__name:"SourceViewer.ce",props:{src:{type:String},language:{type:String,default:"juncture"},draggable:{type:Boolean,default:!0}},setup(F){const W=F,q=ref(null),K=computed(()=>{var yn,uo;return(uo=(yn=q.value)==null?void 0:yn.getRootNode())==null?void 0:uo.host}),X=computed(()=>{var yn;return(yn=q==null?void 0:q.value)==null?void 0:yn.parentNode}),tt=ref();watch$1(K,()=>{var uo,po;let yn=(po=(uo=K.value)==null?void 0:uo.textContent)==null?void 0:po.trim();yn&&(tt.value=W.language==="html"?rt(yn):` ${yn}`)}),watch$1(tt,()=>{var uo;let yn=(uo=X.value)==null?void 0:uo.querySelector(`#${W.language}`);yn&&tt.value&&nextTick(()=>{Prism$1.highlightElement(yn)})}),onMounted(()=>{W.src&&fetch(`/${W.src}?fmt=md`).then(yn=>yn.text()).then(yn=>{yn=yn.replace(/>/g,">").replace(/=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},marked:[{pattern:/==[^=]+=={[^}]+}/,alias:"class-name"}],qid:[{pattern:/Q[0-9]+/,alias:"entity"}],reference:[{pattern:/\[\^[^\]]+\]:?\s*/,alias:"class-name"}]});function rt(yn){function uo(wo){wo.querySelectorAll("VE-MERMAID").forEach(cf=>{cf.innerHTML=` @@ -3958,11 +3958,11 @@ ${cf.innerHTML}`});let lf=["data-id"],yf=["segment","section1","section2", `,_style_1=`*{box-sizing:border-box}.main{font-size:.8em;position:relative}.main pre{background-color:#f9f9f9;font-size:1rem}.main:hover .copy-button{opacity:1}.copy-button{position:absolute;top:10px;right:10px;opacity:0;transition:all .3s ease-in}.juncture-tag{color:#905} `,SourceViewer=_export_sfc(_sfc_main$3,[["styles",[_style_0$3,_style_1]]]),_hoisted_1$1=["open","draggable"],_hoisted_2$1=createBaseVNode("svg",{slot:"expand-icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",class:"bi bi-plus-square",viewBox:"0 0 16 16"},[createBaseVNode("path",{d:"M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"}),createBaseVNode("path",{d:"M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"})],-1),_hoisted_3$1=createBaseVNode("svg",{slot:"collapse-icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",class:"bi bi-dash-square",viewBox:"0 0 16 16"},[createBaseVNode("path",{d:"M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"}),createBaseVNode("path",{d:"M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z"})],-1),_hoisted_4$1={slot:"summary"},_hoisted_5$1={content:"Show code snippets",placement:"top"},_hoisted_6={style:{display:"flex",alignItems:"center",gap:"9px"}},_hoisted_7=createStaticVNode('',2),_hoisted_9=["innerHTML"],_hoisted_10=createBaseVNode("sl-tab",{slot:"nav",panel:"markdown"},[createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",class:"bi bi-markdown",viewBox:"0 0 16 16"},[createBaseVNode("path",{d:"M14 3a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h12zM2 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H2z"}),createBaseVNode("path",{"fill-rule":"evenodd",d:"M9.146 8.146a.5.5 0 0 1 .708 0L11.5 9.793l1.646-1.647a.5.5 0 0 1 .708.708l-2 2a.5.5 0 0 1-.708 0l-2-2a.5.5 0 0 1 0-.708z"}),createBaseVNode("path",{"fill-rule":"evenodd",d:"M11.5 5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 1 .5-.5z"}),createBaseVNode("path",{d:"M3.56 11V7.01h.056l1.428 3.239h.774l1.42-3.24h.056V11h1.073V5.001h-1.2l-1.71 3.894h-.039l-1.71-3.894H2.5V11h1.06z"})]),createTextVNode(" Markdown ")],-1),_hoisted_11=createBaseVNode("sl-tab",{slot:"nav",panel:"html"},[createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",class:"bi bi-code-slash",viewBox:"0 0 16 16"},[createBaseVNode("path",{d:"M10.478 1.647a.5.5 0 1 0-.956-.294l-4 13a.5.5 0 0 0 .956.294l4-13zM4.854 4.146a.5.5 0 0 1 0 .708L1.707 8l3.147 3.146a.5.5 0 0 1-.708.708l-3.5-3.5a.5.5 0 0 1 0-.708l3.5-3.5a.5.5 0 0 1 .708 0zm6.292 0a.5.5 0 0 0 0 .708L14.293 8l-3.147 3.146a.5.5 0 0 0 .708.708l3.5-3.5a.5.5 0 0 0 0-.708l-3.5-3.5a.5.5 0 0 0-.708 0z"})]),createTextVNode(" HTML ")],-1),_hoisted_12=createBaseVNode("sl-tab",{slot:"nav",panel:"preview"},[createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",class:"bi bi-eye",viewBox:"0 0 16 16"},[createBaseVNode("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),createBaseVNode("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"})]),createTextVNode(" Rendered ")],-1),_hoisted_13={name:"markdown"},_hoisted_14=["draggable"],_hoisted_15={name:"html"},_hoisted_16=["textContent","draggable"],_hoisted_17={name:"preview"},_hoisted_18=["draggable"],_hoisted_19={key:1},_hoisted_20=createBaseVNode("sl-tab",{slot:"nav",panel:"markdown"},[createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",class:"bi bi-markdown",viewBox:"0 0 16 16"},[createBaseVNode("path",{d:"M14 3a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h12zM2 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H2z"}),createBaseVNode("path",{"fill-rule":"evenodd",d:"M9.146 8.146a.5.5 0 0 1 .708 0L11.5 9.793l1.646-1.647a.5.5 0 0 1 .708.708l-2 2a.5.5 0 0 1-.708 0l-2-2a.5.5 0 0 1 0-.708z"}),createBaseVNode("path",{"fill-rule":"evenodd",d:"M11.5 5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 1 .5-.5z"}),createBaseVNode("path",{d:"M3.56 11V7.01h.056l1.428 3.239h.774l1.42-3.24h.056V11h1.073V5.001h-1.2l-1.71 3.894h-.039l-1.71-3.894H2.5V11h1.06z"})]),createTextVNode(" Markdown ")],-1),_hoisted_21=createBaseVNode("sl-tab",{slot:"nav",panel:"html"},[createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",class:"bi bi-code-slash",viewBox:"0 0 16 16"},[createBaseVNode("path",{d:"M10.478 1.647a.5.5 0 1 0-.956-.294l-4 13a.5.5 0 0 0 .956.294l4-13zM4.854 4.146a.5.5 0 0 1 0 .708L1.707 8l3.147 3.146a.5.5 0 0 1-.708.708l-3.5-3.5a.5.5 0 0 1 0-.708l3.5-3.5a.5.5 0 0 1 .708 0zm6.292 0a.5.5 0 0 0 0 .708L14.293 8l-3.147 3.146a.5.5 0 0 0 .708.708l3.5-3.5a.5.5 0 0 0 0-.708l-3.5-3.5a.5.5 0 0 0-.708 0z"})]),createTextVNode(" HTML ")],-1),_hoisted_22=createBaseVNode("sl-tab",{slot:"nav",panel:"preview"},[createBaseVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",class:"bi bi-eye",viewBox:"0 0 16 16"},[createBaseVNode("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),createBaseVNode("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"})]),createTextVNode(" Rendered ")],-1),_hoisted_23={name:"markdown"},_hoisted_24=["draggable"],_hoisted_25={name:"html"},_hoisted_26=["textContent","draggable"],_hoisted_27={name:"preview"},_hoisted_28=["draggable"],_sfc_main$2=defineComponent({__name:"Snippet.ce",props:{label:{type:String},tabs:{type:String,default:"markdown,html,preview"},collapsible:{type:Boolean,default:!1},open:{type:Boolean,default:!1},prefix:{type:String},path:{type:String},right:{type:Boolean},left:{type:Boolean},width:{type:String},height:{type:String},fill:{type:Boolean},showActive:{type:Boolean},disableDrag:{type:Boolean},src:{type:String}},setup(F){const W=F,q=ref(null),K=computed(()=>{var lf;return(lf=q==null?void 0:q.value)==null?void 0:lf.parentNode}),X=computed(()=>{var lf,yf;return(yf=(lf=q.value)==null?void 0:lf.getRootNode())==null?void 0:yf.host}),tt=ref(),rt=ref(),ot=ref(),ut=ref({});onMounted(()=>{W.src&&fetch(`/${W.src}?fmt=md`).then(lf=>lf.text()).then(lf=>{tt.value=lf.replace(/>/g,">").replace(/{if(!X.value)return;ut.value=Object.fromEntries(W.tabs.split(",").map(vf=>[vf,!0]));let yf=X.value.innerHTML.replace(/
/,"").replace(/<\/code><\/pre>/,"").split(`
 `),cf=[];if(yf.forEach(vf=>{(vf.trim().length>0||cf.length>0)&&cf.push(vf)}),cf.length>0){let vf=(cf[0].match(/(^\s+)/)||[""])[0].length;tt.value=cf.map(_f=>(_f.match(/(^\s+)/)||[""])[0].length>=vf?_f.slice(vf):_f).join(`
-`)}X.value.innerHTML="",X.value.style.display="block"}),watch$1(ot,()=>{ot.value!=="markdown"&&rt.value===void 0&&mo(),ot.value==="preview"&&nextTick(()=>{}),W.fill&&rt.value&&nextTick(()=>po()),W.height&&nextTick(()=>uo())});function yn(){var lf;(lf=K.value)==null||lf.querySelectorAll("sl-tab").forEach(yf=>{new MutationObserver(vf=>{var $f;let _f=vf[0].target;_f.disabled=!(($f=ut.value)!=null&&$f[_f.panel]),_f.style.visibility=_f.disabled?"hidden":"visible",_f.active&&(ot.value=_f.panel)}).observe(yf,{childList:!0,subtree:!0,attributes:!0})})}watch$1(ut,()=>yn());function uo(){var yf;let lf=(yf=K.value)==null?void 0:yf.querySelector('sl-tab-panel[name="preview"]');ot.value==="preview"&&W.height&&(lf.style.height=W.height)}function po(){var yf,cf;let lf=(yf=K.value)==null?void 0:yf.querySelector('sl-tab-panel[name="preview"]');if(ot.value==="preview"){let vf=(cf=K.value)==null?void 0:cf.querySelector("#juncture"),_f=lf.clientWidth/2,$f=document.createElement("div");$f.style.height=`${_f}px`;let wf=vf.querySelector("ve-footer");wf?vf.insertBefore($f,wf):vf.appendChild($f),lf.style.height=W.height||`${Math.max(_f/2,500)}px`,lf.style.overflowY="scroll"}else lf.style.height=""}function mo(){let lf=markdownToHtml(tt.value),yf=structureContent(lf),cf=elFromHtml(yf);Array.from((cf==null?void 0:cf.querySelectorAll("article > main > p"))||[]).forEach($f=>{$f.removeAttribute("data-id"),$f.removeAttribute("id"),$f.removeAttribute("class")});let vf=cf==null?void 0:cf.querySelector("main"),_f=vf==null?void 0:vf.firstElementChild;rt.value=(vf==null?void 0:vf.children.length)===1&&_f.tagName==="P"?_f.innerHTML:vf==null?void 0:vf.innerHTML}function wo(lf){var cf;let yf=tt.value;yf&&((cf=lf.dataTransfer)==null||cf.setData("text/plain",yf))}return(lf,yf)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:q,id:"main"},[F.collapsible?(openBlock(),createElementBlock("sl-details",{key:0,class:"custom-icons",open:W.open,draggable:W.disableDrag?null:"",onDragstart:wo},[_hoisted_2$1,_hoisted_3$1,createBaseVNode("div",_hoisted_4$1,[createBaseVNode("sl-tooltip",_hoisted_5$1,[createBaseVNode("div",_hoisted_6,[_hoisted_7,createBaseVNode("span",{innerHTML:W.label,class:"label"},null,8,_hoisted_9)])])]),createBaseVNode("sl-tab-group",null,[_hoisted_10,_hoisted_11,_hoisted_12,createBaseVNode("sl-tab-panel",_hoisted_13,[tt.value&&ot.value==="markdown"?(openBlock(),createElementBlock("ve-source-viewer",{key:0,draggable:W.disableDrag?null:""},toDisplayString(tt.value),9,_hoisted_14)):createCommentVNode("",!0)]),createBaseVNode("sl-tab-panel",_hoisted_15,[ot.value==="html"&&rt.value?(openBlock(),createElementBlock("ve-source-viewer",{key:0,textContent:toDisplayString(rt.value),language:"html",draggable:W.disableDrag?null:""},null,8,_hoisted_16)):createCommentVNode("",!0)]),createBaseVNode("sl-tab-panel",_hoisted_17,[ot.value==="preview"&&rt.value?(openBlock(),createElementBlock("div",{key:0,id:"juncture",style:{position:"relative"},draggable:W.disableDrag?null:"",onDragstart:wo},[createBaseVNode("ve-article",null,toDisplayString(rt.value),1)],40,_hoisted_18)):createCommentVNode("",!0)])])],40,_hoisted_1$1)):(openBlock(),createElementBlock("div",_hoisted_19,[createBaseVNode("sl-tab-group",null,[_hoisted_20,_hoisted_21,_hoisted_22,createBaseVNode("sl-tab-panel",_hoisted_23,[tt.value&&ot.value==="markdown"?(openBlock(),createElementBlock("ve-source-viewer",{key:0,draggable:W.disableDrag?null:""},toDisplayString(tt.value),9,_hoisted_24)):createCommentVNode("",!0)]),createBaseVNode("sl-tab-pane",_hoisted_25,[ot.value==="html"&&rt.value?(openBlock(),createElementBlock("ve-source-viewer",{key:0,textContent:toDisplayString(rt.value),language:"html",draggable:W.disableDrag?null:""},null,8,_hoisted_26)):createCommentVNode("",!0)]),createBaseVNode("sl-tab-panel",_hoisted_27,[ot.value==="preview"&&rt.value?(openBlock(),createElementBlock("div",{key:0,id:"juncture",style:{position:"relative"},draggable:W.disableDrag?null:"",onDragstart:wo},[createBaseVNode("ve-article",null,toDisplayString(rt.value),1)],40,_hoisted_28)):createCommentVNode("",!0)])])]))],512))}}),_style_0$2=`:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}@supports (scrollbar-gutter: stable){.sl-scroll-lock{scrollbar-gutter:stable!important;overflow:hidden!important}}@supports not (scrollbar-gutter: stable){.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}*{box-sizing:border-box}:host{margin-top:1.5rem;border-radius:2px;border:.5px solid #ddd;margin-bottom:2rem}:host([collapsible]){border:none}#main{font-family:Roboto,sans-serif;margin-top:0}sl-tab-panel{--padding: 0}sl-tab::part(base){display:flex;align-items:center;gap:6px;padding:12px}#juncture{padding:12px;font-size:1.2em;line-height:1.3}sl-details::part(header){background-color:#f9f9f9}sl-details::part(summary){font-size:1rem}sl-details::part(content){border-top:1px solid #ddd;padding:0}sl-details.custom-icons::part(summary-icon){rotate:none}sl-tab sl-icon{font-size:24px;margin-right:6px}.label{margin-left:12px;color:#555;font-weight:400}pre{display:none}
+`)}X.value.innerHTML="",X.value.style.display="block"}),watch$1(ot,()=>{ot.value!=="markdown"&&rt.value===void 0&&mo(),ot.value==="preview"&&nextTick(()=>{}),W.fill&&rt.value&&nextTick(()=>po()),W.height&&nextTick(()=>uo())});function yn(){var lf;(lf=K.value)==null||lf.querySelectorAll("sl-tab").forEach(yf=>{new MutationObserver(vf=>{var $f;let _f=vf[0].target;_f.disabled=!(($f=ut.value)!=null&&$f[_f.panel]),_f.style.visibility=_f.disabled?"hidden":"visible",_f.active&&(ot.value=_f.panel)}).observe(yf,{childList:!0,subtree:!0,attributes:!0})})}watch$1(ut,()=>yn());function uo(){var yf;let lf=(yf=K.value)==null?void 0:yf.querySelector('sl-tab-panel[name="preview"]');ot.value==="preview"&&W.height&&(lf.style.height=W.height)}function po(){var yf,cf;let lf=(yf=K.value)==null?void 0:yf.querySelector('sl-tab-panel[name="preview"]');if(ot.value==="preview"){let vf=(cf=K.value)==null?void 0:cf.querySelector("#juncture"),_f=lf.clientWidth/2,$f=document.createElement("div");$f.style.height=`${_f}px`;let xf=vf.querySelector("ve-footer");xf?vf.insertBefore($f,xf):vf.appendChild($f),lf.style.height=W.height||`${Math.max(_f/2,500)}px`,lf.style.overflowY="scroll"}else lf.style.height=""}function mo(){let lf=markdownToHtml(tt.value),yf=structureContent(lf),cf=elFromHtml(yf);Array.from((cf==null?void 0:cf.querySelectorAll("article > main > p"))||[]).forEach($f=>{$f.removeAttribute("data-id"),$f.removeAttribute("id"),$f.removeAttribute("class")});let vf=cf==null?void 0:cf.querySelector("main"),_f=vf==null?void 0:vf.firstElementChild;rt.value=(vf==null?void 0:vf.children.length)===1&&_f.tagName==="P"?_f.innerHTML:vf==null?void 0:vf.innerHTML}function wo(lf){var cf;let yf=tt.value;yf&&((cf=lf.dataTransfer)==null||cf.setData("text/plain",yf))}return(lf,yf)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:q,id:"main"},[F.collapsible?(openBlock(),createElementBlock("sl-details",{key:0,class:"custom-icons",open:W.open,draggable:W.disableDrag?null:"",onDragstart:wo},[_hoisted_2$1,_hoisted_3$1,createBaseVNode("div",_hoisted_4$1,[createBaseVNode("sl-tooltip",_hoisted_5$1,[createBaseVNode("div",_hoisted_6,[_hoisted_7,createBaseVNode("span",{innerHTML:W.label,class:"label"},null,8,_hoisted_9)])])]),createBaseVNode("sl-tab-group",null,[_hoisted_10,_hoisted_11,_hoisted_12,createBaseVNode("sl-tab-panel",_hoisted_13,[tt.value&&ot.value==="markdown"?(openBlock(),createElementBlock("ve-source-viewer",{key:0,draggable:W.disableDrag?null:""},toDisplayString(tt.value),9,_hoisted_14)):createCommentVNode("",!0)]),createBaseVNode("sl-tab-panel",_hoisted_15,[ot.value==="html"&&rt.value?(openBlock(),createElementBlock("ve-source-viewer",{key:0,textContent:toDisplayString(rt.value),language:"html",draggable:W.disableDrag?null:""},null,8,_hoisted_16)):createCommentVNode("",!0)]),createBaseVNode("sl-tab-panel",_hoisted_17,[ot.value==="preview"&&rt.value?(openBlock(),createElementBlock("div",{key:0,id:"juncture",style:{position:"relative"},draggable:W.disableDrag?null:"",onDragstart:wo},[createBaseVNode("ve-article",null,toDisplayString(rt.value),1)],40,_hoisted_18)):createCommentVNode("",!0)])])],40,_hoisted_1$1)):(openBlock(),createElementBlock("div",_hoisted_19,[createBaseVNode("sl-tab-group",null,[_hoisted_20,_hoisted_21,_hoisted_22,createBaseVNode("sl-tab-panel",_hoisted_23,[tt.value&&ot.value==="markdown"?(openBlock(),createElementBlock("ve-source-viewer",{key:0,draggable:W.disableDrag?null:""},toDisplayString(tt.value),9,_hoisted_24)):createCommentVNode("",!0)]),createBaseVNode("sl-tab-pane",_hoisted_25,[ot.value==="html"&&rt.value?(openBlock(),createElementBlock("ve-source-viewer",{key:0,textContent:toDisplayString(rt.value),language:"html",draggable:W.disableDrag?null:""},null,8,_hoisted_26)):createCommentVNode("",!0)]),createBaseVNode("sl-tab-panel",_hoisted_27,[ot.value==="preview"&&rt.value?(openBlock(),createElementBlock("div",{key:0,id:"juncture",style:{position:"relative"},draggable:W.disableDrag?null:"",onDragstart:wo},[createBaseVNode("ve-article",null,toDisplayString(rt.value),1)],40,_hoisted_28)):createCommentVNode("",!0)])])]))],512))}}),_style_0$2=`:root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}@supports (scrollbar-gutter: stable){.sl-scroll-lock{scrollbar-gutter:stable!important;overflow:hidden!important}}@supports not (scrollbar-gutter: stable){.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}*{box-sizing:border-box}:host{margin-top:1.5rem;border-radius:2px;border:.5px solid #ddd;margin-bottom:2rem}:host([collapsible]){border:none}#main{font-family:Roboto,sans-serif;margin-top:0}sl-tab-panel{--padding: 0}sl-tab::part(base){display:flex;align-items:center;gap:6px;padding:12px}#juncture{padding:12px;font-size:1.2em;line-height:1.3}sl-details::part(header){background-color:#f9f9f9}sl-details::part(summary){font-size:1rem}sl-details::part(content){border-top:1px solid #ddd;padding:0}sl-details.custom-icons::part(summary-icon){rotate:none}sl-tab sl-icon{font-size:24px;margin-right:6px}.label{margin-left:12px;color:#555;font-weight:400}pre{display:none}
 `,Snippet=_export_sfc(_sfc_main$2,[["styles",[_style_0$2]]]);var dist={exports:{}},Sister;/**
 * @link https://github.com/gajus/sister for the canonical source repository
 * @license https://github.com/gajus/sister/blob/master/LICENSE BSD 3-Clause
-*/Sister=function(){var F={},W={};return F.on=function(q,K){var X={name:q,handler:K};return W[q]=W[q]||[],W[q].unshift(X),X},F.off=function(q){var K=W[q.name].indexOf(q);K!==-1&&W[q.name].splice(K,1)},F.trigger=function(q,K){var X=W[q],tt;if(X)for(tt=X.length;tt--;)X[tt].handler(K)},F};var sister=Sister,YouTubePlayer$1={exports:{}},browser={exports:{}},ms,hasRequiredMs;function requireMs(){if(hasRequiredMs)return ms;hasRequiredMs=1;var F=1e3,W=F*60,q=W*60,K=q*24,X=K*7,tt=K*365.25;ms=function(uo,po){po=po||{};var mo=typeof uo;if(mo==="string"&&uo.length>0)return rt(uo);if(mo==="number"&&isFinite(uo))return po.long?ut(uo):ot(uo);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(uo))};function rt(uo){if(uo=String(uo),!(uo.length>100)){var po=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(uo);if(po){var mo=parseFloat(po[1]),wo=(po[2]||"ms").toLowerCase();switch(wo){case"years":case"year":case"yrs":case"yr":case"y":return mo*tt;case"weeks":case"week":case"w":return mo*X;case"days":case"day":case"d":return mo*K;case"hours":case"hour":case"hrs":case"hr":case"h":return mo*q;case"minutes":case"minute":case"mins":case"min":case"m":return mo*W;case"seconds":case"second":case"secs":case"sec":case"s":return mo*F;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return mo;default:return}}}}function ot(uo){var po=Math.abs(uo);return po>=K?Math.round(uo/K)+"d":po>=q?Math.round(uo/q)+"h":po>=W?Math.round(uo/W)+"m":po>=F?Math.round(uo/F)+"s":uo+"ms"}function ut(uo){var po=Math.abs(uo);return po>=K?yn(uo,po,K,"day"):po>=q?yn(uo,po,q,"hour"):po>=W?yn(uo,po,W,"minute"):po>=F?yn(uo,po,F,"second"):uo+" ms"}function yn(uo,po,mo,wo){var lf=po>=mo*1.5;return Math.round(uo/mo)+" "+wo+(lf?"s":"")}return ms}function setup(F){q.debug=q,q.default=q,q.coerce=ut,q.disable=tt,q.enable=X,q.enabled=rt,q.humanize=requireMs(),q.destroy=yn,Object.keys(F).forEach(uo=>{q[uo]=F[uo]}),q.names=[],q.skips=[],q.formatters={};function W(uo){let po=0;for(let mo=0;mo{if(Cf==="%%")return"%";wf++;const Bf=q.formatters[Af];if(typeof Bf=="function"){const Hf=cf[wf];Cf=Bf.call(vf,Hf),cf.splice(wf,1),wf--}return Cf}),q.formatArgs.call(vf,cf),(vf.log||q.log).apply(vf,cf)}return yf.namespace=uo,yf.useColors=q.useColors(),yf.color=q.selectColor(uo),yf.extend=K,yf.destroy=q.destroy,Object.defineProperty(yf,"enabled",{enumerable:!0,configurable:!1,get:()=>mo!==null?mo:(wo!==q.namespaces&&(wo=q.namespaces,lf=q.enabled(uo)),lf),set:cf=>{mo=cf}}),typeof q.init=="function"&&q.init(yf),yf}function K(uo,po){const mo=q(this.namespace+(typeof po>"u"?":":po)+uo);return mo.log=this.log,mo}function X(uo){q.save(uo),q.namespaces=uo,q.names=[],q.skips=[];let po;const mo=(typeof uo=="string"?uo:"").split(/[\s,]+/),wo=mo.length;for(po=0;po"-"+po)].join(",");return q.enable(""),uo}function rt(uo){if(uo[uo.length-1]==="*")return!0;let po,mo;for(po=0,mo=q.skips.length;po{let ut=!1;return()=>{ut||(ut=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),W.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function q(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function K(ut){if(ut[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+ut[0]+(this.useColors?"%c ":" ")+"+"+F.exports.humanize(this.diff),!this.useColors)return;const yn="color: "+this.color;ut.splice(1,0,yn,"color: inherit");let uo=0,po=0;ut[0].replace(/%[a-zA-Z%]/g,mo=>{mo!=="%%"&&(uo++,mo==="%c"&&(po=uo))}),ut.splice(po,0,yn)}W.log=console.debug||console.log||(()=>{});function X(ut){try{ut?W.storage.setItem("debug",ut):W.storage.removeItem("debug")}catch{}}function tt(){let ut;try{ut=W.storage.getItem("debug")}catch{}return!ut&&typeof process<"u"&&"env"in process&&(ut={version:"3.1.0"}.DEBUG),ut}function rt(){try{return localStorage}catch{}}F.exports=common(W);const{formatters:ot}=F.exports;ot.j=function(ut){try{return JSON.stringify(ut)}catch(yn){return"[UnexpectedJSONParseError]: "+yn.message}}})(browser,browser.exports);var browserExports=browser.exports,FunctionStateMap={exports:{}},PlayerStates={exports:{}};(function(F,W){Object.defineProperty(W,"__esModule",{value:!0}),W.default={BUFFERING:3,ENDED:0,PAUSED:2,PLAYING:1,UNSTARTED:-1,VIDEO_CUED:5},F.exports=W.default})(PlayerStates,PlayerStates.exports);var PlayerStatesExports=PlayerStates.exports;(function(F,W){Object.defineProperty(W,"__esModule",{value:!0});var q=PlayerStatesExports,K=X(q);function X(tt){return tt&&tt.__esModule?tt:{default:tt}}W.default={pauseVideo:{acceptableStates:[K.default.ENDED,K.default.PAUSED],stateChangeRequired:!1},playVideo:{acceptableStates:[K.default.ENDED,K.default.PLAYING],stateChangeRequired:!1},seekTo:{acceptableStates:[K.default.ENDED,K.default.PLAYING,K.default.PAUSED],stateChangeRequired:!0,timeout:3e3}},F.exports=W.default})(FunctionStateMap,FunctionStateMap.exports);var FunctionStateMapExports=FunctionStateMap.exports,eventNames={exports:{}};(function(F,W){Object.defineProperty(W,"__esModule",{value:!0}),W.default=["ready","stateChange","playbackQualityChange","playbackRateChange","error","apiChange","volumeChange"],F.exports=W.default})(eventNames,eventNames.exports);var eventNamesExports=eventNames.exports,functionNames={exports:{}};(function(F,W){Object.defineProperty(W,"__esModule",{value:!0}),W.default=["cueVideoById","loadVideoById","cueVideoByUrl","loadVideoByUrl","playVideo","pauseVideo","stopVideo","getVideoLoadedFraction","cuePlaylist","loadPlaylist","nextVideo","previousVideo","playVideoAt","setShuffle","setLoop","getPlaylist","getPlaylistIndex","setOption","mute","unMute","isMuted","setVolume","getVolume","seekTo","getPlayerState","getPlaybackRate","setPlaybackRate","getAvailablePlaybackRates","getPlaybackQuality","setPlaybackQuality","getAvailableQualityLevels","getCurrentTime","getDuration","removeEventListener","getVideoUrl","getVideoEmbedCode","getOptions","getOption","addEventListener","destroy","setSize","getIframe","getSphericalProperties","setSphericalProperties"],F.exports=W.default})(functionNames,functionNames.exports);var functionNamesExports=functionNames.exports;(function(F,W){Object.defineProperty(W,"__esModule",{value:!0});var q=browserExports,K=uo(q),X=FunctionStateMapExports,tt=uo(X),rt=eventNamesExports,ot=uo(rt),ut=functionNamesExports,yn=uo(ut);function uo(wo){return wo&&wo.__esModule?wo:{default:wo}}const po=(0,K.default)("youtube-player"),mo={};mo.proxyEvents=wo=>{const lf={};for(const yf of ot.default){const cf="on"+yf.slice(0,1).toUpperCase()+yf.slice(1);lf[cf]=vf=>{po('event "%s"',cf,vf),wo.trigger(yf,vf)}}return lf},mo.promisifyPlayer=(wo,lf=!1)=>{const yf={};for(const cf of yn.default)lf&&tt.default[cf]?yf[cf]=(...vf)=>wo.then(_f=>{const $f=tt.default[cf],wf=_f.getPlayerState(),Pf=_f[cf].apply(_f,vf);return $f.stateChangeRequired||Array.isArray($f.acceptableStates)&&!$f.acceptableStates.includes(wf)?new Promise(Cf=>{const Af=()=>{const Bf=_f.getPlayerState();let Hf;typeof $f.timeout=="number"&&(Hf=setTimeout(()=>{_f.removeEventListener("onStateChange",Af),Cf()},$f.timeout)),Array.isArray($f.acceptableStates)&&$f.acceptableStates.includes(Bf)&&(_f.removeEventListener("onStateChange",Af),clearTimeout(Hf),Cf())};_f.addEventListener("onStateChange",Af)}).then(()=>Pf):Pf}):yf[cf]=(...vf)=>wo.then(_f=>_f[cf].apply(_f,vf));return yf},W.default=mo,F.exports=W.default})(YouTubePlayer$1,YouTubePlayer$1.exports);var YouTubePlayerExports=YouTubePlayer$1.exports,loadYouTubeIframeApi={exports:{}},loadScript=function F(W,q,K){var X=document.head||document.getElementsByTagName("head")[0],tt=document.createElement("script");typeof q=="function"&&(K=q,q={}),q=q||{},K=K||function(){},tt.type=q.type||"text/javascript",tt.charset=q.charset||"utf8",tt.async="async"in q?!!q.async:!0,tt.src=W,q.attrs&&setAttributes(tt,q.attrs),q.text&&(tt.text=""+q.text);var rt="onload"in tt?stdOnEnd:ieOnEnd;rt(tt,K),tt.onload||stdOnEnd(tt,K),X.appendChild(tt)};function setAttributes(F,W){for(var q in W)F.setAttribute(q,W[q])}function stdOnEnd(F,W){F.onload=function(){this.onerror=this.onload=null,W(null,F)},F.onerror=function(){this.onerror=this.onload=null,W(new Error("Failed to load "+this.src),F)}}function ieOnEnd(F,W){F.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,W(null,F))}}(function(F,W){Object.defineProperty(W,"__esModule",{value:!0});var q=loadScript,K=X(q);function X(tt){return tt&&tt.__esModule?tt:{default:tt}}W.default=tt=>new Promise(ot=>{if(window.YT&&window.YT.Player&&window.YT.Player instanceof Function){ot(window.YT);return}else{const yn=window.location.protocol==="http:"?"http:":"https:";(0,K.default)(yn+"//www.youtube.com/iframe_api",uo=>{uo&&tt.trigger("error",uo)})}const ut=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{ut&&ut(),ot(window.YT)}}),F.exports=W.default})(loadYouTubeIframeApi,loadYouTubeIframeApi.exports);var loadYouTubeIframeApiExports=loadYouTubeIframeApi.exports;(function(F,W){Object.defineProperty(W,"__esModule",{value:!0});var q=sister,K=ut(q),X=YouTubePlayerExports,tt=ut(X),rt=loadYouTubeIframeApiExports,ot=ut(rt);function ut(uo){return uo&&uo.__esModule?uo:{default:uo}}let yn;W.default=(uo,po={},mo=!1)=>{const wo=(0,K.default)();if(yn||(yn=(0,ot.default)(wo)),po.events)throw new Error("Event handlers cannot be overwritten.");if(typeof uo=="string"&&!document.getElementById(uo))throw new Error('Element "'+uo+'" does not exist.');po.events=tt.default.proxyEvents(wo);const lf=new Promise(cf=>{typeof uo=="object"&&uo.playVideo instanceof Function?cf(uo):yn.then(vf=>{const _f=new vf.Player(uo,po);return wo.on("ready",()=>{cf(_f)}),null})}),yf=tt.default.promisifyPlayer(lf,mo);return yf.on=wo.on,yf.off=wo.off,yf},F.exports=W.default})(dist,dist.exports);var distExports=dist.exports;const YouTubePlayer=getDefaultExportFromCjs$3(distExports),_hoisted_1=createBaseVNode("div",{class:"player",style:{position:"absolute",width:"100%",height:"100%",top:0,left:0,zIndex:1}},null,-1),_hoisted_2=[_hoisted_1],_hoisted_3=["muted","autoplay","poster"],_hoisted_4=["src","type"],_hoisted_5=["innerHTML"],_sfc_main$1=defineComponent({__name:"Video.ce",props:{alt:{type:String},autoplay:{type:Boolean,default:!1},caption:{type:String,default:null},class:{type:String},end:{type:String},fit:{type:String},height:{type:Number},id:{type:String},muted:{type:Boolean,default:!0},noCaption:{type:Boolean},poster:{type:String},src:{type:String},start:{type:String},sync:{type:Boolean,default:!1},vid:{type:String},width:{type:Number}},setup(F){var ng,og,vg,Dp,Lp;const W=F,q=ref(null),K=computed(()=>{var xp;return(xp=q==null?void 0:q.value)==null?void 0:xp.parentNode}),X=computed(()=>{var xp,kp;return(kp=(xp=q.value)==null?void 0:xp.getRootNode())==null?void 0:kp.host}),tt=ref(W.caption&&Jp(W.caption)),rt=ref(null),ot=ref(null);watch$1(rt,xp=>{vf=xp,vf.addEventListener("play",()=>{wf.value||(wf.value=!0,W.start&&Ip(W.start,W.end))}),Yf()});const ut=computed(()=>{var xp;return((xp=W.src)==null?void 0:xp.includes("youtube.com"))||W.id||W.vid||/^[A-Za-z0-9-]+$/.test(W.src||"")});ref(!1);const yn=computed(()=>{var xp;return(xp=W.src)==null?void 0:xp.includes("vimeo.com")}),uo=computed(()=>!ut.value&&!yn.value);watch$1(uo,async()=>{!po.value&&W.src&&(po.value=await getManifest(W.src))});const po=ref(null),mo=computed(()=>po.value?getItemInfo(po.value):null),wo=computed(()=>{var xp;return(xp=mo.value)==null?void 0:xp.id}),lf=computed(()=>{var xp;return ut.value?W.id||W.vid?W.id||W.vid:(xp=W.src)!=null&&xp.includes("youtube.com")?new URL(W.src).searchParams.get("v"):W.src:null}),yf=ref(0);computed(()=>`url("https://img.youtube.com/vi/${lf.value}/maxresdefault.jpg")`);const cf=computed(()=>{var kp;let xp=(kp=wo.value)==null?void 0:kp.split("#")[0].split(".").pop();return xp==="mp4"?"video/mp4":xp==="webm"?"video/webm":"application/ogg"});let vf;const _f=ref(!1),$f=ref(!1),wf=ref(!1),Pf=ref(W.width||((ng=X.value)==null?void 0:ng.style.width)&&((og=q.value)==null?void 0:og.clientWidth)),Cf=ref(W.height||((vg=X.value)==null?void 0:vg.style.height)&&((Dp=q.value)==null?void 0:Dp.clientHeight)),Af=ref(Pf.value||((Lp=X.value)==null?void 0:Lp.clientWidth)),Bf=ref(Cf.value||Af.value);watch$1(Bf,xp=>{q.value&&(q.value.style.height=`${xp}px`)});function Hf(){var xp,kp,lp;Pf.value=W.width||X.value.style.width&&((xp=q.value)==null?void 0:xp.clientWidth),Cf.value=W.height||X.value.style.height&&((kp=q.value)==null?void 0:kp.clientHeight),Af.value=Pf.value||((lp=q.value)==null?void 0:lp.clientWidth),Bf.value=Cf.value||yf.value||Af.value}watch$1(X,async()=>{new ResizeObserver(()=>Hf()).observe(X.value.parentElement),(ut.value?"youtube":yn.value?"vimeo":"html5")==="html5"&&!po.value&&W.src&&(po.value=await getManifest(W.src)),Lf(),EventBus$1.on("seekto",kp=>Ip(kp.start,kp.end)),lf.value&&await Nf(),W.sync&&Df()});function Df(){let xp=Array.from(document.querySelectorAll("p[data-head]")).map(lp=>{let[Of,...qf]=lp.dataset.head.split(/\s+/),cp=document.createElement("a");if(cp.classList.add("play"),cp.href="javascript:;",cp.textContent=Of,cp.addEventListener("click",()=>{Ip(lp.dataset.head)}),lp.insertBefore(document.createElement("br"),lp.firstChild),qf.length>0){let hp=document.createElement("span");hp.classList.add("headline"),hp.textContent=qf.join(" "),lp.insertBefore(hp,lp.firstChild)}return lp.insertBefore(cp,lp.firstChild),{start:vp(lp.dataset.head.split(/\s+/)[0]),id:lp.id}}),kp=null;EventBus$1.on("video-at-time",lp=>{let Of=lp.time,qf=xp.find(cp=>{var hp;return cp.start<=Of&&(((hp=xp[xp.indexOf(cp)+1])==null?void 0:hp.start)||1/0)>Of});if(qf&&(qf==null?void 0:qf.id)!==kp){kp=qf.id;let cp=document.getElementById(qf.id);document.querySelectorAll("p.active").forEach(hp=>hp.classList.remove("active")),cp&&cp.classList.add("active"),cp&&cp.scrollIntoView({behavior:"smooth",block:"center"})}})}function Lf(){var kp;let xp=(kp=X.value)==null?void 0:kp.parentElement;for(;xp;)Array.from(xp.querySelectorAll("a")).forEach(async lp=>{var hp;let qf=new URL(lp.href).pathname.split("/").filter($p=>$p).map($p=>$p.toLowerCase()).map($p=>$p==="playat"?"play":$p),cp=qf.indexOf("play");if(cp>=0){let $p=qf[cp+1],Vp=qf.slice(cp+2).filter(Yp=>Yp==="click"||Yp==="mouseover")[0]||"click",bp=qf.slice(cp+2).filter(Yp=>Yp!=="click"&&Yp!=="mouseover")[0],Ep,_p,Mp=lp.parentElement;for(;Mp&&!_p;)_p=Mp.dataset.id,Mp=Mp.parentElement;if(_p){let Yp=(hp=X.value)==null?void 0:hp.dataset.id;if(Yp&&Yp!==_p)return}if(bp&&(Ep=document.getElementById(bp),!Ep)||(Ep=kf(lp,"ve-video"),Ep!==X.value))return;lp.classList.add("play"),lp.href="javascript:;",lp.setAttribute("data-play",$p),lp.addEventListener(Vp,Yp=>{var xg;let[ug,hg]=((xg=Yp.target.getAttribute("data-play"))==null?void 0:xg.split(/\s+/))||[];ug&&Ip(ug,hg)})}}),xp=xp.parentElement}function kf(xp,kp){let lp,Of=xp.parentElement;for(;Of&&!lp;)lp=Of.querySelector(kp),Of=Of.parentElement;return lp}async function Nf(){var kp;let xp=(kp=K.value)==null?void 0:kp.querySelector("#youtube-player");if(lf.value&&xp){let lp=await yp(lf.value);W.caption===null&&(tt.value=lp.title),X.value&&new ResizeObserver(()=>{var $p;let qf=xp==null?void 0:xp.clientWidth,cp=Math.round(qf/lp.aspect),hp=(($p=ot.value)==null?void 0:$p.clientHeight)||0;yf.value=Cf.value||cp+hp,q.value&&(q.value.style.height=`${yf.value}px`)}).observe(X.value),xp.style.height=yf.value+"px";let Of=xp.querySelector(".player");vf=YouTubePlayer(Of,{videoId:lf.value,width:Of==null?void 0:Of.clientWidth,playerVars:{color:"white",rel:0,modestbranding:1,playsinline:1}}),vf.on("ready",qf=>{Yf(),vf.on("stateChange",cp=>{cp.data===1&&(wf.value||(wf.value=!0,W.start&&Ip(W.start,W.end)))}),W.autoplay&&(vf.playVideo(),W.start&&Ip(W.start,W.end))})}}async function Yf(){ap().then(xp=>EventBus$1.emit("video-at-time",{time:Math.round(xp)})),setInterval(async()=>{_f.value=await rp(),$f.value=await Gf(),$f.value&&ap().then(xp=>EventBus$1.emit("video-at-time",{time:Math.round(xp)}))},1e3)}async function Gf(){return ut.value?await vf.getPlayerState()===1:yn.value?!(await vf.getEnded()||await vf.getPaused()):uo?!(vf.ended||vf.paused):!1}async function rp(){return ut.value?await vf.isMuted():yn.value?await vf.getMuted():await W.muted}function ip(xp){ut.value?xp?vf.mute():vf.unMute():yn.value?vf.setMuted(xp):uo.value&&(vf.muted=xp)}async function ap(){if(ut.value)return vf.getCurrentTime();if(yn.value)return await vf.getCurrentTime();if(uo.value)return vf.currentTime}async function yp(xp){let lp=`https://youtube.com/oembed?url=${encodeURI(`https://www.youtube.com/watch?v=${xp}`)}&format=json`,qf=await(await fetch(lp)).json();return qf.aspect=qf.width/qf.height,qf}function vp(xp){var kp=xp.split(":").slice(0,3).map(qf=>parseInt(qf,10));let lp=0,Of=1;for(;kp.length>0;){let qf=kp.pop()||0;lp+=Of*qf,Of*=60}return lp}let Np=null,jp=!1;function Ip(xp,kp=""){let lp=vp(xp),Of=kp?vp(kp)+1:-1;Np&&(clearTimeout(Np),Np=null);let qf=_f.value;ut.value?(vf.playVideo(),vf.seekTo(lp).then(cp=>{Of>=lp&&(Np=setTimeout(()=>{vf.pauseVideo().then(hp=>{Np=null,!qf&&jp&&ip(!1)})},Of===lp?200:(Of-lp)*1e3))})):yn.value?(vf.setCurrentTime(lp),vf.play().then(cp=>{Of>=lp&&(Np=setTimeout(()=>{vf.pause().then(hp=>{Np=null,!qf&&jp&&ip(!1)})},Of===lp?200:(Of-lp)*1e3))})):uo.value&&setTimeout(()=>{vf.play(),vf.currentTime=lp,Of>=lp&&(Np=setTimeout(()=>{Np=null,vf.pause(),!qf&&jp&&ip(!1)},Of===lp?200:(Of-lp)*1e3))},200)}function Jp(xp){return xp?marked.parse(xp).slice(3,-5):""}return(xp,kp)=>(openBlock(),createElementBlock("div",{ref_key:"main",ref:q,class:"main"},[ut.value?(openBlock(),createElementBlock("div",{key:0,id:"youtube-player","ref-":"youtubePlayer",style:normalizeStyle({width:"100%",height:yf.value+"px",position:"relative"})},_hoisted_2,4)):createCommentVNode("",!0),po.value?(openBlock(),createElementBlock("video",{key:1,ref_key:"html5Player",ref:rt,controls:"",playsinline:"",id:"html5-player",muted:W.muted,autoplay:W.autoplay,poster:W.poster},[createBaseVNode("source",{src:wo.value,type:cf.value},null,8,_hoisted_4)],8,_hoisted_3)):createCommentVNode("",!0),tt.value?(openBlock(),createElementBlock("div",{key:2,class:"caption",ref_key:"captionEl",ref:ot,innerHTML:tt.value},null,8,_hoisted_5)):createCommentVNode("",!0)],512))}}),_style_0$1=`*{box-sizing:border-box}.main{display:flex;flex-direction:column;background-color:inherit}video{width:100%;height:auto}#youtube-player{flex-grow:1}.caption{padding:.3em;width:100%;font-size:1em;font-weight:500;text-align:left;line-height:1.3;margin-bottom:.3em}
+*/Sister=function(){var F={},W={};return F.on=function(q,K){var X={name:q,handler:K};return W[q]=W[q]||[],W[q].unshift(X),X},F.off=function(q){var K=W[q.name].indexOf(q);K!==-1&&W[q.name].splice(K,1)},F.trigger=function(q,K){var X=W[q],tt;if(X)for(tt=X.length;tt--;)X[tt].handler(K)},F};var sister=Sister,YouTubePlayer$1={exports:{}},browser={exports:{}},ms,hasRequiredMs;function requireMs(){if(hasRequiredMs)return ms;hasRequiredMs=1;var F=1e3,W=F*60,q=W*60,K=q*24,X=K*7,tt=K*365.25;ms=function(uo,po){po=po||{};var mo=typeof uo;if(mo==="string"&&uo.length>0)return rt(uo);if(mo==="number"&&isFinite(uo))return po.long?ut(uo):ot(uo);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(uo))};function rt(uo){if(uo=String(uo),!(uo.length>100)){var po=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(uo);if(po){var mo=parseFloat(po[1]),wo=(po[2]||"ms").toLowerCase();switch(wo){case"years":case"year":case"yrs":case"yr":case"y":return mo*tt;case"weeks":case"week":case"w":return mo*X;case"days":case"day":case"d":return mo*K;case"hours":case"hour":case"hrs":case"hr":case"h":return mo*q;case"minutes":case"minute":case"mins":case"min":case"m":return mo*W;case"seconds":case"second":case"secs":case"sec":case"s":return mo*F;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return mo;default:return}}}}function ot(uo){var po=Math.abs(uo);return po>=K?Math.round(uo/K)+"d":po>=q?Math.round(uo/q)+"h":po>=W?Math.round(uo/W)+"m":po>=F?Math.round(uo/F)+"s":uo+"ms"}function ut(uo){var po=Math.abs(uo);return po>=K?yn(uo,po,K,"day"):po>=q?yn(uo,po,q,"hour"):po>=W?yn(uo,po,W,"minute"):po>=F?yn(uo,po,F,"second"):uo+" ms"}function yn(uo,po,mo,wo){var lf=po>=mo*1.5;return Math.round(uo/mo)+" "+wo+(lf?"s":"")}return ms}function setup(F){q.debug=q,q.default=q,q.coerce=ut,q.disable=tt,q.enable=X,q.enabled=rt,q.humanize=requireMs(),q.destroy=yn,Object.keys(F).forEach(uo=>{q[uo]=F[uo]}),q.names=[],q.skips=[],q.formatters={};function W(uo){let po=0;for(let mo=0;mo{if(Cf==="%%")return"%";xf++;const Bf=q.formatters[Pf];if(typeof Bf=="function"){const Hf=cf[xf];Cf=Bf.call(vf,Hf),cf.splice(xf,1),xf--}return Cf}),q.formatArgs.call(vf,cf),(vf.log||q.log).apply(vf,cf)}return yf.namespace=uo,yf.useColors=q.useColors(),yf.color=q.selectColor(uo),yf.extend=K,yf.destroy=q.destroy,Object.defineProperty(yf,"enabled",{enumerable:!0,configurable:!1,get:()=>mo!==null?mo:(wo!==q.namespaces&&(wo=q.namespaces,lf=q.enabled(uo)),lf),set:cf=>{mo=cf}}),typeof q.init=="function"&&q.init(yf),yf}function K(uo,po){const mo=q(this.namespace+(typeof po>"u"?":":po)+uo);return mo.log=this.log,mo}function X(uo){q.save(uo),q.namespaces=uo,q.names=[],q.skips=[];let po;const mo=(typeof uo=="string"?uo:"").split(/[\s,]+/),wo=mo.length;for(po=0;po"-"+po)].join(",");return q.enable(""),uo}function rt(uo){if(uo[uo.length-1]==="*")return!0;let po,mo;for(po=0,mo=q.skips.length;po{let ut=!1;return()=>{ut||(ut=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),W.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function q(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function K(ut){if(ut[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+ut[0]+(this.useColors?"%c ":" ")+"+"+F.exports.humanize(this.diff),!this.useColors)return;const yn="color: "+this.color;ut.splice(1,0,yn,"color: inherit");let uo=0,po=0;ut[0].replace(/%[a-zA-Z%]/g,mo=>{mo!=="%%"&&(uo++,mo==="%c"&&(po=uo))}),ut.splice(po,0,yn)}W.log=console.debug||console.log||(()=>{});function X(ut){try{ut?W.storage.setItem("debug",ut):W.storage.removeItem("debug")}catch{}}function tt(){let ut;try{ut=W.storage.getItem("debug")}catch{}return!ut&&typeof process<"u"&&"env"in process&&(ut={version:"3.1.0"}.DEBUG),ut}function rt(){try{return localStorage}catch{}}F.exports=common(W);const{formatters:ot}=F.exports;ot.j=function(ut){try{return JSON.stringify(ut)}catch(yn){return"[UnexpectedJSONParseError]: "+yn.message}}})(browser,browser.exports);var browserExports=browser.exports,FunctionStateMap={exports:{}},PlayerStates={exports:{}};(function(F,W){Object.defineProperty(W,"__esModule",{value:!0}),W.default={BUFFERING:3,ENDED:0,PAUSED:2,PLAYING:1,UNSTARTED:-1,VIDEO_CUED:5},F.exports=W.default})(PlayerStates,PlayerStates.exports);var PlayerStatesExports=PlayerStates.exports;(function(F,W){Object.defineProperty(W,"__esModule",{value:!0});var q=PlayerStatesExports,K=X(q);function X(tt){return tt&&tt.__esModule?tt:{default:tt}}W.default={pauseVideo:{acceptableStates:[K.default.ENDED,K.default.PAUSED],stateChangeRequired:!1},playVideo:{acceptableStates:[K.default.ENDED,K.default.PLAYING],stateChangeRequired:!1},seekTo:{acceptableStates:[K.default.ENDED,K.default.PLAYING,K.default.PAUSED],stateChangeRequired:!0,timeout:3e3}},F.exports=W.default})(FunctionStateMap,FunctionStateMap.exports);var FunctionStateMapExports=FunctionStateMap.exports,eventNames={exports:{}};(function(F,W){Object.defineProperty(W,"__esModule",{value:!0}),W.default=["ready","stateChange","playbackQualityChange","playbackRateChange","error","apiChange","volumeChange"],F.exports=W.default})(eventNames,eventNames.exports);var eventNamesExports=eventNames.exports,functionNames={exports:{}};(function(F,W){Object.defineProperty(W,"__esModule",{value:!0}),W.default=["cueVideoById","loadVideoById","cueVideoByUrl","loadVideoByUrl","playVideo","pauseVideo","stopVideo","getVideoLoadedFraction","cuePlaylist","loadPlaylist","nextVideo","previousVideo","playVideoAt","setShuffle","setLoop","getPlaylist","getPlaylistIndex","setOption","mute","unMute","isMuted","setVolume","getVolume","seekTo","getPlayerState","getPlaybackRate","setPlaybackRate","getAvailablePlaybackRates","getPlaybackQuality","setPlaybackQuality","getAvailableQualityLevels","getCurrentTime","getDuration","removeEventListener","getVideoUrl","getVideoEmbedCode","getOptions","getOption","addEventListener","destroy","setSize","getIframe","getSphericalProperties","setSphericalProperties"],F.exports=W.default})(functionNames,functionNames.exports);var functionNamesExports=functionNames.exports;(function(F,W){Object.defineProperty(W,"__esModule",{value:!0});var q=browserExports,K=uo(q),X=FunctionStateMapExports,tt=uo(X),rt=eventNamesExports,ot=uo(rt),ut=functionNamesExports,yn=uo(ut);function uo(wo){return wo&&wo.__esModule?wo:{default:wo}}const po=(0,K.default)("youtube-player"),mo={};mo.proxyEvents=wo=>{const lf={};for(const yf of ot.default){const cf="on"+yf.slice(0,1).toUpperCase()+yf.slice(1);lf[cf]=vf=>{po('event "%s"',cf,vf),wo.trigger(yf,vf)}}return lf},mo.promisifyPlayer=(wo,lf=!1)=>{const yf={};for(const cf of yn.default)lf&&tt.default[cf]?yf[cf]=(...vf)=>wo.then(_f=>{const $f=tt.default[cf],xf=_f.getPlayerState(),Af=_f[cf].apply(_f,vf);return $f.stateChangeRequired||Array.isArray($f.acceptableStates)&&!$f.acceptableStates.includes(xf)?new Promise(Cf=>{const Pf=()=>{const Bf=_f.getPlayerState();let Hf;typeof $f.timeout=="number"&&(Hf=setTimeout(()=>{_f.removeEventListener("onStateChange",Pf),Cf()},$f.timeout)),Array.isArray($f.acceptableStates)&&$f.acceptableStates.includes(Bf)&&(_f.removeEventListener("onStateChange",Pf),clearTimeout(Hf),Cf())};_f.addEventListener("onStateChange",Pf)}).then(()=>Af):Af}):yf[cf]=(...vf)=>wo.then(_f=>_f[cf].apply(_f,vf));return yf},W.default=mo,F.exports=W.default})(YouTubePlayer$1,YouTubePlayer$1.exports);var YouTubePlayerExports=YouTubePlayer$1.exports,loadYouTubeIframeApi={exports:{}},loadScript=function F(W,q,K){var X=document.head||document.getElementsByTagName("head")[0],tt=document.createElement("script");typeof q=="function"&&(K=q,q={}),q=q||{},K=K||function(){},tt.type=q.type||"text/javascript",tt.charset=q.charset||"utf8",tt.async="async"in q?!!q.async:!0,tt.src=W,q.attrs&&setAttributes(tt,q.attrs),q.text&&(tt.text=""+q.text);var rt="onload"in tt?stdOnEnd:ieOnEnd;rt(tt,K),tt.onload||stdOnEnd(tt,K),X.appendChild(tt)};function setAttributes(F,W){for(var q in W)F.setAttribute(q,W[q])}function stdOnEnd(F,W){F.onload=function(){this.onerror=this.onload=null,W(null,F)},F.onerror=function(){this.onerror=this.onload=null,W(new Error("Failed to load "+this.src),F)}}function ieOnEnd(F,W){F.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,W(null,F))}}(function(F,W){Object.defineProperty(W,"__esModule",{value:!0});var q=loadScript,K=X(q);function X(tt){return tt&&tt.__esModule?tt:{default:tt}}W.default=tt=>new Promise(ot=>{if(window.YT&&window.YT.Player&&window.YT.Player instanceof Function){ot(window.YT);return}else{const yn=window.location.protocol==="http:"?"http:":"https:";(0,K.default)(yn+"//www.youtube.com/iframe_api",uo=>{uo&&tt.trigger("error",uo)})}const ut=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{ut&&ut(),ot(window.YT)}}),F.exports=W.default})(loadYouTubeIframeApi,loadYouTubeIframeApi.exports);var loadYouTubeIframeApiExports=loadYouTubeIframeApi.exports;(function(F,W){Object.defineProperty(W,"__esModule",{value:!0});var q=sister,K=ut(q),X=YouTubePlayerExports,tt=ut(X),rt=loadYouTubeIframeApiExports,ot=ut(rt);function ut(uo){return uo&&uo.__esModule?uo:{default:uo}}let yn;W.default=(uo,po={},mo=!1)=>{const wo=(0,K.default)();if(yn||(yn=(0,ot.default)(wo)),po.events)throw new Error("Event handlers cannot be overwritten.");if(typeof uo=="string"&&!document.getElementById(uo))throw new Error('Element "'+uo+'" does not exist.');po.events=tt.default.proxyEvents(wo);const lf=new Promise(cf=>{typeof uo=="object"&&uo.playVideo instanceof Function?cf(uo):yn.then(vf=>{const _f=new vf.Player(uo,po);return wo.on("ready",()=>{cf(_f)}),null})}),yf=tt.default.promisifyPlayer(lf,mo);return yf.on=wo.on,yf.off=wo.off,yf},F.exports=W.default})(dist,dist.exports);var distExports=dist.exports;const YouTubePlayer=getDefaultExportFromCjs$3(distExports),_hoisted_1=createBaseVNode("div",{class:"player",style:{position:"absolute",width:"100%",height:"100%",top:0,left:0,zIndex:1}},null,-1),_hoisted_2=[_hoisted_1],_hoisted_3=["muted","autoplay","poster"],_hoisted_4=["src","type"],_hoisted_5=["innerHTML"],_sfc_main$1=defineComponent({__name:"Video.ce",props:{alt:{type:String},autoplay:{type:Boolean,default:!1},caption:{type:String,default:null},class:{type:String},end:{type:String},fit:{type:String},height:{type:Number},id:{type:String},muted:{type:Boolean,default:!0},noCaption:{type:Boolean},poster:{type:String},src:{type:String},start:{type:String},sync:{type:Boolean,default:!1},vid:{type:String},width:{type:Number}},setup(F){var ng,og,vg,Dp,Lp;const W=F,q=ref(null),K=computed(()=>{var xp;return(xp=q==null?void 0:q.value)==null?void 0:xp.parentNode}),X=computed(()=>{var xp,kp;return(kp=(xp=q.value)==null?void 0:xp.getRootNode())==null?void 0:kp.host}),tt=ref(W.caption&&Jp(W.caption)),rt=ref(null),ot=ref(null);watch$1(rt,xp=>{vf=xp,vf.addEventListener("play",()=>{xf.value||(xf.value=!0,W.start&&Ip(W.start,W.end))}),Yf()});const ut=computed(()=>{var xp;return((xp=W.src)==null?void 0:xp.includes("youtube.com"))||W.id||W.vid||/^[A-Za-z0-9-]+$/.test(W.src||"")});ref(!1);const yn=computed(()=>{var xp;return(xp=W.src)==null?void 0:xp.includes("vimeo.com")}),uo=computed(()=>!ut.value&&!yn.value);watch$1(uo,async()=>{!po.value&&W.src&&(po.value=await getManifest(W.src))});const po=ref(null),mo=computed(()=>po.value?getItemInfo(po.value):null),wo=computed(()=>{var xp;return(xp=mo.value)==null?void 0:xp.id}),lf=computed(()=>{var xp;return ut.value?W.id||W.vid?W.id||W.vid:(xp=W.src)!=null&&xp.includes("youtube.com")?new URL(W.src).searchParams.get("v"):W.src:null}),yf=ref(0);computed(()=>`url("https://img.youtube.com/vi/${lf.value}/maxresdefault.jpg")`);const cf=computed(()=>{var kp;let xp=(kp=wo.value)==null?void 0:kp.split("#")[0].split(".").pop();return xp==="mp4"?"video/mp4":xp==="webm"?"video/webm":"application/ogg"});let vf;const _f=ref(!1),$f=ref(!1),xf=ref(!1),Af=ref(W.width||((ng=X.value)==null?void 0:ng.style.width)&&((og=q.value)==null?void 0:og.clientWidth)),Cf=ref(W.height||((vg=X.value)==null?void 0:vg.style.height)&&((Dp=q.value)==null?void 0:Dp.clientHeight)),Pf=ref(Af.value||((Lp=X.value)==null?void 0:Lp.clientWidth)),Bf=ref(Cf.value||Pf.value);watch$1(Bf,xp=>{q.value&&(q.value.style.height=`${xp}px`)});function Hf(){var xp,kp,lp;Af.value=W.width||X.value.style.width&&((xp=q.value)==null?void 0:xp.clientWidth),Cf.value=W.height||X.value.style.height&&((kp=q.value)==null?void 0:kp.clientHeight),Pf.value=Af.value||((lp=q.value)==null?void 0:lp.clientWidth),Bf.value=Cf.value||yf.value||Pf.value}watch$1(X,async()=>{new ResizeObserver(()=>Hf()).observe(X.value.parentElement),(ut.value?"youtube":yn.value?"vimeo":"html5")==="html5"&&!po.value&&W.src&&(po.value=await getManifest(W.src)),Lf(),EventBus$1.on("seekto",kp=>Ip(kp.start,kp.end)),lf.value&&await Nf(),W.sync&&Df()});function Df(){let xp=Array.from(document.querySelectorAll("p[data-head]")).map(lp=>{let[Of,...qf]=lp.dataset.head.split(/\s+/),cp=document.createElement("a");if(cp.classList.add("play"),cp.href="javascript:;",cp.textContent=Of,cp.addEventListener("click",()=>{Ip(lp.dataset.head)}),lp.insertBefore(document.createElement("br"),lp.firstChild),qf.length>0){let hp=document.createElement("span");hp.classList.add("headline"),hp.textContent=qf.join(" "),lp.insertBefore(hp,lp.firstChild)}return lp.insertBefore(cp,lp.firstChild),{start:vp(lp.dataset.head.split(/\s+/)[0]),id:lp.id}}),kp=null;EventBus$1.on("video-at-time",lp=>{let Of=lp.time,qf=xp.find(cp=>{var hp;return cp.start<=Of&&(((hp=xp[xp.indexOf(cp)+1])==null?void 0:hp.start)||1/0)>Of});if(qf&&(qf==null?void 0:qf.id)!==kp){kp=qf.id;let cp=document.getElementById(qf.id);document.querySelectorAll("p.active").forEach(hp=>hp.classList.remove("active")),cp&&cp.classList.add("active"),cp&&cp.scrollIntoView({behavior:"smooth",block:"center"})}})}function Lf(){var kp;let xp=(kp=X.value)==null?void 0:kp.parentElement;for(;xp;)Array.from(xp.querySelectorAll("a")).forEach(async lp=>{var hp;let qf=new URL(lp.href).pathname.split("/").filter($p=>$p).map($p=>$p.toLowerCase()).map($p=>$p==="playat"?"play":$p),cp=qf.indexOf("play");if(cp>=0){let $p=qf[cp+1],Vp=qf.slice(cp+2).filter(Yp=>Yp==="click"||Yp==="mouseover")[0]||"click",bp=qf.slice(cp+2).filter(Yp=>Yp!=="click"&&Yp!=="mouseover")[0],Ep,_p,Mp=lp.parentElement;for(;Mp&&!_p;)_p=Mp.dataset.id,Mp=Mp.parentElement;if(_p){let Yp=(hp=X.value)==null?void 0:hp.dataset.id;if(Yp&&Yp!==_p)return}if(bp&&(Ep=document.getElementById(bp),!Ep)||(Ep=kf(lp,"ve-video"),Ep!==X.value))return;lp.classList.add("play"),lp.href="javascript:;",lp.setAttribute("data-play",$p),lp.addEventListener(Vp,Yp=>{var xg;let[ug,hg]=((xg=Yp.target.getAttribute("data-play"))==null?void 0:xg.split(/\s+/))||[];ug&&Ip(ug,hg)})}}),xp=xp.parentElement}function kf(xp,kp){let lp,Of=xp.parentElement;for(;Of&&!lp;)lp=Of.querySelector(kp),Of=Of.parentElement;return lp}async function Nf(){var kp;let xp=(kp=K.value)==null?void 0:kp.querySelector("#youtube-player");if(lf.value&&xp){let lp=await yp(lf.value);W.caption===null&&(tt.value=lp.title),X.value&&new ResizeObserver(()=>{var $p;let qf=xp==null?void 0:xp.clientWidth,cp=Math.round(qf/lp.aspect),hp=(($p=ot.value)==null?void 0:$p.clientHeight)||0;yf.value=Cf.value||cp+hp,q.value&&(q.value.style.height=`${yf.value}px`)}).observe(X.value),xp.style.height=yf.value+"px";let Of=xp.querySelector(".player");vf=YouTubePlayer(Of,{videoId:lf.value,width:Of==null?void 0:Of.clientWidth,playerVars:{color:"white",rel:0,modestbranding:1,playsinline:1}}),vf.on("ready",qf=>{Yf(),vf.on("stateChange",cp=>{cp.data===1&&(xf.value||(xf.value=!0,W.start&&Ip(W.start,W.end)))}),W.autoplay&&(vf.playVideo(),W.start&&Ip(W.start,W.end))})}}async function Yf(){ap().then(xp=>EventBus$1.emit("video-at-time",{time:Math.round(xp)})),setInterval(async()=>{_f.value=await rp(),$f.value=await Gf(),$f.value&&ap().then(xp=>EventBus$1.emit("video-at-time",{time:Math.round(xp)}))},1e3)}async function Gf(){return ut.value?await vf.getPlayerState()===1:yn.value?!(await vf.getEnded()||await vf.getPaused()):uo?!(vf.ended||vf.paused):!1}async function rp(){return ut.value?await vf.isMuted():yn.value?await vf.getMuted():await W.muted}function ip(xp){ut.value?xp?vf.mute():vf.unMute():yn.value?vf.setMuted(xp):uo.value&&(vf.muted=xp)}async function ap(){if(ut.value)return vf.getCurrentTime();if(yn.value)return await vf.getCurrentTime();if(uo.value)return vf.currentTime}async function yp(xp){let lp=`https://youtube.com/oembed?url=${encodeURI(`https://www.youtube.com/watch?v=${xp}`)}&format=json`,qf=await(await fetch(lp)).json();return qf.aspect=qf.width/qf.height,qf}function vp(xp){var kp=xp.split(":").slice(0,3).map(qf=>parseInt(qf,10));let lp=0,Of=1;for(;kp.length>0;){let qf=kp.pop()||0;lp+=Of*qf,Of*=60}return lp}let Np=null,jp=!1;function Ip(xp,kp=""){let lp=vp(xp),Of=kp?vp(kp)+1:-1;Np&&(clearTimeout(Np),Np=null);let qf=_f.value;ut.value?(vf.playVideo(),vf.seekTo(lp).then(cp=>{Of>=lp&&(Np=setTimeout(()=>{vf.pauseVideo().then(hp=>{Np=null,!qf&&jp&&ip(!1)})},Of===lp?200:(Of-lp)*1e3))})):yn.value?(vf.setCurrentTime(lp),vf.play().then(cp=>{Of>=lp&&(Np=setTimeout(()=>{vf.pause().then(hp=>{Np=null,!qf&&jp&&ip(!1)})},Of===lp?200:(Of-lp)*1e3))})):uo.value&&setTimeout(()=>{vf.play(),vf.currentTime=lp,Of>=lp&&(Np=setTimeout(()=>{Np=null,vf.pause(),!qf&&jp&&ip(!1)},Of===lp?200:(Of-lp)*1e3))},200)}function Jp(xp){return xp?marked.parse(xp).slice(3,-5):""}return(xp,kp)=>(openBlock(),createElementBlock("div",{ref_key:"main",ref:q,class:"main"},[ut.value?(openBlock(),createElementBlock("div",{key:0,id:"youtube-player","ref-":"youtubePlayer",style:normalizeStyle({width:"100%",height:yf.value+"px",position:"relative"})},_hoisted_2,4)):createCommentVNode("",!0),po.value?(openBlock(),createElementBlock("video",{key:1,ref_key:"html5Player",ref:rt,controls:"",playsinline:"",id:"html5-player",muted:W.muted,autoplay:W.autoplay,poster:W.poster},[createBaseVNode("source",{src:wo.value,type:cf.value},null,8,_hoisted_4)],8,_hoisted_3)):createCommentVNode("",!0),tt.value?(openBlock(),createElementBlock("div",{key:2,class:"caption",ref_key:"captionEl",ref:ot,innerHTML:tt.value},null,8,_hoisted_5)):createCommentVNode("",!0)],512))}}),_style_0$1=`*{box-sizing:border-box}.main{display:flex;flex-direction:column;background-color:inherit}video{width:100%;height:auto}#youtube-player{flex-grow:1}.caption{padding:.3em;width:100%;font-size:1em;font-weight:500;text-align:left;line-height:1.3;margin-bottom:.3em}
 `,Video=_export_sfc(_sfc_main$1,[["styles",[_style_0$1]]]);/**
  * vis-data
  * http://visjs.org/
@@ -3987,7 +3987,7 @@ ${cf.innerHTML}
`});let lf=["data-id"],yf=["segment","section1","section2", * http://opensource.org/licenses/MIT * * vis.js may be distributed under either license. - */function _classCallCheck$2(F,W){if(!(F instanceof W))throw new TypeError("Cannot call a class as a function")}var commonjsGlobal$2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$2(F){return F&&F.__esModule&&Object.prototype.hasOwnProperty.call(F,"default")?F.default:F}var defineProperty$f$2={exports:{}},check$2=function(F){return F&&F.Math===Math&&F},global$p=check$2(typeof globalThis=="object"&&globalThis)||check$2(typeof window=="object"&&window)||check$2(typeof self=="object"&&self)||check$2(typeof commonjsGlobal$2=="object"&&commonjsGlobal$2)||function(){return this}()||commonjsGlobal$2||Function("return this")(),fails$u$2=function(F){try{return!!F()}catch{return!0}},fails$t$2=fails$u$2,functionBindNative$2=!fails$t$2(function(){var F=(function(){}).bind();return typeof F!="function"||F.hasOwnProperty("prototype")}),NATIVE_BIND$4$2=functionBindNative$2,FunctionPrototype$4$2=Function.prototype,apply$6$1=FunctionPrototype$4$2.apply,call$k=FunctionPrototype$4$2.call,functionApply$2=typeof Reflect=="object"&&Reflect.apply||(NATIVE_BIND$4$2?call$k.bind(apply$6$1):function(){return call$k.apply(apply$6$1,arguments)}),NATIVE_BIND$3$2=functionBindNative$2,FunctionPrototype$3$2=Function.prototype,call$j=FunctionPrototype$3$2.call,uncurryThisWithBind$2=NATIVE_BIND$3$2&&FunctionPrototype$3$2.bind.bind(call$j,call$j),functionUncurryThis$2=NATIVE_BIND$3$2?uncurryThisWithBind$2:function(F){return function(){return call$j.apply(F,arguments)}},uncurryThis$q$2=functionUncurryThis$2,toString$9$2=uncurryThis$q$2({}.toString),stringSlice$1$2=uncurryThis$q$2("".slice),classofRaw$2$2=function(F){return stringSlice$1$2(toString$9$2(F),8,-1)},classofRaw$1$2=classofRaw$2$2,uncurryThis$p$2=functionUncurryThis$2,functionUncurryThisClause$2=function(F){if(classofRaw$1$2(F)==="Function")return uncurryThis$p$2(F)},documentAll$2$2=typeof document=="object"&&document.all,IS_HTMLDDA$2=typeof documentAll$2$2>"u"&&documentAll$2$2!==void 0,documentAll_1$2={all:documentAll$2$2,IS_HTMLDDA:IS_HTMLDDA$2},$documentAll$1$2=documentAll_1$2,documentAll$1$2=$documentAll$1$2.all,isCallable$m=$documentAll$1$2.IS_HTMLDDA?function(F){return typeof F=="function"||F===documentAll$1$2}:function(F){return typeof F=="function"},objectGetOwnPropertyDescriptor$2={},fails$s$2=fails$u$2,descriptors$2=!fails$s$2(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),NATIVE_BIND$2$2=functionBindNative$2,call$i=Function.prototype.call,functionCall$2=NATIVE_BIND$2$2?call$i.bind(call$i):function(){return call$i.apply(call$i,arguments)},objectPropertyIsEnumerable$2={},$propertyIsEnumerable$1$2={}.propertyIsEnumerable,getOwnPropertyDescriptor$7$1=Object.getOwnPropertyDescriptor,NASHORN_BUG$2=getOwnPropertyDescriptor$7$1&&!$propertyIsEnumerable$1$2.call({1:2},1);objectPropertyIsEnumerable$2.f=NASHORN_BUG$2?function F(W){var q=getOwnPropertyDescriptor$7$1(this,W);return!!q&&q.enumerable}:$propertyIsEnumerable$1$2;var createPropertyDescriptor$7=function(F,W){return{enumerable:!(F&1),configurable:!(F&2),writable:!(F&4),value:W}},uncurryThis$o$2=functionUncurryThis$2,fails$r$2=fails$u$2,classof$f$1=classofRaw$2$2,$Object$4$2=Object,split$2=uncurryThis$o$2("".split),indexedObject$2=fails$r$2(function(){return!$Object$4$2("z").propertyIsEnumerable(0)})?function(F){return classof$f$1(F)==="String"?split$2(F,""):$Object$4$2(F)}:$Object$4$2,isNullOrUndefined$6$1=function(F){return F==null},isNullOrUndefined$5$2=isNullOrUndefined$6$1,$TypeError$g$2=TypeError,requireObjectCoercible$3$2=function(F){if(isNullOrUndefined$5$2(F))throw new $TypeError$g$2("Can't call method on "+F);return F},IndexedObject$3$2=indexedObject$2,requireObjectCoercible$2$2=requireObjectCoercible$3$2,toIndexedObject$a$2=function(F){return IndexedObject$3$2(requireObjectCoercible$2$2(F))},isCallable$l=isCallable$m,$documentAll$3=documentAll_1$2,documentAll$4=$documentAll$3.all,isObject$h$2=$documentAll$3.IS_HTMLDDA?function(F){return typeof F=="object"?F!==null:isCallable$l(F)||F===documentAll$4}:function(F){return typeof F=="object"?F!==null:isCallable$l(F)},path$o$2={},path$n$2=path$o$2,global$o=global$p,isCallable$k=isCallable$m,aFunction$2=function(F){return isCallable$k(F)?F:void 0},getBuiltIn$f=function(F,W){return arguments.length<2?aFunction$2(path$n$2[F])||aFunction$2(global$o[F]):path$n$2[F]&&path$n$2[F][W]||global$o[F]&&global$o[F][W]},uncurryThis$n$2=functionUncurryThis$2,objectIsPrototypeOf$2=uncurryThis$n$2({}.isPrototypeOf),engineUserAgent$2=typeof navigator<"u"&&String(navigator.userAgent)||"",global$n$1=global$p,userAgent$5=engineUserAgent$2,process$3=global$n$1.process,Deno$1$1=global$n$1.Deno,versions$2=process$3&&process$3.versions||Deno$1$1&&Deno$1$1.version,v8$2=versions$2&&versions$2.v8,match$2,version$2;v8$2&&(match$2=v8$2.split("."),version$2=match$2[0]>0&&match$2[0]<4?1:+(match$2[0]+match$2[1]));!version$2&&userAgent$5&&(match$2=userAgent$5.match(/Edge\/(\d+)/),(!match$2||match$2[1]>=74)&&(match$2=userAgent$5.match(/Chrome\/(\d+)/),match$2&&(version$2=+match$2[1])));var engineV8Version$2=version$2,V8_VERSION$3$1=engineV8Version$2,fails$q$2=fails$u$2,global$m$1=global$p,$String$5$2=global$m$1.String,symbolConstructorDetection$2=!!Object.getOwnPropertySymbols&&!fails$q$2(function(){var F=Symbol("symbol detection");return!$String$5$2(F)||!(Object(F)instanceof Symbol)||!Symbol.sham&&V8_VERSION$3$1&&V8_VERSION$3$1<41}),NATIVE_SYMBOL$5$2=symbolConstructorDetection$2,useSymbolAsUid$2=NATIVE_SYMBOL$5$2&&!Symbol.sham&&typeof Symbol.iterator=="symbol",getBuiltIn$e=getBuiltIn$f,isCallable$j$1=isCallable$m,isPrototypeOf$k$2=objectIsPrototypeOf$2,USE_SYMBOL_AS_UID$1$2=useSymbolAsUid$2,$Object$3$2=Object,isSymbol$5$2=USE_SYMBOL_AS_UID$1$2?function(F){return typeof F=="symbol"}:function(F){var W=getBuiltIn$e("Symbol");return isCallable$j$1(W)&&isPrototypeOf$k$2(W.prototype,$Object$3$2(F))},$String$4$2=String,tryToString$6$2=function(F){try{return $String$4$2(F)}catch{return"Object"}},isCallable$i$2=isCallable$m,tryToString$5$2=tryToString$6$2,$TypeError$f$2=TypeError,aCallable$e=function(F){if(isCallable$i$2(F))return F;throw new $TypeError$f$2(tryToString$5$2(F)+" is not a function")},aCallable$d=aCallable$e,isNullOrUndefined$4$2=isNullOrUndefined$6$1,getMethod$3$2=function(F,W){var q=F[W];return isNullOrUndefined$4$2(q)?void 0:aCallable$d(q)},call$h=functionCall$2,isCallable$h$2=isCallable$m,isObject$g$2=isObject$h$2,$TypeError$e$2=TypeError,ordinaryToPrimitive$1$2=function(F,W){var q,K;if(W==="string"&&isCallable$h$2(q=F.toString)&&!isObject$g$2(K=call$h(q,F))||isCallable$h$2(q=F.valueOf)&&!isObject$g$2(K=call$h(q,F))||W!=="string"&&isCallable$h$2(q=F.toString)&&!isObject$g$2(K=call$h(q,F)))return K;throw new $TypeError$e$2("Can't convert object to primitive value")},shared$7$2={exports:{}},isPure=!0,global$l$2=global$p,defineProperty$e$2=Object.defineProperty,defineGlobalProperty$1$2=function(F,W){try{defineProperty$e$2(global$l$2,F,{value:W,configurable:!0,writable:!0})}catch{global$l$2[F]=W}return W},global$k$2=global$p,defineGlobalProperty$3=defineGlobalProperty$1$2,SHARED$2="__core-js_shared__",store$3$2=global$k$2[SHARED$2]||defineGlobalProperty$3(SHARED$2,{}),sharedStore$2=store$3$2,store$2$2=sharedStore$2;(shared$7$2.exports=function(F,W){return store$2$2[F]||(store$2$2[F]=W!==void 0?W:{})})("versions",[]).push({version:"3.33.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedExports$2=shared$7$2.exports,requireObjectCoercible$1$2=requireObjectCoercible$3$2,$Object$2$2=Object,toObject$e$2=function(F){return $Object$2$2(requireObjectCoercible$1$2(F))},uncurryThis$m$2=functionUncurryThis$2,toObject$d$2=toObject$e$2,hasOwnProperty$2=uncurryThis$m$2({}.hasOwnProperty),hasOwnProperty_1$2=Object.hasOwn||function F(W,q){return hasOwnProperty$2(toObject$d$2(W),q)},uncurryThis$l$2=functionUncurryThis$2,id$1$2=0,postfix$2=Math.random(),toString$8$2=uncurryThis$l$2(1 .toString),uid$4$2=function(F){return"Symbol("+(F===void 0?"":F)+")_"+toString$8$2(++id$1$2+postfix$2,36)},global$j$2=global$p,shared$6$2=sharedExports$2,hasOwn$j=hasOwnProperty_1$2,uid$3$2=uid$4$2,NATIVE_SYMBOL$4$2=symbolConstructorDetection$2,USE_SYMBOL_AS_UID$3=useSymbolAsUid$2,Symbol$3$2=global$j$2.Symbol,WellKnownSymbolsStore$2$2=shared$6$2("wks"),createWellKnownSymbol$2=USE_SYMBOL_AS_UID$3?Symbol$3$2.for||Symbol$3$2:Symbol$3$2&&Symbol$3$2.withoutSetter||uid$3$2,wellKnownSymbol$n$1=function(F){return hasOwn$j(WellKnownSymbolsStore$2$2,F)||(WellKnownSymbolsStore$2$2[F]=NATIVE_SYMBOL$4$2&&hasOwn$j(Symbol$3$2,F)?Symbol$3$2[F]:createWellKnownSymbol$2("Symbol."+F)),WellKnownSymbolsStore$2$2[F]},call$g$1=functionCall$2,isObject$f$2=isObject$h$2,isSymbol$4$2=isSymbol$5$2,getMethod$2$2=getMethod$3$2,ordinaryToPrimitive$3=ordinaryToPrimitive$1$2,wellKnownSymbol$m$2=wellKnownSymbol$n$1,$TypeError$d$2=TypeError,TO_PRIMITIVE$2=wellKnownSymbol$m$2("toPrimitive"),toPrimitive$6$2=function(F,W){if(!isObject$f$2(F)||isSymbol$4$2(F))return F;var q=getMethod$2$2(F,TO_PRIMITIVE$2),K;if(q){if(W===void 0&&(W="default"),K=call$g$1(q,F,W),!isObject$f$2(K)||isSymbol$4$2(K))return K;throw new $TypeError$d$2("Can't convert object to primitive value")}return W===void 0&&(W="number"),ordinaryToPrimitive$3(F,W)},toPrimitive$5$2=toPrimitive$6$2,isSymbol$3$2=isSymbol$5$2,toPropertyKey$4$2=function(F){var W=toPrimitive$5$2(F,"string");return isSymbol$3$2(W)?W:W+""},global$i$2=global$p,isObject$e$2=isObject$h$2,document$3=global$i$2.document,EXISTS$1$2=isObject$e$2(document$3)&&isObject$e$2(document$3.createElement),documentCreateElement$1$2=function(F){return EXISTS$1$2?document$3.createElement(F):{}},DESCRIPTORS$h$2=descriptors$2,fails$p$2=fails$u$2,createElement$1$1=documentCreateElement$1$2,ie8DomDefine$2=!DESCRIPTORS$h$2&&!fails$p$2(function(){return Object.defineProperty(createElement$1$1("div"),"a",{get:function(){return 7}}).a!==7}),DESCRIPTORS$g$2=descriptors$2,call$f$1=functionCall$2,propertyIsEnumerableModule$2$2=objectPropertyIsEnumerable$2,createPropertyDescriptor$6$1=createPropertyDescriptor$7,toIndexedObject$9$2=toIndexedObject$a$2,toPropertyKey$3$2=toPropertyKey$4$2,hasOwn$i$1=hasOwnProperty_1$2,IE8_DOM_DEFINE$1$2=ie8DomDefine$2,$getOwnPropertyDescriptor$2$2=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor$2.f=DESCRIPTORS$g$2?$getOwnPropertyDescriptor$2$2:function F(W,q){if(W=toIndexedObject$9$2(W),q=toPropertyKey$3$2(q),IE8_DOM_DEFINE$1$2)try{return $getOwnPropertyDescriptor$2$2(W,q)}catch{}if(hasOwn$i$1(W,q))return createPropertyDescriptor$6$1(!call$f$1(propertyIsEnumerableModule$2$2.f,W,q),W[q])};var fails$o$2=fails$u$2,isCallable$g$2=isCallable$m,replacement$2=/#|\.prototype\./,isForced$2$1=function(F,W){var q=data$2[normalize$2(F)];return q===POLYFILL$2?!0:q===NATIVE$2?!1:isCallable$g$2(W)?fails$o$2(W):!!W},normalize$2=isForced$2$1.normalize=function(F){return String(F).replace(replacement$2,".").toLowerCase()},data$2=isForced$2$1.data={},NATIVE$2=isForced$2$1.NATIVE="N",POLYFILL$2=isForced$2$1.POLYFILL="P",isForced_1$2=isForced$2$1,uncurryThis$k$2=functionUncurryThisClause$2,aCallable$c=aCallable$e,NATIVE_BIND$1$2=functionBindNative$2,bind$i=uncurryThis$k$2(uncurryThis$k$2.bind),functionBindContext$2=function(F,W){return aCallable$c(F),W===void 0?F:NATIVE_BIND$1$2?bind$i(F,W):function(){return F.apply(W,arguments)}},objectDefineProperty$2={},DESCRIPTORS$f$2=descriptors$2,fails$n$2=fails$u$2,v8PrototypeDefineBug$2=DESCRIPTORS$f$2&&fails$n$2(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),isObject$d$2=isObject$h$2,$String$3$2=String,$TypeError$c$2=TypeError,anObject$d$1=function(F){if(isObject$d$2(F))return F;throw new $TypeError$c$2($String$3$2(F)+" is not an object")},DESCRIPTORS$e$2=descriptors$2,IE8_DOM_DEFINE$3=ie8DomDefine$2,V8_PROTOTYPE_DEFINE_BUG$1$2=v8PrototypeDefineBug$2,anObject$c$1=anObject$d$1,toPropertyKey$2$2=toPropertyKey$4$2,$TypeError$b$2=TypeError,$defineProperty$1$2=Object.defineProperty,$getOwnPropertyDescriptor$1$2=Object.getOwnPropertyDescriptor,ENUMERABLE$2="enumerable",CONFIGURABLE$1$2="configurable",WRITABLE$2="writable";objectDefineProperty$2.f=DESCRIPTORS$e$2?V8_PROTOTYPE_DEFINE_BUG$1$2?function F(W,q,K){if(anObject$c$1(W),q=toPropertyKey$2$2(q),anObject$c$1(K),typeof W=="function"&&q==="prototype"&&"value"in K&&WRITABLE$2 in K&&!K[WRITABLE$2]){var X=$getOwnPropertyDescriptor$1$2(W,q);X&&X[WRITABLE$2]&&(W[q]=K.value,K={configurable:CONFIGURABLE$1$2 in K?K[CONFIGURABLE$1$2]:X[CONFIGURABLE$1$2],enumerable:ENUMERABLE$2 in K?K[ENUMERABLE$2]:X[ENUMERABLE$2],writable:!1})}return $defineProperty$1$2(W,q,K)}:$defineProperty$1$2:function F(W,q,K){if(anObject$c$1(W),q=toPropertyKey$2$2(q),anObject$c$1(K),IE8_DOM_DEFINE$3)try{return $defineProperty$1$2(W,q,K)}catch{}if("get"in K||"set"in K)throw new $TypeError$b$2("Accessors not supported");return"value"in K&&(W[q]=K.value),W};var DESCRIPTORS$d$2=descriptors$2,definePropertyModule$4$1=objectDefineProperty$2,createPropertyDescriptor$5$2=createPropertyDescriptor$7,createNonEnumerableProperty$9=DESCRIPTORS$d$2?function(F,W,q){return definePropertyModule$4$1.f(F,W,createPropertyDescriptor$5$2(1,q))}:function(F,W,q){return F[W]=q,F},global$h$2=global$p,apply$5$2=functionApply$2,uncurryThis$j$2=functionUncurryThisClause$2,isCallable$f$2=isCallable$m,getOwnPropertyDescriptor$6$2=objectGetOwnPropertyDescriptor$2.f,isForced$1$2=isForced_1$2,path$m$2=path$o$2,bind$h=functionBindContext$2,createNonEnumerableProperty$8=createNonEnumerableProperty$9,hasOwn$h$1=hasOwnProperty_1$2,wrapConstructor$2=function(F){var W=function(q,K,X){if(this instanceof W){switch(arguments.length){case 0:return new F;case 1:return new F(q);case 2:return new F(q,K)}return new F(q,K,X)}return apply$5$2(F,this,arguments)};return W.prototype=F.prototype,W},_export$2=function(F,W){var q=F.target,K=F.global,X=F.stat,tt=F.proto,rt=K?global$h$2:X?global$h$2[q]:(global$h$2[q]||{}).prototype,ot=K?path$m$2:path$m$2[q]||createNonEnumerableProperty$8(path$m$2,q,{})[q],ut=ot.prototype,yn,uo,po,mo,wo,lf,yf,cf,vf;for(mo in W)yn=isForced$1$2(K?mo:q+(X?".":"#")+mo,F.forced),uo=!yn&&rt&&hasOwn$h$1(rt,mo),lf=ot[mo],uo&&(F.dontCallGetSet?(vf=getOwnPropertyDescriptor$6$2(rt,mo),yf=vf&&vf.value):yf=rt[mo]),wo=uo&&yf?yf:W[mo],!(uo&&typeof lf==typeof wo)&&(F.bind&&uo?cf=bind$h(wo,global$h$2):F.wrap&&uo?cf=wrapConstructor$2(wo):tt&&isCallable$f$2(wo)?cf=uncurryThis$j$2(wo):cf=wo,(F.sham||wo&&wo.sham||lf&&lf.sham)&&createNonEnumerableProperty$8(cf,"sham",!0),createNonEnumerableProperty$8(ot,mo,cf),tt&&(po=q+"Prototype",hasOwn$h$1(path$m$2,po)||createNonEnumerableProperty$8(path$m$2,po,{}),createNonEnumerableProperty$8(path$m$2[po],mo,wo),F.real&&ut&&(yn||!ut[mo])&&createNonEnumerableProperty$8(ut,mo,wo)))},$$P$1=_export$2,DESCRIPTORS$c$2=descriptors$2,defineProperty$d$2=objectDefineProperty$2.f;$$P$1({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$d$2,sham:!DESCRIPTORS$c$2},{defineProperty:defineProperty$d$2});var path$l$2=path$o$2,Object$4$2=path$l$2.Object,defineProperty$c$2=defineProperty$f$2.exports=function F(W,q,K){return Object$4$2.defineProperty(W,q,K)};Object$4$2.defineProperty.sham&&(defineProperty$c$2.sham=!0);var definePropertyExports$2=defineProperty$f$2.exports,parent$18$1=definePropertyExports$2,defineProperty$b$2=parent$18$1,parent$17$1=defineProperty$b$2,defineProperty$a$2=parent$17$1,parent$16$2=defineProperty$a$2,defineProperty$9$2=parent$16$2,defineProperty$8$2=defineProperty$9$2,_Object$defineProperty$1$2=getDefaultExportFromCjs$2(defineProperty$8$2),classof$e$1=classofRaw$2$2,isArray$e$2=Array.isArray||function F(W){return classof$e$1(W)==="Array"},ceil$2=Math.ceil,floor$1$2=Math.floor,mathTrunc$2=Math.trunc||function F(W){var q=+W;return(q>0?floor$1$2:ceil$2)(q)},trunc$2=mathTrunc$2,toIntegerOrInfinity$4$2=function(F){var W=+F;return W!==W||W===0?0:trunc$2(W)},toIntegerOrInfinity$3$2=toIntegerOrInfinity$4$2,min$2$2=Math.min,toLength$1$2=function(F){return F>0?min$2$2(toIntegerOrInfinity$3$2(F),9007199254740991):0},toLength$3=toLength$1$2,lengthOfArrayLike$d$1=function(F){return toLength$3(F.length)},$TypeError$a$2=TypeError,MAX_SAFE_INTEGER$2=9007199254740991,doesNotExceedSafeInteger$4$1=function(F){if(F>MAX_SAFE_INTEGER$2)throw $TypeError$a$2("Maximum allowed index exceeded");return F},toPropertyKey$1$2=toPropertyKey$4$2,definePropertyModule$3$2=objectDefineProperty$2,createPropertyDescriptor$4$2=createPropertyDescriptor$7,createProperty$6$2=function(F,W,q){var K=toPropertyKey$1$2(W);K in F?definePropertyModule$3$2.f(F,K,createPropertyDescriptor$4$2(0,q)):F[K]=q},wellKnownSymbol$l$2=wellKnownSymbol$n$1,TO_STRING_TAG$4$1=wellKnownSymbol$l$2("toStringTag"),test$2$2={};test$2$2[TO_STRING_TAG$4$1]="z";var toStringTagSupport$2=String(test$2$2)==="[object z]",TO_STRING_TAG_SUPPORT$2$2=toStringTagSupport$2,isCallable$e$2=isCallable$m,classofRaw$4=classofRaw$2$2,wellKnownSymbol$k$2=wellKnownSymbol$n$1,TO_STRING_TAG$3$2=wellKnownSymbol$k$2("toStringTag"),$Object$1$2=Object,CORRECT_ARGUMENTS$2=classofRaw$4(function(){return arguments}())==="Arguments",tryGet$2=function(F,W){try{return F[W]}catch{}},classof$d$2=TO_STRING_TAG_SUPPORT$2$2?classofRaw$4:function(F){var W,q,K;return F===void 0?"Undefined":F===null?"Null":typeof(q=tryGet$2(W=$Object$1$2(F),TO_STRING_TAG$3$2))=="string"?q:CORRECT_ARGUMENTS$2?classofRaw$4(W):(K=classofRaw$4(W))==="Object"&&isCallable$e$2(W.callee)?"Arguments":K},uncurryThis$i$2=functionUncurryThis$2,isCallable$d$2=isCallable$m,store$1$2=sharedStore$2,functionToString$2=uncurryThis$i$2(Function.toString);isCallable$d$2(store$1$2.inspectSource)||(store$1$2.inspectSource=function(F){return functionToString$2(F)});var inspectSource$2$1=store$1$2.inspectSource,uncurryThis$h$2=functionUncurryThis$2,fails$m$2=fails$u$2,isCallable$c$2=isCallable$m,classof$c$2=classof$d$2,getBuiltIn$d$1=getBuiltIn$f,inspectSource$1$2=inspectSource$2$1,noop$2=function(){},empty$2=[],construct$4$2=getBuiltIn$d$1("Reflect","construct"),constructorRegExp$2=/^\s*(?:class|function)\b/,exec$1$2=uncurryThis$h$2(constructorRegExp$2.exec),INCORRECT_TO_STRING$2=!constructorRegExp$2.test(noop$2),isConstructorModern$2=function F(W){if(!isCallable$c$2(W))return!1;try{return construct$4$2(noop$2,empty$2,W),!0}catch{return!1}},isConstructorLegacy$2=function F(W){if(!isCallable$c$2(W))return!1;switch(classof$c$2(W)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING$2||!!exec$1$2(constructorRegExp$2,inspectSource$1$2(W))}catch{return!0}};isConstructorLegacy$2.sham=!0;var isConstructor$4$2=!construct$4$2||fails$m$2(function(){var F;return isConstructorModern$2(isConstructorModern$2.call)||!isConstructorModern$2(Object)||!isConstructorModern$2(function(){F=!0})||F})?isConstructorLegacy$2:isConstructorModern$2,isArray$d$2=isArray$e$2,isConstructor$3$2=isConstructor$4$2,isObject$c$2=isObject$h$2,wellKnownSymbol$j$2=wellKnownSymbol$n$1,SPECIES$5=wellKnownSymbol$j$2("species"),$Array$3$2=Array,arraySpeciesConstructor$1$2=function(F){var W;return isArray$d$2(F)&&(W=F.constructor,isConstructor$3$2(W)&&(W===$Array$3$2||isArray$d$2(W.prototype))?W=void 0:isObject$c$2(W)&&(W=W[SPECIES$5],W===null&&(W=void 0))),W===void 0?$Array$3$2:W},arraySpeciesConstructor$3=arraySpeciesConstructor$1$2,arraySpeciesCreate$4$1=function(F,W){return new(arraySpeciesConstructor$3(F))(W===0?0:W)},fails$l$2=fails$u$2,wellKnownSymbol$i$2=wellKnownSymbol$n$1,V8_VERSION$2$2=engineV8Version$2,SPECIES$4$1=wellKnownSymbol$i$2("species"),arrayMethodHasSpeciesSupport$5$2=function(F){return V8_VERSION$2$2>=51||!fails$l$2(function(){var W=[],q=W.constructor={};return q[SPECIES$4$1]=function(){return{foo:1}},W[F](Boolean).foo!==1})},$$O$2=_export$2,fails$k$2=fails$u$2,isArray$c$2=isArray$e$2,isObject$b$2=isObject$h$2,toObject$c$2=toObject$e$2,lengthOfArrayLike$c$2=lengthOfArrayLike$d$1,doesNotExceedSafeInteger$3$2=doesNotExceedSafeInteger$4$1,createProperty$5$2=createProperty$6$2,arraySpeciesCreate$3$2=arraySpeciesCreate$4$1,arrayMethodHasSpeciesSupport$4$2=arrayMethodHasSpeciesSupport$5$2,wellKnownSymbol$h$2=wellKnownSymbol$n$1,V8_VERSION$1$2=engineV8Version$2,IS_CONCAT_SPREADABLE$2=wellKnownSymbol$h$2("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT$2=V8_VERSION$1$2>=51||!fails$k$2(function(){var F=[];return F[IS_CONCAT_SPREADABLE$2]=!1,F.concat()[0]!==F}),isConcatSpreadable$2=function(F){if(!isObject$b$2(F))return!1;var W=F[IS_CONCAT_SPREADABLE$2];return W!==void 0?!!W:isArray$c$2(F)},FORCED$6$2=!IS_CONCAT_SPREADABLE_SUPPORT$2||!arrayMethodHasSpeciesSupport$4$2("concat");$$O$2({target:"Array",proto:!0,arity:1,forced:FORCED$6$2},{concat:function F(W){var q=toObject$c$2(this),K=arraySpeciesCreate$3$2(q,0),X=0,tt,rt,ot,ut,yn;for(tt=-1,ot=arguments.length;ttrt;)if(ot=X[rt++],ot!==ot)return!0}else for(;tt>rt;rt++)if((F||rt in X)&&X[rt]===q)return F||rt||0;return!F&&-1}},arrayIncludes$2={includes:createMethod$3$2(!0),indexOf:createMethod$3$2(!1)},hiddenKeys$6$2={},uncurryThis$g$2=functionUncurryThis$2,hasOwn$g$1=hasOwnProperty_1$2,toIndexedObject$7$2=toIndexedObject$a$2,indexOf$7=arrayIncludes$2.indexOf,hiddenKeys$5$2=hiddenKeys$6$2,push$c$1=uncurryThis$g$2([].push),objectKeysInternal$2=function(F,W){var q=toIndexedObject$7$2(F),K=0,X=[],tt;for(tt in q)!hasOwn$g$1(hiddenKeys$5$2,tt)&&hasOwn$g$1(q,tt)&&push$c$1(X,tt);for(;W.length>K;)hasOwn$g$1(q,tt=W[K++])&&(~indexOf$7(X,tt)||push$c$1(X,tt));return X},enumBugKeys$3$2=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1$2=objectKeysInternal$2,enumBugKeys$2$2=enumBugKeys$3$2,objectKeys$3$2=Object.keys||function F(W){return internalObjectKeys$1$2(W,enumBugKeys$2$2)},DESCRIPTORS$b$2=descriptors$2,V8_PROTOTYPE_DEFINE_BUG$3=v8PrototypeDefineBug$2,definePropertyModule$2$2=objectDefineProperty$2,anObject$b$2=anObject$d$1,toIndexedObject$6$2=toIndexedObject$a$2,objectKeys$2$2=objectKeys$3$2;objectDefineProperties$2.f=DESCRIPTORS$b$2&&!V8_PROTOTYPE_DEFINE_BUG$3?Object.defineProperties:function F(W,q){anObject$b$2(W);for(var K=toIndexedObject$6$2(q),X=objectKeys$2$2(q),tt=X.length,rt=0,ot;tt>rt;)definePropertyModule$2$2.f(W,ot=X[rt++],K[ot]);return W};var getBuiltIn$c$2=getBuiltIn$f,html$2$1=getBuiltIn$c$2("document","documentElement"),shared$5$2=sharedExports$2,uid$2$2=uid$4$2,keys$7=shared$5$2("keys"),sharedKey$4$2=function(F){return keys$7[F]||(keys$7[F]=uid$2$2(F))},anObject$a$2=anObject$d$1,definePropertiesModule$1$2=objectDefineProperties$2,enumBugKeys$1$2=enumBugKeys$3$2,hiddenKeys$4$2=hiddenKeys$6$2,html$1$2=html$2$1,documentCreateElement$3=documentCreateElement$1$2,sharedKey$3$2=sharedKey$4$2,GT$2=">",LT$2="<",PROTOTYPE$1$2="prototype",SCRIPT$2="script",IE_PROTO$1$2=sharedKey$3$2("IE_PROTO"),EmptyConstructor$2=function(){},scriptTag$2=function(F){return LT$2+SCRIPT$2+GT$2+F+LT$2+"/"+SCRIPT$2+GT$2},NullProtoObjectViaActiveX$2=function(F){F.write(scriptTag$2("")),F.close();var W=F.parentWindow.Object;return F=null,W},NullProtoObjectViaIFrame$2=function(){var F=documentCreateElement$3("iframe"),W="java"+SCRIPT$2+":",q;return F.style.display="none",html$1$2.appendChild(F),F.src=String(W),q=F.contentWindow.document,q.open(),q.write(scriptTag$2("document.F=Object")),q.close(),q.F},activeXDocument$2,NullProtoObject$2=function(){try{activeXDocument$2=new ActiveXObject("htmlfile")}catch{}NullProtoObject$2=typeof document<"u"?document.domain&&activeXDocument$2?NullProtoObjectViaActiveX$2(activeXDocument$2):NullProtoObjectViaIFrame$2():NullProtoObjectViaActiveX$2(activeXDocument$2);for(var F=enumBugKeys$1$2.length;F--;)delete NullProtoObject$2[PROTOTYPE$1$2][enumBugKeys$1$2[F]];return NullProtoObject$2()};hiddenKeys$4$2[IE_PROTO$1$2]=!0;var objectCreate$2=Object.create||function F(W,q){var K;return W!==null?(EmptyConstructor$2[PROTOTYPE$1$2]=anObject$a$2(W),K=new EmptyConstructor$2,EmptyConstructor$2[PROTOTYPE$1$2]=null,K[IE_PROTO$1$2]=W):K=NullProtoObject$2(),q===void 0?K:definePropertiesModule$1$2.f(K,q)},objectGetOwnPropertyNames$2={},internalObjectKeys$3=objectKeysInternal$2,enumBugKeys$5=enumBugKeys$3$2,hiddenKeys$3$2=enumBugKeys$5.concat("length","prototype");objectGetOwnPropertyNames$2.f=Object.getOwnPropertyNames||function F(W){return internalObjectKeys$3(W,hiddenKeys$3$2)};var objectGetOwnPropertyNamesExternal$2={},toAbsoluteIndex$2$2=toAbsoluteIndex$4$2,lengthOfArrayLike$a$2=lengthOfArrayLike$d$1,createProperty$4$2=createProperty$6$2,$Array$2$2=Array,max$2$2=Math.max,arraySliceSimple$2=function(F,W,q){for(var K=lengthOfArrayLike$a$2(F),X=toAbsoluteIndex$2$2(W,K),tt=toAbsoluteIndex$2$2(q===void 0?K:q,K),rt=$Array$2$2(max$2$2(tt-X,0)),ot=0;Xcf;cf++)if((ot||cf in wo)&&($f=wo[cf],wf=lf($f,cf,mo),F))if(W)_f[cf]=wf;else if(wf)switch(F){case 3:return!0;case 5:return $f;case 6:return cf;case 2:push$b$2(_f,$f)}else switch(F){case 4:return!1;case 7:push$b$2(_f,$f)}return tt?-1:K||X?X:_f}},arrayIteration$2={forEach:createMethod$2$2(0),map:createMethod$2$2(1),filter:createMethod$2$2(2),some:createMethod$2$2(3),every:createMethod$2$2(4),find:createMethod$2$2(5),findIndex:createMethod$2$2(6),filterReject:createMethod$2$2(7)},$$N$2=_export$2,global$e$2=global$p,call$d$2=functionCall$2,uncurryThis$e$2=functionUncurryThis$2,DESCRIPTORS$a$2=descriptors$2,NATIVE_SYMBOL$3$2=symbolConstructorDetection$2,fails$j$2=fails$u$2,hasOwn$c$2=hasOwnProperty_1$2,isPrototypeOf$j$2=objectIsPrototypeOf$2,anObject$9$2=anObject$d$1,toIndexedObject$4$2=toIndexedObject$a$2,toPropertyKey$6=toPropertyKey$4$2,$toString$2=toString$7$2,createPropertyDescriptor$3$2=createPropertyDescriptor$7,nativeObjectCreate$2=objectCreate$2,objectKeys$1$2=objectKeys$3$2,getOwnPropertyNamesModule$2$2=objectGetOwnPropertyNames$2,getOwnPropertyNamesExternal$2=objectGetOwnPropertyNamesExternal$2,getOwnPropertySymbolsModule$3$2=objectGetOwnPropertySymbols$2,getOwnPropertyDescriptorModule$2$1=objectGetOwnPropertyDescriptor$2,definePropertyModule$1$2=objectDefineProperty$2,definePropertiesModule$3=objectDefineProperties$2,propertyIsEnumerableModule$1$2=objectPropertyIsEnumerable$2,defineBuiltIn$4$2=defineBuiltIn$6$1,defineBuiltInAccessor$2$2=defineBuiltInAccessor$3$2,shared$3$2=sharedExports$2,sharedKey$1$2=sharedKey$4$2,hiddenKeys$1$2=hiddenKeys$6$2,uid$1$2=uid$4$2,wellKnownSymbol$d$2=wellKnownSymbol$n$1,wrappedWellKnownSymbolModule$3=wellKnownSymbolWrapped$2,defineWellKnownSymbol$l$2=wellKnownSymbolDefine$2,defineSymbolToPrimitive$1$2=symbolDefineToPrimitive$2,setToStringTag$6$2=setToStringTag$7$1,InternalStateModule$5$1=internalState$2,$forEach$1$2=arrayIteration$2.forEach,HIDDEN$2=sharedKey$1$2("hidden"),SYMBOL$2="Symbol",PROTOTYPE$3="prototype",setInternalState$5$1=InternalStateModule$5$1.set,getInternalState$2$2=InternalStateModule$5$1.getterFor(SYMBOL$2),ObjectPrototype$2$2=Object[PROTOTYPE$3],$Symbol$2=global$e$2.Symbol,SymbolPrototype$2=$Symbol$2&&$Symbol$2[PROTOTYPE$3],RangeError$2=global$e$2.RangeError,TypeError$2$2=global$e$2.TypeError,QObject$2=global$e$2.QObject,nativeGetOwnPropertyDescriptor$1$2=getOwnPropertyDescriptorModule$2$1.f,nativeDefineProperty$2=definePropertyModule$1$2.f,nativeGetOwnPropertyNames$2=getOwnPropertyNamesExternal$2.f,nativePropertyIsEnumerable$2=propertyIsEnumerableModule$1$2.f,push$a$2=uncurryThis$e$2([].push),AllSymbols$2=shared$3$2("symbols"),ObjectPrototypeSymbols$2=shared$3$2("op-symbols"),WellKnownSymbolsStore$1$2=shared$3$2("wks"),USE_SETTER$2=!QObject$2||!QObject$2[PROTOTYPE$3]||!QObject$2[PROTOTYPE$3].findChild,fallbackDefineProperty$2=function(F,W,q){var K=nativeGetOwnPropertyDescriptor$1$2(ObjectPrototype$2$2,W);K&&delete ObjectPrototype$2$2[W],nativeDefineProperty$2(F,W,q),K&&F!==ObjectPrototype$2$2&&nativeDefineProperty$2(ObjectPrototype$2$2,W,K)},setSymbolDescriptor$2=DESCRIPTORS$a$2&&fails$j$2(function(){return nativeObjectCreate$2(nativeDefineProperty$2({},"a",{get:function(){return nativeDefineProperty$2(this,"a",{value:7}).a}})).a!==7})?fallbackDefineProperty$2:nativeDefineProperty$2,wrap$2=function(F,W){var q=AllSymbols$2[F]=nativeObjectCreate$2(SymbolPrototype$2);return setInternalState$5$1(q,{type:SYMBOL$2,tag:F,description:W}),DESCRIPTORS$a$2||(q.description=W),q},$defineProperty$3=function F(W,q,K){W===ObjectPrototype$2$2&&$defineProperty$3(ObjectPrototypeSymbols$2,q,K),anObject$9$2(W);var X=toPropertyKey$6(q);return anObject$9$2(K),hasOwn$c$2(AllSymbols$2,X)?(K.enumerable?(hasOwn$c$2(W,HIDDEN$2)&&W[HIDDEN$2][X]&&(W[HIDDEN$2][X]=!1),K=nativeObjectCreate$2(K,{enumerable:createPropertyDescriptor$3$2(0,!1)})):(hasOwn$c$2(W,HIDDEN$2)||nativeDefineProperty$2(W,HIDDEN$2,createPropertyDescriptor$3$2(1,{})),W[HIDDEN$2][X]=!0),setSymbolDescriptor$2(W,X,K)):nativeDefineProperty$2(W,X,K)},$defineProperties$2=function F(W,q){anObject$9$2(W);var K=toIndexedObject$4$2(q),X=objectKeys$1$2(K).concat($getOwnPropertySymbols$2(K));return $forEach$1$2(X,function(tt){(!DESCRIPTORS$a$2||call$d$2($propertyIsEnumerable$4,K,tt))&&$defineProperty$3(W,tt,K[tt])}),W},$create$2=function F(W,q){return q===void 0?nativeObjectCreate$2(W):$defineProperties$2(nativeObjectCreate$2(W),q)},$propertyIsEnumerable$4=function F(W){var q=toPropertyKey$6(W),K=call$d$2(nativePropertyIsEnumerable$2,this,q);return this===ObjectPrototype$2$2&&hasOwn$c$2(AllSymbols$2,q)&&!hasOwn$c$2(ObjectPrototypeSymbols$2,q)?!1:K||!hasOwn$c$2(this,q)||!hasOwn$c$2(AllSymbols$2,q)||hasOwn$c$2(this,HIDDEN$2)&&this[HIDDEN$2][q]?K:!0},$getOwnPropertyDescriptor$4=function F(W,q){var K=toIndexedObject$4$2(W),X=toPropertyKey$6(q);if(!(K===ObjectPrototype$2$2&&hasOwn$c$2(AllSymbols$2,X)&&!hasOwn$c$2(ObjectPrototypeSymbols$2,X))){var tt=nativeGetOwnPropertyDescriptor$1$2(K,X);return tt&&hasOwn$c$2(AllSymbols$2,X)&&!(hasOwn$c$2(K,HIDDEN$2)&&K[HIDDEN$2][X])&&(tt.enumerable=!0),tt}},$getOwnPropertyNames$3=function F(W){var q=nativeGetOwnPropertyNames$2(toIndexedObject$4$2(W)),K=[];return $forEach$1$2(q,function(X){!hasOwn$c$2(AllSymbols$2,X)&&!hasOwn$c$2(hiddenKeys$1$2,X)&&push$a$2(K,X)}),K},$getOwnPropertySymbols$2=function(F){var W=F===ObjectPrototype$2$2,q=nativeGetOwnPropertyNames$2(W?ObjectPrototypeSymbols$2:toIndexedObject$4$2(F)),K=[];return $forEach$1$2(q,function(X){hasOwn$c$2(AllSymbols$2,X)&&(!W||hasOwn$c$2(ObjectPrototype$2$2,X))&&push$a$2(K,AllSymbols$2[X])}),K};NATIVE_SYMBOL$3$2||($Symbol$2=function(){if(isPrototypeOf$j$2(SymbolPrototype$2,this))throw new TypeError$2$2("Symbol is not a constructor");var W=!arguments.length||arguments[0]===void 0?void 0:$toString$2(arguments[0]),q=uid$1$2(W),K=function(X){var tt=this===void 0?global$e$2:this;tt===ObjectPrototype$2$2&&call$d$2(K,ObjectPrototypeSymbols$2,X),hasOwn$c$2(tt,HIDDEN$2)&&hasOwn$c$2(tt[HIDDEN$2],q)&&(tt[HIDDEN$2][q]=!1);var rt=createPropertyDescriptor$3$2(1,X);try{setSymbolDescriptor$2(tt,q,rt)}catch(ot){if(!(ot instanceof RangeError$2))throw ot;fallbackDefineProperty$2(tt,q,rt)}};return DESCRIPTORS$a$2&&USE_SETTER$2&&setSymbolDescriptor$2(ObjectPrototype$2$2,q,{configurable:!0,set:K}),wrap$2(q,W)},SymbolPrototype$2=$Symbol$2[PROTOTYPE$3],defineBuiltIn$4$2(SymbolPrototype$2,"toString",function(){return getInternalState$2$2(this).tag}),defineBuiltIn$4$2($Symbol$2,"withoutSetter",function(F){return wrap$2(uid$1$2(F),F)}),propertyIsEnumerableModule$1$2.f=$propertyIsEnumerable$4,definePropertyModule$1$2.f=$defineProperty$3,definePropertiesModule$3.f=$defineProperties$2,getOwnPropertyDescriptorModule$2$1.f=$getOwnPropertyDescriptor$4,getOwnPropertyNamesModule$2$2.f=getOwnPropertyNamesExternal$2.f=$getOwnPropertyNames$3,getOwnPropertySymbolsModule$3$2.f=$getOwnPropertySymbols$2,wrappedWellKnownSymbolModule$3.f=function(F){return wrap$2(wellKnownSymbol$d$2(F),F)},DESCRIPTORS$a$2&&defineBuiltInAccessor$2$2(SymbolPrototype$2,"description",{configurable:!0,get:function(){return getInternalState$2$2(this).description}}));$$N$2({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$3$2,sham:!NATIVE_SYMBOL$3$2},{Symbol:$Symbol$2});$forEach$1$2(objectKeys$1$2(WellKnownSymbolsStore$1$2),function(F){defineWellKnownSymbol$l$2(F)});$$N$2({target:SYMBOL$2,stat:!0,forced:!NATIVE_SYMBOL$3$2},{useSetter:function(){USE_SETTER$2=!0},useSimple:function(){USE_SETTER$2=!1}});$$N$2({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3$2,sham:!DESCRIPTORS$a$2},{create:$create$2,defineProperty:$defineProperty$3,defineProperties:$defineProperties$2,getOwnPropertyDescriptor:$getOwnPropertyDescriptor$4});$$N$2({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3$2},{getOwnPropertyNames:$getOwnPropertyNames$3});defineSymbolToPrimitive$1$2();setToStringTag$6$2($Symbol$2,SYMBOL$2);hiddenKeys$1$2[HIDDEN$2]=!0;var NATIVE_SYMBOL$2$2=symbolConstructorDetection$2,symbolRegistryDetection$2=NATIVE_SYMBOL$2$2&&!!Symbol.for&&!!Symbol.keyFor,$$M$2=_export$2,getBuiltIn$a$2=getBuiltIn$f,hasOwn$b$2=hasOwnProperty_1$2,toString$5$2=toString$7$2,shared$2$2=sharedExports$2,NATIVE_SYMBOL_REGISTRY$1$2=symbolRegistryDetection$2,StringToSymbolRegistry$2=shared$2$2("string-to-symbol-registry"),SymbolToStringRegistry$1$2=shared$2$2("symbol-to-string-registry");$$M$2({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$1$2},{for:function(F){var W=toString$5$2(F);if(hasOwn$b$2(StringToSymbolRegistry$2,W))return StringToSymbolRegistry$2[W];var q=getBuiltIn$a$2("Symbol")(W);return StringToSymbolRegistry$2[W]=q,SymbolToStringRegistry$1$2[q]=W,q}});var $$L$2=_export$2,hasOwn$a$2=hasOwnProperty_1$2,isSymbol$2$2=isSymbol$5$2,tryToString$4$2=tryToString$6$2,shared$1$2=sharedExports$2,NATIVE_SYMBOL_REGISTRY$3=symbolRegistryDetection$2,SymbolToStringRegistry$3=shared$1$2("symbol-to-string-registry");$$L$2({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$3},{keyFor:function F(W){if(!isSymbol$2$2(W))throw new TypeError(tryToString$4$2(W)+" is not a symbol");if(hasOwn$a$2(SymbolToStringRegistry$3,W))return SymbolToStringRegistry$3[W]}});var uncurryThis$d$2=functionUncurryThis$2,arraySlice$5$2=uncurryThis$d$2([].slice),uncurryThis$c$2=functionUncurryThis$2,isArray$b$2=isArray$e$2,isCallable$a$2=isCallable$m,classof$8$2=classofRaw$2$2,toString$4$2=toString$7$2,push$9$2=uncurryThis$c$2([].push),getJsonReplacerFunction$2=function(F){if(isCallable$a$2(F))return F;if(isArray$b$2(F)){for(var W=F.length,q=[],K=0;K=W.length)return F.target=void 0,createIterResultObject$2$2(void 0,!0);switch(F.kind){case"keys":return createIterResultObject$2$2(q,!1);case"values":return createIterResultObject$2$2(W[q],!1)}return createIterResultObject$2$2([q,W[q]],!1)},"values");Iterators$3$2.Arguments=Iterators$3$2.Array;var domIterables$2={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},DOMIterables$4=domIterables$2,global$c$2=global$p,classof$7$2=classof$d$2,createNonEnumerableProperty$4$2=createNonEnumerableProperty$9,Iterators$2$2=iterators$2,wellKnownSymbol$a$2=wellKnownSymbol$n$1,TO_STRING_TAG$1$2=wellKnownSymbol$a$2("toStringTag");for(var COLLECTION_NAME$2 in DOMIterables$4){var Collection$2=global$c$2[COLLECTION_NAME$2],CollectionPrototype$2=Collection$2&&Collection$2.prototype;CollectionPrototype$2&&classof$7$2(CollectionPrototype$2)!==TO_STRING_TAG$1$2&&createNonEnumerableProperty$4$2(CollectionPrototype$2,TO_STRING_TAG$1$2,COLLECTION_NAME$2),Iterators$2$2[COLLECTION_NAME$2]=Iterators$2$2.Array}var parent$15$2=symbol$5$2,symbol$4$2=parent$15$2,wellKnownSymbol$9$2=wellKnownSymbol$n$1,defineProperty$4$2=objectDefineProperty$2.f,METADATA$1$2=wellKnownSymbol$9$2("metadata"),FunctionPrototype$1$2=Function.prototype;FunctionPrototype$1$2[METADATA$1$2]===void 0&&defineProperty$4$2(FunctionPrototype$1$2,METADATA$1$2,{value:null});var defineWellKnownSymbol$7$2=wellKnownSymbolDefine$2;defineWellKnownSymbol$7$2("asyncDispose");var defineWellKnownSymbol$6$2=wellKnownSymbolDefine$2;defineWellKnownSymbol$6$2("dispose");var defineWellKnownSymbol$5$2=wellKnownSymbolDefine$2;defineWellKnownSymbol$5$2("metadata");var parent$14$2=symbol$4$2,symbol$3$2=parent$14$2,getBuiltIn$7$2=getBuiltIn$f,uncurryThis$9$2=functionUncurryThis$2,Symbol$2$2=getBuiltIn$7$2("Symbol"),keyFor$2=Symbol$2$2.keyFor,thisSymbolValue$1$2=uncurryThis$9$2(Symbol$2$2.prototype.valueOf),symbolIsRegistered$2=Symbol$2$2.isRegisteredSymbol||function F(W){try{return keyFor$2(thisSymbolValue$1$2(W))!==void 0}catch{return!1}},$$H$2=_export$2,isRegisteredSymbol$1$2=symbolIsRegistered$2;$$H$2({target:"Symbol",stat:!0},{isRegisteredSymbol:isRegisteredSymbol$1$2});var shared$9=sharedExports$2,getBuiltIn$6$2=getBuiltIn$f,uncurryThis$8$2=functionUncurryThis$2,isSymbol$7=isSymbol$5$2,wellKnownSymbol$8$2=wellKnownSymbol$n$1,Symbol$1$2=getBuiltIn$6$2("Symbol"),$isWellKnownSymbol$2=Symbol$1$2.isWellKnownSymbol,getOwnPropertyNames$6=getBuiltIn$6$2("Object","getOwnPropertyNames"),thisSymbolValue$3=uncurryThis$8$2(Symbol$1$2.prototype.valueOf),WellKnownSymbolsStore$4=shared$9("wks");for(var i$3=0,symbolKeys$2=getOwnPropertyNames$6(Symbol$1$2),symbolKeysLength$2=symbolKeys$2.length;i$3=tt?F?"":void 0:(rt=charCodeAt$3(K,X),rt<55296||rt>56319||X+1===tt||(ot=charCodeAt$3(K,X+1))<56320||ot>57343?F?charAt$1$2(K,X):rt:F?stringSlice$3(K,X,X+2):(rt-55296<<10)+(ot-56320)+65536)}},stringMultibyte$2={codeAt:createMethod$1$2(!1),charAt:createMethod$1$2(!0)},charAt$5=stringMultibyte$2.charAt,toString$2$2=toString$7$2,InternalStateModule$3$2=internalState$2,defineIterator$1$2=iteratorDefine$2,createIterResultObject$1$2=createIterResultObject$3$2,STRING_ITERATOR$2="String Iterator",setInternalState$3$2=InternalStateModule$3$2.set,getInternalState$4=InternalStateModule$3$2.getterFor(STRING_ITERATOR$2);defineIterator$1$2(String,"String",function(F){setInternalState$3$2(this,{type:STRING_ITERATOR$2,string:toString$2$2(F),index:0})},function F(){var W=getInternalState$4(this),q=W.string,K=W.index,X;return K>=q.length?createIterResultObject$1$2(void 0,!0):(X=charAt$5(q,K),W.index+=X.length,createIterResultObject$1$2(X,!1))});var WrappedWellKnownSymbolModule$1$2=wellKnownSymbolWrapped$2,iterator$5$1=WrappedWellKnownSymbolModule$1$2.f("iterator"),parent$12$2=iterator$5$1,iterator$4$2=parent$12$2,parent$11$2=iterator$4$2,iterator$3$2=parent$11$2,parent$10$2=iterator$3$2,iterator$2$2=parent$10$2,iterator$1$2=iterator$2$2,_Symbol$iterator$1$1=getDefaultExportFromCjs$2(iterator$1$2);function _typeof$1$1(F){"@babel/helpers - typeof";return _typeof$1$1=typeof _Symbol$1$2=="function"&&typeof _Symbol$iterator$1$1=="symbol"?function(W){return typeof W}:function(W){return W&&typeof _Symbol$1$2=="function"&&W.constructor===_Symbol$1$2&&W!==_Symbol$1$2.prototype?"symbol":typeof W},_typeof$1$1(F)}var WrappedWellKnownSymbolModule$3=wellKnownSymbolWrapped$2,toPrimitive$4$2=WrappedWellKnownSymbolModule$3.f("toPrimitive"),parent$$$2=toPrimitive$4$2,toPrimitive$3$2=parent$$$2,parent$_$2=toPrimitive$3$2,toPrimitive$2$2=parent$_$2,parent$Z$2=toPrimitive$2$2,toPrimitive$1$2=parent$Z$2,toPrimitive$8=toPrimitive$1$2,_Symbol$toPrimitive$2=getDefaultExportFromCjs$2(toPrimitive$8);function _toPrimitive$2(F,W){if(_typeof$1$1(F)!=="object"||F===null)return F;var q=F[_Symbol$toPrimitive$2];if(q!==void 0){var K=q.call(F,W||"default");if(_typeof$1$1(K)!=="object")return K;throw new TypeError("@@toPrimitive must return a primitive value.")}return(W==="string"?String:Number)(F)}function _toPropertyKey$2(F){var W=_toPrimitive$2(F,"string");return _typeof$1$1(W)==="symbol"?W:String(W)}function _defineProperties$2(F,W){for(var q=0;q=0:ot>ut;ut+=yn)ut in rt&&(X=q(X,rt[ut],ut,tt));return X}},arrayReduce$2={left:createMethod$7(!1),right:createMethod$7(!0)},fails$e$2=fails$u$2,arrayMethodIsStrict$4$2=function(F,W){var q=[][F];return!!q&&fails$e$2(function(){q.call(null,W||function(){return 1},1)})},global$a$2=global$p,classof$6$2=classofRaw$2$2,engineIsNode$2=classof$6$2(global$a$2.process)==="process",$$C$2=_export$2,$reduce$2=arrayReduce$2.left,arrayMethodIsStrict$3$2=arrayMethodIsStrict$4$2,CHROME_VERSION$2=engineV8Version$2,IS_NODE$4=engineIsNode$2,CHROME_BUG$2=!IS_NODE$4&&CHROME_VERSION$2>79&&CHROME_VERSION$2<83,FORCED$4$2=CHROME_BUG$2||!arrayMethodIsStrict$3$2("reduce");$$C$2({target:"Array",proto:!0,forced:FORCED$4$2},{reduce:function F(W){var q=arguments.length;return $reduce$2(this,W,q,q>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$e=getBuiltInPrototypeMethod$g,reduce$3$2=getBuiltInPrototypeMethod$e("Array","reduce"),isPrototypeOf$h$2=objectIsPrototypeOf$2,method$e$2=reduce$3$2,ArrayPrototype$f$2=Array.prototype,reduce$2$2=function(F){var W=F.reduce;return F===ArrayPrototype$f$2||isPrototypeOf$h$2(ArrayPrototype$f$2,F)&&W===ArrayPrototype$f$2.reduce?method$e$2:W},parent$X$2=reduce$2$2,reduce$1$2=parent$X$2,reduce$5=reduce$1$2,_reduceInstanceProperty$2=getDefaultExportFromCjs$2(reduce$5),$$B$2=_export$2,$filter$2=arrayIteration$2.filter,arrayMethodHasSpeciesSupport$3$2=arrayMethodHasSpeciesSupport$5$2,HAS_SPECIES_SUPPORT$3$2=arrayMethodHasSpeciesSupport$3$2("filter");$$B$2({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$3$2},{filter:function F(W){return $filter$2(this,W,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$d=getBuiltInPrototypeMethod$g,filter$3$2=getBuiltInPrototypeMethod$d("Array","filter"),isPrototypeOf$g$2=objectIsPrototypeOf$2,method$d$2=filter$3$2,ArrayPrototype$e$2=Array.prototype,filter$2$2=function(F){var W=F.filter;return F===ArrayPrototype$e$2||isPrototypeOf$g$2(ArrayPrototype$e$2,F)&&W===ArrayPrototype$e$2.filter?method$d$2:W},parent$W$2=filter$2$2,filter$1$2=parent$W$2,filter$5=filter$1$2,_filterInstanceProperty$2=getDefaultExportFromCjs$2(filter$5),$$A$2=_export$2,$map$2=arrayIteration$2.map,arrayMethodHasSpeciesSupport$2$2=arrayMethodHasSpeciesSupport$5$2,HAS_SPECIES_SUPPORT$2$2=arrayMethodHasSpeciesSupport$2$2("map");$$A$2({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$2$2},{map:function F(W){return $map$2(this,W,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$c=getBuiltInPrototypeMethod$g,map$6$1=getBuiltInPrototypeMethod$c("Array","map"),isPrototypeOf$f$2=objectIsPrototypeOf$2,method$c$2=map$6$1,ArrayPrototype$d$2=Array.prototype,map$5$1=function(F){var W=F.map;return F===ArrayPrototype$d$2||isPrototypeOf$f$2(ArrayPrototype$d$2,F)&&W===ArrayPrototype$d$2.map?method$c$2:W},parent$V$2=map$5$1,map$4$2=parent$V$2,map$3$2=map$4$2,_mapInstanceProperty$2=getDefaultExportFromCjs$2(map$3$2),isArray$a$2=isArray$e$2,lengthOfArrayLike$7$2=lengthOfArrayLike$d$1,doesNotExceedSafeInteger$2$2=doesNotExceedSafeInteger$4$1,bind$a$2=functionBindContext$2,flattenIntoArray$1=function(F,W,q,K,X,tt,rt,ot){for(var ut=X,yn=0,uo=rt?bind$a$2(rt,ot):!1,po,mo;yn0&&isArray$a$2(po)?(mo=lengthOfArrayLike$7$2(po),ut=flattenIntoArray$1(F,W,po,mo,ut,tt-1)-1):(doesNotExceedSafeInteger$2$2(ut+1),F[ut]=po),ut++),yn++;return ut},flattenIntoArray_1=flattenIntoArray$1,$$z$2=_export$2,flattenIntoArray=flattenIntoArray_1,aCallable$8$1=aCallable$e,toObject$7$2=toObject$e$2,lengthOfArrayLike$6$2=lengthOfArrayLike$d$1,arraySpeciesCreate$1$2=arraySpeciesCreate$4$1;$$z$2({target:"Array",proto:!0},{flatMap:function F(W){var q=toObject$7$2(this),K=lengthOfArrayLike$6$2(q),X;return aCallable$8$1(W),X=arraySpeciesCreate$1$2(q,0),X.length=flattenIntoArray(X,q,q,K,0,1,W,arguments.length>1?arguments[1]:void 0),X}});var getBuiltInPrototypeMethod$b=getBuiltInPrototypeMethod$g,flatMap$3=getBuiltInPrototypeMethod$b("Array","flatMap"),isPrototypeOf$e$2=objectIsPrototypeOf$2,method$b$2=flatMap$3,ArrayPrototype$c$2=Array.prototype,flatMap$2=function(F){var W=F.flatMap;return F===ArrayPrototype$c$2||isPrototypeOf$e$2(ArrayPrototype$c$2,F)&&W===ArrayPrototype$c$2.flatMap?method$b$2:W},parent$U$2=flatMap$2,flatMap$1=parent$U$2,flatMap=flatMap$1,_flatMapInstanceProperty=getDefaultExportFromCjs$2(flatMap);function createNewDataPipeFrom(F){return new DataPipeUnderConstruction(F)}var SimpleDataPipe=function(){function F(W,q,K){var X,tt,rt;_classCallCheck$2(this,F),_defineProperty$2(this,"_listeners",{add:_bindInstanceProperty$1$2(X=this._add).call(X,this),remove:_bindInstanceProperty$1$2(tt=this._remove).call(tt,this),update:_bindInstanceProperty$1$2(rt=this._update).call(rt,this)}),this._source=W,this._transformers=q,this._target=K}return _createClass$2(F,[{key:"all",value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:"start",value:function(){return this._source.on("add",this._listeners.add),this._source.on("remove",this._listeners.remove),this._source.on("update",this._listeners.update),this}},{key:"stop",value:function(){return this._source.off("add",this._listeners.add),this._source.off("remove",this._listeners.remove),this._source.off("update",this._listeners.update),this}},{key:"_transformItems",value:function(q){var K;return _reduceInstanceProperty$2(K=this._transformers).call(K,function(X,tt){return tt(X)},q)}},{key:"_add",value:function(q,K){K!=null&&this._target.add(this._transformItems(this._source.get(K.items)))}},{key:"_update",value:function(q,K){K!=null&&this._target.update(this._transformItems(this._source.get(K.items)))}},{key:"_remove",value:function(q,K){K!=null&&this._target.remove(this._transformItems(K.oldData))}}]),F}(),DataPipeUnderConstruction=function(){function F(W){_classCallCheck$2(this,F),_defineProperty$2(this,"_transformers",[]),this._source=W}return _createClass$2(F,[{key:"filter",value:function(q){return this._transformers.push(function(K){return _filterInstanceProperty$2(K).call(K,q)}),this}},{key:"map",value:function(q){return this._transformers.push(function(K){return _mapInstanceProperty$2(K).call(K,q)}),this}},{key:"flatMap",value:function(q){return this._transformers.push(function(K){return _flatMapInstanceProperty(K).call(K,q)}),this}},{key:"to",value:function(q){return new SimpleDataPipe(this._source,this._transformers,q)}}]),F}(),call$a$2=functionCall$2,anObject$7$2=anObject$d$1,getMethod$1$2=getMethod$3$2,iteratorClose$2$2=function(F,W,q){var K,X;anObject$7$2(F);try{if(K=getMethod$1$2(F,"return"),!K){if(W==="throw")throw q;return q}K=call$a$2(K,F)}catch(tt){X=!0,K=tt}if(W==="throw")throw q;if(X)throw K;return anObject$7$2(K),q},anObject$6$2=anObject$d$1,iteratorClose$1$2=iteratorClose$2$2,callWithSafeIterationClosing$1$2=function(F,W,q,K){try{return K?W(anObject$6$2(q)[0],q[1]):W(q)}catch(X){iteratorClose$1$2(F,"throw",X)}},wellKnownSymbol$7$2=wellKnownSymbol$n$1,Iterators$1$2=iterators$2,ITERATOR$2$2=wellKnownSymbol$7$2("iterator"),ArrayPrototype$b$2=Array.prototype,isArrayIteratorMethod$2$2=function(F){return F!==void 0&&(Iterators$1$2.Array===F||ArrayPrototype$b$2[ITERATOR$2$2]===F)},classof$5$2=classof$d$2,getMethod$5=getMethod$3$2,isNullOrUndefined$3$2=isNullOrUndefined$6$1,Iterators$7=iterators$2,wellKnownSymbol$6$2=wellKnownSymbol$n$1,ITERATOR$1$2=wellKnownSymbol$6$2("iterator"),getIteratorMethod$9$2=function(F){if(!isNullOrUndefined$3$2(F))return getMethod$5(F,ITERATOR$1$2)||getMethod$5(F,"@@iterator")||Iterators$7[classof$5$2(F)]},call$9$2=functionCall$2,aCallable$7$2=aCallable$e,anObject$5$2=anObject$d$1,tryToString$3$2=tryToString$6$2,getIteratorMethod$8$2=getIteratorMethod$9$2,$TypeError$7$2=TypeError,getIterator$8=function(F,W){var q=arguments.length<2?getIteratorMethod$8$2(F):W;if(aCallable$7$2(q))return anObject$5$2(call$9$2(q,F));throw new $TypeError$7$2(tryToString$3$2(F)+" is not iterable")},bind$9$2=functionBindContext$2,call$8$2=functionCall$2,toObject$6$2=toObject$e$2,callWithSafeIterationClosing$3=callWithSafeIterationClosing$1$2,isArrayIteratorMethod$1$2=isArrayIteratorMethod$2$2,isConstructor$2$2=isConstructor$4$2,lengthOfArrayLike$5$2=lengthOfArrayLike$d$1,createProperty$3$2=createProperty$6$2,getIterator$7=getIterator$8,getIteratorMethod$7$2=getIteratorMethod$9$2,$Array$1$2=Array,arrayFrom$2=function F(W){var q=toObject$6$2(W),K=isConstructor$2$2(this),X=arguments.length,tt=X>1?arguments[1]:void 0,rt=tt!==void 0;rt&&(tt=bind$9$2(tt,X>2?arguments[2]:void 0));var ot=getIteratorMethod$7$2(q),ut=0,yn,uo,po,mo,wo,lf;if(ot&&!(this===$Array$1$2&&isArrayIteratorMethod$1$2(ot)))for(mo=getIterator$7(q,ot),wo=mo.next,uo=K?new this:[];!(po=call$8$2(wo,mo)).done;ut++)lf=rt?callWithSafeIterationClosing$3(mo,tt,[po.value,ut],!0):po.value,createProperty$3$2(uo,ut,lf);else for(yn=lengthOfArrayLike$5$2(q),uo=K?new this(yn):$Array$1$2(yn);yn>ut;ut++)lf=rt?tt(q[ut],ut):q[ut],createProperty$3$2(uo,ut,lf);return uo.length=ut,uo},wellKnownSymbol$5$2=wellKnownSymbol$n$1,ITERATOR$8=wellKnownSymbol$5$2("iterator"),SAFE_CLOSING$2=!1;try{var called$2=0,iteratorWithReturn$2={next:function(){return{done:!!called$2++}},return:function(){SAFE_CLOSING$2=!0}};iteratorWithReturn$2[ITERATOR$8]=function(){return this},Array.from(iteratorWithReturn$2,function(){throw 2})}catch(F){}var checkCorrectnessOfIteration$2$1=function(F,W){try{if(!W&&!SAFE_CLOSING$2)return!1}catch{return!1}var q=!1;try{var K={};K[ITERATOR$8]=function(){return{next:function(){return{done:q=!0}}}},F(K)}catch{}return q},$$y$2=_export$2,from$6$2=arrayFrom$2,checkCorrectnessOfIteration$1$2=checkCorrectnessOfIteration$2$1,INCORRECT_ITERATION$2=!checkCorrectnessOfIteration$1$2(function(F){Array.from(F)});$$y$2({target:"Array",stat:!0,forced:INCORRECT_ITERATION$2},{from:from$6$2});var path$h$2=path$o$2,from$5$2=path$h$2.Array.from,parent$T$2=from$5$2,from$4$2=parent$T$2,from$3$2=from$4$2,_Array$from$1$2=getDefaultExportFromCjs$2(from$3$2),getIteratorMethod$6$2=getIteratorMethod$9$2,getIteratorMethod_1$2=getIteratorMethod$6$2,parent$S$2=getIteratorMethod_1$2,getIteratorMethod$5$2=parent$S$2,parent$R$2=getIteratorMethod$5$2,getIteratorMethod$4$2=parent$R$2,parent$Q$2=getIteratorMethod$4$2,getIteratorMethod$3$2=parent$Q$2,getIteratorMethod$2$2=getIteratorMethod$3$2,_getIteratorMethod$1$2=getDefaultExportFromCjs$2(getIteratorMethod$2$2),getIteratorMethod$1$2=getIteratorMethod$2$2,_getIteratorMethod$3=getDefaultExportFromCjs$2(getIteratorMethod$1$2),$$x$2=_export$2,isArray$9$2=isArray$e$2;$$x$2({target:"Array",stat:!0},{isArray:isArray$9$2});var path$g$2=path$o$2,isArray$8$2=path$g$2.Array.isArray,parent$P$2=isArray$8$2,isArray$7$2=parent$P$2,parent$O$2=isArray$7$2,isArray$6$2=parent$O$2,parent$N$2=isArray$6$2,isArray$5$2=parent$N$2,isArray$4$2=isArray$5$2,_Array$isArray$1$2=getDefaultExportFromCjs$2(isArray$4$2);function _arrayWithHoles$2(F){if(_Array$isArray$1$2(F))return F}var DESCRIPTORS$8$2=descriptors$2,isArray$3$2=isArray$e$2,$TypeError$6$2=TypeError,getOwnPropertyDescriptor$5$2=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET$2=DESCRIPTORS$8$2&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(F){return F instanceof TypeError}}(),arraySetLength$2=SILENT_ON_NON_WRITABLE_LENGTH_SET$2?function(F,W){if(isArray$3$2(F)&&!getOwnPropertyDescriptor$5$2(F,"length").writable)throw new $TypeError$6$2("Cannot set read only .length");return F.length=W}:function(F,W){return F.length=W},$$w$2=_export$2,toObject$5$2=toObject$e$2,lengthOfArrayLike$4$2=lengthOfArrayLike$d$1,setArrayLength$1$2=arraySetLength$2,doesNotExceedSafeInteger$1$2=doesNotExceedSafeInteger$4$1,fails$d$2=fails$u$2,INCORRECT_TO_LENGTH$2=fails$d$2(function(){return[].push.call({length:4294967296},1)!==4294967297}),properErrorOnNonWritableLength$2=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(F){return F instanceof TypeError}},FORCED$3$2=INCORRECT_TO_LENGTH$2||!properErrorOnNonWritableLength$2();$$w$2({target:"Array",proto:!0,arity:1,forced:FORCED$3$2},{push:function F(W){var q=toObject$5$2(this),K=lengthOfArrayLike$4$2(q),X=arguments.length;doesNotExceedSafeInteger$1$2(K+X);for(var tt=0;ttF.length)&&(W=F.length);for(var q=0,K=new Array(W);q"u"&&documentAll$2$2!==void 0,documentAll_1$2={all:documentAll$2$2,IS_HTMLDDA:IS_HTMLDDA$2},$documentAll$1$2=documentAll_1$2,documentAll$1$2=$documentAll$1$2.all,isCallable$m=$documentAll$1$2.IS_HTMLDDA?function(F){return typeof F=="function"||F===documentAll$1$2}:function(F){return typeof F=="function"},objectGetOwnPropertyDescriptor$2={},fails$s$2=fails$u$2,descriptors$2=!fails$s$2(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),NATIVE_BIND$2$2=functionBindNative$2,call$i=Function.prototype.call,functionCall$2=NATIVE_BIND$2$2?call$i.bind(call$i):function(){return call$i.apply(call$i,arguments)},objectPropertyIsEnumerable$2={},$propertyIsEnumerable$1$2={}.propertyIsEnumerable,getOwnPropertyDescriptor$7$1=Object.getOwnPropertyDescriptor,NASHORN_BUG$2=getOwnPropertyDescriptor$7$1&&!$propertyIsEnumerable$1$2.call({1:2},1);objectPropertyIsEnumerable$2.f=NASHORN_BUG$2?function F(W){var q=getOwnPropertyDescriptor$7$1(this,W);return!!q&&q.enumerable}:$propertyIsEnumerable$1$2;var createPropertyDescriptor$7=function(F,W){return{enumerable:!(F&1),configurable:!(F&2),writable:!(F&4),value:W}},uncurryThis$o$2=functionUncurryThis$2,fails$r$2=fails$u$2,classof$f$1=classofRaw$2$2,$Object$4$2=Object,split$2=uncurryThis$o$2("".split),indexedObject$2=fails$r$2(function(){return!$Object$4$2("z").propertyIsEnumerable(0)})?function(F){return classof$f$1(F)==="String"?split$2(F,""):$Object$4$2(F)}:$Object$4$2,isNullOrUndefined$6$1=function(F){return F==null},isNullOrUndefined$5$2=isNullOrUndefined$6$1,$TypeError$g$2=TypeError,requireObjectCoercible$3$2=function(F){if(isNullOrUndefined$5$2(F))throw new $TypeError$g$2("Can't call method on "+F);return F},IndexedObject$3$2=indexedObject$2,requireObjectCoercible$2$2=requireObjectCoercible$3$2,toIndexedObject$a$2=function(F){return IndexedObject$3$2(requireObjectCoercible$2$2(F))},isCallable$l=isCallable$m,$documentAll$3=documentAll_1$2,documentAll$4=$documentAll$3.all,isObject$h$2=$documentAll$3.IS_HTMLDDA?function(F){return typeof F=="object"?F!==null:isCallable$l(F)||F===documentAll$4}:function(F){return typeof F=="object"?F!==null:isCallable$l(F)},path$o$2={},path$n$2=path$o$2,global$o=global$p,isCallable$k=isCallable$m,aFunction$2=function(F){return isCallable$k(F)?F:void 0},getBuiltIn$f=function(F,W){return arguments.length<2?aFunction$2(path$n$2[F])||aFunction$2(global$o[F]):path$n$2[F]&&path$n$2[F][W]||global$o[F]&&global$o[F][W]},uncurryThis$n$2=functionUncurryThis$2,objectIsPrototypeOf$2=uncurryThis$n$2({}.isPrototypeOf),engineUserAgent$2=typeof navigator<"u"&&String(navigator.userAgent)||"",global$n$1=global$p,userAgent$5=engineUserAgent$2,process$3=global$n$1.process,Deno$1$1=global$n$1.Deno,versions$2=process$3&&process$3.versions||Deno$1$1&&Deno$1$1.version,v8$2=versions$2&&versions$2.v8,match$2,version$2;v8$2&&(match$2=v8$2.split("."),version$2=match$2[0]>0&&match$2[0]<4?1:+(match$2[0]+match$2[1]));!version$2&&userAgent$5&&(match$2=userAgent$5.match(/Edge\/(\d+)/),(!match$2||match$2[1]>=74)&&(match$2=userAgent$5.match(/Chrome\/(\d+)/),match$2&&(version$2=+match$2[1])));var engineV8Version$2=version$2,V8_VERSION$3$1=engineV8Version$2,fails$q$2=fails$u$2,global$m$1=global$p,$String$5$2=global$m$1.String,symbolConstructorDetection$2=!!Object.getOwnPropertySymbols&&!fails$q$2(function(){var F=Symbol("symbol detection");return!$String$5$2(F)||!(Object(F)instanceof Symbol)||!Symbol.sham&&V8_VERSION$3$1&&V8_VERSION$3$1<41}),NATIVE_SYMBOL$5$2=symbolConstructorDetection$2,useSymbolAsUid$2=NATIVE_SYMBOL$5$2&&!Symbol.sham&&typeof Symbol.iterator=="symbol",getBuiltIn$e=getBuiltIn$f,isCallable$j$1=isCallable$m,isPrototypeOf$k$2=objectIsPrototypeOf$2,USE_SYMBOL_AS_UID$1$2=useSymbolAsUid$2,$Object$3$2=Object,isSymbol$5$2=USE_SYMBOL_AS_UID$1$2?function(F){return typeof F=="symbol"}:function(F){var W=getBuiltIn$e("Symbol");return isCallable$j$1(W)&&isPrototypeOf$k$2(W.prototype,$Object$3$2(F))},$String$4$2=String,tryToString$6$2=function(F){try{return $String$4$2(F)}catch{return"Object"}},isCallable$i$2=isCallable$m,tryToString$5$2=tryToString$6$2,$TypeError$f$2=TypeError,aCallable$e=function(F){if(isCallable$i$2(F))return F;throw new $TypeError$f$2(tryToString$5$2(F)+" is not a function")},aCallable$d=aCallable$e,isNullOrUndefined$4$2=isNullOrUndefined$6$1,getMethod$3$2=function(F,W){var q=F[W];return isNullOrUndefined$4$2(q)?void 0:aCallable$d(q)},call$h=functionCall$2,isCallable$h$2=isCallable$m,isObject$g$2=isObject$h$2,$TypeError$e$2=TypeError,ordinaryToPrimitive$1$2=function(F,W){var q,K;if(W==="string"&&isCallable$h$2(q=F.toString)&&!isObject$g$2(K=call$h(q,F))||isCallable$h$2(q=F.valueOf)&&!isObject$g$2(K=call$h(q,F))||W!=="string"&&isCallable$h$2(q=F.toString)&&!isObject$g$2(K=call$h(q,F)))return K;throw new $TypeError$e$2("Can't convert object to primitive value")},shared$7$2={exports:{}},isPure=!0,global$l$2=global$p,defineProperty$e$2=Object.defineProperty,defineGlobalProperty$1$2=function(F,W){try{defineProperty$e$2(global$l$2,F,{value:W,configurable:!0,writable:!0})}catch{global$l$2[F]=W}return W},global$k$2=global$p,defineGlobalProperty$3=defineGlobalProperty$1$2,SHARED$2="__core-js_shared__",store$3$2=global$k$2[SHARED$2]||defineGlobalProperty$3(SHARED$2,{}),sharedStore$2=store$3$2,store$2$2=sharedStore$2;(shared$7$2.exports=function(F,W){return store$2$2[F]||(store$2$2[F]=W!==void 0?W:{})})("versions",[]).push({version:"3.33.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedExports$2=shared$7$2.exports,requireObjectCoercible$1$2=requireObjectCoercible$3$2,$Object$2$2=Object,toObject$e$2=function(F){return $Object$2$2(requireObjectCoercible$1$2(F))},uncurryThis$m$2=functionUncurryThis$2,toObject$d$2=toObject$e$2,hasOwnProperty$2=uncurryThis$m$2({}.hasOwnProperty),hasOwnProperty_1$2=Object.hasOwn||function F(W,q){return hasOwnProperty$2(toObject$d$2(W),q)},uncurryThis$l$2=functionUncurryThis$2,id$1$2=0,postfix$2=Math.random(),toString$8$2=uncurryThis$l$2(1 .toString),uid$4$2=function(F){return"Symbol("+(F===void 0?"":F)+")_"+toString$8$2(++id$1$2+postfix$2,36)},global$j$2=global$p,shared$6$2=sharedExports$2,hasOwn$j=hasOwnProperty_1$2,uid$3$2=uid$4$2,NATIVE_SYMBOL$4$2=symbolConstructorDetection$2,USE_SYMBOL_AS_UID$3=useSymbolAsUid$2,Symbol$3$2=global$j$2.Symbol,WellKnownSymbolsStore$2$2=shared$6$2("wks"),createWellKnownSymbol$2=USE_SYMBOL_AS_UID$3?Symbol$3$2.for||Symbol$3$2:Symbol$3$2&&Symbol$3$2.withoutSetter||uid$3$2,wellKnownSymbol$n$1=function(F){return hasOwn$j(WellKnownSymbolsStore$2$2,F)||(WellKnownSymbolsStore$2$2[F]=NATIVE_SYMBOL$4$2&&hasOwn$j(Symbol$3$2,F)?Symbol$3$2[F]:createWellKnownSymbol$2("Symbol."+F)),WellKnownSymbolsStore$2$2[F]},call$g$1=functionCall$2,isObject$f$2=isObject$h$2,isSymbol$4$2=isSymbol$5$2,getMethod$2$2=getMethod$3$2,ordinaryToPrimitive$3=ordinaryToPrimitive$1$2,wellKnownSymbol$m$2=wellKnownSymbol$n$1,$TypeError$d$2=TypeError,TO_PRIMITIVE$2=wellKnownSymbol$m$2("toPrimitive"),toPrimitive$6$2=function(F,W){if(!isObject$f$2(F)||isSymbol$4$2(F))return F;var q=getMethod$2$2(F,TO_PRIMITIVE$2),K;if(q){if(W===void 0&&(W="default"),K=call$g$1(q,F,W),!isObject$f$2(K)||isSymbol$4$2(K))return K;throw new $TypeError$d$2("Can't convert object to primitive value")}return W===void 0&&(W="number"),ordinaryToPrimitive$3(F,W)},toPrimitive$5$2=toPrimitive$6$2,isSymbol$3$2=isSymbol$5$2,toPropertyKey$4$2=function(F){var W=toPrimitive$5$2(F,"string");return isSymbol$3$2(W)?W:W+""},global$i$2=global$p,isObject$e$2=isObject$h$2,document$3=global$i$2.document,EXISTS$1$2=isObject$e$2(document$3)&&isObject$e$2(document$3.createElement),documentCreateElement$1$2=function(F){return EXISTS$1$2?document$3.createElement(F):{}},DESCRIPTORS$h$2=descriptors$2,fails$p$2=fails$u$2,createElement$1$1=documentCreateElement$1$2,ie8DomDefine$2=!DESCRIPTORS$h$2&&!fails$p$2(function(){return Object.defineProperty(createElement$1$1("div"),"a",{get:function(){return 7}}).a!==7}),DESCRIPTORS$g$2=descriptors$2,call$f$1=functionCall$2,propertyIsEnumerableModule$2$2=objectPropertyIsEnumerable$2,createPropertyDescriptor$6$1=createPropertyDescriptor$7,toIndexedObject$9$2=toIndexedObject$a$2,toPropertyKey$3$2=toPropertyKey$4$2,hasOwn$i$1=hasOwnProperty_1$2,IE8_DOM_DEFINE$1$2=ie8DomDefine$2,$getOwnPropertyDescriptor$2$2=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor$2.f=DESCRIPTORS$g$2?$getOwnPropertyDescriptor$2$2:function F(W,q){if(W=toIndexedObject$9$2(W),q=toPropertyKey$3$2(q),IE8_DOM_DEFINE$1$2)try{return $getOwnPropertyDescriptor$2$2(W,q)}catch{}if(hasOwn$i$1(W,q))return createPropertyDescriptor$6$1(!call$f$1(propertyIsEnumerableModule$2$2.f,W,q),W[q])};var fails$o$2=fails$u$2,isCallable$g$2=isCallable$m,replacement$2=/#|\.prototype\./,isForced$2$1=function(F,W){var q=data$2[normalize$2(F)];return q===POLYFILL$2?!0:q===NATIVE$2?!1:isCallable$g$2(W)?fails$o$2(W):!!W},normalize$2=isForced$2$1.normalize=function(F){return String(F).replace(replacement$2,".").toLowerCase()},data$2=isForced$2$1.data={},NATIVE$2=isForced$2$1.NATIVE="N",POLYFILL$2=isForced$2$1.POLYFILL="P",isForced_1$2=isForced$2$1,uncurryThis$k$2=functionUncurryThisClause$2,aCallable$c=aCallable$e,NATIVE_BIND$1$2=functionBindNative$2,bind$i=uncurryThis$k$2(uncurryThis$k$2.bind),functionBindContext$2=function(F,W){return aCallable$c(F),W===void 0?F:NATIVE_BIND$1$2?bind$i(F,W):function(){return F.apply(W,arguments)}},objectDefineProperty$2={},DESCRIPTORS$f$2=descriptors$2,fails$n$2=fails$u$2,v8PrototypeDefineBug$2=DESCRIPTORS$f$2&&fails$n$2(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),isObject$d$2=isObject$h$2,$String$3$2=String,$TypeError$c$2=TypeError,anObject$d$1=function(F){if(isObject$d$2(F))return F;throw new $TypeError$c$2($String$3$2(F)+" is not an object")},DESCRIPTORS$e$2=descriptors$2,IE8_DOM_DEFINE$3=ie8DomDefine$2,V8_PROTOTYPE_DEFINE_BUG$1$2=v8PrototypeDefineBug$2,anObject$c$1=anObject$d$1,toPropertyKey$2$2=toPropertyKey$4$2,$TypeError$b$2=TypeError,$defineProperty$1$2=Object.defineProperty,$getOwnPropertyDescriptor$1$2=Object.getOwnPropertyDescriptor,ENUMERABLE$2="enumerable",CONFIGURABLE$1$2="configurable",WRITABLE$2="writable";objectDefineProperty$2.f=DESCRIPTORS$e$2?V8_PROTOTYPE_DEFINE_BUG$1$2?function F(W,q,K){if(anObject$c$1(W),q=toPropertyKey$2$2(q),anObject$c$1(K),typeof W=="function"&&q==="prototype"&&"value"in K&&WRITABLE$2 in K&&!K[WRITABLE$2]){var X=$getOwnPropertyDescriptor$1$2(W,q);X&&X[WRITABLE$2]&&(W[q]=K.value,K={configurable:CONFIGURABLE$1$2 in K?K[CONFIGURABLE$1$2]:X[CONFIGURABLE$1$2],enumerable:ENUMERABLE$2 in K?K[ENUMERABLE$2]:X[ENUMERABLE$2],writable:!1})}return $defineProperty$1$2(W,q,K)}:$defineProperty$1$2:function F(W,q,K){if(anObject$c$1(W),q=toPropertyKey$2$2(q),anObject$c$1(K),IE8_DOM_DEFINE$3)try{return $defineProperty$1$2(W,q,K)}catch{}if("get"in K||"set"in K)throw new $TypeError$b$2("Accessors not supported");return"value"in K&&(W[q]=K.value),W};var DESCRIPTORS$d$2=descriptors$2,definePropertyModule$4$1=objectDefineProperty$2,createPropertyDescriptor$5$2=createPropertyDescriptor$7,createNonEnumerableProperty$9=DESCRIPTORS$d$2?function(F,W,q){return definePropertyModule$4$1.f(F,W,createPropertyDescriptor$5$2(1,q))}:function(F,W,q){return F[W]=q,F},global$h$2=global$p,apply$5$2=functionApply$2,uncurryThis$j$2=functionUncurryThisClause$2,isCallable$f$2=isCallable$m,getOwnPropertyDescriptor$6$2=objectGetOwnPropertyDescriptor$2.f,isForced$1$2=isForced_1$2,path$m$2=path$o$2,bind$h=functionBindContext$2,createNonEnumerableProperty$8=createNonEnumerableProperty$9,hasOwn$h$1=hasOwnProperty_1$2,wrapConstructor$2=function(F){var W=function(q,K,X){if(this instanceof W){switch(arguments.length){case 0:return new F;case 1:return new F(q);case 2:return new F(q,K)}return new F(q,K,X)}return apply$5$2(F,this,arguments)};return W.prototype=F.prototype,W},_export$2=function(F,W){var q=F.target,K=F.global,X=F.stat,tt=F.proto,rt=K?global$h$2:X?global$h$2[q]:(global$h$2[q]||{}).prototype,ot=K?path$m$2:path$m$2[q]||createNonEnumerableProperty$8(path$m$2,q,{})[q],ut=ot.prototype,yn,uo,po,mo,wo,lf,yf,cf,vf;for(mo in W)yn=isForced$1$2(K?mo:q+(X?".":"#")+mo,F.forced),uo=!yn&&rt&&hasOwn$h$1(rt,mo),lf=ot[mo],uo&&(F.dontCallGetSet?(vf=getOwnPropertyDescriptor$6$2(rt,mo),yf=vf&&vf.value):yf=rt[mo]),wo=uo&&yf?yf:W[mo],!(uo&&typeof lf==typeof wo)&&(F.bind&&uo?cf=bind$h(wo,global$h$2):F.wrap&&uo?cf=wrapConstructor$2(wo):tt&&isCallable$f$2(wo)?cf=uncurryThis$j$2(wo):cf=wo,(F.sham||wo&&wo.sham||lf&&lf.sham)&&createNonEnumerableProperty$8(cf,"sham",!0),createNonEnumerableProperty$8(ot,mo,cf),tt&&(po=q+"Prototype",hasOwn$h$1(path$m$2,po)||createNonEnumerableProperty$8(path$m$2,po,{}),createNonEnumerableProperty$8(path$m$2[po],mo,wo),F.real&&ut&&(yn||!ut[mo])&&createNonEnumerableProperty$8(ut,mo,wo)))},$$P$1=_export$2,DESCRIPTORS$c$2=descriptors$2,defineProperty$d$2=objectDefineProperty$2.f;$$P$1({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$d$2,sham:!DESCRIPTORS$c$2},{defineProperty:defineProperty$d$2});var path$l$2=path$o$2,Object$4$2=path$l$2.Object,defineProperty$c$2=defineProperty$f$2.exports=function F(W,q,K){return Object$4$2.defineProperty(W,q,K)};Object$4$2.defineProperty.sham&&(defineProperty$c$2.sham=!0);var definePropertyExports$2=defineProperty$f$2.exports,parent$18$1=definePropertyExports$2,defineProperty$b$2=parent$18$1,parent$17$1=defineProperty$b$2,defineProperty$a$2=parent$17$1,parent$16$2=defineProperty$a$2,defineProperty$9$2=parent$16$2,defineProperty$8$2=defineProperty$9$2,_Object$defineProperty$1$2=getDefaultExportFromCjs$2(defineProperty$8$2),classof$e$1=classofRaw$2$2,isArray$e$2=Array.isArray||function F(W){return classof$e$1(W)==="Array"},ceil$2=Math.ceil,floor$1$2=Math.floor,mathTrunc$2=Math.trunc||function F(W){var q=+W;return(q>0?floor$1$2:ceil$2)(q)},trunc$2=mathTrunc$2,toIntegerOrInfinity$4$2=function(F){var W=+F;return W!==W||W===0?0:trunc$2(W)},toIntegerOrInfinity$3$2=toIntegerOrInfinity$4$2,min$2$2=Math.min,toLength$1$2=function(F){return F>0?min$2$2(toIntegerOrInfinity$3$2(F),9007199254740991):0},toLength$3=toLength$1$2,lengthOfArrayLike$d$1=function(F){return toLength$3(F.length)},$TypeError$a$2=TypeError,MAX_SAFE_INTEGER$2=9007199254740991,doesNotExceedSafeInteger$4$1=function(F){if(F>MAX_SAFE_INTEGER$2)throw $TypeError$a$2("Maximum allowed index exceeded");return F},toPropertyKey$1$2=toPropertyKey$4$2,definePropertyModule$3$2=objectDefineProperty$2,createPropertyDescriptor$4$2=createPropertyDescriptor$7,createProperty$6$2=function(F,W,q){var K=toPropertyKey$1$2(W);K in F?definePropertyModule$3$2.f(F,K,createPropertyDescriptor$4$2(0,q)):F[K]=q},wellKnownSymbol$l$2=wellKnownSymbol$n$1,TO_STRING_TAG$4$1=wellKnownSymbol$l$2("toStringTag"),test$2$2={};test$2$2[TO_STRING_TAG$4$1]="z";var toStringTagSupport$2=String(test$2$2)==="[object z]",TO_STRING_TAG_SUPPORT$2$2=toStringTagSupport$2,isCallable$e$2=isCallable$m,classofRaw$4=classofRaw$2$2,wellKnownSymbol$k$2=wellKnownSymbol$n$1,TO_STRING_TAG$3$2=wellKnownSymbol$k$2("toStringTag"),$Object$1$2=Object,CORRECT_ARGUMENTS$2=classofRaw$4(function(){return arguments}())==="Arguments",tryGet$2=function(F,W){try{return F[W]}catch{}},classof$d$2=TO_STRING_TAG_SUPPORT$2$2?classofRaw$4:function(F){var W,q,K;return F===void 0?"Undefined":F===null?"Null":typeof(q=tryGet$2(W=$Object$1$2(F),TO_STRING_TAG$3$2))=="string"?q:CORRECT_ARGUMENTS$2?classofRaw$4(W):(K=classofRaw$4(W))==="Object"&&isCallable$e$2(W.callee)?"Arguments":K},uncurryThis$i$2=functionUncurryThis$2,isCallable$d$2=isCallable$m,store$1$2=sharedStore$2,functionToString$2=uncurryThis$i$2(Function.toString);isCallable$d$2(store$1$2.inspectSource)||(store$1$2.inspectSource=function(F){return functionToString$2(F)});var inspectSource$2$1=store$1$2.inspectSource,uncurryThis$h$2=functionUncurryThis$2,fails$m$2=fails$u$2,isCallable$c$2=isCallable$m,classof$c$2=classof$d$2,getBuiltIn$d$1=getBuiltIn$f,inspectSource$1$2=inspectSource$2$1,noop$2=function(){},empty$2=[],construct$4$2=getBuiltIn$d$1("Reflect","construct"),constructorRegExp$2=/^\s*(?:class|function)\b/,exec$1$2=uncurryThis$h$2(constructorRegExp$2.exec),INCORRECT_TO_STRING$2=!constructorRegExp$2.test(noop$2),isConstructorModern$2=function F(W){if(!isCallable$c$2(W))return!1;try{return construct$4$2(noop$2,empty$2,W),!0}catch{return!1}},isConstructorLegacy$2=function F(W){if(!isCallable$c$2(W))return!1;switch(classof$c$2(W)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING$2||!!exec$1$2(constructorRegExp$2,inspectSource$1$2(W))}catch{return!0}};isConstructorLegacy$2.sham=!0;var isConstructor$4$2=!construct$4$2||fails$m$2(function(){var F;return isConstructorModern$2(isConstructorModern$2.call)||!isConstructorModern$2(Object)||!isConstructorModern$2(function(){F=!0})||F})?isConstructorLegacy$2:isConstructorModern$2,isArray$d$2=isArray$e$2,isConstructor$3$2=isConstructor$4$2,isObject$c$2=isObject$h$2,wellKnownSymbol$j$2=wellKnownSymbol$n$1,SPECIES$5=wellKnownSymbol$j$2("species"),$Array$3$2=Array,arraySpeciesConstructor$1$2=function(F){var W;return isArray$d$2(F)&&(W=F.constructor,isConstructor$3$2(W)&&(W===$Array$3$2||isArray$d$2(W.prototype))?W=void 0:isObject$c$2(W)&&(W=W[SPECIES$5],W===null&&(W=void 0))),W===void 0?$Array$3$2:W},arraySpeciesConstructor$3=arraySpeciesConstructor$1$2,arraySpeciesCreate$4$1=function(F,W){return new(arraySpeciesConstructor$3(F))(W===0?0:W)},fails$l$2=fails$u$2,wellKnownSymbol$i$2=wellKnownSymbol$n$1,V8_VERSION$2$2=engineV8Version$2,SPECIES$4$1=wellKnownSymbol$i$2("species"),arrayMethodHasSpeciesSupport$5$2=function(F){return V8_VERSION$2$2>=51||!fails$l$2(function(){var W=[],q=W.constructor={};return q[SPECIES$4$1]=function(){return{foo:1}},W[F](Boolean).foo!==1})},$$O$2=_export$2,fails$k$2=fails$u$2,isArray$c$2=isArray$e$2,isObject$b$2=isObject$h$2,toObject$c$2=toObject$e$2,lengthOfArrayLike$c$2=lengthOfArrayLike$d$1,doesNotExceedSafeInteger$3$2=doesNotExceedSafeInteger$4$1,createProperty$5$2=createProperty$6$2,arraySpeciesCreate$3$2=arraySpeciesCreate$4$1,arrayMethodHasSpeciesSupport$4$2=arrayMethodHasSpeciesSupport$5$2,wellKnownSymbol$h$2=wellKnownSymbol$n$1,V8_VERSION$1$2=engineV8Version$2,IS_CONCAT_SPREADABLE$2=wellKnownSymbol$h$2("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT$2=V8_VERSION$1$2>=51||!fails$k$2(function(){var F=[];return F[IS_CONCAT_SPREADABLE$2]=!1,F.concat()[0]!==F}),isConcatSpreadable$2=function(F){if(!isObject$b$2(F))return!1;var W=F[IS_CONCAT_SPREADABLE$2];return W!==void 0?!!W:isArray$c$2(F)},FORCED$6$2=!IS_CONCAT_SPREADABLE_SUPPORT$2||!arrayMethodHasSpeciesSupport$4$2("concat");$$O$2({target:"Array",proto:!0,arity:1,forced:FORCED$6$2},{concat:function F(W){var q=toObject$c$2(this),K=arraySpeciesCreate$3$2(q,0),X=0,tt,rt,ot,ut,yn;for(tt=-1,ot=arguments.length;ttrt;)if(ot=X[rt++],ot!==ot)return!0}else for(;tt>rt;rt++)if((F||rt in X)&&X[rt]===q)return F||rt||0;return!F&&-1}},arrayIncludes$2={includes:createMethod$3$2(!0),indexOf:createMethod$3$2(!1)},hiddenKeys$6$2={},uncurryThis$g$2=functionUncurryThis$2,hasOwn$g$1=hasOwnProperty_1$2,toIndexedObject$7$2=toIndexedObject$a$2,indexOf$7=arrayIncludes$2.indexOf,hiddenKeys$5$2=hiddenKeys$6$2,push$c$1=uncurryThis$g$2([].push),objectKeysInternal$2=function(F,W){var q=toIndexedObject$7$2(F),K=0,X=[],tt;for(tt in q)!hasOwn$g$1(hiddenKeys$5$2,tt)&&hasOwn$g$1(q,tt)&&push$c$1(X,tt);for(;W.length>K;)hasOwn$g$1(q,tt=W[K++])&&(~indexOf$7(X,tt)||push$c$1(X,tt));return X},enumBugKeys$3$2=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1$2=objectKeysInternal$2,enumBugKeys$2$2=enumBugKeys$3$2,objectKeys$3$2=Object.keys||function F(W){return internalObjectKeys$1$2(W,enumBugKeys$2$2)},DESCRIPTORS$b$2=descriptors$2,V8_PROTOTYPE_DEFINE_BUG$3=v8PrototypeDefineBug$2,definePropertyModule$2$2=objectDefineProperty$2,anObject$b$2=anObject$d$1,toIndexedObject$6$2=toIndexedObject$a$2,objectKeys$2$2=objectKeys$3$2;objectDefineProperties$2.f=DESCRIPTORS$b$2&&!V8_PROTOTYPE_DEFINE_BUG$3?Object.defineProperties:function F(W,q){anObject$b$2(W);for(var K=toIndexedObject$6$2(q),X=objectKeys$2$2(q),tt=X.length,rt=0,ot;tt>rt;)definePropertyModule$2$2.f(W,ot=X[rt++],K[ot]);return W};var getBuiltIn$c$2=getBuiltIn$f,html$2$1=getBuiltIn$c$2("document","documentElement"),shared$5$2=sharedExports$2,uid$2$2=uid$4$2,keys$7=shared$5$2("keys"),sharedKey$4$2=function(F){return keys$7[F]||(keys$7[F]=uid$2$2(F))},anObject$a$2=anObject$d$1,definePropertiesModule$1$2=objectDefineProperties$2,enumBugKeys$1$2=enumBugKeys$3$2,hiddenKeys$4$2=hiddenKeys$6$2,html$1$2=html$2$1,documentCreateElement$3=documentCreateElement$1$2,sharedKey$3$2=sharedKey$4$2,GT$2=">",LT$2="<",PROTOTYPE$1$2="prototype",SCRIPT$2="script",IE_PROTO$1$2=sharedKey$3$2("IE_PROTO"),EmptyConstructor$2=function(){},scriptTag$2=function(F){return LT$2+SCRIPT$2+GT$2+F+LT$2+"/"+SCRIPT$2+GT$2},NullProtoObjectViaActiveX$2=function(F){F.write(scriptTag$2("")),F.close();var W=F.parentWindow.Object;return F=null,W},NullProtoObjectViaIFrame$2=function(){var F=documentCreateElement$3("iframe"),W="java"+SCRIPT$2+":",q;return F.style.display="none",html$1$2.appendChild(F),F.src=String(W),q=F.contentWindow.document,q.open(),q.write(scriptTag$2("document.F=Object")),q.close(),q.F},activeXDocument$2,NullProtoObject$2=function(){try{activeXDocument$2=new ActiveXObject("htmlfile")}catch{}NullProtoObject$2=typeof document<"u"?document.domain&&activeXDocument$2?NullProtoObjectViaActiveX$2(activeXDocument$2):NullProtoObjectViaIFrame$2():NullProtoObjectViaActiveX$2(activeXDocument$2);for(var F=enumBugKeys$1$2.length;F--;)delete NullProtoObject$2[PROTOTYPE$1$2][enumBugKeys$1$2[F]];return NullProtoObject$2()};hiddenKeys$4$2[IE_PROTO$1$2]=!0;var objectCreate$2=Object.create||function F(W,q){var K;return W!==null?(EmptyConstructor$2[PROTOTYPE$1$2]=anObject$a$2(W),K=new EmptyConstructor$2,EmptyConstructor$2[PROTOTYPE$1$2]=null,K[IE_PROTO$1$2]=W):K=NullProtoObject$2(),q===void 0?K:definePropertiesModule$1$2.f(K,q)},objectGetOwnPropertyNames$2={},internalObjectKeys$3=objectKeysInternal$2,enumBugKeys$5=enumBugKeys$3$2,hiddenKeys$3$2=enumBugKeys$5.concat("length","prototype");objectGetOwnPropertyNames$2.f=Object.getOwnPropertyNames||function F(W){return internalObjectKeys$3(W,hiddenKeys$3$2)};var objectGetOwnPropertyNamesExternal$2={},toAbsoluteIndex$2$2=toAbsoluteIndex$4$2,lengthOfArrayLike$a$2=lengthOfArrayLike$d$1,createProperty$4$2=createProperty$6$2,$Array$2$2=Array,max$2$2=Math.max,arraySliceSimple$2=function(F,W,q){for(var K=lengthOfArrayLike$a$2(F),X=toAbsoluteIndex$2$2(W,K),tt=toAbsoluteIndex$2$2(q===void 0?K:q,K),rt=$Array$2$2(max$2$2(tt-X,0)),ot=0;Xcf;cf++)if((ot||cf in wo)&&($f=wo[cf],xf=lf($f,cf,mo),F))if(W)_f[cf]=xf;else if(xf)switch(F){case 3:return!0;case 5:return $f;case 6:return cf;case 2:push$b$2(_f,$f)}else switch(F){case 4:return!1;case 7:push$b$2(_f,$f)}return tt?-1:K||X?X:_f}},arrayIteration$2={forEach:createMethod$2$2(0),map:createMethod$2$2(1),filter:createMethod$2$2(2),some:createMethod$2$2(3),every:createMethod$2$2(4),find:createMethod$2$2(5),findIndex:createMethod$2$2(6),filterReject:createMethod$2$2(7)},$$N$2=_export$2,global$e$2=global$p,call$d$2=functionCall$2,uncurryThis$e$2=functionUncurryThis$2,DESCRIPTORS$a$2=descriptors$2,NATIVE_SYMBOL$3$2=symbolConstructorDetection$2,fails$j$2=fails$u$2,hasOwn$c$2=hasOwnProperty_1$2,isPrototypeOf$j$2=objectIsPrototypeOf$2,anObject$9$2=anObject$d$1,toIndexedObject$4$2=toIndexedObject$a$2,toPropertyKey$6=toPropertyKey$4$2,$toString$2=toString$7$2,createPropertyDescriptor$3$2=createPropertyDescriptor$7,nativeObjectCreate$2=objectCreate$2,objectKeys$1$2=objectKeys$3$2,getOwnPropertyNamesModule$2$2=objectGetOwnPropertyNames$2,getOwnPropertyNamesExternal$2=objectGetOwnPropertyNamesExternal$2,getOwnPropertySymbolsModule$3$2=objectGetOwnPropertySymbols$2,getOwnPropertyDescriptorModule$2$1=objectGetOwnPropertyDescriptor$2,definePropertyModule$1$2=objectDefineProperty$2,definePropertiesModule$3=objectDefineProperties$2,propertyIsEnumerableModule$1$2=objectPropertyIsEnumerable$2,defineBuiltIn$4$2=defineBuiltIn$6$1,defineBuiltInAccessor$2$2=defineBuiltInAccessor$3$2,shared$3$2=sharedExports$2,sharedKey$1$2=sharedKey$4$2,hiddenKeys$1$2=hiddenKeys$6$2,uid$1$2=uid$4$2,wellKnownSymbol$d$2=wellKnownSymbol$n$1,wrappedWellKnownSymbolModule$3=wellKnownSymbolWrapped$2,defineWellKnownSymbol$l$2=wellKnownSymbolDefine$2,defineSymbolToPrimitive$1$2=symbolDefineToPrimitive$2,setToStringTag$6$2=setToStringTag$7$1,InternalStateModule$5$1=internalState$2,$forEach$1$2=arrayIteration$2.forEach,HIDDEN$2=sharedKey$1$2("hidden"),SYMBOL$2="Symbol",PROTOTYPE$3="prototype",setInternalState$5$1=InternalStateModule$5$1.set,getInternalState$2$2=InternalStateModule$5$1.getterFor(SYMBOL$2),ObjectPrototype$2$2=Object[PROTOTYPE$3],$Symbol$2=global$e$2.Symbol,SymbolPrototype$2=$Symbol$2&&$Symbol$2[PROTOTYPE$3],RangeError$2=global$e$2.RangeError,TypeError$2$2=global$e$2.TypeError,QObject$2=global$e$2.QObject,nativeGetOwnPropertyDescriptor$1$2=getOwnPropertyDescriptorModule$2$1.f,nativeDefineProperty$2=definePropertyModule$1$2.f,nativeGetOwnPropertyNames$2=getOwnPropertyNamesExternal$2.f,nativePropertyIsEnumerable$2=propertyIsEnumerableModule$1$2.f,push$a$2=uncurryThis$e$2([].push),AllSymbols$2=shared$3$2("symbols"),ObjectPrototypeSymbols$2=shared$3$2("op-symbols"),WellKnownSymbolsStore$1$2=shared$3$2("wks"),USE_SETTER$2=!QObject$2||!QObject$2[PROTOTYPE$3]||!QObject$2[PROTOTYPE$3].findChild,fallbackDefineProperty$2=function(F,W,q){var K=nativeGetOwnPropertyDescriptor$1$2(ObjectPrototype$2$2,W);K&&delete ObjectPrototype$2$2[W],nativeDefineProperty$2(F,W,q),K&&F!==ObjectPrototype$2$2&&nativeDefineProperty$2(ObjectPrototype$2$2,W,K)},setSymbolDescriptor$2=DESCRIPTORS$a$2&&fails$j$2(function(){return nativeObjectCreate$2(nativeDefineProperty$2({},"a",{get:function(){return nativeDefineProperty$2(this,"a",{value:7}).a}})).a!==7})?fallbackDefineProperty$2:nativeDefineProperty$2,wrap$2=function(F,W){var q=AllSymbols$2[F]=nativeObjectCreate$2(SymbolPrototype$2);return setInternalState$5$1(q,{type:SYMBOL$2,tag:F,description:W}),DESCRIPTORS$a$2||(q.description=W),q},$defineProperty$3=function F(W,q,K){W===ObjectPrototype$2$2&&$defineProperty$3(ObjectPrototypeSymbols$2,q,K),anObject$9$2(W);var X=toPropertyKey$6(q);return anObject$9$2(K),hasOwn$c$2(AllSymbols$2,X)?(K.enumerable?(hasOwn$c$2(W,HIDDEN$2)&&W[HIDDEN$2][X]&&(W[HIDDEN$2][X]=!1),K=nativeObjectCreate$2(K,{enumerable:createPropertyDescriptor$3$2(0,!1)})):(hasOwn$c$2(W,HIDDEN$2)||nativeDefineProperty$2(W,HIDDEN$2,createPropertyDescriptor$3$2(1,{})),W[HIDDEN$2][X]=!0),setSymbolDescriptor$2(W,X,K)):nativeDefineProperty$2(W,X,K)},$defineProperties$2=function F(W,q){anObject$9$2(W);var K=toIndexedObject$4$2(q),X=objectKeys$1$2(K).concat($getOwnPropertySymbols$2(K));return $forEach$1$2(X,function(tt){(!DESCRIPTORS$a$2||call$d$2($propertyIsEnumerable$4,K,tt))&&$defineProperty$3(W,tt,K[tt])}),W},$create$2=function F(W,q){return q===void 0?nativeObjectCreate$2(W):$defineProperties$2(nativeObjectCreate$2(W),q)},$propertyIsEnumerable$4=function F(W){var q=toPropertyKey$6(W),K=call$d$2(nativePropertyIsEnumerable$2,this,q);return this===ObjectPrototype$2$2&&hasOwn$c$2(AllSymbols$2,q)&&!hasOwn$c$2(ObjectPrototypeSymbols$2,q)?!1:K||!hasOwn$c$2(this,q)||!hasOwn$c$2(AllSymbols$2,q)||hasOwn$c$2(this,HIDDEN$2)&&this[HIDDEN$2][q]?K:!0},$getOwnPropertyDescriptor$4=function F(W,q){var K=toIndexedObject$4$2(W),X=toPropertyKey$6(q);if(!(K===ObjectPrototype$2$2&&hasOwn$c$2(AllSymbols$2,X)&&!hasOwn$c$2(ObjectPrototypeSymbols$2,X))){var tt=nativeGetOwnPropertyDescriptor$1$2(K,X);return tt&&hasOwn$c$2(AllSymbols$2,X)&&!(hasOwn$c$2(K,HIDDEN$2)&&K[HIDDEN$2][X])&&(tt.enumerable=!0),tt}},$getOwnPropertyNames$3=function F(W){var q=nativeGetOwnPropertyNames$2(toIndexedObject$4$2(W)),K=[];return $forEach$1$2(q,function(X){!hasOwn$c$2(AllSymbols$2,X)&&!hasOwn$c$2(hiddenKeys$1$2,X)&&push$a$2(K,X)}),K},$getOwnPropertySymbols$2=function(F){var W=F===ObjectPrototype$2$2,q=nativeGetOwnPropertyNames$2(W?ObjectPrototypeSymbols$2:toIndexedObject$4$2(F)),K=[];return $forEach$1$2(q,function(X){hasOwn$c$2(AllSymbols$2,X)&&(!W||hasOwn$c$2(ObjectPrototype$2$2,X))&&push$a$2(K,AllSymbols$2[X])}),K};NATIVE_SYMBOL$3$2||($Symbol$2=function(){if(isPrototypeOf$j$2(SymbolPrototype$2,this))throw new TypeError$2$2("Symbol is not a constructor");var W=!arguments.length||arguments[0]===void 0?void 0:$toString$2(arguments[0]),q=uid$1$2(W),K=function(X){var tt=this===void 0?global$e$2:this;tt===ObjectPrototype$2$2&&call$d$2(K,ObjectPrototypeSymbols$2,X),hasOwn$c$2(tt,HIDDEN$2)&&hasOwn$c$2(tt[HIDDEN$2],q)&&(tt[HIDDEN$2][q]=!1);var rt=createPropertyDescriptor$3$2(1,X);try{setSymbolDescriptor$2(tt,q,rt)}catch(ot){if(!(ot instanceof RangeError$2))throw ot;fallbackDefineProperty$2(tt,q,rt)}};return DESCRIPTORS$a$2&&USE_SETTER$2&&setSymbolDescriptor$2(ObjectPrototype$2$2,q,{configurable:!0,set:K}),wrap$2(q,W)},SymbolPrototype$2=$Symbol$2[PROTOTYPE$3],defineBuiltIn$4$2(SymbolPrototype$2,"toString",function(){return getInternalState$2$2(this).tag}),defineBuiltIn$4$2($Symbol$2,"withoutSetter",function(F){return wrap$2(uid$1$2(F),F)}),propertyIsEnumerableModule$1$2.f=$propertyIsEnumerable$4,definePropertyModule$1$2.f=$defineProperty$3,definePropertiesModule$3.f=$defineProperties$2,getOwnPropertyDescriptorModule$2$1.f=$getOwnPropertyDescriptor$4,getOwnPropertyNamesModule$2$2.f=getOwnPropertyNamesExternal$2.f=$getOwnPropertyNames$3,getOwnPropertySymbolsModule$3$2.f=$getOwnPropertySymbols$2,wrappedWellKnownSymbolModule$3.f=function(F){return wrap$2(wellKnownSymbol$d$2(F),F)},DESCRIPTORS$a$2&&defineBuiltInAccessor$2$2(SymbolPrototype$2,"description",{configurable:!0,get:function(){return getInternalState$2$2(this).description}}));$$N$2({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$3$2,sham:!NATIVE_SYMBOL$3$2},{Symbol:$Symbol$2});$forEach$1$2(objectKeys$1$2(WellKnownSymbolsStore$1$2),function(F){defineWellKnownSymbol$l$2(F)});$$N$2({target:SYMBOL$2,stat:!0,forced:!NATIVE_SYMBOL$3$2},{useSetter:function(){USE_SETTER$2=!0},useSimple:function(){USE_SETTER$2=!1}});$$N$2({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3$2,sham:!DESCRIPTORS$a$2},{create:$create$2,defineProperty:$defineProperty$3,defineProperties:$defineProperties$2,getOwnPropertyDescriptor:$getOwnPropertyDescriptor$4});$$N$2({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3$2},{getOwnPropertyNames:$getOwnPropertyNames$3});defineSymbolToPrimitive$1$2();setToStringTag$6$2($Symbol$2,SYMBOL$2);hiddenKeys$1$2[HIDDEN$2]=!0;var NATIVE_SYMBOL$2$2=symbolConstructorDetection$2,symbolRegistryDetection$2=NATIVE_SYMBOL$2$2&&!!Symbol.for&&!!Symbol.keyFor,$$M$2=_export$2,getBuiltIn$a$2=getBuiltIn$f,hasOwn$b$2=hasOwnProperty_1$2,toString$5$2=toString$7$2,shared$2$2=sharedExports$2,NATIVE_SYMBOL_REGISTRY$1$2=symbolRegistryDetection$2,StringToSymbolRegistry$2=shared$2$2("string-to-symbol-registry"),SymbolToStringRegistry$1$2=shared$2$2("symbol-to-string-registry");$$M$2({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$1$2},{for:function(F){var W=toString$5$2(F);if(hasOwn$b$2(StringToSymbolRegistry$2,W))return StringToSymbolRegistry$2[W];var q=getBuiltIn$a$2("Symbol")(W);return StringToSymbolRegistry$2[W]=q,SymbolToStringRegistry$1$2[q]=W,q}});var $$L$2=_export$2,hasOwn$a$2=hasOwnProperty_1$2,isSymbol$2$2=isSymbol$5$2,tryToString$4$2=tryToString$6$2,shared$1$2=sharedExports$2,NATIVE_SYMBOL_REGISTRY$3=symbolRegistryDetection$2,SymbolToStringRegistry$3=shared$1$2("symbol-to-string-registry");$$L$2({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$3},{keyFor:function F(W){if(!isSymbol$2$2(W))throw new TypeError(tryToString$4$2(W)+" is not a symbol");if(hasOwn$a$2(SymbolToStringRegistry$3,W))return SymbolToStringRegistry$3[W]}});var uncurryThis$d$2=functionUncurryThis$2,arraySlice$5$2=uncurryThis$d$2([].slice),uncurryThis$c$2=functionUncurryThis$2,isArray$b$2=isArray$e$2,isCallable$a$2=isCallable$m,classof$8$2=classofRaw$2$2,toString$4$2=toString$7$2,push$9$2=uncurryThis$c$2([].push),getJsonReplacerFunction$2=function(F){if(isCallable$a$2(F))return F;if(isArray$b$2(F)){for(var W=F.length,q=[],K=0;K=W.length)return F.target=void 0,createIterResultObject$2$2(void 0,!0);switch(F.kind){case"keys":return createIterResultObject$2$2(q,!1);case"values":return createIterResultObject$2$2(W[q],!1)}return createIterResultObject$2$2([q,W[q]],!1)},"values");Iterators$3$2.Arguments=Iterators$3$2.Array;var domIterables$2={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},DOMIterables$4=domIterables$2,global$c$2=global$p,classof$7$2=classof$d$2,createNonEnumerableProperty$4$2=createNonEnumerableProperty$9,Iterators$2$2=iterators$2,wellKnownSymbol$a$2=wellKnownSymbol$n$1,TO_STRING_TAG$1$2=wellKnownSymbol$a$2("toStringTag");for(var COLLECTION_NAME$2 in DOMIterables$4){var Collection$2=global$c$2[COLLECTION_NAME$2],CollectionPrototype$2=Collection$2&&Collection$2.prototype;CollectionPrototype$2&&classof$7$2(CollectionPrototype$2)!==TO_STRING_TAG$1$2&&createNonEnumerableProperty$4$2(CollectionPrototype$2,TO_STRING_TAG$1$2,COLLECTION_NAME$2),Iterators$2$2[COLLECTION_NAME$2]=Iterators$2$2.Array}var parent$15$2=symbol$5$2,symbol$4$2=parent$15$2,wellKnownSymbol$9$2=wellKnownSymbol$n$1,defineProperty$4$2=objectDefineProperty$2.f,METADATA$1$2=wellKnownSymbol$9$2("metadata"),FunctionPrototype$1$2=Function.prototype;FunctionPrototype$1$2[METADATA$1$2]===void 0&&defineProperty$4$2(FunctionPrototype$1$2,METADATA$1$2,{value:null});var defineWellKnownSymbol$7$2=wellKnownSymbolDefine$2;defineWellKnownSymbol$7$2("asyncDispose");var defineWellKnownSymbol$6$2=wellKnownSymbolDefine$2;defineWellKnownSymbol$6$2("dispose");var defineWellKnownSymbol$5$2=wellKnownSymbolDefine$2;defineWellKnownSymbol$5$2("metadata");var parent$14$2=symbol$4$2,symbol$3$2=parent$14$2,getBuiltIn$7$2=getBuiltIn$f,uncurryThis$9$2=functionUncurryThis$2,Symbol$2$2=getBuiltIn$7$2("Symbol"),keyFor$2=Symbol$2$2.keyFor,thisSymbolValue$1$2=uncurryThis$9$2(Symbol$2$2.prototype.valueOf),symbolIsRegistered$2=Symbol$2$2.isRegisteredSymbol||function F(W){try{return keyFor$2(thisSymbolValue$1$2(W))!==void 0}catch{return!1}},$$H$2=_export$2,isRegisteredSymbol$1$2=symbolIsRegistered$2;$$H$2({target:"Symbol",stat:!0},{isRegisteredSymbol:isRegisteredSymbol$1$2});var shared$9=sharedExports$2,getBuiltIn$6$2=getBuiltIn$f,uncurryThis$8$2=functionUncurryThis$2,isSymbol$7=isSymbol$5$2,wellKnownSymbol$8$2=wellKnownSymbol$n$1,Symbol$1$2=getBuiltIn$6$2("Symbol"),$isWellKnownSymbol$2=Symbol$1$2.isWellKnownSymbol,getOwnPropertyNames$6=getBuiltIn$6$2("Object","getOwnPropertyNames"),thisSymbolValue$3=uncurryThis$8$2(Symbol$1$2.prototype.valueOf),WellKnownSymbolsStore$4=shared$9("wks");for(var i$3=0,symbolKeys$2=getOwnPropertyNames$6(Symbol$1$2),symbolKeysLength$2=symbolKeys$2.length;i$3=tt?F?"":void 0:(rt=charCodeAt$3(K,X),rt<55296||rt>56319||X+1===tt||(ot=charCodeAt$3(K,X+1))<56320||ot>57343?F?charAt$1$2(K,X):rt:F?stringSlice$3(K,X,X+2):(rt-55296<<10)+(ot-56320)+65536)}},stringMultibyte$2={codeAt:createMethod$1$2(!1),charAt:createMethod$1$2(!0)},charAt$5=stringMultibyte$2.charAt,toString$2$2=toString$7$2,InternalStateModule$3$2=internalState$2,defineIterator$1$2=iteratorDefine$2,createIterResultObject$1$2=createIterResultObject$3$2,STRING_ITERATOR$2="String Iterator",setInternalState$3$2=InternalStateModule$3$2.set,getInternalState$4=InternalStateModule$3$2.getterFor(STRING_ITERATOR$2);defineIterator$1$2(String,"String",function(F){setInternalState$3$2(this,{type:STRING_ITERATOR$2,string:toString$2$2(F),index:0})},function F(){var W=getInternalState$4(this),q=W.string,K=W.index,X;return K>=q.length?createIterResultObject$1$2(void 0,!0):(X=charAt$5(q,K),W.index+=X.length,createIterResultObject$1$2(X,!1))});var WrappedWellKnownSymbolModule$1$2=wellKnownSymbolWrapped$2,iterator$5$1=WrappedWellKnownSymbolModule$1$2.f("iterator"),parent$12$2=iterator$5$1,iterator$4$2=parent$12$2,parent$11$2=iterator$4$2,iterator$3$2=parent$11$2,parent$10$2=iterator$3$2,iterator$2$2=parent$10$2,iterator$1$2=iterator$2$2,_Symbol$iterator$1$1=getDefaultExportFromCjs$2(iterator$1$2);function _typeof$1$1(F){"@babel/helpers - typeof";return _typeof$1$1=typeof _Symbol$1$2=="function"&&typeof _Symbol$iterator$1$1=="symbol"?function(W){return typeof W}:function(W){return W&&typeof _Symbol$1$2=="function"&&W.constructor===_Symbol$1$2&&W!==_Symbol$1$2.prototype?"symbol":typeof W},_typeof$1$1(F)}var WrappedWellKnownSymbolModule$3=wellKnownSymbolWrapped$2,toPrimitive$4$2=WrappedWellKnownSymbolModule$3.f("toPrimitive"),parent$$$2=toPrimitive$4$2,toPrimitive$3$2=parent$$$2,parent$_$2=toPrimitive$3$2,toPrimitive$2$2=parent$_$2,parent$Z$2=toPrimitive$2$2,toPrimitive$1$2=parent$Z$2,toPrimitive$8=toPrimitive$1$2,_Symbol$toPrimitive$2=getDefaultExportFromCjs$2(toPrimitive$8);function _toPrimitive$2(F,W){if(_typeof$1$1(F)!=="object"||F===null)return F;var q=F[_Symbol$toPrimitive$2];if(q!==void 0){var K=q.call(F,W||"default");if(_typeof$1$1(K)!=="object")return K;throw new TypeError("@@toPrimitive must return a primitive value.")}return(W==="string"?String:Number)(F)}function _toPropertyKey$2(F){var W=_toPrimitive$2(F,"string");return _typeof$1$1(W)==="symbol"?W:String(W)}function _defineProperties$2(F,W){for(var q=0;q=0:ot>ut;ut+=yn)ut in rt&&(X=q(X,rt[ut],ut,tt));return X}},arrayReduce$2={left:createMethod$7(!1),right:createMethod$7(!0)},fails$e$2=fails$u$2,arrayMethodIsStrict$4$2=function(F,W){var q=[][F];return!!q&&fails$e$2(function(){q.call(null,W||function(){return 1},1)})},global$a$2=global$p,classof$6$2=classofRaw$2$2,engineIsNode$2=classof$6$2(global$a$2.process)==="process",$$C$2=_export$2,$reduce$2=arrayReduce$2.left,arrayMethodIsStrict$3$2=arrayMethodIsStrict$4$2,CHROME_VERSION$2=engineV8Version$2,IS_NODE$4=engineIsNode$2,CHROME_BUG$2=!IS_NODE$4&&CHROME_VERSION$2>79&&CHROME_VERSION$2<83,FORCED$4$2=CHROME_BUG$2||!arrayMethodIsStrict$3$2("reduce");$$C$2({target:"Array",proto:!0,forced:FORCED$4$2},{reduce:function F(W){var q=arguments.length;return $reduce$2(this,W,q,q>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$e=getBuiltInPrototypeMethod$g,reduce$3$2=getBuiltInPrototypeMethod$e("Array","reduce"),isPrototypeOf$h$2=objectIsPrototypeOf$2,method$e$2=reduce$3$2,ArrayPrototype$f$2=Array.prototype,reduce$2$2=function(F){var W=F.reduce;return F===ArrayPrototype$f$2||isPrototypeOf$h$2(ArrayPrototype$f$2,F)&&W===ArrayPrototype$f$2.reduce?method$e$2:W},parent$X$2=reduce$2$2,reduce$1$2=parent$X$2,reduce$5=reduce$1$2,_reduceInstanceProperty$2=getDefaultExportFromCjs$2(reduce$5),$$B$2=_export$2,$filter$2=arrayIteration$2.filter,arrayMethodHasSpeciesSupport$3$2=arrayMethodHasSpeciesSupport$5$2,HAS_SPECIES_SUPPORT$3$2=arrayMethodHasSpeciesSupport$3$2("filter");$$B$2({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$3$2},{filter:function F(W){return $filter$2(this,W,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$d=getBuiltInPrototypeMethod$g,filter$3$2=getBuiltInPrototypeMethod$d("Array","filter"),isPrototypeOf$g$2=objectIsPrototypeOf$2,method$d$2=filter$3$2,ArrayPrototype$e$2=Array.prototype,filter$2$2=function(F){var W=F.filter;return F===ArrayPrototype$e$2||isPrototypeOf$g$2(ArrayPrototype$e$2,F)&&W===ArrayPrototype$e$2.filter?method$d$2:W},parent$W$2=filter$2$2,filter$1$2=parent$W$2,filter$5=filter$1$2,_filterInstanceProperty$2=getDefaultExportFromCjs$2(filter$5),$$A$2=_export$2,$map$2=arrayIteration$2.map,arrayMethodHasSpeciesSupport$2$2=arrayMethodHasSpeciesSupport$5$2,HAS_SPECIES_SUPPORT$2$2=arrayMethodHasSpeciesSupport$2$2("map");$$A$2({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$2$2},{map:function F(W){return $map$2(this,W,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$c=getBuiltInPrototypeMethod$g,map$6$1=getBuiltInPrototypeMethod$c("Array","map"),isPrototypeOf$f$2=objectIsPrototypeOf$2,method$c$2=map$6$1,ArrayPrototype$d$2=Array.prototype,map$5$1=function(F){var W=F.map;return F===ArrayPrototype$d$2||isPrototypeOf$f$2(ArrayPrototype$d$2,F)&&W===ArrayPrototype$d$2.map?method$c$2:W},parent$V$2=map$5$1,map$4$2=parent$V$2,map$3$2=map$4$2,_mapInstanceProperty$2=getDefaultExportFromCjs$2(map$3$2),isArray$a$2=isArray$e$2,lengthOfArrayLike$7$2=lengthOfArrayLike$d$1,doesNotExceedSafeInteger$2$2=doesNotExceedSafeInteger$4$1,bind$a$2=functionBindContext$2,flattenIntoArray$1=function(F,W,q,K,X,tt,rt,ot){for(var ut=X,yn=0,uo=rt?bind$a$2(rt,ot):!1,po,mo;yn0&&isArray$a$2(po)?(mo=lengthOfArrayLike$7$2(po),ut=flattenIntoArray$1(F,W,po,mo,ut,tt-1)-1):(doesNotExceedSafeInteger$2$2(ut+1),F[ut]=po),ut++),yn++;return ut},flattenIntoArray_1=flattenIntoArray$1,$$z$2=_export$2,flattenIntoArray=flattenIntoArray_1,aCallable$8$1=aCallable$e,toObject$7$2=toObject$e$2,lengthOfArrayLike$6$2=lengthOfArrayLike$d$1,arraySpeciesCreate$1$2=arraySpeciesCreate$4$1;$$z$2({target:"Array",proto:!0},{flatMap:function F(W){var q=toObject$7$2(this),K=lengthOfArrayLike$6$2(q),X;return aCallable$8$1(W),X=arraySpeciesCreate$1$2(q,0),X.length=flattenIntoArray(X,q,q,K,0,1,W,arguments.length>1?arguments[1]:void 0),X}});var getBuiltInPrototypeMethod$b=getBuiltInPrototypeMethod$g,flatMap$3=getBuiltInPrototypeMethod$b("Array","flatMap"),isPrototypeOf$e$2=objectIsPrototypeOf$2,method$b$2=flatMap$3,ArrayPrototype$c$2=Array.prototype,flatMap$2=function(F){var W=F.flatMap;return F===ArrayPrototype$c$2||isPrototypeOf$e$2(ArrayPrototype$c$2,F)&&W===ArrayPrototype$c$2.flatMap?method$b$2:W},parent$U$2=flatMap$2,flatMap$1=parent$U$2,flatMap=flatMap$1,_flatMapInstanceProperty=getDefaultExportFromCjs$2(flatMap);function createNewDataPipeFrom(F){return new DataPipeUnderConstruction(F)}var SimpleDataPipe=function(){function F(W,q,K){var X,tt,rt;_classCallCheck$2(this,F),_defineProperty$2(this,"_listeners",{add:_bindInstanceProperty$1$2(X=this._add).call(X,this),remove:_bindInstanceProperty$1$2(tt=this._remove).call(tt,this),update:_bindInstanceProperty$1$2(rt=this._update).call(rt,this)}),this._source=W,this._transformers=q,this._target=K}return _createClass$2(F,[{key:"all",value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:"start",value:function(){return this._source.on("add",this._listeners.add),this._source.on("remove",this._listeners.remove),this._source.on("update",this._listeners.update),this}},{key:"stop",value:function(){return this._source.off("add",this._listeners.add),this._source.off("remove",this._listeners.remove),this._source.off("update",this._listeners.update),this}},{key:"_transformItems",value:function(q){var K;return _reduceInstanceProperty$2(K=this._transformers).call(K,function(X,tt){return tt(X)},q)}},{key:"_add",value:function(q,K){K!=null&&this._target.add(this._transformItems(this._source.get(K.items)))}},{key:"_update",value:function(q,K){K!=null&&this._target.update(this._transformItems(this._source.get(K.items)))}},{key:"_remove",value:function(q,K){K!=null&&this._target.remove(this._transformItems(K.oldData))}}]),F}(),DataPipeUnderConstruction=function(){function F(W){_classCallCheck$2(this,F),_defineProperty$2(this,"_transformers",[]),this._source=W}return _createClass$2(F,[{key:"filter",value:function(q){return this._transformers.push(function(K){return _filterInstanceProperty$2(K).call(K,q)}),this}},{key:"map",value:function(q){return this._transformers.push(function(K){return _mapInstanceProperty$2(K).call(K,q)}),this}},{key:"flatMap",value:function(q){return this._transformers.push(function(K){return _flatMapInstanceProperty(K).call(K,q)}),this}},{key:"to",value:function(q){return new SimpleDataPipe(this._source,this._transformers,q)}}]),F}(),call$a$2=functionCall$2,anObject$7$2=anObject$d$1,getMethod$1$2=getMethod$3$2,iteratorClose$2$2=function(F,W,q){var K,X;anObject$7$2(F);try{if(K=getMethod$1$2(F,"return"),!K){if(W==="throw")throw q;return q}K=call$a$2(K,F)}catch(tt){X=!0,K=tt}if(W==="throw")throw q;if(X)throw K;return anObject$7$2(K),q},anObject$6$2=anObject$d$1,iteratorClose$1$2=iteratorClose$2$2,callWithSafeIterationClosing$1$2=function(F,W,q,K){try{return K?W(anObject$6$2(q)[0],q[1]):W(q)}catch(X){iteratorClose$1$2(F,"throw",X)}},wellKnownSymbol$7$2=wellKnownSymbol$n$1,Iterators$1$2=iterators$2,ITERATOR$2$2=wellKnownSymbol$7$2("iterator"),ArrayPrototype$b$2=Array.prototype,isArrayIteratorMethod$2$2=function(F){return F!==void 0&&(Iterators$1$2.Array===F||ArrayPrototype$b$2[ITERATOR$2$2]===F)},classof$5$2=classof$d$2,getMethod$5=getMethod$3$2,isNullOrUndefined$3$2=isNullOrUndefined$6$1,Iterators$7=iterators$2,wellKnownSymbol$6$2=wellKnownSymbol$n$1,ITERATOR$1$2=wellKnownSymbol$6$2("iterator"),getIteratorMethod$9$2=function(F){if(!isNullOrUndefined$3$2(F))return getMethod$5(F,ITERATOR$1$2)||getMethod$5(F,"@@iterator")||Iterators$7[classof$5$2(F)]},call$9$2=functionCall$2,aCallable$7$2=aCallable$e,anObject$5$2=anObject$d$1,tryToString$3$2=tryToString$6$2,getIteratorMethod$8$2=getIteratorMethod$9$2,$TypeError$7$2=TypeError,getIterator$8=function(F,W){var q=arguments.length<2?getIteratorMethod$8$2(F):W;if(aCallable$7$2(q))return anObject$5$2(call$9$2(q,F));throw new $TypeError$7$2(tryToString$3$2(F)+" is not iterable")},bind$9$2=functionBindContext$2,call$8$2=functionCall$2,toObject$6$2=toObject$e$2,callWithSafeIterationClosing$3=callWithSafeIterationClosing$1$2,isArrayIteratorMethod$1$2=isArrayIteratorMethod$2$2,isConstructor$2$2=isConstructor$4$2,lengthOfArrayLike$5$2=lengthOfArrayLike$d$1,createProperty$3$2=createProperty$6$2,getIterator$7=getIterator$8,getIteratorMethod$7$2=getIteratorMethod$9$2,$Array$1$2=Array,arrayFrom$2=function F(W){var q=toObject$6$2(W),K=isConstructor$2$2(this),X=arguments.length,tt=X>1?arguments[1]:void 0,rt=tt!==void 0;rt&&(tt=bind$9$2(tt,X>2?arguments[2]:void 0));var ot=getIteratorMethod$7$2(q),ut=0,yn,uo,po,mo,wo,lf;if(ot&&!(this===$Array$1$2&&isArrayIteratorMethod$1$2(ot)))for(mo=getIterator$7(q,ot),wo=mo.next,uo=K?new this:[];!(po=call$8$2(wo,mo)).done;ut++)lf=rt?callWithSafeIterationClosing$3(mo,tt,[po.value,ut],!0):po.value,createProperty$3$2(uo,ut,lf);else for(yn=lengthOfArrayLike$5$2(q),uo=K?new this(yn):$Array$1$2(yn);yn>ut;ut++)lf=rt?tt(q[ut],ut):q[ut],createProperty$3$2(uo,ut,lf);return uo.length=ut,uo},wellKnownSymbol$5$2=wellKnownSymbol$n$1,ITERATOR$8=wellKnownSymbol$5$2("iterator"),SAFE_CLOSING$2=!1;try{var called$2=0,iteratorWithReturn$2={next:function(){return{done:!!called$2++}},return:function(){SAFE_CLOSING$2=!0}};iteratorWithReturn$2[ITERATOR$8]=function(){return this},Array.from(iteratorWithReturn$2,function(){throw 2})}catch(F){}var checkCorrectnessOfIteration$2$1=function(F,W){try{if(!W&&!SAFE_CLOSING$2)return!1}catch{return!1}var q=!1;try{var K={};K[ITERATOR$8]=function(){return{next:function(){return{done:q=!0}}}},F(K)}catch{}return q},$$y$2=_export$2,from$6$2=arrayFrom$2,checkCorrectnessOfIteration$1$2=checkCorrectnessOfIteration$2$1,INCORRECT_ITERATION$2=!checkCorrectnessOfIteration$1$2(function(F){Array.from(F)});$$y$2({target:"Array",stat:!0,forced:INCORRECT_ITERATION$2},{from:from$6$2});var path$h$2=path$o$2,from$5$2=path$h$2.Array.from,parent$T$2=from$5$2,from$4$2=parent$T$2,from$3$2=from$4$2,_Array$from$1$2=getDefaultExportFromCjs$2(from$3$2),getIteratorMethod$6$2=getIteratorMethod$9$2,getIteratorMethod_1$2=getIteratorMethod$6$2,parent$S$2=getIteratorMethod_1$2,getIteratorMethod$5$2=parent$S$2,parent$R$2=getIteratorMethod$5$2,getIteratorMethod$4$2=parent$R$2,parent$Q$2=getIteratorMethod$4$2,getIteratorMethod$3$2=parent$Q$2,getIteratorMethod$2$2=getIteratorMethod$3$2,_getIteratorMethod$1$2=getDefaultExportFromCjs$2(getIteratorMethod$2$2),getIteratorMethod$1$2=getIteratorMethod$2$2,_getIteratorMethod$3=getDefaultExportFromCjs$2(getIteratorMethod$1$2),$$x$2=_export$2,isArray$9$2=isArray$e$2;$$x$2({target:"Array",stat:!0},{isArray:isArray$9$2});var path$g$2=path$o$2,isArray$8$2=path$g$2.Array.isArray,parent$P$2=isArray$8$2,isArray$7$2=parent$P$2,parent$O$2=isArray$7$2,isArray$6$2=parent$O$2,parent$N$2=isArray$6$2,isArray$5$2=parent$N$2,isArray$4$2=isArray$5$2,_Array$isArray$1$2=getDefaultExportFromCjs$2(isArray$4$2);function _arrayWithHoles$2(F){if(_Array$isArray$1$2(F))return F}var DESCRIPTORS$8$2=descriptors$2,isArray$3$2=isArray$e$2,$TypeError$6$2=TypeError,getOwnPropertyDescriptor$5$2=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET$2=DESCRIPTORS$8$2&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(F){return F instanceof TypeError}}(),arraySetLength$2=SILENT_ON_NON_WRITABLE_LENGTH_SET$2?function(F,W){if(isArray$3$2(F)&&!getOwnPropertyDescriptor$5$2(F,"length").writable)throw new $TypeError$6$2("Cannot set read only .length");return F.length=W}:function(F,W){return F.length=W},$$w$2=_export$2,toObject$5$2=toObject$e$2,lengthOfArrayLike$4$2=lengthOfArrayLike$d$1,setArrayLength$1$2=arraySetLength$2,doesNotExceedSafeInteger$1$2=doesNotExceedSafeInteger$4$1,fails$d$2=fails$u$2,INCORRECT_TO_LENGTH$2=fails$d$2(function(){return[].push.call({length:4294967296},1)!==4294967297}),properErrorOnNonWritableLength$2=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(F){return F instanceof TypeError}},FORCED$3$2=INCORRECT_TO_LENGTH$2||!properErrorOnNonWritableLength$2();$$w$2({target:"Array",proto:!0,arity:1,forced:FORCED$3$2},{push:function F(W){var q=toObject$5$2(this),K=lengthOfArrayLike$4$2(q),X=arguments.length;doesNotExceedSafeInteger$1$2(K+X);for(var tt=0;ttF.length)&&(W=F.length);for(var q=0,K=new Array(W);q1?arguments[1]:void 0)},$$s$2=_export$2,forEach$8=arrayForEach$2;$$s$2({target:"Array",proto:!0,forced:[].forEach!==forEach$8},{forEach:forEach$8});var getBuiltInPrototypeMethod$7=getBuiltInPrototypeMethod$g,forEach$7$1=getBuiltInPrototypeMethod$7("Array","forEach"),parent$B$2=forEach$7$1,forEach$6$2=parent$B$2,classof$4$2=classof$d$2,hasOwn$6$2=hasOwnProperty_1$2,isPrototypeOf$a$2=objectIsPrototypeOf$2,method$7$2=forEach$6$2,ArrayPrototype$7$2=Array.prototype,DOMIterables$3$1={DOMTokenList:!0,NodeList:!0},forEach$5$2=function(F){var W=F.forEach;return F===ArrayPrototype$7$2||isPrototypeOf$a$2(ArrayPrototype$7$2,F)&&W===ArrayPrototype$7$2.forEach||hasOwn$6$2(DOMIterables$3$1,classof$4$2(F))?method$7$2:W},forEach$4$2=forEach$5$2,_forEachInstanceProperty$2=getDefaultExportFromCjs$2(forEach$4$2),$$r$2=_export$2,uncurryThis$4$2=functionUncurryThis$2,isArray$g=isArray$e$2,nativeReverse$2=uncurryThis$4$2([].reverse),test$1$2=[1,2];$$r$2({target:"Array",proto:!0,forced:String(test$1$2)===String(test$1$2.reverse())},{reverse:function F(){return isArray$g(this)&&(this.length=this.length),nativeReverse$2(this)}});var getBuiltInPrototypeMethod$6=getBuiltInPrototypeMethod$g,reverse$6=getBuiltInPrototypeMethod$6("Array","reverse"),isPrototypeOf$9$2=objectIsPrototypeOf$2,method$6$2=reverse$6,ArrayPrototype$6$2=Array.prototype,reverse$5=function(F){var W=F.reverse;return F===ArrayPrototype$6$2||isPrototypeOf$9$2(ArrayPrototype$6$2,F)&&W===ArrayPrototype$6$2.reverse?method$6$2:W},parent$A$2=reverse$5,reverse$4$1=parent$A$2,reverse$3$2=reverse$4$1,_reverseInstanceProperty$2=getDefaultExportFromCjs$2(reverse$3$2),tryToString$2$2=tryToString$6$2,$TypeError$5$2=TypeError,deletePropertyOrThrow$2$2=function(F,W){if(!delete F[W])throw new $TypeError$5$2("Cannot delete property "+tryToString$2$2(W)+" of "+tryToString$2$2(F))},$$q$2=_export$2,toObject$3$2=toObject$e$2,toAbsoluteIndex$7=toAbsoluteIndex$4$2,toIntegerOrInfinity$7=toIntegerOrInfinity$4$2,lengthOfArrayLike$2$2=lengthOfArrayLike$d$1,setArrayLength$3=arraySetLength$2,doesNotExceedSafeInteger$5=doesNotExceedSafeInteger$4$1,arraySpeciesCreate$5=arraySpeciesCreate$4$1,createProperty$1$2=createProperty$6$2,deletePropertyOrThrow$1$2=deletePropertyOrThrow$2$2,arrayMethodHasSpeciesSupport$7=arrayMethodHasSpeciesSupport$5$2,HAS_SPECIES_SUPPORT$5=arrayMethodHasSpeciesSupport$7("splice"),max$6=Math.max,min$5=Math.min;$$q$2({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$5},{splice:function F(W,q){var K=toObject$3$2(this),X=lengthOfArrayLike$2$2(K),tt=toAbsoluteIndex$7(W,X),rt=arguments.length,ot,ut,yn,uo,po,mo;for(rt===0?ot=ut=0:rt===1?(ot=0,ut=X-tt):(ot=rt-2,ut=min$5(max$6(toIntegerOrInfinity$7(q),0),X-tt)),doesNotExceedSafeInteger$5(X+ot-ut),yn=arraySpeciesCreate$5(K,ut),uo=0;uoX-ut+ot;uo--)deletePropertyOrThrow$1$2(K,uo-1)}else if(ot>ut)for(uo=X-ut;uo>tt;uo--)po=uo+ut-1,mo=uo+ot-1,po in K?K[mo]=K[po]:deletePropertyOrThrow$1$2(K,mo);for(uo=0;uott;)for(var ut=IndexedObject$5(arguments[tt++]),yn=rt?concat$8(objectKeys$6(ut),rt(ut)):objectKeys$6(ut),uo=yn.length,po=0,mo;uo>po;)mo=yn[po++],(!DESCRIPTORS$7$2||call$7$2(ot,ut,mo))&&(K[mo]=ut[mo]);return K}:$assign$2,$$p$2=_export$2,assign$5$2=objectAssign$2;$$p$2({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign$5$2},{assign:assign$5$2});var path$d$2=path$o$2,assign$4$2=path$d$2.Object.assign,parent$y$2=assign$4$2,assign$3$2=parent$y$2,assign$2$2=assign$3$2,_Object$assign$2=getDefaultExportFromCjs$2(assign$2$2),$$o$2=_export$2,fails$a$2=fails$u$2,toObject$1$2=toObject$e$2,nativeGetPrototypeOf$2=objectGetPrototypeOf$3,CORRECT_PROTOTYPE_GETTER$3=correctPrototypeGetter$2,FAILS_ON_PRIMITIVES$1$2=fails$a$2(function(){nativeGetPrototypeOf$2(1)});$$o$2({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$1$2,sham:!CORRECT_PROTOTYPE_GETTER$3},{getPrototypeOf:function F(W){return nativeGetPrototypeOf$2(toObject$1$2(W))}});var path$c$2=path$o$2,getPrototypeOf$5$2=path$c$2.Object.getPrototypeOf,parent$x$2=getPrototypeOf$5$2,getPrototypeOf$4$2=parent$x$2,$$n$2=_export$2,DESCRIPTORS$6$2=descriptors$2,create$9$2=objectCreate$2;$$n$2({target:"Object",stat:!0,sham:!DESCRIPTORS$6$2},{create:create$9$2});var path$b$2=path$o$2,Object$3$2=path$b$2.Object,create$8$2=function F(W,q){return Object$3$2.create(W,q)},parent$w$2=create$8$2,create$7$2=parent$w$2,create$6$2=create$7$2,_Object$create$1$2=getDefaultExportFromCjs$2(create$6$2),path$a$2=path$o$2,apply$3$2=functionApply$2;path$a$2.JSON||(path$a$2.JSON={stringify:JSON.stringify});var stringify$2$2=function F(W,q,K){return apply$3$2(path$a$2.JSON.stringify,null,arguments)},parent$v$2=stringify$2$2,stringify$1$2=parent$v$2,stringify$4=stringify$1$2,_JSON$stringify$2=getDefaultExportFromCjs$2(stringify$4),engineIsBun$2=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",$TypeError$4$2=TypeError,validateArgumentsLength$2$1=function(F,W){if(Fq,rt=isCallable$5$2(K)?K:Function$2(K),ot=tt?arraySlice$2$2(arguments,q):[],ut=tt?function(){apply$2$2(rt,this,ot)}:rt;return W?F(ut,X):F(ut)}:F},$$m$2=_export$2,global$8$2=global$p,schedulersFix$1$2=schedulersFix$2$2,setInterval$5=schedulersFix$1$2(global$8$2.setInterval,!0);$$m$2({global:!0,bind:!0,forced:global$8$2.setInterval!==setInterval$5},{setInterval:setInterval$5});var $$l$2=_export$2,global$7$2=global$p,schedulersFix$4=schedulersFix$2$2,setTimeout$3$2=schedulersFix$4(global$7$2.setTimeout,!0);$$l$2({global:!0,bind:!0,forced:global$7$2.setTimeout!==setTimeout$3$2},{setTimeout:setTimeout$3$2});var path$9$2=path$o$2,setTimeout$2$2=path$9$2.setTimeout,setTimeout$1$2=setTimeout$2$2,_setTimeout$2=getDefaultExportFromCjs$2(setTimeout$1$2),componentEmitter$2={exports:{}};(function(F){function W(K){if(K)return q(K);this._callbacks=new Map}function q(K){return Object.assign(K,W.prototype),K._callbacks=new Map,K}W.prototype.on=function(K,X){const tt=this._callbacks.get(K)??[];return tt.push(X),this._callbacks.set(K,tt),this},W.prototype.once=function(K,X){const tt=(...rt)=>{this.off(K,tt),X.apply(this,rt)};return tt.fn=X,this.on(K,tt),this},W.prototype.off=function(K,X){if(K===void 0&&X===void 0)return this._callbacks.clear(),this;if(X===void 0)return this._callbacks.delete(K),this;const tt=this._callbacks.get(K);if(tt){for(const[rt,ot]of tt.entries())if(ot===X||ot.fn===X){tt.splice(rt,1);break}tt.length===0?this._callbacks.delete(K):this._callbacks.set(K,tt)}return this},W.prototype.emit=function(K,...X){const tt=this._callbacks.get(K);if(tt){const rt=[...tt];for(const ot of rt)ot.apply(this,X)}return this},W.prototype.listeners=function(K){return this._callbacks.get(K)??[]},W.prototype.listenerCount=function(K){if(K)return this.listeners(K).length;let X=0;for(const tt of this._callbacks.values())X+=tt.length;return X},W.prototype.hasListeners=function(K){return this.listenerCount(K)>0},W.prototype.addEventListener=W.prototype.on,W.prototype.removeListener=W.prototype.off,W.prototype.removeEventListener=W.prototype.off,W.prototype.removeAllListeners=W.prototype.off,F.exports=W})(componentEmitter$2);var componentEmitterExports$2=componentEmitter$2.exports,Emitter$2=getDefaultExportFromCjs$2(componentEmitterExports$2);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 * http://naver.github.io/egjs @@ -3997,10 +3997,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * Licensed under the MIT license */function _extends$2(){return _extends$2=Object.assign||function(F){for(var W=1;W"u"?{style:{}}:document.createElement("div"),TYPE_FUNCTION$2="function",round$3=Math.round,abs$3=Math.abs,now$6=Date.now;function prefixed$2(F,W){for(var q,K,X=W[0].toUpperCase()+W.slice(1),tt=0;tt"u"?win$2={}:win$2=window;var PREFIXED_TOUCH_ACTION$2=prefixed$2(TEST_ELEMENT$2.style,"touchAction"),NATIVE_TOUCH_ACTION$2=PREFIXED_TOUCH_ACTION$2!==void 0;function getTouchActionProps$2(){if(!NATIVE_TOUCH_ACTION$2)return!1;var F={},W=win$2.CSS&&win$2.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(q){return F[q]=W?win$2.CSS.supports("touch-action",q):!0}),F}var TOUCH_ACTION_COMPUTE$2="compute",TOUCH_ACTION_AUTO$2="auto",TOUCH_ACTION_MANIPULATION$2="manipulation",TOUCH_ACTION_NONE$2="none",TOUCH_ACTION_PAN_X$2="pan-x",TOUCH_ACTION_PAN_Y$2="pan-y",TOUCH_ACTION_MAP$2=getTouchActionProps$2(),MOBILE_REGEX$2=/mobile|tablet|ip(ad|hone|od)|android/i,SUPPORT_TOUCH$2="ontouchstart"in win$2,SUPPORT_POINTER_EVENTS$2=prefixed$2(win$2,"PointerEvent")!==void 0,SUPPORT_ONLY_TOUCH$2=SUPPORT_TOUCH$2&&MOBILE_REGEX$2.test(navigator.userAgent),INPUT_TYPE_TOUCH$2="touch",INPUT_TYPE_PEN$2="pen",INPUT_TYPE_MOUSE$2="mouse",INPUT_TYPE_KINECT$2="kinect",COMPUTE_INTERVAL$2=25,INPUT_START$2=1,INPUT_MOVE$2=2,INPUT_END$2=4,INPUT_CANCEL$2=8,DIRECTION_NONE$2=1,DIRECTION_LEFT$2=2,DIRECTION_RIGHT$2=4,DIRECTION_UP$2=8,DIRECTION_DOWN$2=16,DIRECTION_HORIZONTAL$2=DIRECTION_LEFT$2|DIRECTION_RIGHT$2,DIRECTION_VERTICAL$2=DIRECTION_UP$2|DIRECTION_DOWN$2,DIRECTION_ALL$2=DIRECTION_HORIZONTAL$2|DIRECTION_VERTICAL$2,PROPS_XY$2=["x","y"],PROPS_CLIENT_XY$2=["clientX","clientY"];function each$2(F,W,q){var K;if(F)if(F.forEach)F.forEach(W,q);else if(F.length!==void 0)for(K=0;K-1}function cleanTouchActions$2(F){if(inStr$2(F,TOUCH_ACTION_NONE$2))return TOUCH_ACTION_NONE$2;var W=inStr$2(F,TOUCH_ACTION_PAN_X$2),q=inStr$2(F,TOUCH_ACTION_PAN_Y$2);return W&&q?TOUCH_ACTION_NONE$2:W||q?W?TOUCH_ACTION_PAN_X$2:TOUCH_ACTION_PAN_Y$2:inStr$2(F,TOUCH_ACTION_MANIPULATION$2)?TOUCH_ACTION_MANIPULATION$2:TOUCH_ACTION_AUTO$2}var TouchAction$2=function(){function F(q,K){this.manager=q,this.set(K)}var W=F.prototype;return W.set=function(K){K===TOUCH_ACTION_COMPUTE$2&&(K=this.compute()),NATIVE_TOUCH_ACTION$2&&this.manager.element.style&&TOUCH_ACTION_MAP$2[K]&&(this.manager.element.style[PREFIXED_TOUCH_ACTION$2]=K),this.actions=K.toLowerCase().trim()},W.update=function(){this.set(this.manager.options.touchAction)},W.compute=function(){var K=[];return each$2(this.manager.recognizers,function(X){boolOrFn$2(X.options.enable,[X])&&(K=K.concat(X.getTouchAction()))}),cleanTouchActions$2(K.join(" "))},W.preventDefaults=function(K){var X=K.srcEvent,tt=K.offsetDirection;if(this.manager.session.prevented){X.preventDefault();return}var rt=this.actions,ot=inStr$2(rt,TOUCH_ACTION_NONE$2)&&!TOUCH_ACTION_MAP$2[TOUCH_ACTION_NONE$2],ut=inStr$2(rt,TOUCH_ACTION_PAN_Y$2)&&!TOUCH_ACTION_MAP$2[TOUCH_ACTION_PAN_Y$2],yn=inStr$2(rt,TOUCH_ACTION_PAN_X$2)&&!TOUCH_ACTION_MAP$2[TOUCH_ACTION_PAN_X$2];if(ot){var uo=K.pointers.length===1,po=K.distance<2,mo=K.deltaTime<250;if(uo&&po&&mo)return}if(!(yn&&ut)&&(ot||ut&&tt&DIRECTION_HORIZONTAL$2||yn&&tt&DIRECTION_VERTICAL$2))return this.preventSrc(X)},W.preventSrc=function(K){this.manager.session.prevented=!0,K.preventDefault()},F}();function hasParent$3(F,W){for(;F;){if(F===W)return!0;F=F.parentNode}return!1}function getCenter$2(F){var W=F.length;if(W===1)return{x:round$3(F[0].clientX),y:round$3(F[0].clientY)};for(var q=0,K=0,X=0;X=abs$3(W)?F<0?DIRECTION_LEFT$2:DIRECTION_RIGHT$2:W<0?DIRECTION_UP$2:DIRECTION_DOWN$2}function computeDeltaXY$2(F,W){var q=W.center,K=F.offsetDelta||{},X=F.prevDelta||{},tt=F.prevInput||{};(W.eventType===INPUT_START$2||tt.eventType===INPUT_END$2)&&(X=F.prevDelta={x:tt.deltaX||0,y:tt.deltaY||0},K=F.offsetDelta={x:q.x,y:q.y}),W.deltaX=X.x+(q.x-K.x),W.deltaY=X.y+(q.y-K.y)}function getVelocity$2(F,W,q){return{x:W/F||0,y:q/F||0}}function getScale$2(F,W){return getDistance$2(W[0],W[1],PROPS_CLIENT_XY$2)/getDistance$2(F[0],F[1],PROPS_CLIENT_XY$2)}function getRotation$2(F,W){return getAngle$2(W[1],W[0],PROPS_CLIENT_XY$2)+getAngle$2(F[1],F[0],PROPS_CLIENT_XY$2)}function computeIntervalInputData$2(F,W){var q=F.lastInterval||W,K=W.timeStamp-q.timeStamp,X,tt,rt,ot;if(W.eventType!==INPUT_CANCEL$2&&(K>COMPUTE_INTERVAL$2||q.velocity===void 0)){var ut=W.deltaX-q.deltaX,yn=W.deltaY-q.deltaY,uo=getVelocity$2(K,ut,yn);tt=uo.x,rt=uo.y,X=abs$3(uo.x)>abs$3(uo.y)?uo.x:uo.y,ot=getDirection$2(ut,yn),F.lastInterval=W}else X=q.velocity,tt=q.velocityX,rt=q.velocityY,ot=q.direction;W.velocity=X,W.velocityX=tt,W.velocityY=rt,W.direction=ot}function computeInputData$2(F,W){var q=F.session,K=W.pointers,X=K.length;q.firstInput||(q.firstInput=simpleCloneInputData$2(W)),X>1&&!q.firstMultiple?q.firstMultiple=simpleCloneInputData$2(W):X===1&&(q.firstMultiple=!1);var tt=q.firstInput,rt=q.firstMultiple,ot=rt?rt.center:tt.center,ut=W.center=getCenter$2(K);W.timeStamp=now$6(),W.deltaTime=W.timeStamp-tt.timeStamp,W.angle=getAngle$2(ot,ut),W.distance=getDistance$2(ot,ut),computeDeltaXY$2(q,W),W.offsetDirection=getDirection$2(W.deltaX,W.deltaY);var yn=getVelocity$2(W.deltaTime,W.deltaX,W.deltaY);W.overallVelocityX=yn.x,W.overallVelocityY=yn.y,W.overallVelocity=abs$3(yn.x)>abs$3(yn.y)?yn.x:yn.y,W.scale=rt?getScale$2(rt.pointers,K):1,W.rotation=rt?getRotation$2(rt.pointers,K):0,W.maxPointers=q.prevInput?W.pointers.length>q.prevInput.maxPointers?W.pointers.length:q.prevInput.maxPointers:W.pointers.length,computeIntervalInputData$2(q,W);var uo=F.element,po=W.srcEvent,mo;po.composedPath?mo=po.composedPath()[0]:po.path?mo=po.path[0]:mo=po.target,hasParent$3(mo,uo)&&(uo=mo),W.target=uo}function inputHandler$2(F,W,q){var K=q.pointers.length,X=q.changedPointers.length,tt=W&INPUT_START$2&&K-X===0,rt=W&(INPUT_END$2|INPUT_CANCEL$2)&&K-X===0;q.isFirst=!!tt,q.isFinal=!!rt,tt&&(F.session={}),q.eventType=W,computeInputData$2(F,q),F.emit("hammer.input",q),F.recognize(q),F.session.prevInput=q}function splitStr$2(F){return F.trim().split(/\s+/g)}function addEventListeners$2(F,W,q){each$2(splitStr$2(W),function(K){F.addEventListener(K,q,!1)})}function removeEventListeners$2(F,W,q){each$2(splitStr$2(W),function(K){F.removeEventListener(K,q,!1)})}function getWindowForElement$2(F){var W=F.ownerDocument||F;return W.defaultView||W.parentWindow||window}var Input$2=function(){function F(q,K){var X=this;this.manager=q,this.callback=K,this.element=q.element,this.target=q.options.inputTarget,this.domHandler=function(tt){boolOrFn$2(q.options.enable,[q])&&X.handler(tt)},this.init()}var W=F.prototype;return W.handler=function(){},W.init=function(){this.evEl&&addEventListeners$2(this.element,this.evEl,this.domHandler),this.evTarget&&addEventListeners$2(this.target,this.evTarget,this.domHandler),this.evWin&&addEventListeners$2(getWindowForElement$2(this.element),this.evWin,this.domHandler)},W.destroy=function(){this.evEl&&removeEventListeners$2(this.element,this.evEl,this.domHandler),this.evTarget&&removeEventListeners$2(this.target,this.evTarget,this.domHandler),this.evWin&&removeEventListeners$2(getWindowForElement$2(this.element),this.evWin,this.domHandler)},F}();function inArray$2(F,W,q){if(F.indexOf&&!q)return F.indexOf(W);for(var K=0;Kut[W]}):K=K.sort()),K}var TOUCH_INPUT_MAP$2={touchstart:INPUT_START$2,touchmove:INPUT_MOVE$2,touchend:INPUT_END$2,touchcancel:INPUT_CANCEL$2},TOUCH_TARGET_EVENTS$2="touchstart touchmove touchend touchcancel",TouchInput$2=function(F){_inheritsLoose$2(W,F);function W(){var K;return W.prototype.evTarget=TOUCH_TARGET_EVENTS$2,K=F.apply(this,arguments)||this,K.targetIds={},K}var q=W.prototype;return q.handler=function(X){var tt=TOUCH_INPUT_MAP$2[X.type],rt=getTouches$2.call(this,X,tt);rt&&this.callback(this.manager,tt,{pointers:rt[0],changedPointers:rt[1],pointerType:INPUT_TYPE_TOUCH$2,srcEvent:X})},W}(Input$2);function getTouches$2(F,W){var q=toArray$4(F.touches),K=this.targetIds;if(W&(INPUT_START$2|INPUT_MOVE$2)&&q.length===1)return K[q[0].identifier]=!0,[q,q];var X,tt,rt=toArray$4(F.changedTouches),ot=[],ut=this.target;if(tt=q.filter(function(yn){return hasParent$3(yn.target,ut)}),W===INPUT_START$2)for(X=0;X-1&&X.splice(ot,1)};setTimeout(tt,DEDUP_TIMEOUT$2)}}function recordTouches$2(F,W){F&INPUT_START$2?(this.primaryTouch=W.changedPointers[0].identifier,setLastTouch$2.call(this,W)):F&(INPUT_END$2|INPUT_CANCEL$2)&&setLastTouch$2.call(this,W)}function isSyntheticEvent$2(F){for(var W=F.srcEvent.clientX,q=F.srcEvent.clientY,K=0;K-1&&this.requireFail.splice(X,1),this},W.hasRequireFailures=function(){return this.requireFail.length>0},W.canRecognizeWith=function(K){return!!this.simultaneous[K.id]},W.emit=function(K){var X=this,tt=this.state;function rt(ot){X.manager.emit(ot,K)}tt=STATE_ENDED$2&&rt(X.options.event+stateStr$2(tt))},W.tryEmit=function(K){if(this.canEmit())return this.emit(K);this.state=STATE_FAILED$2},W.canEmit=function(){for(var K=0;Ktt.threshold&&ut&tt.direction},q.attrTest=function(X){return AttrRecognizer$2.prototype.attrTest.call(this,X)&&(this.state&STATE_BEGAN$2||!(this.state&STATE_BEGAN$2)&&this.directionTest(X))},q.emit=function(X){this.pX=X.deltaX,this.pY=X.deltaY;var tt=directionStr$2(X.direction);tt&&(X.additionalEvent=this.options.event+tt),F.prototype.emit.call(this,X)},W}(AttrRecognizer$2),SwipeRecognizer$2=function(F){_inheritsLoose$2(W,F);function W(K){return K===void 0&&(K={}),F.call(this,_extends$2({event:"swipe",threshold:10,velocity:.3,direction:DIRECTION_HORIZONTAL$2|DIRECTION_VERTICAL$2,pointers:1},K))||this}var q=W.prototype;return q.getTouchAction=function(){return PanRecognizer$2.prototype.getTouchAction.call(this)},q.attrTest=function(X){var tt=this.options.direction,rt;return tt&(DIRECTION_HORIZONTAL$2|DIRECTION_VERTICAL$2)?rt=X.overallVelocity:tt&DIRECTION_HORIZONTAL$2?rt=X.overallVelocityX:tt&DIRECTION_VERTICAL$2&&(rt=X.overallVelocityY),F.prototype.attrTest.call(this,X)&&tt&X.offsetDirection&&X.distance>this.options.threshold&&X.maxPointers===this.options.pointers&&abs$3(rt)>this.options.velocity&&X.eventType&INPUT_END$2},q.emit=function(X){var tt=directionStr$2(X.offsetDirection);tt&&this.manager.emit(this.options.event+tt,X),this.manager.emit(this.options.event,X)},W}(AttrRecognizer$2),PinchRecognizer$2=function(F){_inheritsLoose$2(W,F);function W(K){return K===void 0&&(K={}),F.call(this,_extends$2({event:"pinch",threshold:0,pointers:2},K))||this}var q=W.prototype;return q.getTouchAction=function(){return[TOUCH_ACTION_NONE$2]},q.attrTest=function(X){return F.prototype.attrTest.call(this,X)&&(Math.abs(X.scale-1)>this.options.threshold||this.state&STATE_BEGAN$2)},q.emit=function(X){if(X.scale!==1){var tt=X.scale<1?"in":"out";X.additionalEvent=this.options.event+tt}F.prototype.emit.call(this,X)},W}(AttrRecognizer$2),RotateRecognizer$2=function(F){_inheritsLoose$2(W,F);function W(K){return K===void 0&&(K={}),F.call(this,_extends$2({event:"rotate",threshold:0,pointers:2},K))||this}var q=W.prototype;return q.getTouchAction=function(){return[TOUCH_ACTION_NONE$2]},q.attrTest=function(X){return F.prototype.attrTest.call(this,X)&&(Math.abs(X.rotation)>this.options.threshold||this.state&STATE_BEGAN$2)},W}(AttrRecognizer$2),PressRecognizer$2=function(F){_inheritsLoose$2(W,F);function W(K){var X;return K===void 0&&(K={}),X=F.call(this,_extends$2({event:"press",pointers:1,time:251,threshold:9},K))||this,X._timer=null,X._input=null,X}var q=W.prototype;return q.getTouchAction=function(){return[TOUCH_ACTION_AUTO$2]},q.process=function(X){var tt=this,rt=this.options,ot=X.pointers.length===rt.pointers,ut=X.distancert.time;if(this._input=X,!ut||!ot||X.eventType&(INPUT_END$2|INPUT_CANCEL$2)&&!yn)this.reset();else if(X.eventType&INPUT_START$2)this.reset(),this._timer=setTimeout(function(){tt.state=STATE_RECOGNIZED$2,tt.tryEmit()},rt.time);else if(X.eventType&INPUT_END$2)return STATE_RECOGNIZED$2;return STATE_FAILED$2},q.reset=function(){clearTimeout(this._timer)},q.emit=function(X){this.state===STATE_RECOGNIZED$2&&(X&&X.eventType&INPUT_END$2?this.manager.emit(this.options.event+"up",X):(this._input.timeStamp=now$6(),this.manager.emit(this.options.event,this._input)))},W}(Recognizer$2),defaults$3={domEvents:!1,touchAction:TOUCH_ACTION_COMPUTE$2,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},preset$2=[[RotateRecognizer$2,{enable:!1}],[PinchRecognizer$2,{enable:!1},["rotate"]],[SwipeRecognizer$2,{direction:DIRECTION_HORIZONTAL$2}],[PanRecognizer$2,{direction:DIRECTION_HORIZONTAL$2},["swipe"]],[TapRecognizer$2],[TapRecognizer$2,{event:"doubletap",taps:2},["tap"]],[PressRecognizer$2]],STOP$2=1,FORCED_STOP$2=2;function toggleCssProps$2(F,W){var q=F.element;if(q.style){var K;each$2(F.options.cssProps,function(X,tt){K=prefixed$2(q.style,tt),W?(F.oldCssProps[K]=q.style[K],q.style[K]=X):q.style[K]=F.oldCssProps[K]||""}),W||(F.oldCssProps={})}}function triggerDomEvent$2(F,W){var q=document.createEvent("Event");q.initEvent(F,!0,!0),q.gesture=W,W.target.dispatchEvent(q)}var Manager$2=function(){function F(q,K){var X=this;this.options=assign$1$2({},defaults$3,K||{}),this.options.inputTarget=this.options.inputTarget||q,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=q,this.input=createInputInstance$2(this),this.touchAction=new TouchAction$2(this,this.options.touchAction),toggleCssProps$2(this,!0),each$2(this.options.recognizers,function(tt){var rt=X.add(new tt[0](tt[1]));tt[2]&&rt.recognizeWith(tt[2]),tt[3]&&rt.requireFailure(tt[3])},this)}var W=F.prototype;return W.set=function(K){return assign$1$2(this.options,K),K.touchAction&&this.touchAction.update(),K.inputTarget&&(this.input.destroy(),this.input.target=K.inputTarget,this.input.init()),this},W.stop=function(K){this.session.stopped=K?FORCED_STOP$2:STOP$2},W.recognize=function(K){var X=this.session;if(!X.stopped){this.touchAction.preventDefaults(K);var tt,rt=this.recognizers,ot=X.curRecognizer;(!ot||ot&&ot.state&STATE_RECOGNIZED$2)&&(X.curRecognizer=null,ot=null);for(var ut=0;ut\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",rt=window.console&&(window.console.warn||window.console.log);return rt&&rt.call(window.console,K,tt),F.apply(this,arguments)}}var extend$4=deprecate$3(function(F,W,q){for(var K=Object.keys(W),X=0;X=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$3$2(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$3$2(F,W);var K=_sliceInstanceProperty$3(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1$2(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$3$2(F,W)}}function _arrayLikeToArray$3$2(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q1?q-1:0),X=1;X2){var K;return deepObjectAssignNonentry$1.apply(void 0,_concatInstanceProperty$2(K=[deepObjectAssign$1(W[0],W[1])]).call(K,_toConsumableArray$2(_sliceInstanceProperty$3(W).call(W,2))))}var X=W[0],tt=W[1];if(X instanceof Date&&tt instanceof Date)return X.setTime(tt.getTime()),X;var rt=_createForOfIteratorHelper$3$2(_Reflect$ownKeys$1(tt)),ot;try{for(rt.s();!(ot=rt.n()).done;){var ut=ot.value;Object.prototype.propertyIsEnumerable.call(tt,ut)&&(tt[ut]===DELETE$1?delete X[ut]:X[ut]!==null&&tt[ut]!==null&&typeof X[ut]=="object"&&typeof tt[ut]=="object"&&!_Array$isArray$3(X[ut])&&!_Array$isArray$3(tt[ut])?X[ut]=deepObjectAssignNonentry$1(X[ut],tt[ut]):X[ut]=clone$2(tt[ut]))}}catch(yn){rt.e(yn)}finally{rt.f()}return X}function clone$2(F){return _Array$isArray$3(F)?_mapInstanceProperty$2(F).call(F,function(W){return clone$2(W)}):typeof F=="object"&&F!==null?F instanceof Date?new Date(F.getTime()):deepObjectAssignNonentry$1({},F):F}function stripDelete$1(F){for(var W=0,q=_Object$keys$2(F);Wrt;)ut=K(q,ot=X[rt++]),ut!==void 0&&createProperty$8(tt,ot,ut);return tt}});var path$5$2=path$o$2,getOwnPropertyDescriptors$2$2=path$5$2.Object.getOwnPropertyDescriptors,parent$r$2=getOwnPropertyDescriptors$2$2,getOwnPropertyDescriptors$1$2=parent$r$2,getOwnPropertyDescriptors$4=getOwnPropertyDescriptors$1$2,_Object$getOwnPropertyDescriptors$2=getDefaultExportFromCjs$2(getOwnPropertyDescriptors$4),defineProperties$4$2={exports:{}},$$h$2=_export$2,DESCRIPTORS$3$2=descriptors$2,defineProperties$3$2=objectDefineProperties$2.f;$$h$2({target:"Object",stat:!0,forced:Object.defineProperties!==defineProperties$3$2,sham:!DESCRIPTORS$3$2},{defineProperties:defineProperties$3$2});var path$4$2=path$o$2,Object$1$2=path$4$2.Object,defineProperties$2$2=defineProperties$4$2.exports=function F(W,q){return Object$1$2.defineProperties(W,q)};Object$1$2.defineProperties.sham&&(defineProperties$2$2.sham=!0);var definePropertiesExports$2=defineProperties$4$2.exports,parent$q$2=definePropertiesExports$2,defineProperties$1$2=parent$q$2,defineProperties$6=defineProperties$1$2,_Object$defineProperties$2=getDefaultExportFromCjs$2(defineProperties$6),defineProperty$2$2=defineProperty$b$2,_Object$defineProperty$3=getDefaultExportFromCjs$2(defineProperty$2$2);function _assertThisInitialized$3(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F}var parent$p$2=create$7$2,create$4$2=parent$p$2,parent$o$2=create$4$2,create$3$2=parent$o$2,create$2$2=create$3$2,_Object$create$3=getDefaultExportFromCjs$2(create$2$2),$$g$2=_export$2,setPrototypeOf$6$1=objectSetPrototypeOf$2;$$g$2({target:"Object",stat:!0},{setPrototypeOf:setPrototypeOf$6$1});var path$3$2=path$o$2,setPrototypeOf$5$2=path$3$2.Object.setPrototypeOf,parent$n$2=setPrototypeOf$5$2,setPrototypeOf$4$2=parent$n$2,parent$m$2=setPrototypeOf$4$2,setPrototypeOf$3$2=parent$m$2,parent$l$2=setPrototypeOf$3$2,setPrototypeOf$2$2=parent$l$2,setPrototypeOf$1$2=setPrototypeOf$2$2,_Object$setPrototypeOf$2=getDefaultExportFromCjs$2(setPrototypeOf$1$2),parent$k$2=bind$c$2,bind$7$2=parent$k$2,parent$j$2=bind$7$2,bind$6$2=parent$j$2,bind$5$2=bind$6$2,_bindInstanceProperty$3=getDefaultExportFromCjs$2(bind$5$2);function _setPrototypeOf$2(F,W){var q;return _setPrototypeOf$2=_Object$setPrototypeOf$2?_bindInstanceProperty$3(q=_Object$setPrototypeOf$2).call(q):function(X,tt){return X.__proto__=tt,X},_setPrototypeOf$2(F,W)}function _inherits$2(F,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function");F.prototype=_Object$create$3(W&&W.prototype,{constructor:{value:F,writable:!0,configurable:!0}}),_Object$defineProperty$1$2(F,"prototype",{writable:!1}),W&&_setPrototypeOf$2(F,W)}function _possibleConstructorReturn$2(F,W){if(W&&(_typeof$1$1(W)==="object"||typeof W=="function"))return W;if(W!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$3(F)}var parent$i$2=getPrototypeOf$4$2,getPrototypeOf$3$2=parent$i$2,parent$h$2=getPrototypeOf$3$2,getPrototypeOf$2$2=parent$h$2,getPrototypeOf$1$2=getPrototypeOf$2$2,_Object$getPrototypeOf$3=getDefaultExportFromCjs$2(getPrototypeOf$1$2);function _getPrototypeOf$2(F){var W;return _getPrototypeOf$2=_Object$setPrototypeOf$2?_bindInstanceProperty$3(W=_Object$getPrototypeOf$3).call(W):function(K){return K.__proto__||_Object$getPrototypeOf$3(K)},_getPrototypeOf$2(F)}var regeneratorRuntime$1={exports:{}},_typeof$2={exports:{}};(function(F){var W=symbol$1$2,q=iterator$1$2;function K(X){"@babel/helpers - typeof";return F.exports=K=typeof W=="function"&&typeof q=="symbol"?function(tt){return typeof tt}:function(tt){return tt&&typeof W=="function"&&tt.constructor===W&&tt!==W.prototype?"symbol":typeof tt},F.exports.__esModule=!0,F.exports.default=F.exports,K(X)}F.exports=K,F.exports.__esModule=!0,F.exports.default=F.exports})(_typeof$2);var _typeofExports=_typeof$2.exports,parent$g$2=forEach$5$2,forEach$3$2=parent$g$2,parent$f$2=forEach$3$2,forEach$2$2=parent$f$2,forEach$1$2=forEach$2$2,hasOwn$5$2=hasOwnProperty_1$2,ownKeys$1$2=ownKeys$7$1,getOwnPropertyDescriptorModule$4=objectGetOwnPropertyDescriptor$2,definePropertyModule$5=objectDefineProperty$2,copyConstructorProperties$1=function(F,W,q){for(var K=ownKeys$1$2(W),X=definePropertyModule$5.f,tt=getOwnPropertyDescriptorModule$4.f,rt=0;rtpo;po++)if(wo=vf(F[po]),wo&&isPrototypeOf$7$2(ResultPrototype$2,wo))return wo;return new Result$2(!1)}yn=getIterator$6(F,uo)}for(lf=tt?F.next:yn.next;!(yf=call$6$2(lf,yn)).done;){try{wo=vf(yf.value)}catch(_f){iteratorClose$4(yn,"throw",_f)}if(typeof wo=="object"&&wo&&isPrototypeOf$7$2(ResultPrototype$2,wo))return wo}return new Result$2(!1)},toString$1$2=toString$7$2,normalizeStringArgument$1=function(F,W){return F===void 0?arguments.length<2?"":W:toString$1$2(F)},$$f$2=_export$2,isPrototypeOf$6$2=objectIsPrototypeOf$2,getPrototypeOf$a=objectGetPrototypeOf$3,setPrototypeOf$7=objectSetPrototypeOf$2,copyConstructorProperties=copyConstructorProperties$1,create$1$2=objectCreate$2,createNonEnumerableProperty$1$2=createNonEnumerableProperty$9,createPropertyDescriptor$8=createPropertyDescriptor$7,installErrorCause=installErrorCause$1,installErrorStack=errorStackInstall,iterate$6=iterate$7,normalizeStringArgument=normalizeStringArgument$1,wellKnownSymbol$3$2=wellKnownSymbol$n$1,TO_STRING_TAG$5=wellKnownSymbol$3$2("toStringTag"),$Error=Error,push$1$2=[].push,$AggregateError=function F(W,q){var K=isPrototypeOf$6$2(AggregateErrorPrototype,this),X;setPrototypeOf$7?X=setPrototypeOf$7(new $Error,K?getPrototypeOf$a(this):AggregateErrorPrototype):(X=K?this:create$1$2(AggregateErrorPrototype),createNonEnumerableProperty$1$2(X,TO_STRING_TAG$5,"Error")),q!==void 0&&createNonEnumerableProperty$1$2(X,"message",normalizeStringArgument(q)),installErrorStack(X,$AggregateError,X.stack,1),arguments.length>2&&installErrorCause(X,arguments[2]);var tt=[];return iterate$6(W,push$1$2,{that:tt}),createNonEnumerableProperty$1$2(X,"errors",tt),X};setPrototypeOf$7?setPrototypeOf$7($AggregateError,$Error):copyConstructorProperties($AggregateError,$Error,{name:!0});var AggregateErrorPrototype=$AggregateError.prototype=create$1$2($Error.prototype,{constructor:createPropertyDescriptor$8(1,$AggregateError),message:createPropertyDescriptor$8(1,""),name:createPropertyDescriptor$8(1,"AggregateError")});$$f$2({global:!0,constructor:!0,arity:2},{AggregateError:$AggregateError});var getBuiltIn$3$2=getBuiltIn$f,defineBuiltInAccessor$1$2=defineBuiltInAccessor$3$2,wellKnownSymbol$2$2=wellKnownSymbol$n$1,DESCRIPTORS$2$2=descriptors$2,SPECIES$2$2=wellKnownSymbol$2$2("species"),setSpecies$2$1=function(F){var W=getBuiltIn$3$2(F);DESCRIPTORS$2$2&&W&&!W[SPECIES$2$2]&&defineBuiltInAccessor$1$2(W,SPECIES$2$2,{configurable:!0,get:function(){return this}})},isPrototypeOf$5$2=objectIsPrototypeOf$2,$TypeError$1$2=TypeError,anInstance$3$1=function(F,W){if(isPrototypeOf$5$2(W,F))return F;throw new $TypeError$1$2("Incorrect invocation")},anObject$1$2=anObject$d$1,aConstructor$3=aConstructor$2$1,isNullOrUndefined$2$2=isNullOrUndefined$6$1,wellKnownSymbol$1$2=wellKnownSymbol$n$1,SPECIES$1$2=wellKnownSymbol$1$2("species"),speciesConstructor$2=function(F,W){var q=anObject$1$2(F).constructor,K;return q===void 0||isNullOrUndefined$2$2(K=anObject$1$2(q)[SPECIES$1$2])?W:aConstructor$3(K)},userAgent$4=engineUserAgent$2,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$4),global$6$2=global$p,apply$7=functionApply$2,bind$3$2=functionBindContext$2,isCallable$4$2=isCallable$m,hasOwn$4$2=hasOwnProperty_1$2,fails$6$2=fails$u$2,html$3=html$2$1,arraySlice$1$2=arraySlice$5$2,createElement$2=documentCreateElement$1$2,validateArgumentsLength$3=validateArgumentsLength$2$1,IS_IOS$1=engineIsIos,IS_NODE$3=engineIsNode$2,set$3$2=global$6$2.setImmediate,clear=global$6$2.clearImmediate,process$2$1=global$6$2.process,Dispatch=global$6$2.Dispatch,Function$1$2=global$6$2.Function,MessageChannel$1=global$6$2.MessageChannel,String$1=global$6$2.String,counter=0,queue$2={},ONREADYSTATECHANGE="onreadystatechange",$location,defer,channel,port;fails$6$2(function(){$location=global$6$2.location});var run=function(F){if(hasOwn$4$2(queue$2,F)){var W=queue$2[F];delete queue$2[F],W()}},runner=function(F){return function(){run(F)}},eventListener=function(F){run(F.data)},globalPostMessageDefer=function(F){global$6$2.postMessage(String$1(F),$location.protocol+"//"+$location.host)};(!set$3$2||!clear)&&(set$3$2=function(W){validateArgumentsLength$3(arguments.length,1);var q=isCallable$4$2(W)?W:Function$1$2(W),K=arraySlice$1$2(arguments,1);return queue$2[++counter]=function(){apply$7(q,void 0,K)},defer(counter),counter},clear=function(W){delete queue$2[W]},IS_NODE$3?defer=function(F){process$2$1.nextTick(runner(F))}:Dispatch&&Dispatch.now?defer=function(F){Dispatch.now(runner(F))}:MessageChannel$1&&!IS_IOS$1?(channel=new MessageChannel$1,port=channel.port2,channel.port1.onmessage=eventListener,defer=bind$3$2(port.postMessage,port)):global$6$2.addEventListener&&isCallable$4$2(global$6$2.postMessage)&&!global$6$2.importScripts&&$location&&$location.protocol!=="file:"&&!fails$6$2(globalPostMessageDefer)?(defer=globalPostMessageDefer,global$6$2.addEventListener("message",eventListener,!1)):ONREADYSTATECHANGE in createElement$2("script")?defer=function(F){html$3.appendChild(createElement$2("script"))[ONREADYSTATECHANGE]=function(){html$3.removeChild(this),run(F)}}:defer=function(F){setTimeout(runner(F),0)});var task$1={set:set$3$2,clear},Queue$3=function(){this.head=null,this.tail=null};Queue$3.prototype={add:function(F){var W={item:F,next:null},q=this.tail;q?q.next=W:this.head=W,this.tail=W},get:function(){var F=this.head;if(F){var W=this.head=F.next;return W===null&&(this.tail=null),F.item}}};var queue$1=Queue$3,userAgent$3$1=engineUserAgent$2,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$3$1)&&typeof Pebble<"u",userAgent$2$2=engineUserAgent$2,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent$2$2),global$5$2=global$p,bind$2$2=functionBindContext$2,getOwnPropertyDescriptor$b=objectGetOwnPropertyDescriptor$2.f,macrotask=task$1.set,Queue$2=queue$1,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$2=engineIsNode$2,MutationObserver$1=global$5$2.MutationObserver||global$5$2.WebKitMutationObserver,document$2=global$5$2.document,process$1$1=global$5$2.process,Promise$1=global$5$2.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$b(global$5$2,"queueMicrotask"),microtask$1=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,notify$1,toggle,node,promise$5,then;if(!microtask$1){var queue=new Queue$2,flush=function(){var F,W;for(IS_NODE$2&&(F=process$1$1.domain)&&F.exit();W=queue.get();)try{W()}catch(q){throw queue.head&¬ify$1(),q}F&&F.enter()};!IS_IOS&&!IS_NODE$2&&!IS_WEBOS_WEBKIT&&MutationObserver$1&&document$2?(toggle=!0,node=document$2.createTextNode(""),new MutationObserver$1(flush).observe(node,{characterData:!0}),notify$1=function(){node.data=toggle=!toggle}):!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?(promise$5=Promise$1.resolve(void 0),promise$5.constructor=Promise$1,then=bind$2$2(promise$5.then,promise$5),notify$1=function(){then(flush)}):IS_NODE$2?notify$1=function(){process$1$1.nextTick(flush)}:(macrotask=bind$2$2(macrotask,global$5$2),notify$1=function(){macrotask(flush)}),microtask$1=function(F){queue.head||notify$1(),queue.add(F)}}var microtask_1=microtask$1,hostReportErrors$1=function(F,W){try{arguments.length===1?console.error(F):console.error(F,W)}catch{}},perform$6=function(F){try{return{error:!1,value:F()}}catch(W){return{error:!0,value:W}}},global$4$2=global$p,promiseNativeConstructor=global$4$2.Promise,engineIsDeno=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",IS_DENO$1=engineIsDeno,IS_NODE$1$1=engineIsNode$2,engineIsBrowser=!IS_DENO$1&&!IS_NODE$1$1&&typeof window=="object"&&typeof document=="object",global$3$2=global$p,NativePromiseConstructor$5=promiseNativeConstructor,isCallable$3$2=isCallable$m,isForced$3=isForced_1$2,inspectSource$3=inspectSource$2$1,wellKnownSymbol$o=wellKnownSymbol$n$1,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION$4=engineV8Version$2,NativePromisePrototype$2=NativePromiseConstructor$5&&NativePromiseConstructor$5.prototype,SPECIES$6=wellKnownSymbol$o("species"),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$3$2(global$3$2.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced$3("Promise",function(){var F=inspectSource$3(NativePromiseConstructor$5),W=F!==String(NativePromiseConstructor$5);if(!W&&V8_VERSION$4===66||!(NativePromisePrototype$2.catch&&NativePromisePrototype$2.finally))return!0;if(!V8_VERSION$4||V8_VERSION$4<51||!/native code/.test(F)){var q=new NativePromiseConstructor$5(function(tt){tt(1)}),K=function(tt){tt(function(){},function(){})},X=q.constructor={};if(X[SPECIES$6]=K,SUBCLASSING=q.then(function(){})instanceof K,!SUBCLASSING)return!0}return!W&&(IS_BROWSER||IS_DENO)&&!NATIVE_PROMISE_REJECTION_EVENT$1}),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$5,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$1,SUBCLASSING},newPromiseCapability$2={},aCallable$6$2=aCallable$e,$TypeError$i=TypeError,PromiseCapability=function(F){var W,q;this.promise=new F(function(K,X){if(W!==void 0||q!==void 0)throw new $TypeError$i("Bad Promise constructor");W=K,q=X}),this.resolve=aCallable$6$2(W),this.reject=aCallable$6$2(q)};newPromiseCapability$2.f=function(F){return new PromiseCapability(F)};var $$e$2=_export$2,IS_NODE$5=engineIsNode$2,global$2$2=global$p,call$5$2=functionCall$2,defineBuiltIn$1$2=defineBuiltIn$6$1,setToStringTag$1$2=setToStringTag$7$1,setSpecies$1$2=setSpecies$2$1,aCallable$5$2=aCallable$e,isCallable$2$2=isCallable$m,isObject$4$2=isObject$h$2,anInstance$2$2=anInstance$3$1,speciesConstructor$1=speciesConstructor$2,task=task$1.set,microtask=microtask_1,hostReportErrors=hostReportErrors$1,perform$5=perform$6,Queue$1=queue$1,InternalStateModule$2$2=internalState$2,NativePromiseConstructor$4=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$7=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT,getInternalPromiseState=InternalStateModule$2$2.getterFor(PROMISE),setInternalState$2$2=InternalStateModule$2$2.set,NativePromisePrototype$1=NativePromiseConstructor$4&&NativePromiseConstructor$4.prototype,PromiseConstructor=NativePromiseConstructor$4,PromisePrototype=NativePromisePrototype$1,TypeError$1$2=global$2$2.TypeError,document$1$2=global$2$2.document,process$4=global$2$2.process,newPromiseCapability$1=newPromiseCapabilityModule$7.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1$2&&document$1$2.createEvent&&global$2$2.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,Internal,OwnPromiseCapability,PromiseWrapper,isThenable=function(F){var W;return isObject$4$2(F)&&isCallable$2$2(W=F.then)?W:!1},callReaction=function(F,W){var q=W.value,K=W.state===FULFILLED,X=K?F.ok:F.fail,tt=F.resolve,rt=F.reject,ot=F.domain,ut,yn,uo;try{X?(K||(W.rejection===UNHANDLED&&onHandleUnhandled(W),W.rejection=HANDLED),X===!0?ut=q:(ot&&ot.enter(),ut=X(q),ot&&(ot.exit(),uo=!0)),ut===F.promise?rt(new TypeError$1$2("Promise-chain cycle")):(yn=isThenable(ut))?call$5$2(yn,ut,tt,rt):tt(ut)):rt(q)}catch(po){ot&&!uo&&ot.exit(),rt(po)}},notify=function(F,W){F.notified||(F.notified=!0,microtask(function(){for(var q=F.reactions,K;K=q.get();)callReaction(K,F);F.notified=!1,W&&!F.rejection&&onUnhandled(F)}))},dispatchEvent=function(F,W,q){var K,X;DISPATCH_EVENT?(K=document$1$2.createEvent("Event"),K.promise=W,K.reason=q,K.initEvent(F,!1,!0),global$2$2.dispatchEvent(K)):K={promise:W,reason:q},!NATIVE_PROMISE_REJECTION_EVENT&&(X=global$2$2["on"+F])?X(K):F===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",q)},onUnhandled=function(F){call$5$2(task,global$2$2,function(){var W=F.facade,q=F.value,K=isUnhandled(F),X;if(K&&(X=perform$5(function(){IS_NODE$5?process$4.emit("unhandledRejection",q,W):dispatchEvent(UNHANDLED_REJECTION,W,q)}),F.rejection=IS_NODE$5||isUnhandled(F)?UNHANDLED:HANDLED,X.error))throw X.value})},isUnhandled=function(F){return F.rejection!==HANDLED&&!F.parent},onHandleUnhandled=function(F){call$5$2(task,global$2$2,function(){var W=F.facade;IS_NODE$5?process$4.emit("rejectionHandled",W):dispatchEvent(REJECTION_HANDLED,W,F.value)})},bind$1$2=function(F,W,q){return function(K){F(W,K,q)}},internalReject=function(F,W,q){F.done||(F.done=!0,q&&(F=q),F.value=W,F.state=REJECTED,notify(F,!0))},internalResolve=function(F,W,q){if(!F.done){F.done=!0,q&&(F=q);try{if(F.facade===W)throw new TypeError$1$2("Promise can't be resolved itself");var K=isThenable(W);K?microtask(function(){var X={done:!1};try{call$5$2(K,W,bind$1$2(internalResolve,X,F),bind$1$2(internalReject,X,F))}catch(tt){internalReject(X,tt,F)}}):(F.value=W,F.state=FULFILLED,notify(F,!1))}catch(X){internalReject({done:!1},X,F)}}};FORCED_PROMISE_CONSTRUCTOR$4&&(PromiseConstructor=function(W){anInstance$2$2(this,PromisePrototype),aCallable$5$2(W),call$5$2(Internal,this);var q=getInternalPromiseState(this);try{W(bind$1$2(internalResolve,q),bind$1$2(internalReject,q))}catch(K){internalReject(q,K)}},PromisePrototype=PromiseConstructor.prototype,Internal=function(W){setInternalState$2$2(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue$1,rejection:!1,state:PENDING,value:void 0})},Internal.prototype=defineBuiltIn$1$2(PromisePrototype,"then",function(W,q){var K=getInternalPromiseState(this),X=newPromiseCapability$1(speciesConstructor$1(this,PromiseConstructor));return K.parent=!0,X.ok=isCallable$2$2(W)?W:!0,X.fail=isCallable$2$2(q)&&q,X.domain=IS_NODE$5?process$4.domain:void 0,K.state===PENDING?K.reactions.add(X):microtask(function(){callReaction(X,K)}),X.promise}),OwnPromiseCapability=function(){var F=new Internal,W=getInternalPromiseState(F);this.promise=F,this.resolve=bind$1$2(internalResolve,W),this.reject=bind$1$2(internalReject,W)},newPromiseCapabilityModule$7.f=newPromiseCapability$1=function(F){return F===PromiseConstructor||F===PromiseWrapper?new OwnPromiseCapability(F):newGenericPromiseCapability(F)});$$e$2({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor});setToStringTag$1$2(PromiseConstructor,PROMISE,!1,!0);setSpecies$1$2(PROMISE);var NativePromiseConstructor$3=promiseNativeConstructor,checkCorrectnessOfIteration$3=checkCorrectnessOfIteration$2$1,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration$3(function(F){NativePromiseConstructor$3.all(F).then(void 0,function(){})}),$$d$2=_export$2,call$4$2=functionCall$2,aCallable$4$2=aCallable$e,newPromiseCapabilityModule$6=newPromiseCapability$2,perform$4=perform$6,iterate$5=iterate$7,PROMISE_STATICS_INCORRECT_ITERATION$3=promiseStaticsIncorrectIteration;$$d$2({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$3},{all:function F(W){var q=this,K=newPromiseCapabilityModule$6.f(q),X=K.resolve,tt=K.reject,rt=perform$4(function(){var ot=aCallable$4$2(q.resolve),ut=[],yn=0,uo=1;iterate$5(W,function(po){var mo=yn++,wo=!1;uo++,call$4$2(ot,q,po).then(function(lf){wo||(wo=!0,ut[mo]=lf,--uo||X(ut))},tt)}),--uo||X(ut)});return rt.error&&tt(rt.value),K.promise}});var $$c$2=_export$2,FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor$2=promiseNativeConstructor;NativePromiseConstructor$2&&NativePromiseConstructor$2.prototype;$$c$2({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(F){return this.then(void 0,F)}});var $$b$2=_export$2,call$3$2=functionCall$2,aCallable$3$2=aCallable$e,newPromiseCapabilityModule$5=newPromiseCapability$2,perform$3=perform$6,iterate$4$1=iterate$7,PROMISE_STATICS_INCORRECT_ITERATION$2=promiseStaticsIncorrectIteration;$$b$2({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$2},{race:function F(W){var q=this,K=newPromiseCapabilityModule$5.f(q),X=K.reject,tt=perform$3(function(){var rt=aCallable$3$2(q.resolve);iterate$4$1(W,function(ot){call$3$2(rt,q,ot).then(K.resolve,X)})});return tt.error&&X(tt.value),K.promise}});var $$a$2=_export$2,call$2$2=functionCall$2,newPromiseCapabilityModule$4=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR;$$a$2({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function F(W){var q=newPromiseCapabilityModule$4.f(this);return call$2$2(q.reject,void 0,W),q.promise}});var anObject$f=anObject$d$1,isObject$3$2=isObject$h$2,newPromiseCapability=newPromiseCapability$2,promiseResolve$2=function(F,W){if(anObject$f(F),isObject$3$2(W)&&W.constructor===F)return W;var q=newPromiseCapability.f(F),K=q.resolve;return K(W),q.promise},$$9$2=_export$2,getBuiltIn$2$2=getBuiltIn$f,IS_PURE=isPure,NativePromiseConstructor$1=promiseNativeConstructor,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve$1=promiseResolve$2,PromiseConstructorWrapper=getBuiltIn$2$2("Promise"),CHECK_WRAPPER=!FORCED_PROMISE_CONSTRUCTOR;$$9$2({target:"Promise",stat:!0,forced:IS_PURE},{resolve:function F(W){return promiseResolve$1(CHECK_WRAPPER&&this===PromiseConstructorWrapper?NativePromiseConstructor$1:this,W)}});var $$8$2=_export$2,call$1$2=functionCall$2,aCallable$2$2=aCallable$e,newPromiseCapabilityModule$3=newPromiseCapability$2,perform$2=perform$6,iterate$3$1=iterate$7,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration;$$8$2({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$1},{allSettled:function F(W){var q=this,K=newPromiseCapabilityModule$3.f(q),X=K.resolve,tt=K.reject,rt=perform$2(function(){var ot=aCallable$2$2(q.resolve),ut=[],yn=0,uo=1;iterate$3$1(W,function(po){var mo=yn++,wo=!1;uo++,call$1$2(ot,q,po).then(function(lf){wo||(wo=!0,ut[mo]={status:"fulfilled",value:lf},--uo||X(ut))},function(lf){wo||(wo=!0,ut[mo]={status:"rejected",reason:lf},--uo||X(ut))})}),--uo||X(ut)});return rt.error&&tt(rt.value),K.promise}});var $$7$2=_export$2,call$l=functionCall$2,aCallable$1$2=aCallable$e,getBuiltIn$1$2=getBuiltIn$f,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$1=perform$6,iterate$2$2=iterate$7,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,PROMISE_ANY_ERROR="No one promise resolved";$$7$2({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION},{any:function F(W){var q=this,K=getBuiltIn$1$2("AggregateError"),X=newPromiseCapabilityModule$2.f(q),tt=X.resolve,rt=X.reject,ot=perform$1(function(){var ut=aCallable$1$2(q.resolve),yn=[],uo=0,po=1,mo=!1;iterate$2$2(W,function(wo){var lf=uo++,yf=!1;po++,call$l(ut,q,wo).then(function(cf){yf||mo||(mo=!0,tt(cf))},function(cf){yf||mo||(yf=!0,yn[lf]=cf,--po||rt(new K(yn,PROMISE_ANY_ERROR)))})}),--po||rt(new K(yn,PROMISE_ANY_ERROR))});return ot.error&&rt(ot.value),X.promise}});var $$6$2=_export$2,NativePromiseConstructor=promiseNativeConstructor,fails$5$2=fails$u$2,getBuiltIn$g=getBuiltIn$f,isCallable$1$2=isCallable$m,speciesConstructor=speciesConstructor$2,promiseResolve=promiseResolve$2,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,NON_GENERIC=!!NativePromiseConstructor&&fails$5$2(function(){NativePromisePrototype.finally.call({then:function(){}},function(){})});$$6$2({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC},{finally:function(F){var W=speciesConstructor(this,getBuiltIn$g("Promise")),q=isCallable$1$2(F);return this.then(q?function(K){return promiseResolve(W,F()).then(function(){return K})}:F,q?function(K){return promiseResolve(W,F()).then(function(){throw K})}:F)}});var path$2$2=path$o$2,promise$4=path$2$2.Promise,parent$e$2=promise$4,promise$3=parent$e$2,$$5$2=_export$2,newPromiseCapabilityModule$1=newPromiseCapability$2;$$5$2({target:"Promise",stat:!0},{withResolvers:function F(){var W=newPromiseCapabilityModule$1.f(this);return{promise:W.promise,resolve:W.resolve,reject:W.reject}}});var parent$d$2=promise$3,promise$2=parent$d$2,$$4$2=_export$2,newPromiseCapabilityModule=newPromiseCapability$2,perform=perform$6;$$4$2({target:"Promise",stat:!0,forced:!0},{try:function(F){var W=newPromiseCapabilityModule.f(this),q=perform(F);return(q.error?W.reject:W.resolve)(q.value),W.promise}});var parent$c$2=promise$2,promise$1=parent$c$2,promise=promise$1,parent$b$2=reverse$4$1,reverse$2$2=parent$b$2,parent$a$2=reverse$2$2,reverse$1$2=parent$a$2,reverse$7=reverse$1$2;(function(F){var W=_typeofExports.default,q=defineProperty$8$2,K=symbol$1$2,X=create$2$2,tt=getPrototypeOf$1$2,rt=forEach$1$2,ot=push$3$2,ut=setPrototypeOf$1$2,yn=promise,uo=reverse$7,po=slice$1$2;function mo(){F.exports=mo=function(){return lf},F.exports.__esModule=!0,F.exports.default=F.exports;var wo,lf={},yf=Object.prototype,cf=yf.hasOwnProperty,vf=q||function(Lp,xp,kp){Lp[xp]=kp.value},_f=typeof K=="function"?K:{},$f=_f.iterator||"@@iterator",wf=_f.asyncIterator||"@@asyncIterator",Pf=_f.toStringTag||"@@toStringTag";function Cf(Lp,xp,kp){return q(Lp,xp,{value:kp,enumerable:!0,configurable:!0,writable:!0}),Lp[xp]}try{Cf({},"")}catch{Cf=function(kp,lp,Of){return kp[lp]=Of}}function Af(Lp,xp,kp,lp){var Of=xp&&xp.prototype instanceof Yf?xp:Yf,qf=X(Of.prototype),cp=new vg(lp||[]);return vf(qf,"_invoke",{value:Ip(Lp,kp,cp)}),qf}function Bf(Lp,xp,kp){try{return{type:"normal",arg:Lp.call(xp,kp)}}catch(lp){return{type:"throw",arg:lp}}}lf.wrap=Af;var Hf="suspendedStart",Df="suspendedYield",Lf="executing",kf="completed",Nf={};function Yf(){}function Gf(){}function rp(){}var ip={};Cf(ip,$f,function(){return this});var ap=tt,yp=ap&&ap(ap(Dp([])));yp&&yp!==yf&&cf.call(yp,$f)&&(ip=yp);var vp=rp.prototype=Yf.prototype=X(ip);function Np(Lp){var xp;rt(xp=["next","throw","return"]).call(xp,function(kp){Cf(Lp,kp,function(lp){return this._invoke(kp,lp)})})}function jp(Lp,xp){function kp(Of,qf,cp,hp){var $p=Bf(Lp[Of],Lp,qf);if($p.type!=="throw"){var Vp=$p.arg,bp=Vp.value;return bp&&W(bp)=="object"&&cf.call(bp,"__await")?xp.resolve(bp.__await).then(function(Ep){kp("next",Ep,cp,hp)},function(Ep){kp("throw",Ep,cp,hp)}):xp.resolve(bp).then(function(Ep){Vp.value=Ep,cp(Vp)},function(Ep){return kp("throw",Ep,cp,hp)})}hp($p.arg)}var lp;vf(this,"_invoke",{value:function(qf,cp){function hp(){return new xp(function($p,Vp){kp(qf,cp,$p,Vp)})}return lp=lp?lp.then(hp,hp):hp()}})}function Ip(Lp,xp,kp){var lp=Hf;return function(Of,qf){if(lp===Lf)throw new Error("Generator is already running");if(lp===kf){if(Of==="throw")throw qf;return{value:wo,done:!0}}for(kp.method=Of,kp.arg=qf;;){var cp=kp.delegate;if(cp){var hp=Jp(cp,kp);if(hp){if(hp===Nf)continue;return hp}}if(kp.method==="next")kp.sent=kp._sent=kp.arg;else if(kp.method==="throw"){if(lp===Hf)throw lp=kf,kp.arg;kp.dispatchException(kp.arg)}else kp.method==="return"&&kp.abrupt("return",kp.arg);lp=Lf;var $p=Bf(Lp,xp,kp);if($p.type==="normal"){if(lp=kp.done?kf:Df,$p.arg===Nf)continue;return{value:$p.arg,done:kp.done}}$p.type==="throw"&&(lp=kf,kp.method="throw",kp.arg=$p.arg)}}}function Jp(Lp,xp){var kp=xp.method,lp=Lp.iterator[kp];if(lp===wo)return xp.delegate=null,kp==="throw"&&Lp.iterator.return&&(xp.method="return",xp.arg=wo,Jp(Lp,xp),xp.method==="throw")||kp!=="return"&&(xp.method="throw",xp.arg=new TypeError("The iterator does not provide a '"+kp+"' method")),Nf;var Of=Bf(lp,Lp.iterator,xp.arg);if(Of.type==="throw")return xp.method="throw",xp.arg=Of.arg,xp.delegate=null,Nf;var qf=Of.arg;return qf?qf.done?(xp[Lp.resultName]=qf.value,xp.next=Lp.nextLoc,xp.method!=="return"&&(xp.method="next",xp.arg=wo),xp.delegate=null,Nf):qf:(xp.method="throw",xp.arg=new TypeError("iterator result is not an object"),xp.delegate=null,Nf)}function ng(Lp){var xp,kp={tryLoc:Lp[0]};1 in Lp&&(kp.catchLoc=Lp[1]),2 in Lp&&(kp.finallyLoc=Lp[2],kp.afterLoc=Lp[3]),ot(xp=this.tryEntries).call(xp,kp)}function og(Lp){var xp=Lp.completion||{};xp.type="normal",delete xp.arg,Lp.completion=xp}function vg(Lp){this.tryEntries=[{tryLoc:"root"}],rt(Lp).call(Lp,ng,this),this.reset(!0)}function Dp(Lp){if(Lp||Lp===""){var xp=Lp[$f];if(xp)return xp.call(Lp);if(typeof Lp.next=="function")return Lp;if(!isNaN(Lp.length)){var kp=-1,lp=function Of(){for(;++kp=0;--Of){var qf=this.tryEntries[Of],cp=qf.completion;if(qf.tryLoc==="root")return lp("end");if(qf.tryLoc<=this.prev){var hp=cf.call(qf,"catchLoc"),$p=cf.call(qf,"finallyLoc");if(hp&&$p){if(this.prev=0;--lp){var Of=this.tryEntries[lp];if(Of.tryLoc<=this.prev&&cf.call(Of,"finallyLoc")&&this.prev=0;--kp){var lp=this.tryEntries[kp];if(lp.finallyLoc===xp)return this.complete(lp.completion,lp.afterLoc),og(lp),Nf}},catch:function(xp){for(var kp=this.tryEntries.length-1;kp>=0;--kp){var lp=this.tryEntries[kp];if(lp.tryLoc===xp){var Of=lp.completion;if(Of.type==="throw"){var qf=Of.arg;og(lp)}return qf}}throw new Error("illegal catch attempt")},delegateYield:function(xp,kp,lp){return this.delegate={iterator:Dp(xp),resultName:kp,nextLoc:lp},this.method==="next"&&(this.arg=wo),Nf}},lf}F.exports=mo,F.exports.__esModule=!0,F.exports.default=F.exports})(regeneratorRuntime$1);var regeneratorRuntimeExports=regeneratorRuntime$1.exports,runtime=regeneratorRuntimeExports(),regenerator=runtime;try{regeneratorRuntime=runtime}catch(F){typeof globalThis=="object"?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}var _regeneratorRuntime=getDefaultExportFromCjs$2(regenerator),internalMetadata$2={exports:{}},fails$4$2=fails$u$2,arrayBufferNonExtensible$2=fails$4$2(function(){if(typeof ArrayBuffer=="function"){var F=new ArrayBuffer(8);Object.isExtensible(F)&&Object.defineProperty(F,"a",{value:8})}}),fails$3$2=fails$u$2,isObject$2$2=isObject$h$2,classof$3$2=classofRaw$2$2,ARRAY_BUFFER_NON_EXTENSIBLE$2=arrayBufferNonExtensible$2,$isExtensible$2=Object.isExtensible,FAILS_ON_PRIMITIVES$5=fails$3$2(function(){$isExtensible$2(1)}),objectIsExtensible$2=FAILS_ON_PRIMITIVES$5||ARRAY_BUFFER_NON_EXTENSIBLE$2?function F(W){return!isObject$2$2(W)||ARRAY_BUFFER_NON_EXTENSIBLE$2&&classof$3$2(W)==="ArrayBuffer"?!1:$isExtensible$2?$isExtensible$2(W):!0}:$isExtensible$2,fails$2$2=fails$u$2,freezing$2=!fails$2$2(function(){return Object.isExtensible(Object.preventExtensions({}))}),$$3$2=_export$2,uncurryThis$1$2=functionUncurryThis$2,hiddenKeys$8=hiddenKeys$6$2,isObject$1$2=isObject$h$2,hasOwn$3$2=hasOwnProperty_1$2,defineProperty$1$2=objectDefineProperty$2.f,getOwnPropertyNamesModule$4=objectGetOwnPropertyNames$2,getOwnPropertyNamesExternalModule$2=objectGetOwnPropertyNamesExternal$2,isExtensible$3=objectIsExtensible$2,uid$6=uid$4$2,FREEZING$3=freezing$2,REQUIRED$2=!1,METADATA$3=uid$6("meta"),id$4=0,setMetadata$2=function(F){defineProperty$1$2(F,METADATA$3,{value:{objectID:"O"+id$4++,weakData:{}}})},fastKey$1$2=function(F,W){if(!isObject$1$2(F))return typeof F=="symbol"?F:(typeof F=="string"?"S":"P")+F;if(!hasOwn$3$2(F,METADATA$3)){if(!isExtensible$3(F))return"F";if(!W)return"E";setMetadata$2(F)}return F[METADATA$3].objectID},getWeakData$3=function(F,W){if(!hasOwn$3$2(F,METADATA$3)){if(!isExtensible$3(F))return!0;if(!W)return!1;setMetadata$2(F)}return F[METADATA$3].weakData},onFreeze$2=function(F){return FREEZING$3&&REQUIRED$2&&isExtensible$3(F)&&!hasOwn$3$2(F,METADATA$3)&&setMetadata$2(F),F},enable$2=function(){meta$2.enable=function(){},REQUIRED$2=!0;var F=getOwnPropertyNamesModule$4.f,W=uncurryThis$1$2([].splice),q={};q[METADATA$3]=1,F(q).length&&(getOwnPropertyNamesModule$4.f=function(K){for(var X=F(K),tt=0,rt=X.length;tt1?arguments[1]:void 0),wo;wo=wo?wo.next:po.first;)for(mo(wo.value,wo.key,this);wo&&wo.removed;)wo=wo.previous},has:function(uo){return!!ut(this,uo)}}),defineBuiltIns$5(tt,q?{get:function(uo){var po=ut(this,uo);return po&&po.value},set:function(uo,po){return ot(this,uo===0?0:uo,po)}}:{add:function(uo){return ot(this,uo=uo===0?0:uo,uo)}}),DESCRIPTORS$k&&defineBuiltInAccessor$5(tt,"size",{configurable:!0,get:function(){return rt(this).size}}),X},setStrong:function(F,W,q){var K=W+" Iterator",X=internalStateGetterFor$4(W),tt=internalStateGetterFor$4(K);defineIterator$4(F,W,function(rt,ot){setInternalState$7(this,{type:K,target:rt,state:X(rt),kind:ot,last:void 0})},function(){for(var rt=tt(this),ot=rt.kind,ut=rt.last;ut&&ut.removed;)ut=ut.previous;return!rt.target||!(rt.last=ut=ut?ut.next:rt.state.first)?(rt.target=void 0,createIterResultObject$5(void 0,!0)):createIterResultObject$5(ot==="keys"?ut.key:ot==="values"?ut.value:[ut.key,ut.value],!1)},q?"entries":"values",!q,!0),setSpecies$3(W)}},collection$1$2=collection$2$1,collectionStrong$1$2=collectionStrong$2$1;collection$1$2("Map",function(F){return function(){return F(this,arguments.length?arguments[0]:void 0)}},collectionStrong$1$2);var path$1$2=path$o$2,map$2$2=path$1$2.Map,parent$9$2=map$2$2,map$1$2=parent$9$2,map$8=map$1$2,_Map$1=getDefaultExportFromCjs$2(map$8),$$1$2=_export$2,$some$2=arrayIteration$2.some,arrayMethodIsStrict$1$2=arrayMethodIsStrict$4$2,STRICT_METHOD$1$2=arrayMethodIsStrict$1$2("some");$$1$2({target:"Array",proto:!0,forced:!STRICT_METHOD$1$2},{some:function F(W){return $some$2(this,W,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$4=getBuiltInPrototypeMethod$g,some$3$2=getBuiltInPrototypeMethod$4("Array","some"),isPrototypeOf$4$2=objectIsPrototypeOf$2,method$4$2=some$3$2,ArrayPrototype$4$2=Array.prototype,some$2$2=function(F){var W=F.some;return F===ArrayPrototype$4$2||isPrototypeOf$4$2(ArrayPrototype$4$2,F)&&W===ArrayPrototype$4$2.some?method$4$2:W},parent$8$2=some$2$2,some$1$2=parent$8$2,some$6=some$1$2,_someInstanceProperty$2=getDefaultExportFromCjs$2(some$6),getBuiltInPrototypeMethod$3=getBuiltInPrototypeMethod$g,keys$3$2=getBuiltInPrototypeMethod$3("Array","keys"),parent$7$2=keys$3$2,keys$2$2=parent$7$2,classof$2$2=classof$d$2,hasOwn$2$2=hasOwnProperty_1$2,isPrototypeOf$3$2=objectIsPrototypeOf$2,method$3$2=keys$2$2,ArrayPrototype$3$2=Array.prototype,DOMIterables$2$1={DOMTokenList:!0,NodeList:!0},keys$1$2=function(F){var W=F.keys;return F===ArrayPrototype$3$2||isPrototypeOf$3$2(ArrayPrototype$3$2,F)&&W===ArrayPrototype$3$2.keys||hasOwn$2$2(DOMIterables$2$1,classof$2$2(F))?method$3$2:W},keys$8=keys$1$2,_keysInstanceProperty=getDefaultExportFromCjs$2(keys$8),arraySlice$7=arraySliceSimple$2,floor$3=Math.floor,mergeSort$2=function(F,W){var q=F.length,K=floor$3(q/2);return q<8?insertionSort$2(F,W):merge$4(F,mergeSort$2(arraySlice$7(F,0,K),W),mergeSort$2(arraySlice$7(F,K),W),W)},insertionSort$2=function(F,W){for(var q=F.length,K=1,X,tt;K0;)F[tt]=F[--tt];tt!==K++&&(F[tt]=X)}return F},merge$4=function(F,W,q,K){for(var X=W.length,tt=q.length,rt=0,ot=0;rt3)){if(IE_OR_EDGE$2)return!0;if(WEBKIT$2)return WEBKIT$2<603;var F="",W,q,K,X;for(W=65;W<76;W++){switch(q=String.fromCharCode(W),W){case 66:case 69:case 70:case 72:K=3;break;case 68:case 71:K=4;break;default:K=2}for(X=0;X<47;X++)test$4.push({k:q+X,v:K})}for(test$4.sort(function(tt,rt){return rt.v-tt.v}),X=0;XtoString$g(q)?1:-1}};$$R({target:"Array",proto:!0,forced:FORCED$c},{sort:function F(W){W!==void 0&&aCallable$f(W);var q=toObject$h(this);if(STABLE_SORT$2)return W===void 0?nativeSort$2(q):nativeSort$2(q,W);var K=[],X=lengthOfArrayLike$e(q),tt,rt;for(rt=0;rtthis.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=_setTimeout$2(function(){q.flush()},this.delay))}},{key:"flush",value:function(){var q,K;_forEachInstanceProperty$2(q=_spliceInstanceProperty$2(K=this._queue).call(K,0)).call(q,function(X){X.fn.apply(X.context||X.fn,X.args||[])})}}],[{key:"extend",value:function(q,K){var X=new F(K);if(q.flush!==void 0)throw new Error("Target object already has a property flush");q.flush=function(){X.flush()};var tt=[{name:"flush",original:void 0}];if(K&&K.replace)for(var rt=0;rt=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$3$2(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$3$2(F,W);var K=_sliceInstanceProperty$3(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1$2(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$3$2(F,W)}}function _arrayLikeToArray$3$2(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q1?q-1:0),X=1;X2){var K;return deepObjectAssignNonentry$1.apply(void 0,_concatInstanceProperty$2(K=[deepObjectAssign$1(W[0],W[1])]).call(K,_toConsumableArray$2(_sliceInstanceProperty$3(W).call(W,2))))}var X=W[0],tt=W[1];if(X instanceof Date&&tt instanceof Date)return X.setTime(tt.getTime()),X;var rt=_createForOfIteratorHelper$3$2(_Reflect$ownKeys$1(tt)),ot;try{for(rt.s();!(ot=rt.n()).done;){var ut=ot.value;Object.prototype.propertyIsEnumerable.call(tt,ut)&&(tt[ut]===DELETE$1?delete X[ut]:X[ut]!==null&&tt[ut]!==null&&typeof X[ut]=="object"&&typeof tt[ut]=="object"&&!_Array$isArray$3(X[ut])&&!_Array$isArray$3(tt[ut])?X[ut]=deepObjectAssignNonentry$1(X[ut],tt[ut]):X[ut]=clone$2(tt[ut]))}}catch(yn){rt.e(yn)}finally{rt.f()}return X}function clone$2(F){return _Array$isArray$3(F)?_mapInstanceProperty$2(F).call(F,function(W){return clone$2(W)}):typeof F=="object"&&F!==null?F instanceof Date?new Date(F.getTime()):deepObjectAssignNonentry$1({},F):F}function stripDelete$1(F){for(var W=0,q=_Object$keys$2(F);Wrt;)ut=K(q,ot=X[rt++]),ut!==void 0&&createProperty$8(tt,ot,ut);return tt}});var path$5$2=path$o$2,getOwnPropertyDescriptors$2$2=path$5$2.Object.getOwnPropertyDescriptors,parent$r$2=getOwnPropertyDescriptors$2$2,getOwnPropertyDescriptors$1$2=parent$r$2,getOwnPropertyDescriptors$4=getOwnPropertyDescriptors$1$2,_Object$getOwnPropertyDescriptors$2=getDefaultExportFromCjs$2(getOwnPropertyDescriptors$4),defineProperties$4$2={exports:{}},$$h$2=_export$2,DESCRIPTORS$3$2=descriptors$2,defineProperties$3$2=objectDefineProperties$2.f;$$h$2({target:"Object",stat:!0,forced:Object.defineProperties!==defineProperties$3$2,sham:!DESCRIPTORS$3$2},{defineProperties:defineProperties$3$2});var path$4$2=path$o$2,Object$1$2=path$4$2.Object,defineProperties$2$2=defineProperties$4$2.exports=function F(W,q){return Object$1$2.defineProperties(W,q)};Object$1$2.defineProperties.sham&&(defineProperties$2$2.sham=!0);var definePropertiesExports$2=defineProperties$4$2.exports,parent$q$2=definePropertiesExports$2,defineProperties$1$2=parent$q$2,defineProperties$6=defineProperties$1$2,_Object$defineProperties$2=getDefaultExportFromCjs$2(defineProperties$6),defineProperty$2$2=defineProperty$b$2,_Object$defineProperty$3=getDefaultExportFromCjs$2(defineProperty$2$2);function _assertThisInitialized$3(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F}var parent$p$2=create$7$2,create$4$2=parent$p$2,parent$o$2=create$4$2,create$3$2=parent$o$2,create$2$2=create$3$2,_Object$create$3=getDefaultExportFromCjs$2(create$2$2),$$g$2=_export$2,setPrototypeOf$6$1=objectSetPrototypeOf$2;$$g$2({target:"Object",stat:!0},{setPrototypeOf:setPrototypeOf$6$1});var path$3$2=path$o$2,setPrototypeOf$5$2=path$3$2.Object.setPrototypeOf,parent$n$2=setPrototypeOf$5$2,setPrototypeOf$4$2=parent$n$2,parent$m$2=setPrototypeOf$4$2,setPrototypeOf$3$2=parent$m$2,parent$l$2=setPrototypeOf$3$2,setPrototypeOf$2$2=parent$l$2,setPrototypeOf$1$2=setPrototypeOf$2$2,_Object$setPrototypeOf$2=getDefaultExportFromCjs$2(setPrototypeOf$1$2),parent$k$2=bind$c$2,bind$7$2=parent$k$2,parent$j$2=bind$7$2,bind$6$2=parent$j$2,bind$5$2=bind$6$2,_bindInstanceProperty$3=getDefaultExportFromCjs$2(bind$5$2);function _setPrototypeOf$2(F,W){var q;return _setPrototypeOf$2=_Object$setPrototypeOf$2?_bindInstanceProperty$3(q=_Object$setPrototypeOf$2).call(q):function(X,tt){return X.__proto__=tt,X},_setPrototypeOf$2(F,W)}function _inherits$2(F,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function");F.prototype=_Object$create$3(W&&W.prototype,{constructor:{value:F,writable:!0,configurable:!0}}),_Object$defineProperty$1$2(F,"prototype",{writable:!1}),W&&_setPrototypeOf$2(F,W)}function _possibleConstructorReturn$2(F,W){if(W&&(_typeof$1$1(W)==="object"||typeof W=="function"))return W;if(W!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$3(F)}var parent$i$2=getPrototypeOf$4$2,getPrototypeOf$3$2=parent$i$2,parent$h$2=getPrototypeOf$3$2,getPrototypeOf$2$2=parent$h$2,getPrototypeOf$1$2=getPrototypeOf$2$2,_Object$getPrototypeOf$3=getDefaultExportFromCjs$2(getPrototypeOf$1$2);function _getPrototypeOf$2(F){var W;return _getPrototypeOf$2=_Object$setPrototypeOf$2?_bindInstanceProperty$3(W=_Object$getPrototypeOf$3).call(W):function(K){return K.__proto__||_Object$getPrototypeOf$3(K)},_getPrototypeOf$2(F)}var regeneratorRuntime$1={exports:{}},_typeof$2={exports:{}};(function(F){var W=symbol$1$2,q=iterator$1$2;function K(X){"@babel/helpers - typeof";return F.exports=K=typeof W=="function"&&typeof q=="symbol"?function(tt){return typeof tt}:function(tt){return tt&&typeof W=="function"&&tt.constructor===W&&tt!==W.prototype?"symbol":typeof tt},F.exports.__esModule=!0,F.exports.default=F.exports,K(X)}F.exports=K,F.exports.__esModule=!0,F.exports.default=F.exports})(_typeof$2);var _typeofExports=_typeof$2.exports,parent$g$2=forEach$5$2,forEach$3$2=parent$g$2,parent$f$2=forEach$3$2,forEach$2$2=parent$f$2,forEach$1$2=forEach$2$2,hasOwn$5$2=hasOwnProperty_1$2,ownKeys$1$2=ownKeys$7$1,getOwnPropertyDescriptorModule$4=objectGetOwnPropertyDescriptor$2,definePropertyModule$5=objectDefineProperty$2,copyConstructorProperties$1=function(F,W,q){for(var K=ownKeys$1$2(W),X=definePropertyModule$5.f,tt=getOwnPropertyDescriptorModule$4.f,rt=0;rtpo;po++)if(wo=vf(F[po]),wo&&isPrototypeOf$7$2(ResultPrototype$2,wo))return wo;return new Result$2(!1)}yn=getIterator$6(F,uo)}for(lf=tt?F.next:yn.next;!(yf=call$6$2(lf,yn)).done;){try{wo=vf(yf.value)}catch(_f){iteratorClose$4(yn,"throw",_f)}if(typeof wo=="object"&&wo&&isPrototypeOf$7$2(ResultPrototype$2,wo))return wo}return new Result$2(!1)},toString$1$2=toString$7$2,normalizeStringArgument$1=function(F,W){return F===void 0?arguments.length<2?"":W:toString$1$2(F)},$$f$2=_export$2,isPrototypeOf$6$2=objectIsPrototypeOf$2,getPrototypeOf$a=objectGetPrototypeOf$3,setPrototypeOf$7=objectSetPrototypeOf$2,copyConstructorProperties=copyConstructorProperties$1,create$1$2=objectCreate$2,createNonEnumerableProperty$1$2=createNonEnumerableProperty$9,createPropertyDescriptor$8=createPropertyDescriptor$7,installErrorCause=installErrorCause$1,installErrorStack=errorStackInstall,iterate$6=iterate$7,normalizeStringArgument=normalizeStringArgument$1,wellKnownSymbol$3$2=wellKnownSymbol$n$1,TO_STRING_TAG$5=wellKnownSymbol$3$2("toStringTag"),$Error=Error,push$1$2=[].push,$AggregateError=function F(W,q){var K=isPrototypeOf$6$2(AggregateErrorPrototype,this),X;setPrototypeOf$7?X=setPrototypeOf$7(new $Error,K?getPrototypeOf$a(this):AggregateErrorPrototype):(X=K?this:create$1$2(AggregateErrorPrototype),createNonEnumerableProperty$1$2(X,TO_STRING_TAG$5,"Error")),q!==void 0&&createNonEnumerableProperty$1$2(X,"message",normalizeStringArgument(q)),installErrorStack(X,$AggregateError,X.stack,1),arguments.length>2&&installErrorCause(X,arguments[2]);var tt=[];return iterate$6(W,push$1$2,{that:tt}),createNonEnumerableProperty$1$2(X,"errors",tt),X};setPrototypeOf$7?setPrototypeOf$7($AggregateError,$Error):copyConstructorProperties($AggregateError,$Error,{name:!0});var AggregateErrorPrototype=$AggregateError.prototype=create$1$2($Error.prototype,{constructor:createPropertyDescriptor$8(1,$AggregateError),message:createPropertyDescriptor$8(1,""),name:createPropertyDescriptor$8(1,"AggregateError")});$$f$2({global:!0,constructor:!0,arity:2},{AggregateError:$AggregateError});var getBuiltIn$3$2=getBuiltIn$f,defineBuiltInAccessor$1$2=defineBuiltInAccessor$3$2,wellKnownSymbol$2$2=wellKnownSymbol$n$1,DESCRIPTORS$2$2=descriptors$2,SPECIES$2$2=wellKnownSymbol$2$2("species"),setSpecies$2$1=function(F){var W=getBuiltIn$3$2(F);DESCRIPTORS$2$2&&W&&!W[SPECIES$2$2]&&defineBuiltInAccessor$1$2(W,SPECIES$2$2,{configurable:!0,get:function(){return this}})},isPrototypeOf$5$2=objectIsPrototypeOf$2,$TypeError$1$2=TypeError,anInstance$3$1=function(F,W){if(isPrototypeOf$5$2(W,F))return F;throw new $TypeError$1$2("Incorrect invocation")},anObject$1$2=anObject$d$1,aConstructor$3=aConstructor$2$1,isNullOrUndefined$2$2=isNullOrUndefined$6$1,wellKnownSymbol$1$2=wellKnownSymbol$n$1,SPECIES$1$2=wellKnownSymbol$1$2("species"),speciesConstructor$2=function(F,W){var q=anObject$1$2(F).constructor,K;return q===void 0||isNullOrUndefined$2$2(K=anObject$1$2(q)[SPECIES$1$2])?W:aConstructor$3(K)},userAgent$4=engineUserAgent$2,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$4),global$6$2=global$p,apply$7=functionApply$2,bind$3$2=functionBindContext$2,isCallable$4$2=isCallable$m,hasOwn$4$2=hasOwnProperty_1$2,fails$6$2=fails$u$2,html$3=html$2$1,arraySlice$1$2=arraySlice$5$2,createElement$2=documentCreateElement$1$2,validateArgumentsLength$3=validateArgumentsLength$2$1,IS_IOS$1=engineIsIos,IS_NODE$3=engineIsNode$2,set$3$2=global$6$2.setImmediate,clear=global$6$2.clearImmediate,process$2$1=global$6$2.process,Dispatch=global$6$2.Dispatch,Function$1$2=global$6$2.Function,MessageChannel$1=global$6$2.MessageChannel,String$1=global$6$2.String,counter=0,queue$2={},ONREADYSTATECHANGE="onreadystatechange",$location,defer,channel,port;fails$6$2(function(){$location=global$6$2.location});var run=function(F){if(hasOwn$4$2(queue$2,F)){var W=queue$2[F];delete queue$2[F],W()}},runner=function(F){return function(){run(F)}},eventListener=function(F){run(F.data)},globalPostMessageDefer=function(F){global$6$2.postMessage(String$1(F),$location.protocol+"//"+$location.host)};(!set$3$2||!clear)&&(set$3$2=function(W){validateArgumentsLength$3(arguments.length,1);var q=isCallable$4$2(W)?W:Function$1$2(W),K=arraySlice$1$2(arguments,1);return queue$2[++counter]=function(){apply$7(q,void 0,K)},defer(counter),counter},clear=function(W){delete queue$2[W]},IS_NODE$3?defer=function(F){process$2$1.nextTick(runner(F))}:Dispatch&&Dispatch.now?defer=function(F){Dispatch.now(runner(F))}:MessageChannel$1&&!IS_IOS$1?(channel=new MessageChannel$1,port=channel.port2,channel.port1.onmessage=eventListener,defer=bind$3$2(port.postMessage,port)):global$6$2.addEventListener&&isCallable$4$2(global$6$2.postMessage)&&!global$6$2.importScripts&&$location&&$location.protocol!=="file:"&&!fails$6$2(globalPostMessageDefer)?(defer=globalPostMessageDefer,global$6$2.addEventListener("message",eventListener,!1)):ONREADYSTATECHANGE in createElement$2("script")?defer=function(F){html$3.appendChild(createElement$2("script"))[ONREADYSTATECHANGE]=function(){html$3.removeChild(this),run(F)}}:defer=function(F){setTimeout(runner(F),0)});var task$1={set:set$3$2,clear},Queue$3=function(){this.head=null,this.tail=null};Queue$3.prototype={add:function(F){var W={item:F,next:null},q=this.tail;q?q.next=W:this.head=W,this.tail=W},get:function(){var F=this.head;if(F){var W=this.head=F.next;return W===null&&(this.tail=null),F.item}}};var queue$1=Queue$3,userAgent$3$1=engineUserAgent$2,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$3$1)&&typeof Pebble<"u",userAgent$2$2=engineUserAgent$2,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent$2$2),global$5$2=global$p,bind$2$2=functionBindContext$2,getOwnPropertyDescriptor$b=objectGetOwnPropertyDescriptor$2.f,macrotask=task$1.set,Queue$2=queue$1,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$2=engineIsNode$2,MutationObserver$1=global$5$2.MutationObserver||global$5$2.WebKitMutationObserver,document$2=global$5$2.document,process$1$1=global$5$2.process,Promise$1=global$5$2.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$b(global$5$2,"queueMicrotask"),microtask$1=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,notify$1,toggle,node,promise$5,then;if(!microtask$1){var queue=new Queue$2,flush=function(){var F,W;for(IS_NODE$2&&(F=process$1$1.domain)&&F.exit();W=queue.get();)try{W()}catch(q){throw queue.head&¬ify$1(),q}F&&F.enter()};!IS_IOS&&!IS_NODE$2&&!IS_WEBOS_WEBKIT&&MutationObserver$1&&document$2?(toggle=!0,node=document$2.createTextNode(""),new MutationObserver$1(flush).observe(node,{characterData:!0}),notify$1=function(){node.data=toggle=!toggle}):!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?(promise$5=Promise$1.resolve(void 0),promise$5.constructor=Promise$1,then=bind$2$2(promise$5.then,promise$5),notify$1=function(){then(flush)}):IS_NODE$2?notify$1=function(){process$1$1.nextTick(flush)}:(macrotask=bind$2$2(macrotask,global$5$2),notify$1=function(){macrotask(flush)}),microtask$1=function(F){queue.head||notify$1(),queue.add(F)}}var microtask_1=microtask$1,hostReportErrors$1=function(F,W){try{arguments.length===1?console.error(F):console.error(F,W)}catch{}},perform$6=function(F){try{return{error:!1,value:F()}}catch(W){return{error:!0,value:W}}},global$4$2=global$p,promiseNativeConstructor=global$4$2.Promise,engineIsDeno=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",IS_DENO$1=engineIsDeno,IS_NODE$1$1=engineIsNode$2,engineIsBrowser=!IS_DENO$1&&!IS_NODE$1$1&&typeof window=="object"&&typeof document=="object",global$3$2=global$p,NativePromiseConstructor$5=promiseNativeConstructor,isCallable$3$2=isCallable$m,isForced$3=isForced_1$2,inspectSource$3=inspectSource$2$1,wellKnownSymbol$o=wellKnownSymbol$n$1,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION$4=engineV8Version$2,NativePromisePrototype$2=NativePromiseConstructor$5&&NativePromiseConstructor$5.prototype,SPECIES$6=wellKnownSymbol$o("species"),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$3$2(global$3$2.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced$3("Promise",function(){var F=inspectSource$3(NativePromiseConstructor$5),W=F!==String(NativePromiseConstructor$5);if(!W&&V8_VERSION$4===66||!(NativePromisePrototype$2.catch&&NativePromisePrototype$2.finally))return!0;if(!V8_VERSION$4||V8_VERSION$4<51||!/native code/.test(F)){var q=new NativePromiseConstructor$5(function(tt){tt(1)}),K=function(tt){tt(function(){},function(){})},X=q.constructor={};if(X[SPECIES$6]=K,SUBCLASSING=q.then(function(){})instanceof K,!SUBCLASSING)return!0}return!W&&(IS_BROWSER||IS_DENO)&&!NATIVE_PROMISE_REJECTION_EVENT$1}),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$5,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$1,SUBCLASSING},newPromiseCapability$2={},aCallable$6$2=aCallable$e,$TypeError$i=TypeError,PromiseCapability=function(F){var W,q;this.promise=new F(function(K,X){if(W!==void 0||q!==void 0)throw new $TypeError$i("Bad Promise constructor");W=K,q=X}),this.resolve=aCallable$6$2(W),this.reject=aCallable$6$2(q)};newPromiseCapability$2.f=function(F){return new PromiseCapability(F)};var $$e$2=_export$2,IS_NODE$5=engineIsNode$2,global$2$2=global$p,call$5$2=functionCall$2,defineBuiltIn$1$2=defineBuiltIn$6$1,setToStringTag$1$2=setToStringTag$7$1,setSpecies$1$2=setSpecies$2$1,aCallable$5$2=aCallable$e,isCallable$2$2=isCallable$m,isObject$4$2=isObject$h$2,anInstance$2$2=anInstance$3$1,speciesConstructor$1=speciesConstructor$2,task=task$1.set,microtask=microtask_1,hostReportErrors=hostReportErrors$1,perform$5=perform$6,Queue$1=queue$1,InternalStateModule$2$2=internalState$2,NativePromiseConstructor$4=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$7=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT,getInternalPromiseState=InternalStateModule$2$2.getterFor(PROMISE),setInternalState$2$2=InternalStateModule$2$2.set,NativePromisePrototype$1=NativePromiseConstructor$4&&NativePromiseConstructor$4.prototype,PromiseConstructor=NativePromiseConstructor$4,PromisePrototype=NativePromisePrototype$1,TypeError$1$2=global$2$2.TypeError,document$1$2=global$2$2.document,process$4=global$2$2.process,newPromiseCapability$1=newPromiseCapabilityModule$7.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1$2&&document$1$2.createEvent&&global$2$2.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,Internal,OwnPromiseCapability,PromiseWrapper,isThenable=function(F){var W;return isObject$4$2(F)&&isCallable$2$2(W=F.then)?W:!1},callReaction=function(F,W){var q=W.value,K=W.state===FULFILLED,X=K?F.ok:F.fail,tt=F.resolve,rt=F.reject,ot=F.domain,ut,yn,uo;try{X?(K||(W.rejection===UNHANDLED&&onHandleUnhandled(W),W.rejection=HANDLED),X===!0?ut=q:(ot&&ot.enter(),ut=X(q),ot&&(ot.exit(),uo=!0)),ut===F.promise?rt(new TypeError$1$2("Promise-chain cycle")):(yn=isThenable(ut))?call$5$2(yn,ut,tt,rt):tt(ut)):rt(q)}catch(po){ot&&!uo&&ot.exit(),rt(po)}},notify=function(F,W){F.notified||(F.notified=!0,microtask(function(){for(var q=F.reactions,K;K=q.get();)callReaction(K,F);F.notified=!1,W&&!F.rejection&&onUnhandled(F)}))},dispatchEvent=function(F,W,q){var K,X;DISPATCH_EVENT?(K=document$1$2.createEvent("Event"),K.promise=W,K.reason=q,K.initEvent(F,!1,!0),global$2$2.dispatchEvent(K)):K={promise:W,reason:q},!NATIVE_PROMISE_REJECTION_EVENT&&(X=global$2$2["on"+F])?X(K):F===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",q)},onUnhandled=function(F){call$5$2(task,global$2$2,function(){var W=F.facade,q=F.value,K=isUnhandled(F),X;if(K&&(X=perform$5(function(){IS_NODE$5?process$4.emit("unhandledRejection",q,W):dispatchEvent(UNHANDLED_REJECTION,W,q)}),F.rejection=IS_NODE$5||isUnhandled(F)?UNHANDLED:HANDLED,X.error))throw X.value})},isUnhandled=function(F){return F.rejection!==HANDLED&&!F.parent},onHandleUnhandled=function(F){call$5$2(task,global$2$2,function(){var W=F.facade;IS_NODE$5?process$4.emit("rejectionHandled",W):dispatchEvent(REJECTION_HANDLED,W,F.value)})},bind$1$2=function(F,W,q){return function(K){F(W,K,q)}},internalReject=function(F,W,q){F.done||(F.done=!0,q&&(F=q),F.value=W,F.state=REJECTED,notify(F,!0))},internalResolve=function(F,W,q){if(!F.done){F.done=!0,q&&(F=q);try{if(F.facade===W)throw new TypeError$1$2("Promise can't be resolved itself");var K=isThenable(W);K?microtask(function(){var X={done:!1};try{call$5$2(K,W,bind$1$2(internalResolve,X,F),bind$1$2(internalReject,X,F))}catch(tt){internalReject(X,tt,F)}}):(F.value=W,F.state=FULFILLED,notify(F,!1))}catch(X){internalReject({done:!1},X,F)}}};FORCED_PROMISE_CONSTRUCTOR$4&&(PromiseConstructor=function(W){anInstance$2$2(this,PromisePrototype),aCallable$5$2(W),call$5$2(Internal,this);var q=getInternalPromiseState(this);try{W(bind$1$2(internalResolve,q),bind$1$2(internalReject,q))}catch(K){internalReject(q,K)}},PromisePrototype=PromiseConstructor.prototype,Internal=function(W){setInternalState$2$2(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue$1,rejection:!1,state:PENDING,value:void 0})},Internal.prototype=defineBuiltIn$1$2(PromisePrototype,"then",function(W,q){var K=getInternalPromiseState(this),X=newPromiseCapability$1(speciesConstructor$1(this,PromiseConstructor));return K.parent=!0,X.ok=isCallable$2$2(W)?W:!0,X.fail=isCallable$2$2(q)&&q,X.domain=IS_NODE$5?process$4.domain:void 0,K.state===PENDING?K.reactions.add(X):microtask(function(){callReaction(X,K)}),X.promise}),OwnPromiseCapability=function(){var F=new Internal,W=getInternalPromiseState(F);this.promise=F,this.resolve=bind$1$2(internalResolve,W),this.reject=bind$1$2(internalReject,W)},newPromiseCapabilityModule$7.f=newPromiseCapability$1=function(F){return F===PromiseConstructor||F===PromiseWrapper?new OwnPromiseCapability(F):newGenericPromiseCapability(F)});$$e$2({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor});setToStringTag$1$2(PromiseConstructor,PROMISE,!1,!0);setSpecies$1$2(PROMISE);var NativePromiseConstructor$3=promiseNativeConstructor,checkCorrectnessOfIteration$3=checkCorrectnessOfIteration$2$1,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration$3(function(F){NativePromiseConstructor$3.all(F).then(void 0,function(){})}),$$d$2=_export$2,call$4$2=functionCall$2,aCallable$4$2=aCallable$e,newPromiseCapabilityModule$6=newPromiseCapability$2,perform$4=perform$6,iterate$5=iterate$7,PROMISE_STATICS_INCORRECT_ITERATION$3=promiseStaticsIncorrectIteration;$$d$2({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$3},{all:function F(W){var q=this,K=newPromiseCapabilityModule$6.f(q),X=K.resolve,tt=K.reject,rt=perform$4(function(){var ot=aCallable$4$2(q.resolve),ut=[],yn=0,uo=1;iterate$5(W,function(po){var mo=yn++,wo=!1;uo++,call$4$2(ot,q,po).then(function(lf){wo||(wo=!0,ut[mo]=lf,--uo||X(ut))},tt)}),--uo||X(ut)});return rt.error&&tt(rt.value),K.promise}});var $$c$2=_export$2,FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor$2=promiseNativeConstructor;NativePromiseConstructor$2&&NativePromiseConstructor$2.prototype;$$c$2({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(F){return this.then(void 0,F)}});var $$b$2=_export$2,call$3$2=functionCall$2,aCallable$3$2=aCallable$e,newPromiseCapabilityModule$5=newPromiseCapability$2,perform$3=perform$6,iterate$4$1=iterate$7,PROMISE_STATICS_INCORRECT_ITERATION$2=promiseStaticsIncorrectIteration;$$b$2({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$2},{race:function F(W){var q=this,K=newPromiseCapabilityModule$5.f(q),X=K.reject,tt=perform$3(function(){var rt=aCallable$3$2(q.resolve);iterate$4$1(W,function(ot){call$3$2(rt,q,ot).then(K.resolve,X)})});return tt.error&&X(tt.value),K.promise}});var $$a$2=_export$2,call$2$2=functionCall$2,newPromiseCapabilityModule$4=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR;$$a$2({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function F(W){var q=newPromiseCapabilityModule$4.f(this);return call$2$2(q.reject,void 0,W),q.promise}});var anObject$f=anObject$d$1,isObject$3$2=isObject$h$2,newPromiseCapability=newPromiseCapability$2,promiseResolve$2=function(F,W){if(anObject$f(F),isObject$3$2(W)&&W.constructor===F)return W;var q=newPromiseCapability.f(F),K=q.resolve;return K(W),q.promise},$$9$2=_export$2,getBuiltIn$2$2=getBuiltIn$f,IS_PURE=isPure,NativePromiseConstructor$1=promiseNativeConstructor,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve$1=promiseResolve$2,PromiseConstructorWrapper=getBuiltIn$2$2("Promise"),CHECK_WRAPPER=!FORCED_PROMISE_CONSTRUCTOR;$$9$2({target:"Promise",stat:!0,forced:IS_PURE},{resolve:function F(W){return promiseResolve$1(CHECK_WRAPPER&&this===PromiseConstructorWrapper?NativePromiseConstructor$1:this,W)}});var $$8$2=_export$2,call$1$2=functionCall$2,aCallable$2$2=aCallable$e,newPromiseCapabilityModule$3=newPromiseCapability$2,perform$2=perform$6,iterate$3$1=iterate$7,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration;$$8$2({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$1},{allSettled:function F(W){var q=this,K=newPromiseCapabilityModule$3.f(q),X=K.resolve,tt=K.reject,rt=perform$2(function(){var ot=aCallable$2$2(q.resolve),ut=[],yn=0,uo=1;iterate$3$1(W,function(po){var mo=yn++,wo=!1;uo++,call$1$2(ot,q,po).then(function(lf){wo||(wo=!0,ut[mo]={status:"fulfilled",value:lf},--uo||X(ut))},function(lf){wo||(wo=!0,ut[mo]={status:"rejected",reason:lf},--uo||X(ut))})}),--uo||X(ut)});return rt.error&&tt(rt.value),K.promise}});var $$7$2=_export$2,call$l=functionCall$2,aCallable$1$2=aCallable$e,getBuiltIn$1$2=getBuiltIn$f,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$1=perform$6,iterate$2$2=iterate$7,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,PROMISE_ANY_ERROR="No one promise resolved";$$7$2({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION},{any:function F(W){var q=this,K=getBuiltIn$1$2("AggregateError"),X=newPromiseCapabilityModule$2.f(q),tt=X.resolve,rt=X.reject,ot=perform$1(function(){var ut=aCallable$1$2(q.resolve),yn=[],uo=0,po=1,mo=!1;iterate$2$2(W,function(wo){var lf=uo++,yf=!1;po++,call$l(ut,q,wo).then(function(cf){yf||mo||(mo=!0,tt(cf))},function(cf){yf||mo||(yf=!0,yn[lf]=cf,--po||rt(new K(yn,PROMISE_ANY_ERROR)))})}),--po||rt(new K(yn,PROMISE_ANY_ERROR))});return ot.error&&rt(ot.value),X.promise}});var $$6$2=_export$2,NativePromiseConstructor=promiseNativeConstructor,fails$5$2=fails$u$2,getBuiltIn$g=getBuiltIn$f,isCallable$1$2=isCallable$m,speciesConstructor=speciesConstructor$2,promiseResolve=promiseResolve$2,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,NON_GENERIC=!!NativePromiseConstructor&&fails$5$2(function(){NativePromisePrototype.finally.call({then:function(){}},function(){})});$$6$2({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC},{finally:function(F){var W=speciesConstructor(this,getBuiltIn$g("Promise")),q=isCallable$1$2(F);return this.then(q?function(K){return promiseResolve(W,F()).then(function(){return K})}:F,q?function(K){return promiseResolve(W,F()).then(function(){throw K})}:F)}});var path$2$2=path$o$2,promise$4=path$2$2.Promise,parent$e$2=promise$4,promise$3=parent$e$2,$$5$2=_export$2,newPromiseCapabilityModule$1=newPromiseCapability$2;$$5$2({target:"Promise",stat:!0},{withResolvers:function F(){var W=newPromiseCapabilityModule$1.f(this);return{promise:W.promise,resolve:W.resolve,reject:W.reject}}});var parent$d$2=promise$3,promise$2=parent$d$2,$$4$2=_export$2,newPromiseCapabilityModule=newPromiseCapability$2,perform=perform$6;$$4$2({target:"Promise",stat:!0,forced:!0},{try:function(F){var W=newPromiseCapabilityModule.f(this),q=perform(F);return(q.error?W.reject:W.resolve)(q.value),W.promise}});var parent$c$2=promise$2,promise$1=parent$c$2,promise=promise$1,parent$b$2=reverse$4$1,reverse$2$2=parent$b$2,parent$a$2=reverse$2$2,reverse$1$2=parent$a$2,reverse$7=reverse$1$2;(function(F){var W=_typeofExports.default,q=defineProperty$8$2,K=symbol$1$2,X=create$2$2,tt=getPrototypeOf$1$2,rt=forEach$1$2,ot=push$3$2,ut=setPrototypeOf$1$2,yn=promise,uo=reverse$7,po=slice$1$2;function mo(){F.exports=mo=function(){return lf},F.exports.__esModule=!0,F.exports.default=F.exports;var wo,lf={},yf=Object.prototype,cf=yf.hasOwnProperty,vf=q||function(Lp,xp,kp){Lp[xp]=kp.value},_f=typeof K=="function"?K:{},$f=_f.iterator||"@@iterator",xf=_f.asyncIterator||"@@asyncIterator",Af=_f.toStringTag||"@@toStringTag";function Cf(Lp,xp,kp){return q(Lp,xp,{value:kp,enumerable:!0,configurable:!0,writable:!0}),Lp[xp]}try{Cf({},"")}catch{Cf=function(kp,lp,Of){return kp[lp]=Of}}function Pf(Lp,xp,kp,lp){var Of=xp&&xp.prototype instanceof Yf?xp:Yf,qf=X(Of.prototype),cp=new vg(lp||[]);return vf(qf,"_invoke",{value:Ip(Lp,kp,cp)}),qf}function Bf(Lp,xp,kp){try{return{type:"normal",arg:Lp.call(xp,kp)}}catch(lp){return{type:"throw",arg:lp}}}lf.wrap=Pf;var Hf="suspendedStart",Df="suspendedYield",Lf="executing",kf="completed",Nf={};function Yf(){}function Gf(){}function rp(){}var ip={};Cf(ip,$f,function(){return this});var ap=tt,yp=ap&&ap(ap(Dp([])));yp&&yp!==yf&&cf.call(yp,$f)&&(ip=yp);var vp=rp.prototype=Yf.prototype=X(ip);function Np(Lp){var xp;rt(xp=["next","throw","return"]).call(xp,function(kp){Cf(Lp,kp,function(lp){return this._invoke(kp,lp)})})}function jp(Lp,xp){function kp(Of,qf,cp,hp){var $p=Bf(Lp[Of],Lp,qf);if($p.type!=="throw"){var Vp=$p.arg,bp=Vp.value;return bp&&W(bp)=="object"&&cf.call(bp,"__await")?xp.resolve(bp.__await).then(function(Ep){kp("next",Ep,cp,hp)},function(Ep){kp("throw",Ep,cp,hp)}):xp.resolve(bp).then(function(Ep){Vp.value=Ep,cp(Vp)},function(Ep){return kp("throw",Ep,cp,hp)})}hp($p.arg)}var lp;vf(this,"_invoke",{value:function(qf,cp){function hp(){return new xp(function($p,Vp){kp(qf,cp,$p,Vp)})}return lp=lp?lp.then(hp,hp):hp()}})}function Ip(Lp,xp,kp){var lp=Hf;return function(Of,qf){if(lp===Lf)throw new Error("Generator is already running");if(lp===kf){if(Of==="throw")throw qf;return{value:wo,done:!0}}for(kp.method=Of,kp.arg=qf;;){var cp=kp.delegate;if(cp){var hp=Jp(cp,kp);if(hp){if(hp===Nf)continue;return hp}}if(kp.method==="next")kp.sent=kp._sent=kp.arg;else if(kp.method==="throw"){if(lp===Hf)throw lp=kf,kp.arg;kp.dispatchException(kp.arg)}else kp.method==="return"&&kp.abrupt("return",kp.arg);lp=Lf;var $p=Bf(Lp,xp,kp);if($p.type==="normal"){if(lp=kp.done?kf:Df,$p.arg===Nf)continue;return{value:$p.arg,done:kp.done}}$p.type==="throw"&&(lp=kf,kp.method="throw",kp.arg=$p.arg)}}}function Jp(Lp,xp){var kp=xp.method,lp=Lp.iterator[kp];if(lp===wo)return xp.delegate=null,kp==="throw"&&Lp.iterator.return&&(xp.method="return",xp.arg=wo,Jp(Lp,xp),xp.method==="throw")||kp!=="return"&&(xp.method="throw",xp.arg=new TypeError("The iterator does not provide a '"+kp+"' method")),Nf;var Of=Bf(lp,Lp.iterator,xp.arg);if(Of.type==="throw")return xp.method="throw",xp.arg=Of.arg,xp.delegate=null,Nf;var qf=Of.arg;return qf?qf.done?(xp[Lp.resultName]=qf.value,xp.next=Lp.nextLoc,xp.method!=="return"&&(xp.method="next",xp.arg=wo),xp.delegate=null,Nf):qf:(xp.method="throw",xp.arg=new TypeError("iterator result is not an object"),xp.delegate=null,Nf)}function ng(Lp){var xp,kp={tryLoc:Lp[0]};1 in Lp&&(kp.catchLoc=Lp[1]),2 in Lp&&(kp.finallyLoc=Lp[2],kp.afterLoc=Lp[3]),ot(xp=this.tryEntries).call(xp,kp)}function og(Lp){var xp=Lp.completion||{};xp.type="normal",delete xp.arg,Lp.completion=xp}function vg(Lp){this.tryEntries=[{tryLoc:"root"}],rt(Lp).call(Lp,ng,this),this.reset(!0)}function Dp(Lp){if(Lp||Lp===""){var xp=Lp[$f];if(xp)return xp.call(Lp);if(typeof Lp.next=="function")return Lp;if(!isNaN(Lp.length)){var kp=-1,lp=function Of(){for(;++kp=0;--Of){var qf=this.tryEntries[Of],cp=qf.completion;if(qf.tryLoc==="root")return lp("end");if(qf.tryLoc<=this.prev){var hp=cf.call(qf,"catchLoc"),$p=cf.call(qf,"finallyLoc");if(hp&&$p){if(this.prev=0;--lp){var Of=this.tryEntries[lp];if(Of.tryLoc<=this.prev&&cf.call(Of,"finallyLoc")&&this.prev=0;--kp){var lp=this.tryEntries[kp];if(lp.finallyLoc===xp)return this.complete(lp.completion,lp.afterLoc),og(lp),Nf}},catch:function(xp){for(var kp=this.tryEntries.length-1;kp>=0;--kp){var lp=this.tryEntries[kp];if(lp.tryLoc===xp){var Of=lp.completion;if(Of.type==="throw"){var qf=Of.arg;og(lp)}return qf}}throw new Error("illegal catch attempt")},delegateYield:function(xp,kp,lp){return this.delegate={iterator:Dp(xp),resultName:kp,nextLoc:lp},this.method==="next"&&(this.arg=wo),Nf}},lf}F.exports=mo,F.exports.__esModule=!0,F.exports.default=F.exports})(regeneratorRuntime$1);var regeneratorRuntimeExports=regeneratorRuntime$1.exports,runtime=regeneratorRuntimeExports(),regenerator=runtime;try{regeneratorRuntime=runtime}catch(F){typeof globalThis=="object"?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}var _regeneratorRuntime=getDefaultExportFromCjs$2(regenerator),internalMetadata$2={exports:{}},fails$4$2=fails$u$2,arrayBufferNonExtensible$2=fails$4$2(function(){if(typeof ArrayBuffer=="function"){var F=new ArrayBuffer(8);Object.isExtensible(F)&&Object.defineProperty(F,"a",{value:8})}}),fails$3$2=fails$u$2,isObject$2$2=isObject$h$2,classof$3$2=classofRaw$2$2,ARRAY_BUFFER_NON_EXTENSIBLE$2=arrayBufferNonExtensible$2,$isExtensible$2=Object.isExtensible,FAILS_ON_PRIMITIVES$5=fails$3$2(function(){$isExtensible$2(1)}),objectIsExtensible$2=FAILS_ON_PRIMITIVES$5||ARRAY_BUFFER_NON_EXTENSIBLE$2?function F(W){return!isObject$2$2(W)||ARRAY_BUFFER_NON_EXTENSIBLE$2&&classof$3$2(W)==="ArrayBuffer"?!1:$isExtensible$2?$isExtensible$2(W):!0}:$isExtensible$2,fails$2$2=fails$u$2,freezing$2=!fails$2$2(function(){return Object.isExtensible(Object.preventExtensions({}))}),$$3$2=_export$2,uncurryThis$1$2=functionUncurryThis$2,hiddenKeys$8=hiddenKeys$6$2,isObject$1$2=isObject$h$2,hasOwn$3$2=hasOwnProperty_1$2,defineProperty$1$2=objectDefineProperty$2.f,getOwnPropertyNamesModule$4=objectGetOwnPropertyNames$2,getOwnPropertyNamesExternalModule$2=objectGetOwnPropertyNamesExternal$2,isExtensible$3=objectIsExtensible$2,uid$6=uid$4$2,FREEZING$3=freezing$2,REQUIRED$2=!1,METADATA$3=uid$6("meta"),id$4=0,setMetadata$2=function(F){defineProperty$1$2(F,METADATA$3,{value:{objectID:"O"+id$4++,weakData:{}}})},fastKey$1$2=function(F,W){if(!isObject$1$2(F))return typeof F=="symbol"?F:(typeof F=="string"?"S":"P")+F;if(!hasOwn$3$2(F,METADATA$3)){if(!isExtensible$3(F))return"F";if(!W)return"E";setMetadata$2(F)}return F[METADATA$3].objectID},getWeakData$3=function(F,W){if(!hasOwn$3$2(F,METADATA$3)){if(!isExtensible$3(F))return!0;if(!W)return!1;setMetadata$2(F)}return F[METADATA$3].weakData},onFreeze$2=function(F){return FREEZING$3&&REQUIRED$2&&isExtensible$3(F)&&!hasOwn$3$2(F,METADATA$3)&&setMetadata$2(F),F},enable$2=function(){meta$2.enable=function(){},REQUIRED$2=!0;var F=getOwnPropertyNamesModule$4.f,W=uncurryThis$1$2([].splice),q={};q[METADATA$3]=1,F(q).length&&(getOwnPropertyNamesModule$4.f=function(K){for(var X=F(K),tt=0,rt=X.length;tt1?arguments[1]:void 0),wo;wo=wo?wo.next:po.first;)for(mo(wo.value,wo.key,this);wo&&wo.removed;)wo=wo.previous},has:function(uo){return!!ut(this,uo)}}),defineBuiltIns$5(tt,q?{get:function(uo){var po=ut(this,uo);return po&&po.value},set:function(uo,po){return ot(this,uo===0?0:uo,po)}}:{add:function(uo){return ot(this,uo=uo===0?0:uo,uo)}}),DESCRIPTORS$k&&defineBuiltInAccessor$5(tt,"size",{configurable:!0,get:function(){return rt(this).size}}),X},setStrong:function(F,W,q){var K=W+" Iterator",X=internalStateGetterFor$4(W),tt=internalStateGetterFor$4(K);defineIterator$4(F,W,function(rt,ot){setInternalState$7(this,{type:K,target:rt,state:X(rt),kind:ot,last:void 0})},function(){for(var rt=tt(this),ot=rt.kind,ut=rt.last;ut&&ut.removed;)ut=ut.previous;return!rt.target||!(rt.last=ut=ut?ut.next:rt.state.first)?(rt.target=void 0,createIterResultObject$5(void 0,!0)):createIterResultObject$5(ot==="keys"?ut.key:ot==="values"?ut.value:[ut.key,ut.value],!1)},q?"entries":"values",!q,!0),setSpecies$3(W)}},collection$1$2=collection$2$1,collectionStrong$1$2=collectionStrong$2$1;collection$1$2("Map",function(F){return function(){return F(this,arguments.length?arguments[0]:void 0)}},collectionStrong$1$2);var path$1$2=path$o$2,map$2$2=path$1$2.Map,parent$9$2=map$2$2,map$1$2=parent$9$2,map$8=map$1$2,_Map$1=getDefaultExportFromCjs$2(map$8),$$1$2=_export$2,$some$2=arrayIteration$2.some,arrayMethodIsStrict$1$2=arrayMethodIsStrict$4$2,STRICT_METHOD$1$2=arrayMethodIsStrict$1$2("some");$$1$2({target:"Array",proto:!0,forced:!STRICT_METHOD$1$2},{some:function F(W){return $some$2(this,W,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$4=getBuiltInPrototypeMethod$g,some$3$2=getBuiltInPrototypeMethod$4("Array","some"),isPrototypeOf$4$2=objectIsPrototypeOf$2,method$4$2=some$3$2,ArrayPrototype$4$2=Array.prototype,some$2$2=function(F){var W=F.some;return F===ArrayPrototype$4$2||isPrototypeOf$4$2(ArrayPrototype$4$2,F)&&W===ArrayPrototype$4$2.some?method$4$2:W},parent$8$2=some$2$2,some$1$2=parent$8$2,some$6=some$1$2,_someInstanceProperty$2=getDefaultExportFromCjs$2(some$6),getBuiltInPrototypeMethod$3=getBuiltInPrototypeMethod$g,keys$3$2=getBuiltInPrototypeMethod$3("Array","keys"),parent$7$2=keys$3$2,keys$2$2=parent$7$2,classof$2$2=classof$d$2,hasOwn$2$2=hasOwnProperty_1$2,isPrototypeOf$3$2=objectIsPrototypeOf$2,method$3$2=keys$2$2,ArrayPrototype$3$2=Array.prototype,DOMIterables$2$1={DOMTokenList:!0,NodeList:!0},keys$1$2=function(F){var W=F.keys;return F===ArrayPrototype$3$2||isPrototypeOf$3$2(ArrayPrototype$3$2,F)&&W===ArrayPrototype$3$2.keys||hasOwn$2$2(DOMIterables$2$1,classof$2$2(F))?method$3$2:W},keys$8=keys$1$2,_keysInstanceProperty=getDefaultExportFromCjs$2(keys$8),arraySlice$7=arraySliceSimple$2,floor$3=Math.floor,mergeSort$2=function(F,W){var q=F.length,K=floor$3(q/2);return q<8?insertionSort$2(F,W):merge$4(F,mergeSort$2(arraySlice$7(F,0,K),W),mergeSort$2(arraySlice$7(F,K),W),W)},insertionSort$2=function(F,W){for(var q=F.length,K=1,X,tt;K0;)F[tt]=F[--tt];tt!==K++&&(F[tt]=X)}return F},merge$4=function(F,W,q,K){for(var X=W.length,tt=q.length,rt=0,ot=0;rt3)){if(IE_OR_EDGE$2)return!0;if(WEBKIT$2)return WEBKIT$2<603;var F="",W,q,K,X;for(W=65;W<76;W++){switch(q=String.fromCharCode(W),W){case 66:case 69:case 70:case 72:K=3;break;case 68:case 71:K=4;break;default:K=2}for(X=0;X<47;X++)test$4.push({k:q+X,v:K})}for(test$4.sort(function(tt,rt){return rt.v-tt.v}),X=0;XtoString$g(q)?1:-1}};$$R({target:"Array",proto:!0,forced:FORCED$c},{sort:function F(W){W!==void 0&&aCallable$f(W);var q=toObject$h(this);if(STABLE_SORT$2)return W===void 0?nativeSort$2(q):nativeSort$2(q,W);var K=[],X=lengthOfArrayLike$e(q),tt,rt;for(rt=0;rtthis.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=_setTimeout$2(function(){q.flush()},this.delay))}},{key:"flush",value:function(){var q,K;_forEachInstanceProperty$2(q=_spliceInstanceProperty$2(K=this._queue).call(K,0)).call(q,function(X){X.fn.apply(X.context||X.fn,X.args||[])})}}],[{key:"extend",value:function(q,K){var X=new F(K);if(q.flush!==void 0)throw new Error("Target object already has a property flush");q.flush=function(){X.flush()};var tt=[{name:"flush",original:void 0}];if(K&&K.replace)for(var rt=0;rt=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$2$2(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$2$2(F,W);var K=_sliceInstanceProperty$3(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1$2(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$2$2(F,W)}}function _arrayLikeToArray$2$2(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);qot&&(ot=po,rt=uo)}return rt}},{key:"min",value:function(K){var X=_getIterator(this._pairs),tt=X.next();if(tt.done)return null;for(var rt=tt.value[1],ot=K(tt.value[1],tt.value[0]);!(tt=X.next()).done;){var ut=_slicedToArray$2(tt.value,2),yn=ut[0],uo=ut[1],po=K(uo,yn);po=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$1$2(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$1$2(F,W);var K=_sliceInstanceProperty$3(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1$2(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$1$2(F,W)}}function _arrayLikeToArray$1$2(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q"u"||!_Reflect$construct$2||_Reflect$construct$2.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$2(Boolean,[],function(){})),!0}catch{return!1}}function ensureFullItem(F,W){return F[W]==null&&(F[W]=v4$2()),F}var DataSet=function(F){_inherits$2(q,F);var W=_createSuper$1$2(q);function q(K,X){var tt;return _classCallCheck$2(this,q),tt=W.call(this),_defineProperty$2(_assertThisInitialized$3(tt),"_queue",null),K&&!_Array$isArray$3(K)&&(X=K,K=[]),tt._options=X||{},tt._data=new _Map$1,tt.length=0,tt._idProp=tt._options.fieldId||"id",K&&K.length&&tt.add(K),tt.setOptions(X),tt}return _createClass$2(q,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(X){X&&X.queue!==void 0&&(X.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=Queue.extend(this,{replace:["add","update","remove"]})),X.queue&&typeof X.queue=="object"&&this._queue.setOptions(X.queue)))}},{key:"add",value:function(X,tt){var rt=this,ot=[],ut;if(_Array$isArray$3(X)){var yn=_mapInstanceProperty$2(X).call(X,function(mo){return mo[rt._idProp]});if(_someInstanceProperty$2(yn).call(yn,function(mo){return rt._data.has(mo)}))throw new Error("A duplicate id was found in the parameter array.");for(var uo=0,po=X.length;uouo?1:ynot)&&(rt=uo,ot=po)}}catch(mo){ut.e(mo)}finally{ut.f()}return rt||null}},{key:"min",value:function(X){var tt,rt=null,ot=null,ut=_createForOfIteratorHelper$1$2(_valuesInstanceProperty$1(tt=this._data).call(tt)),yn;try{for(ut.s();!(yn=ut.n()).done;){var uo=yn.value,po=uo[X];typeof po=="number"&&(ot==null||po=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$9(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$9(F,W);var K=_sliceInstanceProperty$3(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1$2(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$9(F,W)}}function _arrayLikeToArray$9(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q"u"||!_Reflect$construct$2||_Reflect$construct$2.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$2(Boolean,[],function(){})),!0}catch{return!1}}var DataView$1=function(F){_inherits$2(q,F);var W=_createSuper$u(q);function q(K,X){var tt,rt;return _classCallCheck$2(this,q),rt=W.call(this),_defineProperty$2(_assertThisInitialized$3(rt),"length",0),_defineProperty$2(_assertThisInitialized$3(rt),"_ids",new _Set$2),rt._options=X||{},rt._listener=_bindInstanceProperty$1$2(tt=rt._onEvent).call(tt,_assertThisInitialized$3(rt)),rt.setData(K),rt}return _createClass$2(q,[{key:"idProp",get:function(){return this.getDataSet().idProp}},{key:"setData",value:function(X){if(this._data){this._data.off&&this._data.off("*",this._listener);var tt=this._data.getIds({filter:_filterInstanceProperty$2(this._options)}),rt=this._data.get(tt);this._ids.clear(),this.length=0,this._trigger("remove",{items:tt,oldData:rt})}if(X!=null){this._data=X;for(var ot=this._data.getIds({filter:_filterInstanceProperty$2(this._options)}),ut=0,yn=ot.length;utF.length)&&(W=F.length);for(var q=0,K=new Array(W);q"u"||!_Reflect$construct$2||_Reflect$construct$2.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$2(Boolean,[],function(){})),!0}catch{return!1}}function ensureFullItem(F,W){return F[W]==null&&(F[W]=v4$2()),F}var DataSet=function(F){_inherits$2(q,F);var W=_createSuper$1$2(q);function q(K,X){var tt;return _classCallCheck$2(this,q),tt=W.call(this),_defineProperty$2(_assertThisInitialized$3(tt),"_queue",null),K&&!_Array$isArray$3(K)&&(X=K,K=[]),tt._options=X||{},tt._data=new _Map$1,tt.length=0,tt._idProp=tt._options.fieldId||"id",K&&K.length&&tt.add(K),tt.setOptions(X),tt}return _createClass$2(q,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(X){X&&X.queue!==void 0&&(X.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=Queue.extend(this,{replace:["add","update","remove"]})),X.queue&&typeof X.queue=="object"&&this._queue.setOptions(X.queue)))}},{key:"add",value:function(X,tt){var rt=this,ot=[],ut;if(_Array$isArray$3(X)){var yn=_mapInstanceProperty$2(X).call(X,function(mo){return mo[rt._idProp]});if(_someInstanceProperty$2(yn).call(yn,function(mo){return rt._data.has(mo)}))throw new Error("A duplicate id was found in the parameter array.");for(var uo=0,po=X.length;uouo?1:ynot)&&(rt=uo,ot=po)}}catch(mo){ut.e(mo)}finally{ut.f()}return rt||null}},{key:"min",value:function(X){var tt,rt=null,ot=null,ut=_createForOfIteratorHelper$1$2(_valuesInstanceProperty$1(tt=this._data).call(tt)),yn;try{for(ut.s();!(yn=ut.n()).done;){var uo=yn.value,po=uo[X];typeof po=="number"&&(ot==null||po=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$9(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$9(F,W);var K=_sliceInstanceProperty$3(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1$2(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$9(F,W)}}function _arrayLikeToArray$9(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q"u"||!_Reflect$construct$2||_Reflect$construct$2.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$2(Boolean,[],function(){})),!0}catch{return!1}}var DataView$1=function(F){_inherits$2(q,F);var W=_createSuper$u(q);function q(K,X){var tt,rt;return _classCallCheck$2(this,q),rt=W.call(this),_defineProperty$2(_assertThisInitialized$3(rt),"length",0),_defineProperty$2(_assertThisInitialized$3(rt),"_ids",new _Set$2),rt._options=X||{},rt._listener=_bindInstanceProperty$1$2(tt=rt._onEvent).call(tt,_assertThisInitialized$3(rt)),rt.setData(K),rt}return _createClass$2(q,[{key:"idProp",get:function(){return this.getDataSet().idProp}},{key:"setData",value:function(X){if(this._data){this._data.off&&this._data.off("*",this._listener);var tt=this._data.getIds({filter:_filterInstanceProperty$2(this._options)}),rt=this._data.get(tt);this._ids.clear(),this.length=0,this._trigger("remove",{items:tt,oldData:rt})}if(X!=null){this._data=X;for(var ot=this._data.getIds({filter:_filterInstanceProperty$2(this._options)}),ut=0,yn=ot.length;ut"u"&&documentAll$2$1!==void 0,documentAll_1$1={all:documentAll$2$1,IS_HTMLDDA:IS_HTMLDDA$1},$documentAll$1$1=documentAll_1$1,documentAll$1$1=$documentAll$1$1.all,isCallable$i$1=$documentAll$1$1.IS_HTMLDDA?function(F){return typeof F=="function"||F===documentAll$1$1}:function(F){return typeof F=="function"},objectGetOwnPropertyDescriptor$1={},fails$u$1=fails$w,descriptors$1=!fails$u$1(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),NATIVE_BIND$2$1=functionBindNative$1,call$d$1=Function.prototype.call,functionCall$1=NATIVE_BIND$2$1?call$d$1.bind(call$d$1):function(){return call$d$1.apply(call$d$1,arguments)},objectPropertyIsEnumerable$1={},$propertyIsEnumerable$1$1={}.propertyIsEnumerable,getOwnPropertyDescriptor$9=Object.getOwnPropertyDescriptor,NASHORN_BUG$1=getOwnPropertyDescriptor$9&&!$propertyIsEnumerable$1$1.call({1:2},1);objectPropertyIsEnumerable$1.f=NASHORN_BUG$1?function F(W){var q=getOwnPropertyDescriptor$9(this,W);return!!q&&q.enumerable}:$propertyIsEnumerable$1$1;var createPropertyDescriptor$5$1=function(F,W){return{enumerable:!(F&1),configurable:!(F&2),writable:!(F&4),value:W}},uncurryThis$v$1=functionUncurryThis$1,fails$t$1=fails$w,classof$e=classofRaw$2$1,$Object$5=Object,split$1=uncurryThis$v$1("".split),indexedObject$1=fails$t$1(function(){return!$Object$5("z").propertyIsEnumerable(0)})?function(F){return classof$e(F)==="String"?split$1(F,""):$Object$5(F)}:$Object$5,isNullOrUndefined$6=function(F){return F==null},isNullOrUndefined$5$1=isNullOrUndefined$6,$TypeError$g$1=TypeError,requireObjectCoercible$5$1=function(F){if(isNullOrUndefined$5$1(F))throw new $TypeError$g$1("Can't call method on "+F);return F},IndexedObject$3$1=indexedObject$1,requireObjectCoercible$4$1=requireObjectCoercible$5$1,toIndexedObject$a$1=function(F){return IndexedObject$3$1(requireObjectCoercible$4$1(F))},isCallable$h$1=isCallable$i$1,$documentAll$2=documentAll_1$1,documentAll$3=$documentAll$2.all,isObject$j=$documentAll$2.IS_HTMLDDA?function(F){return typeof F=="object"?F!==null:isCallable$h$1(F)||F===documentAll$3}:function(F){return typeof F=="object"?F!==null:isCallable$h$1(F)},path$w={},path$v=path$w,global$m=global$n,isCallable$g$1=isCallable$i$1,aFunction$1=function(F){return isCallable$g$1(F)?F:void 0},getBuiltIn$c$1=function(F,W){return arguments.length<2?aFunction$1(path$v[F])||aFunction$1(global$m[F]):path$v[F]&&path$v[F][W]||global$m[F]&&global$m[F][W]},uncurryThis$u$1=functionUncurryThis$1,objectIsPrototypeOf$1=uncurryThis$u$1({}.isPrototypeOf),engineUserAgent$1=typeof navigator<"u"&&String(navigator.userAgent)||"",global$l$1=global$n,userAgent$2$1=engineUserAgent$1,process$2=global$l$1.process,Deno$2=global$l$1.Deno,versions$1=process$2&&process$2.versions||Deno$2&&Deno$2.version,v8$1=versions$1&&versions$1.v8,match$1,version$1;v8$1&&(match$1=v8$1.split("."),version$1=match$1[0]>0&&match$1[0]<4?1:+(match$1[0]+match$1[1]));!version$1&&userAgent$2$1&&(match$1=userAgent$2$1.match(/Edge\/(\d+)/),(!match$1||match$1[1]>=74)&&(match$1=userAgent$2$1.match(/Chrome\/(\d+)/),match$1&&(version$1=+match$1[1])));var engineV8Version$1=version$1,V8_VERSION$2$1=engineV8Version$1,fails$s$1=fails$w,global$k$1=global$n,$String$5$1=global$k$1.String,symbolConstructorDetection$1=!!Object.getOwnPropertySymbols&&!fails$s$1(function(){var F=Symbol("symbol detection");return!$String$5$1(F)||!(Object(F)instanceof Symbol)||!Symbol.sham&&V8_VERSION$2$1&&V8_VERSION$2$1<41}),NATIVE_SYMBOL$5$1=symbolConstructorDetection$1,useSymbolAsUid$1=NATIVE_SYMBOL$5$1&&!Symbol.sham&&typeof Symbol.iterator=="symbol",getBuiltIn$b$1=getBuiltIn$c$1,isCallable$f$1=isCallable$i$1,isPrototypeOf$k$1=objectIsPrototypeOf$1,USE_SYMBOL_AS_UID$1$1=useSymbolAsUid$1,$Object$4$1=Object,isSymbol$5$1=USE_SYMBOL_AS_UID$1$1?function(F){return typeof F=="symbol"}:function(F){var W=getBuiltIn$b$1("Symbol");return isCallable$f$1(W)&&isPrototypeOf$k$1(W.prototype,$Object$4$1(F))},$String$4$1=String,tryToString$6$1=function(F){try{return $String$4$1(F)}catch{return"Object"}},isCallable$e$1=isCallable$i$1,tryToString$5$1=tryToString$6$1,$TypeError$f$1=TypeError,aCallable$7$1=function(F){if(isCallable$e$1(F))return F;throw new $TypeError$f$1(tryToString$5$1(F)+" is not a function")},aCallable$6$1=aCallable$7$1,isNullOrUndefined$4$1=isNullOrUndefined$6,getMethod$3$1=function(F,W){var q=F[W];return isNullOrUndefined$4$1(q)?void 0:aCallable$6$1(q)},call$c$1=functionCall$1,isCallable$d$1=isCallable$i$1,isObject$i=isObject$j,$TypeError$e$1=TypeError,ordinaryToPrimitive$1$1=function(F,W){var q,K;if(W==="string"&&isCallable$d$1(q=F.toString)&&!isObject$i(K=call$c$1(q,F))||isCallable$d$1(q=F.valueOf)&&!isObject$i(K=call$c$1(q,F))||W!=="string"&&isCallable$d$1(q=F.toString)&&!isObject$i(K=call$c$1(q,F)))return K;throw new $TypeError$e$1("Can't convert object to primitive value")},shared$7$1={exports:{}},global$j$1=global$n,defineProperty$f$1=Object.defineProperty,defineGlobalProperty$1$1=function(F,W){try{defineProperty$f$1(global$j$1,F,{value:W,configurable:!0,writable:!0})}catch{global$j$1[F]=W}return W},global$i$1=global$n,defineGlobalProperty$2=defineGlobalProperty$1$1,SHARED$1="__core-js_shared__",store$3$1=global$i$1[SHARED$1]||defineGlobalProperty$2(SHARED$1,{}),sharedStore$1=store$3$1,store$2$1=sharedStore$1;(shared$7$1.exports=function(F,W){return store$2$1[F]||(store$2$1[F]=W!==void 0?W:{})})("versions",[]).push({version:"3.33.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedExports$1=shared$7$1.exports,requireObjectCoercible$3$1=requireObjectCoercible$5$1,$Object$3$1=Object,toObject$e$1=function(F){return $Object$3$1(requireObjectCoercible$3$1(F))},uncurryThis$t$1=functionUncurryThis$1,toObject$d$1=toObject$e$1,hasOwnProperty$1=uncurryThis$t$1({}.hasOwnProperty),hasOwnProperty_1$1=Object.hasOwn||function F(W,q){return hasOwnProperty$1(toObject$d$1(W),q)},uncurryThis$s$1=functionUncurryThis$1,id$2=0,postfix$1=Math.random(),toString$b$1=uncurryThis$s$1(1 .toString),uid$4$1=function(F){return"Symbol("+(F===void 0?"":F)+")_"+toString$b$1(++id$2+postfix$1,36)},global$h$1=global$n,shared$6$1=sharedExports$1,hasOwn$h=hasOwnProperty_1$1,uid$3$1=uid$4$1,NATIVE_SYMBOL$4$1=symbolConstructorDetection$1,USE_SYMBOL_AS_UID$2=useSymbolAsUid$1,Symbol$5$1=global$h$1.Symbol,WellKnownSymbolsStore$2$1=shared$6$1("wks"),createWellKnownSymbol$1=USE_SYMBOL_AS_UID$2?Symbol$5$1.for||Symbol$5$1:Symbol$5$1&&Symbol$5$1.withoutSetter||uid$3$1,wellKnownSymbol$m$1=function(F){return hasOwn$h(WellKnownSymbolsStore$2$1,F)||(WellKnownSymbolsStore$2$1[F]=NATIVE_SYMBOL$4$1&&hasOwn$h(Symbol$5$1,F)?Symbol$5$1[F]:createWellKnownSymbol$1("Symbol."+F)),WellKnownSymbolsStore$2$1[F]},call$b$1=functionCall$1,isObject$h$1=isObject$j,isSymbol$4$1=isSymbol$5$1,getMethod$2$1=getMethod$3$1,ordinaryToPrimitive$2=ordinaryToPrimitive$1$1,wellKnownSymbol$l$1=wellKnownSymbol$m$1,$TypeError$d$1=TypeError,TO_PRIMITIVE$1=wellKnownSymbol$l$1("toPrimitive"),toPrimitive$6$1=function(F,W){if(!isObject$h$1(F)||isSymbol$4$1(F))return F;var q=getMethod$2$1(F,TO_PRIMITIVE$1),K;if(q){if(W===void 0&&(W="default"),K=call$b$1(q,F,W),!isObject$h$1(K)||isSymbol$4$1(K))return K;throw new $TypeError$d$1("Can't convert object to primitive value")}return W===void 0&&(W="number"),ordinaryToPrimitive$2(F,W)},toPrimitive$5$1=toPrimitive$6$1,isSymbol$3$1=isSymbol$5$1,toPropertyKey$4$1=function(F){var W=toPrimitive$5$1(F,"string");return isSymbol$3$1(W)?W:W+""},global$g$1=global$n,isObject$g$1=isObject$j,document$1$1=global$g$1.document,EXISTS$1$1=isObject$g$1(document$1$1)&&isObject$g$1(document$1$1.createElement),documentCreateElement$1$1=function(F){return EXISTS$1$1?document$1$1.createElement(F):{}},DESCRIPTORS$h$1=descriptors$1,fails$r$1=fails$w,createElement$1=documentCreateElement$1$1,ie8DomDefine$1=!DESCRIPTORS$h$1&&!fails$r$1(function(){return Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a!==7}),DESCRIPTORS$g$1=descriptors$1,call$a$1=functionCall$1,propertyIsEnumerableModule$2$1=objectPropertyIsEnumerable$1,createPropertyDescriptor$4$1=createPropertyDescriptor$5$1,toIndexedObject$9$1=toIndexedObject$a$1,toPropertyKey$3$1=toPropertyKey$4$1,hasOwn$g=hasOwnProperty_1$1,IE8_DOM_DEFINE$1$1=ie8DomDefine$1,$getOwnPropertyDescriptor$2$1=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor$1.f=DESCRIPTORS$g$1?$getOwnPropertyDescriptor$2$1:function F(W,q){if(W=toIndexedObject$9$1(W),q=toPropertyKey$3$1(q),IE8_DOM_DEFINE$1$1)try{return $getOwnPropertyDescriptor$2$1(W,q)}catch{}if(hasOwn$g(W,q))return createPropertyDescriptor$4$1(!call$a$1(propertyIsEnumerableModule$2$1.f,W,q),W[q])};var fails$q$1=fails$w,isCallable$c$1=isCallable$i$1,replacement$1=/#|\.prototype\./,isForced$1$1=function(F,W){var q=data$1[normalize$1(F)];return q===POLYFILL$1?!0:q===NATIVE$1?!1:isCallable$c$1(W)?fails$q$1(W):!!W},normalize$1=isForced$1$1.normalize=function(F){return String(F).replace(replacement$1,".").toLowerCase()},data$1=isForced$1$1.data={},NATIVE$1=isForced$1$1.NATIVE="N",POLYFILL$1=isForced$1$1.POLYFILL="P",isForced_1$1=isForced$1$1,uncurryThis$r$1=functionUncurryThisClause$1,aCallable$5$1=aCallable$7$1,NATIVE_BIND$1$1=functionBindNative$1,bind$e$1=uncurryThis$r$1(uncurryThis$r$1.bind),functionBindContext$1=function(F,W){return aCallable$5$1(F),W===void 0?F:NATIVE_BIND$1$1?bind$e$1(F,W):function(){return F.apply(W,arguments)}},objectDefineProperty$1={},DESCRIPTORS$f$1=descriptors$1,fails$p$1=fails$w,v8PrototypeDefineBug$1=DESCRIPTORS$f$1&&fails$p$1(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),isObject$f$1=isObject$j,$String$3$1=String,$TypeError$c$1=TypeError,anObject$d=function(F){if(isObject$f$1(F))return F;throw new $TypeError$c$1($String$3$1(F)+" is not an object")},DESCRIPTORS$e$1=descriptors$1,IE8_DOM_DEFINE$2=ie8DomDefine$1,V8_PROTOTYPE_DEFINE_BUG$1$1=v8PrototypeDefineBug$1,anObject$c=anObject$d,toPropertyKey$2$1=toPropertyKey$4$1,$TypeError$b$1=TypeError,$defineProperty$1$1=Object.defineProperty,$getOwnPropertyDescriptor$1$1=Object.getOwnPropertyDescriptor,ENUMERABLE$1="enumerable",CONFIGURABLE$1$1="configurable",WRITABLE$1="writable";objectDefineProperty$1.f=DESCRIPTORS$e$1?V8_PROTOTYPE_DEFINE_BUG$1$1?function F(W,q,K){if(anObject$c(W),q=toPropertyKey$2$1(q),anObject$c(K),typeof W=="function"&&q==="prototype"&&"value"in K&&WRITABLE$1 in K&&!K[WRITABLE$1]){var X=$getOwnPropertyDescriptor$1$1(W,q);X&&X[WRITABLE$1]&&(W[q]=K.value,K={configurable:CONFIGURABLE$1$1 in K?K[CONFIGURABLE$1$1]:X[CONFIGURABLE$1$1],enumerable:ENUMERABLE$1 in K?K[ENUMERABLE$1]:X[ENUMERABLE$1],writable:!1})}return $defineProperty$1$1(W,q,K)}:$defineProperty$1$1:function F(W,q,K){if(anObject$c(W),q=toPropertyKey$2$1(q),anObject$c(K),IE8_DOM_DEFINE$2)try{return $defineProperty$1$1(W,q,K)}catch{}if("get"in K||"set"in K)throw new $TypeError$b$1("Accessors not supported");return"value"in K&&(W[q]=K.value),W};var DESCRIPTORS$d$1=descriptors$1,definePropertyModule$3$1=objectDefineProperty$1,createPropertyDescriptor$3$1=createPropertyDescriptor$5$1,createNonEnumerableProperty$6$1=DESCRIPTORS$d$1?function(F,W,q){return definePropertyModule$3$1.f(F,W,createPropertyDescriptor$3$1(1,q))}:function(F,W,q){return F[W]=q,F},global$f$1=global$n,apply$4$1=functionApply$1,uncurryThis$q$1=functionUncurryThisClause$1,isCallable$b$1=isCallable$i$1,getOwnPropertyDescriptor$8=objectGetOwnPropertyDescriptor$1.f,isForced$2=isForced_1$1,path$u=path$w,bind$d$1=functionBindContext$1,createNonEnumerableProperty$5$1=createNonEnumerableProperty$6$1,hasOwn$f=hasOwnProperty_1$1,wrapConstructor$1=function(F){var W=function(q,K,X){if(this instanceof W){switch(arguments.length){case 0:return new F;case 1:return new F(q);case 2:return new F(q,K)}return new F(q,K,X)}return apply$4$1(F,this,arguments)};return W.prototype=F.prototype,W},_export$1=function(F,W){var q=F.target,K=F.global,X=F.stat,tt=F.proto,rt=K?global$f$1:X?global$f$1[q]:(global$f$1[q]||{}).prototype,ot=K?path$u:path$u[q]||createNonEnumerableProperty$5$1(path$u,q,{})[q],ut=ot.prototype,yn,uo,po,mo,wo,lf,yf,cf,vf;for(mo in W)yn=isForced$2(K?mo:q+(X?".":"#")+mo,F.forced),uo=!yn&&rt&&hasOwn$f(rt,mo),lf=ot[mo],uo&&(F.dontCallGetSet?(vf=getOwnPropertyDescriptor$8(rt,mo),yf=vf&&vf.value):yf=rt[mo]),wo=uo&&yf?yf:W[mo],!(uo&&typeof lf==typeof wo)&&(F.bind&&uo?cf=bind$d$1(wo,global$f$1):F.wrap&&uo?cf=wrapConstructor$1(wo):tt&&isCallable$b$1(wo)?cf=uncurryThis$q$1(wo):cf=wo,(F.sham||wo&&wo.sham||lf&&lf.sham)&&createNonEnumerableProperty$5$1(cf,"sham",!0),createNonEnumerableProperty$5$1(ot,mo,cf),tt&&(po=q+"Prototype",hasOwn$f(path$u,po)||createNonEnumerableProperty$5$1(path$u,po,{}),createNonEnumerableProperty$5$1(path$u[po],mo,wo),F.real&&ut&&(yn||!ut[mo])&&createNonEnumerableProperty$5$1(ut,mo,wo)))},ceil$1=Math.ceil,floor$1$1=Math.floor,mathTrunc$1=Math.trunc||function F(W){var q=+W;return(q>0?floor$1$1:ceil$1)(q)},trunc$1=mathTrunc$1,toIntegerOrInfinity$4$1=function(F){var W=+F;return W!==W||W===0?0:trunc$1(W)},toIntegerOrInfinity$3$1=toIntegerOrInfinity$4$1,max$3$1=Math.max,min$2$1=Math.min,toAbsoluteIndex$5$1=function(F,W){var q=toIntegerOrInfinity$3$1(F);return q<0?max$3$1(q+W,0):min$2$1(q,W)},toIntegerOrInfinity$2$1=toIntegerOrInfinity$4$1,min$1$1=Math.min,toLength$1$1=function(F){return F>0?min$1$1(toIntegerOrInfinity$2$1(F),9007199254740991):0},toLength$2=toLength$1$1,lengthOfArrayLike$c$1=function(F){return toLength$2(F.length)},toIndexedObject$8$1=toIndexedObject$a$1,toAbsoluteIndex$4$1=toAbsoluteIndex$5$1,lengthOfArrayLike$b$1=lengthOfArrayLike$c$1,createMethod$4$1=function(F){return function(W,q,K){var X=toIndexedObject$8$1(W),tt=lengthOfArrayLike$b$1(X),rt=toAbsoluteIndex$4$1(K,tt),ot;if(F&&q!==q){for(;tt>rt;)if(ot=X[rt++],ot!==ot)return!0}else for(;tt>rt;rt++)if((F||rt in X)&&X[rt]===q)return F||rt||0;return!F&&-1}},arrayIncludes$1={includes:createMethod$4$1(!0),indexOf:createMethod$4$1(!1)},hiddenKeys$6$1={},uncurryThis$p$1=functionUncurryThis$1,hasOwn$e$1=hasOwnProperty_1$1,toIndexedObject$7$1=toIndexedObject$a$1,indexOf$4$1=arrayIncludes$1.indexOf,hiddenKeys$5$1=hiddenKeys$6$1,push$b$1=uncurryThis$p$1([].push),objectKeysInternal$1=function(F,W){var q=toIndexedObject$7$1(F),K=0,X=[],tt;for(tt in q)!hasOwn$e$1(hiddenKeys$5$1,tt)&&hasOwn$e$1(q,tt)&&push$b$1(X,tt);for(;W.length>K;)hasOwn$e$1(q,tt=W[K++])&&(~indexOf$4$1(X,tt)||push$b$1(X,tt));return X},enumBugKeys$3$1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1$1=objectKeysInternal$1,enumBugKeys$2$1=enumBugKeys$3$1,objectKeys$3$1=Object.keys||function F(W){return internalObjectKeys$1$1(W,enumBugKeys$2$1)},objectGetOwnPropertySymbols$1={};objectGetOwnPropertySymbols$1.f=Object.getOwnPropertySymbols;var DESCRIPTORS$c$1=descriptors$1,uncurryThis$o$1=functionUncurryThis$1,call$9$1=functionCall$1,fails$o$1=fails$w,objectKeys$2$1=objectKeys$3$1,getOwnPropertySymbolsModule$3$1=objectGetOwnPropertySymbols$1,propertyIsEnumerableModule$1$1=objectPropertyIsEnumerable$1,toObject$c$1=toObject$e$1,IndexedObject$2$1=indexedObject$1,$assign$1=Object.assign,defineProperty$e$1=Object.defineProperty,concat$6$1=uncurryThis$o$1([].concat),objectAssign$1=!$assign$1||fails$o$1(function(){if(DESCRIPTORS$c$1&&$assign$1({b:1},$assign$1(defineProperty$e$1({},"a",{enumerable:!0,get:function(){defineProperty$e$1(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var F={},W={},q=Symbol("assign detection"),K="abcdefghijklmnopqrst";return F[q]=7,K.split("").forEach(function(X){W[X]=X}),$assign$1({},F)[q]!==7||objectKeys$2$1($assign$1({},W)).join("")!==K})?function F(W,q){for(var K=toObject$c$1(W),X=arguments.length,tt=1,rt=getOwnPropertySymbolsModule$3$1.f,ot=propertyIsEnumerableModule$1$1.f;X>tt;)for(var ut=IndexedObject$2$1(arguments[tt++]),yn=rt?concat$6$1(objectKeys$2$1(ut),rt(ut)):objectKeys$2$1(ut),uo=yn.length,po=0,mo;uo>po;)mo=yn[po++],(!DESCRIPTORS$c$1||call$9$1(ot,ut,mo))&&(K[mo]=ut[mo]);return K}:$assign$1,$$O$1=_export$1,assign$5$1=objectAssign$1;$$O$1({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign$5$1},{assign:assign$5$1});var path$t=path$w,assign$4$1=path$t.Object.assign,parent$1b=assign$4$1,assign$3$1=parent$1b,assign$2$1=assign$3$1,_Object$assign$1=getDefaultExportFromCjs$1(assign$2$1),uncurryThis$n$1=functionUncurryThis$1,arraySlice$5$1=uncurryThis$n$1([].slice),uncurryThis$m$1=functionUncurryThis$1,aCallable$4$1=aCallable$7$1,isObject$e$1=isObject$j,hasOwn$d$1=hasOwnProperty_1$1,arraySlice$4$1=arraySlice$5$1,NATIVE_BIND$5=functionBindNative$1,$Function$1=Function,concat$5$1=uncurryThis$m$1([].concat),join$1=uncurryThis$m$1([].join),factories$1={},construct$4$1=function(F,W,q){if(!hasOwn$d$1(factories$1,W)){for(var K=[],X=0;X=.1;)lf=+tt[po++%rt],lf>uo&&(lf=uo),wo=Math.sqrt(lf*lf/(1+yn*yn)),wo=ot<0?-wo:wo,W+=wo,q+=yn*wo,mo===!0?F.lineTo(W,q):F.moveTo(W,q),uo-=lf,mo=!mo}function drawHexagon(F,W,q,K){F.beginPath();var X=6,tt=Math.PI*2/X;F.moveTo(W+K,q);for(var rt=1;rt1?q-1:0),X=1;X=tt?F?"":void 0:(rt=charCodeAt$1$1(K,X),rt<55296||rt>56319||X+1===tt||(ot=charCodeAt$1$1(K,X+1))<56320||ot>57343?F?charAt$3$1(K,X):rt:F?stringSlice$2(K,X,X+2):(rt-55296<<10)+(ot-56320)+65536)}},stringMultibyte$1={codeAt:createMethod$3$1(!1),charAt:createMethod$3$1(!0)},global$e$1=global$n,isCallable$9$1=isCallable$i$1,WeakMap$1$1=global$e$1.WeakMap,weakMapBasicDetection$1=isCallable$9$1(WeakMap$1$1)&&/native code/.test(String(WeakMap$1$1)),shared$5$1=sharedExports$1,uid$2$1=uid$4$1,keys$3$1=shared$5$1("keys"),sharedKey$4$1=function(F){return keys$3$1[F]||(keys$3$1[F]=uid$2$1(F))},NATIVE_WEAK_MAP$1=weakMapBasicDetection$1,global$d$1=global$n,isObject$d$1=isObject$j,createNonEnumerableProperty$4$1=createNonEnumerableProperty$6$1,hasOwn$c$1=hasOwnProperty_1$1,shared$4$1=sharedStore$1,sharedKey$3$1=sharedKey$4$1,hiddenKeys$4$1=hiddenKeys$6$1,OBJECT_ALREADY_INITIALIZED$1="Object already initialized",TypeError$2$1=global$d$1.TypeError,WeakMap$3=global$d$1.WeakMap,set$3$1,get$6,has$1,enforce$1=function(F){return has$1(F)?get$6(F):set$3$1(F,{})},getterFor$1=function(F){return function(W){var q;if(!isObject$d$1(W)||(q=get$6(W)).type!==F)throw new TypeError$2$1("Incompatible receiver, "+F+" required");return q}};if(NATIVE_WEAK_MAP$1||shared$4$1.state){var store$1$1=shared$4$1.state||(shared$4$1.state=new WeakMap$3);store$1$1.get=store$1$1.get,store$1$1.has=store$1$1.has,store$1$1.set=store$1$1.set,set$3$1=function(F,W){if(store$1$1.has(F))throw new TypeError$2$1(OBJECT_ALREADY_INITIALIZED$1);return W.facade=F,store$1$1.set(F,W),W},get$6=function(F){return store$1$1.get(F)||{}},has$1=function(F){return store$1$1.has(F)}}else{var STATE$1=sharedKey$3$1("state");hiddenKeys$4$1[STATE$1]=!0,set$3$1=function(F,W){if(hasOwn$c$1(F,STATE$1))throw new TypeError$2$1(OBJECT_ALREADY_INITIALIZED$1);return W.facade=F,createNonEnumerableProperty$4$1(F,STATE$1,W),W},get$6=function(F){return hasOwn$c$1(F,STATE$1)?F[STATE$1]:{}},has$1=function(F){return hasOwn$c$1(F,STATE$1)}}var internalState$1={set:set$3$1,get:get$6,has:has$1,enforce:enforce$1,getterFor:getterFor$1},DESCRIPTORS$b$1=descriptors$1,hasOwn$b$1=hasOwnProperty_1$1,FunctionPrototype$1$1=Function.prototype,getDescriptor$1=DESCRIPTORS$b$1&&Object.getOwnPropertyDescriptor,EXISTS$2=hasOwn$b$1(FunctionPrototype$1$1,"name"),PROPER$1=EXISTS$2&&(function F(){}).name==="something",CONFIGURABLE$2=EXISTS$2&&(!DESCRIPTORS$b$1||DESCRIPTORS$b$1&&getDescriptor$1(FunctionPrototype$1$1,"name").configurable),functionName$1={EXISTS:EXISTS$2,PROPER:PROPER$1,CONFIGURABLE:CONFIGURABLE$2},objectDefineProperties$1={},DESCRIPTORS$a$1=descriptors$1,V8_PROTOTYPE_DEFINE_BUG$2=v8PrototypeDefineBug$1,definePropertyModule$2$1=objectDefineProperty$1,anObject$b$1=anObject$d,toIndexedObject$6$1=toIndexedObject$a$1,objectKeys$1$1=objectKeys$3$1;objectDefineProperties$1.f=DESCRIPTORS$a$1&&!V8_PROTOTYPE_DEFINE_BUG$2?Object.defineProperties:function F(W,q){anObject$b$1(W);for(var K=toIndexedObject$6$1(q),X=objectKeys$1$1(q),tt=X.length,rt=0,ot;tt>rt;)definePropertyModule$2$1.f(W,ot=X[rt++],K[ot]);return W};var getBuiltIn$a$1=getBuiltIn$c$1,html$1$1=getBuiltIn$a$1("document","documentElement"),anObject$a$1=anObject$d,definePropertiesModule$1$1=objectDefineProperties$1,enumBugKeys$1$1=enumBugKeys$3$1,hiddenKeys$3$1=hiddenKeys$6$1,html$2=html$1$1,documentCreateElement$2=documentCreateElement$1$1,sharedKey$2$1=sharedKey$4$1,GT$1=">",LT$1="<",PROTOTYPE$1$1="prototype",SCRIPT$1="script",IE_PROTO$1$1=sharedKey$2$1("IE_PROTO"),EmptyConstructor$1=function(){},scriptTag$1=function(F){return LT$1+SCRIPT$1+GT$1+F+LT$1+"/"+SCRIPT$1+GT$1},NullProtoObjectViaActiveX$1=function(F){F.write(scriptTag$1("")),F.close();var W=F.parentWindow.Object;return F=null,W},NullProtoObjectViaIFrame$1=function(){var F=documentCreateElement$2("iframe"),W="java"+SCRIPT$1+":",q;return F.style.display="none",html$2.appendChild(F),F.src=String(W),q=F.contentWindow.document,q.open(),q.write(scriptTag$1("document.F=Object")),q.close(),q.F},activeXDocument$1,NullProtoObject$1=function(){try{activeXDocument$1=new ActiveXObject("htmlfile")}catch{}NullProtoObject$1=typeof document<"u"?document.domain&&activeXDocument$1?NullProtoObjectViaActiveX$1(activeXDocument$1):NullProtoObjectViaIFrame$1():NullProtoObjectViaActiveX$1(activeXDocument$1);for(var F=enumBugKeys$1$1.length;F--;)delete NullProtoObject$1[PROTOTYPE$1$1][enumBugKeys$1$1[F]];return NullProtoObject$1()};hiddenKeys$3$1[IE_PROTO$1$1]=!0;var objectCreate$1=Object.create||function F(W,q){var K;return W!==null?(EmptyConstructor$1[PROTOTYPE$1$1]=anObject$a$1(W),K=new EmptyConstructor$1,EmptyConstructor$1[PROTOTYPE$1$1]=null,K[IE_PROTO$1$1]=W):K=NullProtoObject$1(),q===void 0?K:definePropertiesModule$1$1.f(K,q)},fails$n$1=fails$w,correctPrototypeGetter$1=!fails$n$1(function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype}),hasOwn$a$1=hasOwnProperty_1$1,isCallable$8$1=isCallable$i$1,toObject$b$1=toObject$e$1,sharedKey$1$1=sharedKey$4$1,CORRECT_PROTOTYPE_GETTER$1$1=correctPrototypeGetter$1,IE_PROTO$2=sharedKey$1$1("IE_PROTO"),$Object$1$1=Object,ObjectPrototype$2$1=$Object$1$1.prototype,objectGetPrototypeOf$2=CORRECT_PROTOTYPE_GETTER$1$1?$Object$1$1.getPrototypeOf:function(F){var W=toObject$b$1(F);if(hasOwn$a$1(W,IE_PROTO$2))return W[IE_PROTO$2];var q=W.constructor;return isCallable$8$1(q)&&W instanceof q?q.prototype:W instanceof $Object$1$1?ObjectPrototype$2$1:null},createNonEnumerableProperty$3$1=createNonEnumerableProperty$6$1,defineBuiltIn$5$1=function(F,W,q,K){return K&&K.enumerable?F[W]=q:createNonEnumerableProperty$3$1(F,W,q),F},fails$m$1=fails$w,isCallable$7$1=isCallable$i$1,isObject$c$1=isObject$j,create$a$1=objectCreate$1,getPrototypeOf$8=objectGetPrototypeOf$2,defineBuiltIn$4$1=defineBuiltIn$5$1,wellKnownSymbol$i$1=wellKnownSymbol$m$1,ITERATOR$6$1=wellKnownSymbol$i$1("iterator"),BUGGY_SAFARI_ITERATORS$1$1=!1,IteratorPrototype$1$1,PrototypeOfArrayIteratorPrototype$1,arrayIterator$1;[].keys&&(arrayIterator$1=[].keys(),"next"in arrayIterator$1?(PrototypeOfArrayIteratorPrototype$1=getPrototypeOf$8(getPrototypeOf$8(arrayIterator$1)),PrototypeOfArrayIteratorPrototype$1!==Object.prototype&&(IteratorPrototype$1$1=PrototypeOfArrayIteratorPrototype$1)):BUGGY_SAFARI_ITERATORS$1$1=!0);var NEW_ITERATOR_PROTOTYPE$1=!isObject$c$1(IteratorPrototype$1$1)||fails$m$1(function(){var F={};return IteratorPrototype$1$1[ITERATOR$6$1].call(F)!==F});NEW_ITERATOR_PROTOTYPE$1?IteratorPrototype$1$1={}:IteratorPrototype$1$1=create$a$1(IteratorPrototype$1$1);isCallable$7$1(IteratorPrototype$1$1[ITERATOR$6$1])||defineBuiltIn$4$1(IteratorPrototype$1$1,ITERATOR$6$1,function(){return this});var iteratorsCore$1={IteratorPrototype:IteratorPrototype$1$1,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1$1},TO_STRING_TAG_SUPPORT$1$1=toStringTagSupport$1,classof$b$1=classof$d$1,objectToString$1=TO_STRING_TAG_SUPPORT$1$1?{}.toString:function F(){return"[object "+classof$b$1(this)+"]"},TO_STRING_TAG_SUPPORT$3=toStringTagSupport$1,defineProperty$d$1=objectDefineProperty$1.f,createNonEnumerableProperty$2$1=createNonEnumerableProperty$6$1,hasOwn$9$1=hasOwnProperty_1$1,toString$8$1=objectToString$1,wellKnownSymbol$h$1=wellKnownSymbol$m$1,TO_STRING_TAG$1$1=wellKnownSymbol$h$1("toStringTag"),setToStringTag$6$1=function(F,W,q,K){if(F){var X=q?F:F.prototype;hasOwn$9$1(X,TO_STRING_TAG$1$1)||defineProperty$d$1(X,TO_STRING_TAG$1$1,{configurable:!0,value:W}),K&&!TO_STRING_TAG_SUPPORT$3&&createNonEnumerableProperty$2$1(X,"toString",toString$8$1)}},iterators$1={},IteratorPrototype$2=iteratorsCore$1.IteratorPrototype,create$9$1=objectCreate$1,createPropertyDescriptor$2$1=createPropertyDescriptor$5$1,setToStringTag$5$1=setToStringTag$6$1,Iterators$5$1=iterators$1,returnThis$1$1=function(){return this},iteratorCreateConstructor$1=function(F,W,q,K){var X=W+" Iterator";return F.prototype=create$9$1(IteratorPrototype$2,{next:createPropertyDescriptor$2$1(+!K,q)}),setToStringTag$5$1(F,X,!1,!0),Iterators$5$1[X]=returnThis$1$1,F},uncurryThis$k$1=functionUncurryThis$1,aCallable$3$1=aCallable$7$1,functionUncurryThisAccessor$1=function(F,W,q){try{return uncurryThis$k$1(aCallable$3$1(Object.getOwnPropertyDescriptor(F,W)[q]))}catch{}},isCallable$6$1=isCallable$i$1,$String$1$1=String,$TypeError$a$1=TypeError,aPossiblePrototype$1$1=function(F){if(typeof F=="object"||isCallable$6$1(F))return F;throw new $TypeError$a$1("Can't set "+$String$1$1(F)+" as a prototype")},uncurryThisAccessor$1=functionUncurryThisAccessor$1,anObject$9$1=anObject$d,aPossiblePrototype$2=aPossiblePrototype$1$1,objectSetPrototypeOf$1=Object.setPrototypeOf||("__proto__"in{}?function(){var F=!1,W={},q;try{q=uncurryThisAccessor$1(Object.prototype,"__proto__","set"),q(W,[]),F=W instanceof Array}catch{}return function(X,tt){return anObject$9$1(X),aPossiblePrototype$2(tt),F?q(X,tt):X.__proto__=tt,X}}():void 0),$$M$1=_export$1,call$8$1=functionCall$1,FunctionName$1=functionName$1,createIteratorConstructor$1=iteratorCreateConstructor$1,getPrototypeOf$7$1=objectGetPrototypeOf$2,setToStringTag$4$1=setToStringTag$6$1,defineBuiltIn$3$1=defineBuiltIn$5$1,wellKnownSymbol$g$1=wellKnownSymbol$m$1,Iterators$4$1=iterators$1,IteratorsCore$1=iteratorsCore$1,PROPER_FUNCTION_NAME$1=FunctionName$1.PROPER,BUGGY_SAFARI_ITERATORS$2=IteratorsCore$1.BUGGY_SAFARI_ITERATORS,ITERATOR$5$1=wellKnownSymbol$g$1("iterator"),KEYS$1="keys",VALUES$1="values",ENTRIES$1="entries",returnThis$2=function(){return this},iteratorDefine$1=function(F,W,q,K,X,tt,rt){createIteratorConstructor$1(q,W,K);var ot=function(vf){if(vf===X&&mo)return mo;if(!BUGGY_SAFARI_ITERATORS$2&&vf&&vf in uo)return uo[vf];switch(vf){case KEYS$1:return function(){return new q(this,vf)};case VALUES$1:return function(){return new q(this,vf)};case ENTRIES$1:return function(){return new q(this,vf)}}return function(){return new q(this)}},ut=W+" Iterator",yn=!1,uo=F.prototype,po=uo[ITERATOR$5$1]||uo["@@iterator"]||X&&uo[X],mo=!BUGGY_SAFARI_ITERATORS$2&&po||ot(X),wo=W==="Array"&&uo.entries||po,lf,yf,cf;if(wo&&(lf=getPrototypeOf$7$1(wo.call(new F)),lf!==Object.prototype&&lf.next&&(setToStringTag$4$1(lf,ut,!0,!0),Iterators$4$1[ut]=returnThis$2)),PROPER_FUNCTION_NAME$1&&X===VALUES$1&&po&&po.name!==VALUES$1&&(yn=!0,mo=function(){return call$8$1(po,this)}),X)if(yf={values:ot(VALUES$1),keys:tt?mo:ot(KEYS$1),entries:ot(ENTRIES$1)},rt)for(cf in yf)(BUGGY_SAFARI_ITERATORS$2||yn||!(cf in uo))&&defineBuiltIn$3$1(uo,cf,yf[cf]);else $$M$1({target:W,proto:!0,forced:BUGGY_SAFARI_ITERATORS$2||yn},yf);return rt&&uo[ITERATOR$5$1]!==mo&&defineBuiltIn$3$1(uo,ITERATOR$5$1,mo,{name:X}),Iterators$4$1[W]=mo,yf},createIterResultObject$3$1=function(F,W){return{value:F,done:W}},charAt$2$1=stringMultibyte$1.charAt,toString$7$1=toString$a$1,InternalStateModule$5=internalState$1,defineIterator$2$1=iteratorDefine$1,createIterResultObject$2$1=createIterResultObject$3$1,STRING_ITERATOR$1="String Iterator",setInternalState$5=InternalStateModule$5.set,getInternalState$2$1=InternalStateModule$5.getterFor(STRING_ITERATOR$1);defineIterator$2$1(String,"String",function(F){setInternalState$5(this,{type:STRING_ITERATOR$1,string:toString$7$1(F),index:0})},function F(){var W=getInternalState$2$1(this),q=W.string,K=W.index,X;return K>=q.length?createIterResultObject$2$1(void 0,!0):(X=charAt$2$1(q,K),W.index+=X.length,createIterResultObject$2$1(X,!1))});var call$7$1=functionCall$1,anObject$8$1=anObject$d,getMethod$1$1=getMethod$3$1,iteratorClose$2$1=function(F,W,q){var K,X;anObject$8$1(F);try{if(K=getMethod$1$1(F,"return"),!K){if(W==="throw")throw q;return q}K=call$7$1(K,F)}catch(tt){X=!0,K=tt}if(W==="throw")throw q;if(X)throw K;return anObject$8$1(K),q},anObject$7$1=anObject$d,iteratorClose$1$1=iteratorClose$2$1,callWithSafeIterationClosing$1$1=function(F,W,q,K){try{return K?W(anObject$7$1(q)[0],q[1]):W(q)}catch(X){iteratorClose$1$1(F,"throw",X)}},wellKnownSymbol$f$1=wellKnownSymbol$m$1,Iterators$3$1=iterators$1,ITERATOR$4$1=wellKnownSymbol$f$1("iterator"),ArrayPrototype$g$1=Array.prototype,isArrayIteratorMethod$2$1=function(F){return F!==void 0&&(Iterators$3$1.Array===F||ArrayPrototype$g$1[ITERATOR$4$1]===F)},uncurryThis$j$1=functionUncurryThis$1,isCallable$5$1=isCallable$i$1,store$4=sharedStore$1,functionToString$1=uncurryThis$j$1(Function.toString);isCallable$5$1(store$4.inspectSource)||(store$4.inspectSource=function(F){return functionToString$1(F)});var inspectSource$1$1=store$4.inspectSource,uncurryThis$i$1=functionUncurryThis$1,fails$l$1=fails$w,isCallable$4$1=isCallable$i$1,classof$a$1=classof$d$1,getBuiltIn$9$1=getBuiltIn$c$1,inspectSource$2=inspectSource$1$1,noop$1=function(){},empty$1=[],construct$3$1=getBuiltIn$9$1("Reflect","construct"),constructorRegExp$1=/^\s*(?:class|function)\b/,exec$2$1=uncurryThis$i$1(constructorRegExp$1.exec),INCORRECT_TO_STRING$1=!constructorRegExp$1.test(noop$1),isConstructorModern$1=function F(W){if(!isCallable$4$1(W))return!1;try{return construct$3$1(noop$1,empty$1,W),!0}catch{return!1}},isConstructorLegacy$1=function F(W){if(!isCallable$4$1(W))return!1;switch(classof$a$1(W)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING$1||!!exec$2$1(constructorRegExp$1,inspectSource$2(W))}catch{return!0}};isConstructorLegacy$1.sham=!0;var isConstructor$4$1=!construct$3$1||fails$l$1(function(){var F;return isConstructorModern$1(isConstructorModern$1.call)||!isConstructorModern$1(Object)||!isConstructorModern$1(function(){F=!0})||F})?isConstructorLegacy$1:isConstructorModern$1,toPropertyKey$1$1=toPropertyKey$4$1,definePropertyModule$1$1=objectDefineProperty$1,createPropertyDescriptor$1$1=createPropertyDescriptor$5$1,createProperty$6$1=function(F,W,q){var K=toPropertyKey$1$1(W);K in F?definePropertyModule$1$1.f(F,K,createPropertyDescriptor$1$1(0,q)):F[K]=q},classof$9$1=classof$d$1,getMethod$4=getMethod$3$1,isNullOrUndefined$3$1=isNullOrUndefined$6,Iterators$2$1=iterators$1,wellKnownSymbol$e$1=wellKnownSymbol$m$1,ITERATOR$3$1=wellKnownSymbol$e$1("iterator"),getIteratorMethod$9$1=function(F){if(!isNullOrUndefined$3$1(F))return getMethod$4(F,ITERATOR$3$1)||getMethod$4(F,"@@iterator")||Iterators$2$1[classof$9$1(F)]},call$6$1=functionCall$1,aCallable$2$1=aCallable$7$1,anObject$6$1=anObject$d,tryToString$4$1=tryToString$6$1,getIteratorMethod$8$1=getIteratorMethod$9$1,$TypeError$9$1=TypeError,getIterator$2$1=function(F,W){var q=arguments.length<2?getIteratorMethod$8$1(F):W;if(aCallable$2$1(q))return anObject$6$1(call$6$1(q,F));throw new $TypeError$9$1(tryToString$4$1(F)+" is not iterable")},bind$7$1=functionBindContext$1,call$5$1=functionCall$1,toObject$a$1=toObject$e$1,callWithSafeIterationClosing$2=callWithSafeIterationClosing$1$1,isArrayIteratorMethod$1$1=isArrayIteratorMethod$2$1,isConstructor$3$1=isConstructor$4$1,lengthOfArrayLike$a$1=lengthOfArrayLike$c$1,createProperty$5$1=createProperty$6$1,getIterator$1$1=getIterator$2$1,getIteratorMethod$7$1=getIteratorMethod$9$1,$Array$3$1=Array,arrayFrom$1=function F(W){var q=toObject$a$1(W),K=isConstructor$3$1(this),X=arguments.length,tt=X>1?arguments[1]:void 0,rt=tt!==void 0;rt&&(tt=bind$7$1(tt,X>2?arguments[2]:void 0));var ot=getIteratorMethod$7$1(q),ut=0,yn,uo,po,mo,wo,lf;if(ot&&!(this===$Array$3$1&&isArrayIteratorMethod$1$1(ot)))for(mo=getIterator$1$1(q,ot),wo=mo.next,uo=K?new this:[];!(po=call$5$1(wo,mo)).done;ut++)lf=rt?callWithSafeIterationClosing$2(mo,tt,[po.value,ut],!0):po.value,createProperty$5$1(uo,ut,lf);else for(yn=lengthOfArrayLike$a$1(q),uo=K?new this(yn):$Array$3$1(yn);yn>ut;ut++)lf=rt?tt(q[ut],ut):q[ut],createProperty$5$1(uo,ut,lf);return uo.length=ut,uo},wellKnownSymbol$d$1=wellKnownSymbol$m$1,ITERATOR$2$1=wellKnownSymbol$d$1("iterator"),SAFE_CLOSING$1=!1;try{var called$1=0,iteratorWithReturn$1={next:function(){return{done:!!called$1++}},return:function(){SAFE_CLOSING$1=!0}};iteratorWithReturn$1[ITERATOR$2$1]=function(){return this},Array.from(iteratorWithReturn$1,function(){throw 2})}catch(F){}var checkCorrectnessOfIteration$1$1=function(F,W){try{if(!W&&!SAFE_CLOSING$1)return!1}catch{return!1}var q=!1;try{var K={};K[ITERATOR$2$1]=function(){return{next:function(){return{done:q=!0}}}},F(K)}catch{}return q},$$L$1=_export$1,from$6$1=arrayFrom$1,checkCorrectnessOfIteration$2=checkCorrectnessOfIteration$1$1,INCORRECT_ITERATION$1=!checkCorrectnessOfIteration$2(function(F){Array.from(F)});$$L$1({target:"Array",stat:!0,forced:INCORRECT_ITERATION$1},{from:from$6$1});var path$r$1=path$w,from$5$1=path$r$1.Array.from,parent$19=from$5$1,from$4$1=parent$19,from$3$1=from$4$1,_Array$from$1$1=getDefaultExportFromCjs$1(from$3$1),toIndexedObject$5$1=toIndexedObject$a$1,Iterators$1$1=iterators$1,InternalStateModule$4$1=internalState$1;objectDefineProperty$1.f;var defineIterator$1$1=iteratorDefine$1,createIterResultObject$1$1=createIterResultObject$3$1,ARRAY_ITERATOR$1="Array Iterator",setInternalState$4$1=InternalStateModule$4$1.set,getInternalState$1$1=InternalStateModule$4$1.getterFor(ARRAY_ITERATOR$1);defineIterator$1$1(Array,"Array",function(F,W){setInternalState$4$1(this,{type:ARRAY_ITERATOR$1,target:toIndexedObject$5$1(F),index:0,kind:W})},function(){var F=getInternalState$1$1(this),W=F.target,q=F.kind,K=F.index++;if(!W||K>=W.length)return F.target=void 0,createIterResultObject$1$1(void 0,!0);switch(q){case"keys":return createIterResultObject$1$1(K,!1);case"values":return createIterResultObject$1$1(W[K],!1)}return createIterResultObject$1$1([K,W[K]],!1)},"values");Iterators$1$1.Arguments=Iterators$1$1.Array;var getIteratorMethod$6$1=getIteratorMethod$9$1,getIteratorMethod_1$1=getIteratorMethod$6$1,domIterables$1={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},DOMIterables$2=domIterables$1,global$c$1=global$n,classof$8$1=classof$d$1,createNonEnumerableProperty$1$1=createNonEnumerableProperty$6$1,Iterators$6=iterators$1,wellKnownSymbol$c$1=wellKnownSymbol$m$1,TO_STRING_TAG$4=wellKnownSymbol$c$1("toStringTag");for(var COLLECTION_NAME$1 in DOMIterables$2){var Collection$1=global$c$1[COLLECTION_NAME$1],CollectionPrototype$1=Collection$1&&Collection$1.prototype;CollectionPrototype$1&&classof$8$1(CollectionPrototype$1)!==TO_STRING_TAG$4&&createNonEnumerableProperty$1$1(CollectionPrototype$1,TO_STRING_TAG$4,COLLECTION_NAME$1),Iterators$6[COLLECTION_NAME$1]=Iterators$6.Array}var parent$18=getIteratorMethod_1$1,getIteratorMethod$5$1=parent$18,parent$17=getIteratorMethod$5$1,getIteratorMethod$4$1=parent$17,parent$16$1=getIteratorMethod$4$1,getIteratorMethod$3$1=parent$16$1,getIteratorMethod$2$1=getIteratorMethod$3$1,_getIteratorMethod$1$1=getDefaultExportFromCjs$1(getIteratorMethod$2$1),getIteratorMethod$1$1=getIteratorMethod$2$1,_getIteratorMethod$2=getDefaultExportFromCjs$1(getIteratorMethod$1$1);function _classCallCheck$1(F,W){if(!(F instanceof W))throw new TypeError("Cannot call a class as a function")}var defineProperty$c$1={exports:{}},$$K$1=_export$1,DESCRIPTORS$9$1=descriptors$1,defineProperty$b$1=objectDefineProperty$1.f;$$K$1({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$b$1,sham:!DESCRIPTORS$9$1},{defineProperty:defineProperty$b$1});var path$q$1=path$w,Object$5=path$q$1.Object,defineProperty$a$1=defineProperty$c$1.exports=function F(W,q,K){return Object$5.defineProperty(W,q,K)};Object$5.defineProperty.sham&&(defineProperty$a$1.sham=!0);var definePropertyExports$1=defineProperty$c$1.exports,parent$15$1=definePropertyExports$1,defineProperty$9$1=parent$15$1,parent$14$1=defineProperty$9$1,defineProperty$8$1=parent$14$1,parent$13$1=defineProperty$8$1,defineProperty$7$1=parent$13$1,defineProperty$6$1=defineProperty$7$1,_Object$defineProperty$1$1=getDefaultExportFromCjs$1(defineProperty$6$1),classof$7$1=classofRaw$2$1,isArray$e$1=Array.isArray||function F(W){return classof$7$1(W)==="Array"},$TypeError$8$1=TypeError,MAX_SAFE_INTEGER$1=9007199254740991,doesNotExceedSafeInteger$3$1=function(F){if(F>MAX_SAFE_INTEGER$1)throw $TypeError$8$1("Maximum allowed index exceeded");return F},isArray$d$1=isArray$e$1,isConstructor$2$1=isConstructor$4$1,isObject$b$1=isObject$j,wellKnownSymbol$b$1=wellKnownSymbol$m$1,SPECIES$3$1=wellKnownSymbol$b$1("species"),$Array$2$1=Array,arraySpeciesConstructor$1$1=function(F){var W;return isArray$d$1(F)&&(W=F.constructor,isConstructor$2$1(W)&&(W===$Array$2$1||isArray$d$1(W.prototype))?W=void 0:isObject$b$1(W)&&(W=W[SPECIES$3$1],W===null&&(W=void 0))),W===void 0?$Array$2$1:W},arraySpeciesConstructor$2=arraySpeciesConstructor$1$1,arraySpeciesCreate$3$1=function(F,W){return new(arraySpeciesConstructor$2(F))(W===0?0:W)},fails$k$1=fails$w,wellKnownSymbol$a$1=wellKnownSymbol$m$1,V8_VERSION$1$1=engineV8Version$1,SPECIES$2$1=wellKnownSymbol$a$1("species"),arrayMethodHasSpeciesSupport$5$1=function(F){return V8_VERSION$1$1>=51||!fails$k$1(function(){var W=[],q=W.constructor={};return q[SPECIES$2$1]=function(){return{foo:1}},W[F](Boolean).foo!==1})},$$J$1=_export$1,fails$j$1=fails$w,isArray$c$1=isArray$e$1,isObject$a$1=isObject$j,toObject$9$1=toObject$e$1,lengthOfArrayLike$9$1=lengthOfArrayLike$c$1,doesNotExceedSafeInteger$2$1=doesNotExceedSafeInteger$3$1,createProperty$4$1=createProperty$6$1,arraySpeciesCreate$2$1=arraySpeciesCreate$3$1,arrayMethodHasSpeciesSupport$4$1=arrayMethodHasSpeciesSupport$5$1,wellKnownSymbol$9$1=wellKnownSymbol$m$1,V8_VERSION$3=engineV8Version$1,IS_CONCAT_SPREADABLE$1=wellKnownSymbol$9$1("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT$1=V8_VERSION$3>=51||!fails$j$1(function(){var F=[];return F[IS_CONCAT_SPREADABLE$1]=!1,F.concat()[0]!==F}),isConcatSpreadable$1=function(F){if(!isObject$a$1(F))return!1;var W=F[IS_CONCAT_SPREADABLE$1];return W!==void 0?!!W:isArray$c$1(F)},FORCED$a=!IS_CONCAT_SPREADABLE_SUPPORT$1||!arrayMethodHasSpeciesSupport$4$1("concat");$$J$1({target:"Array",proto:!0,arity:1,forced:FORCED$a},{concat:function F(W){var q=toObject$9$1(this),K=arraySpeciesCreate$2$1(q,0),X=0,tt,rt,ot,ut,yn;for(tt=-1,ot=arguments.length;ttcf;cf++)if((ot||cf in wo)&&($f=wo[cf],wf=lf($f,cf,mo),F))if(W)_f[cf]=wf;else if(wf)switch(F){case 3:return!0;case 5:return $f;case 6:return cf;case 2:push$a$1(_f,$f)}else switch(F){case 4:return!1;case 7:push$a$1(_f,$f)}return tt?-1:K||X?X:_f}},arrayIteration$1={forEach:createMethod$2$1(0),map:createMethod$2$1(1),filter:createMethod$2$1(2),some:createMethod$2$1(3),every:createMethod$2$1(4),find:createMethod$2$1(5),findIndex:createMethod$2$1(6),filterReject:createMethod$2$1(7)},$$I$1=_export$1,global$b$1=global$n,call$3$1=functionCall$1,uncurryThis$g$1=functionUncurryThis$1,DESCRIPTORS$8$1=descriptors$1,NATIVE_SYMBOL$3$1=symbolConstructorDetection$1,fails$i$1=fails$w,hasOwn$7$1=hasOwnProperty_1$1,isPrototypeOf$i$1=objectIsPrototypeOf$1,anObject$5$1=anObject$d,toIndexedObject$3$1=toIndexedObject$a$1,toPropertyKey$5=toPropertyKey$4$1,$toString$1=toString$a$1,createPropertyDescriptor$6=createPropertyDescriptor$5$1,nativeObjectCreate$1=objectCreate$1,objectKeys$5=objectKeys$3$1,getOwnPropertyNamesModule$2$1=objectGetOwnPropertyNames$1,getOwnPropertyNamesExternal$1=objectGetOwnPropertyNamesExternal$1,getOwnPropertySymbolsModule$2$1=objectGetOwnPropertySymbols$1,getOwnPropertyDescriptorModule$2=objectGetOwnPropertyDescriptor$1,definePropertyModule$4=objectDefineProperty$1,definePropertiesModule$2=objectDefineProperties$1,propertyIsEnumerableModule$3=objectPropertyIsEnumerable$1,defineBuiltIn$1$1=defineBuiltIn$5$1,defineBuiltInAccessor$2$1=defineBuiltInAccessor$3$1,shared$3$1=sharedExports$1,sharedKey$5=sharedKey$4$1,hiddenKeys$1$1=hiddenKeys$6$1,uid$1$1=uid$4$1,wellKnownSymbol$6$1=wellKnownSymbol$m$1,wrappedWellKnownSymbolModule$2=wellKnownSymbolWrapped$1,defineWellKnownSymbol$l$1=wellKnownSymbolDefine$1,defineSymbolToPrimitive$1$1=symbolDefineToPrimitive$1,setToStringTag$3$1=setToStringTag$6$1,InternalStateModule$3$1=internalState$1,$forEach$1$1=arrayIteration$1.forEach,HIDDEN$1=sharedKey$5("hidden"),SYMBOL$1="Symbol",PROTOTYPE$2="prototype",setInternalState$3$1=InternalStateModule$3$1.set,getInternalState$3=InternalStateModule$3$1.getterFor(SYMBOL$1),ObjectPrototype$1$1=Object[PROTOTYPE$2],$Symbol$1=global$b$1.Symbol,SymbolPrototype$1=$Symbol$1&&$Symbol$1[PROTOTYPE$2],RangeError$1$1=global$b$1.RangeError,TypeError$1$1=global$b$1.TypeError,QObject$1=global$b$1.QObject,nativeGetOwnPropertyDescriptor$1$1=getOwnPropertyDescriptorModule$2.f,nativeDefineProperty$1=definePropertyModule$4.f,nativeGetOwnPropertyNames$1=getOwnPropertyNamesExternal$1.f,nativePropertyIsEnumerable$1=propertyIsEnumerableModule$3.f,push$9$1=uncurryThis$g$1([].push),AllSymbols$1=shared$3$1("symbols"),ObjectPrototypeSymbols$1=shared$3$1("op-symbols"),WellKnownSymbolsStore$1$1=shared$3$1("wks"),USE_SETTER$1=!QObject$1||!QObject$1[PROTOTYPE$2]||!QObject$1[PROTOTYPE$2].findChild,fallbackDefineProperty$1=function(F,W,q){var K=nativeGetOwnPropertyDescriptor$1$1(ObjectPrototype$1$1,W);K&&delete ObjectPrototype$1$1[W],nativeDefineProperty$1(F,W,q),K&&F!==ObjectPrototype$1$1&&nativeDefineProperty$1(ObjectPrototype$1$1,W,K)},setSymbolDescriptor$1=DESCRIPTORS$8$1&&fails$i$1(function(){return nativeObjectCreate$1(nativeDefineProperty$1({},"a",{get:function(){return nativeDefineProperty$1(this,"a",{value:7}).a}})).a!==7})?fallbackDefineProperty$1:nativeDefineProperty$1,wrap$1=function(F,W){var q=AllSymbols$1[F]=nativeObjectCreate$1(SymbolPrototype$1);return setInternalState$3$1(q,{type:SYMBOL$1,tag:F,description:W}),DESCRIPTORS$8$1||(q.description=W),q},$defineProperty$2=function F(W,q,K){W===ObjectPrototype$1$1&&$defineProperty$2(ObjectPrototypeSymbols$1,q,K),anObject$5$1(W);var X=toPropertyKey$5(q);return anObject$5$1(K),hasOwn$7$1(AllSymbols$1,X)?(K.enumerable?(hasOwn$7$1(W,HIDDEN$1)&&W[HIDDEN$1][X]&&(W[HIDDEN$1][X]=!1),K=nativeObjectCreate$1(K,{enumerable:createPropertyDescriptor$6(0,!1)})):(hasOwn$7$1(W,HIDDEN$1)||nativeDefineProperty$1(W,HIDDEN$1,createPropertyDescriptor$6(1,{})),W[HIDDEN$1][X]=!0),setSymbolDescriptor$1(W,X,K)):nativeDefineProperty$1(W,X,K)},$defineProperties$1=function F(W,q){anObject$5$1(W);var K=toIndexedObject$3$1(q),X=objectKeys$5(K).concat($getOwnPropertySymbols$1(K));return $forEach$1$1(X,function(tt){(!DESCRIPTORS$8$1||call$3$1($propertyIsEnumerable$3,K,tt))&&$defineProperty$2(W,tt,K[tt])}),W},$create$1=function F(W,q){return q===void 0?nativeObjectCreate$1(W):$defineProperties$1(nativeObjectCreate$1(W),q)},$propertyIsEnumerable$3=function F(W){var q=toPropertyKey$5(W),K=call$3$1(nativePropertyIsEnumerable$1,this,q);return this===ObjectPrototype$1$1&&hasOwn$7$1(AllSymbols$1,q)&&!hasOwn$7$1(ObjectPrototypeSymbols$1,q)?!1:K||!hasOwn$7$1(this,q)||!hasOwn$7$1(AllSymbols$1,q)||hasOwn$7$1(this,HIDDEN$1)&&this[HIDDEN$1][q]?K:!0},$getOwnPropertyDescriptor$3=function F(W,q){var K=toIndexedObject$3$1(W),X=toPropertyKey$5(q);if(!(K===ObjectPrototype$1$1&&hasOwn$7$1(AllSymbols$1,X)&&!hasOwn$7$1(ObjectPrototypeSymbols$1,X))){var tt=nativeGetOwnPropertyDescriptor$1$1(K,X);return tt&&hasOwn$7$1(AllSymbols$1,X)&&!(hasOwn$7$1(K,HIDDEN$1)&&K[HIDDEN$1][X])&&(tt.enumerable=!0),tt}},$getOwnPropertyNames$2=function F(W){var q=nativeGetOwnPropertyNames$1(toIndexedObject$3$1(W)),K=[];return $forEach$1$1(q,function(X){!hasOwn$7$1(AllSymbols$1,X)&&!hasOwn$7$1(hiddenKeys$1$1,X)&&push$9$1(K,X)}),K},$getOwnPropertySymbols$1=function(F){var W=F===ObjectPrototype$1$1,q=nativeGetOwnPropertyNames$1(W?ObjectPrototypeSymbols$1:toIndexedObject$3$1(F)),K=[];return $forEach$1$1(q,function(X){hasOwn$7$1(AllSymbols$1,X)&&(!W||hasOwn$7$1(ObjectPrototype$1$1,X))&&push$9$1(K,AllSymbols$1[X])}),K};NATIVE_SYMBOL$3$1||($Symbol$1=function(){if(isPrototypeOf$i$1(SymbolPrototype$1,this))throw new TypeError$1$1("Symbol is not a constructor");var W=!arguments.length||arguments[0]===void 0?void 0:$toString$1(arguments[0]),q=uid$1$1(W),K=function(X){this===ObjectPrototype$1$1&&call$3$1(K,ObjectPrototypeSymbols$1,X),hasOwn$7$1(this,HIDDEN$1)&&hasOwn$7$1(this[HIDDEN$1],q)&&(this[HIDDEN$1][q]=!1);var tt=createPropertyDescriptor$6(1,X);try{setSymbolDescriptor$1(this,q,tt)}catch(rt){if(!(rt instanceof RangeError$1$1))throw rt;fallbackDefineProperty$1(this,q,tt)}};return DESCRIPTORS$8$1&&USE_SETTER$1&&setSymbolDescriptor$1(ObjectPrototype$1$1,q,{configurable:!0,set:K}),wrap$1(q,W)},SymbolPrototype$1=$Symbol$1[PROTOTYPE$2],defineBuiltIn$1$1(SymbolPrototype$1,"toString",function(){return getInternalState$3(this).tag}),defineBuiltIn$1$1($Symbol$1,"withoutSetter",function(F){return wrap$1(uid$1$1(F),F)}),propertyIsEnumerableModule$3.f=$propertyIsEnumerable$3,definePropertyModule$4.f=$defineProperty$2,definePropertiesModule$2.f=$defineProperties$1,getOwnPropertyDescriptorModule$2.f=$getOwnPropertyDescriptor$3,getOwnPropertyNamesModule$2$1.f=getOwnPropertyNamesExternal$1.f=$getOwnPropertyNames$2,getOwnPropertySymbolsModule$2$1.f=$getOwnPropertySymbols$1,wrappedWellKnownSymbolModule$2.f=function(F){return wrap$1(wellKnownSymbol$6$1(F),F)},DESCRIPTORS$8$1&&defineBuiltInAccessor$2$1(SymbolPrototype$1,"description",{configurable:!0,get:function(){return getInternalState$3(this).description}}));$$I$1({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$3$1,sham:!NATIVE_SYMBOL$3$1},{Symbol:$Symbol$1});$forEach$1$1(objectKeys$5(WellKnownSymbolsStore$1$1),function(F){defineWellKnownSymbol$l$1(F)});$$I$1({target:SYMBOL$1,stat:!0,forced:!NATIVE_SYMBOL$3$1},{useSetter:function(){USE_SETTER$1=!0},useSimple:function(){USE_SETTER$1=!1}});$$I$1({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3$1,sham:!DESCRIPTORS$8$1},{create:$create$1,defineProperty:$defineProperty$2,defineProperties:$defineProperties$1,getOwnPropertyDescriptor:$getOwnPropertyDescriptor$3});$$I$1({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3$1},{getOwnPropertyNames:$getOwnPropertyNames$2});defineSymbolToPrimitive$1$1();setToStringTag$3$1($Symbol$1,SYMBOL$1);hiddenKeys$1$1[HIDDEN$1]=!0;var NATIVE_SYMBOL$2$1=symbolConstructorDetection$1,symbolRegistryDetection$1=NATIVE_SYMBOL$2$1&&!!Symbol.for&&!!Symbol.keyFor,$$H$1=_export$1,getBuiltIn$7$1=getBuiltIn$c$1,hasOwn$6$1=hasOwnProperty_1$1,toString$6$1=toString$a$1,shared$2$1=sharedExports$1,NATIVE_SYMBOL_REGISTRY$1$1=symbolRegistryDetection$1,StringToSymbolRegistry$1=shared$2$1("string-to-symbol-registry"),SymbolToStringRegistry$1$1=shared$2$1("symbol-to-string-registry");$$H$1({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$1$1},{for:function(F){var W=toString$6$1(F);if(hasOwn$6$1(StringToSymbolRegistry$1,W))return StringToSymbolRegistry$1[W];var q=getBuiltIn$7$1("Symbol")(W);return StringToSymbolRegistry$1[W]=q,SymbolToStringRegistry$1$1[q]=W,q}});var $$G$1=_export$1,hasOwn$5$1=hasOwnProperty_1$1,isSymbol$2$1=isSymbol$5$1,tryToString$3$1=tryToString$6$1,shared$1$1=sharedExports$1,NATIVE_SYMBOL_REGISTRY$2=symbolRegistryDetection$1,SymbolToStringRegistry$2=shared$1$1("symbol-to-string-registry");$$G$1({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$2},{keyFor:function F(W){if(!isSymbol$2$1(W))throw new TypeError(tryToString$3$1(W)+" is not a symbol");if(hasOwn$5$1(SymbolToStringRegistry$2,W))return SymbolToStringRegistry$2[W]}});var uncurryThis$f$1=functionUncurryThis$1,isArray$b$1=isArray$e$1,isCallable$3$1=isCallable$i$1,classof$5$1=classofRaw$2$1,toString$5$1=toString$a$1,push$8$1=uncurryThis$f$1([].push),getJsonReplacerFunction$1=function(F){if(isCallable$3$1(F))return F;if(isArray$b$1(F)){for(var W=F.length,q=[],K=0;KF.length)&&(W=F.length);for(var q=0,K=new Array(W);q"u"&&documentAll$2$1!==void 0,documentAll_1$1={all:documentAll$2$1,IS_HTMLDDA:IS_HTMLDDA$1},$documentAll$1$1=documentAll_1$1,documentAll$1$1=$documentAll$1$1.all,isCallable$i$1=$documentAll$1$1.IS_HTMLDDA?function(F){return typeof F=="function"||F===documentAll$1$1}:function(F){return typeof F=="function"},objectGetOwnPropertyDescriptor$1={},fails$u$1=fails$w,descriptors$1=!fails$u$1(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),NATIVE_BIND$2$1=functionBindNative$1,call$d$1=Function.prototype.call,functionCall$1=NATIVE_BIND$2$1?call$d$1.bind(call$d$1):function(){return call$d$1.apply(call$d$1,arguments)},objectPropertyIsEnumerable$1={},$propertyIsEnumerable$1$1={}.propertyIsEnumerable,getOwnPropertyDescriptor$9=Object.getOwnPropertyDescriptor,NASHORN_BUG$1=getOwnPropertyDescriptor$9&&!$propertyIsEnumerable$1$1.call({1:2},1);objectPropertyIsEnumerable$1.f=NASHORN_BUG$1?function F(W){var q=getOwnPropertyDescriptor$9(this,W);return!!q&&q.enumerable}:$propertyIsEnumerable$1$1;var createPropertyDescriptor$5$1=function(F,W){return{enumerable:!(F&1),configurable:!(F&2),writable:!(F&4),value:W}},uncurryThis$v$1=functionUncurryThis$1,fails$t$1=fails$w,classof$e=classofRaw$2$1,$Object$5=Object,split$1=uncurryThis$v$1("".split),indexedObject$1=fails$t$1(function(){return!$Object$5("z").propertyIsEnumerable(0)})?function(F){return classof$e(F)==="String"?split$1(F,""):$Object$5(F)}:$Object$5,isNullOrUndefined$6=function(F){return F==null},isNullOrUndefined$5$1=isNullOrUndefined$6,$TypeError$g$1=TypeError,requireObjectCoercible$5$1=function(F){if(isNullOrUndefined$5$1(F))throw new $TypeError$g$1("Can't call method on "+F);return F},IndexedObject$3$1=indexedObject$1,requireObjectCoercible$4$1=requireObjectCoercible$5$1,toIndexedObject$a$1=function(F){return IndexedObject$3$1(requireObjectCoercible$4$1(F))},isCallable$h$1=isCallable$i$1,$documentAll$2=documentAll_1$1,documentAll$3=$documentAll$2.all,isObject$j=$documentAll$2.IS_HTMLDDA?function(F){return typeof F=="object"?F!==null:isCallable$h$1(F)||F===documentAll$3}:function(F){return typeof F=="object"?F!==null:isCallable$h$1(F)},path$w={},path$v=path$w,global$m=global$n,isCallable$g$1=isCallable$i$1,aFunction$1=function(F){return isCallable$g$1(F)?F:void 0},getBuiltIn$c$1=function(F,W){return arguments.length<2?aFunction$1(path$v[F])||aFunction$1(global$m[F]):path$v[F]&&path$v[F][W]||global$m[F]&&global$m[F][W]},uncurryThis$u$1=functionUncurryThis$1,objectIsPrototypeOf$1=uncurryThis$u$1({}.isPrototypeOf),engineUserAgent$1=typeof navigator<"u"&&String(navigator.userAgent)||"",global$l$1=global$n,userAgent$2$1=engineUserAgent$1,process$2=global$l$1.process,Deno$2=global$l$1.Deno,versions$1=process$2&&process$2.versions||Deno$2&&Deno$2.version,v8$1=versions$1&&versions$1.v8,match$1,version$1;v8$1&&(match$1=v8$1.split("."),version$1=match$1[0]>0&&match$1[0]<4?1:+(match$1[0]+match$1[1]));!version$1&&userAgent$2$1&&(match$1=userAgent$2$1.match(/Edge\/(\d+)/),(!match$1||match$1[1]>=74)&&(match$1=userAgent$2$1.match(/Chrome\/(\d+)/),match$1&&(version$1=+match$1[1])));var engineV8Version$1=version$1,V8_VERSION$2$1=engineV8Version$1,fails$s$1=fails$w,global$k$1=global$n,$String$5$1=global$k$1.String,symbolConstructorDetection$1=!!Object.getOwnPropertySymbols&&!fails$s$1(function(){var F=Symbol("symbol detection");return!$String$5$1(F)||!(Object(F)instanceof Symbol)||!Symbol.sham&&V8_VERSION$2$1&&V8_VERSION$2$1<41}),NATIVE_SYMBOL$5$1=symbolConstructorDetection$1,useSymbolAsUid$1=NATIVE_SYMBOL$5$1&&!Symbol.sham&&typeof Symbol.iterator=="symbol",getBuiltIn$b$1=getBuiltIn$c$1,isCallable$f$1=isCallable$i$1,isPrototypeOf$k$1=objectIsPrototypeOf$1,USE_SYMBOL_AS_UID$1$1=useSymbolAsUid$1,$Object$4$1=Object,isSymbol$5$1=USE_SYMBOL_AS_UID$1$1?function(F){return typeof F=="symbol"}:function(F){var W=getBuiltIn$b$1("Symbol");return isCallable$f$1(W)&&isPrototypeOf$k$1(W.prototype,$Object$4$1(F))},$String$4$1=String,tryToString$6$1=function(F){try{return $String$4$1(F)}catch{return"Object"}},isCallable$e$1=isCallable$i$1,tryToString$5$1=tryToString$6$1,$TypeError$f$1=TypeError,aCallable$7$1=function(F){if(isCallable$e$1(F))return F;throw new $TypeError$f$1(tryToString$5$1(F)+" is not a function")},aCallable$6$1=aCallable$7$1,isNullOrUndefined$4$1=isNullOrUndefined$6,getMethod$3$1=function(F,W){var q=F[W];return isNullOrUndefined$4$1(q)?void 0:aCallable$6$1(q)},call$c$1=functionCall$1,isCallable$d$1=isCallable$i$1,isObject$i=isObject$j,$TypeError$e$1=TypeError,ordinaryToPrimitive$1$1=function(F,W){var q,K;if(W==="string"&&isCallable$d$1(q=F.toString)&&!isObject$i(K=call$c$1(q,F))||isCallable$d$1(q=F.valueOf)&&!isObject$i(K=call$c$1(q,F))||W!=="string"&&isCallable$d$1(q=F.toString)&&!isObject$i(K=call$c$1(q,F)))return K;throw new $TypeError$e$1("Can't convert object to primitive value")},shared$7$1={exports:{}},global$j$1=global$n,defineProperty$f$1=Object.defineProperty,defineGlobalProperty$1$1=function(F,W){try{defineProperty$f$1(global$j$1,F,{value:W,configurable:!0,writable:!0})}catch{global$j$1[F]=W}return W},global$i$1=global$n,defineGlobalProperty$2=defineGlobalProperty$1$1,SHARED$1="__core-js_shared__",store$3$1=global$i$1[SHARED$1]||defineGlobalProperty$2(SHARED$1,{}),sharedStore$1=store$3$1,store$2$1=sharedStore$1;(shared$7$1.exports=function(F,W){return store$2$1[F]||(store$2$1[F]=W!==void 0?W:{})})("versions",[]).push({version:"3.33.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedExports$1=shared$7$1.exports,requireObjectCoercible$3$1=requireObjectCoercible$5$1,$Object$3$1=Object,toObject$e$1=function(F){return $Object$3$1(requireObjectCoercible$3$1(F))},uncurryThis$t$1=functionUncurryThis$1,toObject$d$1=toObject$e$1,hasOwnProperty$1=uncurryThis$t$1({}.hasOwnProperty),hasOwnProperty_1$1=Object.hasOwn||function F(W,q){return hasOwnProperty$1(toObject$d$1(W),q)},uncurryThis$s$1=functionUncurryThis$1,id$2=0,postfix$1=Math.random(),toString$b$1=uncurryThis$s$1(1 .toString),uid$4$1=function(F){return"Symbol("+(F===void 0?"":F)+")_"+toString$b$1(++id$2+postfix$1,36)},global$h$1=global$n,shared$6$1=sharedExports$1,hasOwn$h=hasOwnProperty_1$1,uid$3$1=uid$4$1,NATIVE_SYMBOL$4$1=symbolConstructorDetection$1,USE_SYMBOL_AS_UID$2=useSymbolAsUid$1,Symbol$5$1=global$h$1.Symbol,WellKnownSymbolsStore$2$1=shared$6$1("wks"),createWellKnownSymbol$1=USE_SYMBOL_AS_UID$2?Symbol$5$1.for||Symbol$5$1:Symbol$5$1&&Symbol$5$1.withoutSetter||uid$3$1,wellKnownSymbol$m$1=function(F){return hasOwn$h(WellKnownSymbolsStore$2$1,F)||(WellKnownSymbolsStore$2$1[F]=NATIVE_SYMBOL$4$1&&hasOwn$h(Symbol$5$1,F)?Symbol$5$1[F]:createWellKnownSymbol$1("Symbol."+F)),WellKnownSymbolsStore$2$1[F]},call$b$1=functionCall$1,isObject$h$1=isObject$j,isSymbol$4$1=isSymbol$5$1,getMethod$2$1=getMethod$3$1,ordinaryToPrimitive$2=ordinaryToPrimitive$1$1,wellKnownSymbol$l$1=wellKnownSymbol$m$1,$TypeError$d$1=TypeError,TO_PRIMITIVE$1=wellKnownSymbol$l$1("toPrimitive"),toPrimitive$6$1=function(F,W){if(!isObject$h$1(F)||isSymbol$4$1(F))return F;var q=getMethod$2$1(F,TO_PRIMITIVE$1),K;if(q){if(W===void 0&&(W="default"),K=call$b$1(q,F,W),!isObject$h$1(K)||isSymbol$4$1(K))return K;throw new $TypeError$d$1("Can't convert object to primitive value")}return W===void 0&&(W="number"),ordinaryToPrimitive$2(F,W)},toPrimitive$5$1=toPrimitive$6$1,isSymbol$3$1=isSymbol$5$1,toPropertyKey$4$1=function(F){var W=toPrimitive$5$1(F,"string");return isSymbol$3$1(W)?W:W+""},global$g$1=global$n,isObject$g$1=isObject$j,document$1$1=global$g$1.document,EXISTS$1$1=isObject$g$1(document$1$1)&&isObject$g$1(document$1$1.createElement),documentCreateElement$1$1=function(F){return EXISTS$1$1?document$1$1.createElement(F):{}},DESCRIPTORS$h$1=descriptors$1,fails$r$1=fails$w,createElement$1=documentCreateElement$1$1,ie8DomDefine$1=!DESCRIPTORS$h$1&&!fails$r$1(function(){return Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a!==7}),DESCRIPTORS$g$1=descriptors$1,call$a$1=functionCall$1,propertyIsEnumerableModule$2$1=objectPropertyIsEnumerable$1,createPropertyDescriptor$4$1=createPropertyDescriptor$5$1,toIndexedObject$9$1=toIndexedObject$a$1,toPropertyKey$3$1=toPropertyKey$4$1,hasOwn$g=hasOwnProperty_1$1,IE8_DOM_DEFINE$1$1=ie8DomDefine$1,$getOwnPropertyDescriptor$2$1=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor$1.f=DESCRIPTORS$g$1?$getOwnPropertyDescriptor$2$1:function F(W,q){if(W=toIndexedObject$9$1(W),q=toPropertyKey$3$1(q),IE8_DOM_DEFINE$1$1)try{return $getOwnPropertyDescriptor$2$1(W,q)}catch{}if(hasOwn$g(W,q))return createPropertyDescriptor$4$1(!call$a$1(propertyIsEnumerableModule$2$1.f,W,q),W[q])};var fails$q$1=fails$w,isCallable$c$1=isCallable$i$1,replacement$1=/#|\.prototype\./,isForced$1$1=function(F,W){var q=data$1[normalize$1(F)];return q===POLYFILL$1?!0:q===NATIVE$1?!1:isCallable$c$1(W)?fails$q$1(W):!!W},normalize$1=isForced$1$1.normalize=function(F){return String(F).replace(replacement$1,".").toLowerCase()},data$1=isForced$1$1.data={},NATIVE$1=isForced$1$1.NATIVE="N",POLYFILL$1=isForced$1$1.POLYFILL="P",isForced_1$1=isForced$1$1,uncurryThis$r$1=functionUncurryThisClause$1,aCallable$5$1=aCallable$7$1,NATIVE_BIND$1$1=functionBindNative$1,bind$e$1=uncurryThis$r$1(uncurryThis$r$1.bind),functionBindContext$1=function(F,W){return aCallable$5$1(F),W===void 0?F:NATIVE_BIND$1$1?bind$e$1(F,W):function(){return F.apply(W,arguments)}},objectDefineProperty$1={},DESCRIPTORS$f$1=descriptors$1,fails$p$1=fails$w,v8PrototypeDefineBug$1=DESCRIPTORS$f$1&&fails$p$1(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),isObject$f$1=isObject$j,$String$3$1=String,$TypeError$c$1=TypeError,anObject$d=function(F){if(isObject$f$1(F))return F;throw new $TypeError$c$1($String$3$1(F)+" is not an object")},DESCRIPTORS$e$1=descriptors$1,IE8_DOM_DEFINE$2=ie8DomDefine$1,V8_PROTOTYPE_DEFINE_BUG$1$1=v8PrototypeDefineBug$1,anObject$c=anObject$d,toPropertyKey$2$1=toPropertyKey$4$1,$TypeError$b$1=TypeError,$defineProperty$1$1=Object.defineProperty,$getOwnPropertyDescriptor$1$1=Object.getOwnPropertyDescriptor,ENUMERABLE$1="enumerable",CONFIGURABLE$1$1="configurable",WRITABLE$1="writable";objectDefineProperty$1.f=DESCRIPTORS$e$1?V8_PROTOTYPE_DEFINE_BUG$1$1?function F(W,q,K){if(anObject$c(W),q=toPropertyKey$2$1(q),anObject$c(K),typeof W=="function"&&q==="prototype"&&"value"in K&&WRITABLE$1 in K&&!K[WRITABLE$1]){var X=$getOwnPropertyDescriptor$1$1(W,q);X&&X[WRITABLE$1]&&(W[q]=K.value,K={configurable:CONFIGURABLE$1$1 in K?K[CONFIGURABLE$1$1]:X[CONFIGURABLE$1$1],enumerable:ENUMERABLE$1 in K?K[ENUMERABLE$1]:X[ENUMERABLE$1],writable:!1})}return $defineProperty$1$1(W,q,K)}:$defineProperty$1$1:function F(W,q,K){if(anObject$c(W),q=toPropertyKey$2$1(q),anObject$c(K),IE8_DOM_DEFINE$2)try{return $defineProperty$1$1(W,q,K)}catch{}if("get"in K||"set"in K)throw new $TypeError$b$1("Accessors not supported");return"value"in K&&(W[q]=K.value),W};var DESCRIPTORS$d$1=descriptors$1,definePropertyModule$3$1=objectDefineProperty$1,createPropertyDescriptor$3$1=createPropertyDescriptor$5$1,createNonEnumerableProperty$6$1=DESCRIPTORS$d$1?function(F,W,q){return definePropertyModule$3$1.f(F,W,createPropertyDescriptor$3$1(1,q))}:function(F,W,q){return F[W]=q,F},global$f$1=global$n,apply$4$1=functionApply$1,uncurryThis$q$1=functionUncurryThisClause$1,isCallable$b$1=isCallable$i$1,getOwnPropertyDescriptor$8=objectGetOwnPropertyDescriptor$1.f,isForced$2=isForced_1$1,path$u=path$w,bind$d$1=functionBindContext$1,createNonEnumerableProperty$5$1=createNonEnumerableProperty$6$1,hasOwn$f=hasOwnProperty_1$1,wrapConstructor$1=function(F){var W=function(q,K,X){if(this instanceof W){switch(arguments.length){case 0:return new F;case 1:return new F(q);case 2:return new F(q,K)}return new F(q,K,X)}return apply$4$1(F,this,arguments)};return W.prototype=F.prototype,W},_export$1=function(F,W){var q=F.target,K=F.global,X=F.stat,tt=F.proto,rt=K?global$f$1:X?global$f$1[q]:(global$f$1[q]||{}).prototype,ot=K?path$u:path$u[q]||createNonEnumerableProperty$5$1(path$u,q,{})[q],ut=ot.prototype,yn,uo,po,mo,wo,lf,yf,cf,vf;for(mo in W)yn=isForced$2(K?mo:q+(X?".":"#")+mo,F.forced),uo=!yn&&rt&&hasOwn$f(rt,mo),lf=ot[mo],uo&&(F.dontCallGetSet?(vf=getOwnPropertyDescriptor$8(rt,mo),yf=vf&&vf.value):yf=rt[mo]),wo=uo&&yf?yf:W[mo],!(uo&&typeof lf==typeof wo)&&(F.bind&&uo?cf=bind$d$1(wo,global$f$1):F.wrap&&uo?cf=wrapConstructor$1(wo):tt&&isCallable$b$1(wo)?cf=uncurryThis$q$1(wo):cf=wo,(F.sham||wo&&wo.sham||lf&&lf.sham)&&createNonEnumerableProperty$5$1(cf,"sham",!0),createNonEnumerableProperty$5$1(ot,mo,cf),tt&&(po=q+"Prototype",hasOwn$f(path$u,po)||createNonEnumerableProperty$5$1(path$u,po,{}),createNonEnumerableProperty$5$1(path$u[po],mo,wo),F.real&&ut&&(yn||!ut[mo])&&createNonEnumerableProperty$5$1(ut,mo,wo)))},ceil$1=Math.ceil,floor$1$1=Math.floor,mathTrunc$1=Math.trunc||function F(W){var q=+W;return(q>0?floor$1$1:ceil$1)(q)},trunc$1=mathTrunc$1,toIntegerOrInfinity$4$1=function(F){var W=+F;return W!==W||W===0?0:trunc$1(W)},toIntegerOrInfinity$3$1=toIntegerOrInfinity$4$1,max$3$1=Math.max,min$2$1=Math.min,toAbsoluteIndex$5$1=function(F,W){var q=toIntegerOrInfinity$3$1(F);return q<0?max$3$1(q+W,0):min$2$1(q,W)},toIntegerOrInfinity$2$1=toIntegerOrInfinity$4$1,min$1$1=Math.min,toLength$1$1=function(F){return F>0?min$1$1(toIntegerOrInfinity$2$1(F),9007199254740991):0},toLength$2=toLength$1$1,lengthOfArrayLike$c$1=function(F){return toLength$2(F.length)},toIndexedObject$8$1=toIndexedObject$a$1,toAbsoluteIndex$4$1=toAbsoluteIndex$5$1,lengthOfArrayLike$b$1=lengthOfArrayLike$c$1,createMethod$4$1=function(F){return function(W,q,K){var X=toIndexedObject$8$1(W),tt=lengthOfArrayLike$b$1(X),rt=toAbsoluteIndex$4$1(K,tt),ot;if(F&&q!==q){for(;tt>rt;)if(ot=X[rt++],ot!==ot)return!0}else for(;tt>rt;rt++)if((F||rt in X)&&X[rt]===q)return F||rt||0;return!F&&-1}},arrayIncludes$1={includes:createMethod$4$1(!0),indexOf:createMethod$4$1(!1)},hiddenKeys$6$1={},uncurryThis$p$1=functionUncurryThis$1,hasOwn$e$1=hasOwnProperty_1$1,toIndexedObject$7$1=toIndexedObject$a$1,indexOf$4$1=arrayIncludes$1.indexOf,hiddenKeys$5$1=hiddenKeys$6$1,push$b$1=uncurryThis$p$1([].push),objectKeysInternal$1=function(F,W){var q=toIndexedObject$7$1(F),K=0,X=[],tt;for(tt in q)!hasOwn$e$1(hiddenKeys$5$1,tt)&&hasOwn$e$1(q,tt)&&push$b$1(X,tt);for(;W.length>K;)hasOwn$e$1(q,tt=W[K++])&&(~indexOf$4$1(X,tt)||push$b$1(X,tt));return X},enumBugKeys$3$1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1$1=objectKeysInternal$1,enumBugKeys$2$1=enumBugKeys$3$1,objectKeys$3$1=Object.keys||function F(W){return internalObjectKeys$1$1(W,enumBugKeys$2$1)},objectGetOwnPropertySymbols$1={};objectGetOwnPropertySymbols$1.f=Object.getOwnPropertySymbols;var DESCRIPTORS$c$1=descriptors$1,uncurryThis$o$1=functionUncurryThis$1,call$9$1=functionCall$1,fails$o$1=fails$w,objectKeys$2$1=objectKeys$3$1,getOwnPropertySymbolsModule$3$1=objectGetOwnPropertySymbols$1,propertyIsEnumerableModule$1$1=objectPropertyIsEnumerable$1,toObject$c$1=toObject$e$1,IndexedObject$2$1=indexedObject$1,$assign$1=Object.assign,defineProperty$e$1=Object.defineProperty,concat$6$1=uncurryThis$o$1([].concat),objectAssign$1=!$assign$1||fails$o$1(function(){if(DESCRIPTORS$c$1&&$assign$1({b:1},$assign$1(defineProperty$e$1({},"a",{enumerable:!0,get:function(){defineProperty$e$1(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var F={},W={},q=Symbol("assign detection"),K="abcdefghijklmnopqrst";return F[q]=7,K.split("").forEach(function(X){W[X]=X}),$assign$1({},F)[q]!==7||objectKeys$2$1($assign$1({},W)).join("")!==K})?function F(W,q){for(var K=toObject$c$1(W),X=arguments.length,tt=1,rt=getOwnPropertySymbolsModule$3$1.f,ot=propertyIsEnumerableModule$1$1.f;X>tt;)for(var ut=IndexedObject$2$1(arguments[tt++]),yn=rt?concat$6$1(objectKeys$2$1(ut),rt(ut)):objectKeys$2$1(ut),uo=yn.length,po=0,mo;uo>po;)mo=yn[po++],(!DESCRIPTORS$c$1||call$9$1(ot,ut,mo))&&(K[mo]=ut[mo]);return K}:$assign$1,$$O$1=_export$1,assign$5$1=objectAssign$1;$$O$1({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign$5$1},{assign:assign$5$1});var path$t=path$w,assign$4$1=path$t.Object.assign,parent$1b=assign$4$1,assign$3$1=parent$1b,assign$2$1=assign$3$1,_Object$assign$1=getDefaultExportFromCjs$1(assign$2$1),uncurryThis$n$1=functionUncurryThis$1,arraySlice$5$1=uncurryThis$n$1([].slice),uncurryThis$m$1=functionUncurryThis$1,aCallable$4$1=aCallable$7$1,isObject$e$1=isObject$j,hasOwn$d$1=hasOwnProperty_1$1,arraySlice$4$1=arraySlice$5$1,NATIVE_BIND$5=functionBindNative$1,$Function$1=Function,concat$5$1=uncurryThis$m$1([].concat),join$1=uncurryThis$m$1([].join),factories$1={},construct$4$1=function(F,W,q){if(!hasOwn$d$1(factories$1,W)){for(var K=[],X=0;X=.1;)lf=+tt[po++%rt],lf>uo&&(lf=uo),wo=Math.sqrt(lf*lf/(1+yn*yn)),wo=ot<0?-wo:wo,W+=wo,q+=yn*wo,mo===!0?F.lineTo(W,q):F.moveTo(W,q),uo-=lf,mo=!mo}function drawHexagon(F,W,q,K){F.beginPath();var X=6,tt=Math.PI*2/X;F.moveTo(W+K,q);for(var rt=1;rt1?q-1:0),X=1;X=tt?F?"":void 0:(rt=charCodeAt$1$1(K,X),rt<55296||rt>56319||X+1===tt||(ot=charCodeAt$1$1(K,X+1))<56320||ot>57343?F?charAt$3$1(K,X):rt:F?stringSlice$2(K,X,X+2):(rt-55296<<10)+(ot-56320)+65536)}},stringMultibyte$1={codeAt:createMethod$3$1(!1),charAt:createMethod$3$1(!0)},global$e$1=global$n,isCallable$9$1=isCallable$i$1,WeakMap$1$1=global$e$1.WeakMap,weakMapBasicDetection$1=isCallable$9$1(WeakMap$1$1)&&/native code/.test(String(WeakMap$1$1)),shared$5$1=sharedExports$1,uid$2$1=uid$4$1,keys$3$1=shared$5$1("keys"),sharedKey$4$1=function(F){return keys$3$1[F]||(keys$3$1[F]=uid$2$1(F))},NATIVE_WEAK_MAP$1=weakMapBasicDetection$1,global$d$1=global$n,isObject$d$1=isObject$j,createNonEnumerableProperty$4$1=createNonEnumerableProperty$6$1,hasOwn$c$1=hasOwnProperty_1$1,shared$4$1=sharedStore$1,sharedKey$3$1=sharedKey$4$1,hiddenKeys$4$1=hiddenKeys$6$1,OBJECT_ALREADY_INITIALIZED$1="Object already initialized",TypeError$2$1=global$d$1.TypeError,WeakMap$3=global$d$1.WeakMap,set$3$1,get$6,has$1,enforce$1=function(F){return has$1(F)?get$6(F):set$3$1(F,{})},getterFor$1=function(F){return function(W){var q;if(!isObject$d$1(W)||(q=get$6(W)).type!==F)throw new TypeError$2$1("Incompatible receiver, "+F+" required");return q}};if(NATIVE_WEAK_MAP$1||shared$4$1.state){var store$1$1=shared$4$1.state||(shared$4$1.state=new WeakMap$3);store$1$1.get=store$1$1.get,store$1$1.has=store$1$1.has,store$1$1.set=store$1$1.set,set$3$1=function(F,W){if(store$1$1.has(F))throw new TypeError$2$1(OBJECT_ALREADY_INITIALIZED$1);return W.facade=F,store$1$1.set(F,W),W},get$6=function(F){return store$1$1.get(F)||{}},has$1=function(F){return store$1$1.has(F)}}else{var STATE$1=sharedKey$3$1("state");hiddenKeys$4$1[STATE$1]=!0,set$3$1=function(F,W){if(hasOwn$c$1(F,STATE$1))throw new TypeError$2$1(OBJECT_ALREADY_INITIALIZED$1);return W.facade=F,createNonEnumerableProperty$4$1(F,STATE$1,W),W},get$6=function(F){return hasOwn$c$1(F,STATE$1)?F[STATE$1]:{}},has$1=function(F){return hasOwn$c$1(F,STATE$1)}}var internalState$1={set:set$3$1,get:get$6,has:has$1,enforce:enforce$1,getterFor:getterFor$1},DESCRIPTORS$b$1=descriptors$1,hasOwn$b$1=hasOwnProperty_1$1,FunctionPrototype$1$1=Function.prototype,getDescriptor$1=DESCRIPTORS$b$1&&Object.getOwnPropertyDescriptor,EXISTS$2=hasOwn$b$1(FunctionPrototype$1$1,"name"),PROPER$1=EXISTS$2&&(function F(){}).name==="something",CONFIGURABLE$2=EXISTS$2&&(!DESCRIPTORS$b$1||DESCRIPTORS$b$1&&getDescriptor$1(FunctionPrototype$1$1,"name").configurable),functionName$1={EXISTS:EXISTS$2,PROPER:PROPER$1,CONFIGURABLE:CONFIGURABLE$2},objectDefineProperties$1={},DESCRIPTORS$a$1=descriptors$1,V8_PROTOTYPE_DEFINE_BUG$2=v8PrototypeDefineBug$1,definePropertyModule$2$1=objectDefineProperty$1,anObject$b$1=anObject$d,toIndexedObject$6$1=toIndexedObject$a$1,objectKeys$1$1=objectKeys$3$1;objectDefineProperties$1.f=DESCRIPTORS$a$1&&!V8_PROTOTYPE_DEFINE_BUG$2?Object.defineProperties:function F(W,q){anObject$b$1(W);for(var K=toIndexedObject$6$1(q),X=objectKeys$1$1(q),tt=X.length,rt=0,ot;tt>rt;)definePropertyModule$2$1.f(W,ot=X[rt++],K[ot]);return W};var getBuiltIn$a$1=getBuiltIn$c$1,html$1$1=getBuiltIn$a$1("document","documentElement"),anObject$a$1=anObject$d,definePropertiesModule$1$1=objectDefineProperties$1,enumBugKeys$1$1=enumBugKeys$3$1,hiddenKeys$3$1=hiddenKeys$6$1,html$2=html$1$1,documentCreateElement$2=documentCreateElement$1$1,sharedKey$2$1=sharedKey$4$1,GT$1=">",LT$1="<",PROTOTYPE$1$1="prototype",SCRIPT$1="script",IE_PROTO$1$1=sharedKey$2$1("IE_PROTO"),EmptyConstructor$1=function(){},scriptTag$1=function(F){return LT$1+SCRIPT$1+GT$1+F+LT$1+"/"+SCRIPT$1+GT$1},NullProtoObjectViaActiveX$1=function(F){F.write(scriptTag$1("")),F.close();var W=F.parentWindow.Object;return F=null,W},NullProtoObjectViaIFrame$1=function(){var F=documentCreateElement$2("iframe"),W="java"+SCRIPT$1+":",q;return F.style.display="none",html$2.appendChild(F),F.src=String(W),q=F.contentWindow.document,q.open(),q.write(scriptTag$1("document.F=Object")),q.close(),q.F},activeXDocument$1,NullProtoObject$1=function(){try{activeXDocument$1=new ActiveXObject("htmlfile")}catch{}NullProtoObject$1=typeof document<"u"?document.domain&&activeXDocument$1?NullProtoObjectViaActiveX$1(activeXDocument$1):NullProtoObjectViaIFrame$1():NullProtoObjectViaActiveX$1(activeXDocument$1);for(var F=enumBugKeys$1$1.length;F--;)delete NullProtoObject$1[PROTOTYPE$1$1][enumBugKeys$1$1[F]];return NullProtoObject$1()};hiddenKeys$3$1[IE_PROTO$1$1]=!0;var objectCreate$1=Object.create||function F(W,q){var K;return W!==null?(EmptyConstructor$1[PROTOTYPE$1$1]=anObject$a$1(W),K=new EmptyConstructor$1,EmptyConstructor$1[PROTOTYPE$1$1]=null,K[IE_PROTO$1$1]=W):K=NullProtoObject$1(),q===void 0?K:definePropertiesModule$1$1.f(K,q)},fails$n$1=fails$w,correctPrototypeGetter$1=!fails$n$1(function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype}),hasOwn$a$1=hasOwnProperty_1$1,isCallable$8$1=isCallable$i$1,toObject$b$1=toObject$e$1,sharedKey$1$1=sharedKey$4$1,CORRECT_PROTOTYPE_GETTER$1$1=correctPrototypeGetter$1,IE_PROTO$2=sharedKey$1$1("IE_PROTO"),$Object$1$1=Object,ObjectPrototype$2$1=$Object$1$1.prototype,objectGetPrototypeOf$2=CORRECT_PROTOTYPE_GETTER$1$1?$Object$1$1.getPrototypeOf:function(F){var W=toObject$b$1(F);if(hasOwn$a$1(W,IE_PROTO$2))return W[IE_PROTO$2];var q=W.constructor;return isCallable$8$1(q)&&W instanceof q?q.prototype:W instanceof $Object$1$1?ObjectPrototype$2$1:null},createNonEnumerableProperty$3$1=createNonEnumerableProperty$6$1,defineBuiltIn$5$1=function(F,W,q,K){return K&&K.enumerable?F[W]=q:createNonEnumerableProperty$3$1(F,W,q),F},fails$m$1=fails$w,isCallable$7$1=isCallable$i$1,isObject$c$1=isObject$j,create$a$1=objectCreate$1,getPrototypeOf$8=objectGetPrototypeOf$2,defineBuiltIn$4$1=defineBuiltIn$5$1,wellKnownSymbol$i$1=wellKnownSymbol$m$1,ITERATOR$6$1=wellKnownSymbol$i$1("iterator"),BUGGY_SAFARI_ITERATORS$1$1=!1,IteratorPrototype$1$1,PrototypeOfArrayIteratorPrototype$1,arrayIterator$1;[].keys&&(arrayIterator$1=[].keys(),"next"in arrayIterator$1?(PrototypeOfArrayIteratorPrototype$1=getPrototypeOf$8(getPrototypeOf$8(arrayIterator$1)),PrototypeOfArrayIteratorPrototype$1!==Object.prototype&&(IteratorPrototype$1$1=PrototypeOfArrayIteratorPrototype$1)):BUGGY_SAFARI_ITERATORS$1$1=!0);var NEW_ITERATOR_PROTOTYPE$1=!isObject$c$1(IteratorPrototype$1$1)||fails$m$1(function(){var F={};return IteratorPrototype$1$1[ITERATOR$6$1].call(F)!==F});NEW_ITERATOR_PROTOTYPE$1?IteratorPrototype$1$1={}:IteratorPrototype$1$1=create$a$1(IteratorPrototype$1$1);isCallable$7$1(IteratorPrototype$1$1[ITERATOR$6$1])||defineBuiltIn$4$1(IteratorPrototype$1$1,ITERATOR$6$1,function(){return this});var iteratorsCore$1={IteratorPrototype:IteratorPrototype$1$1,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1$1},TO_STRING_TAG_SUPPORT$1$1=toStringTagSupport$1,classof$b$1=classof$d$1,objectToString$1=TO_STRING_TAG_SUPPORT$1$1?{}.toString:function F(){return"[object "+classof$b$1(this)+"]"},TO_STRING_TAG_SUPPORT$3=toStringTagSupport$1,defineProperty$d$1=objectDefineProperty$1.f,createNonEnumerableProperty$2$1=createNonEnumerableProperty$6$1,hasOwn$9$1=hasOwnProperty_1$1,toString$8$1=objectToString$1,wellKnownSymbol$h$1=wellKnownSymbol$m$1,TO_STRING_TAG$1$1=wellKnownSymbol$h$1("toStringTag"),setToStringTag$6$1=function(F,W,q,K){if(F){var X=q?F:F.prototype;hasOwn$9$1(X,TO_STRING_TAG$1$1)||defineProperty$d$1(X,TO_STRING_TAG$1$1,{configurable:!0,value:W}),K&&!TO_STRING_TAG_SUPPORT$3&&createNonEnumerableProperty$2$1(X,"toString",toString$8$1)}},iterators$1={},IteratorPrototype$2=iteratorsCore$1.IteratorPrototype,create$9$1=objectCreate$1,createPropertyDescriptor$2$1=createPropertyDescriptor$5$1,setToStringTag$5$1=setToStringTag$6$1,Iterators$5$1=iterators$1,returnThis$1$1=function(){return this},iteratorCreateConstructor$1=function(F,W,q,K){var X=W+" Iterator";return F.prototype=create$9$1(IteratorPrototype$2,{next:createPropertyDescriptor$2$1(+!K,q)}),setToStringTag$5$1(F,X,!1,!0),Iterators$5$1[X]=returnThis$1$1,F},uncurryThis$k$1=functionUncurryThis$1,aCallable$3$1=aCallable$7$1,functionUncurryThisAccessor$1=function(F,W,q){try{return uncurryThis$k$1(aCallable$3$1(Object.getOwnPropertyDescriptor(F,W)[q]))}catch{}},isCallable$6$1=isCallable$i$1,$String$1$1=String,$TypeError$a$1=TypeError,aPossiblePrototype$1$1=function(F){if(typeof F=="object"||isCallable$6$1(F))return F;throw new $TypeError$a$1("Can't set "+$String$1$1(F)+" as a prototype")},uncurryThisAccessor$1=functionUncurryThisAccessor$1,anObject$9$1=anObject$d,aPossiblePrototype$2=aPossiblePrototype$1$1,objectSetPrototypeOf$1=Object.setPrototypeOf||("__proto__"in{}?function(){var F=!1,W={},q;try{q=uncurryThisAccessor$1(Object.prototype,"__proto__","set"),q(W,[]),F=W instanceof Array}catch{}return function(X,tt){return anObject$9$1(X),aPossiblePrototype$2(tt),F?q(X,tt):X.__proto__=tt,X}}():void 0),$$M$1=_export$1,call$8$1=functionCall$1,FunctionName$1=functionName$1,createIteratorConstructor$1=iteratorCreateConstructor$1,getPrototypeOf$7$1=objectGetPrototypeOf$2,setToStringTag$4$1=setToStringTag$6$1,defineBuiltIn$3$1=defineBuiltIn$5$1,wellKnownSymbol$g$1=wellKnownSymbol$m$1,Iterators$4$1=iterators$1,IteratorsCore$1=iteratorsCore$1,PROPER_FUNCTION_NAME$1=FunctionName$1.PROPER,BUGGY_SAFARI_ITERATORS$2=IteratorsCore$1.BUGGY_SAFARI_ITERATORS,ITERATOR$5$1=wellKnownSymbol$g$1("iterator"),KEYS$1="keys",VALUES$1="values",ENTRIES$1="entries",returnThis$2=function(){return this},iteratorDefine$1=function(F,W,q,K,X,tt,rt){createIteratorConstructor$1(q,W,K);var ot=function(vf){if(vf===X&&mo)return mo;if(!BUGGY_SAFARI_ITERATORS$2&&vf&&vf in uo)return uo[vf];switch(vf){case KEYS$1:return function(){return new q(this,vf)};case VALUES$1:return function(){return new q(this,vf)};case ENTRIES$1:return function(){return new q(this,vf)}}return function(){return new q(this)}},ut=W+" Iterator",yn=!1,uo=F.prototype,po=uo[ITERATOR$5$1]||uo["@@iterator"]||X&&uo[X],mo=!BUGGY_SAFARI_ITERATORS$2&&po||ot(X),wo=W==="Array"&&uo.entries||po,lf,yf,cf;if(wo&&(lf=getPrototypeOf$7$1(wo.call(new F)),lf!==Object.prototype&&lf.next&&(setToStringTag$4$1(lf,ut,!0,!0),Iterators$4$1[ut]=returnThis$2)),PROPER_FUNCTION_NAME$1&&X===VALUES$1&&po&&po.name!==VALUES$1&&(yn=!0,mo=function(){return call$8$1(po,this)}),X)if(yf={values:ot(VALUES$1),keys:tt?mo:ot(KEYS$1),entries:ot(ENTRIES$1)},rt)for(cf in yf)(BUGGY_SAFARI_ITERATORS$2||yn||!(cf in uo))&&defineBuiltIn$3$1(uo,cf,yf[cf]);else $$M$1({target:W,proto:!0,forced:BUGGY_SAFARI_ITERATORS$2||yn},yf);return rt&&uo[ITERATOR$5$1]!==mo&&defineBuiltIn$3$1(uo,ITERATOR$5$1,mo,{name:X}),Iterators$4$1[W]=mo,yf},createIterResultObject$3$1=function(F,W){return{value:F,done:W}},charAt$2$1=stringMultibyte$1.charAt,toString$7$1=toString$a$1,InternalStateModule$5=internalState$1,defineIterator$2$1=iteratorDefine$1,createIterResultObject$2$1=createIterResultObject$3$1,STRING_ITERATOR$1="String Iterator",setInternalState$5=InternalStateModule$5.set,getInternalState$2$1=InternalStateModule$5.getterFor(STRING_ITERATOR$1);defineIterator$2$1(String,"String",function(F){setInternalState$5(this,{type:STRING_ITERATOR$1,string:toString$7$1(F),index:0})},function F(){var W=getInternalState$2$1(this),q=W.string,K=W.index,X;return K>=q.length?createIterResultObject$2$1(void 0,!0):(X=charAt$2$1(q,K),W.index+=X.length,createIterResultObject$2$1(X,!1))});var call$7$1=functionCall$1,anObject$8$1=anObject$d,getMethod$1$1=getMethod$3$1,iteratorClose$2$1=function(F,W,q){var K,X;anObject$8$1(F);try{if(K=getMethod$1$1(F,"return"),!K){if(W==="throw")throw q;return q}K=call$7$1(K,F)}catch(tt){X=!0,K=tt}if(W==="throw")throw q;if(X)throw K;return anObject$8$1(K),q},anObject$7$1=anObject$d,iteratorClose$1$1=iteratorClose$2$1,callWithSafeIterationClosing$1$1=function(F,W,q,K){try{return K?W(anObject$7$1(q)[0],q[1]):W(q)}catch(X){iteratorClose$1$1(F,"throw",X)}},wellKnownSymbol$f$1=wellKnownSymbol$m$1,Iterators$3$1=iterators$1,ITERATOR$4$1=wellKnownSymbol$f$1("iterator"),ArrayPrototype$g$1=Array.prototype,isArrayIteratorMethod$2$1=function(F){return F!==void 0&&(Iterators$3$1.Array===F||ArrayPrototype$g$1[ITERATOR$4$1]===F)},uncurryThis$j$1=functionUncurryThis$1,isCallable$5$1=isCallable$i$1,store$4=sharedStore$1,functionToString$1=uncurryThis$j$1(Function.toString);isCallable$5$1(store$4.inspectSource)||(store$4.inspectSource=function(F){return functionToString$1(F)});var inspectSource$1$1=store$4.inspectSource,uncurryThis$i$1=functionUncurryThis$1,fails$l$1=fails$w,isCallable$4$1=isCallable$i$1,classof$a$1=classof$d$1,getBuiltIn$9$1=getBuiltIn$c$1,inspectSource$2=inspectSource$1$1,noop$1=function(){},empty$1=[],construct$3$1=getBuiltIn$9$1("Reflect","construct"),constructorRegExp$1=/^\s*(?:class|function)\b/,exec$2$1=uncurryThis$i$1(constructorRegExp$1.exec),INCORRECT_TO_STRING$1=!constructorRegExp$1.test(noop$1),isConstructorModern$1=function F(W){if(!isCallable$4$1(W))return!1;try{return construct$3$1(noop$1,empty$1,W),!0}catch{return!1}},isConstructorLegacy$1=function F(W){if(!isCallable$4$1(W))return!1;switch(classof$a$1(W)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING$1||!!exec$2$1(constructorRegExp$1,inspectSource$2(W))}catch{return!0}};isConstructorLegacy$1.sham=!0;var isConstructor$4$1=!construct$3$1||fails$l$1(function(){var F;return isConstructorModern$1(isConstructorModern$1.call)||!isConstructorModern$1(Object)||!isConstructorModern$1(function(){F=!0})||F})?isConstructorLegacy$1:isConstructorModern$1,toPropertyKey$1$1=toPropertyKey$4$1,definePropertyModule$1$1=objectDefineProperty$1,createPropertyDescriptor$1$1=createPropertyDescriptor$5$1,createProperty$6$1=function(F,W,q){var K=toPropertyKey$1$1(W);K in F?definePropertyModule$1$1.f(F,K,createPropertyDescriptor$1$1(0,q)):F[K]=q},classof$9$1=classof$d$1,getMethod$4=getMethod$3$1,isNullOrUndefined$3$1=isNullOrUndefined$6,Iterators$2$1=iterators$1,wellKnownSymbol$e$1=wellKnownSymbol$m$1,ITERATOR$3$1=wellKnownSymbol$e$1("iterator"),getIteratorMethod$9$1=function(F){if(!isNullOrUndefined$3$1(F))return getMethod$4(F,ITERATOR$3$1)||getMethod$4(F,"@@iterator")||Iterators$2$1[classof$9$1(F)]},call$6$1=functionCall$1,aCallable$2$1=aCallable$7$1,anObject$6$1=anObject$d,tryToString$4$1=tryToString$6$1,getIteratorMethod$8$1=getIteratorMethod$9$1,$TypeError$9$1=TypeError,getIterator$2$1=function(F,W){var q=arguments.length<2?getIteratorMethod$8$1(F):W;if(aCallable$2$1(q))return anObject$6$1(call$6$1(q,F));throw new $TypeError$9$1(tryToString$4$1(F)+" is not iterable")},bind$7$1=functionBindContext$1,call$5$1=functionCall$1,toObject$a$1=toObject$e$1,callWithSafeIterationClosing$2=callWithSafeIterationClosing$1$1,isArrayIteratorMethod$1$1=isArrayIteratorMethod$2$1,isConstructor$3$1=isConstructor$4$1,lengthOfArrayLike$a$1=lengthOfArrayLike$c$1,createProperty$5$1=createProperty$6$1,getIterator$1$1=getIterator$2$1,getIteratorMethod$7$1=getIteratorMethod$9$1,$Array$3$1=Array,arrayFrom$1=function F(W){var q=toObject$a$1(W),K=isConstructor$3$1(this),X=arguments.length,tt=X>1?arguments[1]:void 0,rt=tt!==void 0;rt&&(tt=bind$7$1(tt,X>2?arguments[2]:void 0));var ot=getIteratorMethod$7$1(q),ut=0,yn,uo,po,mo,wo,lf;if(ot&&!(this===$Array$3$1&&isArrayIteratorMethod$1$1(ot)))for(mo=getIterator$1$1(q,ot),wo=mo.next,uo=K?new this:[];!(po=call$5$1(wo,mo)).done;ut++)lf=rt?callWithSafeIterationClosing$2(mo,tt,[po.value,ut],!0):po.value,createProperty$5$1(uo,ut,lf);else for(yn=lengthOfArrayLike$a$1(q),uo=K?new this(yn):$Array$3$1(yn);yn>ut;ut++)lf=rt?tt(q[ut],ut):q[ut],createProperty$5$1(uo,ut,lf);return uo.length=ut,uo},wellKnownSymbol$d$1=wellKnownSymbol$m$1,ITERATOR$2$1=wellKnownSymbol$d$1("iterator"),SAFE_CLOSING$1=!1;try{var called$1=0,iteratorWithReturn$1={next:function(){return{done:!!called$1++}},return:function(){SAFE_CLOSING$1=!0}};iteratorWithReturn$1[ITERATOR$2$1]=function(){return this},Array.from(iteratorWithReturn$1,function(){throw 2})}catch(F){}var checkCorrectnessOfIteration$1$1=function(F,W){try{if(!W&&!SAFE_CLOSING$1)return!1}catch{return!1}var q=!1;try{var K={};K[ITERATOR$2$1]=function(){return{next:function(){return{done:q=!0}}}},F(K)}catch{}return q},$$L$1=_export$1,from$6$1=arrayFrom$1,checkCorrectnessOfIteration$2=checkCorrectnessOfIteration$1$1,INCORRECT_ITERATION$1=!checkCorrectnessOfIteration$2(function(F){Array.from(F)});$$L$1({target:"Array",stat:!0,forced:INCORRECT_ITERATION$1},{from:from$6$1});var path$r$1=path$w,from$5$1=path$r$1.Array.from,parent$19=from$5$1,from$4$1=parent$19,from$3$1=from$4$1,_Array$from$1$1=getDefaultExportFromCjs$1(from$3$1),toIndexedObject$5$1=toIndexedObject$a$1,Iterators$1$1=iterators$1,InternalStateModule$4$1=internalState$1;objectDefineProperty$1.f;var defineIterator$1$1=iteratorDefine$1,createIterResultObject$1$1=createIterResultObject$3$1,ARRAY_ITERATOR$1="Array Iterator",setInternalState$4$1=InternalStateModule$4$1.set,getInternalState$1$1=InternalStateModule$4$1.getterFor(ARRAY_ITERATOR$1);defineIterator$1$1(Array,"Array",function(F,W){setInternalState$4$1(this,{type:ARRAY_ITERATOR$1,target:toIndexedObject$5$1(F),index:0,kind:W})},function(){var F=getInternalState$1$1(this),W=F.target,q=F.kind,K=F.index++;if(!W||K>=W.length)return F.target=void 0,createIterResultObject$1$1(void 0,!0);switch(q){case"keys":return createIterResultObject$1$1(K,!1);case"values":return createIterResultObject$1$1(W[K],!1)}return createIterResultObject$1$1([K,W[K]],!1)},"values");Iterators$1$1.Arguments=Iterators$1$1.Array;var getIteratorMethod$6$1=getIteratorMethod$9$1,getIteratorMethod_1$1=getIteratorMethod$6$1,domIterables$1={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},DOMIterables$2=domIterables$1,global$c$1=global$n,classof$8$1=classof$d$1,createNonEnumerableProperty$1$1=createNonEnumerableProperty$6$1,Iterators$6=iterators$1,wellKnownSymbol$c$1=wellKnownSymbol$m$1,TO_STRING_TAG$4=wellKnownSymbol$c$1("toStringTag");for(var COLLECTION_NAME$1 in DOMIterables$2){var Collection$1=global$c$1[COLLECTION_NAME$1],CollectionPrototype$1=Collection$1&&Collection$1.prototype;CollectionPrototype$1&&classof$8$1(CollectionPrototype$1)!==TO_STRING_TAG$4&&createNonEnumerableProperty$1$1(CollectionPrototype$1,TO_STRING_TAG$4,COLLECTION_NAME$1),Iterators$6[COLLECTION_NAME$1]=Iterators$6.Array}var parent$18=getIteratorMethod_1$1,getIteratorMethod$5$1=parent$18,parent$17=getIteratorMethod$5$1,getIteratorMethod$4$1=parent$17,parent$16$1=getIteratorMethod$4$1,getIteratorMethod$3$1=parent$16$1,getIteratorMethod$2$1=getIteratorMethod$3$1,_getIteratorMethod$1$1=getDefaultExportFromCjs$1(getIteratorMethod$2$1),getIteratorMethod$1$1=getIteratorMethod$2$1,_getIteratorMethod$2=getDefaultExportFromCjs$1(getIteratorMethod$1$1);function _classCallCheck$1(F,W){if(!(F instanceof W))throw new TypeError("Cannot call a class as a function")}var defineProperty$c$1={exports:{}},$$K$1=_export$1,DESCRIPTORS$9$1=descriptors$1,defineProperty$b$1=objectDefineProperty$1.f;$$K$1({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$b$1,sham:!DESCRIPTORS$9$1},{defineProperty:defineProperty$b$1});var path$q$1=path$w,Object$5=path$q$1.Object,defineProperty$a$1=defineProperty$c$1.exports=function F(W,q,K){return Object$5.defineProperty(W,q,K)};Object$5.defineProperty.sham&&(defineProperty$a$1.sham=!0);var definePropertyExports$1=defineProperty$c$1.exports,parent$15$1=definePropertyExports$1,defineProperty$9$1=parent$15$1,parent$14$1=defineProperty$9$1,defineProperty$8$1=parent$14$1,parent$13$1=defineProperty$8$1,defineProperty$7$1=parent$13$1,defineProperty$6$1=defineProperty$7$1,_Object$defineProperty$1$1=getDefaultExportFromCjs$1(defineProperty$6$1),classof$7$1=classofRaw$2$1,isArray$e$1=Array.isArray||function F(W){return classof$7$1(W)==="Array"},$TypeError$8$1=TypeError,MAX_SAFE_INTEGER$1=9007199254740991,doesNotExceedSafeInteger$3$1=function(F){if(F>MAX_SAFE_INTEGER$1)throw $TypeError$8$1("Maximum allowed index exceeded");return F},isArray$d$1=isArray$e$1,isConstructor$2$1=isConstructor$4$1,isObject$b$1=isObject$j,wellKnownSymbol$b$1=wellKnownSymbol$m$1,SPECIES$3$1=wellKnownSymbol$b$1("species"),$Array$2$1=Array,arraySpeciesConstructor$1$1=function(F){var W;return isArray$d$1(F)&&(W=F.constructor,isConstructor$2$1(W)&&(W===$Array$2$1||isArray$d$1(W.prototype))?W=void 0:isObject$b$1(W)&&(W=W[SPECIES$3$1],W===null&&(W=void 0))),W===void 0?$Array$2$1:W},arraySpeciesConstructor$2=arraySpeciesConstructor$1$1,arraySpeciesCreate$3$1=function(F,W){return new(arraySpeciesConstructor$2(F))(W===0?0:W)},fails$k$1=fails$w,wellKnownSymbol$a$1=wellKnownSymbol$m$1,V8_VERSION$1$1=engineV8Version$1,SPECIES$2$1=wellKnownSymbol$a$1("species"),arrayMethodHasSpeciesSupport$5$1=function(F){return V8_VERSION$1$1>=51||!fails$k$1(function(){var W=[],q=W.constructor={};return q[SPECIES$2$1]=function(){return{foo:1}},W[F](Boolean).foo!==1})},$$J$1=_export$1,fails$j$1=fails$w,isArray$c$1=isArray$e$1,isObject$a$1=isObject$j,toObject$9$1=toObject$e$1,lengthOfArrayLike$9$1=lengthOfArrayLike$c$1,doesNotExceedSafeInteger$2$1=doesNotExceedSafeInteger$3$1,createProperty$4$1=createProperty$6$1,arraySpeciesCreate$2$1=arraySpeciesCreate$3$1,arrayMethodHasSpeciesSupport$4$1=arrayMethodHasSpeciesSupport$5$1,wellKnownSymbol$9$1=wellKnownSymbol$m$1,V8_VERSION$3=engineV8Version$1,IS_CONCAT_SPREADABLE$1=wellKnownSymbol$9$1("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT$1=V8_VERSION$3>=51||!fails$j$1(function(){var F=[];return F[IS_CONCAT_SPREADABLE$1]=!1,F.concat()[0]!==F}),isConcatSpreadable$1=function(F){if(!isObject$a$1(F))return!1;var W=F[IS_CONCAT_SPREADABLE$1];return W!==void 0?!!W:isArray$c$1(F)},FORCED$a=!IS_CONCAT_SPREADABLE_SUPPORT$1||!arrayMethodHasSpeciesSupport$4$1("concat");$$J$1({target:"Array",proto:!0,arity:1,forced:FORCED$a},{concat:function F(W){var q=toObject$9$1(this),K=arraySpeciesCreate$2$1(q,0),X=0,tt,rt,ot,ut,yn;for(tt=-1,ot=arguments.length;ttcf;cf++)if((ot||cf in wo)&&($f=wo[cf],xf=lf($f,cf,mo),F))if(W)_f[cf]=xf;else if(xf)switch(F){case 3:return!0;case 5:return $f;case 6:return cf;case 2:push$a$1(_f,$f)}else switch(F){case 4:return!1;case 7:push$a$1(_f,$f)}return tt?-1:K||X?X:_f}},arrayIteration$1={forEach:createMethod$2$1(0),map:createMethod$2$1(1),filter:createMethod$2$1(2),some:createMethod$2$1(3),every:createMethod$2$1(4),find:createMethod$2$1(5),findIndex:createMethod$2$1(6),filterReject:createMethod$2$1(7)},$$I$1=_export$1,global$b$1=global$n,call$3$1=functionCall$1,uncurryThis$g$1=functionUncurryThis$1,DESCRIPTORS$8$1=descriptors$1,NATIVE_SYMBOL$3$1=symbolConstructorDetection$1,fails$i$1=fails$w,hasOwn$7$1=hasOwnProperty_1$1,isPrototypeOf$i$1=objectIsPrototypeOf$1,anObject$5$1=anObject$d,toIndexedObject$3$1=toIndexedObject$a$1,toPropertyKey$5=toPropertyKey$4$1,$toString$1=toString$a$1,createPropertyDescriptor$6=createPropertyDescriptor$5$1,nativeObjectCreate$1=objectCreate$1,objectKeys$5=objectKeys$3$1,getOwnPropertyNamesModule$2$1=objectGetOwnPropertyNames$1,getOwnPropertyNamesExternal$1=objectGetOwnPropertyNamesExternal$1,getOwnPropertySymbolsModule$2$1=objectGetOwnPropertySymbols$1,getOwnPropertyDescriptorModule$2=objectGetOwnPropertyDescriptor$1,definePropertyModule$4=objectDefineProperty$1,definePropertiesModule$2=objectDefineProperties$1,propertyIsEnumerableModule$3=objectPropertyIsEnumerable$1,defineBuiltIn$1$1=defineBuiltIn$5$1,defineBuiltInAccessor$2$1=defineBuiltInAccessor$3$1,shared$3$1=sharedExports$1,sharedKey$5=sharedKey$4$1,hiddenKeys$1$1=hiddenKeys$6$1,uid$1$1=uid$4$1,wellKnownSymbol$6$1=wellKnownSymbol$m$1,wrappedWellKnownSymbolModule$2=wellKnownSymbolWrapped$1,defineWellKnownSymbol$l$1=wellKnownSymbolDefine$1,defineSymbolToPrimitive$1$1=symbolDefineToPrimitive$1,setToStringTag$3$1=setToStringTag$6$1,InternalStateModule$3$1=internalState$1,$forEach$1$1=arrayIteration$1.forEach,HIDDEN$1=sharedKey$5("hidden"),SYMBOL$1="Symbol",PROTOTYPE$2="prototype",setInternalState$3$1=InternalStateModule$3$1.set,getInternalState$3=InternalStateModule$3$1.getterFor(SYMBOL$1),ObjectPrototype$1$1=Object[PROTOTYPE$2],$Symbol$1=global$b$1.Symbol,SymbolPrototype$1=$Symbol$1&&$Symbol$1[PROTOTYPE$2],RangeError$1$1=global$b$1.RangeError,TypeError$1$1=global$b$1.TypeError,QObject$1=global$b$1.QObject,nativeGetOwnPropertyDescriptor$1$1=getOwnPropertyDescriptorModule$2.f,nativeDefineProperty$1=definePropertyModule$4.f,nativeGetOwnPropertyNames$1=getOwnPropertyNamesExternal$1.f,nativePropertyIsEnumerable$1=propertyIsEnumerableModule$3.f,push$9$1=uncurryThis$g$1([].push),AllSymbols$1=shared$3$1("symbols"),ObjectPrototypeSymbols$1=shared$3$1("op-symbols"),WellKnownSymbolsStore$1$1=shared$3$1("wks"),USE_SETTER$1=!QObject$1||!QObject$1[PROTOTYPE$2]||!QObject$1[PROTOTYPE$2].findChild,fallbackDefineProperty$1=function(F,W,q){var K=nativeGetOwnPropertyDescriptor$1$1(ObjectPrototype$1$1,W);K&&delete ObjectPrototype$1$1[W],nativeDefineProperty$1(F,W,q),K&&F!==ObjectPrototype$1$1&&nativeDefineProperty$1(ObjectPrototype$1$1,W,K)},setSymbolDescriptor$1=DESCRIPTORS$8$1&&fails$i$1(function(){return nativeObjectCreate$1(nativeDefineProperty$1({},"a",{get:function(){return nativeDefineProperty$1(this,"a",{value:7}).a}})).a!==7})?fallbackDefineProperty$1:nativeDefineProperty$1,wrap$1=function(F,W){var q=AllSymbols$1[F]=nativeObjectCreate$1(SymbolPrototype$1);return setInternalState$3$1(q,{type:SYMBOL$1,tag:F,description:W}),DESCRIPTORS$8$1||(q.description=W),q},$defineProperty$2=function F(W,q,K){W===ObjectPrototype$1$1&&$defineProperty$2(ObjectPrototypeSymbols$1,q,K),anObject$5$1(W);var X=toPropertyKey$5(q);return anObject$5$1(K),hasOwn$7$1(AllSymbols$1,X)?(K.enumerable?(hasOwn$7$1(W,HIDDEN$1)&&W[HIDDEN$1][X]&&(W[HIDDEN$1][X]=!1),K=nativeObjectCreate$1(K,{enumerable:createPropertyDescriptor$6(0,!1)})):(hasOwn$7$1(W,HIDDEN$1)||nativeDefineProperty$1(W,HIDDEN$1,createPropertyDescriptor$6(1,{})),W[HIDDEN$1][X]=!0),setSymbolDescriptor$1(W,X,K)):nativeDefineProperty$1(W,X,K)},$defineProperties$1=function F(W,q){anObject$5$1(W);var K=toIndexedObject$3$1(q),X=objectKeys$5(K).concat($getOwnPropertySymbols$1(K));return $forEach$1$1(X,function(tt){(!DESCRIPTORS$8$1||call$3$1($propertyIsEnumerable$3,K,tt))&&$defineProperty$2(W,tt,K[tt])}),W},$create$1=function F(W,q){return q===void 0?nativeObjectCreate$1(W):$defineProperties$1(nativeObjectCreate$1(W),q)},$propertyIsEnumerable$3=function F(W){var q=toPropertyKey$5(W),K=call$3$1(nativePropertyIsEnumerable$1,this,q);return this===ObjectPrototype$1$1&&hasOwn$7$1(AllSymbols$1,q)&&!hasOwn$7$1(ObjectPrototypeSymbols$1,q)?!1:K||!hasOwn$7$1(this,q)||!hasOwn$7$1(AllSymbols$1,q)||hasOwn$7$1(this,HIDDEN$1)&&this[HIDDEN$1][q]?K:!0},$getOwnPropertyDescriptor$3=function F(W,q){var K=toIndexedObject$3$1(W),X=toPropertyKey$5(q);if(!(K===ObjectPrototype$1$1&&hasOwn$7$1(AllSymbols$1,X)&&!hasOwn$7$1(ObjectPrototypeSymbols$1,X))){var tt=nativeGetOwnPropertyDescriptor$1$1(K,X);return tt&&hasOwn$7$1(AllSymbols$1,X)&&!(hasOwn$7$1(K,HIDDEN$1)&&K[HIDDEN$1][X])&&(tt.enumerable=!0),tt}},$getOwnPropertyNames$2=function F(W){var q=nativeGetOwnPropertyNames$1(toIndexedObject$3$1(W)),K=[];return $forEach$1$1(q,function(X){!hasOwn$7$1(AllSymbols$1,X)&&!hasOwn$7$1(hiddenKeys$1$1,X)&&push$9$1(K,X)}),K},$getOwnPropertySymbols$1=function(F){var W=F===ObjectPrototype$1$1,q=nativeGetOwnPropertyNames$1(W?ObjectPrototypeSymbols$1:toIndexedObject$3$1(F)),K=[];return $forEach$1$1(q,function(X){hasOwn$7$1(AllSymbols$1,X)&&(!W||hasOwn$7$1(ObjectPrototype$1$1,X))&&push$9$1(K,AllSymbols$1[X])}),K};NATIVE_SYMBOL$3$1||($Symbol$1=function(){if(isPrototypeOf$i$1(SymbolPrototype$1,this))throw new TypeError$1$1("Symbol is not a constructor");var W=!arguments.length||arguments[0]===void 0?void 0:$toString$1(arguments[0]),q=uid$1$1(W),K=function(X){this===ObjectPrototype$1$1&&call$3$1(K,ObjectPrototypeSymbols$1,X),hasOwn$7$1(this,HIDDEN$1)&&hasOwn$7$1(this[HIDDEN$1],q)&&(this[HIDDEN$1][q]=!1);var tt=createPropertyDescriptor$6(1,X);try{setSymbolDescriptor$1(this,q,tt)}catch(rt){if(!(rt instanceof RangeError$1$1))throw rt;fallbackDefineProperty$1(this,q,tt)}};return DESCRIPTORS$8$1&&USE_SETTER$1&&setSymbolDescriptor$1(ObjectPrototype$1$1,q,{configurable:!0,set:K}),wrap$1(q,W)},SymbolPrototype$1=$Symbol$1[PROTOTYPE$2],defineBuiltIn$1$1(SymbolPrototype$1,"toString",function(){return getInternalState$3(this).tag}),defineBuiltIn$1$1($Symbol$1,"withoutSetter",function(F){return wrap$1(uid$1$1(F),F)}),propertyIsEnumerableModule$3.f=$propertyIsEnumerable$3,definePropertyModule$4.f=$defineProperty$2,definePropertiesModule$2.f=$defineProperties$1,getOwnPropertyDescriptorModule$2.f=$getOwnPropertyDescriptor$3,getOwnPropertyNamesModule$2$1.f=getOwnPropertyNamesExternal$1.f=$getOwnPropertyNames$2,getOwnPropertySymbolsModule$2$1.f=$getOwnPropertySymbols$1,wrappedWellKnownSymbolModule$2.f=function(F){return wrap$1(wellKnownSymbol$6$1(F),F)},DESCRIPTORS$8$1&&defineBuiltInAccessor$2$1(SymbolPrototype$1,"description",{configurable:!0,get:function(){return getInternalState$3(this).description}}));$$I$1({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$3$1,sham:!NATIVE_SYMBOL$3$1},{Symbol:$Symbol$1});$forEach$1$1(objectKeys$5(WellKnownSymbolsStore$1$1),function(F){defineWellKnownSymbol$l$1(F)});$$I$1({target:SYMBOL$1,stat:!0,forced:!NATIVE_SYMBOL$3$1},{useSetter:function(){USE_SETTER$1=!0},useSimple:function(){USE_SETTER$1=!1}});$$I$1({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3$1,sham:!DESCRIPTORS$8$1},{create:$create$1,defineProperty:$defineProperty$2,defineProperties:$defineProperties$1,getOwnPropertyDescriptor:$getOwnPropertyDescriptor$3});$$I$1({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3$1},{getOwnPropertyNames:$getOwnPropertyNames$2});defineSymbolToPrimitive$1$1();setToStringTag$3$1($Symbol$1,SYMBOL$1);hiddenKeys$1$1[HIDDEN$1]=!0;var NATIVE_SYMBOL$2$1=symbolConstructorDetection$1,symbolRegistryDetection$1=NATIVE_SYMBOL$2$1&&!!Symbol.for&&!!Symbol.keyFor,$$H$1=_export$1,getBuiltIn$7$1=getBuiltIn$c$1,hasOwn$6$1=hasOwnProperty_1$1,toString$6$1=toString$a$1,shared$2$1=sharedExports$1,NATIVE_SYMBOL_REGISTRY$1$1=symbolRegistryDetection$1,StringToSymbolRegistry$1=shared$2$1("string-to-symbol-registry"),SymbolToStringRegistry$1$1=shared$2$1("symbol-to-string-registry");$$H$1({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$1$1},{for:function(F){var W=toString$6$1(F);if(hasOwn$6$1(StringToSymbolRegistry$1,W))return StringToSymbolRegistry$1[W];var q=getBuiltIn$7$1("Symbol")(W);return StringToSymbolRegistry$1[W]=q,SymbolToStringRegistry$1$1[q]=W,q}});var $$G$1=_export$1,hasOwn$5$1=hasOwnProperty_1$1,isSymbol$2$1=isSymbol$5$1,tryToString$3$1=tryToString$6$1,shared$1$1=sharedExports$1,NATIVE_SYMBOL_REGISTRY$2=symbolRegistryDetection$1,SymbolToStringRegistry$2=shared$1$1("symbol-to-string-registry");$$G$1({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$2},{keyFor:function F(W){if(!isSymbol$2$1(W))throw new TypeError(tryToString$3$1(W)+" is not a symbol");if(hasOwn$5$1(SymbolToStringRegistry$2,W))return SymbolToStringRegistry$2[W]}});var uncurryThis$f$1=functionUncurryThis$1,isArray$b$1=isArray$e$1,isCallable$3$1=isCallable$i$1,classof$5$1=classofRaw$2$1,toString$5$1=toString$a$1,push$8$1=uncurryThis$f$1([].push),getJsonReplacerFunction$1=function(F){if(isCallable$3$1(F))return F;if(isArray$b$1(F)){for(var W=F.length,q=[],K=0;KF.length)&&(W=F.length);for(var q=0,K=new Array(W);q1?arguments[1]:void 0)}});var entryVirtual$d$1=entryVirtual$i$1,map$6=entryVirtual$d$1("Array").map,isPrototypeOf$e$1=objectIsPrototypeOf$1,method$b$1=map$6,ArrayPrototype$c$1=Array.prototype,map$5=function(F){var W=F.map;return F===ArrayPrototype$c$1||isPrototypeOf$e$1(ArrayPrototype$c$1,F)&&W===ArrayPrototype$c$1.map?method$b$1:W},parent$J$1=map$5,map$4$1=parent$J$1,map$3$1=map$4$1,_mapInstanceProperty$1=getDefaultExportFromCjs$1(map$3$1),$$v$1=_export$1,toObject$5$1=toObject$e$1,nativeKeys$1=objectKeys$3$1,fails$e$1=fails$w,FAILS_ON_PRIMITIVES$3=fails$e$1(function(){nativeKeys$1(1)});$$v$1({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$3},{keys:function F(W){return nativeKeys$1(toObject$5$1(W))}});var path$m$1=path$w,keys$2$1=path$m$1.Object.keys,parent$I$1=keys$2$1,keys$1$1=parent$I$1,keys$5=keys$1$1,_Object$keys$1=getDefaultExportFromCjs$1(keys$5),$$u$1=_export$1,uncurryThis$a$1=functionUncurryThis$1,$Date$1=Date,thisTimeValue$1=uncurryThis$a$1($Date$1.prototype.getTime);$$u$1({target:"Date",stat:!0},{now:function F(){return thisTimeValue$1(new $Date$1)}});var path$l$1=path$w,now$3$1=path$l$1.Date.now,parent$H$1=now$3$1,now$2$1=parent$H$1,now$1$1=now$2$1,_Date$now$1=getDefaultExportFromCjs$1(now$1$1),fails$d$1=fails$w,arrayMethodIsStrict$6$1=function(F,W){var q=[][F];return!!q&&fails$d$1(function(){q.call(null,W||function(){return 1},1)})},$forEach$2=arrayIteration$1.forEach,arrayMethodIsStrict$5$1=arrayMethodIsStrict$6$1,STRICT_METHOD$3$1=arrayMethodIsStrict$5$1("forEach"),arrayForEach$1=STRICT_METHOD$3$1?[].forEach:function F(W){return $forEach$2(this,W,arguments.length>1?arguments[1]:void 0)},$$t$1=_export$1,forEach$6$1=arrayForEach$1;$$t$1({target:"Array",proto:!0,forced:[].forEach!==forEach$6$1},{forEach:forEach$6$1});var entryVirtual$c$1=entryVirtual$i$1,forEach$5$1=entryVirtual$c$1("Array").forEach,parent$G$1=forEach$5$1,forEach$4$1=parent$G$1,classof$4$1=classof$d$1,hasOwn$4$1=hasOwnProperty_1$1,isPrototypeOf$d$1=objectIsPrototypeOf$1,method$a$1=forEach$4$1,ArrayPrototype$b$1=Array.prototype,DOMIterables$1$1={DOMTokenList:!0,NodeList:!0},forEach$3$1=function(F){var W=F.forEach;return F===ArrayPrototype$b$1||isPrototypeOf$d$1(ArrayPrototype$b$1,F)&&W===ArrayPrototype$b$1.forEach||hasOwn$4$1(DOMIterables$1$1,classof$4$1(F))?method$a$1:W},forEach$2$1=forEach$3$1,_forEachInstanceProperty$1=getDefaultExportFromCjs$1(forEach$2$1),$$s$1=_export$1,uncurryThis$9$1=functionUncurryThis$1,isArray$1$1=isArray$e$1,nativeReverse$1=uncurryThis$9$1([].reverse),test$1$1=[1,2];$$s$1({target:"Array",proto:!0,forced:String(test$1$1)===String(test$1$1.reverse())},{reverse:function F(){return isArray$1$1(this)&&(this.length=this.length),nativeReverse$1(this)}});var entryVirtual$b$1=entryVirtual$i$1,reverse$3$1=entryVirtual$b$1("Array").reverse,isPrototypeOf$c$1=objectIsPrototypeOf$1,method$9$1=reverse$3$1,ArrayPrototype$a$1=Array.prototype,reverse$2$1=function(F){var W=F.reverse;return F===ArrayPrototype$a$1||isPrototypeOf$c$1(ArrayPrototype$a$1,F)&&W===ArrayPrototype$a$1.reverse?method$9$1:W},parent$F$1=reverse$2$1,reverse$1$1=parent$F$1,reverse$4=reverse$1$1,_reverseInstanceProperty$1=getDefaultExportFromCjs$1(reverse$4),tryToString$2$1=tryToString$6$1,$TypeError$6$1=TypeError,deletePropertyOrThrow$2$1=function(F,W){if(!delete F[W])throw new $TypeError$6$1("Cannot delete property "+tryToString$2$1(W)+" of "+tryToString$2$1(F))},$$r$1=_export$1,toObject$4$1=toObject$e$1,toAbsoluteIndex$1$1=toAbsoluteIndex$5$1,toIntegerOrInfinity$6=toIntegerOrInfinity$4$1,lengthOfArrayLike$4$1=lengthOfArrayLike$c$1,setArrayLength$2=arraySetLength$1,doesNotExceedSafeInteger$4=doesNotExceedSafeInteger$3$1,arraySpeciesCreate$4=arraySpeciesCreate$3$1,createProperty$1$1=createProperty$6$1,deletePropertyOrThrow$1$1=deletePropertyOrThrow$2$1,arrayMethodHasSpeciesSupport$1$1=arrayMethodHasSpeciesSupport$5$1,HAS_SPECIES_SUPPORT$1$1=arrayMethodHasSpeciesSupport$1$1("splice"),max$5=Math.max,min$4=Math.min;$$r$1({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1$1},{splice:function F(W,q){var K=toObject$4$1(this),X=lengthOfArrayLike$4$1(K),tt=toAbsoluteIndex$1$1(W,X),rt=arguments.length,ot,ut,yn,uo,po,mo;for(rt===0?ot=ut=0:rt===1?(ot=0,ut=X-tt):(ot=rt-2,ut=min$4(max$5(toIntegerOrInfinity$6(q),0),X-tt)),doesNotExceedSafeInteger$4(X+ot-ut),yn=arraySpeciesCreate$4(K,ut),uo=0;uoX-ut+ot;uo--)deletePropertyOrThrow$1$1(K,uo-1)}else if(ot>ut)for(uo=X-ut;uo>tt;uo--)po=uo+ut-1,mo=uo+ot-1,po in K?K[mo]=K[po]:deletePropertyOrThrow$1$1(K,mo);for(uo=0;uo1?arguments[1]:void 0)}});var entryVirtual$9$1=entryVirtual$i$1,includes$4$1=entryVirtual$9$1("Array").includes,isObject$8$1=isObject$j,classof$3$1=classofRaw$2$1,wellKnownSymbol$2$1=wellKnownSymbol$m$1,MATCH$1$1=wellKnownSymbol$2$1("match"),isRegexp$1=function(F){var W;return isObject$8$1(F)&&((W=F[MATCH$1$1])!==void 0?!!W:classof$3$1(F)==="RegExp")},isRegExp$1=isRegexp$1,$TypeError$5$1=TypeError,notARegexp$1=function(F){if(isRegExp$1(F))throw new $TypeError$5$1("The method doesn't accept regular expressions");return F},wellKnownSymbol$1$1=wellKnownSymbol$m$1,MATCH$2=wellKnownSymbol$1$1("match"),correctIsRegexpLogic$1=function(F){var W=/./;try{"/./"[F](W)}catch{try{return W[MATCH$2]=!1,"/./"[F](W)}catch{}}return!1},$$p$1=_export$1,uncurryThis$8$1=functionUncurryThis$1,notARegExp$1=notARegexp$1,requireObjectCoercible$1$1=requireObjectCoercible$5$1,toString$4$1=toString$a$1,correctIsRegExpLogic$1=correctIsRegexpLogic$1,stringIndexOf$1=uncurryThis$8$1("".indexOf);$$p$1({target:"String",proto:!0,forced:!correctIsRegExpLogic$1("includes")},{includes:function F(W){return!!~stringIndexOf$1(toString$4$1(requireObjectCoercible$1$1(this)),toString$4$1(notARegExp$1(W)),arguments.length>1?arguments[1]:void 0)}});var entryVirtual$8$1=entryVirtual$i$1,includes$3$1=entryVirtual$8$1("String").includes,isPrototypeOf$a$1=objectIsPrototypeOf$1,arrayMethod$1=includes$4$1,stringMethod$1=includes$3$1,ArrayPrototype$8$1=Array.prototype,StringPrototype$2=String.prototype,includes$2$1=function(F){var W=F.includes;return F===ArrayPrototype$8$1||isPrototypeOf$a$1(ArrayPrototype$8$1,F)&&W===ArrayPrototype$8$1.includes?arrayMethod$1:typeof F=="string"||F===StringPrototype$2||isPrototypeOf$a$1(StringPrototype$2,F)&&W===StringPrototype$2.includes?stringMethod$1:W},parent$D$1=includes$2$1,includes$1$1=parent$D$1,includes$5=includes$1$1,_includesInstanceProperty$1=getDefaultExportFromCjs$1(includes$5),$$o$1=_export$1,fails$b$1=fails$w,toObject$3$1=toObject$e$1,nativeGetPrototypeOf$1=objectGetPrototypeOf$2,CORRECT_PROTOTYPE_GETTER$2=correctPrototypeGetter$1,FAILS_ON_PRIMITIVES$2$1=fails$b$1(function(){nativeGetPrototypeOf$1(1)});$$o$1({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$2$1,sham:!CORRECT_PROTOTYPE_GETTER$2},{getPrototypeOf:function F(W){return nativeGetPrototypeOf$1(toObject$3$1(W))}});var path$k$1=path$w,getPrototypeOf$6$1=path$k$1.Object.getPrototypeOf,parent$C$1=getPrototypeOf$6$1,getPrototypeOf$5$1=parent$C$1,getPrototypeOf$4$1=getPrototypeOf$5$1,_Object$getPrototypeOf$1$1=getDefaultExportFromCjs$1(getPrototypeOf$4$1),$$n$1=_export$1,$filter$1=arrayIteration$1.filter,arrayMethodHasSpeciesSupport$6=arrayMethodHasSpeciesSupport$5$1,HAS_SPECIES_SUPPORT$4=arrayMethodHasSpeciesSupport$6("filter");$$n$1({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$4},{filter:function F(W){return $filter$1(this,W,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$7$1=entryVirtual$i$1,filter$3$1=entryVirtual$7$1("Array").filter,isPrototypeOf$9$1=objectIsPrototypeOf$1,method$7$1=filter$3$1,ArrayPrototype$7$1=Array.prototype,filter$2$1=function(F){var W=F.filter;return F===ArrayPrototype$7$1||isPrototypeOf$9$1(ArrayPrototype$7$1,F)&&W===ArrayPrototype$7$1.filter?method$7$1:W},parent$B$1=filter$2$1,filter$1$1=parent$B$1,filter$4=filter$1$1,_filterInstanceProperty$1=getDefaultExportFromCjs$1(filter$4),whitespaces$3$1=` \v\f\r                 \u2028\u2029\uFEFF`,uncurryThis$7$1=functionUncurryThis$1,requireObjectCoercible$7=requireObjectCoercible$5$1,toString$3$1=toString$a$1,whitespaces$2$1=whitespaces$3$1,replace$2=uncurryThis$7$1("".replace),ltrim$1=RegExp("^["+whitespaces$2$1+"]+"),rtrim$1=RegExp("(^|[^"+whitespaces$2$1+"])["+whitespaces$2$1+"]+$"),createMethod$1$1=function(F){return function(W){var q=toString$3$1(requireObjectCoercible$7(W));return F&1&&(q=replace$2(q,ltrim$1,"")),F&2&&(q=replace$2(q,rtrim$1,"$1")),q}},stringTrim$1={start:createMethod$1$1(1),end:createMethod$1$1(2),trim:createMethod$1$1(3)},global$9$1=global$n,fails$a$1=fails$w,uncurryThis$6$1=functionUncurryThis$1,toString$2$1=toString$a$1,trim$1$1=stringTrim$1.trim,whitespaces$1$1=whitespaces$3$1,$parseInt$1$1=global$9$1.parseInt,Symbol$2$1=global$9$1.Symbol,ITERATOR$1$1=Symbol$2$1&&Symbol$2$1.iterator,hex$1=/^[+-]?0x/i,exec$3=uncurryThis$6$1(hex$1.exec),FORCED$7$1=$parseInt$1$1(whitespaces$1$1+"08")!==8||$parseInt$1$1(whitespaces$1$1+"0x16")!==22||ITERATOR$1$1&&!fails$a$1(function(){$parseInt$1$1(Object(ITERATOR$1$1))}),numberParseInt$1=FORCED$7$1?function F(W,q){var K=trim$1$1(toString$2$1(W));return $parseInt$1$1(K,q>>>0||(exec$3(hex$1,K)?16:10))}:$parseInt$1$1,$$m$1=_export$1,$parseInt$2=numberParseInt$1;$$m$1({global:!0,forced:parseInt!==$parseInt$2},{parseInt:$parseInt$2});var path$j$1=path$w,_parseInt$3$1=path$j$1.parseInt,parent$A$1=_parseInt$3$1,_parseInt$2$1=parent$A$1,_parseInt$4=_parseInt$2$1,_parseInt$1$1=getDefaultExportFromCjs$1(_parseInt$4),$$l$1=_export$1,uncurryThis$5$1=functionUncurryThisClause$1,$indexOf$1=arrayIncludes$1.indexOf,arrayMethodIsStrict$4$1=arrayMethodIsStrict$6$1,nativeIndexOf$1=uncurryThis$5$1([].indexOf),NEGATIVE_ZERO$1=!!nativeIndexOf$1&&1/nativeIndexOf$1([1],1,-0)<0,FORCED$6$1=NEGATIVE_ZERO$1||!arrayMethodIsStrict$4$1("indexOf");$$l$1({target:"Array",proto:!0,forced:FORCED$6$1},{indexOf:function F(W){var q=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO$1?nativeIndexOf$1(this,W,q)||0:$indexOf$1(this,W,q)}});var entryVirtual$6$1=entryVirtual$i$1,indexOf$3$1=entryVirtual$6$1("Array").indexOf,isPrototypeOf$8$1=objectIsPrototypeOf$1,method$6$1=indexOf$3$1,ArrayPrototype$6$1=Array.prototype,indexOf$2$1=function(F){var W=F.indexOf;return F===ArrayPrototype$6$1||isPrototypeOf$8$1(ArrayPrototype$6$1,F)&&W===ArrayPrototype$6$1.indexOf?method$6$1:W},parent$z$1=indexOf$2$1,indexOf$1$1=parent$z$1,indexOf$6=indexOf$1$1,_indexOfInstanceProperty$1=getDefaultExportFromCjs$1(indexOf$6),$$k$1=_export$1,DESCRIPTORS$6$1=descriptors$1,create$8$1=objectCreate$1;$$k$1({target:"Object",stat:!0,sham:!DESCRIPTORS$6$1},{create:create$8$1});var path$i$1=path$w,Object$4$1=path$i$1.Object,create$7$1=function F(W,q){return Object$4$1.create(W,q)},parent$y$1=create$7$1,create$6$1=parent$y$1,create$5$1=create$6$1,_Object$create$1$1=getDefaultExportFromCjs$1(create$5$1),path$h$1=path$w,apply$2$1=functionApply$1;path$h$1.JSON||(path$h$1.JSON={stringify:JSON.stringify});var stringify$2$1=function F(W,q,K){return apply$2$1(path$h$1.JSON.stringify,null,arguments)},parent$x$1=stringify$2$1,stringify$1$1=parent$x$1,stringify$3=stringify$1$1,_JSON$stringify$1=getDefaultExportFromCjs$1(stringify$3),engineIsBun$1=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",$TypeError$4$1=TypeError,validateArgumentsLength$1$1=function(F,W){if(Fq,rt=isCallable$1$1(K)?K:Function$1$1(K),ot=tt?arraySlice$1$1(arguments,q):[],ut=tt?function(){apply$1$1(rt,this,ot)}:rt;return W?F(ut,X):F(ut)}:F},$$j$1=_export$1,global$7$1=global$n,schedulersFix$1$1=schedulersFix$2$1,setInterval$2$1=schedulersFix$1$1(global$7$1.setInterval,!0);$$j$1({global:!0,bind:!0,forced:global$7$1.setInterval!==setInterval$2$1},{setInterval:setInterval$2$1});var $$i$1=_export$1,global$6$1=global$n,schedulersFix$3=schedulersFix$2$1,setTimeout$3$1=schedulersFix$3(global$6$1.setTimeout,!0);$$i$1({global:!0,bind:!0,forced:global$6$1.setTimeout!==setTimeout$3$1},{setTimeout:setTimeout$3$1});var path$g$1=path$w,setTimeout$2$1=path$g$1.setTimeout,setTimeout$1$1=setTimeout$2$1,_setTimeout$1=getDefaultExportFromCjs$1(setTimeout$1$1),toObject$2$1=toObject$e$1,toAbsoluteIndex$6=toAbsoluteIndex$5$1,lengthOfArrayLike$3$1=lengthOfArrayLike$c$1,arrayFill$1=function F(W){for(var q=toObject$2$1(this),K=lengthOfArrayLike$3$1(q),X=arguments.length,tt=toAbsoluteIndex$6(X>1?arguments[1]:void 0,K),rt=X>2?arguments[2]:void 0,ot=rt===void 0?K:toAbsoluteIndex$6(rt,K);ot>tt;)q[tt++]=W;return q},$$h$1=_export$1,fill$4$1=arrayFill$1;$$h$1({target:"Array",proto:!0},{fill:fill$4$1});var entryVirtual$5$1=entryVirtual$i$1,fill$3$1=entryVirtual$5$1("Array").fill,isPrototypeOf$7$1=objectIsPrototypeOf$1,method$5$1=fill$3$1,ArrayPrototype$5$1=Array.prototype,fill$2$1=function(F){var W=F.fill;return F===ArrayPrototype$5$1||isPrototypeOf$7$1(ArrayPrototype$5$1,F)&&W===ArrayPrototype$5$1.fill?method$5$1:W},parent$w$1=fill$2$1,fill$1$1=parent$w$1,fill$5=fill$1$1,_fillInstanceProperty$1=getDefaultExportFromCjs$1(fill$5);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 @@ -4056,12 +4056,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `),q=q.replace(/\r/g,` `);var X=String(q).split(` `),tt=X.length;if(K.multi)for(var rt=0;rt0)for(var ut=0;ut0)for(var lf=0;lf")||K.parseStartTag("ital","")||K.parseStartTag("mono","")||K.parseEndTag("bold","")||K.parseEndTag("ital","")||K.parseEndTag("mono",""))||X(tt);rt||K.add(tt),K.position++}return K.emitBlock(),K.blocks}},{key:"splitMarkdownBlocks",value:function(q){for(var K=this,X=new MarkupAccumulator(q),tt=!0,rt=function(uo){return/\\/.test(uo)?(X.positionthis.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(q){for(var K="",X=0;X1&&arguments[1]!==void 0?arguments[1]:"normal",X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,K),q=q.replace(/^( +)/g,"$1\r"),q=q.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");for(var tt=q.split("\r");tt.length>0;){var rt=this.getLongestFit(tt);if(rt===0){var ot=tt[0],ut=this.getLongestFitWord(ot);this.lines.newLine(_sliceInstanceProperty$2(ot).call(ot,0,ut),K),tt[0]=_sliceInstanceProperty$2(ot).call(ot,ut)}else{var yn=rt;tt[rt-1]===" "?rt--:tt[yn]===" "&&yn++;var uo=_sliceInstanceProperty$2(tt).call(tt,0,rt).join("");rt==tt.length&&X?this.lines.append(uo,K):this.lines.newLine(uo,K),tt=_sliceInstanceProperty$2(tt).call(tt,yn)}}}}]),F}(),multiFontStyle=["bold","ital","boldital","mono"],Label=function(){function F(W,q){var K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;_classCallCheck$1(this,F),this.body=W,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(q),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=K}return _createClass$1(F,[{key:"setOptions",value:function(q){if(this.elementOptions=q,this.initFontOptions(q.font),isValidLabel(q.label)?this.labelDirty=!0:q.label=void 0,q.font!==void 0&&q.font!==null){if(typeof q.font=="string")this.baseSize=this.fontOptions.size;else if(_typeof$1(q.font)==="object"){var K=q.font.size;K!==void 0&&(this.baseSize=K)}}}},{key:"initFontOptions",value:function(q){var K=this;if(forEach$1$1(multiFontStyle,function(X){K.fontOptions[X]={}}),F.parseFontString(this.fontOptions,q)){this.fontOptions.vadjust=0;return}forEach$1$1(q,function(X,tt){X!=null&&_typeof$1(X)!=="object"&&(K.fontOptions[tt]=X)})}},{key:"constrain",value:function(q){var K={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},X=topMost$1(q,"widthConstraint");if(typeof X=="number")K.maxWdt=Number(X),K.minWdt=Number(X);else if(_typeof$1(X)==="object"){var tt=topMost$1(q,["widthConstraint","maximum"]);typeof tt=="number"&&(K.maxWdt=Number(tt));var rt=topMost$1(q,["widthConstraint","minimum"]);typeof rt=="number"&&(K.minWdt=Number(rt))}var ot=topMost$1(q,"heightConstraint");if(typeof ot=="number")K.minHgt=Number(ot);else if(_typeof$1(ot)==="object"){var ut=topMost$1(q,["heightConstraint","minimum"]);typeof ut=="number"&&(K.minHgt=Number(ut));var yn=topMost$1(q,["heightConstraint","valign"]);typeof yn=="string"&&(yn==="top"||yn==="bottom")&&(K.valign=yn)}return K}},{key:"update",value:function(q,K){this.setOptions(q,!0),this.propagateFonts(K),deepExtend$1(this.fontOptions,this.constrain(K)),this.fontOptions.chooser=choosify("label",K)}},{key:"adjustSizes",value:function(q){var K=q?q.right+q.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=K,this.fontOptions.minWdt-=K);var X=q?q.top+q.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=X)}},{key:"addFontOptionsToPile",value:function(q,K){for(var X=0;X5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label!==void 0){var ut=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&ut=this.elementOptions.scaling.label.maxVisible&&(ut=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(q,tt,rt,K,X,ot),this._drawBackground(q),this._drawText(q,K,this.size.yLine,ot,ut))}}},{key:"_drawBackground",value:function(q){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){q.fillStyle=this.fontOptions.background;var K=this.getSize();q.fillRect(K.left,K.top,K.width,K.height)}}},{key:"_drawText",value:function(q,K,X){var tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",rt=arguments.length>4?arguments[4]:void 0,ot=this._setAlignment(q,K,X,tt),ut=_slicedToArray$1(ot,2);K=ut[0],X=ut[1],q.textAlign="left",K=K-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(X-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(X+=(this.size.height-this.size.labelHeight)/2));for(var yn=0;yn0&&(q.lineWidth=wo.strokeWidth,q.strokeStyle=vf,q.lineJoin="round"),q.fillStyle=cf,wo.strokeWidth>0&&q.strokeText(wo.text,K+po,X+wo.vadjust),q.fillText(wo.text,K+po,X+wo.vadjust),po+=wo.width}X+=uo.height}}}},{key:"_setAlignment",value:function(q,K,X,tt){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){K=0,X=0;var rt=2;this.fontOptions.align==="top"?(q.textBaseline="alphabetic",X-=2*rt):this.fontOptions.align==="bottom"?(q.textBaseline="hanging",X+=2*rt):q.textBaseline="middle"}else q.textBaseline=tt;return[K,X]}},{key:"_getColor",value:function(q,K,X){var tt=q||"#000000",rt=X||"#ffffff";if(K<=this.elementOptions.scaling.label.drawThreshold){var ot=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-K)));tt=overrideOpacity$1(tt,ot),rt=overrideOpacity$1(rt,ot)}return[tt,rt]}},{key:"getTextSize",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(q,K,X),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var q=2,K=this.size.left,X=this.size.top-.5*q;if(this.isEdgeLabel){var tt=-this.size.width*.5;switch(this.fontOptions.align){case"middle":K=tt,X=-this.size.height*.5;break;case"top":K=tt,X=-(this.size.height+q);break;case"bottom":K=tt,X=q;break}}var rt={left:K,top:X,width:this.size.width,height:this.size.height};return rt}},{key:"calculateLabelSize",value:function(q,K,X){var tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,rt=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,ot=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(q,K,X),this.size.left=tt-this.size.width*.5,this.size.top=rt-this.size.height*.5,this.size.yLine=rt+(1-this.lineCount)*.5*this.fontOptions.size,ot==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(q,K,X,tt){var rt=function(uo,po,mo){return po==="normal"?mo==="mod"?"":uo[mo]:uo[po][mo]!==void 0?uo[po][mo]:uo[mo]},ot={color:rt(this.fontOptions,tt,"color"),size:rt(this.fontOptions,tt,"size"),face:rt(this.fontOptions,tt,"face"),mod:rt(this.fontOptions,tt,"mod"),vadjust:rt(this.fontOptions,tt,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(K||X)&&(tt==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?ot.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(ot,this.elementOptions.id,K,X));var ut="";return ot.mod!==void 0&&ot.mod!==""&&(ut+=ot.mod+" "),ut+=ot.size+"px "+ot.face,q.font=ut.replace(/"/g,""),ot.font=q.font,ot.height=ot.size,ot}},{key:"differentState",value:function(q,K){return q!==this.selectedState||K!==this.hoverState}},{key:"_processLabelText",value:function(q,K,X,tt){var rt=new LabelSplitter(q,this,K,X);return rt.process(tt)}},{key:"_processLabel",value:function(q,K,X){if(!(this.labelDirty===!1&&!this.differentState(K,X))){var tt=this._processLabelText(q,K,X,this.elementOptions.label);this.fontOptions.minWdt>0&&tt.width0&&tt.height0&&(this.enableBorderDashes(q,K),q.stroke(),this.disableBorderDashes(q,K)),q.restore()}},{key:"performFill",value:function(q,K){q.save(),q.fillStyle=K.color,this.enableShadow(q,K),_fillInstanceProperty$1(q).call(q),this.disableShadow(q,K),q.restore(),this.performStroke(q,K)}},{key:"_addBoundingBoxMargin",value:function(q){this.boundingBox.left-=q,this.boundingBox.top-=q,this.boundingBox.bottom+=q,this.boundingBox.right+=q}},{key:"_updateBoundingBox",value:function(q,K,X,tt,rt){X!==void 0&&this.resize(X,tt,rt),this.left=q-this.width/2,this.top=K-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(q,K,X,tt,rt){this._updateBoundingBox(q,K,X,tt,rt)}},{key:"getDimensionsFromLabel",value:function(q,K,X){this.textSize=this.labelModule.getTextSize(q,K,X);var tt=this.textSize.width,rt=this.textSize.height,ot=14;return tt===0&&(tt=ot,rt=ot),{width:tt,height:rt}}}]),F}();function _createSuper$s(F){var W=_isNativeReflectConstruct$s();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$s(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Box$1=function(F){_inherits$1(q,F);var W=_createSuper$s(q);function q(K,X,tt){var rt;return _classCallCheck$1(this,q),rt=W.call(this,K,X,tt),rt._setMargins(tt),rt}return _createClass$1(q,[{key:"resize",value:function(X){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(tt,rt)){var ot=this.getDimensionsFromLabel(X,tt,rt);this.width=ot.width+this.margin.right+this.margin.left,this.height=ot.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(X,tt,rt,ot,ut,yn){this.resize(X,ot,ut),this.left=tt-this.width/2,this.top=rt-this.height/2,this.initContextForDraw(X,yn),drawRoundRect(X,this.left,this.top,this.width,this.height,yn.borderRadius),this.performFill(X,yn),this.updateBoundingBox(tt,rt,X,ot,ut),this.labelModule.draw(X,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,ot,ut)}},{key:"updateBoundingBox",value:function(X,tt,rt,ot,ut){this._updateBoundingBox(X,tt,rt,ot,ut);var yn=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(yn)}},{key:"distanceToBorder",value:function(X,tt){X&&this.resize(X);var rt=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(tt)),Math.abs(this.height/2/Math.sin(tt)))+rt}}]),q}(NodeBase);function _createSuper$r(F){var W=_isNativeReflectConstruct$r();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$r(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var CircleImageBase=function(F){_inherits$1(q,F);var W=_createSuper$r(q);function q(K,X,tt){var rt;return _classCallCheck$1(this,q),rt=W.call(this,K,X,tt),rt.labelOffset=0,rt.selected=!1,rt}return _createClass$1(q,[{key:"setOptions",value:function(X,tt,rt){this.options=X,tt===void 0&&rt===void 0||this.setImages(tt,rt)}},{key:"setImages",value:function(X,tt){tt&&this.selected?(this.imageObj=tt,this.imageObjAlt=X):(this.imageObj=X,this.imageObjAlt=tt)}},{key:"switchImages",value:function(X){var tt=X&&!this.selected||!X&&this.selected;if(this.selected=X,this.imageObjAlt!==void 0&&tt){var rt=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=rt}}},{key:"_getImagePadding",value:function(){var X={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var tt=this.options.imagePadding;_typeof$1(tt)=="object"?(X.top=tt.top,X.right=tt.right,X.bottom=tt.bottom,X.left=tt.left):(X.top=tt,X.right=tt,X.bottom=tt,X.left=tt)}return X}},{key:"_resizeImage",value:function(){var X,tt;if(this.options.shapeProperties.useImageSize===!1){var rt=1,ot=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?rt=this.imageObj.width/this.imageObj.height:ot=this.imageObj.height/this.imageObj.width),X=this.options.size*2*rt,tt=this.options.size*2*ot}else{var ut=this._getImagePadding();X=this.imageObj.width+ut.left+ut.right,tt=this.imageObj.height+ut.top+ut.bottom}this.width=X,this.height=tt,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(X,tt,rt,ot){this.initContextForDraw(X,ot),drawCircle(X,tt,rt,ot.size),this.performFill(X,ot)}},{key:"_drawImageAtPosition",value:function(X,tt){if(this.imageObj.width!=0){X.globalAlpha=tt.opacity!==void 0?tt.opacity:1,this.enableShadow(X,tt);var rt=1;this.options.shapeProperties.interpolation===!0&&(rt=this.imageObj.width/this.width/this.body.view.scale);var ot=this._getImagePadding(),ut=this.left+ot.left,yn=this.top+ot.top,uo=this.width-ot.left-ot.right,po=this.height-ot.top-ot.bottom;this.imageObj.drawImageAtPosition(X,rt,ut,yn,uo,po),this.disableShadow(X,tt)}}},{key:"_drawImageLabel",value:function(X,tt,rt,ot,ut){var yn=0;if(this.height!==void 0){yn=this.height*.5;var uo=this.labelModule.getTextSize(X,ot,ut);uo.lineCount>=1&&(yn+=uo.height/2)}var po=rt+yn;this.options.label&&(this.labelOffset=yn),this.labelModule.draw(X,tt,po,ot,ut,"hanging")}}]),q}(NodeBase);function _createSuper$q(F){var W=_isNativeReflectConstruct$q();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$q(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Circle$1=function(F){_inherits$1(q,F);var W=_createSuper$q(q);function q(K,X,tt){var rt;return _classCallCheck$1(this,q),rt=W.call(this,K,X,tt),rt._setMargins(tt),rt}return _createClass$1(q,[{key:"resize",value:function(X){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(tt,rt)){var ot=this.getDimensionsFromLabel(X,tt,rt),ut=Math.max(ot.width+this.margin.right+this.margin.left,ot.height+this.margin.top+this.margin.bottom);this.options.size=ut/2,this.width=ut,this.height=ut,this.radius=this.width/2}}},{key:"draw",value:function(X,tt,rt,ot,ut,yn){this.resize(X,ot,ut),this.left=tt-this.width/2,this.top=rt-this.height/2,this._drawRawCircle(X,tt,rt,yn),this.updateBoundingBox(tt,rt),this.labelModule.draw(X,this.left+this.textSize.width/2+this.margin.left,rt,ot,ut)}},{key:"updateBoundingBox",value:function(X,tt){this.boundingBox.top=tt-this.options.size,this.boundingBox.left=X-this.options.size,this.boundingBox.right=X+this.options.size,this.boundingBox.bottom=tt+this.options.size}},{key:"distanceToBorder",value:function(X){return X&&this.resize(X),this.width*.5}}]),q}(CircleImageBase);function _createSuper$p(F){var W=_isNativeReflectConstruct$p();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$p(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var CircularImage=function(F){_inherits$1(q,F);var W=_createSuper$p(q);function q(K,X,tt,rt,ot){var ut;return _classCallCheck$1(this,q),ut=W.call(this,K,X,tt),ut.setImages(rt,ot),ut}return _createClass$1(q,[{key:"resize",value:function(X){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,ot=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(ot){var ut=this.options.size*2;this.width=ut,this.height=ut,this.radius=.5*this.width;return}this.needsRefresh(tt,rt)&&this._resizeImage()}},{key:"draw",value:function(X,tt,rt,ot,ut,yn){this.switchImages(ot),this.resize();var uo=tt,po=rt;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=tt,this.top=rt,uo+=this.width/2,po+=this.height/2):(this.left=tt-this.width/2,this.top=rt-this.height/2),this._drawRawCircle(X,uo,po,yn),X.save(),X.clip(),this._drawImageAtPosition(X,yn),X.restore(),this._drawImageLabel(X,uo,po,ot,ut),this.updateBoundingBox(tt,rt)}},{key:"updateBoundingBox",value:function(X,tt){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=tt,this.boundingBox.left=X,this.boundingBox.right=X+this.options.size*2,this.boundingBox.bottom=tt+this.options.size*2):(this.boundingBox.top=tt-this.options.size,this.boundingBox.left=X-this.options.size,this.boundingBox.right=X+this.options.size,this.boundingBox.bottom=tt+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(X){return X&&this.resize(X),this.width*.5}}]),q}(CircleImageBase);function _createSuper$o(F){var W=_isNativeReflectConstruct$o();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$o(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var ShapeBase=function(F){_inherits$1(q,F);var W=_createSuper$o(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"resize",value:function(X){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,ot=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(tt,rt)){var ut,yn;this.labelModule.getTextSize(X,tt,rt);var uo=2*ot.size;this.width=(ut=this.customSizeWidth)!==null&&ut!==void 0?ut:uo,this.height=(yn=this.customSizeHeight)!==null&&yn!==void 0?yn:uo,this.radius=.5*this.width}}},{key:"_drawShape",value:function(X,tt,rt,ot,ut,yn,uo,po){var mo=this;return this.resize(X,yn,uo,po),this.left=ot-this.width/2,this.top=ut-this.height/2,this.initContextForDraw(X,po),getShape(tt)(X,ot,ut,po.size),this.performFill(X,po),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(X.font=(yn?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),X.fillStyle=this.options.icon.color||"black",X.textAlign="center",X.textBaseline="middle",X.fillText(this.options.icon.code,ot,ut)),{drawExternalLabel:function(){if(mo.options.label!==void 0){mo.labelModule.calculateLabelSize(X,yn,uo,ot,ut,"hanging");var lf=ut+.5*mo.height+.5*mo.labelModule.size.height;mo.labelModule.draw(X,ot,lf,yn,uo,"hanging")}mo.updateBoundingBox(ot,ut)}}}},{key:"updateBoundingBox",value:function(X,tt){this.boundingBox.top=tt-this.options.size,this.boundingBox.left=X-this.options.size,this.boundingBox.right=X+this.options.size,this.boundingBox.bottom=tt+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),q}(NodeBase);function ownKeys$3$1(F,W){var q=_Object$keys$1(F);if(_Object$getOwnPropertySymbols$1){var K=_Object$getOwnPropertySymbols$1(F);W&&(K=_filterInstanceProperty$1(K).call(K,function(X){return _Object$getOwnPropertyDescriptor$1(F,X).enumerable})),q.push.apply(q,K)}return q}function _objectSpread$3(F){for(var W=1;W"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var CustomShape=function(F){_inherits$1(q,F);var W=_createSuper$n(q);function q(K,X,tt,rt){var ot;return _classCallCheck$1(this,q),ot=W.call(this,K,X,tt,rt),ot.ctxRenderer=rt,ot}return _createClass$1(q,[{key:"draw",value:function(X,tt,rt,ot,ut,yn){this.resize(X,ot,ut,yn),this.left=tt-this.width/2,this.top=rt-this.height/2,X.save();var uo=this.ctxRenderer({ctx:X,id:this.options.id,x:tt,y:rt,state:{selected:ot,hover:ut},style:_objectSpread$3({},yn),label:this.options.label});if(uo.drawNode!=null&&uo.drawNode(),X.restore(),uo.drawExternalLabel){var po=uo.drawExternalLabel;uo.drawExternalLabel=function(){X.save(),po(),X.restore()}}return uo.nodeDimensions&&(this.customSizeWidth=uo.nodeDimensions.width,this.customSizeHeight=uo.nodeDimensions.height),uo}},{key:"distanceToBorder",value:function(X,tt){return this._distanceToBorder(X,tt)}}]),q}(ShapeBase);function _createSuper$m(F){var W=_isNativeReflectConstruct$m();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$m(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Database=function(F){_inherits$1(q,F);var W=_createSuper$m(q);function q(K,X,tt){var rt;return _classCallCheck$1(this,q),rt=W.call(this,K,X,tt),rt._setMargins(tt),rt}return _createClass$1(q,[{key:"resize",value:function(X,tt,rt){if(this.needsRefresh(tt,rt)){var ot=this.getDimensionsFromLabel(X,tt,rt),ut=ot.width+this.margin.right+this.margin.left;this.width=ut,this.height=ut,this.radius=this.width/2}}},{key:"draw",value:function(X,tt,rt,ot,ut,yn){this.resize(X,ot,ut),this.left=tt-this.width/2,this.top=rt-this.height/2,this.initContextForDraw(X,yn),drawDatabase(X,tt-this.width/2,rt-this.height/2,this.width,this.height),this.performFill(X,yn),this.updateBoundingBox(tt,rt,X,ot,ut),this.labelModule.draw(X,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,ot,ut)}},{key:"distanceToBorder",value:function(X,tt){return this._distanceToBorder(X,tt)}}]),q}(NodeBase);function _createSuper$l(F){var W=_isNativeReflectConstruct$l();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$l(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Diamond$1=function(F){_inherits$1(q,F);var W=_createSuper$l(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"draw",value:function(X,tt,rt,ot,ut,yn){return this._drawShape(X,"diamond",4,tt,rt,ot,ut,yn)}},{key:"distanceToBorder",value:function(X,tt){return this._distanceToBorder(X,tt)}}]),q}(ShapeBase);function _createSuper$k(F){var W=_isNativeReflectConstruct$k();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$k(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Dot=function(F){_inherits$1(q,F);var W=_createSuper$k(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"draw",value:function(X,tt,rt,ot,ut,yn){return this._drawShape(X,"circle",2,tt,rt,ot,ut,yn)}},{key:"distanceToBorder",value:function(X){return X&&this.resize(X),this.options.size}}]),q}(ShapeBase);function _createSuper$j(F){var W=_isNativeReflectConstruct$j();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$j(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Ellipse=function(F){_inherits$1(q,F);var W=_createSuper$j(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"resize",value:function(X){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(tt,rt)){var ot=this.getDimensionsFromLabel(X,tt,rt);this.height=ot.height*2,this.width=ot.width+ot.height,this.radius=.5*this.width}}},{key:"draw",value:function(X,tt,rt,ot,ut,yn){this.resize(X,ot,ut),this.left=tt-this.width*.5,this.top=rt-this.height*.5,this.initContextForDraw(X,yn),drawEllipse(X,this.left,this.top,this.width,this.height),this.performFill(X,yn),this.updateBoundingBox(tt,rt,X,ot,ut),this.labelModule.draw(X,tt,rt,ot,ut)}},{key:"distanceToBorder",value:function(X,tt){X&&this.resize(X);var rt=this.width*.5,ot=this.height*.5,ut=Math.sin(tt)*rt,yn=Math.cos(tt)*ot;return rt*ot/Math.sqrt(ut*ut+yn*yn)}}]),q}(NodeBase);function _createSuper$i(F){var W=_isNativeReflectConstruct$i();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$i(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Icon=function(F){_inherits$1(q,F);var W=_createSuper$i(q);function q(K,X,tt){var rt;return _classCallCheck$1(this,q),rt=W.call(this,K,X,tt),rt._setMargins(tt),rt}return _createClass$1(q,[{key:"resize",value:function(X,tt,rt){this.needsRefresh(tt,rt)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(X,tt,rt,ot,ut,yn){var uo=this;return this.resize(X,ot,ut),this.options.icon.size=this.options.icon.size||50,this.left=tt-this.width/2,this.top=rt-this.height/2,this._icon(X,tt,rt,ot,ut,yn),{drawExternalLabel:function(){if(uo.options.label!==void 0){var mo=5;uo.labelModule.draw(X,uo.left+uo.iconSize.width/2+uo.margin.left,rt+uo.height/2+mo,ot)}uo.updateBoundingBox(tt,rt)}}}},{key:"updateBoundingBox",value:function(X,tt){if(this.boundingBox.top=tt-this.options.icon.size*.5,this.boundingBox.left=X-this.options.icon.size*.5,this.boundingBox.right=X+this.options.icon.size*.5,this.boundingBox.bottom=tt+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0){var rt=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+rt)}}},{key:"_icon",value:function(X,tt,rt,ot,ut,yn){var uo=Number(this.options.icon.size);this.options.icon.code!==void 0?(X.font=[this.options.icon.weight!=null?this.options.icon.weight:ot?"bold":"",(this.options.icon.weight!=null&&ot?5:0)+uo+"px",this.options.icon.face].join(" "),X.fillStyle=this.options.icon.color||"black",X.textAlign="center",X.textBaseline="middle",this.enableShadow(X,yn),X.fillText(this.options.icon.code,tt,rt),this.disableShadow(X,yn)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(X,tt){return this._distanceToBorder(X,tt)}}]),q}(NodeBase);function _createSuper$h(F){var W=_isNativeReflectConstruct$h();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$h(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Image$2=function(F){_inherits$1(q,F);var W=_createSuper$h(q);function q(K,X,tt,rt,ot){var ut;return _classCallCheck$1(this,q),ut=W.call(this,K,X,tt),ut.setImages(rt,ot),ut}return _createClass$1(q,[{key:"resize",value:function(X){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,ot=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(ot){var ut=this.options.size*2;this.width=ut,this.height=ut;return}this.needsRefresh(tt,rt)&&this._resizeImage()}},{key:"draw",value:function(X,tt,rt,ot,ut,yn){X.save(),this.switchImages(ot),this.resize();var uo=tt,po=rt;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=tt,this.top=rt,uo+=this.width/2,po+=this.height/2):(this.left=tt-this.width/2,this.top=rt-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){var mo=this.options.borderWidth,wo=this.options.borderWidthSelected||2*this.options.borderWidth,lf=(ot?wo:mo)/this.body.view.scale;X.lineWidth=Math.min(this.width,lf),X.beginPath();var yf=ot?this.options.color.highlight.border:ut?this.options.color.hover.border:this.options.color.border,cf=ot?this.options.color.highlight.background:ut?this.options.color.hover.background:this.options.color.background;yn.opacity!==void 0&&(yf=overrideOpacity$1(yf,yn.opacity),cf=overrideOpacity$1(cf,yn.opacity)),X.strokeStyle=yf,X.fillStyle=cf,X.rect(this.left-.5*X.lineWidth,this.top-.5*X.lineWidth,this.width+X.lineWidth,this.height+X.lineWidth),_fillInstanceProperty$1(X).call(X),this.performStroke(X,yn),X.closePath()}this._drawImageAtPosition(X,yn),this._drawImageLabel(X,uo,po,ot,ut),this.updateBoundingBox(tt,rt),X.restore()}},{key:"updateBoundingBox",value:function(X,tt){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=X,this.top=tt):(this.left=X-this.width/2,this.top=tt-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(X,tt){return this._distanceToBorder(X,tt)}}]),q}(CircleImageBase);function _createSuper$g(F){var W=_isNativeReflectConstruct$g();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$g(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Square=function(F){_inherits$1(q,F);var W=_createSuper$g(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"draw",value:function(X,tt,rt,ot,ut,yn){return this._drawShape(X,"square",2,tt,rt,ot,ut,yn)}},{key:"distanceToBorder",value:function(X,tt){return this._distanceToBorder(X,tt)}}]),q}(ShapeBase);function _createSuper$f(F){var W=_isNativeReflectConstruct$f();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$f(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Hexagon=function(F){_inherits$1(q,F);var W=_createSuper$f(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"draw",value:function(X,tt,rt,ot,ut,yn){return this._drawShape(X,"hexagon",4,tt,rt,ot,ut,yn)}},{key:"distanceToBorder",value:function(X,tt){return this._distanceToBorder(X,tt)}}]),q}(ShapeBase);function _createSuper$e(F){var W=_isNativeReflectConstruct$e();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$e(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Star=function(F){_inherits$1(q,F);var W=_createSuper$e(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"draw",value:function(X,tt,rt,ot,ut,yn){return this._drawShape(X,"star",4,tt,rt,ot,ut,yn)}},{key:"distanceToBorder",value:function(X,tt){return this._distanceToBorder(X,tt)}}]),q}(ShapeBase);function _createSuper$d(F){var W=_isNativeReflectConstruct$d();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$d(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Text=function(F){_inherits$1(q,F);var W=_createSuper$d(q);function q(K,X,tt){var rt;return _classCallCheck$1(this,q),rt=W.call(this,K,X,tt),rt._setMargins(tt),rt}return _createClass$1(q,[{key:"resize",value:function(X,tt,rt){this.needsRefresh(tt,rt)&&(this.textSize=this.labelModule.getTextSize(X,tt,rt),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(X,tt,rt,ot,ut,yn){this.resize(X,ot,ut),this.left=tt-this.width/2,this.top=rt-this.height/2,this.enableShadow(X,yn),this.labelModule.draw(X,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,ot,ut),this.disableShadow(X,yn),this.updateBoundingBox(tt,rt,X,ot,ut)}},{key:"distanceToBorder",value:function(X,tt){return this._distanceToBorder(X,tt)}}]),q}(NodeBase);function _createSuper$c$1(F){var W=_isNativeReflectConstruct$c$1();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$c$1(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Triangle$1=function(F){_inherits$1(q,F);var W=_createSuper$c$1(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"draw",value:function(X,tt,rt,ot,ut,yn){return this._drawShape(X,"triangle",3,tt,rt,ot,ut,yn)}},{key:"distanceToBorder",value:function(X,tt){return this._distanceToBorder(X,tt)}}]),q}(ShapeBase);function _createSuper$b$1(F){var W=_isNativeReflectConstruct$b$1();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$b$1(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var TriangleDown=function(F){_inherits$1(q,F);var W=_createSuper$b$1(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"draw",value:function(X,tt,rt,ot,ut,yn){return this._drawShape(X,"triangleDown",3,tt,rt,ot,ut,yn)}},{key:"distanceToBorder",value:function(X,tt){return this._distanceToBorder(X,tt)}}]),q}(ShapeBase);function ownKeys$2$1(F,W){var q=_Object$keys$1(F);if(_Object$getOwnPropertySymbols$1){var K=_Object$getOwnPropertySymbols$1(F);W&&(K=_filterInstanceProperty$1(K).call(K,function(X){return _Object$getOwnPropertyDescriptor$1(F,X).enumerable})),q.push.apply(q,K)}return q}function _objectSpread$2(F){for(var W=1;Wq.left&&this.shape.topq.top}},{key:"isBoundingBoxOverlappingWith",value:function(q){return this.shape.boundingBox.leftq.left&&this.shape.boundingBox.topq.top}}],[{key:"checkOpacity",value:function(q){return 0<=q&&q<=1}},{key:"checkCoordinateOrigin",value:function(q){return q===void 0||q==="center"||q==="top-left"}},{key:"updateGroupOptions",value:function(q,K,X){var tt;if(X!==void 0){var rt=q.group;if(K!==void 0&&K.group!==void 0&&rt!==K.group)throw new Error("updateGroupOptions: group values in options don't match.");var ot=typeof rt=="number"||typeof rt=="string"&&rt!="";if(ot){var ut=X.get(rt);ut.opacity!==void 0&&K.opacity===void 0&&(F.checkOpacity(ut.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+ut.opacity),ut.opacity=void 0));var yn=_filterInstanceProperty$1(tt=_Object$getOwnPropertyNames(K)).call(tt,function(uo){return K[uo]!=null});yn.push("font"),selectiveNotDeepExtend$1(yn,q,ut),q.color=parseColor$1(q.color)}}}},{key:"parseOptions",value:function(q,K){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},rt=arguments.length>4?arguments[4]:void 0,ot=["color","fixed","shadow"];if(selectiveNotDeepExtend$1(ot,q,K,X),F.checkMass(K),q.opacity!==void 0&&(F.checkOpacity(q.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+q.opacity),q.opacity=void 0)),K.opacity!==void 0&&(F.checkOpacity(K.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+K.opacity),K.opacity=void 0)),K.shapeProperties&&!F.checkCoordinateOrigin(K.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+K.shapeProperties.coordinateOrigin),mergeOptions$1(q,K,"shadow",tt),K.color!==void 0&&K.color!==null){var ut=parseColor$1(K.color);fillIfDefined$1(q.color,ut)}else X===!0&&K.color===null&&(q.color=bridgeObject$1(tt.color));K.fixed!==void 0&&K.fixed!==null&&(typeof K.fixed=="boolean"?(q.fixed.x=K.fixed,q.fixed.y=K.fixed):(K.fixed.x!==void 0&&typeof K.fixed.x=="boolean"&&(q.fixed.x=K.fixed.x),K.fixed.y!==void 0&&typeof K.fixed.y=="boolean"&&(q.fixed.y=K.fixed.y))),X===!0&&K.font===null&&(q.font=bridgeObject$1(tt.font)),F.updateGroupOptions(q,K,rt),K.scaling!==void 0&&mergeOptions$1(q.scaling,K.scaling,"label",tt.scaling)}},{key:"checkMass",value:function(q,K){if(q.mass!==void 0&&q.mass<=0){var X="";K!==void 0&&(X=" in node id: "+K),console.error("%cNegative or zero mass disallowed"+X+", setting mass to 1.",VALIDATOR_PRINT_STYLE$2),q.mass=1}}}]),F}();function _createForOfIteratorHelper$5$1(F,W){var q=typeof _Symbol$2<"u"&&_getIteratorMethod$2(F)||F["@@iterator"];if(!q){if(_Array$isArray$2(F)||(q=_unsupportedIterableToArray$5$1(F))||W&&F&&typeof F.length=="number"){q&&(F=q);var K=0,X=function(){};return{s:X,n:function(){return K>=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$5$1(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$5$1(F,W);var K=_sliceInstanceProperty$2(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$5$1(F,W)}}function _arrayLikeToArray$5$1(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+q.opacity):this.options.opacity=q.opacity),q.shape!==void 0)for(var K in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,K)&&this.body.nodes[K].updateShape();if(typeof q.font<"u"||typeof q.widthConstraint<"u"||typeof q.heightConstraint<"u")for(var X=0,tt=_Object$keys$1(this.body.nodes);X1&&arguments[1]!==void 0?arguments[1]:!1,X=this.body.data.nodes;if(isDataViewLike$1("id",q))this.body.data.nodes=q;else if(_Array$isArray$2(q))this.body.data.nodes=new DataSet,this.body.data.nodes.add(q);else if(!q)this.body.data.nodes=new DataSet;else throw new TypeError("Array or DataSet expected");if(X&&forEach$1$1(this.nodesListeners,function(ot,ut){X.off(ut,ot)}),this.body.nodes={},this.body.data.nodes){var tt=this;forEach$1$1(this.nodesListeners,function(ot,ut){tt.body.data.nodes.on(ut,ot)});var rt=this.body.data.nodes.getIds();this.add(rt,!0)}K===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(q){for(var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X,tt=[],rt=0;rt1&&arguments[1]!==void 0?arguments[1]:Node$1;return new K(q,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var q=this,K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;forEach$1$1(this.body.nodes,function(X,tt){var rt=q.body.data.nodes.get(tt);rt!==void 0&&(K===!0&&X.setOptions({x:null,y:null}),X.setOptions({fixed:!1}),X.setOptions(rt))})}},{key:"getPositions",value:function(q){var K={};if(q!==void 0){if(_Array$isArray$2(q)===!0){for(var X=0;X0?(ut=ot/rt,K+=ut*ut):K+=ot;return rt===1/0?1/0:rt*sqrt(K)}});var path$3$1=path$w,hypot$2=path$3$1.Math.hypot,parent$5$1=hypot$2,hypot$1=parent$5$1,hypot=hypot$1,_Math$hypot=getDefaultExportFromCjs$1(hypot);function _createSuper$a$1(F){var W=_isNativeReflectConstruct$a$1();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$a$1(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var EndPoint=function(){function F(){_classCallCheck$1(this,F)}return _createClass$1(F,null,[{key:"transform",value:function(q,K){_Array$isArray$2(q)||(q=[q]);for(var X=K.point.x,tt=K.point.y,rt=K.angle,ot=K.length,ut=0;ut4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();q.strokeStyle=this.getColor(q,K),q.lineWidth=K.width,K.dashes!==!1?this._drawDashedLine(q,K,rt):this._drawLine(q,K,rt)}},{key:"_drawLine",value:function(q,K,X,tt,rt){if(this.from!=this.to)this._line(q,K,X,tt,rt);else{var ot=this._getCircleData(q),ut=_slicedToArray$1(ot,3),yn=ut[0],uo=ut[1],po=ut[2];this._circle(q,K,yn,uo,po)}}},{key:"_drawDashedLine",value:function(q,K,X,tt,rt){q.lineCap="round";var ot=_Array$isArray$2(K.dashes)?K.dashes:[5,5];if(q.setLineDash!==void 0){if(q.save(),q.setLineDash(ot),q.lineDashOffset=0,this.from!=this.to)this._line(q,K,X);else{var ut=this._getCircleData(q),yn=_slicedToArray$1(ut,3),uo=yn[0],po=yn[1],mo=yn[2];this._circle(q,K,uo,po,mo)}q.setLineDash([0]),q.lineDashOffset=0,q.restore()}else{if(this.from!=this.to)drawDashedLine(q,this.from.x,this.from.y,this.to.x,this.to.y,ot);else{var wo=this._getCircleData(q),lf=_slicedToArray$1(wo,3),yf=lf[0],cf=lf[1],vf=lf[2];this._circle(q,K,yf,cf,vf)}this.enableShadow(q,K),q.stroke(),this.disableShadow(q,K)}}},{key:"findBorderPosition",value:function(q,K,X){return this.from!=this.to?this._findBorderPosition(q,K,X):this._findBorderPositionCircle(q,K,X)}},{key:"findBorderPositions",value:function(q){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,q),to:this._findBorderPosition(this.to,q)};var K,X=_sliceInstanceProperty$2(K=this._getCircleData(q)).call(K,0,2),tt=_slicedToArray$1(X,2),rt=tt[0],ot=tt[1];return{from:this._findBorderPositionCircle(this.from,q,{x:rt,y:ot,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,q,{x:rt,y:ot,low:.6,high:.8,direction:1})}}},{key:"_getCircleData",value:function(q){var K=this.options.selfReference.size;q!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(q);var X=getSelfRefCoordinates(q,this.options.selfReference.angle,K,this.from);return[X.x,X.y,K]}},{key:"_pointOnCircle",value:function(q,K,X,tt){var rt=tt*2*Math.PI;return{x:q+X*Math.cos(rt),y:K-X*Math.sin(rt)}}},{key:"_findBorderPositionCircle",value:function(q,K,X){var tt=X.x,rt=X.y,ot=X.low,ut=X.high,yn=X.direction,uo=10,po=this.options.selfReference.size,mo=.05,wo,lf=(ot+ut)*.5,yf=0;this.options.arrowStrikethrough===!0&&(yn===-1?yf=this.options.endPointOffset.from:yn===1&&(yf=this.options.endPointOffset.to));var cf=0;do{lf=(ot+ut)*.5,wo=this._pointOnCircle(tt,rt,po,lf);var vf=Math.atan2(q.y-wo.y,q.x-wo.x),_f=q.distanceToBorder(K,vf)+yf,$f=Math.sqrt(Math.pow(wo.x-q.x,2)+Math.pow(wo.y-q.y,2)),wf=_f-$f;if(Math.abs(wf)0?yn>0?ot=lf:ut=lf:yn>0?ut=lf:ot=lf,++cf}while(ot<=ut&&cf1?po=1:po<0&&(po=0);var mo=q+po*ut,wo=K+po*yn,lf=mo-rt,yf=wo-ot;return Math.sqrt(lf*lf+yf*yf)}},{key:"getArrowData",value:function(q,K,X,tt,rt,ot){var ut,yn,uo,po,mo,wo,lf,yf=ot.width;K==="from"?(uo=this.from,po=this.to,mo=ot.fromArrowScale<0,wo=Math.abs(ot.fromArrowScale),lf=ot.fromArrowType):K==="to"?(uo=this.to,po=this.from,mo=ot.toArrowScale<0,wo=Math.abs(ot.toArrowScale),lf=ot.toArrowType):(uo=this.to,po=this.from,mo=ot.middleArrowScale<0,wo=Math.abs(ot.middleArrowScale),lf=ot.middleArrowType);var cf=15*wo+3*yf;if(uo!=po){var vf=_Math$hypot(uo.x-po.x,uo.y-po.y),_f=cf/vf;if(K!=="middle")if(this.options.smooth.enabled===!0){var $f=this._findBorderPosition(uo,q,{via:X}),wf=this.getPoint($f.t+_f*(K==="from"?1:-1),X);ut=Math.atan2($f.y-wf.y,$f.x-wf.x),yn=$f}else ut=Math.atan2(uo.y-po.y,uo.x-po.x),yn=this._findBorderPosition(uo,q);else{var Pf=(mo?-_f:_f)/2,Cf=this.getPoint(.5+Pf,X),Af=this.getPoint(.5-Pf,X);ut=Math.atan2(Cf.y-Af.y,Cf.x-Af.x),yn=this.getPoint(.5,X)}}else{var Bf=this._getCircleData(q),Hf=_slicedToArray$1(Bf,3),Df=Hf[0],Lf=Hf[1],kf=Hf[2];if(K==="from"){var Nf=this.options.selfReference.angle,Yf=this.options.selfReference.angle+Math.PI,Gf=this._findBorderPositionCircle(this.from,q,{x:Df,y:Lf,low:Nf,high:Yf,direction:-1});ut=Gf.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,yn=Gf}else if(K==="to"){var rp=this.options.selfReference.angle,ip=this.options.selfReference.angle+Math.PI,ap=this._findBorderPositionCircle(this.from,q,{x:Df,y:Lf,low:rp,high:ip,direction:1});ut=ap.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,yn=ap}else{var yp=this.options.selfReference.angle/(2*Math.PI);yn=this._pointOnCircle(Df,Lf,kf,yp),ut=yp*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var vp=yn.x-cf*.9*Math.cos(ut),Np=yn.y-cf*.9*Math.sin(ut),jp={x:vp,y:Np};return{point:yn,core:jp,angle:ut,length:cf,type:lf}}},{key:"drawArrowHead",value:function(q,K,X,tt,rt){q.strokeStyle=this.getColor(q,K),q.fillStyle=q.strokeStyle,q.lineWidth=K.width;var ot=EndPoints.draw(q,rt);ot&&(this.enableShadow(q,K),_fillInstanceProperty$1(q).call(q),this.disableShadow(q,K))}},{key:"enableShadow",value:function(q,K){K.shadow===!0&&(q.shadowColor=K.shadowColor,q.shadowBlur=K.shadowSize,q.shadowOffsetX=K.shadowX,q.shadowOffsetY=K.shadowY)}},{key:"disableShadow",value:function(q,K){K.shadow===!0&&(q.shadowColor="rgba(0,0,0,0)",q.shadowBlur=0,q.shadowOffsetX=0,q.shadowOffsetY=0)}},{key:"drawBackground",value:function(q,K){if(K.background!==!1){var X={strokeStyle:q.strokeStyle,lineWidth:q.lineWidth,dashes:q.dashes};q.strokeStyle=K.backgroundColor,q.lineWidth=K.backgroundSize,this.setStrokeDashed(q,K.backgroundDashes),q.stroke(),q.strokeStyle=X.strokeStyle,q.lineWidth=X.lineWidth,q.dashes=X.dashes,this.setStrokeDashed(q,K.dashes)}}},{key:"setStrokeDashed",value:function(q,K){if(K!==!1)if(q.setLineDash!==void 0){var X=_Array$isArray$2(K)?K:[5,5];q.setLineDash(X)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else q.setLineDash!==void 0?q.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),F}();function ownKeys$7(F,W){var q=_Object$keys$1(F);if(_Object$getOwnPropertySymbols$1){var K=_Object$getOwnPropertySymbols$1(F);W&&(K=_filterInstanceProperty$1(K).call(K,function(X){return _Object$getOwnPropertyDescriptor$1(F,X).enumerable})),q.push.apply(q,K)}return q}function _objectSpread$4(F){for(var W=1;W"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var BezierEdgeBase=function(F){_inherits$1(q,F);var W=_createSuper$9$1(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"_findBorderPositionBezier",value:function(X,tt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),ot=10,ut=.2,yn=!1,uo=1,po=0,mo=this.to,wo,lf,yf=this.options.endPointOffset?this.options.endPointOffset.to:0;X.id===this.from.id&&(mo=this.from,yn=!0,yf=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(yf=0);var cf=0;do{lf=(po+uo)*.5,wo=this.getPoint(lf,rt);var vf=Math.atan2(mo.y-wo.y,mo.x-wo.x),_f=mo.distanceToBorder(tt,vf)+yf,$f=Math.sqrt(Math.pow(wo.x-mo.x,2)+Math.pow(wo.y-mo.y,2)),wf=_f-$f;if(Math.abs(wf)0&&(mo=this._getDistanceToLine(vf,_f,yf,cf,ut,yn),po=mo"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var BezierEdgeDynamic=function(F){_inherits$1(q,F);var W=_createSuper$8$1(q);function q(K,X,tt){var rt;return _classCallCheck$1(this,q),rt=W.call(this,K,X,tt),rt.via=rt.via,rt._boundFunction=function(){rt.positionBezierNode()},rt._body.emitter.on("_repositionBezierNodes",rt._boundFunction),rt}return _createClass$1(q,[{key:"setOptions",value:function(X){_get(_getPrototypeOf$1(q.prototype),"setOptions",this).call(this,X);var tt=!1;this.options.physics!==X.physics&&(tt=!0),this.options=X,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),tt===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}},{key:"cleanup",value:function(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}},{key:"setupSupportNode",value:function(){if(this.via===void 0){var X="edgeId:"+this.id,tt=this._body.functions.createNode({id:X,shape:"circle",physics:!0,hidden:!0});this._body.nodes[X]=tt,this.via=tt,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{key:"positionBezierNode",value:function(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}},{key:"_line",value:function(X,tt,rt){this._bezierCurve(X,tt,rt)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(X){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){var rt=this._getCircleData(),ot=_slicedToArray$1(rt,3),ut=ot[0],yn=ot[1],uo=ot[2],po=2*Math.PI*(1-X);return{x:ut+uo*Math.sin(po),y:yn+uo-uo*(1-Math.cos(po))}}else return{x:Math.pow(1-X,2)*this.fromPoint.x+2*X*(1-X)*tt.x+Math.pow(X,2)*this.toPoint.x,y:Math.pow(1-X,2)*this.fromPoint.y+2*X*(1-X)*tt.y+Math.pow(X,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(X,tt){return this._findBorderPositionBezier(X,tt,this.via)}},{key:"_getDistanceToEdge",value:function(X,tt,rt,ot,ut,yn){return this._getDistanceToBezierEdge(X,tt,rt,ot,ut,yn,this.via)}}]),q}(BezierEdgeBase);function _createSuper$7$1(F){var W=_isNativeReflectConstruct$7$1();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$7$1(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var BezierEdgeStatic=function(F){_inherits$1(q,F);var W=_createSuper$7$1(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"_line",value:function(X,tt,rt){this._bezierCurve(X,tt,rt)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var X=this.options.smooth.roundness,tt=this.options.smooth.type,rt=Math.abs(this.from.x-this.to.x),ot=Math.abs(this.from.y-this.to.y);if(tt==="discrete"||tt==="diagonalCross"){var ut,yn;rt<=ot?ut=yn=X*ot:ut=yn=X*rt,this.from.x>this.to.x&&(ut=-ut),this.from.y>=this.to.y&&(yn=-yn);var uo=this.from.x+ut,po=this.from.y+yn;return tt==="discrete"&&(rt<=ot?uo=rtthis.to.x&&(Bf=-Bf),this.from.y>=this.to.y&&(Hf=-Hf);var Df=this.from.x+Bf,Lf=this.from.y+Hf;return rt<=ot?this.from.x<=this.to.x?Df=this.to.xDf?this.to.x:Df:this.from.y>=this.to.y?Lf=this.to.y>Lf?this.to.y:Lf:Lf=this.to.y2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(X,tt,rt.via)}},{key:"_getDistanceToEdge",value:function(X,tt,rt,ot,ut,yn){var uo=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(X,tt,rt,ot,ut,yn,uo)}},{key:"getPoint",value:function(X){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),rt=X,ot=Math.pow(1-rt,2)*this.fromPoint.x+2*rt*(1-rt)*tt.x+Math.pow(rt,2)*this.toPoint.x,ut=Math.pow(1-rt,2)*this.fromPoint.y+2*rt*(1-rt)*tt.y+Math.pow(rt,2)*this.toPoint.y;return{x:ot,y:ut}}}]),q}(BezierEdgeBase);function _createSuper$6$1(F){var W=_isNativeReflectConstruct$6$1();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$6$1(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var CubicBezierEdgeBase=function(F){_inherits$1(q,F);var W=_createSuper$6$1(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"_getDistanceToBezierEdge2",value:function(X,tt,rt,ot,ut,yn,uo,po){for(var mo=1e9,wo=X,lf=tt,yf=[0,0,0,0],cf=1;cf<10;cf++){var vf=.1*cf;yf[0]=Math.pow(1-vf,3),yf[1]=3*vf*Math.pow(1-vf,2),yf[2]=3*Math.pow(vf,2)*(1-vf),yf[3]=Math.pow(vf,3);var _f=yf[0]*X+yf[1]*uo.x+yf[2]*po.x+yf[3]*rt,$f=yf[0]*tt+yf[1]*uo.y+yf[2]*po.y+yf[3]*ot;if(cf>0){var wf=this._getDistanceToLine(wo,lf,_f,$f,ut,yn);mo=wf"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var CubicBezierEdge=function(F){_inherits$1(q,F);var W=_createSuper$5$1(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"_line",value:function(X,tt,rt){var ot=rt[0],ut=rt[1];this._bezierCurve(X,tt,ot,ut)}},{key:"_getViaCoordinates",value:function(){var X=this.from.x-this.to.x,tt=this.from.y-this.to.y,rt,ot,ut,yn,uo=this.options.smooth.roundness;return(Math.abs(X)>Math.abs(tt)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(ot=this.from.y,yn=this.to.y,rt=this.from.x-uo*X,ut=this.to.x+uo*X):(ot=this.from.y-uo*tt,yn=this.to.y+uo*tt,rt=this.from.x,ut=this.to.x),[{x:rt,y:ot},{x:ut,y:yn}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(X,tt){return this._findBorderPositionBezier(X,tt)}},{key:"_getDistanceToEdge",value:function(X,tt,rt,ot,ut,yn){var uo=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),po=_slicedToArray$1(uo,2),mo=po[0],wo=po[1];return this._getDistanceToBezierEdge2(X,tt,rt,ot,ut,yn,mo,wo)}},{key:"getPoint",value:function(X){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),rt=_slicedToArray$1(tt,2),ot=rt[0],ut=rt[1],yn=X,uo=[Math.pow(1-yn,3),3*yn*Math.pow(1-yn,2),3*Math.pow(yn,2)*(1-yn),Math.pow(yn,3)],po=uo[0]*this.fromPoint.x+uo[1]*ot.x+uo[2]*ut.x+uo[3]*this.toPoint.x,mo=uo[0]*this.fromPoint.y+uo[1]*ot.y+uo[2]*ut.y+uo[3]*this.toPoint.y;return{x:po,y:mo}}}]),q}(CubicBezierEdgeBase);function _createSuper$4$1(F){var W=_isNativeReflectConstruct$4$1();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$4$1(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var StraightEdge=function(F){_inherits$1(q,F);var W=_createSuper$4$1(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"_line",value:function(X,tt){X.beginPath(),X.moveTo(this.fromPoint.x,this.fromPoint.y),X.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(X,tt),X.stroke(),this.disableShadow(X,tt)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(X){return{x:(1-X)*this.fromPoint.x+X*this.toPoint.x,y:(1-X)*this.fromPoint.y+X*this.toPoint.y}}},{key:"_findBorderPosition",value:function(X,tt){var rt=this.to,ot=this.from;X.id===this.from.id&&(rt=this.from,ot=this.to);var ut=Math.atan2(rt.y-ot.y,rt.x-ot.x),yn=rt.x-ot.x,uo=rt.y-ot.y,po=Math.sqrt(yn*yn+uo*uo),mo=X.distanceToBorder(tt,ut),wo=(po-mo)/po;return{x:(1-wo)*ot.x+wo*rt.x,y:(1-wo)*ot.y+wo*rt.y,t:0}}},{key:"_getDistanceToEdge",value:function(X,tt,rt,ot,ut,yn){return this._getDistanceToLine(X,tt,rt,ot,ut,yn)}}]),q}(EdgeBase),Edge=function(){function F(W,q,K,X,tt){if(_classCallCheck$1(this,F),q===void 0)throw new Error("No body provided");this.options=bridgeObject$1(X),this.globalOptions=X,this.defaultOptions=tt,this.body=q,this.imagelist=K,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new Label(this.body,this.options,!0),this.setOptions(W)}return _createClass$1(F,[{key:"setOptions",value:function(q){if(q){var K=typeof q.physics<"u"&&this.options.physics!==q.physics||typeof q.hidden<"u"&&(this.options.hidden||!1)!==(q.hidden||!1)||typeof q.from<"u"&&this.options.from!==q.from||typeof q.to<"u"&&this.options.to!==q.to;F.parseOptions(this.options,q,!0,this.globalOptions),q.id!==void 0&&(this.id=q.id),q.from!==void 0&&(this.fromId=q.from),q.to!==void 0&&(this.toId=q.to),q.title!==void 0&&(this.title=q.title),q.value!==void 0&&(q.value=_parseFloat$1$1(q.value));var X=[q,this.options,this.defaultOptions];return this.chooser=choosify("edge",X),this.updateLabelModule(q),K=this.updateEdgeType()||K,this._setInteractionWidths(),this.connect(),K}}},{key:"getFormattingValues",value:function(){var q=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,K=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,X=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,tt=this.options.color.inherit,rt={toArrow:q,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:X,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:K,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:tt?void 0:this.options.color.color,inheritsColor:tt,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){var ot=this.options.selectionWidth;typeof ot=="function"?rt.width=ot(rt.width):typeof ot=="number"&&(rt.width+=ot),rt.width=Math.max(rt.width,.3/this.body.view.scale),rt.color=this.options.color.highlight,rt.shadow=this.options.shadow.enabled}else if(this.hover){var ut=this.options.hoverWidth;typeof ut=="function"?rt.width=ut(rt.width):typeof ut=="number"&&(rt.width+=ut),rt.width=Math.max(rt.width,.3/this.body.view.scale),rt.color=this.options.color.hover,rt.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(rt,this.options.id,this.selected,this.hover),rt.color!==void 0&&(rt.inheritsColor=!1),rt.shadow===!1&&(rt.shadowColor!==this.options.shadow.color||rt.shadowSize!==this.options.shadow.size||rt.shadowX!==this.options.shadow.x||rt.shadowY!==this.options.shadow.y)&&(rt.shadow=!0));else rt.shadow=this.options.shadow.enabled,rt.width=Math.max(rt.width,.3/this.body.view.scale);return rt}},{key:"updateLabelModule",value:function(q){var K=[q,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,K),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var q=this.options.smooth,K=!1,X=!0;return this.edgeType!==void 0&&((this.edgeType instanceof BezierEdgeDynamic&&q.enabled===!0&&q.type==="dynamic"||this.edgeType instanceof CubicBezierEdge&&q.enabled===!0&&q.type==="cubicBezier"||this.edgeType instanceof BezierEdgeStatic&&q.enabled===!0&&q.type!=="dynamic"&&q.type!=="cubicBezier"||this.edgeType instanceof StraightEdge&&q.type.enabled===!1)&&(X=!1),X===!0&&(K=this.cleanup())),X===!0?q.enabled===!0?q.type==="dynamic"?(K=!0,this.edgeType=new BezierEdgeDynamic(this.options,this.body,this.labelModule)):q.type==="cubicBezier"?this.edgeType=new CubicBezierEdge(this.options,this.body,this.labelModule):this.edgeType=new BezierEdgeStatic(this.options,this.body,this.labelModule):this.edgeType=new StraightEdge(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),K}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(q,K,X){if(this.options.value!==void 0){var tt=this.options.scaling.customScalingFunction(q,K,X,this.options.value),rt=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var ot=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+tt*ot}this.options.width=this.options.scaling.min+tt*rt}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(q){var K=this.getFormattingValues();if(!K.hidden){var X=this.edgeType.getViaNode();this.edgeType.drawLine(q,K,this.selected,this.hover,X),this.drawLabel(q,X)}}},{key:"drawArrows",value:function(q){var K=this.getFormattingValues();if(!K.hidden){var X=this.edgeType.getViaNode(),tt={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,K.fromArrow&&(tt.from=this.edgeType.getArrowData(q,"from",X,this.selected,this.hover,K),K.arrowStrikethrough===!1&&(this.edgeType.fromPoint=tt.from.core),K.fromArrowSrc&&(tt.from.image=this.imagelist.load(K.fromArrowSrc)),K.fromArrowImageWidth&&(tt.from.imageWidth=K.fromArrowImageWidth),K.fromArrowImageHeight&&(tt.from.imageHeight=K.fromArrowImageHeight)),K.toArrow&&(tt.to=this.edgeType.getArrowData(q,"to",X,this.selected,this.hover,K),K.arrowStrikethrough===!1&&(this.edgeType.toPoint=tt.to.core),K.toArrowSrc&&(tt.to.image=this.imagelist.load(K.toArrowSrc)),K.toArrowImageWidth&&(tt.to.imageWidth=K.toArrowImageWidth),K.toArrowImageHeight&&(tt.to.imageHeight=K.toArrowImageHeight)),K.middleArrow&&(tt.middle=this.edgeType.getArrowData(q,"middle",X,this.selected,this.hover,K),K.middleArrowSrc&&(tt.middle.image=this.imagelist.load(K.middleArrowSrc)),K.middleArrowImageWidth&&(tt.middle.imageWidth=K.middleArrowImageWidth),K.middleArrowImageHeight&&(tt.middle.imageHeight=K.middleArrowImageHeight)),K.fromArrow&&this.edgeType.drawArrowHead(q,K,this.selected,this.hover,tt.from),K.middleArrow&&this.edgeType.drawArrowHead(q,K,this.selected,this.hover,tt.middle),K.toArrow&&this.edgeType.drawArrowHead(q,K,this.selected,this.hover,tt.to)}}},{key:"drawLabel",value:function(q,K){if(this.options.label!==void 0){var X=this.from,tt=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(q,this.selected,this.hover);var rt;if(X.id!=tt.id){this.labelModule.pointToSelf=!1,rt=this.edgeType.getPoint(.5,K),q.save();var ot=this._getRotation(q);ot.angle!=0&&(q.translate(ot.x,ot.y),q.rotate(ot.angle)),this.labelModule.draw(q,rt.x,rt.y,this.selected,this.hover),q.restore()}else{this.labelModule.pointToSelf=!0;var ut=getSelfRefCoordinates(q,this.options.selfReference.angle,this.options.selfReference.size,X);rt=this._pointOnCircle(ut.x,ut.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(q,rt.x,rt.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(q){var K=[];if(this.labelModule.visible()){var X=this._getRotation();pointInRect(this.labelModule.getSize(),q,X)&&K.push({edgeId:this.id,labelId:0})}var tt={left:q.x,top:q.y};return this.isOverlappingWith(tt)&&K.push({edgeId:this.id}),K}},{key:"isOverlappingWith",value:function(q){if(this.connected){var K=10,X=this.from.x,tt=this.from.y,rt=this.to.x,ot=this.to.y,ut=q.left,yn=q.top,uo=this.edgeType.getDistanceToEdge(X,tt,rt,ot,ut,yn);return uo0&&ot<0)&&(ut+=Math.PI),tt.angle=ut,tt}},{key:"_pointOnCircle",value:function(q,K,X,tt){return{x:q+X*Math.cos(tt),y:K-X*Math.sin(tt)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}],[{key:"parseOptions",value:function(q,K){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},rt=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,ot=["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"];if(selectiveDeepExtend$1(ot,q,K,X),K.endPointOffset!==void 0&&K.endPointOffset.from!==void 0&&(_Number$isFinite(K.endPointOffset.from)?q.endPointOffset.from=K.endPointOffset.from:(q.endPointOffset.from=tt.endPointOffset.from!==void 0?tt.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),K.endPointOffset!==void 0&&K.endPointOffset.to!==void 0&&(_Number$isFinite(K.endPointOffset.to)?q.endPointOffset.to=K.endPointOffset.to:(q.endPointOffset.to=tt.endPointOffset.to!==void 0?tt.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),isValidLabel(K.label)?q.label=K.label:isValidLabel(q.label)||(q.label=void 0),mergeOptions$1(q,K,"smooth",tt),mergeOptions$1(q,K,"shadow",tt),mergeOptions$1(q,K,"background",tt),K.dashes!==void 0&&K.dashes!==null?q.dashes=K.dashes:X===!0&&K.dashes===null&&(q.dashes=_Object$create$1$1(tt.dashes)),K.scaling!==void 0&&K.scaling!==null?(K.scaling.min!==void 0&&(q.scaling.min=K.scaling.min),K.scaling.max!==void 0&&(q.scaling.max=K.scaling.max),mergeOptions$1(q.scaling,K.scaling,"label",tt.scaling)):X===!0&&K.scaling===null&&(q.scaling=_Object$create$1$1(tt.scaling)),K.arrows!==void 0&&K.arrows!==null)if(typeof K.arrows=="string"){var ut=K.arrows.toLowerCase();q.arrows.to.enabled=_indexOfInstanceProperty$1(ut).call(ut,"to")!=-1,q.arrows.middle.enabled=_indexOfInstanceProperty$1(ut).call(ut,"middle")!=-1,q.arrows.from.enabled=_indexOfInstanceProperty$1(ut).call(ut,"from")!=-1}else if(_typeof$1(K.arrows)==="object")mergeOptions$1(q.arrows,K.arrows,"to",tt.arrows),mergeOptions$1(q.arrows,K.arrows,"middle",tt.arrows),mergeOptions$1(q.arrows,K.arrows,"from",tt.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+_JSON$stringify$1(K.arrows));else X===!0&&K.arrows===null&&(q.arrows=_Object$create$1$1(tt.arrows));if(K.color!==void 0&&K.color!==null){var yn=isString$2(K.color)?{color:K.color,highlight:K.color,hover:K.color,inherit:!1,opacity:1}:K.color,uo=q.color;if(rt)deepExtend$1(uo,tt.color,!1,X);else for(var po in uo)Object.prototype.hasOwnProperty.call(uo,po)&&delete uo[po];if(isString$2(uo))uo.color=uo,uo.highlight=uo,uo.hover=uo,uo.inherit=!1,yn.opacity===void 0&&(uo.opacity=1);else{var mo=!1;yn.color!==void 0&&(uo.color=yn.color,mo=!0),yn.highlight!==void 0&&(uo.highlight=yn.highlight,mo=!0),yn.hover!==void 0&&(uo.hover=yn.hover,mo=!0),yn.inherit!==void 0&&(uo.inherit=yn.inherit),yn.opacity!==void 0&&(uo.opacity=Math.min(1,Math.max(0,yn.opacity))),mo===!0?uo.inherit=!1:uo.inherit===void 0&&(uo.inherit="from")}}else X===!0&&K.color===null&&(q.color=bridgeObject$1(tt.color));X===!0&&K.font===null&&(q.font=bridgeObject$1(tt.font)),Object.prototype.hasOwnProperty.call(K,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),q.selfReference.size=K.selfReferenceSize)}}]),F}(),EdgesHandler=function(){function F(W,q,K){var X,tt=this;_classCallCheck$1(this,F),this.body=W,this.images=q,this.groups=K,this.body.functions.createEdge=_bindInstanceProperty$1$1(X=this.create).call(X,this),this.edgesListeners={add:function(ot,ut){tt.add(ut.items)},update:function(ot,ut){tt.update(ut.items)},remove:function(ot,ut){tt.remove(ut.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(ot,ut,yn,uo){if(ut===ot)return .5;var po=1/(ut-ot);return Math.max(0,(uo-ot)*po)}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},deepExtend$1(this.options,this.defaultOptions),this.bindEventListeners()}return _createClass$1(F,[{key:"bindEventListeners",value:function(){var q=this,K,X;this.body.emitter.on("_forceDisableDynamicCurves",function(tt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;tt==="dynamic"&&(tt="continuous");var ot=!1;for(var ut in q.body.edges)if(Object.prototype.hasOwnProperty.call(q.body.edges,ut)){var yn=q.body.edges[ut],uo=q.body.data.edges.get(ut);if(uo!=null){var po=uo.smooth;po!==void 0&&po.enabled===!0&&po.type==="dynamic"&&(tt===void 0?yn.setOptions({smooth:!1}):yn.setOptions({smooth:{type:tt}}),ot=!0)}}rt===!0&&ot===!0&&q.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){q.reconnectEdges()}),this.body.emitter.on("refreshEdges",_bindInstanceProperty$1$1(K=this.refresh).call(K,this)),this.body.emitter.on("refresh",_bindInstanceProperty$1$1(X=this.refresh).call(X,this)),this.body.emitter.on("destroy",function(){forEach$1$1(q.edgesListeners,function(tt,rt){q.body.data.edges&&q.body.data.edges.off(rt,tt)}),delete q.body.functions.createEdge,delete q.edgesListeners.add,delete q.edgesListeners.update,delete q.edgesListeners.remove,delete q.edgesListeners})}},{key:"setOptions",value:function(q){if(q!==void 0){Edge.parseOptions(this.options,q,!0,this.defaultOptions,!0);var K=!1;if(q.smooth!==void 0)for(var X in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,X)&&(K=this.body.edges[X].updateEdgeType()||K);if(q.font!==void 0)for(var tt in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,tt)&&this.body.edges[tt].updateLabelModule();(q.hidden!==void 0||q.physics!==void 0||K===!0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(q){var K=this,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tt=this.body.data.edges;if(isDataViewLike$1("id",q))this.body.data.edges=q;else if(_Array$isArray$2(q))this.body.data.edges=new DataSet,this.body.data.edges.add(q);else if(!q)this.body.data.edges=new DataSet;else throw new TypeError("Array or DataSet expected");if(tt&&forEach$1$1(this.edgesListeners,function(ot,ut){tt.off(ut,ot)}),this.body.edges={},this.body.data.edges){forEach$1$1(this.edgesListeners,function(ot,ut){K.body.data.edges.on(ut,ot)});var rt=this.body.data.edges.getIds();this.add(rt,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),X===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(q){for(var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X=this.body.edges,tt=this.body.data.edges,rt=0;rt1&&arguments[1]!==void 0?arguments[1]:!0;if(q.length!==0){var X=this.body.edges;forEach$1$1(q,function(tt){var rt=X[tt];rt!==void 0&&rt.remove()}),K&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var q=this;forEach$1$1(this.body.edges,function(K,X){var tt=q.body.data.edges.get(X);tt!==void 0&&K.setOptions(tt)})}},{key:"create",value:function(q){return new Edge(q,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var q,K=this.body.nodes,X=this.body.edges;for(q in K)Object.prototype.hasOwnProperty.call(K,q)&&(K[q].edges=[]);for(q in X)if(Object.prototype.hasOwnProperty.call(X,q)){var tt=X[q];tt.from=null,tt.to=null,tt.connect()}}},{key:"getConnectedNodes",value:function(q){var K=[];if(this.body.edges[q]!==void 0){var X=this.body.edges[q];X.fromId!==void 0&&K.push(X.fromId),X.toId!==void 0&&K.push(X.toId)}return K}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var q=this,K=[];forEach$1$1(this.body.edges,function(X,tt){var rt=q.body.nodes[X.toId],ot=q.body.nodes[X.fromId];rt!==void 0&&rt.isCluster===!0||ot!==void 0&&ot.isCluster===!0||(rt===void 0||ot===void 0)&&K.push(tt)}),this.remove(K,!1)}},{key:"_addMissingEdges",value:function(){var q=this.body.data.edges;if(q!=null){var K=this.body.edges,X=[];_forEachInstanceProperty$1(q).call(q,function(tt,rt){var ot=K[rt];ot===void 0&&X.push(rt)}),this.add(X,!0)}}}]),F}(),BarnesHutSolver=function(){function F(W,q,K){_classCallCheck$1(this,F),this.body=W,this.physicsBody=q,this.barnesHutTree,this.setOptions(K),this._rng=Alea$1("BARNES HUT SOLVER")}return _createClass$1(F,[{key:"setOptions",value:function(q){this.options=q,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"solve",value:function(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){var q,K=this.body.nodes,X=this.physicsBody.physicsNodeIndices,tt=X.length,rt=this._formBarnesHutTree(K,X);this.barnesHutTree=rt;for(var ot=0;ot0&&this._getForceContributions(rt.root,q)}}},{key:"_getForceContributions",value:function(q,K){this._getForceContribution(q.children.NW,K),this._getForceContribution(q.children.NE,K),this._getForceContribution(q.children.SW,K),this._getForceContribution(q.children.SE,K)}},{key:"_getForceContribution",value:function(q,K){if(q.childrenCount>0){var X=q.centerOfMass.x-K.x,tt=q.centerOfMass.y-K.y,rt=Math.sqrt(X*X+tt*tt);rt*q.calcSize>this.thetaInversed?this._calculateForces(rt,X,tt,K,q):q.childrenCount===4?this._getForceContributions(q,K):q.children.data.id!=K.id&&this._calculateForces(rt,X,tt,K,q)}}},{key:"_calculateForces",value:function(q,K,X,tt,rt){q===0&&(q=.1,K=q),this.overlapAvoidanceFactor<1&&tt.shape.radius&&(q=Math.max(.1+this.overlapAvoidanceFactor*tt.shape.radius,q-tt.shape.radius));var ot=this.options.gravitationalConstant*rt.mass*tt.options.mass/Math.pow(q,3),ut=K*ot,yn=X*ot;this.physicsBody.forces[tt.id].x+=ut,this.physicsBody.forces[tt.id].y+=yn}},{key:"_formBarnesHutTree",value:function(q,K){for(var X,tt=K.length,rt=q[K[0]].x,ot=q[K[0]].y,ut=q[K[0]].x,yn=q[K[0]].y,uo=1;uo0&&(mout&&(ut=mo),woyn&&(yn=wo))}var lf=Math.abs(ut-rt)-Math.abs(yn-ot);lf>0?(ot-=.5*lf,yn+=.5*lf):(rt+=.5*lf,ut-=.5*lf);var yf=1e-5,cf=Math.max(yf,Math.abs(ut-rt)),vf=.5*cf,_f=.5*(rt+ut),$f=.5*(ot+yn),wf={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:_f-vf,maxX:_f+vf,minY:$f-vf,maxY:$f+vf},size:cf,calcSize:1/cf,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(wf.root);for(var Pf=0;Pf0&&this._placeInTree(wf.root,X);return wf}},{key:"_updateBranchMass",value:function(q,K){var X=q.centerOfMass,tt=q.mass+K.options.mass,rt=1/tt;X.x=X.x*q.mass+K.x*K.options.mass,X.x*=rt,X.y=X.y*q.mass+K.y*K.options.mass,X.y*=rt,q.mass=tt;var ot=Math.max(Math.max(K.height,K.radius),K.width);q.maxWidth=q.maxWidthK.x?tt.maxY>K.y?rt="NW":rt="SW":tt.maxY>K.y?rt="NE":rt="SE",this._placeInRegion(q,K,rt)}},{key:"_placeInRegion",value:function(q,K,X){var tt=q.children[X];switch(tt.childrenCount){case 0:tt.children.data=K,tt.childrenCount=1,this._updateBranchMass(tt,K);break;case 1:tt.children.data.x===K.x&&tt.children.data.y===K.y?(K.x+=this._rng(),K.y+=this._rng()):(this._splitBranch(tt),this._placeInTree(tt,K));break;case 4:this._placeInTree(tt,K);break}}},{key:"_splitBranch",value:function(q){var K=null;q.childrenCount===1&&(K=q.children.data,q.mass=0,q.centerOfMass.x=0,q.centerOfMass.y=0),q.childrenCount=4,q.children.data=null,this._insertRegion(q,"NW"),this._insertRegion(q,"NE"),this._insertRegion(q,"SW"),this._insertRegion(q,"SE"),K!=null&&this._placeInTree(q,K)}},{key:"_insertRegion",value:function(q,K){var X,tt,rt,ot,ut=.5*q.size;switch(K){case"NW":X=q.range.minX,tt=q.range.minX+ut,rt=q.range.minY,ot=q.range.minY+ut;break;case"NE":X=q.range.minX+ut,tt=q.range.maxX,rt=q.range.minY,ot=q.range.minY+ut;break;case"SW":X=q.range.minX,tt=q.range.minX+ut,rt=q.range.minY+ut,ot=q.range.maxY;break;case"SE":X=q.range.minX+ut,tt=q.range.maxX,rt=q.range.minY+ut,ot=q.range.maxY;break}q.children[K]={centerOfMass:{x:0,y:0},mass:0,range:{minX:X,maxX:tt,minY:rt,maxY:ot},size:.5*q.size,calcSize:2*q.calcSize,children:{data:null},maxWidth:0,level:q.level+1,childrenCount:0}}},{key:"_debug",value:function(q,K){this.barnesHutTree!==void 0&&(q.lineWidth=1,this._drawBranch(this.barnesHutTree.root,q,K))}},{key:"_drawBranch",value:function(q,K,X){X===void 0&&(X="#FF0000"),q.childrenCount===4&&(this._drawBranch(q.children.NW,K),this._drawBranch(q.children.NE,K),this._drawBranch(q.children.SE,K),this._drawBranch(q.children.SW,K)),K.strokeStyle=X,K.beginPath(),K.moveTo(q.range.minX,q.range.minY),K.lineTo(q.range.maxX,q.range.minY),K.stroke(),K.beginPath(),K.moveTo(q.range.maxX,q.range.minY),K.lineTo(q.range.maxX,q.range.maxY),K.stroke(),K.beginPath(),K.moveTo(q.range.maxX,q.range.maxY),K.lineTo(q.range.minX,q.range.maxY),K.stroke(),K.beginPath(),K.moveTo(q.range.minX,q.range.maxY),K.lineTo(q.range.minX,q.range.minY),K.stroke()}}]),F}(),RepulsionSolver=function(){function F(W,q,K){_classCallCheck$1(this,F),this._rng=Alea$1("REPULSION SOLVER"),this.body=W,this.physicsBody=q,this.setOptions(K)}return _createClass$1(F,[{key:"setOptions",value:function(q){this.options=q}},{key:"solve",value:function(){for(var q,K,X,tt,rt,ot,ut,yn,uo=this.body.nodes,po=this.physicsBody.physicsNodeIndices,mo=this.physicsBody.forces,wo=this.options.nodeDistance,lf=-2/3/wo,yf=4/3,cf=0;cf"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var ForceAtlas2BasedRepulsionSolver=function(F){_inherits$1(q,F);var W=_createSuper$3$1(q);function q(K,X,tt){var rt;return _classCallCheck$1(this,q),rt=W.call(this,K,X,tt),rt._rng=Alea$1("FORCE ATLAS 2 BASED REPULSION SOLVER"),rt}return _createClass$1(q,[{key:"_calculateForces",value:function(X,tt,rt,ot,ut){X===0&&(X=.1*this._rng(),tt=X),this.overlapAvoidanceFactor<1&&ot.shape.radius&&(X=Math.max(.1+this.overlapAvoidanceFactor*ot.shape.radius,X-ot.shape.radius));var yn=ot.edges.length+1,uo=this.options.gravitationalConstant*ut.mass*ot.options.mass*yn/Math.pow(X,2),po=tt*uo,mo=rt*uo;this.physicsBody.forces[ot.id].x+=po,this.physicsBody.forces[ot.id].y+=mo}}]),q}(BarnesHutSolver);function _createSuper$2$1(F){var W=_isNativeReflectConstruct$2$1();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$2$1(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var ForceAtlas2BasedCentralGravitySolver=function(F){_inherits$1(q,F);var W=_createSuper$2$1(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"_calculateForces",value:function(X,tt,rt,ot,ut){if(X>0){var yn=ut.edges.length+1,uo=this.options.centralGravity*yn*ut.options.mass;ot[ut.id].x=tt*uo,ot[ut.id].y=rt*uo}}}]),q}(CentralGravitySolver),PhysicsEngine=function(){function F(W){_classCallCheck$1(this,F),this.body=W,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},_Object$assign$1(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return _createClass$1(F,[{key:"bindEventListeners",value:function(){var q=this;this.body.emitter.on("initPhysics",function(){q.initPhysics()}),this.body.emitter.on("_layoutFailed",function(){q.layoutFailed=!0}),this.body.emitter.on("resetPhysics",function(){q.stopSimulation(),q.ready=!1}),this.body.emitter.on("disablePhysics",function(){q.physicsEnabled=!1,q.stopSimulation()}),this.body.emitter.on("restorePhysics",function(){q.setOptions(q.options),q.ready===!0&&q.startSimulation()}),this.body.emitter.on("startSimulation",function(){q.ready===!0&&q.startSimulation()}),this.body.emitter.on("stopSimulation",function(){q.stopSimulation()}),this.body.emitter.on("destroy",function(){q.stopSimulation(!1),q.body.emitter.off()}),this.body.emitter.on("_dataChanged",function(){q.updatePhysicsData()})}},{key:"setOptions",value:function(q){if(q!==void 0)if(q===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(q===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,selectiveNotDeepExtend$1(["stabilization"],this.options,q),mergeOptions$1(this.options,q,"stabilization"),q.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());var K=this.options.wind;K&&((typeof K.x!="number"||_Number$isNaN(K.x))&&(K.x=0),(typeof K.y!="number"||_Number$isNaN(K.y))&&(K.y=0)),this.timestep=this.options.timestep}this.init()}},{key:"init",value:function(){var q;this.options.solver==="forceAtlas2Based"?(q=this.options.forceAtlas2Based,this.nodesSolver=new ForceAtlas2BasedRepulsionSolver(this.body,this.physicsBody,q),this.edgesSolver=new SpringSolver(this.body,this.physicsBody,q),this.gravitySolver=new ForceAtlas2BasedCentralGravitySolver(this.body,this.physicsBody,q)):this.options.solver==="repulsion"?(q=this.options.repulsion,this.nodesSolver=new RepulsionSolver(this.body,this.physicsBody,q),this.edgesSolver=new SpringSolver(this.body,this.physicsBody,q),this.gravitySolver=new CentralGravitySolver(this.body,this.physicsBody,q)):this.options.solver==="hierarchicalRepulsion"?(q=this.options.hierarchicalRepulsion,this.nodesSolver=new HierarchicalRepulsionSolver(this.body,this.physicsBody,q),this.edgesSolver=new HierarchicalSpringSolver(this.body,this.physicsBody,q),this.gravitySolver=new CentralGravitySolver(this.body,this.physicsBody,q)):(q=this.options.barnesHut,this.nodesSolver=new BarnesHutSolver(this.body,this.physicsBody,q),this.edgesSolver=new SpringSolver(this.body,this.physicsBody,q),this.gravitySolver=new CentralGravitySolver(this.body,this.physicsBody,q)),this.modelOptions=q}},{key:"initPhysics",value:function(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var q;this.viewFunction=_bindInstanceProperty$1$1(q=this.simulationStep).call(q,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,q===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,q===!0&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var q=_Date$now$1();this.physicsTick();var K=_Date$now$1()-q;(K<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var q=this,K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&_setTimeout$1(function(){q.body.emitter.emit("stabilized",{iterations:K}),q.startedStabilization=!1,q.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){var q=1.2;this._evaluateStepQuality()===!0?this.timestep=q*this.timestep:this.timestep/qot))return!1;return!0}},{key:"moveNodes",value:function(){for(var q=this.physicsBody.physicsNodeIndices,K=0,X=0,tt=5,rt=0;rtot&&(q=q>0?ot:-ot),q}},{key:"_performStep",value:function(q){var K=this.body.nodes[q],X=this.physicsBody.forces[q];this.options.wind&&(X.x+=this.options.wind.x,X.y+=this.options.wind.y);var tt=this.physicsBody.velocities[q];this.previousStates[q]={x:K.x,y:K.y,vx:tt.x,vy:tt.y},K.options.fixed.x===!1?(tt.x=this.calculateComponentVelocity(tt.x,X.x,K.options.mass),K.x+=tt.x*this.timestep):(X.x=0,tt.x=0),K.options.fixed.y===!1?(tt.y=this.calculateComponentVelocity(tt.y,X.y,K.options.mass),K.y+=tt.y*this.timestep):(X.y=0,tt.y=0);var rt=Math.sqrt(Math.pow(tt.x,2)+Math.pow(tt.y,2));return rt}},{key:"_freezeNodes",value:function(){var q=this.body.nodes;for(var K in q)if(Object.prototype.hasOwnProperty.call(q,K)&&q[K].x&&q[K].y){var X=q[K].options.fixed;this.freezeCache[K]={x:X.x,y:X.y},X.x=!0,X.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var q=this.body.nodes;for(var K in q)Object.prototype.hasOwnProperty.call(q,K)&&this.freezeCache[K]!==void 0&&(q[K].options.fixed.x=this.freezeCache[K].x,q[K].options.fixed.y=this.freezeCache[K].y);this.freezeCache={}}},{key:"stabilize",value:function(){var q=this,K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof K!="number"&&(K=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",K)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=K,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,_setTimeout$1(function(){return q._stabilizationBatch()},0)}},{key:"_startStabilizing",value:function(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var q=this,K=function(){return q.stabilized===!1&&q.stabilizationIterations1&&arguments[1]!==void 0?arguments[1]:[],X=1e9,tt=-1e9,rt=1e9,ot=-1e9,ut;if(K.length>0)for(var yn=0;ynut.shape.boundingBox.left&&(rt=ut.shape.boundingBox.left),otut.shape.boundingBox.top&&(X=ut.shape.boundingBox.top),tt1&&arguments[1]!==void 0?arguments[1]:[],X=1e9,tt=-1e9,rt=1e9,ot=-1e9,ut;if(K.length>0)for(var yn=0;ynut.x&&(rt=ut.x),otut.y&&(X=ut.y),tt"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Cluster=function(F){_inherits$1(q,F);var W=_createSuper$1$1(q);function q(K,X,tt,rt,ot,ut){var yn;return _classCallCheck$1(this,q),yn=W.call(this,K,X,tt,rt,ot,ut),yn.isCluster=!0,yn.containedNodes={},yn.containedEdges={},yn}return _createClass$1(q,[{key:"_openChildCluster",value:function(X){var tt=this,rt=this.body.nodes[X];if(this.containedNodes[X]===void 0)throw new Error("node with id: "+X+" not in current cluster");if(!rt.isCluster)throw new Error("node with id: "+X+" is not a cluster");delete this.containedNodes[X],forEach$1$1(rt.edges,function(ot){delete tt.containedEdges[ot.id]}),forEach$1$1(rt.containedNodes,function(ot,ut){tt.containedNodes[ut]=ot}),rt.containedNodes={},forEach$1$1(rt.containedEdges,function(ot,ut){tt.containedEdges[ut]=ot}),rt.containedEdges={},forEach$1$1(rt.edges,function(ot){forEach$1$1(tt.edges,function(ut){var yn,uo,po=_indexOfInstanceProperty$1(yn=ut.clusteringEdgeReplacingIds).call(yn,ot.id);po!==-1&&(forEach$1$1(ot.clusteringEdgeReplacingIds,function(mo){ut.clusteringEdgeReplacingIds.push(mo),tt.body.edges[mo].edgeReplacedById=ut.id}),_spliceInstanceProperty$1(uo=ut.clusteringEdgeReplacingIds).call(uo,po,1))})}),rt.edges=[]}}]),q}(Node$1),ClusterEngine=function(){function F(W){var q=this;_classCallCheck$1(this,F),this.body=W,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},_Object$assign$1(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){q.clusteredNodes={},q.clusteredEdges={}})}return _createClass$1(F,[{key:"clusterByHubsize",value:function(q,K){q===void 0?q=this._getHubSize():_typeof$1(q)==="object"&&(K=this._checkOptions(q),q=this._getHubSize());for(var X=[],tt=0;tt=q&&X.push(rt.id)}for(var ot=0;ot0&&arguments[0]!==void 0?arguments[0]:{},X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(K.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");K=this._checkOptions(K);var tt={},rt={};forEach$1$1(this.body.nodes,function(ot,ut){ot.options&&K.joinCondition(ot.options)===!0&&(tt[ut]=ot,forEach$1$1(ot.edges,function(yn){q.clusteredEdges[yn.id]===void 0&&(rt[yn.id]=yn)}))}),this._cluster(tt,rt,K,X)}},{key:"clusterByEdgeCount",value:function(q,K){var X=this,tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;K=this._checkOptions(K);for(var rt=[],ot={},ut,yn,uo,po=function(){var yf={},cf={},vf=X.body.nodeIndices[mo],_f=X.body.nodes[vf];if(ot[vf]===void 0){uo=0,yn=[];for(var $f=0;$f<_f.edges.length;$f++)ut=_f.edges[$f],X.clusteredEdges[ut.id]===void 0&&(ut.toId!==ut.fromId&&uo++,yn.push(ut));if(uo===q){for(var wf=function(Nf){if(K.joinCondition===void 0||K.joinCondition===null)return!0;var Yf=NetworkUtil.cloneOptions(Nf);return K.joinCondition(Yf)},Pf=!0,Cf=0;Cf0&&_Object$keys$1(cf).length>0&&Pf===!0){var Bf=function(){for(var Nf=0;Nf1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,q,K)}},{key:"clusterBridges",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,q,K)}},{key:"clusterByConnection",value:function(q,K){var X,tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(q===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[q]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");var rt=this.body.nodes[q];K=this._checkOptions(K,rt),K.clusterNodeProperties.x===void 0&&(K.clusterNodeProperties.x=rt.x),K.clusterNodeProperties.y===void 0&&(K.clusterNodeProperties.y=rt.y),K.clusterNodeProperties.fixed===void 0&&(K.clusterNodeProperties.fixed={},K.clusterNodeProperties.fixed.x=rt.options.fixed.x,K.clusterNodeProperties.fixed.y=rt.options.fixed.y);var ot={},ut={},yn=rt.id,uo=NetworkUtil.cloneOptions(rt);ot[yn]=rt;for(var po=0;po-1&&(ut[$f.id]=$f)}this._cluster(ot,ut,K,tt)}},{key:"_createClusterEdges",value:function(q,K,X,tt){for(var rt,ot,ut,yn,uo,po,mo=_Object$keys$1(q),wo=[],lf=0;lf0&&arguments[0]!==void 0?arguments[0]:{};return q.clusterEdgeProperties===void 0&&(q.clusterEdgeProperties={}),q.clusterNodeProperties===void 0&&(q.clusterNodeProperties={}),q}},{key:"_cluster",value:function(q,K,X){var tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,rt=[];for(var ot in q)Object.prototype.hasOwnProperty.call(q,ot)&&this.clusteredNodes[ot]!==void 0&&rt.push(ot);for(var ut=0;uttt?ut.x:tt,rt=ut.yot?ut.y:ot;return{x:.5*(X+tt),y:.5*(rt+ot)}}},{key:"openCluster",value:function(q,K){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(q===void 0)throw new Error("No clusterNodeId supplied to openCluster.");var tt=this.body.nodes[q];if(tt===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(tt.isCluster!==!0||tt.containedNodes===void 0||tt.containedEdges===void 0)throw new Error("The node:"+q+" is not a valid cluster.");var rt=this.findNode(q),ot=_indexOfInstanceProperty$1(rt).call(rt,q)-1;if(ot>=0){var ut=rt[ot],yn=this.body.nodes[ut];yn._openChildCluster(q),delete this.body.nodes[q],X===!0&&this.body.emitter.emit("_dataChanged");return}var uo=tt.containedNodes,po=tt.containedEdges;if(K!==void 0&&K.releaseFunction!==void 0&&typeof K.releaseFunction=="function"){var mo={},wo={x:tt.x,y:tt.y};for(var lf in uo)if(Object.prototype.hasOwnProperty.call(uo,lf)){var yf=this.body.nodes[lf];mo[lf]={x:yf.x,y:yf.y}}var cf=K.releaseFunction(wo,mo);for(var vf in uo)if(Object.prototype.hasOwnProperty.call(uo,vf)){var _f=this.body.nodes[vf];cf[vf]!==void 0&&(_f.x=cf[vf].x===void 0?tt.x:cf[vf].x,_f.y=cf[vf].y===void 0?tt.y:cf[vf].y)}}else forEach$1$1(uo,function(ap){ap.options.fixed.x===!1&&(ap.x=tt.x),ap.options.fixed.y===!1&&(ap.y=tt.y)});for(var $f in uo)if(Object.prototype.hasOwnProperty.call(uo,$f)){var wf=this.body.nodes[$f];wf.vx=tt.vx,wf.vy=tt.vy,wf.setOptions({physics:!0}),delete this.clusteredNodes[$f]}for(var Pf=[],Cf=0;Cf0&&ottt&&(tt=ot.edges.length),q+=ot.edges.length,K+=Math.pow(ot.edges.length,2),X+=1}q=q/X,K=K/X;var ut=K-Math.pow(q,2),yn=Math.sqrt(ut),uo=Math.floor(q+2*yn);return uo>tt&&(uo=tt),uo}},{key:"_createClusteredEdge",value:function(q,K,X,tt,rt){var ot=NetworkUtil.cloneOptions(X,"edge");deepExtend$1(ot,tt),ot.from=q,ot.to=K,ot.id="clusterEdge:"+v4$1(),rt!==void 0&&deepExtend$1(ot,rt);var ut=this.body.functions.createEdge(ot);return ut.clusteringEdgeReplacingIds=[X.id],ut.connect(),this.body.edges[ut.id]=ut,ut}},{key:"_clusterEdges",value:function(q,K,X,tt){if(K instanceof Edge){var rt=K,ot={};ot[rt.id]=rt,K=ot}if(q instanceof Node$1){var ut=q,yn={};yn[ut.id]=ut,q=yn}if(X==null)throw new Error("_clusterEdges: parameter clusterNode required");tt===void 0&&(tt=X.clusterEdgeProperties),this._createClusterEdges(q,K,X,tt);for(var uo in K)if(Object.prototype.hasOwnProperty.call(K,uo)&&this.body.edges[uo]!==void 0){var po=this.body.edges[uo];this._backupEdgeOptions(po),po.setOptions({physics:!1})}for(var mo in q)Object.prototype.hasOwnProperty.call(q,mo)&&(this.clusteredNodes[mo]={clusterId:X.id,node:this.body.nodes[mo]},this.body.nodes[mo].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(q){if(q!==void 0){var K=this.clusteredNodes[q];if(K!==void 0){var X=K.clusterId;if(X!==void 0)return this.body.nodes[X]}}}},{key:"_filter",value:function(q,K){var X=[];return forEach$1$1(q,function(tt){K(tt)&&X.push(tt)}),X}},{key:"_updateState",value:function(){var q=this,K,X=[],tt={},rt=function(lf){forEach$1$1(q.body.nodes,function(yf){yf.isCluster===!0&&lf(yf)})};for(K in this.clusteredNodes)if(Object.prototype.hasOwnProperty.call(this.clusteredNodes,K)){var ot=this.body.nodes[K];ot===void 0&&X.push(K)}rt(function(wo){for(var lf=0;lf0}(!wo.endPointsValid()||!yf)&&(tt[lf]=lf)}),rt(function(wo){forEach$1$1(tt,function(lf){delete wo.containedEdges[lf],forEach$1$1(wo.edges,function(yf,cf){if(yf.id===lf){wo.edges[cf]=null;return}yf.clusteringEdgeReplacingIds=q._filter(yf.clusteringEdgeReplacingIds,function(vf){return!tt[vf]})}),wo.edges=q._filter(wo.edges,function(yf){return yf!==null})})}),forEach$1$1(tt,function(wo){delete q.clusteredEdges[wo]}),forEach$1$1(tt,function(wo){delete q.body.edges[wo]});var yn=_Object$keys$1(this.body.edges);forEach$1$1(yn,function(wo){var lf=q.body.edges[wo],yf=q._isClusteredNode(lf.fromId)||q._isClusteredNode(lf.toId);if(yf!==q._isClusteredEdge(lf.id))if(yf){var cf=q._getClusterNodeForNode(lf.fromId);cf!==void 0&&q._clusterEdges(q.body.nodes[lf.fromId],lf,cf);var vf=q._getClusterNodeForNode(lf.toId);vf!==void 0&&q._clusterEdges(q.body.nodes[lf.toId],lf,vf)}else delete q._clusterEdges[wo],q._restoreEdge(lf)});for(var uo=!1,po=!0,mo=function(){var lf=[];rt(function(cf){var vf=_Object$keys$1(cf.containedNodes).length,_f=cf.options.allowSingleNodeCluster===!0;(_f&&vf<1||!_f&&vf<2)&&lf.push(cf.id)});for(var yf=0;yf0,uo=uo||po};po;)mo();uo&&this._updateState()}},{key:"_isClusteredNode",value:function(q){return this.clusteredNodes[q]!==void 0}},{key:"_isClusteredEdge",value:function(q){return this.clusteredEdges[q]!==void 0}}]),F}();function _initRequestAnimationFrame(){var F;window!==void 0&&(F=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),F===void 0?window.requestAnimationFrame=function(W){W()}:window.requestAnimationFrame=F}var CanvasRenderer=function(){function F(W,q){_classCallCheck$1(this,F),_initRequestAnimationFrame(),this.body=W,this.canvas=q,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},_Object$assign$1(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return _createClass$1(F,[{key:"bindEventListeners",value:function(){var q=this,K;this.body.emitter.on("dragStart",function(){q.dragging=!0}),this.body.emitter.on("dragEnd",function(){q.dragging=!1}),this.body.emitter.on("zoom",function(){q.zooming=!0,window.clearTimeout(q.zoomTimeoutId),q.zoomTimeoutId=_setTimeout$1(function(){var X;q.zooming=!1,_bindInstanceProperty$1$1(X=q._requestRedraw).call(X,q)()},250)}),this.body.emitter.on("_resizeNodes",function(){q._resizeNodes()}),this.body.emitter.on("_redraw",function(){q.renderingActive===!1&&q._redraw()}),this.body.emitter.on("_blockRedraw",function(){q.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){q.allowRedraw=!0,q.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",_bindInstanceProperty$1$1(K=this._requestRedraw).call(K,this)),this.body.emitter.on("_startRendering",function(){q.renderRequests+=1,q.renderingActive=!0,q._startRendering()}),this.body.emitter.on("_stopRendering",function(){q.renderRequests-=1,q.renderingActive=q.renderRequests>0,q.renderTimer=void 0}),this.body.emitter.on("destroy",function(){q.renderRequests=0,q.allowRedraw=!1,q.renderingActive=!1,q.requiresTimeout===!0?clearTimeout(q.renderTimer):window.cancelAnimationFrame(q.renderTimer),q.body.emitter.off()})}},{key:"setOptions",value:function(q){if(q!==void 0){var K=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"];selectiveDeepExtend$1(K,this.options,q)}}},{key:"_requestNextFrame",value:function(q,K){if(!(typeof window>"u")){var X,tt=window;return this.requiresTimeout===!0?X=_setTimeout$1(q,K):tt.requestAnimationFrame&&(X=tt.requestAnimationFrame(q)),X}}},{key:"_startRendering",value:function(){if(this.renderingActive===!0&&this.renderTimer===void 0){var q;this.renderTimer=this._requestNextFrame(_bindInstanceProperty$1$1(q=this._renderStep).call(q,this),this.simulationInterval)}}},{key:"_renderStep",value:function(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var q=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this._requestNextFrame(function(){q._redraw(!1)},0))}},{key:"_redraw",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var K={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();var X=this.canvas.getContext(),tt=this.canvas.frame.canvas.clientWidth,rt=this.canvas.frame.canvas.clientHeight;if(X.clearRect(0,0,tt,rt),this.canvas.frame.clientWidth===0)return;if(X.save(),X.translate(this.body.view.translation.x,this.body.view.translation.y),X.scale(this.body.view.scale,this.body.view.scale),X.beginPath(),this.body.emitter.emit("beforeDrawing",X),X.closePath(),q===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(X),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){var ot=this._drawNodes(X,q),ut=ot.drawExternalLabels;K.drawExternalLabels=ut}q===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(X),K.drawExternalLabels!=null&&K.drawExternalLabels(),q===!1&&this._drawSelectionBox(X),X.beginPath(),this.body.emitter.emit("afterDrawing",X),X.closePath(),X.restore(),q===!0&&X.clearRect(0,0,tt,rt)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var q=this.canvas.getContext();q.save(),q.translate(this.body.view.translation.x,this.body.view.translation.y),q.scale(this.body.view.scale,this.body.view.scale);var K=this.body.nodes,X;for(var tt in K)Object.prototype.hasOwnProperty.call(K,tt)&&(X=K[tt],X.resize(q),X.updateBoundingBox(q,X.selected));q.restore()}},{key:"_drawNodes",value:function(q){for(var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X=this.body.nodes,tt=this.body.nodeIndices,rt,ot=[],ut=[],yn=20,uo=this.canvas.DOMtoCanvas({x:-yn,y:-yn}),po=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+yn,y:this.canvas.frame.canvas.clientHeight+yn}),mo={top:uo.y,left:uo.x,bottom:po.y,right:po.x},wo=[],lf=0;lf0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/q,this.cameraState.previousHeight=this.frame.canvas.height/q,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/q,y:.5*this.frame.canvas.height/q}))}},{key:"_setCameraState",value:function(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){var q=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,K=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,X=this.cameraState.scale;q!=1&&K!=1?X=this.cameraState.scale*.5*(q+K):q!=1?X=this.cameraState.scale*q:K!=1&&(X=this.cameraState.scale*K),this.body.view.scale=X;var tt=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),rt={x:tt.x-this.cameraState.position.x,y:tt.y-this.cameraState.position.y};this.body.view.translation.x+=rt.x*this.body.view.scale,this.body.view.translation.y+=rt.y*this.body.view.scale}}},{key:"_prepareValue",value:function(q){if(typeof q=="number")return q+"px";if(typeof q=="string"){if(_indexOfInstanceProperty$1(q).call(q,"%")!==-1||_indexOfInstanceProperty$1(q).call(q,"px")!==-1)return q;if(_indexOfInstanceProperty$1(q).call(q,"%")===-1)return q+"px"}throw new Error("Could not use the value supplied for width or height:"+q)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var q=document.createElement("DIV");q.style.color="red",q.style.fontWeight="bold",q.style.padding="10px",q.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(q)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var q=this;this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new Hammer$5(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Hammer$5.DIRECTION_ALL}),onTouch$1(this.hammer,function(K){q.body.eventListeners.onTouch(K)}),this.hammer.on("tap",function(K){q.body.eventListeners.onTap(K)}),this.hammer.on("doubletap",function(K){q.body.eventListeners.onDoubleTap(K)}),this.hammer.on("press",function(K){q.body.eventListeners.onHold(K)}),this.hammer.on("panstart",function(K){q.body.eventListeners.onDragStart(K)}),this.hammer.on("panmove",function(K){q.body.eventListeners.onDrag(K)}),this.hammer.on("panend",function(K){q.body.eventListeners.onDragEnd(K)}),this.hammer.on("pinch",function(K){q.body.eventListeners.onPinch(K)}),this.frame.canvas.addEventListener("wheel",function(K){q.body.eventListeners.onMouseWheel(K)}),this.frame.canvas.addEventListener("mousemove",function(K){q.body.eventListeners.onMouseMove(K)}),this.frame.canvas.addEventListener("contextmenu",function(K){q.body.eventListeners.onContext(K)}),this.hammerFrame=new Hammer$5(this.frame),onRelease$1(this.hammerFrame,function(K){q.body.eventListeners.onRelease(K)})}},{key:"setSize",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;q=this._prepareValue(q),K=this._prepareValue(K);var X=!1,tt=this.frame.canvas.width,rt=this.frame.canvas.height,ot=this.pixelRatio;if(this._setPixelRatio(),q!=this.options.width||K!=this.options.height||this.frame.style.width!=q||this.frame.style.height!=K)this._getCameraState(ot),this.frame.style.width=q,this.frame.style.height=K,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=q,this.options.height=K,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},X=!0;else{var ut=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),yn=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==ut||this.frame.canvas.height!==yn)&&this._getCameraState(ot),this.frame.canvas.width!==ut&&(this.frame.canvas.width=ut,X=!0),this.frame.canvas.height!==yn&&(this.frame.canvas.height=yn,X=!0)}return X===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(tt/this.pixelRatio),oldHeight:Math.round(rt/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,X}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var q=this.getContext();if(q===void 0)throw new Error("Could not get canvax context");var K=1;typeof window<"u"&&(K=window.devicePixelRatio||1);var X=q.webkitBackingStorePixelRatio||q.mozBackingStorePixelRatio||q.msBackingStorePixelRatio||q.oBackingStorePixelRatio||q.backingStorePixelRatio||1;return K/X}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var q=this.getContext();if(q===void 0)throw new Error("Could not get canvax context");q.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(q){return(q-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(q){return q*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(q){return(q-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(q){return q*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(q){return{x:this._XconvertCanvasToDOM(q.x),y:this._YconvertCanvasToDOM(q.y)}}},{key:"DOMtoCanvas",value:function(q){return{x:this._XconvertDOMtoCanvas(q.x),y:this._YconvertDOMtoCanvas(q.y)}}}]),F}();function normalizeFitOptions(F,W){var q=_Object$assign$1({nodes:W,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},F??{});if(!_Array$isArray$2(q.nodes))throw new TypeError("Nodes has to be an array of ids.");if(q.nodes.length===0&&(q.nodes=W),!(typeof q.minZoomLevel=="number"&&q.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof q.maxZoomLevel=="number"&&q.minZoomLevel<=q.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return q}var View=function(){function F(W,q){var K,X=this,tt;_classCallCheck$1(this,F),this.body=W,this.canvas=q,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",_bindInstanceProperty$1$1(K=this.fit).call(K,this)),this.body.emitter.on("animationFinished",function(){X.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",_bindInstanceProperty$1$1(tt=this.releaseNode).call(tt,this))}return _createClass$1(F,[{key:"setOptions",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=q}},{key:"fit",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;q=normalizeFitOptions(q,this.body.nodeIndices);var X=this.canvas.frame.canvas.clientWidth,tt=this.canvas.frame.canvas.clientHeight,rt,ot;if(X===0||tt===0)ot=1,rt=NetworkUtil.getRange(this.body.nodes,q.nodes);else if(K===!0){var ut=0;for(var yn in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,yn)){var uo=this.body.nodes[yn];uo.predefinedPosition===!0&&(ut+=1)}if(ut>.5*this.body.nodeIndices.length){this.fit(q,!1);return}rt=NetworkUtil.getRange(this.body.nodes,q.nodes);var po=this.body.nodeIndices.length;ot=12.662/(po+7.4147)+.0964822;var mo=Math.min(X/600,tt/600);ot*=mo}else{this.body.emitter.emit("_resizeNodes"),rt=NetworkUtil.getRange(this.body.nodes,q.nodes);var wo=Math.abs(rt.maxX-rt.minX)*1.1,lf=Math.abs(rt.maxY-rt.minY)*1.1,yf=X/wo,cf=tt/lf;ot=yf<=cf?yf:cf}ot>q.maxZoomLevel?ot=q.maxZoomLevel:ot1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[q]!==void 0){var X={x:this.body.nodes[q].x,y:this.body.nodes[q].y};K.position=X,K.lockedOnNode=q,this.moveTo(K)}else console.error("Node: "+q+" cannot be found.")}},{key:"moveTo",value:function(q){if(q===void 0){q={};return}if(q.offset!=null){if(q.offset.x!=null){if(q.offset.x=+q.offset.x,!_Number$isFinite(q.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else q.offset.x=0;if(q.offset.y!=null){if(q.offset.y=+q.offset.y,!_Number$isFinite(q.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else q.offset.x=0}else q.offset={x:0,y:0};if(q.position!=null){if(q.position.x!=null){if(q.position.x=+q.position.x,!_Number$isFinite(q.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else q.position.x=0;if(q.position.y!=null){if(q.position.y=+q.position.y,!_Number$isFinite(q.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else q.position.x=0}else q.position=this.getViewPosition();if(q.scale!=null){if(q.scale=+q.scale,!(q.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else q.scale=this.body.view.scale;q.animation===void 0&&(q.animation={duration:0}),q.animation===!1&&(q.animation={duration:0}),q.animation===!0&&(q.animation={}),q.animation.duration===void 0&&(q.animation.duration=1e3),q.animation.easingFunction===void 0&&(q.animation.easingFunction="easeInOutQuad"),this.animateView(q)}},{key:"animateView",value:function(q){if(q!==void 0){this.animationEasingFunction=q.animation.easingFunction,this.releaseNode(),q.locked===!0&&(this.lockedOnNodeId=q.lockedOnNode,this.lockedOnNodeOffset=q.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=q.scale,this.body.view.scale=this.targetScale;var K=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),X={x:K.x-q.position.x,y:K.y-q.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+X.x*this.targetScale+q.offset.x,y:this.sourceTranslation.y+X.y*this.targetScale+q.offset.y},q.animation.duration===0)if(this.lockedOnNodeId!=null){var tt;this.viewFunction=_bindInstanceProperty$1$1(tt=this._lockedRedraw).call(tt,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var rt;this.animationSpeed=1/(60*q.animation.duration*.001)||1/60,this.animationEasingFunction=q.animation.easingFunction,this.viewFunction=_bindInstanceProperty$1$1(rt=this._transitionRedraw).call(rt,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}}},{key:"_lockedRedraw",value:function(){var q={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},K=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),X={x:K.x-q.x,y:K.y-q.y},tt=this.body.view.translation,rt={x:tt.x+X.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:tt.y+X.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=rt}},{key:"releaseNode",value:function(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=q===!0?1:this.easingTime;var K=easingFunctions$1[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*K,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*K,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*K},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var X;this.viewFunction=_bindInstanceProperty$1$1(X=this._lockedRedraw).call(X,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),F}();function keycharm$1(F){var W=F&&F.preventDefault||!1,q=F&&F.container||window,K={},X={keydown:{},keyup:{}},tt={},rt;for(rt=97;rt<=122;rt++)tt[String.fromCharCode(rt)]={code:65+(rt-97),shift:!1};for(rt=65;rt<=90;rt++)tt[String.fromCharCode(rt)]={code:rt,shift:!0};for(rt=0;rt<=9;rt++)tt[""+rt]={code:48+rt,shift:!1};for(rt=1;rt<=12;rt++)tt["F"+rt]={code:111+rt,shift:!1};for(rt=0;rt<=9;rt++)tt["num"+rt]={code:96+rt,shift:!1};tt["num*"]={code:106,shift:!1},tt["num+"]={code:107,shift:!1},tt["num-"]={code:109,shift:!1},tt["num/"]={code:111,shift:!1},tt["num."]={code:110,shift:!1},tt.left={code:37,shift:!1},tt.up={code:38,shift:!1},tt.right={code:39,shift:!1},tt.down={code:40,shift:!1},tt.space={code:32,shift:!1},tt.enter={code:13,shift:!1},tt.shift={code:16,shift:void 0},tt.esc={code:27,shift:!1},tt.backspace={code:8,shift:!1},tt.tab={code:9,shift:!1},tt.ctrl={code:17,shift:!1},tt.alt={code:18,shift:!1},tt.delete={code:46,shift:!1},tt.pageup={code:33,shift:!1},tt.pagedown={code:34,shift:!1},tt["="]={code:187,shift:!1},tt["-"]={code:189,shift:!1},tt["]"]={code:221,shift:!1},tt["["]={code:219,shift:!1};var ot=function(uo){yn(uo,"keydown")},ut=function(uo){yn(uo,"keyup")},yn=function(uo,po){if(X[po][uo.keyCode]!==void 0){for(var mo=X[po][uo.keyCode],wo=0;wo700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}},{key:"_stopMovement",value:function(){for(var q in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,q)&&(this.body.emitter.off("initRedraw",this.boundFunctions[q]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var q=this.body.view.scale,K=this.body.view.scale*(1+this.options.keyboard.speed.zoom),X=this.body.view.translation,tt=K/q,rt=(1-tt)*this.canvas.canvasViewCenter.x+X.x*tt,ot=(1-tt)*this.canvas.canvasViewCenter.y+X.y*tt;this.body.view.scale=K,this.body.view.translation={x:rt,y:ot},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var q=this.body.view.scale,K=this.body.view.scale/(1+this.options.keyboard.speed.zoom),X=this.body.view.translation,tt=K/q,rt=(1-tt)*this.canvas.canvasViewCenter.x+X.x*tt,ot=(1-tt)*this.canvas.canvasViewCenter.y+X.y*tt;this.body.view.scale=K,this.body.view.translation={x:rt,y:ot},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var q=this;if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=keycharm$1({container:window,preventDefault:!0}):this.keycharm=keycharm$1({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var K,X,tt,rt,ot,ut,yn,uo,po,mo,wo,lf,yf,cf,vf,_f,$f,wf,Pf,Cf,Af,Bf,Hf,Df;_bindInstanceProperty$1$1(K=this.keycharm).call(K,"up",function(){q.bindToRedraw("_moveUp")},"keydown"),_bindInstanceProperty$1$1(X=this.keycharm).call(X,"down",function(){q.bindToRedraw("_moveDown")},"keydown"),_bindInstanceProperty$1$1(tt=this.keycharm).call(tt,"left",function(){q.bindToRedraw("_moveLeft")},"keydown"),_bindInstanceProperty$1$1(rt=this.keycharm).call(rt,"right",function(){q.bindToRedraw("_moveRight")},"keydown"),_bindInstanceProperty$1$1(ot=this.keycharm).call(ot,"=",function(){q.bindToRedraw("_zoomIn")},"keydown"),_bindInstanceProperty$1$1(ut=this.keycharm).call(ut,"num+",function(){q.bindToRedraw("_zoomIn")},"keydown"),_bindInstanceProperty$1$1(yn=this.keycharm).call(yn,"num-",function(){q.bindToRedraw("_zoomOut")},"keydown"),_bindInstanceProperty$1$1(uo=this.keycharm).call(uo,"-",function(){q.bindToRedraw("_zoomOut")},"keydown"),_bindInstanceProperty$1$1(po=this.keycharm).call(po,"[",function(){q.bindToRedraw("_zoomOut")},"keydown"),_bindInstanceProperty$1$1(mo=this.keycharm).call(mo,"]",function(){q.bindToRedraw("_zoomIn")},"keydown"),_bindInstanceProperty$1$1(wo=this.keycharm).call(wo,"pageup",function(){q.bindToRedraw("_zoomIn")},"keydown"),_bindInstanceProperty$1$1(lf=this.keycharm).call(lf,"pagedown",function(){q.bindToRedraw("_zoomOut")},"keydown"),_bindInstanceProperty$1$1(yf=this.keycharm).call(yf,"up",function(){q.unbindFromRedraw("_moveUp")},"keyup"),_bindInstanceProperty$1$1(cf=this.keycharm).call(cf,"down",function(){q.unbindFromRedraw("_moveDown")},"keyup"),_bindInstanceProperty$1$1(vf=this.keycharm).call(vf,"left",function(){q.unbindFromRedraw("_moveLeft")},"keyup"),_bindInstanceProperty$1$1(_f=this.keycharm).call(_f,"right",function(){q.unbindFromRedraw("_moveRight")},"keyup"),_bindInstanceProperty$1$1($f=this.keycharm).call($f,"=",function(){q.unbindFromRedraw("_zoomIn")},"keyup"),_bindInstanceProperty$1$1(wf=this.keycharm).call(wf,"num+",function(){q.unbindFromRedraw("_zoomIn")},"keyup"),_bindInstanceProperty$1$1(Pf=this.keycharm).call(Pf,"num-",function(){q.unbindFromRedraw("_zoomOut")},"keyup"),_bindInstanceProperty$1$1(Cf=this.keycharm).call(Cf,"-",function(){q.unbindFromRedraw("_zoomOut")},"keyup"),_bindInstanceProperty$1$1(Af=this.keycharm).call(Af,"[",function(){q.unbindFromRedraw("_zoomOut")},"keyup"),_bindInstanceProperty$1$1(Bf=this.keycharm).call(Bf,"]",function(){q.unbindFromRedraw("_zoomIn")},"keyup"),_bindInstanceProperty$1$1(Hf=this.keycharm).call(Hf,"pageup",function(){q.unbindFromRedraw("_zoomIn")},"keyup"),_bindInstanceProperty$1$1(Df=this.keycharm).call(Df,"pagedown",function(){q.unbindFromRedraw("_zoomOut")},"keyup")}}}]),F}();function _createForOfIteratorHelper$4$1(F,W){var q=typeof _Symbol$2<"u"&&_getIteratorMethod$2(F)||F["@@iterator"];if(!q){if(_Array$isArray$2(F)||(q=_unsupportedIterableToArray$4$1(F))||W&&F&&typeof F.length=="number"){q&&(F=q);var K=0,X=function(){};return{s:X,n:function(){return K>=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$5$1(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$5$1(F,W);var K=_sliceInstanceProperty$2(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$5$1(F,W)}}function _arrayLikeToArray$5$1(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+q.opacity):this.options.opacity=q.opacity),q.shape!==void 0)for(var K in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,K)&&this.body.nodes[K].updateShape();if(typeof q.font<"u"||typeof q.widthConstraint<"u"||typeof q.heightConstraint<"u")for(var X=0,tt=_Object$keys$1(this.body.nodes);X1&&arguments[1]!==void 0?arguments[1]:!1,X=this.body.data.nodes;if(isDataViewLike$1("id",q))this.body.data.nodes=q;else if(_Array$isArray$2(q))this.body.data.nodes=new DataSet,this.body.data.nodes.add(q);else if(!q)this.body.data.nodes=new DataSet;else throw new TypeError("Array or DataSet expected");if(X&&forEach$1$1(this.nodesListeners,function(ot,ut){X.off(ut,ot)}),this.body.nodes={},this.body.data.nodes){var tt=this;forEach$1$1(this.nodesListeners,function(ot,ut){tt.body.data.nodes.on(ut,ot)});var rt=this.body.data.nodes.getIds();this.add(rt,!0)}K===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(q){for(var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X,tt=[],rt=0;rt1&&arguments[1]!==void 0?arguments[1]:Node$1;return new K(q,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var q=this,K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;forEach$1$1(this.body.nodes,function(X,tt){var rt=q.body.data.nodes.get(tt);rt!==void 0&&(K===!0&&X.setOptions({x:null,y:null}),X.setOptions({fixed:!1}),X.setOptions(rt))})}},{key:"getPositions",value:function(q){var K={};if(q!==void 0){if(_Array$isArray$2(q)===!0){for(var X=0;X0?(ut=ot/rt,K+=ut*ut):K+=ot;return rt===1/0?1/0:rt*sqrt(K)}});var path$3$1=path$w,hypot$2=path$3$1.Math.hypot,parent$5$1=hypot$2,hypot$1=parent$5$1,hypot=hypot$1,_Math$hypot=getDefaultExportFromCjs$1(hypot);function _createSuper$a$1(F){var W=_isNativeReflectConstruct$a$1();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$a$1(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var EndPoint=function(){function F(){_classCallCheck$1(this,F)}return _createClass$1(F,null,[{key:"transform",value:function(q,K){_Array$isArray$2(q)||(q=[q]);for(var X=K.point.x,tt=K.point.y,rt=K.angle,ot=K.length,ut=0;ut4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();q.strokeStyle=this.getColor(q,K),q.lineWidth=K.width,K.dashes!==!1?this._drawDashedLine(q,K,rt):this._drawLine(q,K,rt)}},{key:"_drawLine",value:function(q,K,X,tt,rt){if(this.from!=this.to)this._line(q,K,X,tt,rt);else{var ot=this._getCircleData(q),ut=_slicedToArray$1(ot,3),yn=ut[0],uo=ut[1],po=ut[2];this._circle(q,K,yn,uo,po)}}},{key:"_drawDashedLine",value:function(q,K,X,tt,rt){q.lineCap="round";var ot=_Array$isArray$2(K.dashes)?K.dashes:[5,5];if(q.setLineDash!==void 0){if(q.save(),q.setLineDash(ot),q.lineDashOffset=0,this.from!=this.to)this._line(q,K,X);else{var ut=this._getCircleData(q),yn=_slicedToArray$1(ut,3),uo=yn[0],po=yn[1],mo=yn[2];this._circle(q,K,uo,po,mo)}q.setLineDash([0]),q.lineDashOffset=0,q.restore()}else{if(this.from!=this.to)drawDashedLine(q,this.from.x,this.from.y,this.to.x,this.to.y,ot);else{var wo=this._getCircleData(q),lf=_slicedToArray$1(wo,3),yf=lf[0],cf=lf[1],vf=lf[2];this._circle(q,K,yf,cf,vf)}this.enableShadow(q,K),q.stroke(),this.disableShadow(q,K)}}},{key:"findBorderPosition",value:function(q,K,X){return this.from!=this.to?this._findBorderPosition(q,K,X):this._findBorderPositionCircle(q,K,X)}},{key:"findBorderPositions",value:function(q){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,q),to:this._findBorderPosition(this.to,q)};var K,X=_sliceInstanceProperty$2(K=this._getCircleData(q)).call(K,0,2),tt=_slicedToArray$1(X,2),rt=tt[0],ot=tt[1];return{from:this._findBorderPositionCircle(this.from,q,{x:rt,y:ot,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,q,{x:rt,y:ot,low:.6,high:.8,direction:1})}}},{key:"_getCircleData",value:function(q){var K=this.options.selfReference.size;q!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(q);var X=getSelfRefCoordinates(q,this.options.selfReference.angle,K,this.from);return[X.x,X.y,K]}},{key:"_pointOnCircle",value:function(q,K,X,tt){var rt=tt*2*Math.PI;return{x:q+X*Math.cos(rt),y:K-X*Math.sin(rt)}}},{key:"_findBorderPositionCircle",value:function(q,K,X){var tt=X.x,rt=X.y,ot=X.low,ut=X.high,yn=X.direction,uo=10,po=this.options.selfReference.size,mo=.05,wo,lf=(ot+ut)*.5,yf=0;this.options.arrowStrikethrough===!0&&(yn===-1?yf=this.options.endPointOffset.from:yn===1&&(yf=this.options.endPointOffset.to));var cf=0;do{lf=(ot+ut)*.5,wo=this._pointOnCircle(tt,rt,po,lf);var vf=Math.atan2(q.y-wo.y,q.x-wo.x),_f=q.distanceToBorder(K,vf)+yf,$f=Math.sqrt(Math.pow(wo.x-q.x,2)+Math.pow(wo.y-q.y,2)),xf=_f-$f;if(Math.abs(xf)0?yn>0?ot=lf:ut=lf:yn>0?ut=lf:ot=lf,++cf}while(ot<=ut&&cf1?po=1:po<0&&(po=0);var mo=q+po*ut,wo=K+po*yn,lf=mo-rt,yf=wo-ot;return Math.sqrt(lf*lf+yf*yf)}},{key:"getArrowData",value:function(q,K,X,tt,rt,ot){var ut,yn,uo,po,mo,wo,lf,yf=ot.width;K==="from"?(uo=this.from,po=this.to,mo=ot.fromArrowScale<0,wo=Math.abs(ot.fromArrowScale),lf=ot.fromArrowType):K==="to"?(uo=this.to,po=this.from,mo=ot.toArrowScale<0,wo=Math.abs(ot.toArrowScale),lf=ot.toArrowType):(uo=this.to,po=this.from,mo=ot.middleArrowScale<0,wo=Math.abs(ot.middleArrowScale),lf=ot.middleArrowType);var cf=15*wo+3*yf;if(uo!=po){var vf=_Math$hypot(uo.x-po.x,uo.y-po.y),_f=cf/vf;if(K!=="middle")if(this.options.smooth.enabled===!0){var $f=this._findBorderPosition(uo,q,{via:X}),xf=this.getPoint($f.t+_f*(K==="from"?1:-1),X);ut=Math.atan2($f.y-xf.y,$f.x-xf.x),yn=$f}else ut=Math.atan2(uo.y-po.y,uo.x-po.x),yn=this._findBorderPosition(uo,q);else{var Af=(mo?-_f:_f)/2,Cf=this.getPoint(.5+Af,X),Pf=this.getPoint(.5-Af,X);ut=Math.atan2(Cf.y-Pf.y,Cf.x-Pf.x),yn=this.getPoint(.5,X)}}else{var Bf=this._getCircleData(q),Hf=_slicedToArray$1(Bf,3),Df=Hf[0],Lf=Hf[1],kf=Hf[2];if(K==="from"){var Nf=this.options.selfReference.angle,Yf=this.options.selfReference.angle+Math.PI,Gf=this._findBorderPositionCircle(this.from,q,{x:Df,y:Lf,low:Nf,high:Yf,direction:-1});ut=Gf.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,yn=Gf}else if(K==="to"){var rp=this.options.selfReference.angle,ip=this.options.selfReference.angle+Math.PI,ap=this._findBorderPositionCircle(this.from,q,{x:Df,y:Lf,low:rp,high:ip,direction:1});ut=ap.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,yn=ap}else{var yp=this.options.selfReference.angle/(2*Math.PI);yn=this._pointOnCircle(Df,Lf,kf,yp),ut=yp*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var vp=yn.x-cf*.9*Math.cos(ut),Np=yn.y-cf*.9*Math.sin(ut),jp={x:vp,y:Np};return{point:yn,core:jp,angle:ut,length:cf,type:lf}}},{key:"drawArrowHead",value:function(q,K,X,tt,rt){q.strokeStyle=this.getColor(q,K),q.fillStyle=q.strokeStyle,q.lineWidth=K.width;var ot=EndPoints.draw(q,rt);ot&&(this.enableShadow(q,K),_fillInstanceProperty$1(q).call(q),this.disableShadow(q,K))}},{key:"enableShadow",value:function(q,K){K.shadow===!0&&(q.shadowColor=K.shadowColor,q.shadowBlur=K.shadowSize,q.shadowOffsetX=K.shadowX,q.shadowOffsetY=K.shadowY)}},{key:"disableShadow",value:function(q,K){K.shadow===!0&&(q.shadowColor="rgba(0,0,0,0)",q.shadowBlur=0,q.shadowOffsetX=0,q.shadowOffsetY=0)}},{key:"drawBackground",value:function(q,K){if(K.background!==!1){var X={strokeStyle:q.strokeStyle,lineWidth:q.lineWidth,dashes:q.dashes};q.strokeStyle=K.backgroundColor,q.lineWidth=K.backgroundSize,this.setStrokeDashed(q,K.backgroundDashes),q.stroke(),q.strokeStyle=X.strokeStyle,q.lineWidth=X.lineWidth,q.dashes=X.dashes,this.setStrokeDashed(q,K.dashes)}}},{key:"setStrokeDashed",value:function(q,K){if(K!==!1)if(q.setLineDash!==void 0){var X=_Array$isArray$2(K)?K:[5,5];q.setLineDash(X)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else q.setLineDash!==void 0?q.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),F}();function ownKeys$7(F,W){var q=_Object$keys$1(F);if(_Object$getOwnPropertySymbols$1){var K=_Object$getOwnPropertySymbols$1(F);W&&(K=_filterInstanceProperty$1(K).call(K,function(X){return _Object$getOwnPropertyDescriptor$1(F,X).enumerable})),q.push.apply(q,K)}return q}function _objectSpread$4(F){for(var W=1;W"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var BezierEdgeBase=function(F){_inherits$1(q,F);var W=_createSuper$9$1(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"_findBorderPositionBezier",value:function(X,tt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),ot=10,ut=.2,yn=!1,uo=1,po=0,mo=this.to,wo,lf,yf=this.options.endPointOffset?this.options.endPointOffset.to:0;X.id===this.from.id&&(mo=this.from,yn=!0,yf=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(yf=0);var cf=0;do{lf=(po+uo)*.5,wo=this.getPoint(lf,rt);var vf=Math.atan2(mo.y-wo.y,mo.x-wo.x),_f=mo.distanceToBorder(tt,vf)+yf,$f=Math.sqrt(Math.pow(wo.x-mo.x,2)+Math.pow(wo.y-mo.y,2)),xf=_f-$f;if(Math.abs(xf)0&&(mo=this._getDistanceToLine(vf,_f,yf,cf,ut,yn),po=mo"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var BezierEdgeDynamic=function(F){_inherits$1(q,F);var W=_createSuper$8$1(q);function q(K,X,tt){var rt;return _classCallCheck$1(this,q),rt=W.call(this,K,X,tt),rt.via=rt.via,rt._boundFunction=function(){rt.positionBezierNode()},rt._body.emitter.on("_repositionBezierNodes",rt._boundFunction),rt}return _createClass$1(q,[{key:"setOptions",value:function(X){_get(_getPrototypeOf$1(q.prototype),"setOptions",this).call(this,X);var tt=!1;this.options.physics!==X.physics&&(tt=!0),this.options=X,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),tt===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}},{key:"cleanup",value:function(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}},{key:"setupSupportNode",value:function(){if(this.via===void 0){var X="edgeId:"+this.id,tt=this._body.functions.createNode({id:X,shape:"circle",physics:!0,hidden:!0});this._body.nodes[X]=tt,this.via=tt,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{key:"positionBezierNode",value:function(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}},{key:"_line",value:function(X,tt,rt){this._bezierCurve(X,tt,rt)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(X){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){var rt=this._getCircleData(),ot=_slicedToArray$1(rt,3),ut=ot[0],yn=ot[1],uo=ot[2],po=2*Math.PI*(1-X);return{x:ut+uo*Math.sin(po),y:yn+uo-uo*(1-Math.cos(po))}}else return{x:Math.pow(1-X,2)*this.fromPoint.x+2*X*(1-X)*tt.x+Math.pow(X,2)*this.toPoint.x,y:Math.pow(1-X,2)*this.fromPoint.y+2*X*(1-X)*tt.y+Math.pow(X,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(X,tt){return this._findBorderPositionBezier(X,tt,this.via)}},{key:"_getDistanceToEdge",value:function(X,tt,rt,ot,ut,yn){return this._getDistanceToBezierEdge(X,tt,rt,ot,ut,yn,this.via)}}]),q}(BezierEdgeBase);function _createSuper$7$1(F){var W=_isNativeReflectConstruct$7$1();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$7$1(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var BezierEdgeStatic=function(F){_inherits$1(q,F);var W=_createSuper$7$1(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"_line",value:function(X,tt,rt){this._bezierCurve(X,tt,rt)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var X=this.options.smooth.roundness,tt=this.options.smooth.type,rt=Math.abs(this.from.x-this.to.x),ot=Math.abs(this.from.y-this.to.y);if(tt==="discrete"||tt==="diagonalCross"){var ut,yn;rt<=ot?ut=yn=X*ot:ut=yn=X*rt,this.from.x>this.to.x&&(ut=-ut),this.from.y>=this.to.y&&(yn=-yn);var uo=this.from.x+ut,po=this.from.y+yn;return tt==="discrete"&&(rt<=ot?uo=rtthis.to.x&&(Bf=-Bf),this.from.y>=this.to.y&&(Hf=-Hf);var Df=this.from.x+Bf,Lf=this.from.y+Hf;return rt<=ot?this.from.x<=this.to.x?Df=this.to.xDf?this.to.x:Df:this.from.y>=this.to.y?Lf=this.to.y>Lf?this.to.y:Lf:Lf=this.to.y2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(X,tt,rt.via)}},{key:"_getDistanceToEdge",value:function(X,tt,rt,ot,ut,yn){var uo=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(X,tt,rt,ot,ut,yn,uo)}},{key:"getPoint",value:function(X){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),rt=X,ot=Math.pow(1-rt,2)*this.fromPoint.x+2*rt*(1-rt)*tt.x+Math.pow(rt,2)*this.toPoint.x,ut=Math.pow(1-rt,2)*this.fromPoint.y+2*rt*(1-rt)*tt.y+Math.pow(rt,2)*this.toPoint.y;return{x:ot,y:ut}}}]),q}(BezierEdgeBase);function _createSuper$6$1(F){var W=_isNativeReflectConstruct$6$1();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$6$1(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var CubicBezierEdgeBase=function(F){_inherits$1(q,F);var W=_createSuper$6$1(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"_getDistanceToBezierEdge2",value:function(X,tt,rt,ot,ut,yn,uo,po){for(var mo=1e9,wo=X,lf=tt,yf=[0,0,0,0],cf=1;cf<10;cf++){var vf=.1*cf;yf[0]=Math.pow(1-vf,3),yf[1]=3*vf*Math.pow(1-vf,2),yf[2]=3*Math.pow(vf,2)*(1-vf),yf[3]=Math.pow(vf,3);var _f=yf[0]*X+yf[1]*uo.x+yf[2]*po.x+yf[3]*rt,$f=yf[0]*tt+yf[1]*uo.y+yf[2]*po.y+yf[3]*ot;if(cf>0){var xf=this._getDistanceToLine(wo,lf,_f,$f,ut,yn);mo=xf"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var CubicBezierEdge=function(F){_inherits$1(q,F);var W=_createSuper$5$1(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"_line",value:function(X,tt,rt){var ot=rt[0],ut=rt[1];this._bezierCurve(X,tt,ot,ut)}},{key:"_getViaCoordinates",value:function(){var X=this.from.x-this.to.x,tt=this.from.y-this.to.y,rt,ot,ut,yn,uo=this.options.smooth.roundness;return(Math.abs(X)>Math.abs(tt)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(ot=this.from.y,yn=this.to.y,rt=this.from.x-uo*X,ut=this.to.x+uo*X):(ot=this.from.y-uo*tt,yn=this.to.y+uo*tt,rt=this.from.x,ut=this.to.x),[{x:rt,y:ot},{x:ut,y:yn}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(X,tt){return this._findBorderPositionBezier(X,tt)}},{key:"_getDistanceToEdge",value:function(X,tt,rt,ot,ut,yn){var uo=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),po=_slicedToArray$1(uo,2),mo=po[0],wo=po[1];return this._getDistanceToBezierEdge2(X,tt,rt,ot,ut,yn,mo,wo)}},{key:"getPoint",value:function(X){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),rt=_slicedToArray$1(tt,2),ot=rt[0],ut=rt[1],yn=X,uo=[Math.pow(1-yn,3),3*yn*Math.pow(1-yn,2),3*Math.pow(yn,2)*(1-yn),Math.pow(yn,3)],po=uo[0]*this.fromPoint.x+uo[1]*ot.x+uo[2]*ut.x+uo[3]*this.toPoint.x,mo=uo[0]*this.fromPoint.y+uo[1]*ot.y+uo[2]*ut.y+uo[3]*this.toPoint.y;return{x:po,y:mo}}}]),q}(CubicBezierEdgeBase);function _createSuper$4$1(F){var W=_isNativeReflectConstruct$4$1();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$4$1(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var StraightEdge=function(F){_inherits$1(q,F);var W=_createSuper$4$1(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"_line",value:function(X,tt){X.beginPath(),X.moveTo(this.fromPoint.x,this.fromPoint.y),X.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(X,tt),X.stroke(),this.disableShadow(X,tt)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(X){return{x:(1-X)*this.fromPoint.x+X*this.toPoint.x,y:(1-X)*this.fromPoint.y+X*this.toPoint.y}}},{key:"_findBorderPosition",value:function(X,tt){var rt=this.to,ot=this.from;X.id===this.from.id&&(rt=this.from,ot=this.to);var ut=Math.atan2(rt.y-ot.y,rt.x-ot.x),yn=rt.x-ot.x,uo=rt.y-ot.y,po=Math.sqrt(yn*yn+uo*uo),mo=X.distanceToBorder(tt,ut),wo=(po-mo)/po;return{x:(1-wo)*ot.x+wo*rt.x,y:(1-wo)*ot.y+wo*rt.y,t:0}}},{key:"_getDistanceToEdge",value:function(X,tt,rt,ot,ut,yn){return this._getDistanceToLine(X,tt,rt,ot,ut,yn)}}]),q}(EdgeBase),Edge=function(){function F(W,q,K,X,tt){if(_classCallCheck$1(this,F),q===void 0)throw new Error("No body provided");this.options=bridgeObject$1(X),this.globalOptions=X,this.defaultOptions=tt,this.body=q,this.imagelist=K,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new Label(this.body,this.options,!0),this.setOptions(W)}return _createClass$1(F,[{key:"setOptions",value:function(q){if(q){var K=typeof q.physics<"u"&&this.options.physics!==q.physics||typeof q.hidden<"u"&&(this.options.hidden||!1)!==(q.hidden||!1)||typeof q.from<"u"&&this.options.from!==q.from||typeof q.to<"u"&&this.options.to!==q.to;F.parseOptions(this.options,q,!0,this.globalOptions),q.id!==void 0&&(this.id=q.id),q.from!==void 0&&(this.fromId=q.from),q.to!==void 0&&(this.toId=q.to),q.title!==void 0&&(this.title=q.title),q.value!==void 0&&(q.value=_parseFloat$1$1(q.value));var X=[q,this.options,this.defaultOptions];return this.chooser=choosify("edge",X),this.updateLabelModule(q),K=this.updateEdgeType()||K,this._setInteractionWidths(),this.connect(),K}}},{key:"getFormattingValues",value:function(){var q=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,K=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,X=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,tt=this.options.color.inherit,rt={toArrow:q,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:X,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:K,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:tt?void 0:this.options.color.color,inheritsColor:tt,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){var ot=this.options.selectionWidth;typeof ot=="function"?rt.width=ot(rt.width):typeof ot=="number"&&(rt.width+=ot),rt.width=Math.max(rt.width,.3/this.body.view.scale),rt.color=this.options.color.highlight,rt.shadow=this.options.shadow.enabled}else if(this.hover){var ut=this.options.hoverWidth;typeof ut=="function"?rt.width=ut(rt.width):typeof ut=="number"&&(rt.width+=ut),rt.width=Math.max(rt.width,.3/this.body.view.scale),rt.color=this.options.color.hover,rt.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(rt,this.options.id,this.selected,this.hover),rt.color!==void 0&&(rt.inheritsColor=!1),rt.shadow===!1&&(rt.shadowColor!==this.options.shadow.color||rt.shadowSize!==this.options.shadow.size||rt.shadowX!==this.options.shadow.x||rt.shadowY!==this.options.shadow.y)&&(rt.shadow=!0));else rt.shadow=this.options.shadow.enabled,rt.width=Math.max(rt.width,.3/this.body.view.scale);return rt}},{key:"updateLabelModule",value:function(q){var K=[q,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,K),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var q=this.options.smooth,K=!1,X=!0;return this.edgeType!==void 0&&((this.edgeType instanceof BezierEdgeDynamic&&q.enabled===!0&&q.type==="dynamic"||this.edgeType instanceof CubicBezierEdge&&q.enabled===!0&&q.type==="cubicBezier"||this.edgeType instanceof BezierEdgeStatic&&q.enabled===!0&&q.type!=="dynamic"&&q.type!=="cubicBezier"||this.edgeType instanceof StraightEdge&&q.type.enabled===!1)&&(X=!1),X===!0&&(K=this.cleanup())),X===!0?q.enabled===!0?q.type==="dynamic"?(K=!0,this.edgeType=new BezierEdgeDynamic(this.options,this.body,this.labelModule)):q.type==="cubicBezier"?this.edgeType=new CubicBezierEdge(this.options,this.body,this.labelModule):this.edgeType=new BezierEdgeStatic(this.options,this.body,this.labelModule):this.edgeType=new StraightEdge(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),K}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(q,K,X){if(this.options.value!==void 0){var tt=this.options.scaling.customScalingFunction(q,K,X,this.options.value),rt=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var ot=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+tt*ot}this.options.width=this.options.scaling.min+tt*rt}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(q){var K=this.getFormattingValues();if(!K.hidden){var X=this.edgeType.getViaNode();this.edgeType.drawLine(q,K,this.selected,this.hover,X),this.drawLabel(q,X)}}},{key:"drawArrows",value:function(q){var K=this.getFormattingValues();if(!K.hidden){var X=this.edgeType.getViaNode(),tt={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,K.fromArrow&&(tt.from=this.edgeType.getArrowData(q,"from",X,this.selected,this.hover,K),K.arrowStrikethrough===!1&&(this.edgeType.fromPoint=tt.from.core),K.fromArrowSrc&&(tt.from.image=this.imagelist.load(K.fromArrowSrc)),K.fromArrowImageWidth&&(tt.from.imageWidth=K.fromArrowImageWidth),K.fromArrowImageHeight&&(tt.from.imageHeight=K.fromArrowImageHeight)),K.toArrow&&(tt.to=this.edgeType.getArrowData(q,"to",X,this.selected,this.hover,K),K.arrowStrikethrough===!1&&(this.edgeType.toPoint=tt.to.core),K.toArrowSrc&&(tt.to.image=this.imagelist.load(K.toArrowSrc)),K.toArrowImageWidth&&(tt.to.imageWidth=K.toArrowImageWidth),K.toArrowImageHeight&&(tt.to.imageHeight=K.toArrowImageHeight)),K.middleArrow&&(tt.middle=this.edgeType.getArrowData(q,"middle",X,this.selected,this.hover,K),K.middleArrowSrc&&(tt.middle.image=this.imagelist.load(K.middleArrowSrc)),K.middleArrowImageWidth&&(tt.middle.imageWidth=K.middleArrowImageWidth),K.middleArrowImageHeight&&(tt.middle.imageHeight=K.middleArrowImageHeight)),K.fromArrow&&this.edgeType.drawArrowHead(q,K,this.selected,this.hover,tt.from),K.middleArrow&&this.edgeType.drawArrowHead(q,K,this.selected,this.hover,tt.middle),K.toArrow&&this.edgeType.drawArrowHead(q,K,this.selected,this.hover,tt.to)}}},{key:"drawLabel",value:function(q,K){if(this.options.label!==void 0){var X=this.from,tt=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(q,this.selected,this.hover);var rt;if(X.id!=tt.id){this.labelModule.pointToSelf=!1,rt=this.edgeType.getPoint(.5,K),q.save();var ot=this._getRotation(q);ot.angle!=0&&(q.translate(ot.x,ot.y),q.rotate(ot.angle)),this.labelModule.draw(q,rt.x,rt.y,this.selected,this.hover),q.restore()}else{this.labelModule.pointToSelf=!0;var ut=getSelfRefCoordinates(q,this.options.selfReference.angle,this.options.selfReference.size,X);rt=this._pointOnCircle(ut.x,ut.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(q,rt.x,rt.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(q){var K=[];if(this.labelModule.visible()){var X=this._getRotation();pointInRect(this.labelModule.getSize(),q,X)&&K.push({edgeId:this.id,labelId:0})}var tt={left:q.x,top:q.y};return this.isOverlappingWith(tt)&&K.push({edgeId:this.id}),K}},{key:"isOverlappingWith",value:function(q){if(this.connected){var K=10,X=this.from.x,tt=this.from.y,rt=this.to.x,ot=this.to.y,ut=q.left,yn=q.top,uo=this.edgeType.getDistanceToEdge(X,tt,rt,ot,ut,yn);return uo0&&ot<0)&&(ut+=Math.PI),tt.angle=ut,tt}},{key:"_pointOnCircle",value:function(q,K,X,tt){return{x:q+X*Math.cos(tt),y:K-X*Math.sin(tt)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}],[{key:"parseOptions",value:function(q,K){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},rt=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,ot=["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"];if(selectiveDeepExtend$1(ot,q,K,X),K.endPointOffset!==void 0&&K.endPointOffset.from!==void 0&&(_Number$isFinite(K.endPointOffset.from)?q.endPointOffset.from=K.endPointOffset.from:(q.endPointOffset.from=tt.endPointOffset.from!==void 0?tt.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),K.endPointOffset!==void 0&&K.endPointOffset.to!==void 0&&(_Number$isFinite(K.endPointOffset.to)?q.endPointOffset.to=K.endPointOffset.to:(q.endPointOffset.to=tt.endPointOffset.to!==void 0?tt.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),isValidLabel(K.label)?q.label=K.label:isValidLabel(q.label)||(q.label=void 0),mergeOptions$1(q,K,"smooth",tt),mergeOptions$1(q,K,"shadow",tt),mergeOptions$1(q,K,"background",tt),K.dashes!==void 0&&K.dashes!==null?q.dashes=K.dashes:X===!0&&K.dashes===null&&(q.dashes=_Object$create$1$1(tt.dashes)),K.scaling!==void 0&&K.scaling!==null?(K.scaling.min!==void 0&&(q.scaling.min=K.scaling.min),K.scaling.max!==void 0&&(q.scaling.max=K.scaling.max),mergeOptions$1(q.scaling,K.scaling,"label",tt.scaling)):X===!0&&K.scaling===null&&(q.scaling=_Object$create$1$1(tt.scaling)),K.arrows!==void 0&&K.arrows!==null)if(typeof K.arrows=="string"){var ut=K.arrows.toLowerCase();q.arrows.to.enabled=_indexOfInstanceProperty$1(ut).call(ut,"to")!=-1,q.arrows.middle.enabled=_indexOfInstanceProperty$1(ut).call(ut,"middle")!=-1,q.arrows.from.enabled=_indexOfInstanceProperty$1(ut).call(ut,"from")!=-1}else if(_typeof$1(K.arrows)==="object")mergeOptions$1(q.arrows,K.arrows,"to",tt.arrows),mergeOptions$1(q.arrows,K.arrows,"middle",tt.arrows),mergeOptions$1(q.arrows,K.arrows,"from",tt.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+_JSON$stringify$1(K.arrows));else X===!0&&K.arrows===null&&(q.arrows=_Object$create$1$1(tt.arrows));if(K.color!==void 0&&K.color!==null){var yn=isString$2(K.color)?{color:K.color,highlight:K.color,hover:K.color,inherit:!1,opacity:1}:K.color,uo=q.color;if(rt)deepExtend$1(uo,tt.color,!1,X);else for(var po in uo)Object.prototype.hasOwnProperty.call(uo,po)&&delete uo[po];if(isString$2(uo))uo.color=uo,uo.highlight=uo,uo.hover=uo,uo.inherit=!1,yn.opacity===void 0&&(uo.opacity=1);else{var mo=!1;yn.color!==void 0&&(uo.color=yn.color,mo=!0),yn.highlight!==void 0&&(uo.highlight=yn.highlight,mo=!0),yn.hover!==void 0&&(uo.hover=yn.hover,mo=!0),yn.inherit!==void 0&&(uo.inherit=yn.inherit),yn.opacity!==void 0&&(uo.opacity=Math.min(1,Math.max(0,yn.opacity))),mo===!0?uo.inherit=!1:uo.inherit===void 0&&(uo.inherit="from")}}else X===!0&&K.color===null&&(q.color=bridgeObject$1(tt.color));X===!0&&K.font===null&&(q.font=bridgeObject$1(tt.font)),Object.prototype.hasOwnProperty.call(K,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),q.selfReference.size=K.selfReferenceSize)}}]),F}(),EdgesHandler=function(){function F(W,q,K){var X,tt=this;_classCallCheck$1(this,F),this.body=W,this.images=q,this.groups=K,this.body.functions.createEdge=_bindInstanceProperty$1$1(X=this.create).call(X,this),this.edgesListeners={add:function(ot,ut){tt.add(ut.items)},update:function(ot,ut){tt.update(ut.items)},remove:function(ot,ut){tt.remove(ut.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(ot,ut,yn,uo){if(ut===ot)return .5;var po=1/(ut-ot);return Math.max(0,(uo-ot)*po)}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},deepExtend$1(this.options,this.defaultOptions),this.bindEventListeners()}return _createClass$1(F,[{key:"bindEventListeners",value:function(){var q=this,K,X;this.body.emitter.on("_forceDisableDynamicCurves",function(tt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;tt==="dynamic"&&(tt="continuous");var ot=!1;for(var ut in q.body.edges)if(Object.prototype.hasOwnProperty.call(q.body.edges,ut)){var yn=q.body.edges[ut],uo=q.body.data.edges.get(ut);if(uo!=null){var po=uo.smooth;po!==void 0&&po.enabled===!0&&po.type==="dynamic"&&(tt===void 0?yn.setOptions({smooth:!1}):yn.setOptions({smooth:{type:tt}}),ot=!0)}}rt===!0&&ot===!0&&q.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){q.reconnectEdges()}),this.body.emitter.on("refreshEdges",_bindInstanceProperty$1$1(K=this.refresh).call(K,this)),this.body.emitter.on("refresh",_bindInstanceProperty$1$1(X=this.refresh).call(X,this)),this.body.emitter.on("destroy",function(){forEach$1$1(q.edgesListeners,function(tt,rt){q.body.data.edges&&q.body.data.edges.off(rt,tt)}),delete q.body.functions.createEdge,delete q.edgesListeners.add,delete q.edgesListeners.update,delete q.edgesListeners.remove,delete q.edgesListeners})}},{key:"setOptions",value:function(q){if(q!==void 0){Edge.parseOptions(this.options,q,!0,this.defaultOptions,!0);var K=!1;if(q.smooth!==void 0)for(var X in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,X)&&(K=this.body.edges[X].updateEdgeType()||K);if(q.font!==void 0)for(var tt in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,tt)&&this.body.edges[tt].updateLabelModule();(q.hidden!==void 0||q.physics!==void 0||K===!0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(q){var K=this,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tt=this.body.data.edges;if(isDataViewLike$1("id",q))this.body.data.edges=q;else if(_Array$isArray$2(q))this.body.data.edges=new DataSet,this.body.data.edges.add(q);else if(!q)this.body.data.edges=new DataSet;else throw new TypeError("Array or DataSet expected");if(tt&&forEach$1$1(this.edgesListeners,function(ot,ut){tt.off(ut,ot)}),this.body.edges={},this.body.data.edges){forEach$1$1(this.edgesListeners,function(ot,ut){K.body.data.edges.on(ut,ot)});var rt=this.body.data.edges.getIds();this.add(rt,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),X===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(q){for(var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X=this.body.edges,tt=this.body.data.edges,rt=0;rt1&&arguments[1]!==void 0?arguments[1]:!0;if(q.length!==0){var X=this.body.edges;forEach$1$1(q,function(tt){var rt=X[tt];rt!==void 0&&rt.remove()}),K&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var q=this;forEach$1$1(this.body.edges,function(K,X){var tt=q.body.data.edges.get(X);tt!==void 0&&K.setOptions(tt)})}},{key:"create",value:function(q){return new Edge(q,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var q,K=this.body.nodes,X=this.body.edges;for(q in K)Object.prototype.hasOwnProperty.call(K,q)&&(K[q].edges=[]);for(q in X)if(Object.prototype.hasOwnProperty.call(X,q)){var tt=X[q];tt.from=null,tt.to=null,tt.connect()}}},{key:"getConnectedNodes",value:function(q){var K=[];if(this.body.edges[q]!==void 0){var X=this.body.edges[q];X.fromId!==void 0&&K.push(X.fromId),X.toId!==void 0&&K.push(X.toId)}return K}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var q=this,K=[];forEach$1$1(this.body.edges,function(X,tt){var rt=q.body.nodes[X.toId],ot=q.body.nodes[X.fromId];rt!==void 0&&rt.isCluster===!0||ot!==void 0&&ot.isCluster===!0||(rt===void 0||ot===void 0)&&K.push(tt)}),this.remove(K,!1)}},{key:"_addMissingEdges",value:function(){var q=this.body.data.edges;if(q!=null){var K=this.body.edges,X=[];_forEachInstanceProperty$1(q).call(q,function(tt,rt){var ot=K[rt];ot===void 0&&X.push(rt)}),this.add(X,!0)}}}]),F}(),BarnesHutSolver=function(){function F(W,q,K){_classCallCheck$1(this,F),this.body=W,this.physicsBody=q,this.barnesHutTree,this.setOptions(K),this._rng=Alea$1("BARNES HUT SOLVER")}return _createClass$1(F,[{key:"setOptions",value:function(q){this.options=q,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"solve",value:function(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){var q,K=this.body.nodes,X=this.physicsBody.physicsNodeIndices,tt=X.length,rt=this._formBarnesHutTree(K,X);this.barnesHutTree=rt;for(var ot=0;ot0&&this._getForceContributions(rt.root,q)}}},{key:"_getForceContributions",value:function(q,K){this._getForceContribution(q.children.NW,K),this._getForceContribution(q.children.NE,K),this._getForceContribution(q.children.SW,K),this._getForceContribution(q.children.SE,K)}},{key:"_getForceContribution",value:function(q,K){if(q.childrenCount>0){var X=q.centerOfMass.x-K.x,tt=q.centerOfMass.y-K.y,rt=Math.sqrt(X*X+tt*tt);rt*q.calcSize>this.thetaInversed?this._calculateForces(rt,X,tt,K,q):q.childrenCount===4?this._getForceContributions(q,K):q.children.data.id!=K.id&&this._calculateForces(rt,X,tt,K,q)}}},{key:"_calculateForces",value:function(q,K,X,tt,rt){q===0&&(q=.1,K=q),this.overlapAvoidanceFactor<1&&tt.shape.radius&&(q=Math.max(.1+this.overlapAvoidanceFactor*tt.shape.radius,q-tt.shape.radius));var ot=this.options.gravitationalConstant*rt.mass*tt.options.mass/Math.pow(q,3),ut=K*ot,yn=X*ot;this.physicsBody.forces[tt.id].x+=ut,this.physicsBody.forces[tt.id].y+=yn}},{key:"_formBarnesHutTree",value:function(q,K){for(var X,tt=K.length,rt=q[K[0]].x,ot=q[K[0]].y,ut=q[K[0]].x,yn=q[K[0]].y,uo=1;uo0&&(mout&&(ut=mo),woyn&&(yn=wo))}var lf=Math.abs(ut-rt)-Math.abs(yn-ot);lf>0?(ot-=.5*lf,yn+=.5*lf):(rt+=.5*lf,ut-=.5*lf);var yf=1e-5,cf=Math.max(yf,Math.abs(ut-rt)),vf=.5*cf,_f=.5*(rt+ut),$f=.5*(ot+yn),xf={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:_f-vf,maxX:_f+vf,minY:$f-vf,maxY:$f+vf},size:cf,calcSize:1/cf,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(xf.root);for(var Af=0;Af0&&this._placeInTree(xf.root,X);return xf}},{key:"_updateBranchMass",value:function(q,K){var X=q.centerOfMass,tt=q.mass+K.options.mass,rt=1/tt;X.x=X.x*q.mass+K.x*K.options.mass,X.x*=rt,X.y=X.y*q.mass+K.y*K.options.mass,X.y*=rt,q.mass=tt;var ot=Math.max(Math.max(K.height,K.radius),K.width);q.maxWidth=q.maxWidthK.x?tt.maxY>K.y?rt="NW":rt="SW":tt.maxY>K.y?rt="NE":rt="SE",this._placeInRegion(q,K,rt)}},{key:"_placeInRegion",value:function(q,K,X){var tt=q.children[X];switch(tt.childrenCount){case 0:tt.children.data=K,tt.childrenCount=1,this._updateBranchMass(tt,K);break;case 1:tt.children.data.x===K.x&&tt.children.data.y===K.y?(K.x+=this._rng(),K.y+=this._rng()):(this._splitBranch(tt),this._placeInTree(tt,K));break;case 4:this._placeInTree(tt,K);break}}},{key:"_splitBranch",value:function(q){var K=null;q.childrenCount===1&&(K=q.children.data,q.mass=0,q.centerOfMass.x=0,q.centerOfMass.y=0),q.childrenCount=4,q.children.data=null,this._insertRegion(q,"NW"),this._insertRegion(q,"NE"),this._insertRegion(q,"SW"),this._insertRegion(q,"SE"),K!=null&&this._placeInTree(q,K)}},{key:"_insertRegion",value:function(q,K){var X,tt,rt,ot,ut=.5*q.size;switch(K){case"NW":X=q.range.minX,tt=q.range.minX+ut,rt=q.range.minY,ot=q.range.minY+ut;break;case"NE":X=q.range.minX+ut,tt=q.range.maxX,rt=q.range.minY,ot=q.range.minY+ut;break;case"SW":X=q.range.minX,tt=q.range.minX+ut,rt=q.range.minY+ut,ot=q.range.maxY;break;case"SE":X=q.range.minX+ut,tt=q.range.maxX,rt=q.range.minY+ut,ot=q.range.maxY;break}q.children[K]={centerOfMass:{x:0,y:0},mass:0,range:{minX:X,maxX:tt,minY:rt,maxY:ot},size:.5*q.size,calcSize:2*q.calcSize,children:{data:null},maxWidth:0,level:q.level+1,childrenCount:0}}},{key:"_debug",value:function(q,K){this.barnesHutTree!==void 0&&(q.lineWidth=1,this._drawBranch(this.barnesHutTree.root,q,K))}},{key:"_drawBranch",value:function(q,K,X){X===void 0&&(X="#FF0000"),q.childrenCount===4&&(this._drawBranch(q.children.NW,K),this._drawBranch(q.children.NE,K),this._drawBranch(q.children.SE,K),this._drawBranch(q.children.SW,K)),K.strokeStyle=X,K.beginPath(),K.moveTo(q.range.minX,q.range.minY),K.lineTo(q.range.maxX,q.range.minY),K.stroke(),K.beginPath(),K.moveTo(q.range.maxX,q.range.minY),K.lineTo(q.range.maxX,q.range.maxY),K.stroke(),K.beginPath(),K.moveTo(q.range.maxX,q.range.maxY),K.lineTo(q.range.minX,q.range.maxY),K.stroke(),K.beginPath(),K.moveTo(q.range.minX,q.range.maxY),K.lineTo(q.range.minX,q.range.minY),K.stroke()}}]),F}(),RepulsionSolver=function(){function F(W,q,K){_classCallCheck$1(this,F),this._rng=Alea$1("REPULSION SOLVER"),this.body=W,this.physicsBody=q,this.setOptions(K)}return _createClass$1(F,[{key:"setOptions",value:function(q){this.options=q}},{key:"solve",value:function(){for(var q,K,X,tt,rt,ot,ut,yn,uo=this.body.nodes,po=this.physicsBody.physicsNodeIndices,mo=this.physicsBody.forces,wo=this.options.nodeDistance,lf=-2/3/wo,yf=4/3,cf=0;cf"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var ForceAtlas2BasedRepulsionSolver=function(F){_inherits$1(q,F);var W=_createSuper$3$1(q);function q(K,X,tt){var rt;return _classCallCheck$1(this,q),rt=W.call(this,K,X,tt),rt._rng=Alea$1("FORCE ATLAS 2 BASED REPULSION SOLVER"),rt}return _createClass$1(q,[{key:"_calculateForces",value:function(X,tt,rt,ot,ut){X===0&&(X=.1*this._rng(),tt=X),this.overlapAvoidanceFactor<1&&ot.shape.radius&&(X=Math.max(.1+this.overlapAvoidanceFactor*ot.shape.radius,X-ot.shape.radius));var yn=ot.edges.length+1,uo=this.options.gravitationalConstant*ut.mass*ot.options.mass*yn/Math.pow(X,2),po=tt*uo,mo=rt*uo;this.physicsBody.forces[ot.id].x+=po,this.physicsBody.forces[ot.id].y+=mo}}]),q}(BarnesHutSolver);function _createSuper$2$1(F){var W=_isNativeReflectConstruct$2$1();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$2$1(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var ForceAtlas2BasedCentralGravitySolver=function(F){_inherits$1(q,F);var W=_createSuper$2$1(q);function q(K,X,tt){return _classCallCheck$1(this,q),W.call(this,K,X,tt)}return _createClass$1(q,[{key:"_calculateForces",value:function(X,tt,rt,ot,ut){if(X>0){var yn=ut.edges.length+1,uo=this.options.centralGravity*yn*ut.options.mass;ot[ut.id].x=tt*uo,ot[ut.id].y=rt*uo}}}]),q}(CentralGravitySolver),PhysicsEngine=function(){function F(W){_classCallCheck$1(this,F),this.body=W,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},_Object$assign$1(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return _createClass$1(F,[{key:"bindEventListeners",value:function(){var q=this;this.body.emitter.on("initPhysics",function(){q.initPhysics()}),this.body.emitter.on("_layoutFailed",function(){q.layoutFailed=!0}),this.body.emitter.on("resetPhysics",function(){q.stopSimulation(),q.ready=!1}),this.body.emitter.on("disablePhysics",function(){q.physicsEnabled=!1,q.stopSimulation()}),this.body.emitter.on("restorePhysics",function(){q.setOptions(q.options),q.ready===!0&&q.startSimulation()}),this.body.emitter.on("startSimulation",function(){q.ready===!0&&q.startSimulation()}),this.body.emitter.on("stopSimulation",function(){q.stopSimulation()}),this.body.emitter.on("destroy",function(){q.stopSimulation(!1),q.body.emitter.off()}),this.body.emitter.on("_dataChanged",function(){q.updatePhysicsData()})}},{key:"setOptions",value:function(q){if(q!==void 0)if(q===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(q===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,selectiveNotDeepExtend$1(["stabilization"],this.options,q),mergeOptions$1(this.options,q,"stabilization"),q.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());var K=this.options.wind;K&&((typeof K.x!="number"||_Number$isNaN(K.x))&&(K.x=0),(typeof K.y!="number"||_Number$isNaN(K.y))&&(K.y=0)),this.timestep=this.options.timestep}this.init()}},{key:"init",value:function(){var q;this.options.solver==="forceAtlas2Based"?(q=this.options.forceAtlas2Based,this.nodesSolver=new ForceAtlas2BasedRepulsionSolver(this.body,this.physicsBody,q),this.edgesSolver=new SpringSolver(this.body,this.physicsBody,q),this.gravitySolver=new ForceAtlas2BasedCentralGravitySolver(this.body,this.physicsBody,q)):this.options.solver==="repulsion"?(q=this.options.repulsion,this.nodesSolver=new RepulsionSolver(this.body,this.physicsBody,q),this.edgesSolver=new SpringSolver(this.body,this.physicsBody,q),this.gravitySolver=new CentralGravitySolver(this.body,this.physicsBody,q)):this.options.solver==="hierarchicalRepulsion"?(q=this.options.hierarchicalRepulsion,this.nodesSolver=new HierarchicalRepulsionSolver(this.body,this.physicsBody,q),this.edgesSolver=new HierarchicalSpringSolver(this.body,this.physicsBody,q),this.gravitySolver=new CentralGravitySolver(this.body,this.physicsBody,q)):(q=this.options.barnesHut,this.nodesSolver=new BarnesHutSolver(this.body,this.physicsBody,q),this.edgesSolver=new SpringSolver(this.body,this.physicsBody,q),this.gravitySolver=new CentralGravitySolver(this.body,this.physicsBody,q)),this.modelOptions=q}},{key:"initPhysics",value:function(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var q;this.viewFunction=_bindInstanceProperty$1$1(q=this.simulationStep).call(q,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,q===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,q===!0&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var q=_Date$now$1();this.physicsTick();var K=_Date$now$1()-q;(K<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var q=this,K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&_setTimeout$1(function(){q.body.emitter.emit("stabilized",{iterations:K}),q.startedStabilization=!1,q.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){var q=1.2;this._evaluateStepQuality()===!0?this.timestep=q*this.timestep:this.timestep/qot))return!1;return!0}},{key:"moveNodes",value:function(){for(var q=this.physicsBody.physicsNodeIndices,K=0,X=0,tt=5,rt=0;rtot&&(q=q>0?ot:-ot),q}},{key:"_performStep",value:function(q){var K=this.body.nodes[q],X=this.physicsBody.forces[q];this.options.wind&&(X.x+=this.options.wind.x,X.y+=this.options.wind.y);var tt=this.physicsBody.velocities[q];this.previousStates[q]={x:K.x,y:K.y,vx:tt.x,vy:tt.y},K.options.fixed.x===!1?(tt.x=this.calculateComponentVelocity(tt.x,X.x,K.options.mass),K.x+=tt.x*this.timestep):(X.x=0,tt.x=0),K.options.fixed.y===!1?(tt.y=this.calculateComponentVelocity(tt.y,X.y,K.options.mass),K.y+=tt.y*this.timestep):(X.y=0,tt.y=0);var rt=Math.sqrt(Math.pow(tt.x,2)+Math.pow(tt.y,2));return rt}},{key:"_freezeNodes",value:function(){var q=this.body.nodes;for(var K in q)if(Object.prototype.hasOwnProperty.call(q,K)&&q[K].x&&q[K].y){var X=q[K].options.fixed;this.freezeCache[K]={x:X.x,y:X.y},X.x=!0,X.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var q=this.body.nodes;for(var K in q)Object.prototype.hasOwnProperty.call(q,K)&&this.freezeCache[K]!==void 0&&(q[K].options.fixed.x=this.freezeCache[K].x,q[K].options.fixed.y=this.freezeCache[K].y);this.freezeCache={}}},{key:"stabilize",value:function(){var q=this,K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof K!="number"&&(K=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",K)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=K,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,_setTimeout$1(function(){return q._stabilizationBatch()},0)}},{key:"_startStabilizing",value:function(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var q=this,K=function(){return q.stabilized===!1&&q.stabilizationIterations1&&arguments[1]!==void 0?arguments[1]:[],X=1e9,tt=-1e9,rt=1e9,ot=-1e9,ut;if(K.length>0)for(var yn=0;ynut.shape.boundingBox.left&&(rt=ut.shape.boundingBox.left),otut.shape.boundingBox.top&&(X=ut.shape.boundingBox.top),tt1&&arguments[1]!==void 0?arguments[1]:[],X=1e9,tt=-1e9,rt=1e9,ot=-1e9,ut;if(K.length>0)for(var yn=0;ynut.x&&(rt=ut.x),otut.y&&(X=ut.y),tt"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var Cluster=function(F){_inherits$1(q,F);var W=_createSuper$1$1(q);function q(K,X,tt,rt,ot,ut){var yn;return _classCallCheck$1(this,q),yn=W.call(this,K,X,tt,rt,ot,ut),yn.isCluster=!0,yn.containedNodes={},yn.containedEdges={},yn}return _createClass$1(q,[{key:"_openChildCluster",value:function(X){var tt=this,rt=this.body.nodes[X];if(this.containedNodes[X]===void 0)throw new Error("node with id: "+X+" not in current cluster");if(!rt.isCluster)throw new Error("node with id: "+X+" is not a cluster");delete this.containedNodes[X],forEach$1$1(rt.edges,function(ot){delete tt.containedEdges[ot.id]}),forEach$1$1(rt.containedNodes,function(ot,ut){tt.containedNodes[ut]=ot}),rt.containedNodes={},forEach$1$1(rt.containedEdges,function(ot,ut){tt.containedEdges[ut]=ot}),rt.containedEdges={},forEach$1$1(rt.edges,function(ot){forEach$1$1(tt.edges,function(ut){var yn,uo,po=_indexOfInstanceProperty$1(yn=ut.clusteringEdgeReplacingIds).call(yn,ot.id);po!==-1&&(forEach$1$1(ot.clusteringEdgeReplacingIds,function(mo){ut.clusteringEdgeReplacingIds.push(mo),tt.body.edges[mo].edgeReplacedById=ut.id}),_spliceInstanceProperty$1(uo=ut.clusteringEdgeReplacingIds).call(uo,po,1))})}),rt.edges=[]}}]),q}(Node$1),ClusterEngine=function(){function F(W){var q=this;_classCallCheck$1(this,F),this.body=W,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},_Object$assign$1(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){q.clusteredNodes={},q.clusteredEdges={}})}return _createClass$1(F,[{key:"clusterByHubsize",value:function(q,K){q===void 0?q=this._getHubSize():_typeof$1(q)==="object"&&(K=this._checkOptions(q),q=this._getHubSize());for(var X=[],tt=0;tt=q&&X.push(rt.id)}for(var ot=0;ot0&&arguments[0]!==void 0?arguments[0]:{},X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(K.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");K=this._checkOptions(K);var tt={},rt={};forEach$1$1(this.body.nodes,function(ot,ut){ot.options&&K.joinCondition(ot.options)===!0&&(tt[ut]=ot,forEach$1$1(ot.edges,function(yn){q.clusteredEdges[yn.id]===void 0&&(rt[yn.id]=yn)}))}),this._cluster(tt,rt,K,X)}},{key:"clusterByEdgeCount",value:function(q,K){var X=this,tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;K=this._checkOptions(K);for(var rt=[],ot={},ut,yn,uo,po=function(){var yf={},cf={},vf=X.body.nodeIndices[mo],_f=X.body.nodes[vf];if(ot[vf]===void 0){uo=0,yn=[];for(var $f=0;$f<_f.edges.length;$f++)ut=_f.edges[$f],X.clusteredEdges[ut.id]===void 0&&(ut.toId!==ut.fromId&&uo++,yn.push(ut));if(uo===q){for(var xf=function(Nf){if(K.joinCondition===void 0||K.joinCondition===null)return!0;var Yf=NetworkUtil.cloneOptions(Nf);return K.joinCondition(Yf)},Af=!0,Cf=0;Cf0&&_Object$keys$1(cf).length>0&&Af===!0){var Bf=function(){for(var Nf=0;Nf1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,q,K)}},{key:"clusterBridges",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,q,K)}},{key:"clusterByConnection",value:function(q,K){var X,tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(q===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[q]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");var rt=this.body.nodes[q];K=this._checkOptions(K,rt),K.clusterNodeProperties.x===void 0&&(K.clusterNodeProperties.x=rt.x),K.clusterNodeProperties.y===void 0&&(K.clusterNodeProperties.y=rt.y),K.clusterNodeProperties.fixed===void 0&&(K.clusterNodeProperties.fixed={},K.clusterNodeProperties.fixed.x=rt.options.fixed.x,K.clusterNodeProperties.fixed.y=rt.options.fixed.y);var ot={},ut={},yn=rt.id,uo=NetworkUtil.cloneOptions(rt);ot[yn]=rt;for(var po=0;po-1&&(ut[$f.id]=$f)}this._cluster(ot,ut,K,tt)}},{key:"_createClusterEdges",value:function(q,K,X,tt){for(var rt,ot,ut,yn,uo,po,mo=_Object$keys$1(q),wo=[],lf=0;lf0&&arguments[0]!==void 0?arguments[0]:{};return q.clusterEdgeProperties===void 0&&(q.clusterEdgeProperties={}),q.clusterNodeProperties===void 0&&(q.clusterNodeProperties={}),q}},{key:"_cluster",value:function(q,K,X){var tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,rt=[];for(var ot in q)Object.prototype.hasOwnProperty.call(q,ot)&&this.clusteredNodes[ot]!==void 0&&rt.push(ot);for(var ut=0;uttt?ut.x:tt,rt=ut.yot?ut.y:ot;return{x:.5*(X+tt),y:.5*(rt+ot)}}},{key:"openCluster",value:function(q,K){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(q===void 0)throw new Error("No clusterNodeId supplied to openCluster.");var tt=this.body.nodes[q];if(tt===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(tt.isCluster!==!0||tt.containedNodes===void 0||tt.containedEdges===void 0)throw new Error("The node:"+q+" is not a valid cluster.");var rt=this.findNode(q),ot=_indexOfInstanceProperty$1(rt).call(rt,q)-1;if(ot>=0){var ut=rt[ot],yn=this.body.nodes[ut];yn._openChildCluster(q),delete this.body.nodes[q],X===!0&&this.body.emitter.emit("_dataChanged");return}var uo=tt.containedNodes,po=tt.containedEdges;if(K!==void 0&&K.releaseFunction!==void 0&&typeof K.releaseFunction=="function"){var mo={},wo={x:tt.x,y:tt.y};for(var lf in uo)if(Object.prototype.hasOwnProperty.call(uo,lf)){var yf=this.body.nodes[lf];mo[lf]={x:yf.x,y:yf.y}}var cf=K.releaseFunction(wo,mo);for(var vf in uo)if(Object.prototype.hasOwnProperty.call(uo,vf)){var _f=this.body.nodes[vf];cf[vf]!==void 0&&(_f.x=cf[vf].x===void 0?tt.x:cf[vf].x,_f.y=cf[vf].y===void 0?tt.y:cf[vf].y)}}else forEach$1$1(uo,function(ap){ap.options.fixed.x===!1&&(ap.x=tt.x),ap.options.fixed.y===!1&&(ap.y=tt.y)});for(var $f in uo)if(Object.prototype.hasOwnProperty.call(uo,$f)){var xf=this.body.nodes[$f];xf.vx=tt.vx,xf.vy=tt.vy,xf.setOptions({physics:!0}),delete this.clusteredNodes[$f]}for(var Af=[],Cf=0;Cf0&&ottt&&(tt=ot.edges.length),q+=ot.edges.length,K+=Math.pow(ot.edges.length,2),X+=1}q=q/X,K=K/X;var ut=K-Math.pow(q,2),yn=Math.sqrt(ut),uo=Math.floor(q+2*yn);return uo>tt&&(uo=tt),uo}},{key:"_createClusteredEdge",value:function(q,K,X,tt,rt){var ot=NetworkUtil.cloneOptions(X,"edge");deepExtend$1(ot,tt),ot.from=q,ot.to=K,ot.id="clusterEdge:"+v4$1(),rt!==void 0&&deepExtend$1(ot,rt);var ut=this.body.functions.createEdge(ot);return ut.clusteringEdgeReplacingIds=[X.id],ut.connect(),this.body.edges[ut.id]=ut,ut}},{key:"_clusterEdges",value:function(q,K,X,tt){if(K instanceof Edge){var rt=K,ot={};ot[rt.id]=rt,K=ot}if(q instanceof Node$1){var ut=q,yn={};yn[ut.id]=ut,q=yn}if(X==null)throw new Error("_clusterEdges: parameter clusterNode required");tt===void 0&&(tt=X.clusterEdgeProperties),this._createClusterEdges(q,K,X,tt);for(var uo in K)if(Object.prototype.hasOwnProperty.call(K,uo)&&this.body.edges[uo]!==void 0){var po=this.body.edges[uo];this._backupEdgeOptions(po),po.setOptions({physics:!1})}for(var mo in q)Object.prototype.hasOwnProperty.call(q,mo)&&(this.clusteredNodes[mo]={clusterId:X.id,node:this.body.nodes[mo]},this.body.nodes[mo].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(q){if(q!==void 0){var K=this.clusteredNodes[q];if(K!==void 0){var X=K.clusterId;if(X!==void 0)return this.body.nodes[X]}}}},{key:"_filter",value:function(q,K){var X=[];return forEach$1$1(q,function(tt){K(tt)&&X.push(tt)}),X}},{key:"_updateState",value:function(){var q=this,K,X=[],tt={},rt=function(lf){forEach$1$1(q.body.nodes,function(yf){yf.isCluster===!0&&lf(yf)})};for(K in this.clusteredNodes)if(Object.prototype.hasOwnProperty.call(this.clusteredNodes,K)){var ot=this.body.nodes[K];ot===void 0&&X.push(K)}rt(function(wo){for(var lf=0;lf0}(!wo.endPointsValid()||!yf)&&(tt[lf]=lf)}),rt(function(wo){forEach$1$1(tt,function(lf){delete wo.containedEdges[lf],forEach$1$1(wo.edges,function(yf,cf){if(yf.id===lf){wo.edges[cf]=null;return}yf.clusteringEdgeReplacingIds=q._filter(yf.clusteringEdgeReplacingIds,function(vf){return!tt[vf]})}),wo.edges=q._filter(wo.edges,function(yf){return yf!==null})})}),forEach$1$1(tt,function(wo){delete q.clusteredEdges[wo]}),forEach$1$1(tt,function(wo){delete q.body.edges[wo]});var yn=_Object$keys$1(this.body.edges);forEach$1$1(yn,function(wo){var lf=q.body.edges[wo],yf=q._isClusteredNode(lf.fromId)||q._isClusteredNode(lf.toId);if(yf!==q._isClusteredEdge(lf.id))if(yf){var cf=q._getClusterNodeForNode(lf.fromId);cf!==void 0&&q._clusterEdges(q.body.nodes[lf.fromId],lf,cf);var vf=q._getClusterNodeForNode(lf.toId);vf!==void 0&&q._clusterEdges(q.body.nodes[lf.toId],lf,vf)}else delete q._clusterEdges[wo],q._restoreEdge(lf)});for(var uo=!1,po=!0,mo=function(){var lf=[];rt(function(cf){var vf=_Object$keys$1(cf.containedNodes).length,_f=cf.options.allowSingleNodeCluster===!0;(_f&&vf<1||!_f&&vf<2)&&lf.push(cf.id)});for(var yf=0;yf0,uo=uo||po};po;)mo();uo&&this._updateState()}},{key:"_isClusteredNode",value:function(q){return this.clusteredNodes[q]!==void 0}},{key:"_isClusteredEdge",value:function(q){return this.clusteredEdges[q]!==void 0}}]),F}();function _initRequestAnimationFrame(){var F;window!==void 0&&(F=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),F===void 0?window.requestAnimationFrame=function(W){W()}:window.requestAnimationFrame=F}var CanvasRenderer=function(){function F(W,q){_classCallCheck$1(this,F),_initRequestAnimationFrame(),this.body=W,this.canvas=q,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},_Object$assign$1(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return _createClass$1(F,[{key:"bindEventListeners",value:function(){var q=this,K;this.body.emitter.on("dragStart",function(){q.dragging=!0}),this.body.emitter.on("dragEnd",function(){q.dragging=!1}),this.body.emitter.on("zoom",function(){q.zooming=!0,window.clearTimeout(q.zoomTimeoutId),q.zoomTimeoutId=_setTimeout$1(function(){var X;q.zooming=!1,_bindInstanceProperty$1$1(X=q._requestRedraw).call(X,q)()},250)}),this.body.emitter.on("_resizeNodes",function(){q._resizeNodes()}),this.body.emitter.on("_redraw",function(){q.renderingActive===!1&&q._redraw()}),this.body.emitter.on("_blockRedraw",function(){q.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){q.allowRedraw=!0,q.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",_bindInstanceProperty$1$1(K=this._requestRedraw).call(K,this)),this.body.emitter.on("_startRendering",function(){q.renderRequests+=1,q.renderingActive=!0,q._startRendering()}),this.body.emitter.on("_stopRendering",function(){q.renderRequests-=1,q.renderingActive=q.renderRequests>0,q.renderTimer=void 0}),this.body.emitter.on("destroy",function(){q.renderRequests=0,q.allowRedraw=!1,q.renderingActive=!1,q.requiresTimeout===!0?clearTimeout(q.renderTimer):window.cancelAnimationFrame(q.renderTimer),q.body.emitter.off()})}},{key:"setOptions",value:function(q){if(q!==void 0){var K=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"];selectiveDeepExtend$1(K,this.options,q)}}},{key:"_requestNextFrame",value:function(q,K){if(!(typeof window>"u")){var X,tt=window;return this.requiresTimeout===!0?X=_setTimeout$1(q,K):tt.requestAnimationFrame&&(X=tt.requestAnimationFrame(q)),X}}},{key:"_startRendering",value:function(){if(this.renderingActive===!0&&this.renderTimer===void 0){var q;this.renderTimer=this._requestNextFrame(_bindInstanceProperty$1$1(q=this._renderStep).call(q,this),this.simulationInterval)}}},{key:"_renderStep",value:function(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var q=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this._requestNextFrame(function(){q._redraw(!1)},0))}},{key:"_redraw",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var K={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();var X=this.canvas.getContext(),tt=this.canvas.frame.canvas.clientWidth,rt=this.canvas.frame.canvas.clientHeight;if(X.clearRect(0,0,tt,rt),this.canvas.frame.clientWidth===0)return;if(X.save(),X.translate(this.body.view.translation.x,this.body.view.translation.y),X.scale(this.body.view.scale,this.body.view.scale),X.beginPath(),this.body.emitter.emit("beforeDrawing",X),X.closePath(),q===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(X),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){var ot=this._drawNodes(X,q),ut=ot.drawExternalLabels;K.drawExternalLabels=ut}q===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(X),K.drawExternalLabels!=null&&K.drawExternalLabels(),q===!1&&this._drawSelectionBox(X),X.beginPath(),this.body.emitter.emit("afterDrawing",X),X.closePath(),X.restore(),q===!0&&X.clearRect(0,0,tt,rt)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var q=this.canvas.getContext();q.save(),q.translate(this.body.view.translation.x,this.body.view.translation.y),q.scale(this.body.view.scale,this.body.view.scale);var K=this.body.nodes,X;for(var tt in K)Object.prototype.hasOwnProperty.call(K,tt)&&(X=K[tt],X.resize(q),X.updateBoundingBox(q,X.selected));q.restore()}},{key:"_drawNodes",value:function(q){for(var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X=this.body.nodes,tt=this.body.nodeIndices,rt,ot=[],ut=[],yn=20,uo=this.canvas.DOMtoCanvas({x:-yn,y:-yn}),po=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+yn,y:this.canvas.frame.canvas.clientHeight+yn}),mo={top:uo.y,left:uo.x,bottom:po.y,right:po.x},wo=[],lf=0;lf0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/q,this.cameraState.previousHeight=this.frame.canvas.height/q,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/q,y:.5*this.frame.canvas.height/q}))}},{key:"_setCameraState",value:function(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){var q=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,K=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,X=this.cameraState.scale;q!=1&&K!=1?X=this.cameraState.scale*.5*(q+K):q!=1?X=this.cameraState.scale*q:K!=1&&(X=this.cameraState.scale*K),this.body.view.scale=X;var tt=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),rt={x:tt.x-this.cameraState.position.x,y:tt.y-this.cameraState.position.y};this.body.view.translation.x+=rt.x*this.body.view.scale,this.body.view.translation.y+=rt.y*this.body.view.scale}}},{key:"_prepareValue",value:function(q){if(typeof q=="number")return q+"px";if(typeof q=="string"){if(_indexOfInstanceProperty$1(q).call(q,"%")!==-1||_indexOfInstanceProperty$1(q).call(q,"px")!==-1)return q;if(_indexOfInstanceProperty$1(q).call(q,"%")===-1)return q+"px"}throw new Error("Could not use the value supplied for width or height:"+q)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var q=document.createElement("DIV");q.style.color="red",q.style.fontWeight="bold",q.style.padding="10px",q.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(q)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var q=this;this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new Hammer$5(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Hammer$5.DIRECTION_ALL}),onTouch$1(this.hammer,function(K){q.body.eventListeners.onTouch(K)}),this.hammer.on("tap",function(K){q.body.eventListeners.onTap(K)}),this.hammer.on("doubletap",function(K){q.body.eventListeners.onDoubleTap(K)}),this.hammer.on("press",function(K){q.body.eventListeners.onHold(K)}),this.hammer.on("panstart",function(K){q.body.eventListeners.onDragStart(K)}),this.hammer.on("panmove",function(K){q.body.eventListeners.onDrag(K)}),this.hammer.on("panend",function(K){q.body.eventListeners.onDragEnd(K)}),this.hammer.on("pinch",function(K){q.body.eventListeners.onPinch(K)}),this.frame.canvas.addEventListener("wheel",function(K){q.body.eventListeners.onMouseWheel(K)}),this.frame.canvas.addEventListener("mousemove",function(K){q.body.eventListeners.onMouseMove(K)}),this.frame.canvas.addEventListener("contextmenu",function(K){q.body.eventListeners.onContext(K)}),this.hammerFrame=new Hammer$5(this.frame),onRelease$1(this.hammerFrame,function(K){q.body.eventListeners.onRelease(K)})}},{key:"setSize",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;q=this._prepareValue(q),K=this._prepareValue(K);var X=!1,tt=this.frame.canvas.width,rt=this.frame.canvas.height,ot=this.pixelRatio;if(this._setPixelRatio(),q!=this.options.width||K!=this.options.height||this.frame.style.width!=q||this.frame.style.height!=K)this._getCameraState(ot),this.frame.style.width=q,this.frame.style.height=K,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=q,this.options.height=K,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},X=!0;else{var ut=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),yn=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==ut||this.frame.canvas.height!==yn)&&this._getCameraState(ot),this.frame.canvas.width!==ut&&(this.frame.canvas.width=ut,X=!0),this.frame.canvas.height!==yn&&(this.frame.canvas.height=yn,X=!0)}return X===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(tt/this.pixelRatio),oldHeight:Math.round(rt/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,X}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var q=this.getContext();if(q===void 0)throw new Error("Could not get canvax context");var K=1;typeof window<"u"&&(K=window.devicePixelRatio||1);var X=q.webkitBackingStorePixelRatio||q.mozBackingStorePixelRatio||q.msBackingStorePixelRatio||q.oBackingStorePixelRatio||q.backingStorePixelRatio||1;return K/X}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var q=this.getContext();if(q===void 0)throw new Error("Could not get canvax context");q.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(q){return(q-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(q){return q*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(q){return(q-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(q){return q*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(q){return{x:this._XconvertCanvasToDOM(q.x),y:this._YconvertCanvasToDOM(q.y)}}},{key:"DOMtoCanvas",value:function(q){return{x:this._XconvertDOMtoCanvas(q.x),y:this._YconvertDOMtoCanvas(q.y)}}}]),F}();function normalizeFitOptions(F,W){var q=_Object$assign$1({nodes:W,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},F??{});if(!_Array$isArray$2(q.nodes))throw new TypeError("Nodes has to be an array of ids.");if(q.nodes.length===0&&(q.nodes=W),!(typeof q.minZoomLevel=="number"&&q.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof q.maxZoomLevel=="number"&&q.minZoomLevel<=q.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return q}var View=function(){function F(W,q){var K,X=this,tt;_classCallCheck$1(this,F),this.body=W,this.canvas=q,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",_bindInstanceProperty$1$1(K=this.fit).call(K,this)),this.body.emitter.on("animationFinished",function(){X.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",_bindInstanceProperty$1$1(tt=this.releaseNode).call(tt,this))}return _createClass$1(F,[{key:"setOptions",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=q}},{key:"fit",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;q=normalizeFitOptions(q,this.body.nodeIndices);var X=this.canvas.frame.canvas.clientWidth,tt=this.canvas.frame.canvas.clientHeight,rt,ot;if(X===0||tt===0)ot=1,rt=NetworkUtil.getRange(this.body.nodes,q.nodes);else if(K===!0){var ut=0;for(var yn in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,yn)){var uo=this.body.nodes[yn];uo.predefinedPosition===!0&&(ut+=1)}if(ut>.5*this.body.nodeIndices.length){this.fit(q,!1);return}rt=NetworkUtil.getRange(this.body.nodes,q.nodes);var po=this.body.nodeIndices.length;ot=12.662/(po+7.4147)+.0964822;var mo=Math.min(X/600,tt/600);ot*=mo}else{this.body.emitter.emit("_resizeNodes"),rt=NetworkUtil.getRange(this.body.nodes,q.nodes);var wo=Math.abs(rt.maxX-rt.minX)*1.1,lf=Math.abs(rt.maxY-rt.minY)*1.1,yf=X/wo,cf=tt/lf;ot=yf<=cf?yf:cf}ot>q.maxZoomLevel?ot=q.maxZoomLevel:ot1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[q]!==void 0){var X={x:this.body.nodes[q].x,y:this.body.nodes[q].y};K.position=X,K.lockedOnNode=q,this.moveTo(K)}else console.error("Node: "+q+" cannot be found.")}},{key:"moveTo",value:function(q){if(q===void 0){q={};return}if(q.offset!=null){if(q.offset.x!=null){if(q.offset.x=+q.offset.x,!_Number$isFinite(q.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else q.offset.x=0;if(q.offset.y!=null){if(q.offset.y=+q.offset.y,!_Number$isFinite(q.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else q.offset.x=0}else q.offset={x:0,y:0};if(q.position!=null){if(q.position.x!=null){if(q.position.x=+q.position.x,!_Number$isFinite(q.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else q.position.x=0;if(q.position.y!=null){if(q.position.y=+q.position.y,!_Number$isFinite(q.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else q.position.x=0}else q.position=this.getViewPosition();if(q.scale!=null){if(q.scale=+q.scale,!(q.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else q.scale=this.body.view.scale;q.animation===void 0&&(q.animation={duration:0}),q.animation===!1&&(q.animation={duration:0}),q.animation===!0&&(q.animation={}),q.animation.duration===void 0&&(q.animation.duration=1e3),q.animation.easingFunction===void 0&&(q.animation.easingFunction="easeInOutQuad"),this.animateView(q)}},{key:"animateView",value:function(q){if(q!==void 0){this.animationEasingFunction=q.animation.easingFunction,this.releaseNode(),q.locked===!0&&(this.lockedOnNodeId=q.lockedOnNode,this.lockedOnNodeOffset=q.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=q.scale,this.body.view.scale=this.targetScale;var K=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),X={x:K.x-q.position.x,y:K.y-q.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+X.x*this.targetScale+q.offset.x,y:this.sourceTranslation.y+X.y*this.targetScale+q.offset.y},q.animation.duration===0)if(this.lockedOnNodeId!=null){var tt;this.viewFunction=_bindInstanceProperty$1$1(tt=this._lockedRedraw).call(tt,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var rt;this.animationSpeed=1/(60*q.animation.duration*.001)||1/60,this.animationEasingFunction=q.animation.easingFunction,this.viewFunction=_bindInstanceProperty$1$1(rt=this._transitionRedraw).call(rt,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}}},{key:"_lockedRedraw",value:function(){var q={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},K=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),X={x:K.x-q.x,y:K.y-q.y},tt=this.body.view.translation,rt={x:tt.x+X.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:tt.y+X.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=rt}},{key:"releaseNode",value:function(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=q===!0?1:this.easingTime;var K=easingFunctions$1[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*K,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*K,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*K},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var X;this.viewFunction=_bindInstanceProperty$1$1(X=this._lockedRedraw).call(X,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),F}();function keycharm$1(F){var W=F&&F.preventDefault||!1,q=F&&F.container||window,K={},X={keydown:{},keyup:{}},tt={},rt;for(rt=97;rt<=122;rt++)tt[String.fromCharCode(rt)]={code:65+(rt-97),shift:!1};for(rt=65;rt<=90;rt++)tt[String.fromCharCode(rt)]={code:rt,shift:!0};for(rt=0;rt<=9;rt++)tt[""+rt]={code:48+rt,shift:!1};for(rt=1;rt<=12;rt++)tt["F"+rt]={code:111+rt,shift:!1};for(rt=0;rt<=9;rt++)tt["num"+rt]={code:96+rt,shift:!1};tt["num*"]={code:106,shift:!1},tt["num+"]={code:107,shift:!1},tt["num-"]={code:109,shift:!1},tt["num/"]={code:111,shift:!1},tt["num."]={code:110,shift:!1},tt.left={code:37,shift:!1},tt.up={code:38,shift:!1},tt.right={code:39,shift:!1},tt.down={code:40,shift:!1},tt.space={code:32,shift:!1},tt.enter={code:13,shift:!1},tt.shift={code:16,shift:void 0},tt.esc={code:27,shift:!1},tt.backspace={code:8,shift:!1},tt.tab={code:9,shift:!1},tt.ctrl={code:17,shift:!1},tt.alt={code:18,shift:!1},tt.delete={code:46,shift:!1},tt.pageup={code:33,shift:!1},tt.pagedown={code:34,shift:!1},tt["="]={code:187,shift:!1},tt["-"]={code:189,shift:!1},tt["]"]={code:221,shift:!1},tt["["]={code:219,shift:!1};var ot=function(uo){yn(uo,"keydown")},ut=function(uo){yn(uo,"keyup")},yn=function(uo,po){if(X[po][uo.keyCode]!==void 0){for(var mo=X[po][uo.keyCode],wo=0;wo700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}},{key:"_stopMovement",value:function(){for(var q in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,q)&&(this.body.emitter.off("initRedraw",this.boundFunctions[q]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var q=this.body.view.scale,K=this.body.view.scale*(1+this.options.keyboard.speed.zoom),X=this.body.view.translation,tt=K/q,rt=(1-tt)*this.canvas.canvasViewCenter.x+X.x*tt,ot=(1-tt)*this.canvas.canvasViewCenter.y+X.y*tt;this.body.view.scale=K,this.body.view.translation={x:rt,y:ot},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var q=this.body.view.scale,K=this.body.view.scale/(1+this.options.keyboard.speed.zoom),X=this.body.view.translation,tt=K/q,rt=(1-tt)*this.canvas.canvasViewCenter.x+X.x*tt,ot=(1-tt)*this.canvas.canvasViewCenter.y+X.y*tt;this.body.view.scale=K,this.body.view.translation={x:rt,y:ot},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var q=this;if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=keycharm$1({container:window,preventDefault:!0}):this.keycharm=keycharm$1({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var K,X,tt,rt,ot,ut,yn,uo,po,mo,wo,lf,yf,cf,vf,_f,$f,xf,Af,Cf,Pf,Bf,Hf,Df;_bindInstanceProperty$1$1(K=this.keycharm).call(K,"up",function(){q.bindToRedraw("_moveUp")},"keydown"),_bindInstanceProperty$1$1(X=this.keycharm).call(X,"down",function(){q.bindToRedraw("_moveDown")},"keydown"),_bindInstanceProperty$1$1(tt=this.keycharm).call(tt,"left",function(){q.bindToRedraw("_moveLeft")},"keydown"),_bindInstanceProperty$1$1(rt=this.keycharm).call(rt,"right",function(){q.bindToRedraw("_moveRight")},"keydown"),_bindInstanceProperty$1$1(ot=this.keycharm).call(ot,"=",function(){q.bindToRedraw("_zoomIn")},"keydown"),_bindInstanceProperty$1$1(ut=this.keycharm).call(ut,"num+",function(){q.bindToRedraw("_zoomIn")},"keydown"),_bindInstanceProperty$1$1(yn=this.keycharm).call(yn,"num-",function(){q.bindToRedraw("_zoomOut")},"keydown"),_bindInstanceProperty$1$1(uo=this.keycharm).call(uo,"-",function(){q.bindToRedraw("_zoomOut")},"keydown"),_bindInstanceProperty$1$1(po=this.keycharm).call(po,"[",function(){q.bindToRedraw("_zoomOut")},"keydown"),_bindInstanceProperty$1$1(mo=this.keycharm).call(mo,"]",function(){q.bindToRedraw("_zoomIn")},"keydown"),_bindInstanceProperty$1$1(wo=this.keycharm).call(wo,"pageup",function(){q.bindToRedraw("_zoomIn")},"keydown"),_bindInstanceProperty$1$1(lf=this.keycharm).call(lf,"pagedown",function(){q.bindToRedraw("_zoomOut")},"keydown"),_bindInstanceProperty$1$1(yf=this.keycharm).call(yf,"up",function(){q.unbindFromRedraw("_moveUp")},"keyup"),_bindInstanceProperty$1$1(cf=this.keycharm).call(cf,"down",function(){q.unbindFromRedraw("_moveDown")},"keyup"),_bindInstanceProperty$1$1(vf=this.keycharm).call(vf,"left",function(){q.unbindFromRedraw("_moveLeft")},"keyup"),_bindInstanceProperty$1$1(_f=this.keycharm).call(_f,"right",function(){q.unbindFromRedraw("_moveRight")},"keyup"),_bindInstanceProperty$1$1($f=this.keycharm).call($f,"=",function(){q.unbindFromRedraw("_zoomIn")},"keyup"),_bindInstanceProperty$1$1(xf=this.keycharm).call(xf,"num+",function(){q.unbindFromRedraw("_zoomIn")},"keyup"),_bindInstanceProperty$1$1(Af=this.keycharm).call(Af,"num-",function(){q.unbindFromRedraw("_zoomOut")},"keyup"),_bindInstanceProperty$1$1(Cf=this.keycharm).call(Cf,"-",function(){q.unbindFromRedraw("_zoomOut")},"keyup"),_bindInstanceProperty$1$1(Pf=this.keycharm).call(Pf,"[",function(){q.unbindFromRedraw("_zoomOut")},"keyup"),_bindInstanceProperty$1$1(Bf=this.keycharm).call(Bf,"]",function(){q.unbindFromRedraw("_zoomIn")},"keyup"),_bindInstanceProperty$1$1(Hf=this.keycharm).call(Hf,"pageup",function(){q.unbindFromRedraw("_zoomIn")},"keyup"),_bindInstanceProperty$1$1(Df=this.keycharm).call(Df,"pagedown",function(){q.unbindFromRedraw("_zoomOut")},"keyup")}}}]),F}();function _createForOfIteratorHelper$4$1(F,W){var q=typeof _Symbol$2<"u"&&_getIteratorMethod$2(F)||F["@@iterator"];if(!q){if(_Array$isArray$2(F)||(q=_unsupportedIterableToArray$4$1(F))||W&&F&&typeof F.length=="number"){q&&(F=q);var K=0,X=function(){};return{s:X,n:function(){return K>=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$4$1(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$4$1(F,W);var K=_sliceInstanceProperty$2(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$4$1(F,W)}}function _arrayLikeToArray$4$1(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q50&&(this.drag.pointer=this.getPointer(q.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}},{key:"onTap",value:function(q){var K=this.getPointer(q.center),X=this.selectionHandler.options.multiselect&&(q.changedPointers[0].ctrlKey||q.changedPointers[0].metaKey);this.checkSelectionChanges(K,X),this.selectionHandler.commitAndEmit(K,q),this.selectionHandler.generateClickEvent("click",q,K)}},{key:"onDoubleTap",value:function(q){var K=this.getPointer(q.center);this.selectionHandler.generateClickEvent("doubleClick",q,K)}},{key:"onHold",value:function(q){var K=this.getPointer(q.center),X=this.selectionHandler.options.multiselect;this.checkSelectionChanges(K,X),this.selectionHandler.commitAndEmit(K,q),this.selectionHandler.generateClickEvent("click",q,K),this.selectionHandler.generateClickEvent("hold",q,K)}},{key:"onRelease",value:function(q){if(new Date().valueOf()-this.touchTime>10){var K=this.getPointer(q.center);this.selectionHandler.generateClickEvent("release",q,K),this.touchTime=new Date().valueOf()}}},{key:"onContext",value:function(q){var K=this.getPointer({x:q.clientX,y:q.clientY});this.selectionHandler.generateClickEvent("oncontext",q,K)}},{key:"checkSelectionChanges",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;K===!0?this.selectionHandler.selectAdditionalOnPoint(q):this.selectionHandler.selectOnPoint(q)}},{key:"_determineDifference",value:function(q,K){var X=function(rt,ot){for(var ut=[],yn=0;yn=rt.minX&&po.x<=rt.maxX&&po.y>=rt.minY&&po.y<=rt.maxY});_forEachInstanceProperty$1(ot).call(ot,function(uo){return K.selectionHandler.selectObject(K.body.nodes[uo])});var ut=this.getPointer(q.center);this.selectionHandler.commitAndEmit(ut,q),this.selectionHandler.generateClickEvent("dragEnd",q,this.getPointer(q.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{var yn=this.drag.selection;yn&&yn.length?(_forEachInstanceProperty$1(yn).call(yn,function(uo){uo.node.options.fixed.x=uo.xFixed,uo.node.options.fixed.y=uo.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",q,this.getPointer(q.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",q,this.getPointer(q.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}},{key:"onPinch",value:function(q){var K=this.getPointer(q.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);var X=this.pinch.scale*q.scale;this.zoom(X,K)}},{key:"zoom",value:function(q,K){if(this.options.zoomView===!0){var X=this.body.view.scale;q<1e-5&&(q=1e-5),q>10&&(q=10);var tt=void 0;this.drag!==void 0&&this.drag.dragging===!0&&(tt=this.canvas.DOMtoCanvas(this.drag.pointer));var rt=this.body.view.translation,ot=q/X,ut=(1-ot)*K.x+rt.x*ot,yn=(1-ot)*K.y+rt.y*ot;if(this.body.view.scale=q,this.body.view.translation={x:ut,y:yn},tt!=null){var uo=this.canvas.canvasToDOM(tt);this.drag.pointer.x=uo.x,this.drag.pointer.y=uo.y}this.body.emitter.emit("_requestRedraw"),X0&&(this.popupObj=uo[mo[mo.length-1]],ot=!0)}if(this.popupObj===void 0&&ot===!1){for(var lf=this.body.edgeIndices,yf=this.body.edges,cf,vf=[],_f=0;_f0&&(this.popupObj=yf[vf[vf.length-1]],ut="edge")}this.popupObj!==void 0?this.popupObj.id!==rt&&(this.popup===void 0&&(this.popup=new Popup$3(this.canvas.frame)),this.popup.popupTargetType=ut,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(q.x+3,q.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(q){var K=this.selectionHandler._pointerToPositionObject(q),X=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(X=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(K),X===!0)){var tt=this.selectionHandler.getNodeAt(q);X=tt===void 0?!1:tt.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(q)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(X=this.body.edges[this.popup.popupTargetId].isOverlappingWith(K));X===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),F}(),collection$1$1=collection$3,collectionStrong$3=collectionStrong$2;collection$1$1("Set",function(F){return function(){return F(this,arguments.length?arguments[0]:void 0)}},collectionStrong$3);var path$1$1=path$w,set$2$1=path$1$1.Set,parent$4$1=set$2$1,set$1$2=parent$4$1,set$5=set$1$2,_Set$1=getDefaultExportFromCjs$1(set$5),uncurryThis$2$1=functionUncurryThis$1,defineBuiltIns$1$1=defineBuiltIns$3,getWeakData$2=internalMetadataExports$1.getWeakData,anInstance$4=anInstance$3,anObject$e=anObject$d,isNullOrUndefined$7=isNullOrUndefined$6,isObject$1$1=isObject$j,iterate$4=iterate$3,ArrayIterationModule=arrayIteration$1,hasOwn$i=hasOwnProperty_1$1,InternalStateModule$6=internalState$1,setInternalState$6=InternalStateModule$6.set,internalStateGetterFor$3=InternalStateModule$6.getterFor,find$4=ArrayIterationModule.find,findIndex$4=ArrayIterationModule.findIndex,splice$5=uncurryThis$2$1([].splice),id$3=0,uncaughtFrozenStore=function(F){return F.frozen||(F.frozen=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.entries=[]},findUncaughtFrozen=function(F,W){return find$4(F.entries,function(q){return q[0]===W})};UncaughtFrozenStore.prototype={get:function(F){var W=findUncaughtFrozen(this,F);if(W)return W[1]},has:function(F){return!!findUncaughtFrozen(this,F)},set:function(F,W){var q=findUncaughtFrozen(this,F);q?q[1]=W:this.entries.push([F,W])},delete:function(F){var W=findIndex$4(this.entries,function(q){return q[0]===F});return~W&&splice$5(this.entries,W,1),!!~W}};var collectionWeak$1={getConstructor:function(F,W,q,K){var X=F(function(ut,yn){anInstance$4(ut,tt),setInternalState$6(ut,{type:W,id:id$3++,frozen:void 0}),isNullOrUndefined$7(yn)||iterate$4(yn,ut[K],{that:ut,AS_ENTRIES:q})}),tt=X.prototype,rt=internalStateGetterFor$3(W),ot=function(ut,yn,uo){var po=rt(ut),mo=getWeakData$2(anObject$e(yn),!0);return mo===!0?uncaughtFrozenStore(po).set(yn,uo):mo[po.id]=uo,ut};return defineBuiltIns$1$1(tt,{delete:function(ut){var yn=rt(this);if(!isObject$1$1(ut))return!1;var uo=getWeakData$2(ut);return uo===!0?uncaughtFrozenStore(yn).delete(ut):uo&&hasOwn$i(uo,yn.id)&&delete uo[yn.id]},has:function(yn){var uo=rt(this);if(!isObject$1$1(yn))return!1;var po=getWeakData$2(yn);return po===!0?uncaughtFrozenStore(uo).has(yn):po&&hasOwn$i(po,uo.id)}}),defineBuiltIns$1$1(tt,q?{get:function(yn){var uo=rt(this);if(isObject$1$1(yn)){var po=getWeakData$2(yn);return po===!0?uncaughtFrozenStore(uo).get(yn):po?po[uo.id]:void 0}},set:function(yn,uo){return ot(this,yn,uo)}}:{add:function(yn){return ot(this,yn,!0)}}),X}},FREEZING$2=freezing$1,global$2$1=global$n,uncurryThis$1$1=functionUncurryThis$1,defineBuiltIns$4=defineBuiltIns$3,InternalMetadataModule$2=internalMetadataExports$1,collection$4=collection$3,collectionWeak=collectionWeak$1,isObject$k=isObject$j,enforceInternalState=internalState$1.enforce,fails$1$1=fails$w,NATIVE_WEAK_MAP$2=weakMapBasicDetection$1,$Object$6=Object,isArray$f=Array.isArray,isExtensible$2=$Object$6.isExtensible,isFrozen=$Object$6.isFrozen,isSealed=$Object$6.isSealed,freeze=$Object$6.freeze,seal=$Object$6.seal,FROZEN={},SEALED={},IS_IE11=!global$2$1.ActiveXObject&&"ActiveXObject"in global$2$1,InternalWeakMap,wrapper=function(F){return function(){return F(this,arguments.length?arguments[0]:void 0)}},$WeakMap=collection$4("WeakMap",wrapper,collectionWeak),WeakMapPrototype=$WeakMap.prototype,nativeSet=uncurryThis$1$1(WeakMapPrototype.set),hasMSEdgeFreezingBug=function(){return FREEZING$2&&fails$1$1(function(){var F=freeze([]);return nativeSet(new $WeakMap,F,1),!isFrozen(F)})};if(NATIVE_WEAK_MAP$2)if(IS_IE11){InternalWeakMap=collectionWeak.getConstructor(wrapper,"WeakMap",!0),InternalMetadataModule$2.enable();var nativeDelete=uncurryThis$1$1(WeakMapPrototype.delete),nativeHas=uncurryThis$1$1(WeakMapPrototype.has),nativeGet=uncurryThis$1$1(WeakMapPrototype.get);defineBuiltIns$4(WeakMapPrototype,{delete:function(F){if(isObject$k(F)&&!isExtensible$2(F)){var W=enforceInternalState(this);return W.frozen||(W.frozen=new InternalWeakMap),nativeDelete(this,F)||W.frozen.delete(F)}return nativeDelete(this,F)},has:function(W){if(isObject$k(W)&&!isExtensible$2(W)){var q=enforceInternalState(this);return q.frozen||(q.frozen=new InternalWeakMap),nativeHas(this,W)||q.frozen.has(W)}return nativeHas(this,W)},get:function(W){if(isObject$k(W)&&!isExtensible$2(W)){var q=enforceInternalState(this);return q.frozen||(q.frozen=new InternalWeakMap),nativeHas(this,W)?nativeGet(this,W):q.frozen.get(W)}return nativeGet(this,W)},set:function(W,q){if(isObject$k(W)&&!isExtensible$2(W)){var K=enforceInternalState(this);K.frozen||(K.frozen=new InternalWeakMap),nativeHas(this,W)?nativeSet(this,W,q):K.frozen.set(W,q)}else nativeSet(this,W,q);return this}})}else hasMSEdgeFreezingBug()&&defineBuiltIns$4(WeakMapPrototype,{set:function(W,q){var K;return isArray$f(W)&&(isFrozen(W)?K=FROZEN:isSealed(W)&&(K=SEALED)),nativeSet(this,W,q),K===FROZEN&&freeze(W),K===SEALED&&seal(W),this}});var path$x=path$w,weakMap$2=path$x.WeakMap,parent$3$1=weakMap$2,weakMap$1=parent$3$1,weakMap=weakMap$1,_WeakMap=getDefaultExportFromCjs$1(weakMap);function __classPrivateFieldGet(F,W,q,K){if(q==="a"&&!K)throw new TypeError("Private accessor was defined without a getter");if(typeof W=="function"?F!==W||!K:!W.has(F))throw new TypeError("Cannot read private member from an object whose class did not declare it");return q==="m"?K:q==="a"?K.call(F):K?K.value:W.get(F)}function __classPrivateFieldSet(F,W,q,K,X){if(K==="m")throw new TypeError("Private method is not writable");if(K==="a"&&!X)throw new TypeError("Private accessor was defined without a setter");if(typeof W=="function"?F!==W||!X:!W.has(F))throw new TypeError("Cannot write private member to an object whose class did not declare it");return K==="a"?X.call(F,q):X?X.value=q:W.set(F,q),q}typeof SuppressedError=="function"&&SuppressedError;function _createForOfIteratorHelper$3$1(F,W){var q=typeof _Symbol$2<"u"&&_getIteratorMethod$2(F)||F["@@iterator"];if(!q){if(_Array$isArray$2(F)||(q=_unsupportedIterableToArray$3$1(F))||W&&F&&typeof F.length=="number"){q&&(F=q);var K=0,X=function(){};return{s:X,n:function(){return K>=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$3$1(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$3$1(F,W);var K=_sliceInstanceProperty$2(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$3$1(F,W)}}function _arrayLikeToArray$3$1(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q0&&arguments[0]!==void 0?arguments[0]:function(){};_classCallCheck$1(this,F),_SelectionAccumulator_nodes.set(this,new SingleTypeSelectionAccumulator),_SelectionAccumulator_edges.set(this,new SingleTypeSelectionAccumulator),_SelectionAccumulator_commitHandler.set(this,void 0),__classPrivateFieldSet(this,_SelectionAccumulator_commitHandler,W,"f")}return _createClass$1(F,[{key:"sizeNodes",get:function(){return __classPrivateFieldGet(this,_SelectionAccumulator_nodes,"f").size}},{key:"sizeEdges",get:function(){return __classPrivateFieldGet(this,_SelectionAccumulator_edges,"f").size}},{key:"getNodes",value:function(){return __classPrivateFieldGet(this,_SelectionAccumulator_nodes,"f").getSelection()}},{key:"getEdges",value:function(){return __classPrivateFieldGet(this,_SelectionAccumulator_edges,"f").getSelection()}},{key:"addNodes",value:function(){var q;(q=__classPrivateFieldGet(this,_SelectionAccumulator_nodes,"f")).add.apply(q,arguments)}},{key:"addEdges",value:function(){var q;(q=__classPrivateFieldGet(this,_SelectionAccumulator_edges,"f")).add.apply(q,arguments)}},{key:"deleteNodes",value:function(q){__classPrivateFieldGet(this,_SelectionAccumulator_nodes,"f").delete(q)}},{key:"deleteEdges",value:function(q){__classPrivateFieldGet(this,_SelectionAccumulator_edges,"f").delete(q)}},{key:"clear",value:function(){__classPrivateFieldGet(this,_SelectionAccumulator_nodes,"f").clear(),__classPrivateFieldGet(this,_SelectionAccumulator_edges,"f").clear()}},{key:"commit",value:function(){for(var q,K,X={nodes:__classPrivateFieldGet(this,_SelectionAccumulator_nodes,"f").commit(),edges:__classPrivateFieldGet(this,_SelectionAccumulator_edges,"f").commit()},tt=arguments.length,rt=new Array(tt),ot=0;ot=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$2$1(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$2$1(F,W);var K=_sliceInstanceProperty$2(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$2$1(F,W)}}function _arrayLikeToArray$2$1(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q4&&arguments[4]!==void 0?arguments[4]:!1,ot=this._initBaseEvent(K,X);if(rt===!0)ot.nodes=[],ot.edges=[];else{var ut=this.getSelection();ot.nodes=ut.nodes,ot.edges=ut.edges}tt!==void 0&&(ot.previousSelection=tt),q=="click"&&(ot.items=this.getClickedItems(X)),K.controlEdge!==void 0&&(ot.controlEdge=K.controlEdge),this.body.emitter.emit(q,ot)}},{key:"selectObject",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;if(q!==void 0){if(q instanceof Node$1){if(K===!0){var X;(X=this._selectionAccumulator).addEdges.apply(X,_toConsumableArray$1(q.edges))}this._selectionAccumulator.addNodes(q)}else this._selectionAccumulator.addEdges(q);return!0}return!1}},{key:"deselectObject",value:function(q){q.isSelected()===!0&&(q.selected=!1,this._removeFromSelection(q))}},{key:"_getAllNodesOverlappingWith",value:function(q){for(var K=[],X=this.body.nodes,tt=0;tt1&&arguments[1]!==void 0?arguments[1]:!0,X=this._pointerToPositionObject(q),tt=this._getAllNodesOverlappingWith(X);if(tt.length>0)return K===!0?this.body.nodes[tt[tt.length-1]]:tt[tt.length-1]}},{key:"_getEdgesOverlappingWith",value:function(q,K){for(var X=this.body.edges,tt=0;tt1&&arguments[1]!==void 0?arguments[1]:!0,X=this.canvas.DOMtoCanvas(q),tt=10,rt=null,ot=this.body.edges,ut=0;ut0&&(this.generateClickEvent("deselectEdge",K,q,rt),X=!0),tt.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",K,q,rt),X=!0),tt.nodes.added.length>0&&(this.generateClickEvent("selectNode",K,q),X=!0),tt.edges.added.length>0&&(this.generateClickEvent("selectEdge",K,q),X=!0),X===!0&&this.generateClickEvent("select",K,q)}},{key:"getSelection",value:function(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}},{key:"getSelectedNodes",value:function(){return this._selectionAccumulator.getNodes()}},{key:"getSelectedEdges",value:function(){return this._selectionAccumulator.getEdges()}},{key:"getSelectedNodeIds",value:function(){var q;return _mapInstanceProperty$1(q=this._selectionAccumulator.getNodes()).call(q,function(K){return K.id})}},{key:"getSelectedEdgeIds",value:function(){var q;return _mapInstanceProperty$1(q=this._selectionAccumulator.getEdges()).call(q,function(K){return K.id})}},{key:"setSelection",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!q||!q.nodes&&!q.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((K.unselectAll||K.unselectAll===void 0)&&this.unselectAll(),q.nodes){var X=_createForOfIteratorHelper$2$1(q.nodes),tt;try{for(X.s();!(tt=X.n()).done;){var rt=tt.value,ot=this.body.nodes[rt];if(!ot)throw new RangeError('Node with id "'+rt+'" not found');this.selectObject(ot,K.highlightEdges)}}catch(mo){X.e(mo)}finally{X.f()}}if(q.edges){var ut=_createForOfIteratorHelper$2$1(q.edges),yn;try{for(ut.s();!(yn=ut.n()).done;){var uo=yn.value,po=this.body.edges[uo];if(!po)throw new RangeError('Edge with id "'+uo+'" not found');this.selectObject(po)}}catch(mo){ut.e(mo)}finally{ut.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!q||q.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:q},{highlightEdges:K})}},{key:"selectEdges",value:function(q){if(!q||q.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:q})}},{key:"updateSelection",value:function(){for(var q in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,q.id)||this._selectionAccumulator.deleteNodes(q);for(var K in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,K.id)||this._selectionAccumulator.deleteEdges(K)}},{key:"getClickedItems",value:function(q){for(var K=this.canvas.DOMtoCanvas(q),X=[],tt=this.body.nodeIndices,rt=this.body.nodes,ot=tt.length-1;ot>=0;ot--){var ut=rt[tt[ot]],yn=ut.getItemsOnPoint(K);X.push.apply(X,yn)}for(var uo=this.body.edgeIndices,po=this.body.edges,mo=uo.length-1;mo>=0;mo--){var wo=po[uo[mo]],lf=wo.getItemsOnPoint(K);X.push.apply(X,lf)}return X}}]),F}(),arraySlice$6=arraySliceSimple$1,floor$2=Math.floor,mergeSort$1=function(F,W){var q=F.length,K=floor$2(q/2);return q<8?insertionSort$1(F,W):merge$3(F,mergeSort$1(arraySlice$6(F,0,K),W),mergeSort$1(arraySlice$6(F,K),W),W)},insertionSort$1=function(F,W){for(var q=F.length,K=1,X,tt;K0;)F[tt]=F[--tt];tt!==K++&&(F[tt]=X)}return F},merge$3=function(F,W,q,K){for(var X=W.length,tt=q.length,rt=0,ot=0;rt3)){if(IE_OR_EDGE$1)return!0;if(WEBKIT$1)return WEBKIT$1<603;var F="",W,q,K,X;for(W=65;W<76;W++){switch(q=String.fromCharCode(W),W){case 66:case 69:case 70:case 72:K=3;break;case 68:case 71:K=4;break;default:K=2}for(X=0;X<47;X++)test$3.push({k:q+X,v:K})}for(test$3.sort(function(tt,rt){return rt.v-tt.v}),X=0;XtoString$f(q)?1:-1}};$$2$1({target:"Array",proto:!0,forced:FORCED$1$1},{sort:function F(W){W!==void 0&&aCallable$1$1(W);var q=toObject$1$1(this);if(STABLE_SORT$1)return W===void 0?nativeSort$1(q):nativeSort$1(q,W);var K=[],X=lengthOfArrayLike$1$1(q),tt,rt;for(rt=0;rt=0:ot>ut;ut+=yn)ut in rt&&(X=q(X,rt[ut],ut,tt));return X}},arrayReduce$1={left:createMethod$6(!1),right:createMethod$6(!0)},global$1$1=global$n,classof$f=classofRaw$2$1,engineIsNode$1=classof$f(global$1$1.process)==="process",$$1$1=_export$1,$reduce$1=arrayReduce$1.left,arrayMethodIsStrict$1$1=arrayMethodIsStrict$6$1,CHROME_VERSION$1=engineV8Version$1,IS_NODE$1=engineIsNode$1,CHROME_BUG$1=!IS_NODE$1&&CHROME_VERSION$1>79&&CHROME_VERSION$1<83,FORCED$b=CHROME_BUG$1||!arrayMethodIsStrict$1$1("reduce");$$1$1({target:"Array",proto:!0,forced:FORCED$b},{reduce:function F(W){var q=arguments.length;return $reduce$1(this,W,q,q>1?arguments[1]:void 0)}});var entryVirtual$1$1=entryVirtual$i$1,reduce$3$1=entryVirtual$1$1("Array").reduce,isPrototypeOf$1$1=objectIsPrototypeOf$1,method$1$1=reduce$3$1,ArrayPrototype$1$1=Array.prototype,reduce$2$1=function(F){var W=F.reduce;return F===ArrayPrototype$1$1||isPrototypeOf$1$1(ArrayPrototype$1$1,F)&&W===ArrayPrototype$1$1.reduce?method$1$1:W},parent$1$1=reduce$2$1,reduce$1$1=parent$1$1,reduce$4=reduce$1$1,_reduceInstanceProperty$1=getDefaultExportFromCjs$1(reduce$4);function _createSuper$t(F){var W=_isNativeReflectConstruct$t();return function(){var K=_getPrototypeOf$1(F),X;if(W){var tt=_getPrototypeOf$1(this).constructor;X=_Reflect$construct$1(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn$1(this,X)}}function _isNativeReflectConstruct$t(){if(typeof Reflect>"u"||!_Reflect$construct$1||_Reflect$construct$1.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],function(){})),!0}catch{return!1}}var DirectionInterface=function(){function F(){_classCallCheck$1(this,F)}return _createClass$1(F,[{key:"abstract",value:function(){throw new Error("Can't instantiate abstract class!")}},{key:"fake_use",value:function(){}},{key:"curveType",value:function(){return this.abstract()}},{key:"getPosition",value:function(q){return this.fake_use(q),this.abstract()}},{key:"setPosition",value:function(q,K){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(q,K,X),this.abstract()}},{key:"getTreeSize",value:function(q){return this.fake_use(q),this.abstract()}},{key:"sort",value:function(q){this.fake_use(q),this.abstract()}},{key:"fix",value:function(q,K){this.fake_use(q,K),this.abstract()}},{key:"shift",value:function(q,K){this.fake_use(q,K),this.abstract()}}]),F}(),VerticalStrategy=function(F){_inherits$1(q,F);var W=_createSuper$t(q);function q(K){var X;return _classCallCheck$1(this,q),X=W.call(this),X.layout=K,X}return _createClass$1(q,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(X){return X.x}},{key:"setPosition",value:function(X,tt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;rt!==void 0&&this.layout.hierarchical.addToOrdering(X,rt),X.x=tt}},{key:"getTreeSize",value:function(X){var tt=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,X);return{min:tt.min_x,max:tt.max_x}}},{key:"sort",value:function(X){_sortInstanceProperty$1(X).call(X,function(tt,rt){return tt.x-rt.x})}},{key:"fix",value:function(X,tt){X.y=this.layout.options.hierarchical.levelSeparation*tt,X.options.fixed.y=!0}},{key:"shift",value:function(X,tt){this.layout.body.nodes[X].x+=tt}}]),q}(DirectionInterface),HorizontalStrategy=function(F){_inherits$1(q,F);var W=_createSuper$t(q);function q(K){var X;return _classCallCheck$1(this,q),X=W.call(this),X.layout=K,X}return _createClass$1(q,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(X){return X.y}},{key:"setPosition",value:function(X,tt){var rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;rt!==void 0&&this.layout.hierarchical.addToOrdering(X,rt),X.y=tt}},{key:"getTreeSize",value:function(X){var tt=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,X);return{min:tt.min_y,max:tt.max_y}}},{key:"sort",value:function(X){_sortInstanceProperty$1(X).call(X,function(tt,rt){return tt.y-rt.y})}},{key:"fix",value:function(X,tt){X.x=this.layout.options.hierarchical.levelSeparation*tt,X.options.fixed.x=!0}},{key:"shift",value:function(X,tt){this.layout.body.nodes[X].y+=tt}}]),q}(DirectionInterface),$$Q=_export$1,$every$1=arrayIteration$1.every,arrayMethodIsStrict$7=arrayMethodIsStrict$6$1,STRICT_METHOD$4=arrayMethodIsStrict$7("every");$$Q({target:"Array",proto:!0,forced:!STRICT_METHOD$4},{every:function F(W){return $every$1(this,W,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$l=entryVirtual$i$1,every$3$1=entryVirtual$l("Array").every,isPrototypeOf$n=objectIsPrototypeOf$1,method$i=every$3$1,ArrayPrototype$i=Array.prototype,every$2$1=function(F){var W=F.every;return F===ArrayPrototype$i||isPrototypeOf$n(ArrayPrototype$i,F)&&W===ArrayPrototype$i.every?method$i:W},parent$1c=every$2$1,every$1$1=parent$1c,every$4=every$1$1,_everyInstanceProperty$1=getDefaultExportFromCjs$1(every$4);function _createForOfIteratorHelper$1$1(F,W){var q=typeof _Symbol$2<"u"&&_getIteratorMethod$2(F)||F["@@iterator"];if(!q){if(_Array$isArray$2(F)||(q=_unsupportedIterableToArray$1$1(F))||W&&F&&typeof F.length=="number"){q&&(F=q);var K=0,X=function(){};return{s:X,n:function(){return K>=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$1$1(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$1$1(F,W);var K=_sliceInstanceProperty$2(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$1$1(F,W)}}function _arrayLikeToArray$1$1(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q=W[tt])&&(W[tt]=W[X]+1)}),W}function fillLevelsByDirectionLeaves(F){return fillLevelsByDirection(function(W){var q,K;return _everyInstanceProperty$1(q=_filterInstanceProperty$1(K=W.edges).call(K,function(X){return F.has(X.toId)})).call(q,function(X){return X.to===W})},function(W,q){return q>W},"from",F)}function fillLevelsByDirectionRoots(F){return fillLevelsByDirection(function(W){var q,K;return _everyInstanceProperty$1(q=_filterInstanceProperty$1(K=W.edges).call(K,function(X){return F.has(X.toId)})).call(q,function(X){return X.from===W})},function(W,q){return qrt)return{v:{v:fillLevelsByDirectionCyclic(K,tt)}};++_f},Pf;$f=vf.pop();)if(Pf=wf(),Pf!==0&&Pf)return Pf.v},mo;for(yn.s();!(uo=yn.n()).done;)if(mo=po(),mo!==0&&mo)return mo.v}catch(wo){yn.e(wo)}finally{yn.f()}return tt}var HierarchicalStatus=function(){function F(){_classCallCheck$1(this,F),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return _createClass$1(F,[{key:"addRelation",value:function(q,K){this.childrenReference[q]===void 0&&(this.childrenReference[q]=[]),this.childrenReference[q].push(K),this.parentReference[K]===void 0&&(this.parentReference[K]=[]),this.parentReference[K].push(q)}},{key:"checkIfTree",value:function(){for(var q in this.parentReference)if(this.parentReference[q].length>1){this.isTree=!1;return}this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(q,K){K!==void 0&&this.trees[q.id]===void 0&&(this.trees[q.id]=K,this.treeIndex=Math.max(K,this.treeIndex))}},{key:"ensureLevel",value:function(q){this.levels[q]===void 0&&(this.levels[q]=0)}},{key:"getMaxLevel",value:function(q){var K=this,X={},tt=function rt(ot){if(X[ot]!==void 0)return X[ot];var ut=K.levels[ot];if(K.childrenReference[ot]){var yn=K.childrenReference[ot];if(yn.length>0)for(var uo=0;uo0&&(X.levelSeparation*=-1):X.levelSeparation<0&&(X.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(K);if(tt===!0)return this.body.emitter.emit("refresh"),deepExtend$1(K,this.optionsBackup)}return K}},{key:"_resetRNG",value:function(q){this.initialRandomSeed=q,this._rng=Alea$1(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(q){if(this.options.hierarchical.enabled===!0){var K=this.optionsBackup.physics;q.physics===void 0||q.physics===!0?(q.physics={enabled:K.enabled===void 0?!0:K.enabled,solver:"hierarchicalRepulsion"},K.enabled=K.enabled===void 0?!0:K.enabled,K.solver=K.solver||"barnesHut"):_typeof$1(q.physics)==="object"?(K.enabled=q.physics.enabled===void 0?!0:q.physics.enabled,K.solver=q.physics.solver||"barnesHut",q.physics.solver="hierarchicalRepulsion"):q.physics!==!1&&(K.solver="barnesHut",q.physics={solver:"hierarchicalRepulsion"});var X=this.direction.curveType();if(q.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},q.edges={smooth:!1};else if(q.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},q.edges.smooth=!1;else if(typeof q.edges.smooth=="boolean")this.optionsBackup.edges={smooth:q.edges.smooth},q.edges.smooth={enabled:q.edges.smooth,type:X};else{var tt=q.edges.smooth;tt.type!==void 0&&tt.type!=="dynamic"&&(X=tt.type),this.optionsBackup.edges={smooth:{enabled:tt.enabled===void 0?!0:tt.enabled,type:tt.type===void 0?"dynamic":tt.type,roundness:tt.roundness===void 0?.5:tt.roundness,forceDirection:tt.forceDirection===void 0?!1:tt.forceDirection}},q.edges.smooth={enabled:tt.enabled===void 0?!0:tt.enabled,type:X,roundness:tt.roundness===void 0?.5:tt.roundness,forceDirection:tt.forceDirection===void 0?!1:tt.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",X)}return q}},{key:"positionInitially",value:function(q){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var K=q.length+50,X=0;Xut){for(var uo=q.length;q.length>ut&&ot<=rt;){ot+=1;var po=q.length;ot%3===0?this.body.modules.clustering.clusterBridges(yn):this.body.modules.clustering.clusterOutliers(yn);var mo=q.length;if(po==mo&&ot%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*uo)})}ot>rt&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(q,this.body.edgeIndices,!0),this._shiftToCenter();for(var wo=70,lf=0;lf0){var q,K,X=!1,tt=!1;this.lastNodeOnLevel={},this.hierarchical=new HierarchicalStatus;for(K in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,K)&&(q=this.body.nodes[K],q.options.level!==void 0?(X=!0,this.hierarchical.levels[K]=q.options.level):tt=!0);if(tt===!0&&X===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(tt===!0){var rt=this.options.hierarchical.sortMethod;rt==="hubsize"?this._determineLevelsByHubsize():rt==="directed"?this._determineLevelsDirected():rt==="custom"&&this._determineLevelsCustomCallback()}for(var ot in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,ot)&&this.hierarchical.ensureLevel(ot);var ut=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(ut),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var q=this,K=!1,X={},tt=function(){for(var $f=ot(),wf=0,Pf=0;Pf<$f.length-1;Pf++){var Cf=$f[Pf].max-$f[Pf+1].min;wf+=Cf+q.options.hierarchical.treeSpacing,rt(Pf+1,wf)}},rt=function($f,wf){var Pf=q.hierarchical.trees;for(var Cf in Pf)Object.prototype.hasOwnProperty.call(Pf,Cf)&&Pf[Cf]===$f&&q.direction.shift(Cf,wf)},ot=function(){for(var $f=[],wf=0;wf0)for(var Cf=0;Cf1&&arguments[1]!==void 0?arguments[1]:1e9,Pf=1e9,Cf=1e9,Af=1e9,Bf=-1e9;for(var Hf in $f)if(Object.prototype.hasOwnProperty.call($f,Hf)){var Df=q.body.nodes[Hf],Lf=q.hierarchical.levels[Df.id],kf=q.direction.getPosition(Df),Nf=q._getSpaceAroundNode(Df,$f),Yf=_slicedToArray$1(Nf,2),Gf=Yf[0],rp=Yf[1];Pf=Math.min(Gf,Pf),Cf=Math.min(rp,Cf),Lf<=wf&&(Af=Math.min(kf,Af),Bf=Math.max(kf,Bf))}return[Af,Bf,Pf,Cf]},uo=function($f,wf){var Pf=q.hierarchical.getMaxLevel($f.id),Cf=q.hierarchical.getMaxLevel(wf.id);return Math.min(Pf,Cf)},po=function($f,wf,Pf){for(var Cf=q.hierarchical,Af=0;Af1)for(var Df=0;Df2&&arguments[2]!==void 0?arguments[2]:!1,Cf=q.direction.getPosition($f),Af=q.direction.getPosition(wf),Bf=Math.abs(Af-Cf),Hf=q.options.hierarchical.nodeSpacing;if(Bf>Hf){var Df={},Lf={};ut($f,Df),ut(wf,Lf);var kf=uo($f,wf),Nf=yn(Df,kf),Yf=yn(Lf,kf),Gf=Nf[1],rp=Yf[0],ip=Yf[2],ap=Math.abs(Gf-rp);if(ap>Hf){var yp=Gf-rp+Hf;yp<-ip+Hf&&(yp=-ip+Hf),yp<0&&(q._shiftBlock(wf.id,yp),K=!0,Pf===!0&&q._centerParent(wf))}}},wo=function($f,wf){for(var Pf=wf.id,Cf=wf.edges,Af=q.hierarchical.levels[wf.id],Bf=q.options.hierarchical.levelSeparation*q.options.hierarchical.levelSeparation,Hf={},Df=[],Lf=0;Lf0?Dp=Math.min(vg,og-q.options.hierarchical.nodeSpacing):vg<0&&(Dp=-Math.min(-vg,ng-q.options.hierarchical.nodeSpacing)),Dp!=0&&(q._shiftBlock(wf.id,Dp),K=!0)},ap=function(Np){var jp=q.direction.getPosition(wf),Ip=q._getSpaceAroundNode(wf),Jp=_slicedToArray$1(Ip,2),ng=Jp[0],og=Jp[1],vg=Np-jp,Dp=jp;vg>0?Dp=Math.min(jp+(og-q.options.hierarchical.nodeSpacing),Np):vg<0&&(Dp=Math.max(jp-(ng-q.options.hierarchical.nodeSpacing),Np)),Dp!==jp&&(q.direction.setPosition(wf,Dp),K=!0)},yp=rp($f,Df);ip(yp),yp=rp($f,Cf),ap(yp)},lf=function($f){var wf=q.hierarchical.getLevels();wf=_reverseInstanceProperty$1(wf).call(wf);for(var Pf=0;Pf<$f;Pf++){K=!1;for(var Cf=0;Cf0&&Math.abs(lf)0&&(uo=this.direction.getPosition(tt[ot-1])+yn),this.direction.setPosition(ut,uo,K),this._validatePositionAndContinue(ut,K,uo),rt++}}}}},{key:"_placeBranchNodes",value:function(q,K){var X,tt=this.hierarchical.childrenReference[q];if(tt!==void 0){for(var rt=[],ot=0;otK&&this.positionedNodes[yn.id]===void 0){var po=this.options.hierarchical.nodeSpacing,mo=void 0;ut===0?mo=this.direction.getPosition(this.body.nodes[q]):mo=this.direction.getPosition(rt[ut-1])+po,this.direction.setPosition(yn,mo,uo),this._validatePositionAndContinue(yn,uo,mo)}else return}var wo=this._getCenterPosition(rt);this.direction.setPosition(this.body.nodes[q],wo,K)}}},{key:"_validatePositionAndContinue",value:function(q,K,X){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[K]!==void 0){var tt=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[K]]);if(X-ttq.hierarchical.levels[tt.id]&&q.hierarchical.addRelation(tt.id,rt.id)};this._crawlNetwork(K),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var q=this,K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},X=arguments.length>1?arguments[1]:void 0,tt={},rt=function mo(wo,lf){if(tt[wo.id]===void 0){q.hierarchical.setTreeIndex(wo,lf),tt[wo.id]=!0;for(var yf,cf=q._getActiveEdges(wo),vf=0;vf=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$8(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$8(F,W);var K=_sliceInstanceProperty$2(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$8(F,W)}}function _arrayLikeToArray$8(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q0&&this.options.deleteNode!==!1?(ut===!0&&this._createSeperator(4),this._createDeleteButton(ot)):X===0&&this.options.deleteEdge!==!1&&(ut===!0&&this._createSeperator(4),this._createDeleteButton(ot))),this._bindElementEvents(this.closeDiv,_bindInstanceProperty$1$1(q=this.toggleEditMode).call(q,this)),this._temporaryBindEvent("select",_bindInstanceProperty$1$1(K=this.showManipulatorToolbar).call(K,this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){var q;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var K,X=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(X),this._createSeperator(),this._createDescription(X.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,_bindInstanceProperty$1$1(K=this.toggleEditMode).call(K,this))}this._temporaryBindEvent("click",_bindInstanceProperty$1$1(q=this._performAddNode).call(q,this))}},{key:"editNode",value:function(){var q=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var K=this.selectionHandler.getSelectedNodes()[0];if(K!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(K.isCluster!==!0){var X=deepExtend$1({},K.options,!1);if(X.x=K.x,X.y=K.y,this.options.editNode.length===2)this.options.editNode(X,function(tt){tt!=null&&q.inMode==="editNode"&&q.body.data.nodes.getDataSet().update(tt),q.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){var q,K,X,tt,rt;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var ot,ut=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(ut),this._createSeperator(),this._createDescription(ut.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,_bindInstanceProperty$1$1(ot=this.toggleEditMode).call(ot,this))}this._temporaryBindUI("onTouch",_bindInstanceProperty$1$1(q=this._handleConnect).call(q,this)),this._temporaryBindUI("onDragEnd",_bindInstanceProperty$1$1(K=this._finishConnect).call(K,this)),this._temporaryBindUI("onDrag",_bindInstanceProperty$1$1(X=this._dragControlNode).call(X,this)),this._temporaryBindUI("onRelease",_bindInstanceProperty$1$1(tt=this._finishConnect).call(tt,this)),this._temporaryBindUI("onDragStart",_bindInstanceProperty$1$1(rt=this._dragStartEdge).call(rt,this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",_typeof$1(this.options.editEdge)==="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){var q=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(q.from.id,q.to.id);return}if(this.guiEnabled===!0){var K,X=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(X),this._createSeperator(),this._createDescription(X.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,_bindInstanceProperty$1$1(K=this.toggleEditMode).call(K,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var tt,rt,ot,ut,yn=this.body.edges[this.edgeBeingEditedId],uo=this._getNewTargetNode(yn.from.x,yn.from.y),po=this._getNewTargetNode(yn.to.x,yn.to.y);this.temporaryIds.nodes.push(uo.id),this.temporaryIds.nodes.push(po.id),this.body.nodes[uo.id]=uo,this.body.nodeIndices.push(uo.id),this.body.nodes[po.id]=po,this.body.nodeIndices.push(po.id),this._temporaryBindUI("onTouch",_bindInstanceProperty$1$1(tt=this._controlNodeTouch).call(tt,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",_bindInstanceProperty$1$1(rt=this._controlNodeDragStart).call(rt,this)),this._temporaryBindUI("onDrag",_bindInstanceProperty$1$1(ot=this._controlNodeDrag).call(ot,this)),this._temporaryBindUI("onDragEnd",_bindInstanceProperty$1$1(ut=this._controlNodeDragEnd).call(ut,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(mo){var wo=yn.edgeType.findBorderPositions(mo);uo.selected===!1&&(uo.x=wo.from.x,uo.y=wo.from.y),po.selected===!1&&(po.x=wo.to.x,po.y=wo.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var q=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var K=this.selectionHandler.getSelectedNodeIds(),X=this.selectionHandler.getSelectedEdgeIds(),tt=void 0;if(K.length>0){for(var rt=0;rt0&&typeof this.options.deleteEdge=="function"&&(tt=this.options.deleteEdge);if(typeof tt=="function"){var ot={nodes:K,edges:X};if(tt.length===2)tt(ot,function(ut){ut!=null&&q.inMode==="delete"?(q.body.data.edges.getDataSet().remove(ut.edges),q.body.data.nodes.getDataSet().remove(ut.nodes),q.body.emitter.emit("startSimulation"),q.showManipulatorToolbar()):(q.body.emitter.emit("startSimulation"),q.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(X),this.body.data.nodes.getDataSet().remove(K),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var q,K;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(q=(K=this.options.locales[this.options.locale])===null||K===void 0?void 0:K.close)!==null&&q!==void 0?q:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}},{key:"_getNewTargetNode",value:function(q,K){var X=deepExtend$1({},this.options.controlNodeStyle);X.id="targetNode"+v4$1(),X.hidden=!1,X.physics=!1,X.x=q,X.y=K;var tt=this.body.functions.createNode(X);return tt.shape.boundingBox={left:q,right:q,top:K,bottom:K},tt}},{key:"_createEditButton",value:function(){var q;this._clean(),this.manipulationDOM={},recursiveDOMDelete$1(this.editModeDiv);var K=this.options.locales[this.options.locale],X=this._createButton("editMode","vis-edit vis-edit-mode",K.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(X),this._bindElementEvents(X,_bindInstanceProperty$1$1(q=this.toggleEditMode).call(q,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(recursiveDOMDelete$1(this.editModeDiv),recursiveDOMDelete$1(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var q,K=_createForOfIteratorHelper$7(_spliceInstanceProperty$1(q=this._domEventListenerCleanupQueue).call(q,0)),X;try{for(K.s();!(X=K.n()).done;){var tt=X.value;tt()}}catch(rt){K.e(rt)}finally{K.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),recursiveDOMDelete$1(this.manipulationDiv),recursiveDOMDelete$1(this.editModeDiv),recursiveDOMDelete$1(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:"_createSeperator",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+q]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+q].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+q])}},{key:"_createAddNodeButton",value:function(q){var K,X=this._createButton("addNode","vis-add",q.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(X),this._bindElementEvents(X,_bindInstanceProperty$1$1(K=this.addNodeMode).call(K,this))}},{key:"_createAddEdgeButton",value:function(q){var K,X=this._createButton("addEdge","vis-connect",q.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(X),this._bindElementEvents(X,_bindInstanceProperty$1$1(K=this.addEdgeMode).call(K,this))}},{key:"_createEditNodeButton",value:function(q){var K,X=this._createButton("editNode","vis-edit",q.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(X),this._bindElementEvents(X,_bindInstanceProperty$1$1(K=this.editNode).call(K,this))}},{key:"_createEditEdgeButton",value:function(q){var K,X=this._createButton("editEdge","vis-edit",q.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(X),this._bindElementEvents(X,_bindInstanceProperty$1$1(K=this.editEdgeMode).call(K,this))}},{key:"_createDeleteButton",value:function(q){var K,X;this.options.rtl?X="vis-delete-rtl":X="vis-delete";var tt=this._createButton("delete",X,q.del||this.options.locales.en.del);this.manipulationDiv.appendChild(tt),this._bindElementEvents(tt,_bindInstanceProperty$1$1(K=this.deleteSelected).call(K,this))}},{key:"_createBackButton",value:function(q){var K,X=this._createButton("back","vis-back",q.back||this.options.locales.en.back);this.manipulationDiv.appendChild(X),this._bindElementEvents(X,_bindInstanceProperty$1$1(K=this.showManipulatorToolbar).call(K,this))}},{key:"_createButton",value:function(q,K,X){var tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[q+"Div"]=document.createElement("button"),this.manipulationDOM[q+"Div"].className="vis-button "+K,this.manipulationDOM[q+"Label"]=document.createElement("div"),this.manipulationDOM[q+"Label"].className=tt,this.manipulationDOM[q+"Label"].innerText=X,this.manipulationDOM[q+"Div"].appendChild(this.manipulationDOM[q+"Label"]),this.manipulationDOM[q+"Div"]}},{key:"_createDescription",value:function(q){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=q,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:"_temporaryBindEvent",value:function(q,K){this.temporaryEventFunctions.push({event:q,boundFunction:K}),this.body.emitter.on(q,K)}},{key:"_temporaryBindUI",value:function(q,K){if(this.body.eventListeners[q]!==void 0)this.temporaryUIFunctions[q]=this.body.eventListeners[q],this.body.eventListeners[q]=K;else throw new Error("This UI function does not exist. Typo? You tried: "+q+" possible are: "+_JSON$stringify$1(_Object$keys$1(this.body.eventListeners)))}},{key:"_unbindTemporaryUIs",value:function(){for(var q in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,q)&&(this.body.eventListeners[q]=this.temporaryUIFunctions[q],delete this.temporaryUIFunctions[q]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var q=0;q=0;ut--)if(rt[ut]!==this.selectedControlNode.id){ot=this.body.nodes[rt[ut]];break}if(ot!==void 0&&this.selectedControlNode!==void 0)if(ot.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var yn=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===yn.id?this._performEditEdge(ot.id,tt.to.id):this._performEditEdge(tt.from.id,ot.id)}else tt.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(q){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(q.center),this.lastTouch.translation=_Object$assign$1({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var K=this.lastTouch,X=this.selectionHandler.getNodeAt(K);if(X!==void 0)if(X.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var tt=this._getNewTargetNode(X.x,X.y);this.body.nodes[tt.id]=tt,this.body.nodeIndices.push(tt.id);var rt=this.body.functions.createEdge({id:"connectionEdge"+v4$1(),from:X.id,to:tt.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[rt.id]=rt,this.body.edgeIndices.push(rt.id),this.temporaryIds.nodes.push(tt.id),this.temporaryIds.edges.push(rt.id)}this.touchTime=new Date().valueOf()}}},{key:"_dragControlNode",value:function(q){var K=this.body.functions.getPointer(q.center),X=this.selectionHandler._pointerToPositionObject(K),tt=void 0;this.temporaryIds.edges[0]!==void 0&&(tt=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var rt=this.selectionHandler._getAllNodesOverlappingWith(X),ot=void 0,ut=rt.length-1;ut>=0;ut--){var yn;if(_indexOfInstanceProperty$1(yn=this.temporaryIds.nodes).call(yn,rt[ut])===-1){ot=this.body.nodes[rt[ut]];break}}if(q.controlEdge={from:tt,to:ot?ot.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",q,K),this.temporaryIds.nodes[0]!==void 0){var uo=this.body.nodes[this.temporaryIds.nodes[0]];uo.x=this.canvas._XconvertDOMtoCanvas(K.x),uo.y=this.canvas._YconvertDOMtoCanvas(K.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(q)}},{key:"_finishConnect",value:function(q){var K=this.body.functions.getPointer(q.center),X=this.selectionHandler._pointerToPositionObject(K),tt=void 0;this.temporaryIds.edges[0]!==void 0&&(tt=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var rt=this.selectionHandler._getAllNodesOverlappingWith(X),ot=void 0,ut=rt.length-1;ut>=0;ut--){var yn;if(_indexOfInstanceProperty$1(yn=this.temporaryIds.nodes).call(yn,rt[ut])===-1){ot=this.body.nodes[rt[ut]];break}}this._cleanupTemporaryNodesAndEdges(),ot!==void 0&&(ot.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[tt]!==void 0&&this.body.nodes[ot.id]!==void 0&&this._performAddEdge(tt,ot.id)),q.controlEdge={from:tt,to:ot?ot.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",q,K),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(q){var K=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",q,K,void 0,!0)}},{key:"_performAddNode",value:function(q){var K=this,X={id:v4$1(),x:q.pointer.canvas.x,y:q.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(X,function(tt){tt!=null&&K.inMode==="addNode"&&K.body.data.nodes.getDataSet().add(tt),K.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(X),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(q,K){var X=this,tt={from:q,to:K};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(tt,function(rt){rt!=null&&X.inMode==="addEdge"&&(X.body.data.edges.getDataSet().add(rt),X.selectionHandler.unselectAll(),X.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(tt),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(q,K){var X=this,tt={id:this.edgeBeingEditedId,from:q,to:K,label:this.body.data.edges.get(this.edgeBeingEditedId).label},rt=this.options.editEdge;if(_typeof$1(rt)==="object"&&(rt=rt.editWithoutDrag),typeof rt=="function")if(rt.length===2)rt(tt,function(ot){ot==null||X.inMode!=="editEdge"?(X.body.edges[tt.id].updateEdgeType(),X.body.emitter.emit("_redraw"),X.showManipulatorToolbar()):(X.body.data.edges.getDataSet().update(ot),X.selectionHandler.unselectAll(),X.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(tt),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),F}(),string$2="string",bool$2="boolean",number$2="number",array$2="array",object$2="object",dom$2="dom",any$2="any",endPoints=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],nodeOptions={borderWidth:{number:number$2},borderWidthSelected:{number:number$2,undefined:"undefined"},brokenImage:{string:string$2,undefined:"undefined"},chosen:{label:{boolean:bool$2,function:"function"},node:{boolean:bool$2,function:"function"},__type__:{object:object$2,boolean:bool$2}},color:{border:{string:string$2},background:{string:string$2},highlight:{border:{string:string$2},background:{string:string$2},__type__:{object:object$2,string:string$2}},hover:{border:{string:string$2},background:{string:string$2},__type__:{object:object$2,string:string$2}},__type__:{object:object$2,string:string$2}},opacity:{number:number$2,undefined:"undefined"},fixed:{x:{boolean:bool$2},y:{boolean:bool$2},__type__:{object:object$2,boolean:bool$2}},font:{align:{string:string$2},color:{string:string$2},size:{number:number$2},face:{string:string$2},background:{string:string$2},strokeWidth:{number:number$2},strokeColor:{string:string$2},vadjust:{number:number$2},multi:{boolean:bool$2,string:string$2},bold:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},boldital:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},ital:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},mono:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},__type__:{object:object$2,string:string$2}},group:{string:string$2,number:number$2,undefined:"undefined"},heightConstraint:{minimum:{number:number$2},valign:{string:string$2},__type__:{object:object$2,boolean:bool$2,number:number$2}},hidden:{boolean:bool$2},icon:{face:{string:string$2},code:{string:string$2},size:{number:number$2},color:{string:string$2},weight:{string:string$2,number:number$2},__type__:{object:object$2}},id:{string:string$2,number:number$2},image:{selected:{string:string$2,undefined:"undefined"},unselected:{string:string$2,undefined:"undefined"},__type__:{object:object$2,string:string$2}},imagePadding:{top:{number:number$2},right:{number:number$2},bottom:{number:number$2},left:{number:number$2},__type__:{object:object$2,number:number$2}},label:{string:string$2,undefined:"undefined"},labelHighlightBold:{boolean:bool$2},level:{number:number$2,undefined:"undefined"},margin:{top:{number:number$2},right:{number:number$2},bottom:{number:number$2},left:{number:number$2},__type__:{object:object$2,number:number$2}},mass:{number:number$2},physics:{boolean:bool$2},scaling:{min:{number:number$2},max:{number:number$2},label:{enabled:{boolean:bool$2},min:{number:number$2},max:{number:number$2},maxVisible:{number:number$2},drawThreshold:{number:number$2},__type__:{object:object$2,boolean:bool$2}},customScalingFunction:{function:"function"},__type__:{object:object$2}},shadow:{enabled:{boolean:bool$2},color:{string:string$2},size:{number:number$2},x:{number:number$2},y:{number:number$2},__type__:{object:object$2,boolean:bool$2}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:bool$2,array:array$2},borderRadius:{number:number$2},interpolation:{boolean:bool$2},useImageSize:{boolean:bool$2},useBorderWithImage:{boolean:bool$2},coordinateOrigin:{string:["center","top-left"]},__type__:{object:object$2}},size:{number:number$2},title:{string:string$2,dom:dom$2,undefined:"undefined"},value:{number:number$2,undefined:"undefined"},widthConstraint:{minimum:{number:number$2},maximum:{number:number$2},__type__:{object:object$2,boolean:bool$2,number:number$2}},x:{number:number$2},y:{number:number$2},__type__:{object:object$2}},allOptions$4={configure:{enabled:{boolean:bool$2},filter:{boolean:bool$2,string:string$2,array:array$2,function:"function"},container:{dom:dom$2},showButton:{boolean:bool$2},__type__:{object:object$2,boolean:bool$2,string:string$2,array:array$2,function:"function"}},edges:{arrows:{to:{enabled:{boolean:bool$2},scaleFactor:{number:number$2},type:{string:endPoints},imageHeight:{number:number$2},imageWidth:{number:number$2},src:{string:string$2},__type__:{object:object$2,boolean:bool$2}},middle:{enabled:{boolean:bool$2},scaleFactor:{number:number$2},type:{string:endPoints},imageWidth:{number:number$2},imageHeight:{number:number$2},src:{string:string$2},__type__:{object:object$2,boolean:bool$2}},from:{enabled:{boolean:bool$2},scaleFactor:{number:number$2},type:{string:endPoints},imageWidth:{number:number$2},imageHeight:{number:number$2},src:{string:string$2},__type__:{object:object$2,boolean:bool$2}},__type__:{string:["from","to","middle"],object:object$2}},endPointOffset:{from:{number:number$2},to:{number:number$2},__type__:{object:object$2,number:number$2}},arrowStrikethrough:{boolean:bool$2},background:{enabled:{boolean:bool$2},color:{string:string$2},size:{number:number$2},dashes:{boolean:bool$2,array:array$2},__type__:{object:object$2,boolean:bool$2}},chosen:{label:{boolean:bool$2,function:"function"},edge:{boolean:bool$2,function:"function"},__type__:{object:object$2,boolean:bool$2}},color:{color:{string:string$2},highlight:{string:string$2},hover:{string:string$2},inherit:{string:["from","to","both"],boolean:bool$2},opacity:{number:number$2},__type__:{object:object$2,string:string$2}},dashes:{boolean:bool$2,array:array$2},font:{color:{string:string$2},size:{number:number$2},face:{string:string$2},background:{string:string$2},strokeWidth:{number:number$2},strokeColor:{string:string$2},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:number$2},multi:{boolean:bool$2,string:string$2},bold:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},boldital:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},ital:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},mono:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},__type__:{object:object$2,string:string$2}},hidden:{boolean:bool$2},hoverWidth:{function:"function",number:number$2},label:{string:string$2,undefined:"undefined"},labelHighlightBold:{boolean:bool$2},length:{number:number$2,undefined:"undefined"},physics:{boolean:bool$2},scaling:{min:{number:number$2},max:{number:number$2},label:{enabled:{boolean:bool$2},min:{number:number$2},max:{number:number$2},maxVisible:{number:number$2},drawThreshold:{number:number$2},__type__:{object:object$2,boolean:bool$2}},customScalingFunction:{function:"function"},__type__:{object:object$2}},selectionWidth:{function:"function",number:number$2},selfReferenceSize:{number:number$2},selfReference:{size:{number:number$2},angle:{number:number$2},renderBehindTheNode:{boolean:bool$2},__type__:{object:object$2}},shadow:{enabled:{boolean:bool$2},color:{string:string$2},size:{number:number$2},x:{number:number$2},y:{number:number$2},__type__:{object:object$2,boolean:bool$2}},smooth:{enabled:{boolean:bool$2},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:number$2},forceDirection:{string:["horizontal","vertical","none"],boolean:bool$2},__type__:{object:object$2,boolean:bool$2}},title:{string:string$2,undefined:"undefined"},width:{number:number$2},widthConstraint:{maximum:{number:number$2},__type__:{object:object$2,boolean:bool$2,number:number$2}},value:{number:number$2,undefined:"undefined"},__type__:{object:object$2}},groups:{useDefaultGroups:{boolean:bool$2},__any__:nodeOptions,__type__:{object:object$2}},interaction:{dragNodes:{boolean:bool$2},dragView:{boolean:bool$2},hideEdgesOnDrag:{boolean:bool$2},hideEdgesOnZoom:{boolean:bool$2},hideNodesOnDrag:{boolean:bool$2},hover:{boolean:bool$2},keyboard:{enabled:{boolean:bool$2},speed:{x:{number:number$2},y:{number:number$2},zoom:{number:number$2},__type__:{object:object$2}},bindToWindow:{boolean:bool$2},autoFocus:{boolean:bool$2},__type__:{object:object$2,boolean:bool$2}},multiselect:{boolean:bool$2},navigationButtons:{boolean:bool$2},selectable:{boolean:bool$2},selectConnectedEdges:{boolean:bool$2},hoverConnectedEdges:{boolean:bool$2},tooltipDelay:{number:number$2},zoomView:{boolean:bool$2},zoomSpeed:{number:number$2},__type__:{object:object$2}},layout:{randomSeed:{undefined:"undefined",number:number$2,string:string$2},improvedLayout:{boolean:bool$2},clusterThreshold:{number:number$2},hierarchical:{enabled:{boolean:bool$2},levelSeparation:{number:number$2},nodeSpacing:{number:number$2},treeSpacing:{number:number$2},blockShifting:{boolean:bool$2},edgeMinimization:{boolean:bool$2},parentCentralization:{boolean:bool$2},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:object$2,boolean:bool$2}},__type__:{object:object$2}},manipulation:{enabled:{boolean:bool$2},initiallyActive:{boolean:bool$2},addNode:{boolean:bool$2,function:"function"},addEdge:{boolean:bool$2,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:object$2,boolean:bool$2,function:"function"}},deleteNode:{boolean:bool$2,function:"function"},deleteEdge:{boolean:bool$2,function:"function"},controlNodeStyle:nodeOptions,__type__:{object:object$2,boolean:bool$2}},nodes:nodeOptions,physics:{enabled:{boolean:bool$2},barnesHut:{theta:{number:number$2},gravitationalConstant:{number:number$2},centralGravity:{number:number$2},springLength:{number:number$2},springConstant:{number:number$2},damping:{number:number$2},avoidOverlap:{number:number$2},__type__:{object:object$2}},forceAtlas2Based:{theta:{number:number$2},gravitationalConstant:{number:number$2},centralGravity:{number:number$2},springLength:{number:number$2},springConstant:{number:number$2},damping:{number:number$2},avoidOverlap:{number:number$2},__type__:{object:object$2}},repulsion:{centralGravity:{number:number$2},springLength:{number:number$2},springConstant:{number:number$2},nodeDistance:{number:number$2},damping:{number:number$2},__type__:{object:object$2}},hierarchicalRepulsion:{centralGravity:{number:number$2},springLength:{number:number$2},springConstant:{number:number$2},nodeDistance:{number:number$2},damping:{number:number$2},avoidOverlap:{number:number$2},__type__:{object:object$2}},maxVelocity:{number:number$2},minVelocity:{number:number$2},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:bool$2},iterations:{number:number$2},updateInterval:{number:number$2},onlyDynamicEdges:{boolean:bool$2},fit:{boolean:bool$2},__type__:{object:object$2,boolean:bool$2}},timestep:{number:number$2},adaptiveTimestep:{boolean:bool$2},wind:{x:{number:number$2},y:{number:number$2},__type__:{object:object$2}},__type__:{object:object$2,boolean:bool$2}},autoResize:{boolean:bool$2},clickToUse:{boolean:bool$2},locale:{string:string$2},locales:{__any__:{any:any$2},__type__:{object:object$2}},height:{string:string$2},width:{string:string$2},__type__:{object:object$2}},configureOptions$2={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},configuratorHideOption=function F(W,q,K){var X;return!!(_includesInstanceProperty$1(W).call(W,"physics")&&_includesInstanceProperty$1(X=configureOptions$2.physics.solver).call(X,q)&&K.physics.solver!==q&&q!=="wind")},FloydWarshall=function(){function F(){_classCallCheck$1(this,F)}return _createClass$1(F,[{key:"getDistances",value:function(q,K,X){for(var tt={},rt=q.edges,ot=0;ot2&&arguments[2]!==void 0?arguments[2]:!1,tt=this.distanceSolver.getDistances(this.body,q,K);this._createL_matrix(tt),this._createK_matrix(tt),this._createE_matrix();for(var rt=.01,ot=1,ut=0,yn=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),uo=5,po=1e9,mo=0,wo=0,lf=0,yf=0,cf=0;po>rt&&utot&&cfF.length)&&(W=F.length);for(var q=0,K=new Array(W);q=W[tt])&&(W[tt]=W[X]+1)}),W}function fillLevelsByDirectionLeaves(F){return fillLevelsByDirection(function(W){var q,K;return _everyInstanceProperty$1(q=_filterInstanceProperty$1(K=W.edges).call(K,function(X){return F.has(X.toId)})).call(q,function(X){return X.to===W})},function(W,q){return q>W},"from",F)}function fillLevelsByDirectionRoots(F){return fillLevelsByDirection(function(W){var q,K;return _everyInstanceProperty$1(q=_filterInstanceProperty$1(K=W.edges).call(K,function(X){return F.has(X.toId)})).call(q,function(X){return X.from===W})},function(W,q){return qrt)return{v:{v:fillLevelsByDirectionCyclic(K,tt)}};++_f},Af;$f=vf.pop();)if(Af=xf(),Af!==0&&Af)return Af.v},mo;for(yn.s();!(uo=yn.n()).done;)if(mo=po(),mo!==0&&mo)return mo.v}catch(wo){yn.e(wo)}finally{yn.f()}return tt}var HierarchicalStatus=function(){function F(){_classCallCheck$1(this,F),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return _createClass$1(F,[{key:"addRelation",value:function(q,K){this.childrenReference[q]===void 0&&(this.childrenReference[q]=[]),this.childrenReference[q].push(K),this.parentReference[K]===void 0&&(this.parentReference[K]=[]),this.parentReference[K].push(q)}},{key:"checkIfTree",value:function(){for(var q in this.parentReference)if(this.parentReference[q].length>1){this.isTree=!1;return}this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(q,K){K!==void 0&&this.trees[q.id]===void 0&&(this.trees[q.id]=K,this.treeIndex=Math.max(K,this.treeIndex))}},{key:"ensureLevel",value:function(q){this.levels[q]===void 0&&(this.levels[q]=0)}},{key:"getMaxLevel",value:function(q){var K=this,X={},tt=function rt(ot){if(X[ot]!==void 0)return X[ot];var ut=K.levels[ot];if(K.childrenReference[ot]){var yn=K.childrenReference[ot];if(yn.length>0)for(var uo=0;uo0&&(X.levelSeparation*=-1):X.levelSeparation<0&&(X.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(K);if(tt===!0)return this.body.emitter.emit("refresh"),deepExtend$1(K,this.optionsBackup)}return K}},{key:"_resetRNG",value:function(q){this.initialRandomSeed=q,this._rng=Alea$1(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(q){if(this.options.hierarchical.enabled===!0){var K=this.optionsBackup.physics;q.physics===void 0||q.physics===!0?(q.physics={enabled:K.enabled===void 0?!0:K.enabled,solver:"hierarchicalRepulsion"},K.enabled=K.enabled===void 0?!0:K.enabled,K.solver=K.solver||"barnesHut"):_typeof$1(q.physics)==="object"?(K.enabled=q.physics.enabled===void 0?!0:q.physics.enabled,K.solver=q.physics.solver||"barnesHut",q.physics.solver="hierarchicalRepulsion"):q.physics!==!1&&(K.solver="barnesHut",q.physics={solver:"hierarchicalRepulsion"});var X=this.direction.curveType();if(q.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},q.edges={smooth:!1};else if(q.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},q.edges.smooth=!1;else if(typeof q.edges.smooth=="boolean")this.optionsBackup.edges={smooth:q.edges.smooth},q.edges.smooth={enabled:q.edges.smooth,type:X};else{var tt=q.edges.smooth;tt.type!==void 0&&tt.type!=="dynamic"&&(X=tt.type),this.optionsBackup.edges={smooth:{enabled:tt.enabled===void 0?!0:tt.enabled,type:tt.type===void 0?"dynamic":tt.type,roundness:tt.roundness===void 0?.5:tt.roundness,forceDirection:tt.forceDirection===void 0?!1:tt.forceDirection}},q.edges.smooth={enabled:tt.enabled===void 0?!0:tt.enabled,type:X,roundness:tt.roundness===void 0?.5:tt.roundness,forceDirection:tt.forceDirection===void 0?!1:tt.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",X)}return q}},{key:"positionInitially",value:function(q){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var K=q.length+50,X=0;Xut){for(var uo=q.length;q.length>ut&&ot<=rt;){ot+=1;var po=q.length;ot%3===0?this.body.modules.clustering.clusterBridges(yn):this.body.modules.clustering.clusterOutliers(yn);var mo=q.length;if(po==mo&&ot%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*uo)})}ot>rt&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(q,this.body.edgeIndices,!0),this._shiftToCenter();for(var wo=70,lf=0;lf0){var q,K,X=!1,tt=!1;this.lastNodeOnLevel={},this.hierarchical=new HierarchicalStatus;for(K in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,K)&&(q=this.body.nodes[K],q.options.level!==void 0?(X=!0,this.hierarchical.levels[K]=q.options.level):tt=!0);if(tt===!0&&X===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(tt===!0){var rt=this.options.hierarchical.sortMethod;rt==="hubsize"?this._determineLevelsByHubsize():rt==="directed"?this._determineLevelsDirected():rt==="custom"&&this._determineLevelsCustomCallback()}for(var ot in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,ot)&&this.hierarchical.ensureLevel(ot);var ut=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(ut),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var q=this,K=!1,X={},tt=function(){for(var $f=ot(),xf=0,Af=0;Af<$f.length-1;Af++){var Cf=$f[Af].max-$f[Af+1].min;xf+=Cf+q.options.hierarchical.treeSpacing,rt(Af+1,xf)}},rt=function($f,xf){var Af=q.hierarchical.trees;for(var Cf in Af)Object.prototype.hasOwnProperty.call(Af,Cf)&&Af[Cf]===$f&&q.direction.shift(Cf,xf)},ot=function(){for(var $f=[],xf=0;xf0)for(var Cf=0;Cf1&&arguments[1]!==void 0?arguments[1]:1e9,Af=1e9,Cf=1e9,Pf=1e9,Bf=-1e9;for(var Hf in $f)if(Object.prototype.hasOwnProperty.call($f,Hf)){var Df=q.body.nodes[Hf],Lf=q.hierarchical.levels[Df.id],kf=q.direction.getPosition(Df),Nf=q._getSpaceAroundNode(Df,$f),Yf=_slicedToArray$1(Nf,2),Gf=Yf[0],rp=Yf[1];Af=Math.min(Gf,Af),Cf=Math.min(rp,Cf),Lf<=xf&&(Pf=Math.min(kf,Pf),Bf=Math.max(kf,Bf))}return[Pf,Bf,Af,Cf]},uo=function($f,xf){var Af=q.hierarchical.getMaxLevel($f.id),Cf=q.hierarchical.getMaxLevel(xf.id);return Math.min(Af,Cf)},po=function($f,xf,Af){for(var Cf=q.hierarchical,Pf=0;Pf1)for(var Df=0;Df2&&arguments[2]!==void 0?arguments[2]:!1,Cf=q.direction.getPosition($f),Pf=q.direction.getPosition(xf),Bf=Math.abs(Pf-Cf),Hf=q.options.hierarchical.nodeSpacing;if(Bf>Hf){var Df={},Lf={};ut($f,Df),ut(xf,Lf);var kf=uo($f,xf),Nf=yn(Df,kf),Yf=yn(Lf,kf),Gf=Nf[1],rp=Yf[0],ip=Yf[2],ap=Math.abs(Gf-rp);if(ap>Hf){var yp=Gf-rp+Hf;yp<-ip+Hf&&(yp=-ip+Hf),yp<0&&(q._shiftBlock(xf.id,yp),K=!0,Af===!0&&q._centerParent(xf))}}},wo=function($f,xf){for(var Af=xf.id,Cf=xf.edges,Pf=q.hierarchical.levels[xf.id],Bf=q.options.hierarchical.levelSeparation*q.options.hierarchical.levelSeparation,Hf={},Df=[],Lf=0;Lf0?Dp=Math.min(vg,og-q.options.hierarchical.nodeSpacing):vg<0&&(Dp=-Math.min(-vg,ng-q.options.hierarchical.nodeSpacing)),Dp!=0&&(q._shiftBlock(xf.id,Dp),K=!0)},ap=function(Np){var jp=q.direction.getPosition(xf),Ip=q._getSpaceAroundNode(xf),Jp=_slicedToArray$1(Ip,2),ng=Jp[0],og=Jp[1],vg=Np-jp,Dp=jp;vg>0?Dp=Math.min(jp+(og-q.options.hierarchical.nodeSpacing),Np):vg<0&&(Dp=Math.max(jp-(ng-q.options.hierarchical.nodeSpacing),Np)),Dp!==jp&&(q.direction.setPosition(xf,Dp),K=!0)},yp=rp($f,Df);ip(yp),yp=rp($f,Cf),ap(yp)},lf=function($f){var xf=q.hierarchical.getLevels();xf=_reverseInstanceProperty$1(xf).call(xf);for(var Af=0;Af<$f;Af++){K=!1;for(var Cf=0;Cf0&&Math.abs(lf)0&&(uo=this.direction.getPosition(tt[ot-1])+yn),this.direction.setPosition(ut,uo,K),this._validatePositionAndContinue(ut,K,uo),rt++}}}}},{key:"_placeBranchNodes",value:function(q,K){var X,tt=this.hierarchical.childrenReference[q];if(tt!==void 0){for(var rt=[],ot=0;otK&&this.positionedNodes[yn.id]===void 0){var po=this.options.hierarchical.nodeSpacing,mo=void 0;ut===0?mo=this.direction.getPosition(this.body.nodes[q]):mo=this.direction.getPosition(rt[ut-1])+po,this.direction.setPosition(yn,mo,uo),this._validatePositionAndContinue(yn,uo,mo)}else return}var wo=this._getCenterPosition(rt);this.direction.setPosition(this.body.nodes[q],wo,K)}}},{key:"_validatePositionAndContinue",value:function(q,K,X){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[K]!==void 0){var tt=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[K]]);if(X-ttq.hierarchical.levels[tt.id]&&q.hierarchical.addRelation(tt.id,rt.id)};this._crawlNetwork(K),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var q=this,K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},X=arguments.length>1?arguments[1]:void 0,tt={},rt=function mo(wo,lf){if(tt[wo.id]===void 0){q.hierarchical.setTreeIndex(wo,lf),tt[wo.id]=!0;for(var yf,cf=q._getActiveEdges(wo),vf=0;vf=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$8(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$8(F,W);var K=_sliceInstanceProperty$2(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$8(F,W)}}function _arrayLikeToArray$8(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q0&&this.options.deleteNode!==!1?(ut===!0&&this._createSeperator(4),this._createDeleteButton(ot)):X===0&&this.options.deleteEdge!==!1&&(ut===!0&&this._createSeperator(4),this._createDeleteButton(ot))),this._bindElementEvents(this.closeDiv,_bindInstanceProperty$1$1(q=this.toggleEditMode).call(q,this)),this._temporaryBindEvent("select",_bindInstanceProperty$1$1(K=this.showManipulatorToolbar).call(K,this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){var q;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var K,X=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(X),this._createSeperator(),this._createDescription(X.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,_bindInstanceProperty$1$1(K=this.toggleEditMode).call(K,this))}this._temporaryBindEvent("click",_bindInstanceProperty$1$1(q=this._performAddNode).call(q,this))}},{key:"editNode",value:function(){var q=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var K=this.selectionHandler.getSelectedNodes()[0];if(K!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(K.isCluster!==!0){var X=deepExtend$1({},K.options,!1);if(X.x=K.x,X.y=K.y,this.options.editNode.length===2)this.options.editNode(X,function(tt){tt!=null&&q.inMode==="editNode"&&q.body.data.nodes.getDataSet().update(tt),q.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){var q,K,X,tt,rt;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var ot,ut=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(ut),this._createSeperator(),this._createDescription(ut.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,_bindInstanceProperty$1$1(ot=this.toggleEditMode).call(ot,this))}this._temporaryBindUI("onTouch",_bindInstanceProperty$1$1(q=this._handleConnect).call(q,this)),this._temporaryBindUI("onDragEnd",_bindInstanceProperty$1$1(K=this._finishConnect).call(K,this)),this._temporaryBindUI("onDrag",_bindInstanceProperty$1$1(X=this._dragControlNode).call(X,this)),this._temporaryBindUI("onRelease",_bindInstanceProperty$1$1(tt=this._finishConnect).call(tt,this)),this._temporaryBindUI("onDragStart",_bindInstanceProperty$1$1(rt=this._dragStartEdge).call(rt,this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",_typeof$1(this.options.editEdge)==="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){var q=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(q.from.id,q.to.id);return}if(this.guiEnabled===!0){var K,X=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(X),this._createSeperator(),this._createDescription(X.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,_bindInstanceProperty$1$1(K=this.toggleEditMode).call(K,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var tt,rt,ot,ut,yn=this.body.edges[this.edgeBeingEditedId],uo=this._getNewTargetNode(yn.from.x,yn.from.y),po=this._getNewTargetNode(yn.to.x,yn.to.y);this.temporaryIds.nodes.push(uo.id),this.temporaryIds.nodes.push(po.id),this.body.nodes[uo.id]=uo,this.body.nodeIndices.push(uo.id),this.body.nodes[po.id]=po,this.body.nodeIndices.push(po.id),this._temporaryBindUI("onTouch",_bindInstanceProperty$1$1(tt=this._controlNodeTouch).call(tt,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",_bindInstanceProperty$1$1(rt=this._controlNodeDragStart).call(rt,this)),this._temporaryBindUI("onDrag",_bindInstanceProperty$1$1(ot=this._controlNodeDrag).call(ot,this)),this._temporaryBindUI("onDragEnd",_bindInstanceProperty$1$1(ut=this._controlNodeDragEnd).call(ut,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(mo){var wo=yn.edgeType.findBorderPositions(mo);uo.selected===!1&&(uo.x=wo.from.x,uo.y=wo.from.y),po.selected===!1&&(po.x=wo.to.x,po.y=wo.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var q=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var K=this.selectionHandler.getSelectedNodeIds(),X=this.selectionHandler.getSelectedEdgeIds(),tt=void 0;if(K.length>0){for(var rt=0;rt0&&typeof this.options.deleteEdge=="function"&&(tt=this.options.deleteEdge);if(typeof tt=="function"){var ot={nodes:K,edges:X};if(tt.length===2)tt(ot,function(ut){ut!=null&&q.inMode==="delete"?(q.body.data.edges.getDataSet().remove(ut.edges),q.body.data.nodes.getDataSet().remove(ut.nodes),q.body.emitter.emit("startSimulation"),q.showManipulatorToolbar()):(q.body.emitter.emit("startSimulation"),q.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(X),this.body.data.nodes.getDataSet().remove(K),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var q,K;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(q=(K=this.options.locales[this.options.locale])===null||K===void 0?void 0:K.close)!==null&&q!==void 0?q:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}},{key:"_getNewTargetNode",value:function(q,K){var X=deepExtend$1({},this.options.controlNodeStyle);X.id="targetNode"+v4$1(),X.hidden=!1,X.physics=!1,X.x=q,X.y=K;var tt=this.body.functions.createNode(X);return tt.shape.boundingBox={left:q,right:q,top:K,bottom:K},tt}},{key:"_createEditButton",value:function(){var q;this._clean(),this.manipulationDOM={},recursiveDOMDelete$1(this.editModeDiv);var K=this.options.locales[this.options.locale],X=this._createButton("editMode","vis-edit vis-edit-mode",K.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(X),this._bindElementEvents(X,_bindInstanceProperty$1$1(q=this.toggleEditMode).call(q,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(recursiveDOMDelete$1(this.editModeDiv),recursiveDOMDelete$1(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var q,K=_createForOfIteratorHelper$7(_spliceInstanceProperty$1(q=this._domEventListenerCleanupQueue).call(q,0)),X;try{for(K.s();!(X=K.n()).done;){var tt=X.value;tt()}}catch(rt){K.e(rt)}finally{K.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),recursiveDOMDelete$1(this.manipulationDiv),recursiveDOMDelete$1(this.editModeDiv),recursiveDOMDelete$1(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:"_createSeperator",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+q]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+q].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+q])}},{key:"_createAddNodeButton",value:function(q){var K,X=this._createButton("addNode","vis-add",q.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(X),this._bindElementEvents(X,_bindInstanceProperty$1$1(K=this.addNodeMode).call(K,this))}},{key:"_createAddEdgeButton",value:function(q){var K,X=this._createButton("addEdge","vis-connect",q.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(X),this._bindElementEvents(X,_bindInstanceProperty$1$1(K=this.addEdgeMode).call(K,this))}},{key:"_createEditNodeButton",value:function(q){var K,X=this._createButton("editNode","vis-edit",q.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(X),this._bindElementEvents(X,_bindInstanceProperty$1$1(K=this.editNode).call(K,this))}},{key:"_createEditEdgeButton",value:function(q){var K,X=this._createButton("editEdge","vis-edit",q.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(X),this._bindElementEvents(X,_bindInstanceProperty$1$1(K=this.editEdgeMode).call(K,this))}},{key:"_createDeleteButton",value:function(q){var K,X;this.options.rtl?X="vis-delete-rtl":X="vis-delete";var tt=this._createButton("delete",X,q.del||this.options.locales.en.del);this.manipulationDiv.appendChild(tt),this._bindElementEvents(tt,_bindInstanceProperty$1$1(K=this.deleteSelected).call(K,this))}},{key:"_createBackButton",value:function(q){var K,X=this._createButton("back","vis-back",q.back||this.options.locales.en.back);this.manipulationDiv.appendChild(X),this._bindElementEvents(X,_bindInstanceProperty$1$1(K=this.showManipulatorToolbar).call(K,this))}},{key:"_createButton",value:function(q,K,X){var tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[q+"Div"]=document.createElement("button"),this.manipulationDOM[q+"Div"].className="vis-button "+K,this.manipulationDOM[q+"Label"]=document.createElement("div"),this.manipulationDOM[q+"Label"].className=tt,this.manipulationDOM[q+"Label"].innerText=X,this.manipulationDOM[q+"Div"].appendChild(this.manipulationDOM[q+"Label"]),this.manipulationDOM[q+"Div"]}},{key:"_createDescription",value:function(q){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=q,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:"_temporaryBindEvent",value:function(q,K){this.temporaryEventFunctions.push({event:q,boundFunction:K}),this.body.emitter.on(q,K)}},{key:"_temporaryBindUI",value:function(q,K){if(this.body.eventListeners[q]!==void 0)this.temporaryUIFunctions[q]=this.body.eventListeners[q],this.body.eventListeners[q]=K;else throw new Error("This UI function does not exist. Typo? You tried: "+q+" possible are: "+_JSON$stringify$1(_Object$keys$1(this.body.eventListeners)))}},{key:"_unbindTemporaryUIs",value:function(){for(var q in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,q)&&(this.body.eventListeners[q]=this.temporaryUIFunctions[q],delete this.temporaryUIFunctions[q]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var q=0;q=0;ut--)if(rt[ut]!==this.selectedControlNode.id){ot=this.body.nodes[rt[ut]];break}if(ot!==void 0&&this.selectedControlNode!==void 0)if(ot.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var yn=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===yn.id?this._performEditEdge(ot.id,tt.to.id):this._performEditEdge(tt.from.id,ot.id)}else tt.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(q){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(q.center),this.lastTouch.translation=_Object$assign$1({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var K=this.lastTouch,X=this.selectionHandler.getNodeAt(K);if(X!==void 0)if(X.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var tt=this._getNewTargetNode(X.x,X.y);this.body.nodes[tt.id]=tt,this.body.nodeIndices.push(tt.id);var rt=this.body.functions.createEdge({id:"connectionEdge"+v4$1(),from:X.id,to:tt.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[rt.id]=rt,this.body.edgeIndices.push(rt.id),this.temporaryIds.nodes.push(tt.id),this.temporaryIds.edges.push(rt.id)}this.touchTime=new Date().valueOf()}}},{key:"_dragControlNode",value:function(q){var K=this.body.functions.getPointer(q.center),X=this.selectionHandler._pointerToPositionObject(K),tt=void 0;this.temporaryIds.edges[0]!==void 0&&(tt=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var rt=this.selectionHandler._getAllNodesOverlappingWith(X),ot=void 0,ut=rt.length-1;ut>=0;ut--){var yn;if(_indexOfInstanceProperty$1(yn=this.temporaryIds.nodes).call(yn,rt[ut])===-1){ot=this.body.nodes[rt[ut]];break}}if(q.controlEdge={from:tt,to:ot?ot.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",q,K),this.temporaryIds.nodes[0]!==void 0){var uo=this.body.nodes[this.temporaryIds.nodes[0]];uo.x=this.canvas._XconvertDOMtoCanvas(K.x),uo.y=this.canvas._YconvertDOMtoCanvas(K.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(q)}},{key:"_finishConnect",value:function(q){var K=this.body.functions.getPointer(q.center),X=this.selectionHandler._pointerToPositionObject(K),tt=void 0;this.temporaryIds.edges[0]!==void 0&&(tt=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var rt=this.selectionHandler._getAllNodesOverlappingWith(X),ot=void 0,ut=rt.length-1;ut>=0;ut--){var yn;if(_indexOfInstanceProperty$1(yn=this.temporaryIds.nodes).call(yn,rt[ut])===-1){ot=this.body.nodes[rt[ut]];break}}this._cleanupTemporaryNodesAndEdges(),ot!==void 0&&(ot.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[tt]!==void 0&&this.body.nodes[ot.id]!==void 0&&this._performAddEdge(tt,ot.id)),q.controlEdge={from:tt,to:ot?ot.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",q,K),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(q){var K=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",q,K,void 0,!0)}},{key:"_performAddNode",value:function(q){var K=this,X={id:v4$1(),x:q.pointer.canvas.x,y:q.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(X,function(tt){tt!=null&&K.inMode==="addNode"&&K.body.data.nodes.getDataSet().add(tt),K.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(X),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(q,K){var X=this,tt={from:q,to:K};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(tt,function(rt){rt!=null&&X.inMode==="addEdge"&&(X.body.data.edges.getDataSet().add(rt),X.selectionHandler.unselectAll(),X.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(tt),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(q,K){var X=this,tt={id:this.edgeBeingEditedId,from:q,to:K,label:this.body.data.edges.get(this.edgeBeingEditedId).label},rt=this.options.editEdge;if(_typeof$1(rt)==="object"&&(rt=rt.editWithoutDrag),typeof rt=="function")if(rt.length===2)rt(tt,function(ot){ot==null||X.inMode!=="editEdge"?(X.body.edges[tt.id].updateEdgeType(),X.body.emitter.emit("_redraw"),X.showManipulatorToolbar()):(X.body.data.edges.getDataSet().update(ot),X.selectionHandler.unselectAll(),X.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(tt),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),F}(),string$2="string",bool$2="boolean",number$2="number",array$2="array",object$2="object",dom$2="dom",any$2="any",endPoints=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],nodeOptions={borderWidth:{number:number$2},borderWidthSelected:{number:number$2,undefined:"undefined"},brokenImage:{string:string$2,undefined:"undefined"},chosen:{label:{boolean:bool$2,function:"function"},node:{boolean:bool$2,function:"function"},__type__:{object:object$2,boolean:bool$2}},color:{border:{string:string$2},background:{string:string$2},highlight:{border:{string:string$2},background:{string:string$2},__type__:{object:object$2,string:string$2}},hover:{border:{string:string$2},background:{string:string$2},__type__:{object:object$2,string:string$2}},__type__:{object:object$2,string:string$2}},opacity:{number:number$2,undefined:"undefined"},fixed:{x:{boolean:bool$2},y:{boolean:bool$2},__type__:{object:object$2,boolean:bool$2}},font:{align:{string:string$2},color:{string:string$2},size:{number:number$2},face:{string:string$2},background:{string:string$2},strokeWidth:{number:number$2},strokeColor:{string:string$2},vadjust:{number:number$2},multi:{boolean:bool$2,string:string$2},bold:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},boldital:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},ital:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},mono:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},__type__:{object:object$2,string:string$2}},group:{string:string$2,number:number$2,undefined:"undefined"},heightConstraint:{minimum:{number:number$2},valign:{string:string$2},__type__:{object:object$2,boolean:bool$2,number:number$2}},hidden:{boolean:bool$2},icon:{face:{string:string$2},code:{string:string$2},size:{number:number$2},color:{string:string$2},weight:{string:string$2,number:number$2},__type__:{object:object$2}},id:{string:string$2,number:number$2},image:{selected:{string:string$2,undefined:"undefined"},unselected:{string:string$2,undefined:"undefined"},__type__:{object:object$2,string:string$2}},imagePadding:{top:{number:number$2},right:{number:number$2},bottom:{number:number$2},left:{number:number$2},__type__:{object:object$2,number:number$2}},label:{string:string$2,undefined:"undefined"},labelHighlightBold:{boolean:bool$2},level:{number:number$2,undefined:"undefined"},margin:{top:{number:number$2},right:{number:number$2},bottom:{number:number$2},left:{number:number$2},__type__:{object:object$2,number:number$2}},mass:{number:number$2},physics:{boolean:bool$2},scaling:{min:{number:number$2},max:{number:number$2},label:{enabled:{boolean:bool$2},min:{number:number$2},max:{number:number$2},maxVisible:{number:number$2},drawThreshold:{number:number$2},__type__:{object:object$2,boolean:bool$2}},customScalingFunction:{function:"function"},__type__:{object:object$2}},shadow:{enabled:{boolean:bool$2},color:{string:string$2},size:{number:number$2},x:{number:number$2},y:{number:number$2},__type__:{object:object$2,boolean:bool$2}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:bool$2,array:array$2},borderRadius:{number:number$2},interpolation:{boolean:bool$2},useImageSize:{boolean:bool$2},useBorderWithImage:{boolean:bool$2},coordinateOrigin:{string:["center","top-left"]},__type__:{object:object$2}},size:{number:number$2},title:{string:string$2,dom:dom$2,undefined:"undefined"},value:{number:number$2,undefined:"undefined"},widthConstraint:{minimum:{number:number$2},maximum:{number:number$2},__type__:{object:object$2,boolean:bool$2,number:number$2}},x:{number:number$2},y:{number:number$2},__type__:{object:object$2}},allOptions$4={configure:{enabled:{boolean:bool$2},filter:{boolean:bool$2,string:string$2,array:array$2,function:"function"},container:{dom:dom$2},showButton:{boolean:bool$2},__type__:{object:object$2,boolean:bool$2,string:string$2,array:array$2,function:"function"}},edges:{arrows:{to:{enabled:{boolean:bool$2},scaleFactor:{number:number$2},type:{string:endPoints},imageHeight:{number:number$2},imageWidth:{number:number$2},src:{string:string$2},__type__:{object:object$2,boolean:bool$2}},middle:{enabled:{boolean:bool$2},scaleFactor:{number:number$2},type:{string:endPoints},imageWidth:{number:number$2},imageHeight:{number:number$2},src:{string:string$2},__type__:{object:object$2,boolean:bool$2}},from:{enabled:{boolean:bool$2},scaleFactor:{number:number$2},type:{string:endPoints},imageWidth:{number:number$2},imageHeight:{number:number$2},src:{string:string$2},__type__:{object:object$2,boolean:bool$2}},__type__:{string:["from","to","middle"],object:object$2}},endPointOffset:{from:{number:number$2},to:{number:number$2},__type__:{object:object$2,number:number$2}},arrowStrikethrough:{boolean:bool$2},background:{enabled:{boolean:bool$2},color:{string:string$2},size:{number:number$2},dashes:{boolean:bool$2,array:array$2},__type__:{object:object$2,boolean:bool$2}},chosen:{label:{boolean:bool$2,function:"function"},edge:{boolean:bool$2,function:"function"},__type__:{object:object$2,boolean:bool$2}},color:{color:{string:string$2},highlight:{string:string$2},hover:{string:string$2},inherit:{string:["from","to","both"],boolean:bool$2},opacity:{number:number$2},__type__:{object:object$2,string:string$2}},dashes:{boolean:bool$2,array:array$2},font:{color:{string:string$2},size:{number:number$2},face:{string:string$2},background:{string:string$2},strokeWidth:{number:number$2},strokeColor:{string:string$2},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:number$2},multi:{boolean:bool$2,string:string$2},bold:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},boldital:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},ital:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},mono:{color:{string:string$2},size:{number:number$2},face:{string:string$2},mod:{string:string$2},vadjust:{number:number$2},__type__:{object:object$2,string:string$2}},__type__:{object:object$2,string:string$2}},hidden:{boolean:bool$2},hoverWidth:{function:"function",number:number$2},label:{string:string$2,undefined:"undefined"},labelHighlightBold:{boolean:bool$2},length:{number:number$2,undefined:"undefined"},physics:{boolean:bool$2},scaling:{min:{number:number$2},max:{number:number$2},label:{enabled:{boolean:bool$2},min:{number:number$2},max:{number:number$2},maxVisible:{number:number$2},drawThreshold:{number:number$2},__type__:{object:object$2,boolean:bool$2}},customScalingFunction:{function:"function"},__type__:{object:object$2}},selectionWidth:{function:"function",number:number$2},selfReferenceSize:{number:number$2},selfReference:{size:{number:number$2},angle:{number:number$2},renderBehindTheNode:{boolean:bool$2},__type__:{object:object$2}},shadow:{enabled:{boolean:bool$2},color:{string:string$2},size:{number:number$2},x:{number:number$2},y:{number:number$2},__type__:{object:object$2,boolean:bool$2}},smooth:{enabled:{boolean:bool$2},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:number$2},forceDirection:{string:["horizontal","vertical","none"],boolean:bool$2},__type__:{object:object$2,boolean:bool$2}},title:{string:string$2,undefined:"undefined"},width:{number:number$2},widthConstraint:{maximum:{number:number$2},__type__:{object:object$2,boolean:bool$2,number:number$2}},value:{number:number$2,undefined:"undefined"},__type__:{object:object$2}},groups:{useDefaultGroups:{boolean:bool$2},__any__:nodeOptions,__type__:{object:object$2}},interaction:{dragNodes:{boolean:bool$2},dragView:{boolean:bool$2},hideEdgesOnDrag:{boolean:bool$2},hideEdgesOnZoom:{boolean:bool$2},hideNodesOnDrag:{boolean:bool$2},hover:{boolean:bool$2},keyboard:{enabled:{boolean:bool$2},speed:{x:{number:number$2},y:{number:number$2},zoom:{number:number$2},__type__:{object:object$2}},bindToWindow:{boolean:bool$2},autoFocus:{boolean:bool$2},__type__:{object:object$2,boolean:bool$2}},multiselect:{boolean:bool$2},navigationButtons:{boolean:bool$2},selectable:{boolean:bool$2},selectConnectedEdges:{boolean:bool$2},hoverConnectedEdges:{boolean:bool$2},tooltipDelay:{number:number$2},zoomView:{boolean:bool$2},zoomSpeed:{number:number$2},__type__:{object:object$2}},layout:{randomSeed:{undefined:"undefined",number:number$2,string:string$2},improvedLayout:{boolean:bool$2},clusterThreshold:{number:number$2},hierarchical:{enabled:{boolean:bool$2},levelSeparation:{number:number$2},nodeSpacing:{number:number$2},treeSpacing:{number:number$2},blockShifting:{boolean:bool$2},edgeMinimization:{boolean:bool$2},parentCentralization:{boolean:bool$2},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:object$2,boolean:bool$2}},__type__:{object:object$2}},manipulation:{enabled:{boolean:bool$2},initiallyActive:{boolean:bool$2},addNode:{boolean:bool$2,function:"function"},addEdge:{boolean:bool$2,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:object$2,boolean:bool$2,function:"function"}},deleteNode:{boolean:bool$2,function:"function"},deleteEdge:{boolean:bool$2,function:"function"},controlNodeStyle:nodeOptions,__type__:{object:object$2,boolean:bool$2}},nodes:nodeOptions,physics:{enabled:{boolean:bool$2},barnesHut:{theta:{number:number$2},gravitationalConstant:{number:number$2},centralGravity:{number:number$2},springLength:{number:number$2},springConstant:{number:number$2},damping:{number:number$2},avoidOverlap:{number:number$2},__type__:{object:object$2}},forceAtlas2Based:{theta:{number:number$2},gravitationalConstant:{number:number$2},centralGravity:{number:number$2},springLength:{number:number$2},springConstant:{number:number$2},damping:{number:number$2},avoidOverlap:{number:number$2},__type__:{object:object$2}},repulsion:{centralGravity:{number:number$2},springLength:{number:number$2},springConstant:{number:number$2},nodeDistance:{number:number$2},damping:{number:number$2},__type__:{object:object$2}},hierarchicalRepulsion:{centralGravity:{number:number$2},springLength:{number:number$2},springConstant:{number:number$2},nodeDistance:{number:number$2},damping:{number:number$2},avoidOverlap:{number:number$2},__type__:{object:object$2}},maxVelocity:{number:number$2},minVelocity:{number:number$2},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:bool$2},iterations:{number:number$2},updateInterval:{number:number$2},onlyDynamicEdges:{boolean:bool$2},fit:{boolean:bool$2},__type__:{object:object$2,boolean:bool$2}},timestep:{number:number$2},adaptiveTimestep:{boolean:bool$2},wind:{x:{number:number$2},y:{number:number$2},__type__:{object:object$2}},__type__:{object:object$2,boolean:bool$2}},autoResize:{boolean:bool$2},clickToUse:{boolean:bool$2},locale:{string:string$2},locales:{__any__:{any:any$2},__type__:{object:object$2}},height:{string:string$2},width:{string:string$2},__type__:{object:object$2}},configureOptions$2={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},configuratorHideOption=function F(W,q,K){var X;return!!(_includesInstanceProperty$1(W).call(W,"physics")&&_includesInstanceProperty$1(X=configureOptions$2.physics.solver).call(X,q)&&K.physics.solver!==q&&q!=="wind")},FloydWarshall=function(){function F(){_classCallCheck$1(this,F)}return _createClass$1(F,[{key:"getDistances",value:function(q,K,X){for(var tt={},rt=q.edges,ot=0;ot2&&arguments[2]!==void 0?arguments[2]:!1,tt=this.distanceSolver.getDistances(this.body,q,K);this._createL_matrix(tt),this._createK_matrix(tt),this._createE_matrix();for(var rt=.01,ot=1,ut=0,yn=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),uo=5,po=1e9,mo=0,wo=0,lf=0,yf=0,cf=0;po>rt&&utot&&cf"u"&&documentAll$2!==void 0,documentAll_1={all:documentAll$2,IS_HTMLDDA},$documentAll$1=documentAll_1,documentAll$1=$documentAll$1.all,isCallable$i=$documentAll$1.IS_HTMLDDA?function(F){return typeof F=="function"||F===documentAll$1}:function(F){return typeof F=="function"},objectGetOwnPropertyDescriptor={},fails$t=fails$v,descriptors=!fails$t(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),NATIVE_BIND$2=functionBindNative,call$c=Function.prototype.call,functionCall=NATIVE_BIND$2?call$c.bind(call$c):function(){return call$c.apply(call$c,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable$2={}.propertyIsEnumerable,getOwnPropertyDescriptor$6=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$6&&!$propertyIsEnumerable$2.call({1:2},1);objectPropertyIsEnumerable.f=NASHORN_BUG?function F(W){var q=getOwnPropertyDescriptor$6(this,W);return!!q&&q.enumerable}:$propertyIsEnumerable$2;var createPropertyDescriptor$5=function(F,W){return{enumerable:!(F&1),configurable:!(F&2),writable:!(F&4),value:W}},uncurryThis$u=functionUncurryThis,fails$s=fails$v,classof$d=classofRaw$2,$Object$4=Object,split=uncurryThis$u("".split),indexedObject=fails$s(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(F){return classof$d(F)==="String"?split(F,""):$Object$4(F)}:$Object$4,isNullOrUndefined$5=function(F){return F==null},isNullOrUndefined$4=isNullOrUndefined$5,$TypeError$g=TypeError,requireObjectCoercible$6=function(F){if(isNullOrUndefined$4(F))throw new $TypeError$g("Can't call method on "+F);return F},IndexedObject$3=indexedObject,requireObjectCoercible$5=requireObjectCoercible$6,toIndexedObject$b=function(F){return IndexedObject$3(requireObjectCoercible$5(F))},isCallable$h=isCallable$i,$documentAll=documentAll_1,documentAll=$documentAll.all,isObject$g=$documentAll.IS_HTMLDDA?function(F){return typeof F=="object"?F!==null:isCallable$h(F)||F===documentAll}:function(F){return typeof F=="object"?F!==null:isCallable$h(F)},path$s={},path$r=path$s,global$k=global$l,isCallable$g=isCallable$i,aFunction=function(F){return isCallable$g(F)?F:void 0},getBuiltIn$c=function(F,W){return arguments.length<2?aFunction(path$r[F])||aFunction(global$k[F]):path$r[F]&&path$r[F][W]||global$k[F]&&global$k[F][W]},uncurryThis$t=functionUncurryThis,objectIsPrototypeOf=uncurryThis$t({}.isPrototypeOf),engineUserAgent=typeof navigator<"u"&&String(navigator.userAgent)||"",global$j=global$l,userAgent$2=engineUserAgent,process$1=global$j.process,Deno$1=global$j.Deno,versions=process$1&&process$1.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8,match,version;v8&&(match=v8.split("."),version=match[0]>0&&match[0]<4?1:+(match[0]+match[1]));!version&&userAgent$2&&(match=userAgent$2.match(/Edge\/(\d+)/),(!match||match[1]>=74)&&(match=userAgent$2.match(/Chrome\/(\d+)/),match&&(version=+match[1])));var engineV8Version=version,V8_VERSION$2=engineV8Version,fails$r=fails$v,global$i=global$l,$String$5=global$i.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$r(function(){var F=Symbol("symbol detection");return!$String$5(F)||!(Object(F)instanceof Symbol)||!Symbol.sham&&V8_VERSION$2&&V8_VERSION$2<41}),NATIVE_SYMBOL$5=symbolConstructorDetection,useSymbolAsUid=NATIVE_SYMBOL$5&&!Symbol.sham&&typeof Symbol.iterator=="symbol",getBuiltIn$b=getBuiltIn$c,isCallable$f=isCallable$i,isPrototypeOf$m=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$5=USE_SYMBOL_AS_UID$1?function(F){return typeof F=="symbol"}:function(F){var W=getBuiltIn$b("Symbol");return isCallable$f(W)&&isPrototypeOf$m(W.prototype,$Object$3(F))},$String$4=String,tryToString$6=function(F){try{return $String$4(F)}catch{return"Object"}},isCallable$e=isCallable$i,tryToString$5=tryToString$6,$TypeError$f=TypeError,aCallable$7=function(F){if(isCallable$e(F))return F;throw new $TypeError$f(tryToString$5(F)+" is not a function")},aCallable$6=aCallable$7,isNullOrUndefined$3=isNullOrUndefined$5,getMethod$3=function(F,W){var q=F[W];return isNullOrUndefined$3(q)?void 0:aCallable$6(q)},call$b=functionCall,isCallable$d=isCallable$i,isObject$f=isObject$g,$TypeError$e=TypeError,ordinaryToPrimitive$1=function(F,W){var q,K;if(W==="string"&&isCallable$d(q=F.toString)&&!isObject$f(K=call$b(q,F))||isCallable$d(q=F.valueOf)&&!isObject$f(K=call$b(q,F))||W!=="string"&&isCallable$d(q=F.toString)&&!isObject$f(K=call$b(q,F)))return K;throw new $TypeError$e("Can't convert object to primitive value")},shared$7={exports:{}},global$h=global$l,defineProperty$f=Object.defineProperty,defineGlobalProperty$1=function(F,W){try{defineProperty$f(global$h,F,{value:W,configurable:!0,writable:!0})}catch{global$h[F]=W}return W},global$g=global$l,defineGlobalProperty=defineGlobalProperty$1,SHARED="__core-js_shared__",store$3=global$g[SHARED]||defineGlobalProperty(SHARED,{}),sharedStore=store$3,store$2=sharedStore;(shared$7.exports=function(F,W){return store$2[F]||(store$2[F]=W!==void 0?W:{})})("versions",[]).push({version:"3.33.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedExports=shared$7.exports,requireObjectCoercible$4=requireObjectCoercible$6,$Object$2=Object,toObject$e=function(F){return $Object$2(requireObjectCoercible$4(F))},uncurryThis$s=functionUncurryThis,toObject$d=toObject$e,hasOwnProperty=uncurryThis$s({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function F(W,q){return hasOwnProperty(toObject$d(W),q)},uncurryThis$r=functionUncurryThis,id$1=0,postfix=Math.random(),toString$c=uncurryThis$r(1 .toString),uid$4=function(F){return"Symbol("+(F===void 0?"":F)+")_"+toString$c(++id$1+postfix,36)},global$f=global$l,shared$6=sharedExports,hasOwn$e=hasOwnProperty_1,uid$3=uid$4,NATIVE_SYMBOL$4=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$5=global$f.Symbol,WellKnownSymbolsStore$2=shared$6("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$5.for||Symbol$5:Symbol$5&&Symbol$5.withoutSetter||uid$3,wellKnownSymbol$m=function(F){return hasOwn$e(WellKnownSymbolsStore$2,F)||(WellKnownSymbolsStore$2[F]=NATIVE_SYMBOL$4&&hasOwn$e(Symbol$5,F)?Symbol$5[F]:createWellKnownSymbol("Symbol."+F)),WellKnownSymbolsStore$2[F]},call$a=functionCall,isObject$e=isObject$g,isSymbol$4=isSymbol$5,getMethod$2=getMethod$3,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$l=wellKnownSymbol$m,$TypeError$d=TypeError,TO_PRIMITIVE=wellKnownSymbol$l("toPrimitive"),toPrimitive$6=function(F,W){if(!isObject$e(F)||isSymbol$4(F))return F;var q=getMethod$2(F,TO_PRIMITIVE),K;if(q){if(W===void 0&&(W="default"),K=call$a(q,F,W),!isObject$e(K)||isSymbol$4(K))return K;throw new $TypeError$d("Can't convert object to primitive value")}return W===void 0&&(W="number"),ordinaryToPrimitive(F,W)},toPrimitive$5=toPrimitive$6,isSymbol$3=isSymbol$5,toPropertyKey$4=function(F){var W=toPrimitive$5(F,"string");return isSymbol$3(W)?W:W+""},global$e=global$l,isObject$d=isObject$g,document$1=global$e.document,EXISTS$1=isObject$d(document$1)&&isObject$d(document$1.createElement),documentCreateElement$1=function(F){return EXISTS$1?document$1.createElement(F):{}},DESCRIPTORS$i=descriptors,fails$q=fails$v,createElement=documentCreateElement$1,ie8DomDefine=!DESCRIPTORS$i&&!fails$q(function(){return Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a!==7}),DESCRIPTORS$h=descriptors,call$9=functionCall,propertyIsEnumerableModule$2=objectPropertyIsEnumerable,createPropertyDescriptor$4=createPropertyDescriptor$5,toIndexedObject$a=toIndexedObject$b,toPropertyKey$3=toPropertyKey$4,hasOwn$d=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor.f=DESCRIPTORS$h?$getOwnPropertyDescriptor$2:function F(W,q){if(W=toIndexedObject$a(W),q=toPropertyKey$3(q),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$2(W,q)}catch{}if(hasOwn$d(W,q))return createPropertyDescriptor$4(!call$9(propertyIsEnumerableModule$2.f,W,q),W[q])};var fails$p=fails$v,isCallable$c=isCallable$i,replacement=/#|\.prototype\./,isForced$1=function(F,W){var q=data[normalize(F)];return q===POLYFILL?!0:q===NATIVE?!1:isCallable$c(W)?fails$p(W):!!W},normalize=isForced$1.normalize=function(F){return String(F).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,uncurryThis$q=functionUncurryThisClause,aCallable$5=aCallable$7,NATIVE_BIND$1=functionBindNative,bind$e=uncurryThis$q(uncurryThis$q.bind),functionBindContext=function(F,W){return aCallable$5(F),W===void 0?F:NATIVE_BIND$1?bind$e(F,W):function(){return F.apply(W,arguments)}},objectDefineProperty={},DESCRIPTORS$g=descriptors,fails$o=fails$v,v8PrototypeDefineBug=DESCRIPTORS$g&&fails$o(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),isObject$c=isObject$g,$String$3=String,$TypeError$c=TypeError,anObject$b=function(F){if(isObject$c(F))return F;throw new $TypeError$c($String$3(F)+" is not an object")},DESCRIPTORS$f=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$a=anObject$b,toPropertyKey$2=toPropertyKey$4,$TypeError$b=TypeError,$defineProperty$1=Object.defineProperty,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable";objectDefineProperty.f=DESCRIPTORS$f?V8_PROTOTYPE_DEFINE_BUG$1?function F(W,q,K){if(anObject$a(W),q=toPropertyKey$2(q),anObject$a(K),typeof W=="function"&&q==="prototype"&&"value"in K&&WRITABLE in K&&!K[WRITABLE]){var X=$getOwnPropertyDescriptor$1(W,q);X&&X[WRITABLE]&&(W[q]=K.value,K={configurable:CONFIGURABLE$1 in K?K[CONFIGURABLE$1]:X[CONFIGURABLE$1],enumerable:ENUMERABLE in K?K[ENUMERABLE]:X[ENUMERABLE],writable:!1})}return $defineProperty$1(W,q,K)}:$defineProperty$1:function F(W,q,K){if(anObject$a(W),q=toPropertyKey$2(q),anObject$a(K),IE8_DOM_DEFINE)try{return $defineProperty$1(W,q,K)}catch{}if("get"in K||"set"in K)throw new $TypeError$b("Accessors not supported");return"value"in K&&(W[q]=K.value),W};var DESCRIPTORS$e=descriptors,definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$3=createPropertyDescriptor$5,createNonEnumerableProperty$6=DESCRIPTORS$e?function(F,W,q){return definePropertyModule$3.f(F,W,createPropertyDescriptor$3(1,q))}:function(F,W,q){return F[W]=q,F},global$d=global$l,apply$4=functionApply,uncurryThis$p=functionUncurryThisClause,isCallable$b=isCallable$i,getOwnPropertyDescriptor$5=objectGetOwnPropertyDescriptor.f,isForced=isForced_1,path$q=path$s,bind$d=functionBindContext,createNonEnumerableProperty$5=createNonEnumerableProperty$6,hasOwn$c=hasOwnProperty_1,wrapConstructor=function(F){var W=function(q,K,X){if(this instanceof W){switch(arguments.length){case 0:return new F;case 1:return new F(q);case 2:return new F(q,K)}return new F(q,K,X)}return apply$4(F,this,arguments)};return W.prototype=F.prototype,W},_export=function(F,W){var q=F.target,K=F.global,X=F.stat,tt=F.proto,rt=K?global$d:X?global$d[q]:(global$d[q]||{}).prototype,ot=K?path$q:path$q[q]||createNonEnumerableProperty$5(path$q,q,{})[q],ut=ot.prototype,yn,uo,po,mo,wo,lf,yf,cf,vf;for(mo in W)yn=isForced(K?mo:q+(X?".":"#")+mo,F.forced),uo=!yn&&rt&&hasOwn$c(rt,mo),lf=ot[mo],uo&&(F.dontCallGetSet?(vf=getOwnPropertyDescriptor$5(rt,mo),yf=vf&&vf.value):yf=rt[mo]),wo=uo&&yf?yf:W[mo],!(uo&&typeof lf==typeof wo)&&(F.bind&&uo?cf=bind$d(wo,global$d):F.wrap&&uo?cf=wrapConstructor(wo):tt&&isCallable$b(wo)?cf=uncurryThis$p(wo):cf=wo,(F.sham||wo&&wo.sham||lf&&lf.sham)&&createNonEnumerableProperty$5(cf,"sham",!0),createNonEnumerableProperty$5(ot,mo,cf),tt&&(po=q+"Prototype",hasOwn$c(path$q,po)||createNonEnumerableProperty$5(path$q,po,{}),createNonEnumerableProperty$5(path$q[po],mo,wo),F.real&&ut&&(yn||!ut[mo])&&createNonEnumerableProperty$5(ut,mo,wo)))},uncurryThis$o=functionUncurryThis,arraySlice$5=uncurryThis$o([].slice),uncurryThis$n=functionUncurryThis,aCallable$4=aCallable$7,isObject$b=isObject$g,hasOwn$b=hasOwnProperty_1,arraySlice$4=arraySlice$5,NATIVE_BIND=functionBindNative,$Function=Function,concat$6=uncurryThis$n([].concat),join=uncurryThis$n([].join),factories={},construct$4=function(F,W,q){if(!hasOwn$b(factories,W)){for(var K=[],X=0;X0?floor$1:ceil)(q)},trunc=mathTrunc,toIntegerOrInfinity$5=function(F){var W=+F;return W!==W||W===0?0:trunc(W)},toIntegerOrInfinity$4=toIntegerOrInfinity$5,max$3=Math.max,min$2=Math.min,toAbsoluteIndex$5=function(F,W){var q=toIntegerOrInfinity$4(F);return q<0?max$3(q+W,0):min$2(q,W)},toIntegerOrInfinity$3=toIntegerOrInfinity$5,min$1=Math.min,toLength$1=function(F){return F>0?min$1(toIntegerOrInfinity$3(F),9007199254740991):0},toLength=toLength$1,lengthOfArrayLike$c=function(F){return toLength(F.length)},toIndexedObject$9=toIndexedObject$b,toAbsoluteIndex$4=toAbsoluteIndex$5,lengthOfArrayLike$b=lengthOfArrayLike$c,createMethod$5=function(F){return function(W,q,K){var X=toIndexedObject$9(W),tt=lengthOfArrayLike$b(X),rt=toAbsoluteIndex$4(K,tt),ot;if(F&&q!==q){for(;tt>rt;)if(ot=X[rt++],ot!==ot)return!0}else for(;tt>rt;rt++)if((F||rt in X)&&X[rt]===q)return F||rt||0;return!F&&-1}},arrayIncludes={includes:createMethod$5(!0),indexOf:createMethod$5(!1)},hiddenKeys$6={},uncurryThis$k=functionUncurryThis,hasOwn$a=hasOwnProperty_1,toIndexedObject$8=toIndexedObject$b,indexOf$4=arrayIncludes.indexOf,hiddenKeys$5=hiddenKeys$6,push$c=uncurryThis$k([].push),objectKeysInternal=function(F,W){var q=toIndexedObject$8(F),K=0,X=[],tt;for(tt in q)!hasOwn$a(hiddenKeys$5,tt)&&hasOwn$a(q,tt)&&push$c(X,tt);for(;W.length>K;)hasOwn$a(q,tt=W[K++])&&(~indexOf$4(X,tt)||push$c(X,tt));return X},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,objectKeys$4=Object.keys||function F(W){return internalObjectKeys$1(W,enumBugKeys$2)},DESCRIPTORS$d=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$2=objectDefineProperty,anObject$9=anObject$b,toIndexedObject$7=toIndexedObject$b,objectKeys$3=objectKeys$4;objectDefineProperties.f=DESCRIPTORS$d&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function F(W,q){anObject$9(W);for(var K=toIndexedObject$7(q),X=objectKeys$3(q),tt=X.length,rt=0,ot;tt>rt;)definePropertyModule$2.f(W,ot=X[rt++],K[ot]);return W};var getBuiltIn$9=getBuiltIn$c,html$1=getBuiltIn$9("document","documentElement"),shared$5=sharedExports,uid$2=uid$4,keys$3=shared$5("keys"),sharedKey$4=function(F){return keys$3[F]||(keys$3[F]=uid$2(F))},anObject$8=anObject$b,definePropertiesModule$1=objectDefineProperties,enumBugKeys$1=enumBugKeys$3,hiddenKeys$4=hiddenKeys$6,html=html$1,documentCreateElement=documentCreateElement$1,sharedKey$3=sharedKey$4,GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(F){return LT+SCRIPT+GT+F+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(F){F.write(scriptTag("")),F.close();var W=F.parentWindow.Object;return F=null,W},NullProtoObjectViaIFrame=function(){var F=documentCreateElement("iframe"),W="java"+SCRIPT+":",q;return F.style.display="none",html.appendChild(F),F.src=String(W),q=F.contentWindow.document,q.open(),q.write(scriptTag("document.F=Object")),q.close(),q.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch{}NullProtoObject=typeof document<"u"?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var F=enumBugKeys$1.length;F--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys$1[F]];return NullProtoObject()};hiddenKeys$4[IE_PROTO$1]=!0;var objectCreate=Object.create||function F(W,q){var K;return W!==null?(EmptyConstructor[PROTOTYPE$1]=anObject$8(W),K=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,K[IE_PROTO$1]=W):K=NullProtoObject(),q===void 0?K:definePropertiesModule$1.f(K,q)},$$P=_export,getBuiltIn$8=getBuiltIn$c,apply$3=functionApply,bind$c=functionBind,aConstructor=aConstructor$1,anObject$7=anObject$b,isObject$a=isObject$g,create$a=objectCreate,fails$m=fails$v,nativeConstruct=getBuiltIn$8("Reflect","construct"),ObjectPrototype$2=Object.prototype,push$b=[].push,NEW_TARGET_BUG=fails$m(function(){function F(){}return!(nativeConstruct(function(){},[],F)instanceof F)}),ARGS_BUG=!fails$m(function(){nativeConstruct(function(){})}),FORCED$9=NEW_TARGET_BUG||ARGS_BUG;$$P({target:"Reflect",stat:!0,forced:FORCED$9,sham:FORCED$9},{construct:function F(W,q){aConstructor(W),anObject$7(q);var K=arguments.length<3?W:aConstructor(arguments[2]);if(ARGS_BUG&&!NEW_TARGET_BUG)return nativeConstruct(W,q,K);if(W===K){switch(q.length){case 0:return new W;case 1:return new W(q[0]);case 2:return new W(q[0],q[1]);case 3:return new W(q[0],q[1],q[2]);case 4:return new W(q[0],q[1],q[2],q[3])}var X=[null];return apply$3(push$b,X,q),new(apply$3(bind$c,W,X))}var tt=K.prototype,rt=create$a(isObject$a(tt)?tt:ObjectPrototype$2),ot=apply$3(W,rt,q);return isObject$a(ot)?ot:rt}});var path$p=path$s,construct$2=path$p.Reflect.construct,parent$15=construct$2,construct$1=parent$15,construct=construct$1,_Reflect$construct=getDefaultExportFromCjs(construct);function _classCallCheck(F,W){if(!(F instanceof W))throw new TypeError("Cannot call a class as a function")}var defineProperty$e={exports:{}},$$O=_export,DESCRIPTORS$c=descriptors,defineProperty$d=objectDefineProperty.f;$$O({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$d,sham:!DESCRIPTORS$c},{defineProperty:defineProperty$d});var path$o=path$s,Object$4=path$o.Object,defineProperty$c=defineProperty$e.exports=function F(W,q,K){return Object$4.defineProperty(W,q,K)};Object$4.defineProperty.sham&&(defineProperty$c.sham=!0);var definePropertyExports=defineProperty$e.exports,parent$14=definePropertyExports,defineProperty$b=parent$14,parent$13=defineProperty$b,defineProperty$a=parent$13,parent$12=defineProperty$a,defineProperty$9=parent$12,defineProperty$8=defineProperty$9,_Object$defineProperty$1=getDefaultExportFromCjs(defineProperty$8),classof$a=classofRaw$2,isArray$d=Array.isArray||function F(W){return classof$a(W)==="Array"},$TypeError$9=TypeError,MAX_SAFE_INTEGER=9007199254740991,doesNotExceedSafeInteger$3=function(F){if(F>MAX_SAFE_INTEGER)throw $TypeError$9("Maximum allowed index exceeded");return F},toPropertyKey$1=toPropertyKey$4,definePropertyModule$1=objectDefineProperty,createPropertyDescriptor$2=createPropertyDescriptor$5,createProperty$6=function(F,W,q){var K=toPropertyKey$1(W);K in F?definePropertyModule$1.f(F,K,createPropertyDescriptor$2(0,q)):F[K]=q},isArray$c=isArray$d,isConstructor$2=isConstructor$4,isObject$9=isObject$g,wellKnownSymbol$i=wellKnownSymbol$m,SPECIES$3=wellKnownSymbol$i("species"),$Array$3=Array,arraySpeciesConstructor$1=function(F){var W;return isArray$c(F)&&(W=F.constructor,isConstructor$2(W)&&(W===$Array$3||isArray$c(W.prototype))?W=void 0:isObject$9(W)&&(W=W[SPECIES$3],W===null&&(W=void 0))),W===void 0?$Array$3:W},arraySpeciesConstructor=arraySpeciesConstructor$1,arraySpeciesCreate$3=function(F,W){return new(arraySpeciesConstructor(F))(W===0?0:W)},fails$l=fails$v,wellKnownSymbol$h=wellKnownSymbol$m,V8_VERSION$1=engineV8Version,SPECIES$2=wellKnownSymbol$h("species"),arrayMethodHasSpeciesSupport$5=function(F){return V8_VERSION$1>=51||!fails$l(function(){var W=[],q=W.constructor={};return q[SPECIES$2]=function(){return{foo:1}},W[F](Boolean).foo!==1})},$$N=_export,fails$k=fails$v,isArray$b=isArray$d,isObject$8=isObject$g,toObject$c=toObject$e,lengthOfArrayLike$a=lengthOfArrayLike$c,doesNotExceedSafeInteger$2=doesNotExceedSafeInteger$3,createProperty$5=createProperty$6,arraySpeciesCreate$2=arraySpeciesCreate$3,arrayMethodHasSpeciesSupport$4=arrayMethodHasSpeciesSupport$5,wellKnownSymbol$g=wellKnownSymbol$m,V8_VERSION=engineV8Version,IS_CONCAT_SPREADABLE=wellKnownSymbol$g("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT=V8_VERSION>=51||!fails$k(function(){var F=[];return F[IS_CONCAT_SPREADABLE]=!1,F.concat()[0]!==F}),isConcatSpreadable=function(F){if(!isObject$8(F))return!1;var W=F[IS_CONCAT_SPREADABLE];return W!==void 0?!!W:isArray$b(F)},FORCED$8=!IS_CONCAT_SPREADABLE_SUPPORT||!arrayMethodHasSpeciesSupport$4("concat");$$N({target:"Array",proto:!0,arity:1,forced:FORCED$8},{concat:function F(W){var q=toObject$c(this),K=arraySpeciesCreate$2(q,0),X=0,tt,rt,ot,ut,yn;for(tt=-1,ot=arguments.length;ttcf;cf++)if((ot||cf in wo)&&($f=wo[cf],wf=lf($f,cf,mo),F))if(W)_f[cf]=wf;else if(wf)switch(F){case 3:return!0;case 5:return $f;case 6:return cf;case 2:push$a(_f,$f)}else switch(F){case 4:return!1;case 7:push$a(_f,$f)}return tt?-1:K||X?X:_f}},arrayIteration={forEach:createMethod$4(0),map:createMethod$4(1),filter:createMethod$4(2),some:createMethod$4(3),every:createMethod$4(4),find:createMethod$4(5),findIndex:createMethod$4(6),filterReject:createMethod$4(7)},$$M=_export,global$a=global$l,call$7=functionCall,uncurryThis$i=functionUncurryThis,DESCRIPTORS$b=descriptors,NATIVE_SYMBOL$3=symbolConstructorDetection,fails$j=fails$v,hasOwn$6=hasOwnProperty_1,isPrototypeOf$l=objectIsPrototypeOf,anObject$6=anObject$b,toIndexedObject$5=toIndexedObject$b,toPropertyKey=toPropertyKey$4,$toString=toString$b,createPropertyDescriptor$1=createPropertyDescriptor$5,nativeObjectCreate=objectCreate,objectKeys$2=objectKeys$4,getOwnPropertyNamesModule$2=objectGetOwnPropertyNames,getOwnPropertyNamesExternal=objectGetOwnPropertyNamesExternal,getOwnPropertySymbolsModule$3=objectGetOwnPropertySymbols,getOwnPropertyDescriptorModule$1=objectGetOwnPropertyDescriptor,definePropertyModule=objectDefineProperty,definePropertiesModule=objectDefineProperties,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,defineBuiltIn$3=defineBuiltIn$5,defineBuiltInAccessor$2=defineBuiltInAccessor$3,shared$3=sharedExports,sharedKey$1=sharedKey$4,hiddenKeys$1=hiddenKeys$6,uid$1=uid$4,wellKnownSymbol$c=wellKnownSymbol$m,wrappedWellKnownSymbolModule=wellKnownSymbolWrapped,defineWellKnownSymbol$l=wellKnownSymbolDefine,defineSymbolToPrimitive$1=symbolDefineToPrimitive,setToStringTag$5=setToStringTag$6,InternalStateModule$4=internalState,$forEach$1=arrayIteration.forEach,HIDDEN=sharedKey$1("hidden"),SYMBOL="Symbol",PROTOTYPE="prototype",setInternalState$4=InternalStateModule$4.set,getInternalState$2=InternalStateModule$4.getterFor(SYMBOL),ObjectPrototype$1=Object[PROTOTYPE],$Symbol=global$a.Symbol,SymbolPrototype=$Symbol&&$Symbol[PROTOTYPE],RangeError$1=global$a.RangeError,TypeError$1=global$a.TypeError,QObject=global$a.QObject,nativeGetOwnPropertyDescriptor$1=getOwnPropertyDescriptorModule$1.f,nativeDefineProperty=definePropertyModule.f,nativeGetOwnPropertyNames=getOwnPropertyNamesExternal.f,nativePropertyIsEnumerable=propertyIsEnumerableModule$1.f,push$9=uncurryThis$i([].push),AllSymbols=shared$3("symbols"),ObjectPrototypeSymbols=shared$3("op-symbols"),WellKnownSymbolsStore$1=shared$3("wks"),USE_SETTER=!QObject||!QObject[PROTOTYPE]||!QObject[PROTOTYPE].findChild,fallbackDefineProperty=function(F,W,q){var K=nativeGetOwnPropertyDescriptor$1(ObjectPrototype$1,W);K&&delete ObjectPrototype$1[W],nativeDefineProperty(F,W,q),K&&F!==ObjectPrototype$1&&nativeDefineProperty(ObjectPrototype$1,W,K)},setSymbolDescriptor=DESCRIPTORS$b&&fails$j(function(){return nativeObjectCreate(nativeDefineProperty({},"a",{get:function(){return nativeDefineProperty(this,"a",{value:7}).a}})).a!==7})?fallbackDefineProperty:nativeDefineProperty,wrap=function(F,W){var q=AllSymbols[F]=nativeObjectCreate(SymbolPrototype);return setInternalState$4(q,{type:SYMBOL,tag:F,description:W}),DESCRIPTORS$b||(q.description=W),q},$defineProperty=function F(W,q,K){W===ObjectPrototype$1&&$defineProperty(ObjectPrototypeSymbols,q,K),anObject$6(W);var X=toPropertyKey(q);return anObject$6(K),hasOwn$6(AllSymbols,X)?(K.enumerable?(hasOwn$6(W,HIDDEN)&&W[HIDDEN][X]&&(W[HIDDEN][X]=!1),K=nativeObjectCreate(K,{enumerable:createPropertyDescriptor$1(0,!1)})):(hasOwn$6(W,HIDDEN)||nativeDefineProperty(W,HIDDEN,createPropertyDescriptor$1(1,{})),W[HIDDEN][X]=!0),setSymbolDescriptor(W,X,K)):nativeDefineProperty(W,X,K)},$defineProperties=function F(W,q){anObject$6(W);var K=toIndexedObject$5(q),X=objectKeys$2(K).concat($getOwnPropertySymbols(K));return $forEach$1(X,function(tt){(!DESCRIPTORS$b||call$7($propertyIsEnumerable$1,K,tt))&&$defineProperty(W,tt,K[tt])}),W},$create=function F(W,q){return q===void 0?nativeObjectCreate(W):$defineProperties(nativeObjectCreate(W),q)},$propertyIsEnumerable$1=function F(W){var q=toPropertyKey(W),K=call$7(nativePropertyIsEnumerable,this,q);return this===ObjectPrototype$1&&hasOwn$6(AllSymbols,q)&&!hasOwn$6(ObjectPrototypeSymbols,q)?!1:K||!hasOwn$6(this,q)||!hasOwn$6(AllSymbols,q)||hasOwn$6(this,HIDDEN)&&this[HIDDEN][q]?K:!0},$getOwnPropertyDescriptor=function F(W,q){var K=toIndexedObject$5(W),X=toPropertyKey(q);if(!(K===ObjectPrototype$1&&hasOwn$6(AllSymbols,X)&&!hasOwn$6(ObjectPrototypeSymbols,X))){var tt=nativeGetOwnPropertyDescriptor$1(K,X);return tt&&hasOwn$6(AllSymbols,X)&&!(hasOwn$6(K,HIDDEN)&&K[HIDDEN][X])&&(tt.enumerable=!0),tt}},$getOwnPropertyNames=function F(W){var q=nativeGetOwnPropertyNames(toIndexedObject$5(W)),K=[];return $forEach$1(q,function(X){!hasOwn$6(AllSymbols,X)&&!hasOwn$6(hiddenKeys$1,X)&&push$9(K,X)}),K},$getOwnPropertySymbols=function(F){var W=F===ObjectPrototype$1,q=nativeGetOwnPropertyNames(W?ObjectPrototypeSymbols:toIndexedObject$5(F)),K=[];return $forEach$1(q,function(X){hasOwn$6(AllSymbols,X)&&(!W||hasOwn$6(ObjectPrototype$1,X))&&push$9(K,AllSymbols[X])}),K};NATIVE_SYMBOL$3||($Symbol=function(){if(isPrototypeOf$l(SymbolPrototype,this))throw new TypeError$1("Symbol is not a constructor");var W=!arguments.length||arguments[0]===void 0?void 0:$toString(arguments[0]),q=uid$1(W),K=function(X){this===ObjectPrototype$1&&call$7(K,ObjectPrototypeSymbols,X),hasOwn$6(this,HIDDEN)&&hasOwn$6(this[HIDDEN],q)&&(this[HIDDEN][q]=!1);var tt=createPropertyDescriptor$1(1,X);try{setSymbolDescriptor(this,q,tt)}catch(rt){if(!(rt instanceof RangeError$1))throw rt;fallbackDefineProperty(this,q,tt)}};return DESCRIPTORS$b&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype$1,q,{configurable:!0,set:K}),wrap(q,W)},SymbolPrototype=$Symbol[PROTOTYPE],defineBuiltIn$3(SymbolPrototype,"toString",function(){return getInternalState$2(this).tag}),defineBuiltIn$3($Symbol,"withoutSetter",function(F){return wrap(uid$1(F),F)}),propertyIsEnumerableModule$1.f=$propertyIsEnumerable$1,definePropertyModule.f=$defineProperty,definePropertiesModule.f=$defineProperties,getOwnPropertyDescriptorModule$1.f=$getOwnPropertyDescriptor,getOwnPropertyNamesModule$2.f=getOwnPropertyNamesExternal.f=$getOwnPropertyNames,getOwnPropertySymbolsModule$3.f=$getOwnPropertySymbols,wrappedWellKnownSymbolModule.f=function(F){return wrap(wellKnownSymbol$c(F),F)},DESCRIPTORS$b&&defineBuiltInAccessor$2(SymbolPrototype,"description",{configurable:!0,get:function(){return getInternalState$2(this).description}}));$$M({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$3,sham:!NATIVE_SYMBOL$3},{Symbol:$Symbol});$forEach$1(objectKeys$2(WellKnownSymbolsStore$1),function(F){defineWellKnownSymbol$l(F)});$$M({target:SYMBOL,stat:!0,forced:!NATIVE_SYMBOL$3},{useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}});$$M({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3,sham:!DESCRIPTORS$b},{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor});$$M({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3},{getOwnPropertyNames:$getOwnPropertyNames});defineSymbolToPrimitive$1();setToStringTag$5($Symbol,SYMBOL);hiddenKeys$1[HIDDEN]=!0;var NATIVE_SYMBOL$2=symbolConstructorDetection,symbolRegistryDetection=NATIVE_SYMBOL$2&&!!Symbol.for&&!!Symbol.keyFor,$$L=_export,getBuiltIn$6=getBuiltIn$c,hasOwn$5=hasOwnProperty_1,toString$9=toString$b,shared$2=sharedExports,NATIVE_SYMBOL_REGISTRY$1=symbolRegistryDetection,StringToSymbolRegistry=shared$2("string-to-symbol-registry"),SymbolToStringRegistry$1=shared$2("symbol-to-string-registry");$$L({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$1},{for:function(F){var W=toString$9(F);if(hasOwn$5(StringToSymbolRegistry,W))return StringToSymbolRegistry[W];var q=getBuiltIn$6("Symbol")(W);return StringToSymbolRegistry[W]=q,SymbolToStringRegistry$1[q]=W,q}});var $$K=_export,hasOwn$4=hasOwnProperty_1,isSymbol$2=isSymbol$5,tryToString$3=tryToString$6,shared$1=sharedExports,NATIVE_SYMBOL_REGISTRY=symbolRegistryDetection,SymbolToStringRegistry=shared$1("symbol-to-string-registry");$$K({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY},{keyFor:function F(W){if(!isSymbol$2(W))throw new TypeError(tryToString$3(W)+" is not a symbol");if(hasOwn$4(SymbolToStringRegistry,W))return SymbolToStringRegistry[W]}});var uncurryThis$h=functionUncurryThis,isArray$a=isArray$d,isCallable$6=isCallable$i,classof$6=classofRaw$2,toString$8=toString$b,push$8=uncurryThis$h([].push),getJsonReplacerFunction=function(F){if(isCallable$6(F))return F;if(isArray$a(F)){for(var W=F.length,q=[],K=0;K=W.length)return F.target=void 0,createIterResultObject$2(void 0,!0);switch(q){case"keys":return createIterResultObject$2(K,!1);case"values":return createIterResultObject$2(W[K],!1)}return createIterResultObject$2([K,W[K]],!1)},"values");Iterators$3.Arguments=Iterators$3.Array;var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},DOMIterables$1=domIterables,global$8=global$l,classof$5=classof$c,createNonEnumerableProperty$1=createNonEnumerableProperty$6,Iterators$2=iterators,wellKnownSymbol$9=wellKnownSymbol$m,TO_STRING_TAG=wellKnownSymbol$9("toStringTag");for(var COLLECTION_NAME in DOMIterables$1){var Collection=global$8[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;CollectionPrototype&&classof$5(CollectionPrototype)!==TO_STRING_TAG&&createNonEnumerableProperty$1(CollectionPrototype,TO_STRING_TAG,COLLECTION_NAME),Iterators$2[COLLECTION_NAME]=Iterators$2.Array}var parent$11=symbol$5,symbol$4=parent$11,wellKnownSymbol$8=wellKnownSymbol$m,defineProperty$4=objectDefineProperty.f,METADATA$1=wellKnownSymbol$8("metadata"),FunctionPrototype$1=Function.prototype;FunctionPrototype$1[METADATA$1]===void 0&&defineProperty$4(FunctionPrototype$1,METADATA$1,{value:null});var defineWellKnownSymbol$7=wellKnownSymbolDefine;defineWellKnownSymbol$7("asyncDispose");var defineWellKnownSymbol$6=wellKnownSymbolDefine;defineWellKnownSymbol$6("dispose");var defineWellKnownSymbol$5=wellKnownSymbolDefine;defineWellKnownSymbol$5("metadata");var parent$10=symbol$4,symbol$3=parent$10,getBuiltIn$3=getBuiltIn$c,uncurryThis$e=functionUncurryThis,Symbol$4=getBuiltIn$3("Symbol"),keyFor=Symbol$4.keyFor,thisSymbolValue$1=uncurryThis$e(Symbol$4.prototype.valueOf),symbolIsRegistered=Symbol$4.isRegisteredSymbol||function F(W){try{return keyFor(thisSymbolValue$1(W))!==void 0}catch{return!1}},$$G=_export,isRegisteredSymbol$1=symbolIsRegistered;$$G({target:"Symbol",stat:!0},{isRegisteredSymbol:isRegisteredSymbol$1});var shared=sharedExports,getBuiltIn$2=getBuiltIn$c,uncurryThis$d=functionUncurryThis,isSymbol=isSymbol$5,wellKnownSymbol$7=wellKnownSymbol$m,Symbol$3=getBuiltIn$2("Symbol"),$isWellKnownSymbol=Symbol$3.isWellKnownSymbol,getOwnPropertyNames=getBuiltIn$2("Object","getOwnPropertyNames"),thisSymbolValue=uncurryThis$d(Symbol$3.prototype.valueOf),WellKnownSymbolsStore=shared("wks");for(var i$1=0,symbolKeys=getOwnPropertyNames(Symbol$3),symbolKeysLength=symbolKeys.length;i$1=tt?F?"":void 0:(rt=charCodeAt(K,X),rt<55296||rt>56319||X+1===tt||(ot=charCodeAt(K,X+1))<56320||ot>57343?F?charAt$2(K,X):rt:F?stringSlice(K,X,X+2):(rt-55296<<10)+(ot-56320)+65536)}},stringMultibyte={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},charAt$1=stringMultibyte.charAt,toString$6=toString$b,InternalStateModule$2=internalState,defineIterator$1=iteratorDefine,createIterResultObject$1=createIterResultObject$3,STRING_ITERATOR="String Iterator",setInternalState$2=InternalStateModule$2.set,getInternalState=InternalStateModule$2.getterFor(STRING_ITERATOR);defineIterator$1(String,"String",function(F){setInternalState$2(this,{type:STRING_ITERATOR,string:toString$6(F),index:0})},function F(){var W=getInternalState(this),q=W.string,K=W.index,X;return K>=q.length?createIterResultObject$1(void 0,!0):(X=charAt$1(q,K),W.index+=X.length,createIterResultObject$1(X,!1))});var WrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,iterator$4=WrappedWellKnownSymbolModule$1.f("iterator"),parent$_=iterator$4,iterator$3=parent$_,parent$Z=iterator$3,iterator$2=parent$Z,parent$Y=iterator$2,iterator$1=parent$Y,iterator=iterator$1,_Symbol$iterator=getDefaultExportFromCjs(iterator);function _typeof(F){"@babel/helpers - typeof";return _typeof=typeof _Symbol$1=="function"&&typeof _Symbol$iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof _Symbol$1=="function"&&W.constructor===_Symbol$1&&W!==_Symbol$1.prototype?"symbol":typeof W},_typeof(F)}var WrappedWellKnownSymbolModule=wellKnownSymbolWrapped,toPrimitive$4=WrappedWellKnownSymbolModule.f("toPrimitive"),parent$X=toPrimitive$4,toPrimitive$3=parent$X,parent$W=toPrimitive$3,toPrimitive$2=parent$W,parent$V=toPrimitive$2,toPrimitive$1=parent$V,toPrimitive=toPrimitive$1,_Symbol$toPrimitive=getDefaultExportFromCjs(toPrimitive);function _toPrimitive(F,W){if(_typeof(F)!=="object"||F===null)return F;var q=F[_Symbol$toPrimitive];if(q!==void 0){var K=q.call(F,W||"default");if(_typeof(K)!=="object")return K;throw new TypeError("@@toPrimitive must return a primitive value.")}return(W==="string"?String:Number)(F)}function _toPropertyKey(F){var W=_toPrimitive(F,"string");return _typeof(W)==="symbol"?W:String(W)}function _defineProperties(F,W){for(var q=0;qq,rt=isCallable$1(K)?K:Function$1(K),ot=tt?arraySlice$1(arguments,q):[],ut=tt?function(){apply$1(rt,this,ot)}:rt;return W?F(ut,X):F(ut)}:F},$$x=_export,global$6=global$l,schedulersFix$1=schedulersFix$2,setInterval$2=schedulersFix$1(global$6.setInterval,!0);$$x({global:!0,bind:!0,forced:global$6.setInterval!==setInterval$2},{setInterval:setInterval$2});var $$w=_export,global$5=global$l,schedulersFix=schedulersFix$2,setTimeout$3=schedulersFix(global$5.setTimeout,!0);$$w({global:!0,bind:!0,forced:global$5.setTimeout!==setTimeout$3},{setTimeout:setTimeout$3});var path$g=path$s,setTimeout$2=path$g.setTimeout,setTimeout$1=setTimeout$2,_setTimeout=getDefaultExportFromCjs(setTimeout$1),fails$d=fails$v,arrayMethodIsStrict$6=function(F,W){var q=[][F];return!!q&&fails$d(function(){q.call(null,W||function(){return 1},1)})},$forEach=arrayIteration.forEach,arrayMethodIsStrict$5=arrayMethodIsStrict$6,STRICT_METHOD$3=arrayMethodIsStrict$5("forEach"),arrayForEach=STRICT_METHOD$3?[].forEach:function F(W){return $forEach(this,W,arguments.length>1?arguments[1]:void 0)},$$v=_export,forEach$6=arrayForEach;$$v({target:"Array",proto:!0,forced:[].forEach!==forEach$6},{forEach:forEach$6});var entryVirtual$i=entryVirtual$k,forEach$5=entryVirtual$i("Array").forEach,parent$H=forEach$5,forEach$4=parent$H,classof$4=classof$c,hasOwn$1=hasOwnProperty_1,isPrototypeOf$j=objectIsPrototypeOf,method$g=forEach$4,ArrayPrototype$h=Array.prototype,DOMIterables={DOMTokenList:!0,NodeList:!0},forEach$3=function(F){var W=F.forEach;return F===ArrayPrototype$h||isPrototypeOf$j(ArrayPrototype$h,F)&&W===ArrayPrototype$h.forEach||hasOwn$1(DOMIterables,classof$4(F))?method$g:W},forEach$2=forEach$3,_forEachInstanceProperty=getDefaultExportFromCjs(forEach$2),moment$2=typeof window<"u"&&window.moment||hooks,moment$3=getDefaultExportFromCjs(moment$2),path$f=path$s,getOwnPropertySymbols$2=path$f.Object.getOwnPropertySymbols,parent$G=getOwnPropertySymbols$2,getOwnPropertySymbols$1=parent$G,getOwnPropertySymbols=getOwnPropertySymbols$1,_Object$getOwnPropertySymbols=getDefaultExportFromCjs(getOwnPropertySymbols),$$u=_export,$filter=arrayIteration.filter,arrayMethodHasSpeciesSupport$3=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$3=arrayMethodHasSpeciesSupport$3("filter");$$u({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$3},{filter:function F(W){return $filter(this,W,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$h=entryVirtual$k,filter$3=entryVirtual$h("Array").filter,isPrototypeOf$i=objectIsPrototypeOf,method$f=filter$3,ArrayPrototype$g=Array.prototype,filter$2=function(F){var W=F.filter;return F===ArrayPrototype$g||isPrototypeOf$i(ArrayPrototype$g,F)&&W===ArrayPrototype$g.filter?method$f:W},parent$F=filter$2,filter$1=parent$F,filter=filter$1,_filterInstanceProperty=getDefaultExportFromCjs(filter),getOwnPropertyDescriptor$4={exports:{}},$$t=_export,fails$c=fails$v,toIndexedObject$3=toIndexedObject$b,nativeGetOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,DESCRIPTORS$8=descriptors,FORCED$6=!DESCRIPTORS$8||fails$c(function(){nativeGetOwnPropertyDescriptor(1)});$$t({target:"Object",stat:!0,forced:FORCED$6,sham:!DESCRIPTORS$8},{getOwnPropertyDescriptor:function F(W,q){return nativeGetOwnPropertyDescriptor(toIndexedObject$3(W),q)}});var path$e=path$s,Object$2=path$e.Object,getOwnPropertyDescriptor$3=getOwnPropertyDescriptor$4.exports=function F(W,q){return Object$2.getOwnPropertyDescriptor(W,q)};Object$2.getOwnPropertyDescriptor.sham&&(getOwnPropertyDescriptor$3.sham=!0);var getOwnPropertyDescriptorExports=getOwnPropertyDescriptor$4.exports,parent$E=getOwnPropertyDescriptorExports,getOwnPropertyDescriptor$2=parent$E,getOwnPropertyDescriptor$1=getOwnPropertyDescriptor$2,_Object$getOwnPropertyDescriptor=getDefaultExportFromCjs(getOwnPropertyDescriptor$1),getBuiltIn$1=getBuiltIn$c,uncurryThis$b=functionUncurryThis,getOwnPropertyNamesModule$1=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$4=anObject$b,concat$5=uncurryThis$b([].concat),ownKeys$6=getBuiltIn$1("Reflect","ownKeys")||function F(W){var q=getOwnPropertyNamesModule$1.f(anObject$4(W)),K=getOwnPropertySymbolsModule$1.f;return K?concat$5(q,K(W)):q},$$s=_export,DESCRIPTORS$7=descriptors,ownKeys$5=ownKeys$6,toIndexedObject$2=toIndexedObject$b,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,createProperty$3=createProperty$6;$$s({target:"Object",stat:!0,sham:!DESCRIPTORS$7},{getOwnPropertyDescriptors:function F(W){for(var q=toIndexedObject$2(W),K=getOwnPropertyDescriptorModule.f,X=ownKeys$5(q),tt={},rt=0,ot,ut;X.length>rt;)ut=K(q,ot=X[rt++]),ut!==void 0&&createProperty$3(tt,ot,ut);return tt}});var path$d=path$s,getOwnPropertyDescriptors$2=path$d.Object.getOwnPropertyDescriptors,parent$D=getOwnPropertyDescriptors$2,getOwnPropertyDescriptors$1=parent$D,getOwnPropertyDescriptors=getOwnPropertyDescriptors$1,_Object$getOwnPropertyDescriptors=getDefaultExportFromCjs(getOwnPropertyDescriptors),defineProperties$4={exports:{}},$$r=_export,DESCRIPTORS$6=descriptors,defineProperties$3=objectDefineProperties.f;$$r({target:"Object",stat:!0,forced:Object.defineProperties!==defineProperties$3,sham:!DESCRIPTORS$6},{defineProperties:defineProperties$3});var path$c=path$s,Object$1=path$c.Object,defineProperties$2=defineProperties$4.exports=function F(W,q){return Object$1.defineProperties(W,q)};Object$1.defineProperties.sham&&(defineProperties$2.sham=!0);var definePropertiesExports=defineProperties$4.exports,parent$C=definePropertiesExports,defineProperties$1=parent$C,defineProperties=defineProperties$1,_Object$defineProperties=getDefaultExportFromCjs(defineProperties);function _defineProperty(F,W,q){return W=_toPropertyKey(W),W in F?_Object$defineProperty$1(F,W,{value:q,enumerable:!0,configurable:!0,writable:!0}):F[W]=q,F}var $$q=_export,$map=arrayIteration.map,arrayMethodHasSpeciesSupport$2=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$2=arrayMethodHasSpeciesSupport$2("map");$$q({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$2},{map:function F(W){return $map(this,W,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$g=entryVirtual$k,map$3=entryVirtual$g("Array").map,isPrototypeOf$h=objectIsPrototypeOf,method$e=map$3,ArrayPrototype$f=Array.prototype,map$2=function(F){var W=F.map;return F===ArrayPrototype$f||isPrototypeOf$h(ArrayPrototype$f,F)&&W===ArrayPrototype$f.map?method$e:W},parent$B=map$2,map$1=parent$B,map=map$1,_mapInstanceProperty=getDefaultExportFromCjs(map),aCallable$2=aCallable$7,toObject$7=toObject$e,IndexedObject$1=indexedObject,lengthOfArrayLike$7=lengthOfArrayLike$c,$TypeError$6=TypeError,createMethod$2=function(F){return function(W,q,K,X){aCallable$2(q);var tt=toObject$7(W),rt=IndexedObject$1(tt),ot=lengthOfArrayLike$7(tt),ut=F?ot-1:0,yn=F?-1:1;if(K<2)for(;;){if(ut in rt){X=rt[ut],ut+=yn;break}if(ut+=yn,F?ut<0:ot<=ut)throw new $TypeError$6("Reduce of empty array with no initial value")}for(;F?ut>=0:ot>ut;ut+=yn)ut in rt&&(X=q(X,rt[ut],ut,tt));return X}},arrayReduce={left:createMethod$2(!1),right:createMethod$2(!0)},global$4=global$l,classof$3=classofRaw$2,engineIsNode=classof$3(global$4.process)==="process",$$p=_export,$reduce=arrayReduce.left,arrayMethodIsStrict$4=arrayMethodIsStrict$6,CHROME_VERSION=engineV8Version,IS_NODE=engineIsNode,CHROME_BUG=!IS_NODE&&CHROME_VERSION>79&&CHROME_VERSION<83,FORCED$5=CHROME_BUG||!arrayMethodIsStrict$4("reduce");$$p({target:"Array",proto:!0,forced:FORCED$5},{reduce:function F(W){var q=arguments.length;return $reduce(this,W,q,q>1?arguments[1]:void 0)}});var entryVirtual$f=entryVirtual$k,reduce$3=entryVirtual$f("Array").reduce,isPrototypeOf$g=objectIsPrototypeOf,method$d=reduce$3,ArrayPrototype$e=Array.prototype,reduce$2=function(F){var W=F.reduce;return F===ArrayPrototype$e||isPrototypeOf$g(ArrayPrototype$e,F)&&W===ArrayPrototype$e.reduce?method$d:W},parent$A=reduce$2,reduce$1=parent$A,reduce=reduce$1,_reduceInstanceProperty=getDefaultExportFromCjs(reduce),$$o=_export,toObject$6=toObject$e,nativeKeys=objectKeys$4,fails$b=fails$v,FAILS_ON_PRIMITIVES$1=fails$b(function(){nativeKeys(1)});$$o({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$1},{keys:function F(W){return nativeKeys(toObject$6(W))}});var path$b=path$s,keys$2=path$b.Object.keys,parent$z=keys$2,keys$1=parent$z,keys=keys$1,_Object$keys=getDefaultExportFromCjs(keys),defineProperty$3=defineProperty$b,_Object$defineProperty=getDefaultExportFromCjs(defineProperty$3),call$4=functionCall,anObject$3=anObject$b,getMethod$1=getMethod$3,iteratorClose$2=function(F,W,q){var K,X;anObject$3(F);try{if(K=getMethod$1(F,"return"),!K){if(W==="throw")throw q;return q}K=call$4(K,F)}catch(tt){X=!0,K=tt}if(W==="throw")throw q;if(X)throw K;return anObject$3(K),q},anObject$2=anObject$b,iteratorClose$1=iteratorClose$2,callWithSafeIterationClosing$1=function(F,W,q,K){try{return K?W(anObject$2(q)[0],q[1]):W(q)}catch(X){iteratorClose$1(F,"throw",X)}},wellKnownSymbol$6=wellKnownSymbol$m,Iterators$1=iterators,ITERATOR$4=wellKnownSymbol$6("iterator"),ArrayPrototype$d=Array.prototype,isArrayIteratorMethod$2=function(F){return F!==void 0&&(Iterators$1.Array===F||ArrayPrototype$d[ITERATOR$4]===F)},classof$2=classof$c,getMethod=getMethod$3,isNullOrUndefined$2=isNullOrUndefined$5,Iterators=iterators,wellKnownSymbol$5=wellKnownSymbol$m,ITERATOR$3=wellKnownSymbol$5("iterator"),getIteratorMethod$9=function(F){if(!isNullOrUndefined$2(F))return getMethod(F,ITERATOR$3)||getMethod(F,"@@iterator")||Iterators[classof$2(F)]},call$3=functionCall,aCallable$1=aCallable$7,anObject$1=anObject$b,tryToString$2=tryToString$6,getIteratorMethod$8=getIteratorMethod$9,$TypeError$5=TypeError,getIterator$2=function(F,W){var q=arguments.length<2?getIteratorMethod$8(F):W;if(aCallable$1(q))return anObject$1(call$3(q,F));throw new $TypeError$5(tryToString$2(F)+" is not iterable")},bind$2=functionBindContext,call$2=functionCall,toObject$5=toObject$e,callWithSafeIterationClosing=callWithSafeIterationClosing$1,isArrayIteratorMethod$1=isArrayIteratorMethod$2,isConstructor$1=isConstructor$4,lengthOfArrayLike$6=lengthOfArrayLike$c,createProperty$2=createProperty$6,getIterator$1=getIterator$2,getIteratorMethod$7=getIteratorMethod$9,$Array$1=Array,arrayFrom=function F(W){var q=toObject$5(W),K=isConstructor$1(this),X=arguments.length,tt=X>1?arguments[1]:void 0,rt=tt!==void 0;rt&&(tt=bind$2(tt,X>2?arguments[2]:void 0));var ot=getIteratorMethod$7(q),ut=0,yn,uo,po,mo,wo,lf;if(ot&&!(this===$Array$1&&isArrayIteratorMethod$1(ot)))for(mo=getIterator$1(q,ot),wo=mo.next,uo=K?new this:[];!(po=call$2(wo,mo)).done;ut++)lf=rt?callWithSafeIterationClosing(mo,tt,[po.value,ut],!0):po.value,createProperty$2(uo,ut,lf);else for(yn=lengthOfArrayLike$6(q),uo=K?new this(yn):$Array$1(yn);yn>ut;ut++)lf=rt?tt(q[ut],ut):q[ut],createProperty$2(uo,ut,lf);return uo.length=ut,uo},wellKnownSymbol$4=wellKnownSymbol$m,ITERATOR$2=wellKnownSymbol$4("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$2]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch(F){}var checkCorrectnessOfIteration$1=function(F,W){try{if(!W&&!SAFE_CLOSING)return!1}catch{return!1}var q=!1;try{var K={};K[ITERATOR$2]=function(){return{next:function(){return{done:q=!0}}}},F(K)}catch{}return q},$$n=_export,from$6=arrayFrom,checkCorrectnessOfIteration=checkCorrectnessOfIteration$1,INCORRECT_ITERATION=!checkCorrectnessOfIteration(function(F){Array.from(F)});$$n({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from:from$6});var path$a=path$s,from$5=path$a.Array.from,parent$y=from$5,from$4=parent$y,from$3=from$4,_Array$from$1=getDefaultExportFromCjs(from$3),getIteratorMethod$6=getIteratorMethod$9,getIteratorMethod_1=getIteratorMethod$6,parent$x=getIteratorMethod_1,getIteratorMethod$5=parent$x,parent$w=getIteratorMethod$5,getIteratorMethod$4=parent$w,parent$v=getIteratorMethod$4,getIteratorMethod$3=parent$v,getIteratorMethod$2=getIteratorMethod$3,_getIteratorMethod$1=getDefaultExportFromCjs(getIteratorMethod$2),getIteratorMethod$1=getIteratorMethod$2,_getIteratorMethod=getDefaultExportFromCjs(getIteratorMethod$1),parent$u=isArray$7,isArray$5=parent$u,parent$t=isArray$5,isArray$4=parent$t,isArray$3=isArray$4,_Array$isArray=getDefaultExportFromCjs(isArray$3);function _arrayWithHoles(F){if(_Array$isArray(F))return F}var DESCRIPTORS$5=descriptors,isArray$2=isArray$d,$TypeError$4=TypeError,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET=DESCRIPTORS$5&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(F){return F instanceof TypeError}}(),arraySetLength=SILENT_ON_NON_WRITABLE_LENGTH_SET?function(F,W){if(isArray$2(F)&&!getOwnPropertyDescriptor(F,"length").writable)throw new $TypeError$4("Cannot set read only .length");return F.length=W}:function(F,W){return F.length=W},$$m=_export,toObject$4=toObject$e,lengthOfArrayLike$5=lengthOfArrayLike$c,setArrayLength$1=arraySetLength,doesNotExceedSafeInteger$1=doesNotExceedSafeInteger$3,fails$a=fails$v,INCORRECT_TO_LENGTH=fails$a(function(){return[].push.call({length:4294967296},1)!==4294967297}),properErrorOnNonWritableLength=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(F){return F instanceof TypeError}},FORCED$4=INCORRECT_TO_LENGTH||!properErrorOnNonWritableLength();$$m({target:"Array",proto:!0,arity:1,forced:FORCED$4},{push:function F(W){var q=toObject$4(this),K=lengthOfArrayLike$5(q),X=arguments.length;doesNotExceedSafeInteger$1(K+X);for(var tt=0;ttF.length)&&(W=F.length);for(var q=0,K=new Array(W);q"u"&&documentAll$2!==void 0,documentAll_1={all:documentAll$2,IS_HTMLDDA},$documentAll$1=documentAll_1,documentAll$1=$documentAll$1.all,isCallable$i=$documentAll$1.IS_HTMLDDA?function(F){return typeof F=="function"||F===documentAll$1}:function(F){return typeof F=="function"},objectGetOwnPropertyDescriptor={},fails$t=fails$v,descriptors=!fails$t(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),NATIVE_BIND$2=functionBindNative,call$c=Function.prototype.call,functionCall=NATIVE_BIND$2?call$c.bind(call$c):function(){return call$c.apply(call$c,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable$2={}.propertyIsEnumerable,getOwnPropertyDescriptor$6=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$6&&!$propertyIsEnumerable$2.call({1:2},1);objectPropertyIsEnumerable.f=NASHORN_BUG?function F(W){var q=getOwnPropertyDescriptor$6(this,W);return!!q&&q.enumerable}:$propertyIsEnumerable$2;var createPropertyDescriptor$5=function(F,W){return{enumerable:!(F&1),configurable:!(F&2),writable:!(F&4),value:W}},uncurryThis$u=functionUncurryThis,fails$s=fails$v,classof$d=classofRaw$2,$Object$4=Object,split=uncurryThis$u("".split),indexedObject=fails$s(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(F){return classof$d(F)==="String"?split(F,""):$Object$4(F)}:$Object$4,isNullOrUndefined$5=function(F){return F==null},isNullOrUndefined$4=isNullOrUndefined$5,$TypeError$g=TypeError,requireObjectCoercible$6=function(F){if(isNullOrUndefined$4(F))throw new $TypeError$g("Can't call method on "+F);return F},IndexedObject$3=indexedObject,requireObjectCoercible$5=requireObjectCoercible$6,toIndexedObject$b=function(F){return IndexedObject$3(requireObjectCoercible$5(F))},isCallable$h=isCallable$i,$documentAll=documentAll_1,documentAll=$documentAll.all,isObject$g=$documentAll.IS_HTMLDDA?function(F){return typeof F=="object"?F!==null:isCallable$h(F)||F===documentAll}:function(F){return typeof F=="object"?F!==null:isCallable$h(F)},path$s={},path$r=path$s,global$k=global$l,isCallable$g=isCallable$i,aFunction=function(F){return isCallable$g(F)?F:void 0},getBuiltIn$c=function(F,W){return arguments.length<2?aFunction(path$r[F])||aFunction(global$k[F]):path$r[F]&&path$r[F][W]||global$k[F]&&global$k[F][W]},uncurryThis$t=functionUncurryThis,objectIsPrototypeOf=uncurryThis$t({}.isPrototypeOf),engineUserAgent=typeof navigator<"u"&&String(navigator.userAgent)||"",global$j=global$l,userAgent$2=engineUserAgent,process$1=global$j.process,Deno$1=global$j.Deno,versions=process$1&&process$1.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8,match,version;v8&&(match=v8.split("."),version=match[0]>0&&match[0]<4?1:+(match[0]+match[1]));!version&&userAgent$2&&(match=userAgent$2.match(/Edge\/(\d+)/),(!match||match[1]>=74)&&(match=userAgent$2.match(/Chrome\/(\d+)/),match&&(version=+match[1])));var engineV8Version=version,V8_VERSION$2=engineV8Version,fails$r=fails$v,global$i=global$l,$String$5=global$i.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$r(function(){var F=Symbol("symbol detection");return!$String$5(F)||!(Object(F)instanceof Symbol)||!Symbol.sham&&V8_VERSION$2&&V8_VERSION$2<41}),NATIVE_SYMBOL$5=symbolConstructorDetection,useSymbolAsUid=NATIVE_SYMBOL$5&&!Symbol.sham&&typeof Symbol.iterator=="symbol",getBuiltIn$b=getBuiltIn$c,isCallable$f=isCallable$i,isPrototypeOf$m=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$5=USE_SYMBOL_AS_UID$1?function(F){return typeof F=="symbol"}:function(F){var W=getBuiltIn$b("Symbol");return isCallable$f(W)&&isPrototypeOf$m(W.prototype,$Object$3(F))},$String$4=String,tryToString$6=function(F){try{return $String$4(F)}catch{return"Object"}},isCallable$e=isCallable$i,tryToString$5=tryToString$6,$TypeError$f=TypeError,aCallable$7=function(F){if(isCallable$e(F))return F;throw new $TypeError$f(tryToString$5(F)+" is not a function")},aCallable$6=aCallable$7,isNullOrUndefined$3=isNullOrUndefined$5,getMethod$3=function(F,W){var q=F[W];return isNullOrUndefined$3(q)?void 0:aCallable$6(q)},call$b=functionCall,isCallable$d=isCallable$i,isObject$f=isObject$g,$TypeError$e=TypeError,ordinaryToPrimitive$1=function(F,W){var q,K;if(W==="string"&&isCallable$d(q=F.toString)&&!isObject$f(K=call$b(q,F))||isCallable$d(q=F.valueOf)&&!isObject$f(K=call$b(q,F))||W!=="string"&&isCallable$d(q=F.toString)&&!isObject$f(K=call$b(q,F)))return K;throw new $TypeError$e("Can't convert object to primitive value")},shared$7={exports:{}},global$h=global$l,defineProperty$f=Object.defineProperty,defineGlobalProperty$1=function(F,W){try{defineProperty$f(global$h,F,{value:W,configurable:!0,writable:!0})}catch{global$h[F]=W}return W},global$g=global$l,defineGlobalProperty=defineGlobalProperty$1,SHARED="__core-js_shared__",store$3=global$g[SHARED]||defineGlobalProperty(SHARED,{}),sharedStore=store$3,store$2=sharedStore;(shared$7.exports=function(F,W){return store$2[F]||(store$2[F]=W!==void 0?W:{})})("versions",[]).push({version:"3.33.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedExports=shared$7.exports,requireObjectCoercible$4=requireObjectCoercible$6,$Object$2=Object,toObject$e=function(F){return $Object$2(requireObjectCoercible$4(F))},uncurryThis$s=functionUncurryThis,toObject$d=toObject$e,hasOwnProperty=uncurryThis$s({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function F(W,q){return hasOwnProperty(toObject$d(W),q)},uncurryThis$r=functionUncurryThis,id$1=0,postfix=Math.random(),toString$c=uncurryThis$r(1 .toString),uid$4=function(F){return"Symbol("+(F===void 0?"":F)+")_"+toString$c(++id$1+postfix,36)},global$f=global$l,shared$6=sharedExports,hasOwn$e=hasOwnProperty_1,uid$3=uid$4,NATIVE_SYMBOL$4=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$5=global$f.Symbol,WellKnownSymbolsStore$2=shared$6("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$5.for||Symbol$5:Symbol$5&&Symbol$5.withoutSetter||uid$3,wellKnownSymbol$m=function(F){return hasOwn$e(WellKnownSymbolsStore$2,F)||(WellKnownSymbolsStore$2[F]=NATIVE_SYMBOL$4&&hasOwn$e(Symbol$5,F)?Symbol$5[F]:createWellKnownSymbol("Symbol."+F)),WellKnownSymbolsStore$2[F]},call$a=functionCall,isObject$e=isObject$g,isSymbol$4=isSymbol$5,getMethod$2=getMethod$3,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$l=wellKnownSymbol$m,$TypeError$d=TypeError,TO_PRIMITIVE=wellKnownSymbol$l("toPrimitive"),toPrimitive$6=function(F,W){if(!isObject$e(F)||isSymbol$4(F))return F;var q=getMethod$2(F,TO_PRIMITIVE),K;if(q){if(W===void 0&&(W="default"),K=call$a(q,F,W),!isObject$e(K)||isSymbol$4(K))return K;throw new $TypeError$d("Can't convert object to primitive value")}return W===void 0&&(W="number"),ordinaryToPrimitive(F,W)},toPrimitive$5=toPrimitive$6,isSymbol$3=isSymbol$5,toPropertyKey$4=function(F){var W=toPrimitive$5(F,"string");return isSymbol$3(W)?W:W+""},global$e=global$l,isObject$d=isObject$g,document$1=global$e.document,EXISTS$1=isObject$d(document$1)&&isObject$d(document$1.createElement),documentCreateElement$1=function(F){return EXISTS$1?document$1.createElement(F):{}},DESCRIPTORS$i=descriptors,fails$q=fails$v,createElement=documentCreateElement$1,ie8DomDefine=!DESCRIPTORS$i&&!fails$q(function(){return Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a!==7}),DESCRIPTORS$h=descriptors,call$9=functionCall,propertyIsEnumerableModule$2=objectPropertyIsEnumerable,createPropertyDescriptor$4=createPropertyDescriptor$5,toIndexedObject$a=toIndexedObject$b,toPropertyKey$3=toPropertyKey$4,hasOwn$d=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor.f=DESCRIPTORS$h?$getOwnPropertyDescriptor$2:function F(W,q){if(W=toIndexedObject$a(W),q=toPropertyKey$3(q),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$2(W,q)}catch{}if(hasOwn$d(W,q))return createPropertyDescriptor$4(!call$9(propertyIsEnumerableModule$2.f,W,q),W[q])};var fails$p=fails$v,isCallable$c=isCallable$i,replacement=/#|\.prototype\./,isForced$1=function(F,W){var q=data[normalize(F)];return q===POLYFILL?!0:q===NATIVE?!1:isCallable$c(W)?fails$p(W):!!W},normalize=isForced$1.normalize=function(F){return String(F).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,uncurryThis$q=functionUncurryThisClause,aCallable$5=aCallable$7,NATIVE_BIND$1=functionBindNative,bind$e=uncurryThis$q(uncurryThis$q.bind),functionBindContext=function(F,W){return aCallable$5(F),W===void 0?F:NATIVE_BIND$1?bind$e(F,W):function(){return F.apply(W,arguments)}},objectDefineProperty={},DESCRIPTORS$g=descriptors,fails$o=fails$v,v8PrototypeDefineBug=DESCRIPTORS$g&&fails$o(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),isObject$c=isObject$g,$String$3=String,$TypeError$c=TypeError,anObject$b=function(F){if(isObject$c(F))return F;throw new $TypeError$c($String$3(F)+" is not an object")},DESCRIPTORS$f=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$a=anObject$b,toPropertyKey$2=toPropertyKey$4,$TypeError$b=TypeError,$defineProperty$1=Object.defineProperty,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable";objectDefineProperty.f=DESCRIPTORS$f?V8_PROTOTYPE_DEFINE_BUG$1?function F(W,q,K){if(anObject$a(W),q=toPropertyKey$2(q),anObject$a(K),typeof W=="function"&&q==="prototype"&&"value"in K&&WRITABLE in K&&!K[WRITABLE]){var X=$getOwnPropertyDescriptor$1(W,q);X&&X[WRITABLE]&&(W[q]=K.value,K={configurable:CONFIGURABLE$1 in K?K[CONFIGURABLE$1]:X[CONFIGURABLE$1],enumerable:ENUMERABLE in K?K[ENUMERABLE]:X[ENUMERABLE],writable:!1})}return $defineProperty$1(W,q,K)}:$defineProperty$1:function F(W,q,K){if(anObject$a(W),q=toPropertyKey$2(q),anObject$a(K),IE8_DOM_DEFINE)try{return $defineProperty$1(W,q,K)}catch{}if("get"in K||"set"in K)throw new $TypeError$b("Accessors not supported");return"value"in K&&(W[q]=K.value),W};var DESCRIPTORS$e=descriptors,definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$3=createPropertyDescriptor$5,createNonEnumerableProperty$6=DESCRIPTORS$e?function(F,W,q){return definePropertyModule$3.f(F,W,createPropertyDescriptor$3(1,q))}:function(F,W,q){return F[W]=q,F},global$d=global$l,apply$4=functionApply,uncurryThis$p=functionUncurryThisClause,isCallable$b=isCallable$i,getOwnPropertyDescriptor$5=objectGetOwnPropertyDescriptor.f,isForced=isForced_1,path$q=path$s,bind$d=functionBindContext,createNonEnumerableProperty$5=createNonEnumerableProperty$6,hasOwn$c=hasOwnProperty_1,wrapConstructor=function(F){var W=function(q,K,X){if(this instanceof W){switch(arguments.length){case 0:return new F;case 1:return new F(q);case 2:return new F(q,K)}return new F(q,K,X)}return apply$4(F,this,arguments)};return W.prototype=F.prototype,W},_export=function(F,W){var q=F.target,K=F.global,X=F.stat,tt=F.proto,rt=K?global$d:X?global$d[q]:(global$d[q]||{}).prototype,ot=K?path$q:path$q[q]||createNonEnumerableProperty$5(path$q,q,{})[q],ut=ot.prototype,yn,uo,po,mo,wo,lf,yf,cf,vf;for(mo in W)yn=isForced(K?mo:q+(X?".":"#")+mo,F.forced),uo=!yn&&rt&&hasOwn$c(rt,mo),lf=ot[mo],uo&&(F.dontCallGetSet?(vf=getOwnPropertyDescriptor$5(rt,mo),yf=vf&&vf.value):yf=rt[mo]),wo=uo&&yf?yf:W[mo],!(uo&&typeof lf==typeof wo)&&(F.bind&&uo?cf=bind$d(wo,global$d):F.wrap&&uo?cf=wrapConstructor(wo):tt&&isCallable$b(wo)?cf=uncurryThis$p(wo):cf=wo,(F.sham||wo&&wo.sham||lf&&lf.sham)&&createNonEnumerableProperty$5(cf,"sham",!0),createNonEnumerableProperty$5(ot,mo,cf),tt&&(po=q+"Prototype",hasOwn$c(path$q,po)||createNonEnumerableProperty$5(path$q,po,{}),createNonEnumerableProperty$5(path$q[po],mo,wo),F.real&&ut&&(yn||!ut[mo])&&createNonEnumerableProperty$5(ut,mo,wo)))},uncurryThis$o=functionUncurryThis,arraySlice$5=uncurryThis$o([].slice),uncurryThis$n=functionUncurryThis,aCallable$4=aCallable$7,isObject$b=isObject$g,hasOwn$b=hasOwnProperty_1,arraySlice$4=arraySlice$5,NATIVE_BIND=functionBindNative,$Function=Function,concat$6=uncurryThis$n([].concat),join=uncurryThis$n([].join),factories={},construct$4=function(F,W,q){if(!hasOwn$b(factories,W)){for(var K=[],X=0;X0?floor$1:ceil)(q)},trunc=mathTrunc,toIntegerOrInfinity$5=function(F){var W=+F;return W!==W||W===0?0:trunc(W)},toIntegerOrInfinity$4=toIntegerOrInfinity$5,max$3=Math.max,min$2=Math.min,toAbsoluteIndex$5=function(F,W){var q=toIntegerOrInfinity$4(F);return q<0?max$3(q+W,0):min$2(q,W)},toIntegerOrInfinity$3=toIntegerOrInfinity$5,min$1=Math.min,toLength$1=function(F){return F>0?min$1(toIntegerOrInfinity$3(F),9007199254740991):0},toLength=toLength$1,lengthOfArrayLike$c=function(F){return toLength(F.length)},toIndexedObject$9=toIndexedObject$b,toAbsoluteIndex$4=toAbsoluteIndex$5,lengthOfArrayLike$b=lengthOfArrayLike$c,createMethod$5=function(F){return function(W,q,K){var X=toIndexedObject$9(W),tt=lengthOfArrayLike$b(X),rt=toAbsoluteIndex$4(K,tt),ot;if(F&&q!==q){for(;tt>rt;)if(ot=X[rt++],ot!==ot)return!0}else for(;tt>rt;rt++)if((F||rt in X)&&X[rt]===q)return F||rt||0;return!F&&-1}},arrayIncludes={includes:createMethod$5(!0),indexOf:createMethod$5(!1)},hiddenKeys$6={},uncurryThis$k=functionUncurryThis,hasOwn$a=hasOwnProperty_1,toIndexedObject$8=toIndexedObject$b,indexOf$4=arrayIncludes.indexOf,hiddenKeys$5=hiddenKeys$6,push$c=uncurryThis$k([].push),objectKeysInternal=function(F,W){var q=toIndexedObject$8(F),K=0,X=[],tt;for(tt in q)!hasOwn$a(hiddenKeys$5,tt)&&hasOwn$a(q,tt)&&push$c(X,tt);for(;W.length>K;)hasOwn$a(q,tt=W[K++])&&(~indexOf$4(X,tt)||push$c(X,tt));return X},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,objectKeys$4=Object.keys||function F(W){return internalObjectKeys$1(W,enumBugKeys$2)},DESCRIPTORS$d=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$2=objectDefineProperty,anObject$9=anObject$b,toIndexedObject$7=toIndexedObject$b,objectKeys$3=objectKeys$4;objectDefineProperties.f=DESCRIPTORS$d&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function F(W,q){anObject$9(W);for(var K=toIndexedObject$7(q),X=objectKeys$3(q),tt=X.length,rt=0,ot;tt>rt;)definePropertyModule$2.f(W,ot=X[rt++],K[ot]);return W};var getBuiltIn$9=getBuiltIn$c,html$1=getBuiltIn$9("document","documentElement"),shared$5=sharedExports,uid$2=uid$4,keys$3=shared$5("keys"),sharedKey$4=function(F){return keys$3[F]||(keys$3[F]=uid$2(F))},anObject$8=anObject$b,definePropertiesModule$1=objectDefineProperties,enumBugKeys$1=enumBugKeys$3,hiddenKeys$4=hiddenKeys$6,html=html$1,documentCreateElement=documentCreateElement$1,sharedKey$3=sharedKey$4,GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(F){return LT+SCRIPT+GT+F+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(F){F.write(scriptTag("")),F.close();var W=F.parentWindow.Object;return F=null,W},NullProtoObjectViaIFrame=function(){var F=documentCreateElement("iframe"),W="java"+SCRIPT+":",q;return F.style.display="none",html.appendChild(F),F.src=String(W),q=F.contentWindow.document,q.open(),q.write(scriptTag("document.F=Object")),q.close(),q.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch{}NullProtoObject=typeof document<"u"?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var F=enumBugKeys$1.length;F--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys$1[F]];return NullProtoObject()};hiddenKeys$4[IE_PROTO$1]=!0;var objectCreate=Object.create||function F(W,q){var K;return W!==null?(EmptyConstructor[PROTOTYPE$1]=anObject$8(W),K=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,K[IE_PROTO$1]=W):K=NullProtoObject(),q===void 0?K:definePropertiesModule$1.f(K,q)},$$P=_export,getBuiltIn$8=getBuiltIn$c,apply$3=functionApply,bind$c=functionBind,aConstructor=aConstructor$1,anObject$7=anObject$b,isObject$a=isObject$g,create$a=objectCreate,fails$m=fails$v,nativeConstruct=getBuiltIn$8("Reflect","construct"),ObjectPrototype$2=Object.prototype,push$b=[].push,NEW_TARGET_BUG=fails$m(function(){function F(){}return!(nativeConstruct(function(){},[],F)instanceof F)}),ARGS_BUG=!fails$m(function(){nativeConstruct(function(){})}),FORCED$9=NEW_TARGET_BUG||ARGS_BUG;$$P({target:"Reflect",stat:!0,forced:FORCED$9,sham:FORCED$9},{construct:function F(W,q){aConstructor(W),anObject$7(q);var K=arguments.length<3?W:aConstructor(arguments[2]);if(ARGS_BUG&&!NEW_TARGET_BUG)return nativeConstruct(W,q,K);if(W===K){switch(q.length){case 0:return new W;case 1:return new W(q[0]);case 2:return new W(q[0],q[1]);case 3:return new W(q[0],q[1],q[2]);case 4:return new W(q[0],q[1],q[2],q[3])}var X=[null];return apply$3(push$b,X,q),new(apply$3(bind$c,W,X))}var tt=K.prototype,rt=create$a(isObject$a(tt)?tt:ObjectPrototype$2),ot=apply$3(W,rt,q);return isObject$a(ot)?ot:rt}});var path$p=path$s,construct$2=path$p.Reflect.construct,parent$15=construct$2,construct$1=parent$15,construct=construct$1,_Reflect$construct=getDefaultExportFromCjs(construct);function _classCallCheck(F,W){if(!(F instanceof W))throw new TypeError("Cannot call a class as a function")}var defineProperty$e={exports:{}},$$O=_export,DESCRIPTORS$c=descriptors,defineProperty$d=objectDefineProperty.f;$$O({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$d,sham:!DESCRIPTORS$c},{defineProperty:defineProperty$d});var path$o=path$s,Object$4=path$o.Object,defineProperty$c=defineProperty$e.exports=function F(W,q,K){return Object$4.defineProperty(W,q,K)};Object$4.defineProperty.sham&&(defineProperty$c.sham=!0);var definePropertyExports=defineProperty$e.exports,parent$14=definePropertyExports,defineProperty$b=parent$14,parent$13=defineProperty$b,defineProperty$a=parent$13,parent$12=defineProperty$a,defineProperty$9=parent$12,defineProperty$8=defineProperty$9,_Object$defineProperty$1=getDefaultExportFromCjs(defineProperty$8),classof$a=classofRaw$2,isArray$d=Array.isArray||function F(W){return classof$a(W)==="Array"},$TypeError$9=TypeError,MAX_SAFE_INTEGER=9007199254740991,doesNotExceedSafeInteger$3=function(F){if(F>MAX_SAFE_INTEGER)throw $TypeError$9("Maximum allowed index exceeded");return F},toPropertyKey$1=toPropertyKey$4,definePropertyModule$1=objectDefineProperty,createPropertyDescriptor$2=createPropertyDescriptor$5,createProperty$6=function(F,W,q){var K=toPropertyKey$1(W);K in F?definePropertyModule$1.f(F,K,createPropertyDescriptor$2(0,q)):F[K]=q},isArray$c=isArray$d,isConstructor$2=isConstructor$4,isObject$9=isObject$g,wellKnownSymbol$i=wellKnownSymbol$m,SPECIES$3=wellKnownSymbol$i("species"),$Array$3=Array,arraySpeciesConstructor$1=function(F){var W;return isArray$c(F)&&(W=F.constructor,isConstructor$2(W)&&(W===$Array$3||isArray$c(W.prototype))?W=void 0:isObject$9(W)&&(W=W[SPECIES$3],W===null&&(W=void 0))),W===void 0?$Array$3:W},arraySpeciesConstructor=arraySpeciesConstructor$1,arraySpeciesCreate$3=function(F,W){return new(arraySpeciesConstructor(F))(W===0?0:W)},fails$l=fails$v,wellKnownSymbol$h=wellKnownSymbol$m,V8_VERSION$1=engineV8Version,SPECIES$2=wellKnownSymbol$h("species"),arrayMethodHasSpeciesSupport$5=function(F){return V8_VERSION$1>=51||!fails$l(function(){var W=[],q=W.constructor={};return q[SPECIES$2]=function(){return{foo:1}},W[F](Boolean).foo!==1})},$$N=_export,fails$k=fails$v,isArray$b=isArray$d,isObject$8=isObject$g,toObject$c=toObject$e,lengthOfArrayLike$a=lengthOfArrayLike$c,doesNotExceedSafeInteger$2=doesNotExceedSafeInteger$3,createProperty$5=createProperty$6,arraySpeciesCreate$2=arraySpeciesCreate$3,arrayMethodHasSpeciesSupport$4=arrayMethodHasSpeciesSupport$5,wellKnownSymbol$g=wellKnownSymbol$m,V8_VERSION=engineV8Version,IS_CONCAT_SPREADABLE=wellKnownSymbol$g("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT=V8_VERSION>=51||!fails$k(function(){var F=[];return F[IS_CONCAT_SPREADABLE]=!1,F.concat()[0]!==F}),isConcatSpreadable=function(F){if(!isObject$8(F))return!1;var W=F[IS_CONCAT_SPREADABLE];return W!==void 0?!!W:isArray$b(F)},FORCED$8=!IS_CONCAT_SPREADABLE_SUPPORT||!arrayMethodHasSpeciesSupport$4("concat");$$N({target:"Array",proto:!0,arity:1,forced:FORCED$8},{concat:function F(W){var q=toObject$c(this),K=arraySpeciesCreate$2(q,0),X=0,tt,rt,ot,ut,yn;for(tt=-1,ot=arguments.length;ttcf;cf++)if((ot||cf in wo)&&($f=wo[cf],xf=lf($f,cf,mo),F))if(W)_f[cf]=xf;else if(xf)switch(F){case 3:return!0;case 5:return $f;case 6:return cf;case 2:push$a(_f,$f)}else switch(F){case 4:return!1;case 7:push$a(_f,$f)}return tt?-1:K||X?X:_f}},arrayIteration={forEach:createMethod$4(0),map:createMethod$4(1),filter:createMethod$4(2),some:createMethod$4(3),every:createMethod$4(4),find:createMethod$4(5),findIndex:createMethod$4(6),filterReject:createMethod$4(7)},$$M=_export,global$a=global$l,call$7=functionCall,uncurryThis$i=functionUncurryThis,DESCRIPTORS$b=descriptors,NATIVE_SYMBOL$3=symbolConstructorDetection,fails$j=fails$v,hasOwn$6=hasOwnProperty_1,isPrototypeOf$l=objectIsPrototypeOf,anObject$6=anObject$b,toIndexedObject$5=toIndexedObject$b,toPropertyKey=toPropertyKey$4,$toString=toString$b,createPropertyDescriptor$1=createPropertyDescriptor$5,nativeObjectCreate=objectCreate,objectKeys$2=objectKeys$4,getOwnPropertyNamesModule$2=objectGetOwnPropertyNames,getOwnPropertyNamesExternal=objectGetOwnPropertyNamesExternal,getOwnPropertySymbolsModule$3=objectGetOwnPropertySymbols,getOwnPropertyDescriptorModule$1=objectGetOwnPropertyDescriptor,definePropertyModule=objectDefineProperty,definePropertiesModule=objectDefineProperties,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,defineBuiltIn$3=defineBuiltIn$5,defineBuiltInAccessor$2=defineBuiltInAccessor$3,shared$3=sharedExports,sharedKey$1=sharedKey$4,hiddenKeys$1=hiddenKeys$6,uid$1=uid$4,wellKnownSymbol$c=wellKnownSymbol$m,wrappedWellKnownSymbolModule=wellKnownSymbolWrapped,defineWellKnownSymbol$l=wellKnownSymbolDefine,defineSymbolToPrimitive$1=symbolDefineToPrimitive,setToStringTag$5=setToStringTag$6,InternalStateModule$4=internalState,$forEach$1=arrayIteration.forEach,HIDDEN=sharedKey$1("hidden"),SYMBOL="Symbol",PROTOTYPE="prototype",setInternalState$4=InternalStateModule$4.set,getInternalState$2=InternalStateModule$4.getterFor(SYMBOL),ObjectPrototype$1=Object[PROTOTYPE],$Symbol=global$a.Symbol,SymbolPrototype=$Symbol&&$Symbol[PROTOTYPE],RangeError$1=global$a.RangeError,TypeError$1=global$a.TypeError,QObject=global$a.QObject,nativeGetOwnPropertyDescriptor$1=getOwnPropertyDescriptorModule$1.f,nativeDefineProperty=definePropertyModule.f,nativeGetOwnPropertyNames=getOwnPropertyNamesExternal.f,nativePropertyIsEnumerable=propertyIsEnumerableModule$1.f,push$9=uncurryThis$i([].push),AllSymbols=shared$3("symbols"),ObjectPrototypeSymbols=shared$3("op-symbols"),WellKnownSymbolsStore$1=shared$3("wks"),USE_SETTER=!QObject||!QObject[PROTOTYPE]||!QObject[PROTOTYPE].findChild,fallbackDefineProperty=function(F,W,q){var K=nativeGetOwnPropertyDescriptor$1(ObjectPrototype$1,W);K&&delete ObjectPrototype$1[W],nativeDefineProperty(F,W,q),K&&F!==ObjectPrototype$1&&nativeDefineProperty(ObjectPrototype$1,W,K)},setSymbolDescriptor=DESCRIPTORS$b&&fails$j(function(){return nativeObjectCreate(nativeDefineProperty({},"a",{get:function(){return nativeDefineProperty(this,"a",{value:7}).a}})).a!==7})?fallbackDefineProperty:nativeDefineProperty,wrap=function(F,W){var q=AllSymbols[F]=nativeObjectCreate(SymbolPrototype);return setInternalState$4(q,{type:SYMBOL,tag:F,description:W}),DESCRIPTORS$b||(q.description=W),q},$defineProperty=function F(W,q,K){W===ObjectPrototype$1&&$defineProperty(ObjectPrototypeSymbols,q,K),anObject$6(W);var X=toPropertyKey(q);return anObject$6(K),hasOwn$6(AllSymbols,X)?(K.enumerable?(hasOwn$6(W,HIDDEN)&&W[HIDDEN][X]&&(W[HIDDEN][X]=!1),K=nativeObjectCreate(K,{enumerable:createPropertyDescriptor$1(0,!1)})):(hasOwn$6(W,HIDDEN)||nativeDefineProperty(W,HIDDEN,createPropertyDescriptor$1(1,{})),W[HIDDEN][X]=!0),setSymbolDescriptor(W,X,K)):nativeDefineProperty(W,X,K)},$defineProperties=function F(W,q){anObject$6(W);var K=toIndexedObject$5(q),X=objectKeys$2(K).concat($getOwnPropertySymbols(K));return $forEach$1(X,function(tt){(!DESCRIPTORS$b||call$7($propertyIsEnumerable$1,K,tt))&&$defineProperty(W,tt,K[tt])}),W},$create=function F(W,q){return q===void 0?nativeObjectCreate(W):$defineProperties(nativeObjectCreate(W),q)},$propertyIsEnumerable$1=function F(W){var q=toPropertyKey(W),K=call$7(nativePropertyIsEnumerable,this,q);return this===ObjectPrototype$1&&hasOwn$6(AllSymbols,q)&&!hasOwn$6(ObjectPrototypeSymbols,q)?!1:K||!hasOwn$6(this,q)||!hasOwn$6(AllSymbols,q)||hasOwn$6(this,HIDDEN)&&this[HIDDEN][q]?K:!0},$getOwnPropertyDescriptor=function F(W,q){var K=toIndexedObject$5(W),X=toPropertyKey(q);if(!(K===ObjectPrototype$1&&hasOwn$6(AllSymbols,X)&&!hasOwn$6(ObjectPrototypeSymbols,X))){var tt=nativeGetOwnPropertyDescriptor$1(K,X);return tt&&hasOwn$6(AllSymbols,X)&&!(hasOwn$6(K,HIDDEN)&&K[HIDDEN][X])&&(tt.enumerable=!0),tt}},$getOwnPropertyNames=function F(W){var q=nativeGetOwnPropertyNames(toIndexedObject$5(W)),K=[];return $forEach$1(q,function(X){!hasOwn$6(AllSymbols,X)&&!hasOwn$6(hiddenKeys$1,X)&&push$9(K,X)}),K},$getOwnPropertySymbols=function(F){var W=F===ObjectPrototype$1,q=nativeGetOwnPropertyNames(W?ObjectPrototypeSymbols:toIndexedObject$5(F)),K=[];return $forEach$1(q,function(X){hasOwn$6(AllSymbols,X)&&(!W||hasOwn$6(ObjectPrototype$1,X))&&push$9(K,AllSymbols[X])}),K};NATIVE_SYMBOL$3||($Symbol=function(){if(isPrototypeOf$l(SymbolPrototype,this))throw new TypeError$1("Symbol is not a constructor");var W=!arguments.length||arguments[0]===void 0?void 0:$toString(arguments[0]),q=uid$1(W),K=function(X){this===ObjectPrototype$1&&call$7(K,ObjectPrototypeSymbols,X),hasOwn$6(this,HIDDEN)&&hasOwn$6(this[HIDDEN],q)&&(this[HIDDEN][q]=!1);var tt=createPropertyDescriptor$1(1,X);try{setSymbolDescriptor(this,q,tt)}catch(rt){if(!(rt instanceof RangeError$1))throw rt;fallbackDefineProperty(this,q,tt)}};return DESCRIPTORS$b&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype$1,q,{configurable:!0,set:K}),wrap(q,W)},SymbolPrototype=$Symbol[PROTOTYPE],defineBuiltIn$3(SymbolPrototype,"toString",function(){return getInternalState$2(this).tag}),defineBuiltIn$3($Symbol,"withoutSetter",function(F){return wrap(uid$1(F),F)}),propertyIsEnumerableModule$1.f=$propertyIsEnumerable$1,definePropertyModule.f=$defineProperty,definePropertiesModule.f=$defineProperties,getOwnPropertyDescriptorModule$1.f=$getOwnPropertyDescriptor,getOwnPropertyNamesModule$2.f=getOwnPropertyNamesExternal.f=$getOwnPropertyNames,getOwnPropertySymbolsModule$3.f=$getOwnPropertySymbols,wrappedWellKnownSymbolModule.f=function(F){return wrap(wellKnownSymbol$c(F),F)},DESCRIPTORS$b&&defineBuiltInAccessor$2(SymbolPrototype,"description",{configurable:!0,get:function(){return getInternalState$2(this).description}}));$$M({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$3,sham:!NATIVE_SYMBOL$3},{Symbol:$Symbol});$forEach$1(objectKeys$2(WellKnownSymbolsStore$1),function(F){defineWellKnownSymbol$l(F)});$$M({target:SYMBOL,stat:!0,forced:!NATIVE_SYMBOL$3},{useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}});$$M({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3,sham:!DESCRIPTORS$b},{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor});$$M({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3},{getOwnPropertyNames:$getOwnPropertyNames});defineSymbolToPrimitive$1();setToStringTag$5($Symbol,SYMBOL);hiddenKeys$1[HIDDEN]=!0;var NATIVE_SYMBOL$2=symbolConstructorDetection,symbolRegistryDetection=NATIVE_SYMBOL$2&&!!Symbol.for&&!!Symbol.keyFor,$$L=_export,getBuiltIn$6=getBuiltIn$c,hasOwn$5=hasOwnProperty_1,toString$9=toString$b,shared$2=sharedExports,NATIVE_SYMBOL_REGISTRY$1=symbolRegistryDetection,StringToSymbolRegistry=shared$2("string-to-symbol-registry"),SymbolToStringRegistry$1=shared$2("symbol-to-string-registry");$$L({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$1},{for:function(F){var W=toString$9(F);if(hasOwn$5(StringToSymbolRegistry,W))return StringToSymbolRegistry[W];var q=getBuiltIn$6("Symbol")(W);return StringToSymbolRegistry[W]=q,SymbolToStringRegistry$1[q]=W,q}});var $$K=_export,hasOwn$4=hasOwnProperty_1,isSymbol$2=isSymbol$5,tryToString$3=tryToString$6,shared$1=sharedExports,NATIVE_SYMBOL_REGISTRY=symbolRegistryDetection,SymbolToStringRegistry=shared$1("symbol-to-string-registry");$$K({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY},{keyFor:function F(W){if(!isSymbol$2(W))throw new TypeError(tryToString$3(W)+" is not a symbol");if(hasOwn$4(SymbolToStringRegistry,W))return SymbolToStringRegistry[W]}});var uncurryThis$h=functionUncurryThis,isArray$a=isArray$d,isCallable$6=isCallable$i,classof$6=classofRaw$2,toString$8=toString$b,push$8=uncurryThis$h([].push),getJsonReplacerFunction=function(F){if(isCallable$6(F))return F;if(isArray$a(F)){for(var W=F.length,q=[],K=0;K=W.length)return F.target=void 0,createIterResultObject$2(void 0,!0);switch(q){case"keys":return createIterResultObject$2(K,!1);case"values":return createIterResultObject$2(W[K],!1)}return createIterResultObject$2([K,W[K]],!1)},"values");Iterators$3.Arguments=Iterators$3.Array;var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},DOMIterables$1=domIterables,global$8=global$l,classof$5=classof$c,createNonEnumerableProperty$1=createNonEnumerableProperty$6,Iterators$2=iterators,wellKnownSymbol$9=wellKnownSymbol$m,TO_STRING_TAG=wellKnownSymbol$9("toStringTag");for(var COLLECTION_NAME in DOMIterables$1){var Collection=global$8[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;CollectionPrototype&&classof$5(CollectionPrototype)!==TO_STRING_TAG&&createNonEnumerableProperty$1(CollectionPrototype,TO_STRING_TAG,COLLECTION_NAME),Iterators$2[COLLECTION_NAME]=Iterators$2.Array}var parent$11=symbol$5,symbol$4=parent$11,wellKnownSymbol$8=wellKnownSymbol$m,defineProperty$4=objectDefineProperty.f,METADATA$1=wellKnownSymbol$8("metadata"),FunctionPrototype$1=Function.prototype;FunctionPrototype$1[METADATA$1]===void 0&&defineProperty$4(FunctionPrototype$1,METADATA$1,{value:null});var defineWellKnownSymbol$7=wellKnownSymbolDefine;defineWellKnownSymbol$7("asyncDispose");var defineWellKnownSymbol$6=wellKnownSymbolDefine;defineWellKnownSymbol$6("dispose");var defineWellKnownSymbol$5=wellKnownSymbolDefine;defineWellKnownSymbol$5("metadata");var parent$10=symbol$4,symbol$3=parent$10,getBuiltIn$3=getBuiltIn$c,uncurryThis$e=functionUncurryThis,Symbol$4=getBuiltIn$3("Symbol"),keyFor=Symbol$4.keyFor,thisSymbolValue$1=uncurryThis$e(Symbol$4.prototype.valueOf),symbolIsRegistered=Symbol$4.isRegisteredSymbol||function F(W){try{return keyFor(thisSymbolValue$1(W))!==void 0}catch{return!1}},$$G=_export,isRegisteredSymbol$1=symbolIsRegistered;$$G({target:"Symbol",stat:!0},{isRegisteredSymbol:isRegisteredSymbol$1});var shared=sharedExports,getBuiltIn$2=getBuiltIn$c,uncurryThis$d=functionUncurryThis,isSymbol=isSymbol$5,wellKnownSymbol$7=wellKnownSymbol$m,Symbol$3=getBuiltIn$2("Symbol"),$isWellKnownSymbol=Symbol$3.isWellKnownSymbol,getOwnPropertyNames=getBuiltIn$2("Object","getOwnPropertyNames"),thisSymbolValue=uncurryThis$d(Symbol$3.prototype.valueOf),WellKnownSymbolsStore=shared("wks");for(var i$1=0,symbolKeys=getOwnPropertyNames(Symbol$3),symbolKeysLength=symbolKeys.length;i$1=tt?F?"":void 0:(rt=charCodeAt(K,X),rt<55296||rt>56319||X+1===tt||(ot=charCodeAt(K,X+1))<56320||ot>57343?F?charAt$2(K,X):rt:F?stringSlice(K,X,X+2):(rt-55296<<10)+(ot-56320)+65536)}},stringMultibyte={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},charAt$1=stringMultibyte.charAt,toString$6=toString$b,InternalStateModule$2=internalState,defineIterator$1=iteratorDefine,createIterResultObject$1=createIterResultObject$3,STRING_ITERATOR="String Iterator",setInternalState$2=InternalStateModule$2.set,getInternalState=InternalStateModule$2.getterFor(STRING_ITERATOR);defineIterator$1(String,"String",function(F){setInternalState$2(this,{type:STRING_ITERATOR,string:toString$6(F),index:0})},function F(){var W=getInternalState(this),q=W.string,K=W.index,X;return K>=q.length?createIterResultObject$1(void 0,!0):(X=charAt$1(q,K),W.index+=X.length,createIterResultObject$1(X,!1))});var WrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,iterator$4=WrappedWellKnownSymbolModule$1.f("iterator"),parent$_=iterator$4,iterator$3=parent$_,parent$Z=iterator$3,iterator$2=parent$Z,parent$Y=iterator$2,iterator$1=parent$Y,iterator=iterator$1,_Symbol$iterator=getDefaultExportFromCjs(iterator);function _typeof(F){"@babel/helpers - typeof";return _typeof=typeof _Symbol$1=="function"&&typeof _Symbol$iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof _Symbol$1=="function"&&W.constructor===_Symbol$1&&W!==_Symbol$1.prototype?"symbol":typeof W},_typeof(F)}var WrappedWellKnownSymbolModule=wellKnownSymbolWrapped,toPrimitive$4=WrappedWellKnownSymbolModule.f("toPrimitive"),parent$X=toPrimitive$4,toPrimitive$3=parent$X,parent$W=toPrimitive$3,toPrimitive$2=parent$W,parent$V=toPrimitive$2,toPrimitive$1=parent$V,toPrimitive=toPrimitive$1,_Symbol$toPrimitive=getDefaultExportFromCjs(toPrimitive);function _toPrimitive(F,W){if(_typeof(F)!=="object"||F===null)return F;var q=F[_Symbol$toPrimitive];if(q!==void 0){var K=q.call(F,W||"default");if(_typeof(K)!=="object")return K;throw new TypeError("@@toPrimitive must return a primitive value.")}return(W==="string"?String:Number)(F)}function _toPropertyKey(F){var W=_toPrimitive(F,"string");return _typeof(W)==="symbol"?W:String(W)}function _defineProperties(F,W){for(var q=0;qq,rt=isCallable$1(K)?K:Function$1(K),ot=tt?arraySlice$1(arguments,q):[],ut=tt?function(){apply$1(rt,this,ot)}:rt;return W?F(ut,X):F(ut)}:F},$$x=_export,global$6=global$l,schedulersFix$1=schedulersFix$2,setInterval$2=schedulersFix$1(global$6.setInterval,!0);$$x({global:!0,bind:!0,forced:global$6.setInterval!==setInterval$2},{setInterval:setInterval$2});var $$w=_export,global$5=global$l,schedulersFix=schedulersFix$2,setTimeout$3=schedulersFix(global$5.setTimeout,!0);$$w({global:!0,bind:!0,forced:global$5.setTimeout!==setTimeout$3},{setTimeout:setTimeout$3});var path$g=path$s,setTimeout$2=path$g.setTimeout,setTimeout$1=setTimeout$2,_setTimeout=getDefaultExportFromCjs(setTimeout$1),fails$d=fails$v,arrayMethodIsStrict$6=function(F,W){var q=[][F];return!!q&&fails$d(function(){q.call(null,W||function(){return 1},1)})},$forEach=arrayIteration.forEach,arrayMethodIsStrict$5=arrayMethodIsStrict$6,STRICT_METHOD$3=arrayMethodIsStrict$5("forEach"),arrayForEach=STRICT_METHOD$3?[].forEach:function F(W){return $forEach(this,W,arguments.length>1?arguments[1]:void 0)},$$v=_export,forEach$6=arrayForEach;$$v({target:"Array",proto:!0,forced:[].forEach!==forEach$6},{forEach:forEach$6});var entryVirtual$i=entryVirtual$k,forEach$5=entryVirtual$i("Array").forEach,parent$H=forEach$5,forEach$4=parent$H,classof$4=classof$c,hasOwn$1=hasOwnProperty_1,isPrototypeOf$j=objectIsPrototypeOf,method$g=forEach$4,ArrayPrototype$h=Array.prototype,DOMIterables={DOMTokenList:!0,NodeList:!0},forEach$3=function(F){var W=F.forEach;return F===ArrayPrototype$h||isPrototypeOf$j(ArrayPrototype$h,F)&&W===ArrayPrototype$h.forEach||hasOwn$1(DOMIterables,classof$4(F))?method$g:W},forEach$2=forEach$3,_forEachInstanceProperty=getDefaultExportFromCjs(forEach$2),moment$2=typeof window<"u"&&window.moment||hooks,moment$3=getDefaultExportFromCjs(moment$2),path$f=path$s,getOwnPropertySymbols$2=path$f.Object.getOwnPropertySymbols,parent$G=getOwnPropertySymbols$2,getOwnPropertySymbols$1=parent$G,getOwnPropertySymbols=getOwnPropertySymbols$1,_Object$getOwnPropertySymbols=getDefaultExportFromCjs(getOwnPropertySymbols),$$u=_export,$filter=arrayIteration.filter,arrayMethodHasSpeciesSupport$3=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$3=arrayMethodHasSpeciesSupport$3("filter");$$u({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$3},{filter:function F(W){return $filter(this,W,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$h=entryVirtual$k,filter$3=entryVirtual$h("Array").filter,isPrototypeOf$i=objectIsPrototypeOf,method$f=filter$3,ArrayPrototype$g=Array.prototype,filter$2=function(F){var W=F.filter;return F===ArrayPrototype$g||isPrototypeOf$i(ArrayPrototype$g,F)&&W===ArrayPrototype$g.filter?method$f:W},parent$F=filter$2,filter$1=parent$F,filter=filter$1,_filterInstanceProperty=getDefaultExportFromCjs(filter),getOwnPropertyDescriptor$4={exports:{}},$$t=_export,fails$c=fails$v,toIndexedObject$3=toIndexedObject$b,nativeGetOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,DESCRIPTORS$8=descriptors,FORCED$6=!DESCRIPTORS$8||fails$c(function(){nativeGetOwnPropertyDescriptor(1)});$$t({target:"Object",stat:!0,forced:FORCED$6,sham:!DESCRIPTORS$8},{getOwnPropertyDescriptor:function F(W,q){return nativeGetOwnPropertyDescriptor(toIndexedObject$3(W),q)}});var path$e=path$s,Object$2=path$e.Object,getOwnPropertyDescriptor$3=getOwnPropertyDescriptor$4.exports=function F(W,q){return Object$2.getOwnPropertyDescriptor(W,q)};Object$2.getOwnPropertyDescriptor.sham&&(getOwnPropertyDescriptor$3.sham=!0);var getOwnPropertyDescriptorExports=getOwnPropertyDescriptor$4.exports,parent$E=getOwnPropertyDescriptorExports,getOwnPropertyDescriptor$2=parent$E,getOwnPropertyDescriptor$1=getOwnPropertyDescriptor$2,_Object$getOwnPropertyDescriptor=getDefaultExportFromCjs(getOwnPropertyDescriptor$1),getBuiltIn$1=getBuiltIn$c,uncurryThis$b=functionUncurryThis,getOwnPropertyNamesModule$1=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$4=anObject$b,concat$5=uncurryThis$b([].concat),ownKeys$6=getBuiltIn$1("Reflect","ownKeys")||function F(W){var q=getOwnPropertyNamesModule$1.f(anObject$4(W)),K=getOwnPropertySymbolsModule$1.f;return K?concat$5(q,K(W)):q},$$s=_export,DESCRIPTORS$7=descriptors,ownKeys$5=ownKeys$6,toIndexedObject$2=toIndexedObject$b,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,createProperty$3=createProperty$6;$$s({target:"Object",stat:!0,sham:!DESCRIPTORS$7},{getOwnPropertyDescriptors:function F(W){for(var q=toIndexedObject$2(W),K=getOwnPropertyDescriptorModule.f,X=ownKeys$5(q),tt={},rt=0,ot,ut;X.length>rt;)ut=K(q,ot=X[rt++]),ut!==void 0&&createProperty$3(tt,ot,ut);return tt}});var path$d=path$s,getOwnPropertyDescriptors$2=path$d.Object.getOwnPropertyDescriptors,parent$D=getOwnPropertyDescriptors$2,getOwnPropertyDescriptors$1=parent$D,getOwnPropertyDescriptors=getOwnPropertyDescriptors$1,_Object$getOwnPropertyDescriptors=getDefaultExportFromCjs(getOwnPropertyDescriptors),defineProperties$4={exports:{}},$$r=_export,DESCRIPTORS$6=descriptors,defineProperties$3=objectDefineProperties.f;$$r({target:"Object",stat:!0,forced:Object.defineProperties!==defineProperties$3,sham:!DESCRIPTORS$6},{defineProperties:defineProperties$3});var path$c=path$s,Object$1=path$c.Object,defineProperties$2=defineProperties$4.exports=function F(W,q){return Object$1.defineProperties(W,q)};Object$1.defineProperties.sham&&(defineProperties$2.sham=!0);var definePropertiesExports=defineProperties$4.exports,parent$C=definePropertiesExports,defineProperties$1=parent$C,defineProperties=defineProperties$1,_Object$defineProperties=getDefaultExportFromCjs(defineProperties);function _defineProperty(F,W,q){return W=_toPropertyKey(W),W in F?_Object$defineProperty$1(F,W,{value:q,enumerable:!0,configurable:!0,writable:!0}):F[W]=q,F}var $$q=_export,$map=arrayIteration.map,arrayMethodHasSpeciesSupport$2=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$2=arrayMethodHasSpeciesSupport$2("map");$$q({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$2},{map:function F(W){return $map(this,W,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$g=entryVirtual$k,map$3=entryVirtual$g("Array").map,isPrototypeOf$h=objectIsPrototypeOf,method$e=map$3,ArrayPrototype$f=Array.prototype,map$2=function(F){var W=F.map;return F===ArrayPrototype$f||isPrototypeOf$h(ArrayPrototype$f,F)&&W===ArrayPrototype$f.map?method$e:W},parent$B=map$2,map$1=parent$B,map=map$1,_mapInstanceProperty=getDefaultExportFromCjs(map),aCallable$2=aCallable$7,toObject$7=toObject$e,IndexedObject$1=indexedObject,lengthOfArrayLike$7=lengthOfArrayLike$c,$TypeError$6=TypeError,createMethod$2=function(F){return function(W,q,K,X){aCallable$2(q);var tt=toObject$7(W),rt=IndexedObject$1(tt),ot=lengthOfArrayLike$7(tt),ut=F?ot-1:0,yn=F?-1:1;if(K<2)for(;;){if(ut in rt){X=rt[ut],ut+=yn;break}if(ut+=yn,F?ut<0:ot<=ut)throw new $TypeError$6("Reduce of empty array with no initial value")}for(;F?ut>=0:ot>ut;ut+=yn)ut in rt&&(X=q(X,rt[ut],ut,tt));return X}},arrayReduce={left:createMethod$2(!1),right:createMethod$2(!0)},global$4=global$l,classof$3=classofRaw$2,engineIsNode=classof$3(global$4.process)==="process",$$p=_export,$reduce=arrayReduce.left,arrayMethodIsStrict$4=arrayMethodIsStrict$6,CHROME_VERSION=engineV8Version,IS_NODE=engineIsNode,CHROME_BUG=!IS_NODE&&CHROME_VERSION>79&&CHROME_VERSION<83,FORCED$5=CHROME_BUG||!arrayMethodIsStrict$4("reduce");$$p({target:"Array",proto:!0,forced:FORCED$5},{reduce:function F(W){var q=arguments.length;return $reduce(this,W,q,q>1?arguments[1]:void 0)}});var entryVirtual$f=entryVirtual$k,reduce$3=entryVirtual$f("Array").reduce,isPrototypeOf$g=objectIsPrototypeOf,method$d=reduce$3,ArrayPrototype$e=Array.prototype,reduce$2=function(F){var W=F.reduce;return F===ArrayPrototype$e||isPrototypeOf$g(ArrayPrototype$e,F)&&W===ArrayPrototype$e.reduce?method$d:W},parent$A=reduce$2,reduce$1=parent$A,reduce=reduce$1,_reduceInstanceProperty=getDefaultExportFromCjs(reduce),$$o=_export,toObject$6=toObject$e,nativeKeys=objectKeys$4,fails$b=fails$v,FAILS_ON_PRIMITIVES$1=fails$b(function(){nativeKeys(1)});$$o({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$1},{keys:function F(W){return nativeKeys(toObject$6(W))}});var path$b=path$s,keys$2=path$b.Object.keys,parent$z=keys$2,keys$1=parent$z,keys=keys$1,_Object$keys=getDefaultExportFromCjs(keys),defineProperty$3=defineProperty$b,_Object$defineProperty=getDefaultExportFromCjs(defineProperty$3),call$4=functionCall,anObject$3=anObject$b,getMethod$1=getMethod$3,iteratorClose$2=function(F,W,q){var K,X;anObject$3(F);try{if(K=getMethod$1(F,"return"),!K){if(W==="throw")throw q;return q}K=call$4(K,F)}catch(tt){X=!0,K=tt}if(W==="throw")throw q;if(X)throw K;return anObject$3(K),q},anObject$2=anObject$b,iteratorClose$1=iteratorClose$2,callWithSafeIterationClosing$1=function(F,W,q,K){try{return K?W(anObject$2(q)[0],q[1]):W(q)}catch(X){iteratorClose$1(F,"throw",X)}},wellKnownSymbol$6=wellKnownSymbol$m,Iterators$1=iterators,ITERATOR$4=wellKnownSymbol$6("iterator"),ArrayPrototype$d=Array.prototype,isArrayIteratorMethod$2=function(F){return F!==void 0&&(Iterators$1.Array===F||ArrayPrototype$d[ITERATOR$4]===F)},classof$2=classof$c,getMethod=getMethod$3,isNullOrUndefined$2=isNullOrUndefined$5,Iterators=iterators,wellKnownSymbol$5=wellKnownSymbol$m,ITERATOR$3=wellKnownSymbol$5("iterator"),getIteratorMethod$9=function(F){if(!isNullOrUndefined$2(F))return getMethod(F,ITERATOR$3)||getMethod(F,"@@iterator")||Iterators[classof$2(F)]},call$3=functionCall,aCallable$1=aCallable$7,anObject$1=anObject$b,tryToString$2=tryToString$6,getIteratorMethod$8=getIteratorMethod$9,$TypeError$5=TypeError,getIterator$2=function(F,W){var q=arguments.length<2?getIteratorMethod$8(F):W;if(aCallable$1(q))return anObject$1(call$3(q,F));throw new $TypeError$5(tryToString$2(F)+" is not iterable")},bind$2=functionBindContext,call$2=functionCall,toObject$5=toObject$e,callWithSafeIterationClosing=callWithSafeIterationClosing$1,isArrayIteratorMethod$1=isArrayIteratorMethod$2,isConstructor$1=isConstructor$4,lengthOfArrayLike$6=lengthOfArrayLike$c,createProperty$2=createProperty$6,getIterator$1=getIterator$2,getIteratorMethod$7=getIteratorMethod$9,$Array$1=Array,arrayFrom=function F(W){var q=toObject$5(W),K=isConstructor$1(this),X=arguments.length,tt=X>1?arguments[1]:void 0,rt=tt!==void 0;rt&&(tt=bind$2(tt,X>2?arguments[2]:void 0));var ot=getIteratorMethod$7(q),ut=0,yn,uo,po,mo,wo,lf;if(ot&&!(this===$Array$1&&isArrayIteratorMethod$1(ot)))for(mo=getIterator$1(q,ot),wo=mo.next,uo=K?new this:[];!(po=call$2(wo,mo)).done;ut++)lf=rt?callWithSafeIterationClosing(mo,tt,[po.value,ut],!0):po.value,createProperty$2(uo,ut,lf);else for(yn=lengthOfArrayLike$6(q),uo=K?new this(yn):$Array$1(yn);yn>ut;ut++)lf=rt?tt(q[ut],ut):q[ut],createProperty$2(uo,ut,lf);return uo.length=ut,uo},wellKnownSymbol$4=wellKnownSymbol$m,ITERATOR$2=wellKnownSymbol$4("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$2]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch(F){}var checkCorrectnessOfIteration$1=function(F,W){try{if(!W&&!SAFE_CLOSING)return!1}catch{return!1}var q=!1;try{var K={};K[ITERATOR$2]=function(){return{next:function(){return{done:q=!0}}}},F(K)}catch{}return q},$$n=_export,from$6=arrayFrom,checkCorrectnessOfIteration=checkCorrectnessOfIteration$1,INCORRECT_ITERATION=!checkCorrectnessOfIteration(function(F){Array.from(F)});$$n({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from:from$6});var path$a=path$s,from$5=path$a.Array.from,parent$y=from$5,from$4=parent$y,from$3=from$4,_Array$from$1=getDefaultExportFromCjs(from$3),getIteratorMethod$6=getIteratorMethod$9,getIteratorMethod_1=getIteratorMethod$6,parent$x=getIteratorMethod_1,getIteratorMethod$5=parent$x,parent$w=getIteratorMethod$5,getIteratorMethod$4=parent$w,parent$v=getIteratorMethod$4,getIteratorMethod$3=parent$v,getIteratorMethod$2=getIteratorMethod$3,_getIteratorMethod$1=getDefaultExportFromCjs(getIteratorMethod$2),getIteratorMethod$1=getIteratorMethod$2,_getIteratorMethod=getDefaultExportFromCjs(getIteratorMethod$1),parent$u=isArray$7,isArray$5=parent$u,parent$t=isArray$5,isArray$4=parent$t,isArray$3=isArray$4,_Array$isArray=getDefaultExportFromCjs(isArray$3);function _arrayWithHoles(F){if(_Array$isArray(F))return F}var DESCRIPTORS$5=descriptors,isArray$2=isArray$d,$TypeError$4=TypeError,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET=DESCRIPTORS$5&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(F){return F instanceof TypeError}}(),arraySetLength=SILENT_ON_NON_WRITABLE_LENGTH_SET?function(F,W){if(isArray$2(F)&&!getOwnPropertyDescriptor(F,"length").writable)throw new $TypeError$4("Cannot set read only .length");return F.length=W}:function(F,W){return F.length=W},$$m=_export,toObject$4=toObject$e,lengthOfArrayLike$5=lengthOfArrayLike$c,setArrayLength$1=arraySetLength,doesNotExceedSafeInteger$1=doesNotExceedSafeInteger$3,fails$a=fails$v,INCORRECT_TO_LENGTH=fails$a(function(){return[].push.call({length:4294967296},1)!==4294967297}),properErrorOnNonWritableLength=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(F){return F instanceof TypeError}},FORCED$4=INCORRECT_TO_LENGTH||!properErrorOnNonWritableLength();$$m({target:"Array",proto:!0,arity:1,forced:FORCED$4},{push:function F(W){var q=toObject$4(this),K=lengthOfArrayLike$5(q),X=arguments.length;doesNotExceedSafeInteger$1(K+X);for(var tt=0;ttF.length)&&(W=F.length);for(var q=0,K=new Array(W);qX-ut+ot;uo--)deletePropertyOrThrow$1(K,uo-1)}else if(ot>ut)for(uo=X-ut;uo>tt;uo--)po=uo+ut-1,mo=uo+ot-1,po in K?K[mo]=K[po]:deletePropertyOrThrow$1(K,mo);for(uo=0;uott;)for(var ut=IndexedObject(arguments[tt++]),yn=rt?concat(objectKeys$1(ut),rt(ut)):objectKeys$1(ut),uo=yn.length,po=0,mo;uo>po;)mo=yn[po++],(!DESCRIPTORS$4||call$1(ot,ut,mo))&&(K[mo]=ut[mo]);return K}:$assign,$$g=_export,assign$5=objectAssign;$$g({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign$5},{assign:assign$5});var path$7=path$s,assign$4=path$7.Object.assign,parent$f=assign$4,assign$3=parent$f,assign$2=assign$3,_Object$assign=getDefaultExportFromCjs(assign$2),$$f=_export,$includes=arrayIncludes.includes,fails$8=fails$v,BROKEN_ON_SPARSE=fails$8(function(){return!Array(1).includes()});$$f({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function F(W){return $includes(this,W,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$9=entryVirtual$k,includes$4=entryVirtual$9("Array").includes,isObject$4=isObject$g,classof$1=classofRaw$2,wellKnownSymbol$2=wellKnownSymbol$m,MATCH$1=wellKnownSymbol$2("match"),isRegexp=function(F){var W;return isObject$4(F)&&((W=F[MATCH$1])!==void 0?!!W:classof$1(F)==="RegExp")},isRegExp=isRegexp,$TypeError$2=TypeError,notARegexp=function(F){if(isRegExp(F))throw new $TypeError$2("The method doesn't accept regular expressions");return F},wellKnownSymbol$1=wellKnownSymbol$m,MATCH=wellKnownSymbol$1("match"),correctIsRegexpLogic=function(F){var W=/./;try{"/./"[F](W)}catch{try{return W[MATCH]=!1,"/./"[F](W)}catch{}}return!1},$$e=_export,uncurryThis$7=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible$2=requireObjectCoercible$6,toString$5=toString$b,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf=uncurryThis$7("".indexOf);$$e({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function F(W){return!!~stringIndexOf(toString$5(requireObjectCoercible$2(this)),toString$5(notARegExp(W)),arguments.length>1?arguments[1]:void 0)}});var entryVirtual$8=entryVirtual$k,includes$3=entryVirtual$8("String").includes,isPrototypeOf$a=objectIsPrototypeOf,arrayMethod=includes$4,stringMethod=includes$3,ArrayPrototype$7=Array.prototype,StringPrototype$1=String.prototype,includes$2=function(F){var W=F.includes;return F===ArrayPrototype$7||isPrototypeOf$a(ArrayPrototype$7,F)&&W===ArrayPrototype$7.includes?arrayMethod:typeof F=="string"||F===StringPrototype$1||isPrototypeOf$a(StringPrototype$1,F)&&W===StringPrototype$1.includes?stringMethod:W},parent$e=includes$2,includes$1=parent$e,includes=includes$1,_includesInstanceProperty=getDefaultExportFromCjs(includes),getPrototypeOf=getPrototypeOf$4,_Object$getPrototypeOf=getDefaultExportFromCjs(getPrototypeOf),DESCRIPTORS$3=descriptors,fails$7=fails$v,uncurryThis$6=functionUncurryThis,objectGetPrototypeOf=objectGetPrototypeOf$1,objectKeys=objectKeys$4,toIndexedObject=toIndexedObject$b,$propertyIsEnumerable=objectPropertyIsEnumerable.f,propertyIsEnumerable=uncurryThis$6($propertyIsEnumerable),push$1=uncurryThis$6([].push),IE_BUG=DESCRIPTORS$3&&fails$7(function(){var F=Object.create(null);return F[2]=2,!propertyIsEnumerable(F,2)}),createMethod$1=function(F){return function(W){for(var q=toIndexedObject(W),K=objectKeys(q),X=IE_BUG&&objectGetPrototypeOf(q)===null,tt=K.length,rt=0,ot=[],ut;tt>rt;)ut=K[rt++],(!DESCRIPTORS$3||(X?ut in q:propertyIsEnumerable(q,ut)))&&push$1(ot,F?[ut,q[ut]]:q[ut]);return ot}},objectToArray={entries:createMethod$1(!0),values:createMethod$1(!1)},$$d=_export,$values=objectToArray.values;$$d({target:"Object",stat:!0},{values:function F(W){return $values(W)}});var path$6=path$s,values$2=path$6.Object.values,parent$d=values$2,values$1=parent$d,values=values$1,_Object$values2=getDefaultExportFromCjs(values),whitespaces$3=` \v\f\r                 \u2028\u2029\uFEFF`,uncurryThis$5=functionUncurryThis,requireObjectCoercible$1=requireObjectCoercible$6,toString$4=toString$b,whitespaces$2=whitespaces$3,replace=uncurryThis$5("".replace),ltrim=RegExp("^["+whitespaces$2+"]+"),rtrim=RegExp("(^|[^"+whitespaces$2+"])["+whitespaces$2+"]+$"),createMethod=function(F){return function(W){var q=toString$4(requireObjectCoercible$1(W));return F&1&&(q=replace(q,ltrim,"")),F&2&&(q=replace(q,rtrim,"$1")),q}},stringTrim={start:createMethod(1),end:createMethod(2),trim:createMethod(3)},global$3=global$l,fails$6=fails$v,uncurryThis$4=functionUncurryThis,toString$3=toString$b,trim$1=stringTrim.trim,whitespaces$1=whitespaces$3,$parseInt$1=global$3.parseInt,Symbol$2=global$3.Symbol,ITERATOR$1=Symbol$2&&Symbol$2.iterator,hex=/^[+-]?0x/i,exec=uncurryThis$4(hex.exec),FORCED$3=$parseInt$1(whitespaces$1+"08")!==8||$parseInt$1(whitespaces$1+"0x16")!==22||ITERATOR$1&&!fails$6(function(){$parseInt$1(Object(ITERATOR$1))}),numberParseInt=FORCED$3?function F(W,q){var K=trim$1(toString$3(W));return $parseInt$1(K,q>>>0||(exec(hex,K)?16:10))}:$parseInt$1,$$c=_export,$parseInt=numberParseInt;$$c({global:!0,forced:parseInt!==$parseInt},{parseInt:$parseInt});var path$5=path$s,_parseInt$3=path$5.parseInt,parent$c=_parseInt$3,_parseInt$2=parent$c,_parseInt=_parseInt$2,_parseInt$1=getDefaultExportFromCjs(_parseInt),$$b=_export,uncurryThis$3=functionUncurryThisClause,$indexOf=arrayIncludes.indexOf,arrayMethodIsStrict$3=arrayMethodIsStrict$6,nativeIndexOf=uncurryThis$3([].indexOf),NEGATIVE_ZERO=!!nativeIndexOf&&1/nativeIndexOf([1],1,-0)<0,FORCED$2=NEGATIVE_ZERO||!arrayMethodIsStrict$3("indexOf");$$b({target:"Array",proto:!0,forced:FORCED$2},{indexOf:function F(W){var q=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO?nativeIndexOf(this,W,q)||0:$indexOf(this,W,q)}});var entryVirtual$7=entryVirtual$k,indexOf$3=entryVirtual$7("Array").indexOf,isPrototypeOf$9=objectIsPrototypeOf,method$7=indexOf$3,ArrayPrototype$6=Array.prototype,indexOf$2=function(F){var W=F.indexOf;return F===ArrayPrototype$6||isPrototypeOf$9(ArrayPrototype$6,F)&&W===ArrayPrototype$6.indexOf?method$7:W},parent$b=indexOf$2,indexOf$1=parent$b,indexOf=indexOf$1,_indexOfInstanceProperty=getDefaultExportFromCjs(indexOf),$$a=_export,$entries=objectToArray.entries;$$a({target:"Object",stat:!0},{entries:function F(W){return $entries(W)}});var path$4=path$s,entries$2=path$4.Object.entries,parent$a=entries$2,entries$1=parent$a,entries=entries$1,_Object$entries2=getDefaultExportFromCjs(entries),create$1=create$5,_Object$create=getDefaultExportFromCjs(create$1),path$3=path$s,apply=functionApply;path$3.JSON||(path$3.JSON={stringify:JSON.stringify});var stringify$2=function F(W,q,K){return apply(path$3.JSON.stringify,null,arguments)},parent$9=stringify$2,stringify$1=parent$9,stringify=stringify$1,_JSON$stringify=getDefaultExportFromCjs(stringify),toObject$1=toObject$e,toAbsoluteIndex=toAbsoluteIndex$5,lengthOfArrayLike$2=lengthOfArrayLike$c,arrayFill=function F(W){for(var q=toObject$1(this),K=lengthOfArrayLike$2(q),X=arguments.length,tt=toAbsoluteIndex(X>1?arguments[1]:void 0,K),rt=X>2?arguments[2]:void 0,ot=rt===void 0?K:toAbsoluteIndex(rt,K);ot>tt;)q[tt++]=W;return q},$$9=_export,fill$4=arrayFill;$$9({target:"Array",proto:!0},{fill:fill$4});var entryVirtual$6=entryVirtual$k,fill$3=entryVirtual$6("Array").fill,isPrototypeOf$8=objectIsPrototypeOf,method$6=fill$3,ArrayPrototype$5=Array.prototype,fill$2=function(F){var W=F.fill;return F===ArrayPrototype$5||isPrototypeOf$8(ArrayPrototype$5,F)&&W===ArrayPrototype$5.fill?method$6:W},parent$8=fill$2,fill$1=parent$8,fill=fill$1,_fillInstanceProperty=getDefaultExportFromCjs(fill),componentEmitter={exports:{}};(function(F){F.exports=W;function W(K){if(K)return q(K)}function q(K){for(var X in W.prototype)K[X]=W.prototype[X];return K}W.prototype.on=W.prototype.addEventListener=function(K,X){return this._callbacks=this._callbacks||{},(this._callbacks["$"+K]=this._callbacks["$"+K]||[]).push(X),this},W.prototype.once=function(K,X){function tt(){this.off(K,tt),X.apply(this,arguments)}return tt.fn=X,this.on(K,tt),this},W.prototype.off=W.prototype.removeListener=W.prototype.removeAllListeners=W.prototype.removeEventListener=function(K,X){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var tt=this._callbacks["$"+K];if(!tt)return this;if(arguments.length==1)return delete this._callbacks["$"+K],this;for(var rt,ot=0;ot/g,REGEXP_QUOTE=/"/g,REGEXP_QUOTE_2=/"/g,REGEXP_ATTR_VALUE_1=/&#([a-zA-Z0-9]*);?/gim,REGEXP_ATTR_VALUE_COLON=/:?/gim,REGEXP_ATTR_VALUE_NEWLINE=/&newline;?/gim,REGEXP_DEFAULT_ON_TAG_ATTR_4=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,REGEXP_DEFAULT_ON_TAG_ATTR_7=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,REGEXP_DEFAULT_ON_TAG_ATTR_8=/u\s*r\s*l\s*\(.*/gi;function escapeQuote(F){return F.replace(REGEXP_QUOTE,""")}function unescapeQuote(F){return F.replace(REGEXP_QUOTE_2,'"')}function escapeHtmlEntities(F){return F.replace(REGEXP_ATTR_VALUE_1,function(q,K){return K[0]==="x"||K[0]==="X"?String.fromCharCode(parseInt(K.substr(1),16)):String.fromCharCode(parseInt(K,10))})}function escapeDangerHtml5Entities(F){return F.replace(REGEXP_ATTR_VALUE_COLON,":").replace(REGEXP_ATTR_VALUE_NEWLINE," ")}function clearNonPrintableCharacter(F){for(var W="",q=0,K=F.length;q",K);if(X===-1)break;q=X+3}return W}function stripBlankChar(F){var W=F.split("");return W=W.filter(function(q){var K=q.charCodeAt(0);return K===127?!1:K<=31?K===10||K===13:!0}),W.join("")}_default$1.whiteList=getDefaultWhiteList();_default$1.getDefaultWhiteList=getDefaultWhiteList;_default$1.onTag=onTag;_default$1.onIgnoreTag=onIgnoreTag;_default$1.onTagAttr=onTagAttr;_default$1.onIgnoreTagAttr=onIgnoreTagAttr;_default$1.safeAttrValue=safeAttrValue;_default$1.escapeHtml=escapeHtml;_default$1.escapeQuote=escapeQuote;_default$1.unescapeQuote=unescapeQuote;_default$1.escapeHtmlEntities=escapeHtmlEntities;_default$1.escapeDangerHtml5Entities=escapeDangerHtml5Entities;_default$1.clearNonPrintableCharacter=clearNonPrintableCharacter;_default$1.friendlyAttrValue=friendlyAttrValue;_default$1.escapeAttrValue=escapeAttrValue;_default$1.onIgnoreTagStripAll=onIgnoreTagStripAll;_default$1.StripTagBody=StripTagBody;_default$1.stripCommentTag=stripCommentTag;_default$1.stripBlankChar=stripBlankChar;_default$1.cssFilter=defaultCSSFilter;_default$1.getDefaultCSSWhiteList=getDefaultCSSWhiteList;var parser$1={},_$1=util;function getTagName(F){var W=_$1.spaceIndex(F),q;return W===-1?q=F.slice(1,-1):q=F.slice(1,W+1),q=_$1.trim(q).toLowerCase(),q.slice(0,1)==="/"&&(q=q.slice(1)),q.slice(-1)==="/"&&(q=q.slice(0,-1)),q}function isClosing(F){return F.slice(0,2)===""||ot===ut-1){K+=q(F.slice(X,tt)),uo=F.slice(tt,ot+1),yn=getTagName(uo),K+=W(tt,K.length,yn,uo,isClosing(uo)),X=ot+1,tt=!1;continue}if(po==='"'||po==="'")for(var mo=1,wo=F.charAt(ot-mo);wo.trim()===""||wo==="=";){if(wo==="="){rt=po;continue e}wo=F.charAt(ot-++mo)}}else if(po===rt){rt=!1;continue}}return X0;W--){var q=F[W];if(q!==" ")return q==="="?W:-1}}function isQuoteWrapString(F){return F[0]==='"'&&F[F.length-1]==='"'||F[0]==="'"&&F[F.length-1]==="'"}function stripQuoteWrap(F){return isQuoteWrapString(F)?F.substr(1,F.length-2):F}parser$1.parseTag=parseTag$1;parser$1.parseAttr=parseAttr$1;var FilterCSS=libExports$1.FilterCSS,DEFAULT=_default$1,parser=parser$1,parseTag=parser.parseTag,parseAttr=parser.parseAttr,_=util;function isNull(F){return F==null}function getAttrs(F){var W=_.spaceIndex(F);if(W===-1)return{html:"",closing:F[F.length-2]==="/"};F=_.trim(F.slice(W+1,-1));var q=F[F.length-1]==="/";return q&&(F=_.trim(F.slice(0,-1))),{html:F,closing:q}}function shallowCopyObject(F){var W={};for(var q in F)W[q]=F[q];return W}function keysToLowerCase(F){var W={};for(var q in F)Array.isArray(F[q])?W[q.toLowerCase()]=F[q].map(function(K){return K.toLowerCase()}):W[q.toLowerCase()]=F[q];return W}function FilterXSS(F){F=shallowCopyObject(F||{}),F.stripIgnoreTag&&(F.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),F.onIgnoreTag=DEFAULT.onIgnoreTagStripAll),F.whiteList||F.allowList?F.whiteList=keysToLowerCase(F.whiteList||F.allowList):F.whiteList=DEFAULT.whiteList,F.onTag=F.onTag||DEFAULT.onTag,F.onTagAttr=F.onTagAttr||DEFAULT.onTagAttr,F.onIgnoreTag=F.onIgnoreTag||DEFAULT.onIgnoreTag,F.onIgnoreTagAttr=F.onIgnoreTagAttr||DEFAULT.onIgnoreTagAttr,F.safeAttrValue=F.safeAttrValue||DEFAULT.safeAttrValue,F.escapeHtml=F.escapeHtml||DEFAULT.escapeHtml,this.options=F,F.css===!1?this.cssFilter=!1:(F.css=F.css||{},this.cssFilter=new FilterCSS(F.css))}FilterXSS.prototype.process=function(F){if(F=F||"",F=F.toString(),!F)return"";var W=this,q=W.options,K=q.whiteList,X=q.onTag,tt=q.onIgnoreTag,rt=q.onTagAttr,ot=q.onIgnoreTagAttr,ut=q.safeAttrValue,yn=q.escapeHtml,uo=W.cssFilter;q.stripBlankChar&&(F=DEFAULT.stripBlankChar(F)),q.allowCommentTag||(F=DEFAULT.stripCommentTag(F));var po=!1;q.stripIgnoreTagBody&&(po=DEFAULT.StripTagBody(q.stripIgnoreTagBody,tt),tt=po.onIgnoreTag);var mo=parseTag(F,function(wo,lf,yf,cf,vf){var _f={sourcePosition:wo,position:lf,isClosing:vf,isWhite:Object.prototype.hasOwnProperty.call(K,yf)},$f=X(yf,cf,_f);if(!isNull($f))return $f;if(_f.isWhite){if(_f.isClosing)return"";var wf=getAttrs(cf),Pf=K[yf],Cf=parseAttr(wf.html,function(Af,Bf){var Hf=_.indexOf(Pf,Af)!==-1,Df=rt(yf,Af,Bf,Hf);return isNull(Df)?Hf?(Bf=ut(yf,Af,Bf,uo),Bf?Af+'="'+Bf+'"':Af):(Df=ot(yf,Af,Bf,Hf),isNull(Df)?void 0:Df):Df});return cf="<"+yf,Cf&&(cf+=" "+Cf),wf.closing&&(cf+=" /"),cf+=">",cf}else return $f=tt(yf,cf,_f),isNull($f)?yn(cf):$f},yn);return po&&(mo=po.remove(mo)),mo};var xss=FilterXSS;(function(F,W){var q=_default$1,K=parser$1,X=xss;function tt(ot,ut){var yn=new X(ut);return yn.process(ot)}W=F.exports=tt,W.filterXSS=tt,W.FilterXSS=X,function(){for(var ot in q)W[ot]=q[ot];for(var ut in K)W[ut]=K[ut]}(),typeof window<"u"&&(window.filterXSS=F.exports);function rt(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}rt()&&(self.filterXSS=F.exports)})(lib$1,lib$1.exports);var libExports=lib$1.exports,xssFilter=getDefaultExportFromCjs(libExports);let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const byteToHex=[];for(let F=0;F<256;++F)byteToHex.push((F+256).toString(16).slice(1));function unsafeStringify(F,W=0){return byteToHex[F[W+0]]+byteToHex[F[W+1]]+byteToHex[F[W+2]]+byteToHex[F[W+3]]+"-"+byteToHex[F[W+4]]+byteToHex[F[W+5]]+"-"+byteToHex[F[W+6]]+byteToHex[F[W+7]]+"-"+byteToHex[F[W+8]]+byteToHex[F[W+9]]+"-"+byteToHex[F[W+10]]+byteToHex[F[W+11]]+byteToHex[F[W+12]]+byteToHex[F[W+13]]+byteToHex[F[W+14]]+byteToHex[F[W+15]]}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var native={randomUUID};function v4(F,W,q){if(native.randomUUID&&!W&&!F)return native.randomUUID();F=F||{};const K=F.random||(F.rng||rng)();if(K[6]=K[6]&15|64,K[8]=K[8]&63|128,W){q=q||0;for(let X=0;X<16;++X)W[q+X]=K[X];return W}return unsafeStringify(K)}function ownKeys(F,W){var q=_Object$keys(F);if(_Object$getOwnPropertySymbols){var K=_Object$getOwnPropertySymbols(F);W&&(K=_filterInstanceProperty(K).call(K,function(X){return _Object$getOwnPropertyDescriptor(F,X).enumerable})),q.push.apply(q,K)}return q}function _objectSpread(F){for(var W=1;W1&&arguments[1]!==void 0?arguments[1]:{start:"Date",end:"Date"},ut=F._idProp,yn=new DataSet({fieldId:ut}),uo=_mapInstanceProperty(W=createNewDataPipeFrom(F)).call(W,function(po){var mo;return _reduceInstanceProperty(mo=_Object$keys(po)).call(mo,function(wo,lf){return wo[lf]=convert(po[lf],ot[lf]),wo},{})}).to(yn);return uo.all().start(),{add:function(){var mo;return(mo=F.getDataSet()).add.apply(mo,arguments)},remove:function(){var mo;return(mo=F.getDataSet()).remove.apply(mo,arguments)},update:function(){var mo;return(mo=F.getDataSet()).update.apply(mo,arguments)},updateOnly:function(){var mo;return(mo=F.getDataSet()).updateOnly.apply(mo,arguments)},clear:function(){var mo;return(mo=F.getDataSet()).clear.apply(mo,arguments)},forEach:_bindInstanceProperty(q=_forEachInstanceProperty(yn)).call(q,yn),get:_bindInstanceProperty(K=yn.get).call(K,yn),getIds:_bindInstanceProperty(X=yn.getIds).call(X,yn),off:_bindInstanceProperty(tt=yn.off).call(tt,yn),on:_bindInstanceProperty(rt=yn.on).call(rt,yn),get length(){return yn.length},idProp:ut,type:ot,rawDS:F,coercedDS:yn,dispose:function(){return uo.stop()}}}var setupXSSCleaner=function F(W){var q=new xssFilter.FilterXSS(W);return function(K){return q.process(K)}},setupNoOpCleaner=function F(W){return W},configuredXSSProtection=setupXSSCleaner(),setupXSSProtection=function F(W){W&&(W.disabled===!0?(configuredXSSProtection=setupNoOpCleaner,console.warn("You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!")):W.filterOptions&&(configuredXSSProtection=setupXSSCleaner(W.filterOptions)))},availableUtils=_objectSpread(_objectSpread({},util$2),{},{convert,setupXSSProtection});_Object$defineProperty(availableUtils,"xss",{get:function F(){return configuredXSSProtection}});var global$2=global$l,fails$5=fails$v,uncurryThis$2=functionUncurryThis,toString$2=toString$b,trim=stringTrim.trim,whitespaces=whitespaces$3,charAt=uncurryThis$2("".charAt),$parseFloat$1=global$2.parseFloat,Symbol$1=global$2.Symbol,ITERATOR=Symbol$1&&Symbol$1.iterator,FORCED$1=1/$parseFloat$1(whitespaces+"-0")!==-1/0||ITERATOR&&!fails$5(function(){$parseFloat$1(Object(ITERATOR))}),numberParseFloat=FORCED$1?function F(W){var q=trim(toString$2(W)),K=$parseFloat$1(q);return K===0&&charAt(q,0)==="-"?-0:K}:$parseFloat$1,$$8=_export,$parseFloat=numberParseFloat;$$8({global:!0,forced:parseFloat!==$parseFloat},{parseFloat:$parseFloat});var path$2=path$s,_parseFloat$3=path$2.parseFloat,parent$7=_parseFloat$3,_parseFloat$2=parent$7,_parseFloat=_parseFloat$2,_parseFloat$1=getDefaultExportFromCjs(_parseFloat),Component=function(){function F(W,q){_classCallCheck(this,F),this.options=null,this.props=null}return _createClass(F,[{key:"setOptions",value:function(q){q&&availableUtils.extend(this.options,q)}},{key:"redraw",value:function(){return!1}},{key:"destroy",value:function(){}},{key:"_isResized",value:function(){var q=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,q}}]),F}(),toIntegerOrInfinity=toIntegerOrInfinity$5,toString$1=toString$b,requireObjectCoercible=requireObjectCoercible$6,$RangeError=RangeError,stringRepeat=function F(W){var q=toString$1(requireObjectCoercible(this)),K="",X=toIntegerOrInfinity(W);if(X<0||X===1/0)throw new $RangeError("Wrong number of repetitions");for(;X>0;(X>>>=1)&&(q+=q))X&1&&(K+=q);return K},$$7=_export,repeat$4=stringRepeat;$$7({target:"String",proto:!0},{repeat:repeat$4});var entryVirtual$5=entryVirtual$k,repeat$3=entryVirtual$5("String").repeat,isPrototypeOf$7=objectIsPrototypeOf,method$5=repeat$3,StringPrototype=String.prototype,repeat$2=function(F){var W=F.repeat;return typeof F=="string"||F===StringPrototype||isPrototypeOf$7(StringPrototype,F)&&W===StringPrototype.repeat?method$5:W},parent$6=repeat$2,repeat$1=parent$6,repeat=repeat$1,_repeatInstanceProperty=getDefaultExportFromCjs(repeat),arraySlice=arraySliceSimple,floor=Math.floor,mergeSort=function(F,W){var q=F.length,K=floor(q/2);return q<8?insertionSort(F,W):merge(F,mergeSort(arraySlice(F,0,K),W),mergeSort(arraySlice(F,K),W),W)},insertionSort=function(F,W){for(var q=F.length,K=1,X,tt;K0;)F[tt]=F[--tt];tt!==K++&&(F[tt]=X)}return F},merge=function(F,W,q,K){for(var X=W.length,tt=q.length,rt=0,ot=0;rt3)){if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<603;var F="",W,q,K,X;for(W=65;W<76;W++){switch(q=String.fromCharCode(W),W){case 66:case 69:case 70:case 72:K=3;break;case 68:case 71:K=4;break;default:K=2}for(X=0;X<47;X++)test.push({k:q+X,v:K})}for(test.sort(function(tt,rt){return rt.v-tt.v}),X=0;XtoString(q)?1:-1}};$$6({target:"Array",proto:!0,forced:FORCED},{sort:function F(W){W!==void 0&&aCallable(W);var q=toObject(this);if(STABLE_SORT)return W===void 0?nativeSort(q):nativeSort(q,W);var K=[],X=lengthOfArrayLike$1(q),tt,rt;for(rt=0;rt=4*rt){var po=0,mo=X.clone();switch(_repeatInstanceProperty(q[ot])){case"daily":ut.day()!=yn.day()&&(po=1),ut.dayOfYear(K.dayOfYear()),ut.year(K.year()),ut.subtract(7,"days"),yn.dayOfYear(K.dayOfYear()),yn.year(K.year()),yn.subtract(7-po,"days"),mo.add(1,"weeks");break;case"weekly":{var wo=yn.diff(ut,"days"),lf=ut.day();ut.date(K.date()),ut.month(K.month()),ut.year(K.year()),yn=ut.clone(),ut.day(lf),yn.day(lf),yn.add(wo,"days"),ut.subtract(1,"weeks"),yn.subtract(1,"weeks"),mo.add(1,"weeks");break}case"monthly":ut.month()!=yn.month()&&(po=1),ut.month(K.month()),ut.year(K.year()),ut.subtract(1,"months"),yn.month(K.month()),yn.year(K.year()),yn.subtract(1,"months"),yn.add(po,"months"),mo.add(1,"months");break;case"yearly":ut.year()!=yn.year()&&(po=1),ut.year(K.year()),ut.subtract(1,"years"),yn.year(K.year()),yn.subtract(1,"years"),yn.add(po,"years"),mo.add(1,"years");break;default:console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",_repeatInstanceProperty(q[ot]));return}for(;ut=q[X].start&&q[tt].end<=q[X].end?q[tt].remove=!0:q[tt].start>=q[X].start&&q[tt].start<=q[X].end?(q[X].end=q[tt].end,q[tt].remove=!0):q[tt].end>=q[X].start&&q[tt].end<=q[X].end&&(q[X].start=q[tt].start,q[tt].remove=!0));for(X=0;X=rt&&XF.range.end){var ot={start:F.range.start,end:W};return W=correctTimeForHidden(F.options.moment,F.body.hiddenDates,ot,W),K=F.range.conversion(q,tt),(W.valueOf()-K.offset)*K.scale}else return W=correctTimeForHidden(F.options.moment,F.body.hiddenDates,F.range,W),K=F.range.conversion(q,tt),(W.valueOf()-K.offset)*K.scale}function toTime(F,W,q){if(F.body.hiddenDates.length==0){var K=F.range.conversion(q);return new Date(W/K.scale+K.offset)}else{var X=getHiddenDurationBetween(F.body.hiddenDates,F.range.start,F.range.end),tt=F.range.end-F.range.start-X,rt=tt*W/q,ot=getAccumulatedHiddenDuration(F.body.hiddenDates,F.range,rt);return new Date(ot+rt+F.range.start)}}function getHiddenDurationBetween(F,W,q){for(var K=0,X=0;X=W&&rt=W&&rt<=q&&(K+=rt-tt)}return K}function correctTimeForHidden(F,W,q,K){return K=F(K).toDate().valueOf(),K-=getHiddenDurationBefore(F,W,q,K),K}function getHiddenDurationBefore(F,W,q,K){var X=0;K=F(K).toDate().valueOf();for(var tt=0;tt=q.start&&ot=ot&&(X+=ot-rt)}return X}function getAccumulatedHiddenDuration(F,W,q){for(var K=0,X=0,tt=W.start,rt=0;rt=W.start&&ut=q)break;K+=ut-ot}}return K}function snapAwayFromHidden(F,W,q,K){var X=getIsHidden(W,F);return X.hidden==!0?q<0?K==!0?X.startDate-(X.endDate-W)-1:X.startDate-1:K==!0?X.endDate+(W-X.startDate)+1:X.endDate+1:W}function getIsHidden(F,W){for(var q=0;q=K&&F"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var Range=function(F){_inherits(q,F);var W=_createSuper$c(q);function q(K,X){var tt,rt,ot,ut,yn,uo,po,mo;_classCallCheck(this,q),mo=W.call(this);var wo=moment$3().hours(0).minutes(0).seconds(0).milliseconds(0),lf=wo.clone().add(-3,"days").valueOf(),yf=wo.clone().add(3,"days").valueOf();return mo.millisecondsPerPixelCache=void 0,X===void 0?(mo.start=lf,mo.end=yf):(mo.start=X.start||lf,mo.end=X.end||yf),mo.rolling=!1,mo.body=K,mo.deltaDifference=0,mo.scaleOffset=0,mo.startToFront=!1,mo.endToFront=!0,mo.defaultOptions={rtl:!1,start:null,end:null,moment:moment$3,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:1e3*60*60*24*365*1e4,rollingMode:{follow:!1,offset:.5}},mo.options=availableUtils.extend({},mo.defaultOptions),mo.props={touch:{}},mo.animationTimer=null,mo.body.emitter.on("panstart",_bindInstanceProperty(tt=mo._onDragStart).call(tt,_assertThisInitialized$1(mo))),mo.body.emitter.on("panmove",_bindInstanceProperty(rt=mo._onDrag).call(rt,_assertThisInitialized$1(mo))),mo.body.emitter.on("panend",_bindInstanceProperty(ot=mo._onDragEnd).call(ot,_assertThisInitialized$1(mo))),mo.body.emitter.on("mousewheel",_bindInstanceProperty(ut=mo._onMouseWheel).call(ut,_assertThisInitialized$1(mo))),mo.body.emitter.on("touch",_bindInstanceProperty(yn=mo._onTouch).call(yn,_assertThisInitialized$1(mo))),mo.body.emitter.on("pinch",_bindInstanceProperty(uo=mo._onPinch).call(uo,_assertThisInitialized$1(mo))),mo.body.dom.rollingModeBtn.addEventListener("click",_bindInstanceProperty(po=mo.startRolling).call(po,_assertThisInitialized$1(mo))),mo.setOptions(X),mo}return _createClass(q,[{key:"setOptions",value:function(X){if(X){var tt=["animation","direction","min","max","zoomMin","zoomMax","moveable","zoomable","moment","activate","hiddenDates","zoomKey","zoomFriction","rtl","showCurrentTime","rollingMode","horizontalScroll"];availableUtils.selectiveExtend(tt,this.options,X),X.rollingMode&&X.rollingMode.follow&&this.startRolling(),("start"in X||"end"in X)&&this.setRange(X.start,X.end)}}},{key:"startRolling",value:function(){var X=this;function tt(){X.stopRolling(),X.rolling=!0;var rt=X.end-X.start,ot=availableUtils.convert(new Date,"Date").valueOf(),ut=X.options.rollingMode&&X.options.rollingMode.offset||.5,yn=ot-rt*ut,uo=ot+rt*(1-ut),po={animation:!1};X.setRange(yn,uo,po);var mo=X.conversion(X.body.domProps.center.width).scale;rt=1/mo/10,rt<30&&(rt=30),rt>1e3&&(rt=1e3),X.body.dom.rollingModeBtn.style.visibility="hidden",X.currentTimeTimer=_setTimeout(tt,rt)}tt()}},{key:"stopRolling",value:function(){this.currentTimeTimer!==void 0&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")}},{key:"setRange",value:function(X,tt,rt,ot,ut){rt||(rt={}),rt.byUser!==!0&&(rt.byUser=!1);var yn=this,uo=X!=null?availableUtils.convert(X,"Date").valueOf():null,po=tt!=null?availableUtils.convert(tt,"Date").valueOf():null;if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,rt.animation){var mo=this.start,wo=this.end,lf=_typeof(rt.animation)==="object"&&"duration"in rt.animation?rt.animation.duration:500,yf=_typeof(rt.animation)==="object"&&"easingFunction"in rt.animation?rt.animation.easingFunction:"easeInOutQuad",cf=availableUtils.easingFunctions[yf];if(!cf){var vf;throw new Error(_concatInstanceProperty(vf="Unknown easing function ".concat(_JSON$stringify(yf),". Choose from: ")).call(vf,_Object$keys(availableUtils.easingFunctions).join(", ")))}var _f=_Date$now(),$f=!1,wf=function Af(){if(!yn.props.touch.dragging){var Bf=_Date$now(),Hf=Bf-_f,Df=cf(Hf/lf),Lf=Hf>lf,kf=Lf||uo===null?uo:mo+(uo-mo)*Df,Nf=Lf||po===null?po:wo+(po-wo)*Df;Pf=yn._applyRange(kf,Nf),updateHiddenDates(yn.options.moment,yn.body,yn.options.hiddenDates),$f=$f||Pf;var Yf={start:new Date(yn.start),end:new Date(yn.end),byUser:rt.byUser,event:rt.event};if(ut&&ut(Df,Pf,Lf),Pf&&yn.body.emitter.emit("rangechange",Yf),Lf){if($f&&(yn.body.emitter.emit("rangechanged",Yf),ot))return ot()}else yn.animationTimer=_setTimeout(Af,20)}};return wf()}else{var Pf=this._applyRange(uo,po);if(updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),Pf){var Cf={start:new Date(this.start),end:new Date(this.end),byUser:rt.byUser,event:rt.event};if(this.body.emitter.emit("rangechange",Cf),clearTimeout(yn.timeoutID),yn.timeoutID=_setTimeout(function(){yn.body.emitter.emit("rangechanged",Cf)},200),ot)return ot()}}}},{key:"getMillisecondsPerPixel",value:function(){return this.millisecondsPerPixelCache===void 0&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache}},{key:"_cancelAnimation",value:function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)}},{key:"_applyRange",value:function(X,tt){var rt=X!=null?availableUtils.convert(X,"Date").valueOf():this.start,ot=tt!=null?availableUtils.convert(tt,"Date").valueOf():this.end,ut=this.options.max!=null?availableUtils.convert(this.options.max,"Date").valueOf():null,yn=this.options.min!=null?availableUtils.convert(this.options.min,"Date").valueOf():null,uo;if(isNaN(rt)||rt===null)throw new Error('Invalid start "'.concat(X,'"'));if(isNaN(ot)||ot===null)throw new Error('Invalid end "'.concat(tt,'"'));if(otut&&(ot=ut)),ut!==null&&ot>ut&&(uo=ot-ut,rt-=uo,ot-=uo,yn!=null&&rt=this.start-mo&&ot<=this.end?(rt=this.start,ot=this.end):(uo=po-(ot-rt),rt-=uo/2,ot+=uo/2)}}if(this.options.zoomMax!==null){var wo=_parseFloat$1(this.options.zoomMax);wo<0&&(wo=0),ot-rt>wo&&(this.end-this.start===wo&&rtthis.end?(rt=this.start,ot=this.end):(uo=ot-rt-wo,rt+=uo/2,ot-=uo/2))}var lf=this.start!=rt||this.end!=ot;return!(rt>=this.start&&rt<=this.end||ot>=this.start&&ot<=this.end)&&!(this.start>=rt&&this.start<=ot||this.end>=rt&&this.end<=ot)&&this.body.emitter.emit("checkRangedItems"),this.start=rt,this.end=ot,lf}},{key:"getRange",value:function(){return{start:this.start,end:this.end}}},{key:"conversion",value:function(X,tt){return q.conversion(this.start,this.end,X,tt)}},{key:"_onDragStart",value:function(X){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(X)&&this.props.touch.allowDragging&&(this.stopRolling(),this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))}},{key:"_onDrag",value:function(X){if(X&&this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var tt=this.options.direction;validateDirection(tt);var rt=tt=="horizontal"?X.deltaX:X.deltaY;rt-=this.deltaDifference;var ot=this.props.touch.end-this.props.touch.start,ut=getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);ot-=ut;var yn=tt=="horizontal"?this.body.domProps.center.width:this.body.domProps.center.height,uo;this.options.rtl?uo=rt/yn*ot:uo=-rt/yn*ot;var po=this.props.touch.start+uo,mo=this.props.touch.end+uo,wo=snapAwayFromHidden(this.body.hiddenDates,po,this.previousDelta-rt,!0),lf=snapAwayFromHidden(this.body.hiddenDates,mo,this.previousDelta-rt,!0);if(wo!=po||lf!=mo){this.deltaDifference+=rt,this.props.touch.start=wo,this.props.touch.end=lf,this._onDrag(X);return}this.previousDelta=rt,this._applyRange(po,mo);var yf=new Date(this.start),cf=new Date(this.end);this.body.emitter.emit("rangechange",{start:yf,end:cf,byUser:!0,event:X}),this.body.emitter.emit("panmove")}}},{key:"_onDragEnd",value:function(X){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:X}))}},{key:"_onMouseWheel",value:function(X){var tt=0;if(X.wheelDelta?tt=X.wheelDelta/120:X.detail?tt=-X.detail/3:X.deltaY&&(tt=-X.deltaY/3),!(this.options.zoomKey&&!X[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(X)&&tt){var rt=this.options.zoomFriction||5,ot;tt<0?ot=1-tt/rt:ot=1/(1+tt/rt);var ut;if(this.rolling){var yn=this.options.rollingMode&&this.options.rollingMode.offset||.5;ut=this.start+(this.end-this.start)*yn}else{var uo=this.getPointer({x:X.clientX,y:X.clientY},this.body.dom.center);ut=this._pointerToDate(uo)}this.zoom(ot,ut,tt,X),X.preventDefault()}}},{key:"_onTouch",value:function(X){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.props.touch.centerDate=null,this.scaleOffset=0,this.deltaDifference=0,availableUtils.preventDefault(X)}},{key:"_onPinch",value:function(X){if(this.options.zoomable&&this.options.moveable){availableUtils.preventDefault(X),this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(X.center,this.body.dom.center),this.props.touch.centerDate=this._pointerToDate(this.props.touch.center)),this.stopRolling();var tt=1/(X.scale+this.scaleOffset),rt=this.props.touch.centerDate,ot=getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),ut=getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,rt),yn=ot-ut,uo=rt-ut+(this.props.touch.start-(rt-ut))*tt,po=rt+yn+(this.props.touch.end-(rt+yn))*tt;this.startToFront=1-tt<=0,this.endToFront=tt-1<=0;var mo=snapAwayFromHidden(this.body.hiddenDates,uo,1-tt,!0),wo=snapAwayFromHidden(this.body.hiddenDates,po,tt-1,!0);(mo!=uo||wo!=po)&&(this.props.touch.start=mo,this.props.touch.end=wo,this.scaleOffset=1-X.scale,uo=mo,po=wo);var lf={animation:!1,byUser:!0,event:X};this.setRange(uo,po,lf),this.startToFront=!1,this.endToFront=!0}}},{key:"_isInsideRange",value:function(X){var tt=X.center?X.center.x:X.clientX,rt=this.body.dom.centerContainer.getBoundingClientRect(),ot=this.options.rtl?tt-rt.left:rt.right-tt,ut=this.body.util.toTime(ot);return ut>=this.start&&ut<=this.end}},{key:"_pointerToDate",value:function(X){var tt,rt=this.options.direction;if(validateDirection(rt),rt=="horizontal")return this.body.util.toTime(X.x).valueOf();var ot=this.body.domProps.center.height;return tt=this.conversion(ot),X.y/tt.scale+tt.offset}},{key:"getPointer",value:function(X,tt){var rt=tt.getBoundingClientRect();return this.options.rtl?{x:rt.right-X.x,y:X.y-rt.top}:{x:X.x-rt.left,y:X.y-rt.top}}},{key:"zoom",value:function(X,tt,rt,ot){tt==null&&(tt=(this.start+this.end)/2);var ut=getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),yn=getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,tt),uo=ut-yn,po=tt-yn+(this.start-(tt-yn))*X,mo=tt+uo+(this.end-(tt+uo))*X;this.startToFront=!(rt>0),this.endToFront=!(-rt>0);var wo=snapAwayFromHidden(this.body.hiddenDates,po,rt,!0),lf=snapAwayFromHidden(this.body.hiddenDates,mo,-rt,!0);(wo!=po||lf!=mo)&&(po=wo,mo=lf);var yf={animation:!1,byUser:!0,event:ot};this.setRange(po,mo,yf),this.startToFront=!1,this.endToFront=!0}},{key:"move",value:function(X){var tt=this.end-this.start,rt=this.start+tt*X,ot=this.end+tt*X;this.start=rt,this.end=ot}},{key:"moveTo",value:function(X){var tt=(this.start+this.end)/2,rt=tt-X,ot=this.start-rt,ut=this.end-rt,yn={animation:!1,byUser:!0,event:null};this.setRange(ot,ut,yn)}},{key:"destroy",value:function(){this.stopRolling()}}],[{key:"conversion",value:function(X,tt,rt,ot){return ot===void 0&&(ot=0),rt!=0&&tt-X!=0?{offset:X,scale:rt/(tt-X-ot)}:{offset:0,scale:1}}}]),q}(Component);function validateDirection(F){if(F!="horizontal"&&F!="vertical")throw new TypeError('Unknown direction "'.concat(F,'". Choose "horizontal" or "vertical".'))}var $$5=_export,$some=arrayIteration.some,arrayMethodIsStrict$1=arrayMethodIsStrict$6,STRICT_METHOD$1=arrayMethodIsStrict$1("some");$$5({target:"Array",proto:!0,forced:!STRICT_METHOD$1},{some:function F(W){return $some(this,W,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$3=entryVirtual$k,some$3=entryVirtual$3("Array").some,isPrototypeOf$5=objectIsPrototypeOf,method$3=some$3,ArrayPrototype$3=Array.prototype,some$2=function(F){var W=F.some;return F===ArrayPrototype$3||isPrototypeOf$5(ArrayPrototype$3,F)&&W===ArrayPrototype$3.some?method$3:W},parent$4=some$2,some$1=parent$4,some=some$1,_someInstanceProperty=getDefaultExportFromCjs(some),path$1=path$s,setInterval$1=path$1.setInterval,setInterval$3=setInterval$1,_setInterval=getDefaultExportFromCjs(setInterval$3),_firstTarget=null;function propagating(F,W){var q=W||{preventDefault:!1};if(F.Manager){var K=F,X=function(yn,uo){var po=Object.create(q);return uo&&K.assign(po,uo),propagating(new K(yn,po),po)};return K.assign(X,K),X.Manager=function(yn,uo){var po=Object.create(q);return uo&&K.assign(po,uo),propagating(new K.Manager(yn,po),po)},X}var tt=Object.create(F),rt=F.element;rt.hammer||(rt.hammer=[]),rt.hammer.push(tt),F.on("hammer.input",function(yn){(q.preventDefault===!0||q.preventDefault===yn.pointerType)&&yn.preventDefault(),yn.isFirst&&(_firstTarget=yn.target)}),tt._handlers={},tt.on=function(yn,uo){return ot(yn).forEach(function(po){var mo=tt._handlers[po];mo||(tt._handlers[po]=mo=[],F.on(po,ut)),mo.push(uo)}),tt},tt.off=function(yn,uo){return ot(yn).forEach(function(po){var mo=tt._handlers[po];mo&&(mo=uo?mo.filter(function(wo){return wo!==uo}):[],mo.length>0?tt._handlers[po]=mo:(F.off(po,ut),delete tt._handlers[po]))}),tt},tt.emit=function(yn,uo){_firstTarget=uo.target,F.emit(yn,uo)},tt.destroy=function(){var yn=F.element.hammer,uo=yn.indexOf(tt);uo!==-1&&yn.splice(uo,1),yn.length||delete F.element.hammer,tt._handlers={},F.destroy()};function ot(yn){return yn.match(/[^ ]+/g)}function ut(yn){if(yn.type!=="hammer.input"){if(yn.srcEvent._handled||(yn.srcEvent._handled={}),yn.srcEvent._handled[yn.type])return;yn.srcEvent._handled[yn.type]=!0}var uo=!1;yn.stopPropagation=function(){uo=!0};var po=yn.srcEvent.stopPropagation.bind(yn.srcEvent);typeof po=="function"&&(yn.srcEvent.stopPropagation=function(){po(),yn.stopPropagation()}),yn.firstTarget=_firstTarget;for(var mo=_firstTarget;mo&&!uo;){var wo=mo.hammer;if(wo){for(var lf,yf=0;yf0&&this.current.milliseconds()0&&this.current.seconds()0&&this.current.minutes()0&&this.current.hours()0?q.step:1,this.autoScale=!1)}},{key:"setAutoScale",value:function(q){this.autoScale=q}},{key:"setMinimumStep",value:function(q){if(q!=null){var K=1e3*60*60*24*30*12,X=1e3*60*60*24*30,tt=1e3*60*60*24,rt=1e3*60*60,ot=1e3*60,ut=1e3,yn=1;K*1e3>q&&(this.scale="year",this.step=1e3),K*500>q&&(this.scale="year",this.step=500),K*100>q&&(this.scale="year",this.step=100),K*50>q&&(this.scale="year",this.step=50),K*10>q&&(this.scale="year",this.step=10),K*5>q&&(this.scale="year",this.step=5),K>q&&(this.scale="year",this.step=1),X*3>q&&(this.scale="month",this.step=3),X>q&&(this.scale="month",this.step=1),tt*7>q&&this.options.showWeekScale&&(this.scale="week",this.step=1),tt*2>q&&(this.scale="day",this.step=2),tt>q&&(this.scale="day",this.step=1),tt/2>q&&(this.scale="weekday",this.step=1),rt*4>q&&(this.scale="hour",this.step=4),rt>q&&(this.scale="hour",this.step=1),ot*15>q&&(this.scale="minute",this.step=15),ot*10>q&&(this.scale="minute",this.step=10),ot*5>q&&(this.scale="minute",this.step=5),ot>q&&(this.scale="minute",this.step=1),ut*15>q&&(this.scale="second",this.step=15),ut*10>q&&(this.scale="second",this.step=10),ut*5>q&&(this.scale="second",this.step=5),ut>q&&(this.scale="second",this.step=1),yn*200>q&&(this.scale="millisecond",this.step=200),yn*100>q&&(this.scale="millisecond",this.step=100),yn*50>q&&(this.scale="millisecond",this.step=50),yn*10>q&&(this.scale="millisecond",this.step=10),yn*5>q&&(this.scale="millisecond",this.step=5),yn>q&&(this.scale="millisecond",this.step=1)}}},{key:"isMajor",value:function(){if(this.switchedYear==!0)switch(this.scale){case"year":case"month":case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(this.switchedMonth==!0)switch(this.scale){case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(this.switchedDay==!0)switch(this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var q=this.moment(this.current);switch(this.scale){case"millisecond":return q.milliseconds()==0;case"second":return q.seconds()==0;case"minute":return q.hours()==0&&q.minutes()==0;case"hour":return q.hours()==0;case"weekday":case"day":return this.options.showWeekScale?q.isoWeekday()==1:q.date()==1;case"week":return q.date()==1;case"month":return q.month()==0;case"year":return!1;default:return!1}}},{key:"getLabelMinor",value:function(q){if(q==null&&(q=this.current),q instanceof Date&&(q=this.moment(q)),typeof this.format.minorLabels=="function")return this.format.minorLabels(q,this.scale,this.step);var K=this.format.minorLabels[this.scale];switch(this.scale){case"week":if(q.date()===1&&q.weekday()!==0)return"";default:return K&&K.length>0?this.moment(q).format(K):""}}},{key:"getLabelMajor",value:function(q){if(q==null&&(q=this.current),q instanceof Date&&(q=this.moment(q)),typeof this.format.majorLabels=="function")return this.format.majorLabels(q,this.scale,this.step);var K=this.format.majorLabels[this.scale];return K&&K.length>0?this.moment(q).format(K):""}},{key:"getClassName",value:function(){var q,K=this.moment,X=this.moment(this.current),tt=X.locale?X.locale("en"):X.lang("en"),rt=this.step,ot=[];function ut(wo){return wo/rt%2==0?" vis-even":" vis-odd"}function yn(wo){return wo.isSame(_Date$now(),"day")?" vis-today":wo.isSame(K().add(1,"day"),"day")?" vis-tomorrow":wo.isSame(K().add(-1,"day"),"day")?" vis-yesterday":""}function uo(wo){return wo.isSame(_Date$now(),"week")?" vis-current-week":""}function po(wo){return wo.isSame(_Date$now(),"month")?" vis-current-month":""}function mo(wo){return wo.isSame(_Date$now(),"year")?" vis-current-year":""}switch(this.scale){case"millisecond":ot.push(yn(tt)),ot.push(ut(tt.milliseconds()));break;case"second":ot.push(yn(tt)),ot.push(ut(tt.seconds()));break;case"minute":ot.push(yn(tt)),ot.push(ut(tt.minutes()));break;case"hour":ot.push(_concatInstanceProperty(q="vis-h".concat(tt.hours())).call(q,this.step==4?"-h"+(tt.hours()+4):"")),ot.push(yn(tt)),ot.push(ut(tt.hours()));break;case"weekday":ot.push("vis-".concat(tt.format("dddd").toLowerCase())),ot.push(yn(tt)),ot.push(uo(tt)),ot.push(ut(tt.date()));break;case"day":ot.push("vis-day".concat(tt.date())),ot.push("vis-".concat(tt.format("MMMM").toLowerCase())),ot.push(yn(tt)),ot.push(po(tt)),ot.push(this.step<=2?yn(tt):""),ot.push(this.step<=2?"vis-".concat(tt.format("dddd").toLowerCase()):""),ot.push(ut(tt.date()-1));break;case"week":ot.push("vis-week".concat(tt.format("w"))),ot.push(uo(tt)),ot.push(ut(tt.week()));break;case"month":ot.push("vis-".concat(tt.format("MMMM").toLowerCase())),ot.push(po(tt)),ot.push(ut(tt.month()));break;case"year":ot.push("vis-year".concat(tt.year())),ot.push(mo(tt)),ot.push(ut(tt.year()));break}return _filterInstanceProperty(ot).call(ot,String).join(" ")}}],[{key:"snap",value:function(q,K,X){var tt=moment$3(q);if(K=="year"){var rt=tt.year()+Math.round(tt.month()/12);tt.year(Math.round(rt/X)*X),tt.month(0),tt.date(0),tt.hours(0),tt.minutes(0),tt.seconds(0),tt.milliseconds(0)}else if(K=="month")tt.date()>15?(tt.date(1),tt.add(1,"month")):tt.date(1),tt.hours(0),tt.minutes(0),tt.seconds(0),tt.milliseconds(0);else if(K=="week")tt.weekday()>2?(tt.weekday(0),tt.add(1,"week")):tt.weekday(0),tt.hours(0),tt.minutes(0),tt.seconds(0),tt.milliseconds(0);else if(K=="day"){switch(X){case 5:case 2:tt.hours(Math.round(tt.hours()/24)*24);break;default:tt.hours(Math.round(tt.hours()/12)*12);break}tt.minutes(0),tt.seconds(0),tt.milliseconds(0)}else if(K=="weekday"){switch(X){case 5:case 2:tt.hours(Math.round(tt.hours()/12)*12);break;default:tt.hours(Math.round(tt.hours()/6)*6);break}tt.minutes(0),tt.seconds(0),tt.milliseconds(0)}else if(K=="hour"){switch(X){case 4:tt.minutes(Math.round(tt.minutes()/60)*60);break;default:tt.minutes(Math.round(tt.minutes()/30)*30);break}tt.seconds(0),tt.milliseconds(0)}else if(K=="minute"){switch(X){case 15:case 10:tt.minutes(Math.round(tt.minutes()/5)*5),tt.seconds(0);break;case 5:tt.seconds(Math.round(tt.seconds()/60)*60);break;default:tt.seconds(Math.round(tt.seconds()/30)*30);break}tt.milliseconds(0)}else if(K=="second")switch(X){case 15:case 10:tt.seconds(Math.round(tt.seconds()/5)*5),tt.milliseconds(0);break;case 5:tt.milliseconds(Math.round(tt.milliseconds()/1e3)*1e3);break;default:tt.milliseconds(Math.round(tt.milliseconds()/500)*500);break}else if(K=="millisecond"){var ot=X>5?X/2:1;tt.milliseconds(Math.round(tt.milliseconds()/ot)*ot)}return tt}}]),F}();TimeStep.FORMAT={minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}};function _createSuper$b(F){var W=_isNativeReflectConstruct$b();return function(){var K=_getPrototypeOf(F),X;if(W){var tt=_getPrototypeOf(this).constructor;X=_Reflect$construct(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn(this,X)}}function _isNativeReflectConstruct$b(){if(typeof Reflect>"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var TimeAxis=function(F){_inherits(q,F);var W=_createSuper$b(q);function q(K,X){var tt;return _classCallCheck(this,q),tt=W.call(this),tt.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},tt.props={range:{start:0,end:0,minimumStep:0},lineTop:0},tt.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,maxMinorChars:7,format:availableUtils.extend({},TimeStep.FORMAT),moment:moment$3,timeAxis:null},tt.options=availableUtils.extend({},tt.defaultOptions),tt.body=K,tt._create(),tt.setOptions(X),tt}return _createClass(q,[{key:"setOptions",value:function(X){X&&(availableUtils.selectiveExtend(["showMinorLabels","showMajorLabels","showWeekScale","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,X),availableUtils.selectiveDeepExtend(["format"],this.options,X),"orientation"in X&&(typeof X.orientation=="string"?this.options.orientation.axis=X.orientation:_typeof(X.orientation)==="object"&&"axis"in X.orientation&&(this.options.orientation.axis=X.orientation.axis)),"locale"in X&&(typeof moment$3.locale=="function"?moment$3.locale(X.locale):moment$3.lang(X.locale)))}},{key:"_create",value:function(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"}},{key:"destroy",value:function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null}},{key:"redraw",value:function(){var X=this.props,tt=this.dom.foreground,rt=this.dom.background,ot=this.options.orientation.axis=="top"?this.body.dom.top:this.body.dom.bottom,ut=tt.parentNode!==ot;this._calculateCharSize();var yn=this.options.showMinorLabels&&this.options.orientation.axis!=="none",uo=this.options.showMajorLabels&&this.options.orientation.axis!=="none";X.minorLabelHeight=yn?X.minorCharHeight:0,X.majorLabelHeight=uo?X.majorCharHeight:0,X.height=X.minorLabelHeight+X.majorLabelHeight,X.width=tt.offsetWidth,X.minorLineHeight=this.body.domProps.root.height-X.majorLabelHeight-(this.options.orientation.axis=="top"?this.body.domProps.bottom.height:this.body.domProps.top.height),X.minorLineWidth=1,X.majorLineHeight=X.minorLineHeight+X.majorLabelHeight,X.majorLineWidth=1;var po=tt.nextSibling,mo=rt.nextSibling;return tt.parentNode&&tt.parentNode.removeChild(tt),rt.parentNode&&rt.parentNode.removeChild(rt),tt.style.height="".concat(this.props.height,"px"),this._repaintLabels(),po?ot.insertBefore(tt,po):ot.appendChild(tt),mo?this.body.dom.backgroundVertical.insertBefore(rt,mo):this.body.dom.backgroundVertical.appendChild(rt),this._isResized()||ut}},{key:"_repaintLabels",value:function(){var X=this.options.orientation.axis,tt=availableUtils.convert(this.body.range.start,"Number"),rt=availableUtils.convert(this.body.range.end,"Number"),ot=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),ut=ot-getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this.body.range,ot);ut-=this.body.util.toTime(0).valueOf();var yn=new TimeStep(new Date(tt),new Date(rt),ut,this.body.hiddenDates,this.options);yn.setMoment(this.options.moment),this.options.format&&yn.setFormat(this.options.format),this.options.timeAxis&&yn.setScale(this.options.timeAxis),this.step=yn;var uo=this.dom;uo.redundant.lines=uo.lines,uo.redundant.majorTexts=uo.majorTexts,uo.redundant.minorTexts=uo.minorTexts,uo.lines=[],uo.majorTexts=[],uo.minorTexts=[];var po,mo,wo,lf,yf,cf,vf=0,_f,$f,wf=void 0,Pf=0,Cf=1e3,Af;for(yn.start(),mo=yn.getCurrent(),lf=this.body.util.toScreen(mo);yn.hasNext()&&Pf=_f*.4;break}if(this.options.showMinorLabels&&cf){var Bf=this._repaintMinorText(wo,yn.getLabelMinor(po),X,Af);Bf.style.width="".concat(vf,"px")}yf&&this.options.showMajorLabels?(wo>0&&(wf==null&&(wf=wo),Bf=this._repaintMajorText(wo,yn.getLabelMajor(po),X,Af)),$f=this._repaintMajorLine(wo,vf,X,Af)):cf?$f=this._repaintMinorLine(wo,vf,X,Af):$f&&($f.style.width="".concat(_parseInt$1($f.style.width)+vf,"px"))}if(Pf===Cf&&!warnedForOverflow&&(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to ".concat(Cf," lines.")),warnedForOverflow=!0),this.options.showMajorLabels){var Hf=this.body.util.toTime(0),Df=yn.getLabelMajor(Hf),Lf=Df.length*(this.props.majorCharWidth||10)+10;(wf==null||Lf"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var CustomTime=function(F){_inherits(q,F);var W=_createSuper$a(q);function q(K,X){var tt,rt;_classCallCheck(this,q),rt=W.call(this),rt.body=K,rt.defaultOptions={moment:moment$3,locales,locale:"en",id:void 0,title:void 0},rt.options=availableUtils.extend({},rt.defaultOptions),rt.setOptions(X),rt.options.locales=availableUtils.extend({},locales,rt.options.locales);var ot=rt.defaultOptions.locales[rt.defaultOptions.locale];return _forEachInstanceProperty(tt=_Object$keys(rt.options.locales)).call(tt,function(ut){rt.options.locales[ut]=availableUtils.extend({},ot,rt.options.locales[ut])}),X&&X.time!=null?rt.customTime=X.time:rt.customTime=new Date,rt.eventParams={},rt._create(),rt}return _createClass(q,[{key:"setOptions",value:function(X){X&&availableUtils.selectiveExtend(["moment","locale","locales","id","title","rtl","snap"],this.options,X)}},{key:"_create",value:function(){var X,tt,rt,ot=document.createElement("div");ot["custom-time"]=this,ot.className="vis-custom-time ".concat(this.options.id||""),ot.style.position="absolute",ot.style.top="0px",ot.style.height="100%",this.bar=ot;var ut=document.createElement("div");ut.style.position="relative",ut.style.top="0px",this.options.rtl?ut.style.right="-10px":ut.style.left="-10px",ut.style.height="100%",ut.style.width="20px";function yn(uo){this.body.range._onMouseWheel(uo)}ut.addEventListener?(ut.addEventListener("mousewheel",_bindInstanceProperty(yn).call(yn,this),!1),ut.addEventListener("DOMMouseScroll",_bindInstanceProperty(yn).call(yn,this),!1)):ut.attachEvent("onmousewheel",_bindInstanceProperty(yn).call(yn,this)),ot.appendChild(ut),this.hammer=new Hammer(ut),this.hammer.on("panstart",_bindInstanceProperty(X=this._onDragStart).call(X,this)),this.hammer.on("panmove",_bindInstanceProperty(tt=this._onDrag).call(tt,this)),this.hammer.on("panend",_bindInstanceProperty(rt=this._onDragEnd).call(rt,this)),this.hammer.get("pan").set({threshold:5,direction:Hammer.DIRECTION_ALL}),this.hammer.get("press").set({time:1e4})}},{key:"destroy",value:function(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null}},{key:"redraw",value:function(){var X=this.body.dom.backgroundVertical;this.bar.parentNode!=X&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),X.appendChild(this.bar));var tt=this.body.util.toScreen(this.customTime),rt=this.options.locales[this.options.locale];rt||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),rt=this.options.locales.en);var ot=this.options.title;if(ot===void 0){var ut;ot=_concatInstanceProperty(ut="".concat(rt.time,": ")).call(ut,this.options.moment(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss")),ot=ot.charAt(0).toUpperCase()+ot.substring(1)}else typeof ot=="function"&&(ot=ot.call(this,this.customTime));return this.options.rtl?this.bar.style.right="".concat(tt,"px"):this.bar.style.left="".concat(tt,"px"),this.bar.title=ot,!1}},{key:"hide",value:function(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}},{key:"setCustomTime",value:function(X){this.customTime=availableUtils.convert(X,"Date"),this.redraw()}},{key:"getCustomTime",value:function(){return new Date(this.customTime.valueOf())}},{key:"setCustomMarker",value:function(X,tt){if(this.marker&&this.bar.removeChild(this.marker),this.marker=document.createElement("div"),this.marker.className="vis-custom-time-marker",this.marker.innerHTML=availableUtils.xss(X),this.marker.style.position="absolute",tt){var rt,ot;this.marker.setAttribute("contenteditable","true"),this.marker.addEventListener("pointerdown",function(){this.marker.focus()}),this.marker.addEventListener("input",_bindInstanceProperty(rt=this._onMarkerChange).call(rt,this)),this.marker.title=X,this.marker.addEventListener("blur",_bindInstanceProperty(ot=function(yn){this.title!=yn.target.innerHTML&&(this._onMarkerChanged(yn),this.title=yn.target.innerHTML)}).call(ot,this))}this.bar.appendChild(this.marker)}},{key:"setCustomTitle",value:function(X){this.options.title=X}},{key:"_onDragStart",value:function(X){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,X.stopPropagation()}},{key:"_onDrag",value:function(X){if(this.eventParams.dragging){var tt=this.options.rtl?-1*X.deltaX:X.deltaX,rt=this.body.util.toScreen(this.eventParams.customTime)+tt,ot=this.body.util.toTime(rt),ut=this.body.util.getScale(),yn=this.body.util.getStep(),uo=this.options.snap,po=uo?uo(ot,ut,yn):ot;this.setCustomTime(po),this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:X}),X.stopPropagation()}}},{key:"_onDragEnd",value:function(X){this.eventParams.dragging&&(this.body.emitter.emit("timechanged",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:X}),X.stopPropagation())}},{key:"_onMarkerChange",value:function(X){this.body.emitter.emit("markerchange",{id:this.options.id,title:X.target.innerHTML,event:X}),X.stopPropagation()}},{key:"_onMarkerChanged",value:function(X){this.body.emitter.emit("markerchanged",{id:this.options.id,title:X.target.innerHTML,event:X}),X.stopPropagation()}}],[{key:"customTimeFromTarget",value:function(X){for(var tt=X.target;tt;){if(tt.hasOwnProperty("custom-time"))return tt["custom-time"];tt=tt.parentNode}return null}}]),q}(Component),Core=function(){function F(){_classCallCheck(this,F)}return _createClass(F,[{key:"_create",value:function(q){var K=this,X,tt,rt;this.dom={},this.dom.container=q,this.dom.container.style.position="relative",this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.rollingModeBtn=document.createElement("div"),this.dom.loadingScreen=document.createElement("div"),this.dom.root.className="vis-timeline",this.dom.background.className="vis-panel vis-background",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical",this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal",this.dom.centerContainer.className="vis-panel vis-center",this.dom.leftContainer.className="vis-panel vis-left",this.dom.rightContainer.className="vis-panel vis-right",this.dom.top.className="vis-panel vis-top",this.dom.bottom.className="vis-panel vis-bottom",this.dom.left.className="vis-content",this.dom.center.className="vis-content",this.dom.right.className="vis-content",this.dom.shadowTop.className="vis-shadow vis-top",this.dom.shadowBottom.className="vis-shadow vis-bottom",this.dom.shadowTopLeft.className="vis-shadow vis-top",this.dom.shadowBottomLeft.className="vis-shadow vis-bottom",this.dom.shadowTopRight.className="vis-shadow vis-top",this.dom.shadowBottomRight.className="vis-shadow vis-bottom",this.dom.rollingModeBtn.className="vis-rolling-mode-btn",this.dom.loadingScreen.className="vis-loading-screen",this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.rollingModeBtn),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.on("rangechange",function(){K.initialDrawDone===!0&&K._redraw()}),this.on("rangechanged",function(){K.initialRangeChangeDone||(K.initialRangeChangeDone=!0)}),this.on("touch",_bindInstanceProperty(X=this._onTouch).call(X,this)),this.on("panmove",_bindInstanceProperty(tt=this._onDrag).call(tt,this));var ot=this;this._origRedraw=_bindInstanceProperty(rt=this._redraw).call(rt,this),this._redraw=availableUtils.throttle(this._origRedraw),this.on("_change",function(cf){ot.itemSet&&ot.itemSet.initialItemSetDrawn&&cf&&cf.queue==!0?ot._redraw():ot._origRedraw()}),this.hammer=new Hammer(this.dom.root);var ut=this.hammer.get("pinch").set({enable:!0});ut&&disablePreventDefaultVertically(ut),this.hammer.get("pan").set({threshold:5,direction:Hammer.DIRECTION_ALL}),this.timelineListeners={};var yn=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];_forEachInstanceProperty(yn).call(yn,function(cf){var vf=function($f){ot.isActive()&&ot.emit(cf,$f)};ot.hammer.on(cf,vf),ot.timelineListeners[cf]=vf}),onTouch(this.hammer,function(cf){ot.emit("touch",cf)}),onRelease(this.hammer,function(cf){ot.emit("release",cf)});function uo(cf){var vf=40,_f=800;this.isActive()&&this.emit("mousewheel",cf);var $f=0,wf=0;if("detail"in cf&&(wf=cf.detail*-1),"wheelDelta"in cf&&(wf=cf.wheelDelta),"wheelDeltaY"in cf&&(wf=cf.wheelDeltaY),"wheelDeltaX"in cf&&($f=cf.wheelDeltaX*-1),"axis"in cf&&cf.axis===cf.HORIZONTAL_AXIS&&($f=wf*-1,wf=0),"deltaY"in cf&&(wf=cf.deltaY*-1),"deltaX"in cf&&($f=cf.deltaX),cf.deltaMode&&(cf.deltaMode===1?($f*=vf,wf*=vf):($f*=vf,wf*=_f)),this.options.preferZoom){if(!this.options.zoomKey||cf[this.options.zoomKey])return}else if(this.options.zoomKey&&cf[this.options.zoomKey])return;if(!(!this.options.verticalScroll&&!this.options.horizontalScroll)){if(this.options.verticalScroll&&Math.abs(wf)>=Math.abs($f)){var Pf=this.props.scrollTop,Cf=Pf+wf;if(this.isActive()){var Af=this._setScrollTop(Cf);Af!==Pf&&(this._redraw(),this.emit("scroll",cf),cf.preventDefault())}}else if(this.options.horizontalScroll){var Bf=Math.abs($f)>=Math.abs(wf)?$f:wf,Hf=Bf/120*(this.range.end-this.range.start)/20,Df=this.range.start+Hf,Lf=this.range.end+Hf,kf={animation:!1,byUser:!0,event:cf};this.range.setRange(Df,Lf,kf),cf.preventDefault()}}}var po="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":this.dom.centerContainer.addEventListener?"DOMMouseScroll":"onmousewheel";this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(po,_bindInstanceProperty(uo).call(uo,this),!1),this.dom.top.addEventListener(po,_bindInstanceProperty(uo).call(uo,this),!1),this.dom.bottom.addEventListener(po,_bindInstanceProperty(uo).call(uo,this),!1);function mo(cf){if(ot.options.verticalScroll&&(cf.preventDefault(),ot.isActive())){var vf=-cf.target.scrollTop;ot._setScrollTop(vf),ot._redraw(),ot.emit("scrollSide",cf)}}this.dom.left.parentNode.addEventListener("scroll",_bindInstanceProperty(mo).call(mo,this)),this.dom.right.parentNode.addEventListener("scroll",_bindInstanceProperty(mo).call(mo,this));var wo=!1;function lf(cf){var vf;if(cf.preventDefault&&(ot.emit("dragover",ot.getEventProperties(cf)),cf.preventDefault()),_indexOfInstanceProperty(vf=cf.target.className).call(vf,"timeline")>-1&&!wo)return cf.dataTransfer.dropEffect="move",wo=!0,!1}function yf(cf){cf.preventDefault&&cf.preventDefault(),cf.stopPropagation&&cf.stopPropagation();try{var vf=JSON.parse(cf.dataTransfer.getData("text"));if(!vf||!vf.content)return}catch{return!1}return wo=!1,cf.center={x:cf.clientX,y:cf.clientY},vf.target!=="item"?ot.itemSet._onAddItem(cf):ot.itemSet._onDropObjectOnItem(cf),ot.emit("drop",ot.getEventProperties(cf)),!1}if(this.dom.center.addEventListener("dragover",_bindInstanceProperty(lf).call(lf,this),!1),this.dom.center.addEventListener("drop",_bindInstanceProperty(yf).call(yf,this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!q)throw new Error("No container provided");q.appendChild(this.dom.root),q.appendChild(this.dom.loadingScreen)}},{key:"setOptions",value:function(q){var K;if(q){var X=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","preferZoom","rtl","zoomKey","horizontalScroll","verticalScroll","longSelectPressTime","snap"];if(availableUtils.selectiveExtend(X,this.options,q),this.dom.rollingModeBtn.style.visibility="hidden",this.options.rtl&&(this.dom.container.style.direction="rtl",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical-rtl"),this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className="vis-panel vis-right vis-vertical-scroll":this.dom.leftContainer.className="vis-panel vis-left vis-vertical-scroll"),_typeof(this.options.orientation)!=="object"&&(this.options.orientation={item:void 0,axis:void 0}),"orientation"in q&&(typeof q.orientation=="string"?this.options.orientation={item:q.orientation,axis:q.orientation}:_typeof(q.orientation)==="object"&&("item"in q.orientation&&(this.options.orientation.item=q.orientation.item),"axis"in q.orientation&&(this.options.orientation.axis=q.orientation.axis))),this.options.orientation.axis==="both"){if(!this.timeAxis2){var tt=this.timeAxis2=new TimeAxis(this.body,this.options);tt.setOptions=function(po){var mo=po?availableUtils.extend({},po):{};mo.orientation="top",TimeAxis.prototype.setOptions.call(tt,mo)},this.components.push(tt)}}else if(this.timeAxis2){var rt,ot=_indexOfInstanceProperty(rt=this.components).call(rt,this.timeAxis2);if(ot!==-1){var ut;_spliceInstanceProperty(ut=this.components).call(ut,ot,1)}this.timeAxis2.destroy(),this.timeAxis2=null}typeof q.drawPoints=="function"&&(q.drawPoints={onRender:q.drawPoints}),"hiddenDates"in this.options&&convertHiddenOptions(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in q&&(q.clickToUse?this.activator||(this.activator=new Activator(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(_forEachInstanceProperty(K=this.components).call(K,function(po){return po.setOptions(q)}),"configure"in q){var yn;this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(q.configure);var uo=availableUtils.deepExtend({},this.options);_forEachInstanceProperty(yn=this.components).call(yn,function(po){availableUtils.deepExtend(uo,po.options)}),this.configurator.setModuleOptions({global:uo})}this._redraw()}},{key:"isActive",value:function(){return!this.activator||this.activator.active}},{key:"destroy",value:function(){var q;this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(var K in this.timelineListeners)this.timelineListeners.hasOwnProperty(K)&&delete this.timelineListeners[K];this.timelineListeners=null,this.hammer&&this.hammer.destroy(),this.hammer=null,_forEachInstanceProperty(q=this.components).call(q,function(X){return X.destroy()}),this.body=null}},{key:"setCustomTime",value:function(q,K){var X,tt=_filterInstanceProperty(X=this.customTimes).call(X,function(rt){return K===rt.options.id});if(tt.length===0)throw new Error("No custom time bar found with id ".concat(_JSON$stringify(K)));tt.length>0&&tt[0].setCustomTime(q)}},{key:"getCustomTime",value:function(q){var K,X=_filterInstanceProperty(K=this.customTimes).call(K,function(tt){return tt.options.id===q});if(X.length===0)throw new Error("No custom time bar found with id ".concat(_JSON$stringify(q)));return X[0].getCustomTime()}},{key:"setCustomTimeMarker",value:function(q,K,X){var tt,rt=_filterInstanceProperty(tt=this.customTimes).call(tt,function(ot){return ot.options.id===K});if(rt.length===0)throw new Error("No custom time bar found with id ".concat(_JSON$stringify(K)));rt.length>0&&rt[0].setCustomMarker(q,X)}},{key:"setCustomTimeTitle",value:function(q,K){var X,tt=_filterInstanceProperty(X=this.customTimes).call(X,function(rt){return rt.options.id===K});if(tt.length===0)throw new Error("No custom time bar found with id ".concat(_JSON$stringify(K)));if(tt.length>0)return tt[0].setCustomTitle(q)}},{key:"getEventProperties",value:function(q){return{event:q}}},{key:"addCustomTime",value:function(q,K){var X,tt=q!==void 0?availableUtils.convert(q,"Date"):new Date,rt=_someInstanceProperty(X=this.customTimes).call(X,function(ut){return ut.options.id===K});if(rt)throw new Error("A custom time with id ".concat(_JSON$stringify(K)," already exists"));var ot=new CustomTime(this.body,availableUtils.extend({},this.options,{time:tt,id:K,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(ot),this.components.push(ot),this._redraw(),K}},{key:"removeCustomTime",value:function(q){var K,X=this,tt=_filterInstanceProperty(K=this.customTimes).call(K,function(rt){return rt.options.id===q});if(tt.length===0)throw new Error("No custom time bar found with id ".concat(_JSON$stringify(q)));_forEachInstanceProperty(tt).call(tt,function(rt){var ot,ut,yn,uo;_spliceInstanceProperty(ot=X.customTimes).call(ot,_indexOfInstanceProperty(ut=X.customTimes).call(ut,rt),1),_spliceInstanceProperty(yn=X.components).call(yn,_indexOfInstanceProperty(uo=X.components).call(uo,rt),1),rt.destroy()})}},{key:"getVisibleItems",value:function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}},{key:"getItemsAtCurrentTime",value:function(q){return this.time=q,this.itemSet&&this.itemSet.getItemsAtCurrentTime(this.time)||[]}},{key:"getVisibleGroups",value:function(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}},{key:"fit",value:function(q,K){var X=this.getDataRange();if(!(X.min===null&&X.max===null)){var tt=X.max-X.min,rt=new Date(X.min.valueOf()-tt*.01),ot=new Date(X.max.valueOf()+tt*.01),ut=q&&q.animation!==void 0?q.animation:!0;this.range.setRange(rt,ot,{animation:ut},K)}}},{key:"getDataRange",value:function(){throw new Error("Cannot invoke abstract method getDataRange")}},{key:"setWindow",value:function(q,K,X,tt){typeof arguments[2]=="function"&&(tt=arguments[2],X={});var rt,ot;arguments.length==1?(ot=arguments[0],rt=ot.animation!==void 0?ot.animation:!0,this.range.setRange(ot.start,ot.end,{animation:rt})):arguments.length==2&&typeof arguments[1]=="function"?(ot=arguments[0],tt=arguments[1],rt=ot.animation!==void 0?ot.animation:!0,this.range.setRange(ot.start,ot.end,{animation:rt},tt)):(rt=X&&X.animation!==void 0?X.animation:!0,this.range.setRange(q,K,{animation:rt},tt))}},{key:"moveTo",value:function(q,K,X){typeof arguments[1]=="function"&&(X=arguments[1],K={});var tt=this.range.end-this.range.start,rt=availableUtils.convert(q,"Date").valueOf(),ot=rt-tt/2,ut=rt+tt/2,yn=K&&K.animation!==void 0?K.animation:!0;this.range.setRange(ot,ut,{animation:yn},X)}},{key:"getWindow",value:function(){var q=this.range.getRange();return{start:new Date(q.start),end:new Date(q.end)}}},{key:"zoomIn",value:function(q,K,X){if(!(!q||q<0||q>1)){typeof arguments[1]=="function"&&(X=arguments[1],K={});var tt=this.getWindow(),rt=tt.start.valueOf(),ot=tt.end.valueOf(),ut=ot-rt,yn=ut/(1+q),uo=(ut-yn)/2,po=rt+uo,mo=ot-uo;this.setWindow(po,mo,K,X)}}},{key:"zoomOut",value:function(q,K,X){if(!(!q||q<0||q>1)){typeof arguments[1]=="function"&&(X=arguments[1],K={});var tt=this.getWindow(),rt=tt.start.valueOf(),ot=tt.end.valueOf(),ut=ot-rt,yn=rt-ut*q/2,uo=ot+ut*q/2;this.setWindow(yn,uo,K,X)}}},{key:"redraw",value:function(){this._redraw()}},{key:"_redraw",value:function(){var q;this.redrawCount++;var K=this.dom;if(!(!K||!K.container||K.root.offsetWidth==0)){var X=!1,tt=this.options,rt=this.props;updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),tt.orientation=="top"?(availableUtils.addClassName(K.root,"vis-top"),availableUtils.removeClassName(K.root,"vis-bottom")):(availableUtils.removeClassName(K.root,"vis-top"),availableUtils.addClassName(K.root,"vis-bottom")),tt.rtl?(availableUtils.addClassName(K.root,"vis-rtl"),availableUtils.removeClassName(K.root,"vis-ltr")):(availableUtils.addClassName(K.root,"vis-ltr"),availableUtils.removeClassName(K.root,"vis-rtl")),K.root.style.maxHeight=availableUtils.option.asSize(tt.maxHeight,""),K.root.style.minHeight=availableUtils.option.asSize(tt.minHeight,""),K.root.style.width=availableUtils.option.asSize(tt.width,"");var ot=K.root.offsetWidth;rt.border.left=1,rt.border.right=1,rt.border.top=1,rt.border.bottom=1,rt.center.height=K.center.offsetHeight,rt.left.height=K.left.offsetHeight,rt.right.height=K.right.offsetHeight,rt.top.height=K.top.clientHeight||-rt.border.top,rt.bottom.height=Math.round(K.bottom.getBoundingClientRect().height)||K.bottom.clientHeight||-rt.border.bottom;var ut=Math.max(rt.left.height,rt.center.height,rt.right.height),yn=rt.top.height+ut+rt.bottom.height+rt.border.top+rt.border.bottom;K.root.style.height=availableUtils.option.asSize(tt.height,"".concat(yn,"px")),rt.root.height=K.root.offsetHeight,rt.background.height=rt.root.height;var uo=rt.root.height-rt.top.height-rt.bottom.height;rt.centerContainer.height=uo,rt.leftContainer.height=uo,rt.rightContainer.height=rt.leftContainer.height,rt.root.width=ot,rt.background.width=rt.root.width,this.initialDrawDone||(rt.scrollbarWidth=availableUtils.getScrollBarWidth());var po=K.leftContainer.clientWidth,mo=K.rightContainer.clientWidth;tt.verticalScroll?tt.rtl?(rt.left.width=po||-rt.border.left,rt.right.width=mo+rt.scrollbarWidth||-rt.border.right):(rt.left.width=po+rt.scrollbarWidth||-rt.border.left,rt.right.width=mo||-rt.border.right):(rt.left.width=po||-rt.border.left,rt.right.width=mo||-rt.border.right),this._setDOM();var wo=this._updateScrollTop();tt.orientation.item!="top"&&(wo+=Math.max(rt.centerContainer.height-rt.center.height-rt.border.top-rt.border.bottom,0)),K.center.style.transform="translateY(".concat(wo,"px)");var lf=rt.scrollTop==0?"hidden":"",yf=rt.scrollTop==rt.scrollTopMin?"hidden":"";K.shadowTop.style.visibility=lf,K.shadowBottom.style.visibility=yf,K.shadowTopLeft.style.visibility=lf,K.shadowBottomLeft.style.visibility=yf,K.shadowTopRight.style.visibility=lf,K.shadowBottomRight.style.visibility=yf,tt.verticalScroll&&(K.rightContainer.className="vis-panel vis-right vis-vertical-scroll",K.leftContainer.className="vis-panel vis-left vis-vertical-scroll",K.shadowTopRight.style.visibility="hidden",K.shadowBottomRight.style.visibility="hidden",K.shadowTopLeft.style.visibility="hidden",K.shadowBottomLeft.style.visibility="hidden",K.left.style.top="0px",K.right.style.top="0px"),(!tt.verticalScroll||rt.center.heightrt.centerContainer.height;this.hammer.get("pan").set({direction:cf?Hammer.DIRECTION_ALL:Hammer.DIRECTION_HORIZONTAL}),this.hammer.get("press").set({time:this.options.longSelectPressTime}),_forEachInstanceProperty(q=this.components).call(q,function(_f){X=_f.redraw()||X});var vf=5;if(X)if(this.redrawCount0&&(this.props.scrollTop=0),this.props.scrollTop"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var CurrentTime=function(F){_inherits(q,F);var W=_createSuper$9(q);function q(K,X){var tt,rt;_classCallCheck(this,q),rt=W.call(this),rt.body=K,rt.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:moment$3,locales,locale:"en"},rt.options=availableUtils.extend({},rt.defaultOptions),rt.setOptions(X),rt.options.locales=availableUtils.extend({},locales,rt.options.locales);var ot=rt.defaultOptions.locales[rt.defaultOptions.locale];return _forEachInstanceProperty(tt=_Object$keys(rt.options.locales)).call(tt,function(ut){rt.options.locales[ut]=availableUtils.extend({},ot,rt.options.locales[ut])}),rt.offset=0,rt._create(),rt}return _createClass(q,[{key:"_create",value:function(){var X=document.createElement("div");X.className="vis-current-time",X.style.position="absolute",X.style.top="0px",X.style.height="100%",this.bar=X}},{key:"destroy",value:function(){this.options.showCurrentTime=!1,this.redraw(),this.body=null}},{key:"setOptions",value:function(X){X&&availableUtils.selectiveExtend(["rtl","showCurrentTime","alignCurrentTime","moment","locale","locales"],this.options,X)}},{key:"redraw",value:function(){if(this.options.showCurrentTime){var X,tt,rt=this.body.dom.backgroundVertical;this.bar.parentNode!=rt&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),rt.appendChild(this.bar),this.start());var ot=this.options.moment(_Date$now()+this.offset);this.options.alignCurrentTime&&(ot=ot.startOf(this.options.alignCurrentTime));var ut=this.body.util.toScreen(ot),yn=this.options.locales[this.options.locale];yn||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),yn=this.options.locales.en);var uo=_concatInstanceProperty(X=_concatInstanceProperty(tt="".concat(yn.current," ")).call(tt,yn.time,": ")).call(X,ot.format("dddd, MMMM Do YYYY, H:mm:ss"));uo=uo.charAt(0).toUpperCase()+uo.substring(1),this.options.rtl?this.bar.style.transform="translateX(".concat(ut*-1,"px)"):this.bar.style.transform="translateX(".concat(ut,"px)"),this.bar.title=uo}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1}},{key:"start",value:function(){var X=this;function tt(){X.stop();var rt=X.body.range.conversion(X.body.domProps.center.width).scale,ot=1/rt/10;ot<30&&(ot=30),ot>1e3&&(ot=1e3),X.redraw(),X.body.emitter.emit("currentTimeTick"),X.currentTimeTimer=_setTimeout(tt,ot)}tt()}},{key:"stop",value:function(){this.currentTimeTimer!==void 0&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}},{key:"setCurrentTime",value:function(X){var tt=availableUtils.convert(X,"Date").valueOf(),rt=_Date$now();this.offset=tt-rt,this.redraw()}},{key:"getCurrentTime",value:function(){return new Date(_Date$now()+this.offset)}}]),q}(Component),$$4=_export,$find=arrayIteration.find,FIND="find",SKIPS_HOLES$1=!0;FIND in[]&&Array(1)[FIND](function(){SKIPS_HOLES$1=!1});$$4({target:"Array",proto:!0,forced:SKIPS_HOLES$1},{find:function F(W){return $find(this,W,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$2=entryVirtual$k,find$3=entryVirtual$2("Array").find,isPrototypeOf$4=objectIsPrototypeOf,method$2=find$3,ArrayPrototype$2=Array.prototype,find$2=function(F){var W=F.find;return F===ArrayPrototype$2||isPrototypeOf$4(ArrayPrototype$2,F)&&W===ArrayPrototype$2.find?method$2:W},parent$3=find$2,find$1=parent$3,find=find$1,_findInstanceProperty=getDefaultExportFromCjs(find),internalMetadata={exports:{}},fails$3=fails$v,arrayBufferNonExtensible=fails$3(function(){if(typeof ArrayBuffer=="function"){var F=new ArrayBuffer(8);Object.isExtensible(F)&&Object.defineProperty(F,"a",{value:8})}}),fails$2=fails$v,isObject$2=isObject$g,classof=classofRaw$2,ARRAY_BUFFER_NON_EXTENSIBLE=arrayBufferNonExtensible,$isExtensible=Object.isExtensible,FAILS_ON_PRIMITIVES=fails$2(function(){$isExtensible(1)}),objectIsExtensible=FAILS_ON_PRIMITIVES||ARRAY_BUFFER_NON_EXTENSIBLE?function F(W){return!isObject$2(W)||ARRAY_BUFFER_NON_EXTENSIBLE&&classof(W)==="ArrayBuffer"?!1:$isExtensible?$isExtensible(W):!0}:$isExtensible,fails$1=fails$v,freezing=!fails$1(function(){return Object.isExtensible(Object.preventExtensions({}))}),$$3=_export,uncurryThis=functionUncurryThis,hiddenKeys=hiddenKeys$6,isObject$1=isObject$g,hasOwn=hasOwnProperty_1,defineProperty$1=objectDefineProperty.f,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertyNamesExternalModule=objectGetOwnPropertyNamesExternal,isExtensible=objectIsExtensible,uid=uid$4,FREEZING=freezing,REQUIRED=!1,METADATA=uid("meta"),id=0,setMetadata=function(F){defineProperty$1(F,METADATA,{value:{objectID:"O"+id++,weakData:{}}})},fastKey$1=function(F,W){if(!isObject$1(F))return typeof F=="symbol"?F:(typeof F=="string"?"S":"P")+F;if(!hasOwn(F,METADATA)){if(!isExtensible(F))return"F";if(!W)return"E";setMetadata(F)}return F[METADATA].objectID},getWeakData=function(F,W){if(!hasOwn(F,METADATA)){if(!isExtensible(F))return!0;if(!W)return!1;setMetadata(F)}return F[METADATA].weakData},onFreeze=function(F){return FREEZING&&REQUIRED&&isExtensible(F)&&!hasOwn(F,METADATA)&&setMetadata(F),F},enable=function(){meta.enable=function(){},REQUIRED=!0;var F=getOwnPropertyNamesModule.f,W=uncurryThis([].splice),q={};q[METADATA]=1,F(q).length&&(getOwnPropertyNamesModule.f=function(K){for(var X=F(K),tt=0,rt=X.length;ttpo;po++)if(wo=vf(F[po]),wo&&isPrototypeOf$3(ResultPrototype,wo))return wo;return new Result(!1)}yn=getIterator(F,uo)}for(lf=tt?F.next:yn.next;!(yf=call(lf,yn)).done;){try{wo=vf(yf.value)}catch(_f){iteratorClose(yn,"throw",_f)}if(typeof wo=="object"&&wo&&isPrototypeOf$3(ResultPrototype,wo))return wo}return new Result(!1)},isPrototypeOf$2=objectIsPrototypeOf,$TypeError=TypeError,anInstance$2=function(F,W){if(isPrototypeOf$2(W,F))return F;throw new $TypeError("Incorrect invocation")},$$2=_export,global$1=global$l,InternalMetadataModule=internalMetadataExports,fails=fails$v,createNonEnumerableProperty=createNonEnumerableProperty$6,iterate$1=iterate$2,anInstance$1=anInstance$2,isCallable=isCallable$i,isObject=isObject$g,isNullOrUndefined$1=isNullOrUndefined$5,setToStringTag=setToStringTag$6,defineProperty=objectDefineProperty.f,forEach=arrayIteration.forEach,DESCRIPTORS$2=descriptors,InternalStateModule$1=internalState,setInternalState$1=InternalStateModule$1.set,internalStateGetterFor$1=InternalStateModule$1.getterFor,collection$1=function(F,W,q){var K=F.indexOf("Map")!==-1,X=F.indexOf("Weak")!==-1,tt=K?"set":"add",rt=global$1[F],ot=rt&&rt.prototype,ut={},yn;if(!DESCRIPTORS$2||!isCallable(rt)||!(X||ot.forEach&&!fails(function(){new rt().entries().next()})))yn=q.getConstructor(W,F,K,tt),InternalMetadataModule.enable();else{yn=W(function(mo,wo){setInternalState$1(anInstance$1(mo,uo),{type:F,collection:new rt}),isNullOrUndefined$1(wo)||iterate$1(wo,mo[tt],{that:mo,AS_ENTRIES:K})});var uo=yn.prototype,po=internalStateGetterFor$1(F);forEach(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(mo){var wo=mo==="add"||mo==="set";mo in ot&&!(X&&mo==="clear")&&createNonEnumerableProperty(uo,mo,function(lf,yf){var cf=po(this).collection;if(!wo&&X&&!isObject(lf))return mo==="get"?void 0:!1;var vf=cf[mo](lf===0?0:lf,yf);return wo?this:vf})}),X||defineProperty(uo,"size",{configurable:!0,get:function(){return po(this).collection.size}})}return setToStringTag(yn,F,!1,!0),ut[F]=yn,$$2({global:!0,forced:!0},ut),X||q.setStrong(yn,F,K),yn},defineBuiltIn=defineBuiltIn$5,defineBuiltIns$1=function(F,W,q){for(var K in W)q&&q.unsafe&&F[K]?F[K]=W[K]:defineBuiltIn(F,K,W[K],q);return F},getBuiltIn=getBuiltIn$c,defineBuiltInAccessor$1=defineBuiltInAccessor$3,wellKnownSymbol=wellKnownSymbol$m,DESCRIPTORS$1=descriptors,SPECIES=wellKnownSymbol("species"),setSpecies$1=function(F){var W=getBuiltIn(F);DESCRIPTORS$1&&W&&!W[SPECIES]&&defineBuiltInAccessor$1(W,SPECIES,{configurable:!0,get:function(){return this}})},create=objectCreate,defineBuiltInAccessor=defineBuiltInAccessor$3,defineBuiltIns=defineBuiltIns$1,bind=functionBindContext,anInstance=anInstance$2,isNullOrUndefined=isNullOrUndefined$5,iterate=iterate$2,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$3,setSpecies=setSpecies$1,DESCRIPTORS=descriptors,fastKey=internalMetadataExports.fastKey,InternalStateModule=internalState,setInternalState=InternalStateModule.set,internalStateGetterFor=InternalStateModule.getterFor,collectionStrong$1={getConstructor:function(F,W,q,K){var X=F(function(yn,uo){anInstance(yn,tt),setInternalState(yn,{type:W,index:create(null),first:void 0,last:void 0,size:0}),DESCRIPTORS||(yn.size=0),isNullOrUndefined(uo)||iterate(uo,yn[K],{that:yn,AS_ENTRIES:q})}),tt=X.prototype,rt=internalStateGetterFor(W),ot=function(yn,uo,po){var mo=rt(yn),wo=ut(yn,uo),lf,yf;return wo?wo.value=po:(mo.last=wo={index:yf=fastKey(uo,!0),key:uo,value:po,previous:lf=mo.last,next:void 0,removed:!1},mo.first||(mo.first=wo),lf&&(lf.next=wo),DESCRIPTORS?mo.size++:yn.size++,yf!=="F"&&(mo.index[yf]=wo)),yn},ut=function(yn,uo){var po=rt(yn),mo=fastKey(uo),wo;if(mo!=="F")return po.index[mo];for(wo=po.first;wo;wo=wo.next)if(wo.key===uo)return wo};return defineBuiltIns(tt,{clear:function(){for(var uo=this,po=rt(uo),mo=po.index,wo=po.first;wo;)wo.removed=!0,wo.previous&&(wo.previous=wo.previous.next=void 0),delete mo[wo.index],wo=wo.next;po.first=po.last=void 0,DESCRIPTORS?po.size=0:uo.size=0},delete:function(yn){var uo=this,po=rt(uo),mo=ut(uo,yn);if(mo){var wo=mo.next,lf=mo.previous;delete po.index[mo.index],mo.removed=!0,lf&&(lf.next=wo),wo&&(wo.previous=lf),po.first===mo&&(po.first=wo),po.last===mo&&(po.last=lf),DESCRIPTORS?po.size--:uo.size--}return!!mo},forEach:function(uo){for(var po=rt(this),mo=bind(uo,arguments.length>1?arguments[1]:void 0),wo;wo=wo?wo.next:po.first;)for(mo(wo.value,wo.key,this);wo&&wo.removed;)wo=wo.previous},has:function(uo){return!!ut(this,uo)}}),defineBuiltIns(tt,q?{get:function(uo){var po=ut(this,uo);return po&&po.value},set:function(uo,po){return ot(this,uo===0?0:uo,po)}}:{add:function(uo){return ot(this,uo=uo===0?0:uo,uo)}}),DESCRIPTORS&&defineBuiltInAccessor(tt,"size",{configurable:!0,get:function(){return rt(this).size}}),X},setStrong:function(F,W,q){var K=W+" Iterator",X=internalStateGetterFor(W),tt=internalStateGetterFor(K);defineIterator(F,W,function(rt,ot){setInternalState(this,{type:K,target:rt,state:X(rt),kind:ot,last:void 0})},function(){for(var rt=tt(this),ot=rt.kind,ut=rt.last;ut&&ut.removed;)ut=ut.previous;return!rt.target||!(rt.last=ut=ut?ut.next:rt.state.first)?(rt.target=void 0,createIterResultObject(void 0,!0)):createIterResultObject(ot==="keys"?ut.key:ot==="values"?ut.value:[ut.key,ut.value],!1)},q?"entries":"values",!q,!0),setSpecies(W)}},collection=collection$1,collectionStrong=collectionStrong$1;collection("Set",function(F){return function(){return F(this,arguments.length?arguments[0]:void 0)}},collectionStrong);var path=path$s,set$2=path.Set,parent$2=set$2,set$1=parent$2,set=set$1,_Set=getDefaultExportFromCjs(set),$$1=_export,$findIndex=arrayIteration.findIndex,FIND_INDEX="findIndex",SKIPS_HOLES=!0;FIND_INDEX in[]&&Array(1)[FIND_INDEX](function(){SKIPS_HOLES=!1});$$1({target:"Array",proto:!0,forced:SKIPS_HOLES},{findIndex:function F(W){return $findIndex(this,W,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$1=entryVirtual$k,findIndex$3=entryVirtual$1("Array").findIndex,isPrototypeOf$1=objectIsPrototypeOf,method$1=findIndex$3,ArrayPrototype$1=Array.prototype,findIndex$2=function(F){var W=F.findIndex;return F===ArrayPrototype$1||isPrototypeOf$1(ArrayPrototype$1,F)&&W===ArrayPrototype$1.findIndex?method$1:W},parent$1=findIndex$2,findIndex$1=parent$1,findIndex=findIndex$1,_findIndexInstanceProperty=getDefaultExportFromCjs(findIndex);function _createForOfIteratorHelper$5(F,W){var q=typeof _Symbol<"u"&&_getIteratorMethod(F)||F["@@iterator"];if(!q){if(_Array$isArray$1(F)||(q=_unsupportedIterableToArray$5(F))||W&&F&&typeof F.length=="number"){q&&(F=q);var K=0,X=function(){};return{s:X,n:function(){return K>=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$5(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$5(F,W);var K=_sliceInstanceProperty(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$5(F,W)}}function _arrayLikeToArray$5(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);qrt.index?1:tt.indexq[ot].index&&(q[tt].top+=q[ot].height);for(var ut=F[tt],yn=0;ynHf},wo),_spliceInstanceProperty(po).call(po,wo,0,Bf),wo++}};for(lf.s();!(yf=lf.n()).done;)cf()}catch(Af){lf.e(Af)}finally{lf.f()}mo=null;var vf=null;wo=0;for(var _f=0,$f=0,wf=0,Pf=function(){var Bf,Hf,Df=uo.shift();Df.top=tt(Df);var Lf=ot(Df),kf=ut(Df);mo!==null&&Lfkf&&($f=findLastIndexBetween(po,function(ip){return kf+EPSILON>=ot(ip)},_f,$f)+1);for(var Nf=_sortInstanceProperty(Bf=_filterInstanceProperty(Hf=_sliceInstanceProperty(po).call(po,_f,$f)).call(Hf,function(ip){return Lfot(ip)})).call(Bf,function(ip,ap){return ip.top-ap.top}),Yf=0;YfLf},wo),_spliceInstanceProperty(po).call(po,wo,0,Df),wo++);var rp=Df.top+Df.height;if(rp>wf&&(wf=rp),rt&&rt())return{v:null}},Cf;uo.length>0;)if(Cf=Pf(),Cf)return Cf.v;return wf}function checkVerticalSpatialCollision(F,W,q){return F.top-q.vertical+EPSILONW.top}function findIndexFrom(F,W,q){var K;q||(q=0);var X=_findIndexInstanceProperty(K=_sliceInstanceProperty(F).call(F,q)).call(K,W);return X===-1?F.length:X+q}function findLastIndexBetween(F,W,q,K){for(q||(q=0),K||(K=F.length),i=K-1;i>=q;i--)if(W(F[i]))return i;return q-1}var UNGROUPED$3="__ungrouped__",BACKGROUND$2="__background__",ReservedGroupIds$1={UNGROUPED:UNGROUPED$3,BACKGROUND:BACKGROUND$2},Group=function(){function F(W,q,K){var X=this;if(_classCallCheck(this,F),this.groupId=W,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.subgroupVisibility={},this.doInnerStack=!1,this.shouldBailStackItems=!1,this.subgroupIndex=0,this.subgroupOrderer=q&&q.subgroupOrder,this.itemSet=K,this.isVisible=null,this.stackDirty=!0,this._disposeCallbacks=[],q&&q.nestedGroups&&(this.nestedGroups=q.nestedGroups,q.showNested==!1?this.showNested=!1:this.showNested=!0),q&&q.subgroupStack)if(typeof q.subgroupStack=="boolean")this.doInnerStack=q.subgroupStack,this.subgroupStackAll=q.subgroupStack;else for(var tt in q.subgroupStack)this.subgroupStack[tt]=q.subgroupStack[tt],this.doInnerStack=this.doInnerStack||q.subgroupStack[tt];q&&q.heightMode?this.heightMode=q.heightMode:this.heightMode=K.options.groupHeightMode,this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var rt=function(){X.checkRangedItems=!0};this.itemSet.body.emitter.on("checkRangedItems",rt),this._disposeCallbacks.push(function(){X.itemSet.body.emitter.off("checkRangedItems",rt)}),this._create(),this.setData(q)}return _createClass(F,[{key:"_create",value:function(){var q=document.createElement("div");this.itemSet.options.groupEditable.order?q.className="vis-label draggable":q.className="vis-label",this.dom.label=q;var K=document.createElement("div");K.className="vis-inner",q.appendChild(K),this.dom.inner=K;var X=document.createElement("div");X.className="vis-group",X["vis-group"]=this,this.dom.foreground=X,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.style.position="absolute",this.dom.marker.innerHTML="",this.dom.background.appendChild(this.dom.marker)}},{key:"setData",value:function(q){if(!this.itemSet.groupTouchParams.isDragging){var K,X;if(q&&q.subgroupVisibility)for(var tt in q.subgroupVisibility)this.subgroupVisibility[tt]=q.subgroupVisibility[tt];if(this.itemSet.options&&this.itemSet.options.groupTemplate){var rt;X=_bindInstanceProperty(rt=this.itemSet.options.groupTemplate).call(rt,this),K=X(q,this.dom.inner)}else K=q&&q.content;if(K instanceof Element){for(;this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(K)}else K instanceof Object&&K.isReactComponent||(K instanceof Object?X(q,this.dom.inner):K!=null?this.dom.inner.innerHTML=availableUtils.xss(K):this.dom.inner.innerHTML=availableUtils.xss(this.groupId||""));this.dom.label.title=q&&q.title||"",this.dom.inner.firstChild?availableUtils.removeClassName(this.dom.inner,"vis-hidden"):availableUtils.addClassName(this.dom.inner,"vis-hidden"),q&&q.nestedGroups?((!this.nestedGroups||this.nestedGroups!=q.nestedGroups)&&(this.nestedGroups=q.nestedGroups),(q.showNested!==void 0||this.showNested===void 0)&&(q.showNested==!1?this.showNested=!1:this.showNested=!0),availableUtils.addClassName(this.dom.label,"vis-nesting-group"),this.showNested?(availableUtils.removeClassName(this.dom.label,"collapsed"),availableUtils.addClassName(this.dom.label,"expanded")):(availableUtils.removeClassName(this.dom.label,"expanded"),availableUtils.addClassName(this.dom.label,"collapsed"))):this.nestedGroups&&(this.nestedGroups=null,availableUtils.removeClassName(this.dom.label,"collapsed"),availableUtils.removeClassName(this.dom.label,"expanded"),availableUtils.removeClassName(this.dom.label,"vis-nesting-group")),q&&(q.treeLevel||q.nestedInGroup)?(availableUtils.addClassName(this.dom.label,"vis-nested-group"),q.treeLevel?availableUtils.addClassName(this.dom.label,"vis-group-level-"+q.treeLevel):availableUtils.addClassName(this.dom.label,"vis-group-level-unknown-but-gte1")):availableUtils.addClassName(this.dom.label,"vis-group-level-0");var ot=q&&q.className||null;ot!=this.className&&(this.className&&(availableUtils.removeClassName(this.dom.label,this.className),availableUtils.removeClassName(this.dom.foreground,this.className),availableUtils.removeClassName(this.dom.background,this.className),availableUtils.removeClassName(this.dom.axis,this.className)),availableUtils.addClassName(this.dom.label,ot),availableUtils.addClassName(this.dom.foreground,ot),availableUtils.addClassName(this.dom.background,ot),availableUtils.addClassName(this.dom.axis,ot),this.className=ot),this.style&&(availableUtils.removeCssText(this.dom.label,this.style),this.style=null),q&&q.style&&(availableUtils.addCssText(this.dom.label,q.style),this.style=q.style)}}},{key:"getLabelWidth",value:function(){return this.props.label.width}},{key:"_didMarkerHeightChange",value:function(){var q=this.dom.marker.clientHeight;if(q!=this.lastMarkerHeight){this.lastMarkerHeight=q;var K={},X=0;_forEachInstanceProperty(availableUtils).call(availableUtils,this.items,function(ut,yn){if(ut.dirty=!0,ut.displayed){var uo=!0;K[yn]=ut.redraw(uo),X=K[yn].length}});var tt=X>0;if(tt)for(var rt=function(yn){_forEachInstanceProperty(availableUtils).call(availableUtils,K,function(uo){uo[yn]()})},ot=0;otX.bailTimeMs&&(X.userBailFunction&&this.itemSet.userContinueNotBail==null?X.userBailFunction(function(rt){q.itemSet.userContinueNotBail=rt,tt=!rt}):q.itemSet.userContinueNotBail==!1?tt=!0:tt=!1)}return tt}},{key:"_redrawItems",value:function(q,K,X,tt){var rt=this,ot=q||this.stackDirty||this.isVisible&&!K;if(ot){var ut,yn,uo,po,mo,wo,lf={byEnd:_filterInstanceProperty(ut=this.orderedItems.byEnd).call(ut,function(kf){return!kf.isCluster}),byStart:_filterInstanceProperty(yn=this.orderedItems.byStart).call(yn,function(kf){return!kf.isCluster})},yf={byEnd:_toConsumableArray(new _Set(_filterInstanceProperty(uo=_mapInstanceProperty(po=this.orderedItems.byEnd).call(po,function(kf){return kf.cluster})).call(uo,function(kf){return!!kf}))),byStart:_toConsumableArray(new _Set(_filterInstanceProperty(mo=_mapInstanceProperty(wo=this.orderedItems.byStart).call(wo,function(kf){return kf.cluster})).call(mo,function(kf){return!!kf})))},cf=function(){var Nf,Yf,Gf,rp=rt._updateItemsInRange(lf,_filterInstanceProperty(Nf=rt.visibleItems).call(Nf,function(ap){return!ap.isCluster}),tt),ip=rt._updateClustersInRange(yf,_filterInstanceProperty(Yf=rt.visibleItems).call(Yf,function(ap){return ap.isCluster}),tt);return _concatInstanceProperty(Gf=[]).call(Gf,_toConsumableArray(rp),_toConsumableArray(ip))},vf=function(Nf){var Yf={},Gf=function(ap){var yp,vp=_filterInstanceProperty(yp=rt.visibleItems).call(yp,function(Np){return Np.data.subgroup===ap});Yf[ap]=Nf?_sortInstanceProperty(vp).call(vp,function(Np,jp){return Nf(Np.data,jp.data)}):vp};for(var rp in rt.subgroups)Gf(rp);return Yf};if(typeof this.itemSet.options.order=="function"){var _f=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups){var $f=vf(this.itemSet.options.order);stackSubgroupsWithInnerStack($f,X,this.subgroups),this.visibleItems=cf(),this._updateSubGroupHeights(X)}else{var wf,Pf,Cf,Af;this.visibleItems=cf(),this._updateSubGroupHeights(X);var Bf=_sortInstanceProperty(wf=_filterInstanceProperty(Pf=_sliceInstanceProperty(Cf=this.visibleItems).call(Cf)).call(Pf,function(kf){return kf.isCluster||!kf.isCluster&&!kf.cluster})).call(wf,function(kf,Nf){return _f.itemSet.options.order(kf.data,Nf.data)});this.shouldBailStackItems=stack(Bf,X,!0,_bindInstanceProperty(Af=this._shouldBailItemsRedraw).call(Af,this))}}else if(this.visibleItems=cf(),this._updateSubGroupHeights(X),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups){var Hf=vf();stackSubgroupsWithInnerStack(Hf,X,this.subgroups)}else{var Df;this.shouldBailStackItems=stack(this.visibleItems,X,!0,_bindInstanceProperty(Df=this._shouldBailItemsRedraw).call(Df,this))}else nostack(this.visibleItems,X,this.subgroups,this.itemSet.options.stackSubgroups);for(var Lf=0;Lf0){var X=this;this._resetSubgroups(),_forEachInstanceProperty(availableUtils).call(availableUtils,this.visibleItems,function(tt){tt.data.subgroup!==void 0&&(X.subgroups[tt.data.subgroup].height=Math.max(X.subgroups[tt.data.subgroup].height,tt.height+q.item.vertical),X.subgroups[tt.data.subgroup].visible=typeof K.subgroupVisibility[tt.data.subgroup]>"u"?!0:!!K.subgroupVisibility[tt.data.subgroup])})}}},{key:"_isGroupVisible",value:function(q,K){return this.top<=q.body.domProps.centerContainer.height-q.body.domProps.scrollTop+K.axis&&this.top+this.height+K.axis>=-q.body.domProps.scrollTop}},{key:"_calculateHeight",value:function(q){var K,X;if(this.heightMode==="fixed"?X=availableUtils.toArray(this.items):X=this.visibleItems,X.length>0){var tt=X[0].top,rt=X[0].top+X[0].height;if(_forEachInstanceProperty(availableUtils).call(availableUtils,X,function(ut){tt=Math.min(tt,ut.top),rt=Math.max(rt,ut.top+ut.height)}),tt>q.axis){var ot=tt-q.axis;rt-=ot,_forEachInstanceProperty(availableUtils).call(availableUtils,X,function(ut){ut.top-=ot})}K=Math.ceil(rt+q.item.vertical/2),this.heightMode!=="fitItems"&&(K=Math.max(K,this.props.label.height))}else K=this.props.label.height;return K}},{key:"show",value:function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)}},{key:"hide",value:function(){var q=this.dom.label;q.parentNode&&q.parentNode.removeChild(q);var K=this.dom.foreground;K.parentNode&&K.parentNode.removeChild(K);var X=this.dom.background;X.parentNode&&X.parentNode.removeChild(X);var tt=this.dom.axis;tt.parentNode&&tt.parentNode.removeChild(tt)}},{key:"add",value:function(q){var K;if(this.items[q.id]=q,q.setParent(this),this.stackDirty=!0,q.data.subgroup!==void 0&&(this._addToSubgroup(q),this.orderSubgroups()),!_includesInstanceProperty(K=this.visibleItems).call(K,q)){var X=this.itemSet.body.range;this._checkIfVisible(q,this.visibleItems,X)}}},{key:"_addToSubgroup",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q.data.subgroup;K!=null&&this.subgroups[K]===void 0&&(this.subgroups[K]={height:0,top:0,start:q.data.start,end:q.data.end||q.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[K]||!1},this.subgroupIndex++),new Date(q.data.start)new Date(this.subgroups[K].end)&&(this.subgroups[K].end=X),this.subgroups[K].items.push(q)}},{key:"_updateSubgroupsSizes",value:function(){var q=this;if(q.subgroups){var K=function(){var rt,ot=q.subgroups[X].items[0].data.end||q.subgroups[X].items[0].data.start,ut=q.subgroups[X].items[0].data.start,yn=ot-1;_forEachInstanceProperty(rt=q.subgroups[X].items).call(rt,function(uo){new Date(uo.data.start)new Date(yn)&&(yn=po)}),q.subgroups[X].start=ut,q.subgroups[X].end=new Date(yn-1)};for(var X in q.subgroups)K()}}},{key:"orderSubgroups",value:function(){if(this.subgroupOrderer!==void 0){var q=[];if(typeof this.subgroupOrderer=="string"){for(var K in this.subgroups)q.push({subgroup:K,sortField:this.subgroups[K].items[0].data[this.subgroupOrderer]});_sortInstanceProperty(q).call(q,function(rt,ot){return rt.sortField-ot.sortField})}else if(typeof this.subgroupOrderer=="function"){for(var X in this.subgroups)q.push(this.subgroups[X].items[0].data);_sortInstanceProperty(q).call(q,this.subgroupOrderer)}if(q.length>0)for(var tt=0;tt1&&arguments[1]!==void 0?arguments[1]:q.data.subgroup;if(K!=null){var X=this.subgroups[K];if(X){var tt,rt=_indexOfInstanceProperty(tt=X.items).call(tt,q);if(rt>=0){var ot;_spliceInstanceProperty(ot=X.items).call(ot,rt,1),X.items.length?this._updateSubgroupsSizes():delete this.subgroups[K]}}}}},{key:"removeFromDataSet",value:function(q){this.itemSet.removeItem(q.id)}},{key:"order",value:function(){for(var q=availableUtils.toArray(this.items),K=[],X=[],tt=0;tt0)for(var lf=0;lfpo}),this.checkRangedItems==!0){this.checkRangedItems=!1;for(var cf=0;cfpo})}for(var _f={},$f=0,wf=0;wf0;if(Af)for(var Bf=function(kf){_forEachInstanceProperty(availableUtils).call(availableUtils,_f,function(Nf){Nf[kf]()})},Hf=0;Hf<$f;Hf++)Bf(Hf);for(var Df=0;Df=0;ot--){var ut=K[ot];if(rt(ut))break;!(ut.isCluster&&!ut.hasItems())&&!ut.cluster&&tt[ut.id]===void 0&&(tt[ut.id]=!0,X.push(ut))}for(var yn=q+1;yn0)for(var ot=0;ot0;if(yf)for(var cf=0;cf"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var BackgroundGroup=function(F){_inherits(q,F);var W=_createSuper$8(q);function q(K,X,tt){var rt;return _classCallCheck(this,q),rt=W.call(this,K,X,tt),rt.width=0,rt.height=0,rt.top=0,rt.left=0,rt}return _createClass(q,[{key:"redraw",value:function(X,tt,rt){var ot=!1;this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,X),this.width=this.dom.background.offsetWidth,this.dom.background.style.height="0";for(var ut=0,yn=this.visibleItems.length;ut=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +`&&ot()}return _$3.trim(rt)}var parser$2=parseStyle$1,DEFAULT$1=_default,parseStyle=parser$2;function isNull$1(F){return F==null}function shallowCopyObject$1(F){var W={};for(var q in F)W[q]=F[q];return W}function FilterCSS$2(F){F=shallowCopyObject$1(F||{}),F.whiteList=F.whiteList||DEFAULT$1.whiteList,F.onAttr=F.onAttr||DEFAULT$1.onAttr,F.onIgnoreAttr=F.onIgnoreAttr||DEFAULT$1.onIgnoreAttr,F.safeAttrValue=F.safeAttrValue||DEFAULT$1.safeAttrValue,this.options=F}FilterCSS$2.prototype.process=function(F){if(F=F||"",F=F.toString(),!F)return"";var W=this,q=W.options,K=q.whiteList,X=q.onAttr,tt=q.onIgnoreAttr,rt=q.safeAttrValue,ot=parseStyle(F,function(ut,yn,uo,po,mo){var wo=K[uo],lf=!1;if(wo===!0?lf=wo:typeof wo=="function"?lf=wo(po):wo instanceof RegExp&&(lf=wo.test(po)),lf!==!0&&(lf=!1),po=rt(uo,po),!!po){var yf={position:yn,sourcePosition:ut,source:mo,isWhite:lf};if(lf){var cf=X(uo,po,yf);return isNull$1(cf)?uo+":"+po:cf}else{var cf=tt(uo,po,yf);if(!isNull$1(cf))return cf}}});return ot};var css=FilterCSS$2;(function(F,W){var q=_default,K=css;function X(rt,ot){var ut=new K(ot);return ut.process(rt)}W=F.exports=X,W.FilterCSS=K;for(var tt in q)W[tt]=q[tt];typeof window<"u"&&(window.filterCSS=F.exports)})(lib,lib.exports);var libExports$1=lib.exports,util={indexOf:function(F,W){var q,K;if(Array.prototype.indexOf)return F.indexOf(W);for(q=0,K=F.length;q/g,REGEXP_QUOTE=/"/g,REGEXP_QUOTE_2=/"/g,REGEXP_ATTR_VALUE_1=/&#([a-zA-Z0-9]*);?/gim,REGEXP_ATTR_VALUE_COLON=/:?/gim,REGEXP_ATTR_VALUE_NEWLINE=/&newline;?/gim,REGEXP_DEFAULT_ON_TAG_ATTR_4=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,REGEXP_DEFAULT_ON_TAG_ATTR_7=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,REGEXP_DEFAULT_ON_TAG_ATTR_8=/u\s*r\s*l\s*\(.*/gi;function escapeQuote(F){return F.replace(REGEXP_QUOTE,""")}function unescapeQuote(F){return F.replace(REGEXP_QUOTE_2,'"')}function escapeHtmlEntities(F){return F.replace(REGEXP_ATTR_VALUE_1,function(q,K){return K[0]==="x"||K[0]==="X"?String.fromCharCode(parseInt(K.substr(1),16)):String.fromCharCode(parseInt(K,10))})}function escapeDangerHtml5Entities(F){return F.replace(REGEXP_ATTR_VALUE_COLON,":").replace(REGEXP_ATTR_VALUE_NEWLINE," ")}function clearNonPrintableCharacter(F){for(var W="",q=0,K=F.length;q",K);if(X===-1)break;q=X+3}return W}function stripBlankChar(F){var W=F.split("");return W=W.filter(function(q){var K=q.charCodeAt(0);return K===127?!1:K<=31?K===10||K===13:!0}),W.join("")}_default$1.whiteList=getDefaultWhiteList();_default$1.getDefaultWhiteList=getDefaultWhiteList;_default$1.onTag=onTag;_default$1.onIgnoreTag=onIgnoreTag;_default$1.onTagAttr=onTagAttr;_default$1.onIgnoreTagAttr=onIgnoreTagAttr;_default$1.safeAttrValue=safeAttrValue;_default$1.escapeHtml=escapeHtml;_default$1.escapeQuote=escapeQuote;_default$1.unescapeQuote=unescapeQuote;_default$1.escapeHtmlEntities=escapeHtmlEntities;_default$1.escapeDangerHtml5Entities=escapeDangerHtml5Entities;_default$1.clearNonPrintableCharacter=clearNonPrintableCharacter;_default$1.friendlyAttrValue=friendlyAttrValue;_default$1.escapeAttrValue=escapeAttrValue;_default$1.onIgnoreTagStripAll=onIgnoreTagStripAll;_default$1.StripTagBody=StripTagBody;_default$1.stripCommentTag=stripCommentTag;_default$1.stripBlankChar=stripBlankChar;_default$1.cssFilter=defaultCSSFilter;_default$1.getDefaultCSSWhiteList=getDefaultCSSWhiteList;var parser$1={},_$1=util;function getTagName(F){var W=_$1.spaceIndex(F),q;return W===-1?q=F.slice(1,-1):q=F.slice(1,W+1),q=_$1.trim(q).toLowerCase(),q.slice(0,1)==="/"&&(q=q.slice(1)),q.slice(-1)==="/"&&(q=q.slice(0,-1)),q}function isClosing(F){return F.slice(0,2)===""||ot===ut-1){K+=q(F.slice(X,tt)),uo=F.slice(tt,ot+1),yn=getTagName(uo),K+=W(tt,K.length,yn,uo,isClosing(uo)),X=ot+1,tt=!1;continue}if(po==='"'||po==="'")for(var mo=1,wo=F.charAt(ot-mo);wo.trim()===""||wo==="=";){if(wo==="="){rt=po;continue e}wo=F.charAt(ot-++mo)}}else if(po===rt){rt=!1;continue}}return X0;W--){var q=F[W];if(q!==" ")return q==="="?W:-1}}function isQuoteWrapString(F){return F[0]==='"'&&F[F.length-1]==='"'||F[0]==="'"&&F[F.length-1]==="'"}function stripQuoteWrap(F){return isQuoteWrapString(F)?F.substr(1,F.length-2):F}parser$1.parseTag=parseTag$1;parser$1.parseAttr=parseAttr$1;var FilterCSS=libExports$1.FilterCSS,DEFAULT=_default$1,parser=parser$1,parseTag=parser.parseTag,parseAttr=parser.parseAttr,_=util;function isNull(F){return F==null}function getAttrs(F){var W=_.spaceIndex(F);if(W===-1)return{html:"",closing:F[F.length-2]==="/"};F=_.trim(F.slice(W+1,-1));var q=F[F.length-1]==="/";return q&&(F=_.trim(F.slice(0,-1))),{html:F,closing:q}}function shallowCopyObject(F){var W={};for(var q in F)W[q]=F[q];return W}function keysToLowerCase(F){var W={};for(var q in F)Array.isArray(F[q])?W[q.toLowerCase()]=F[q].map(function(K){return K.toLowerCase()}):W[q.toLowerCase()]=F[q];return W}function FilterXSS(F){F=shallowCopyObject(F||{}),F.stripIgnoreTag&&(F.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),F.onIgnoreTag=DEFAULT.onIgnoreTagStripAll),F.whiteList||F.allowList?F.whiteList=keysToLowerCase(F.whiteList||F.allowList):F.whiteList=DEFAULT.whiteList,F.onTag=F.onTag||DEFAULT.onTag,F.onTagAttr=F.onTagAttr||DEFAULT.onTagAttr,F.onIgnoreTag=F.onIgnoreTag||DEFAULT.onIgnoreTag,F.onIgnoreTagAttr=F.onIgnoreTagAttr||DEFAULT.onIgnoreTagAttr,F.safeAttrValue=F.safeAttrValue||DEFAULT.safeAttrValue,F.escapeHtml=F.escapeHtml||DEFAULT.escapeHtml,this.options=F,F.css===!1?this.cssFilter=!1:(F.css=F.css||{},this.cssFilter=new FilterCSS(F.css))}FilterXSS.prototype.process=function(F){if(F=F||"",F=F.toString(),!F)return"";var W=this,q=W.options,K=q.whiteList,X=q.onTag,tt=q.onIgnoreTag,rt=q.onTagAttr,ot=q.onIgnoreTagAttr,ut=q.safeAttrValue,yn=q.escapeHtml,uo=W.cssFilter;q.stripBlankChar&&(F=DEFAULT.stripBlankChar(F)),q.allowCommentTag||(F=DEFAULT.stripCommentTag(F));var po=!1;q.stripIgnoreTagBody&&(po=DEFAULT.StripTagBody(q.stripIgnoreTagBody,tt),tt=po.onIgnoreTag);var mo=parseTag(F,function(wo,lf,yf,cf,vf){var _f={sourcePosition:wo,position:lf,isClosing:vf,isWhite:Object.prototype.hasOwnProperty.call(K,yf)},$f=X(yf,cf,_f);if(!isNull($f))return $f;if(_f.isWhite){if(_f.isClosing)return"";var xf=getAttrs(cf),Af=K[yf],Cf=parseAttr(xf.html,function(Pf,Bf){var Hf=_.indexOf(Af,Pf)!==-1,Df=rt(yf,Pf,Bf,Hf);return isNull(Df)?Hf?(Bf=ut(yf,Pf,Bf,uo),Bf?Pf+'="'+Bf+'"':Pf):(Df=ot(yf,Pf,Bf,Hf),isNull(Df)?void 0:Df):Df});return cf="<"+yf,Cf&&(cf+=" "+Cf),xf.closing&&(cf+=" /"),cf+=">",cf}else return $f=tt(yf,cf,_f),isNull($f)?yn(cf):$f},yn);return po&&(mo=po.remove(mo)),mo};var xss=FilterXSS;(function(F,W){var q=_default$1,K=parser$1,X=xss;function tt(ot,ut){var yn=new X(ut);return yn.process(ot)}W=F.exports=tt,W.filterXSS=tt,W.FilterXSS=X,function(){for(var ot in q)W[ot]=q[ot];for(var ut in K)W[ut]=K[ut]}(),typeof window<"u"&&(window.filterXSS=F.exports);function rt(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}rt()&&(self.filterXSS=F.exports)})(lib$1,lib$1.exports);var libExports=lib$1.exports,xssFilter=getDefaultExportFromCjs(libExports);let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const byteToHex=[];for(let F=0;F<256;++F)byteToHex.push((F+256).toString(16).slice(1));function unsafeStringify(F,W=0){return byteToHex[F[W+0]]+byteToHex[F[W+1]]+byteToHex[F[W+2]]+byteToHex[F[W+3]]+"-"+byteToHex[F[W+4]]+byteToHex[F[W+5]]+"-"+byteToHex[F[W+6]]+byteToHex[F[W+7]]+"-"+byteToHex[F[W+8]]+byteToHex[F[W+9]]+"-"+byteToHex[F[W+10]]+byteToHex[F[W+11]]+byteToHex[F[W+12]]+byteToHex[F[W+13]]+byteToHex[F[W+14]]+byteToHex[F[W+15]]}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var native={randomUUID};function v4(F,W,q){if(native.randomUUID&&!W&&!F)return native.randomUUID();F=F||{};const K=F.random||(F.rng||rng)();if(K[6]=K[6]&15|64,K[8]=K[8]&63|128,W){q=q||0;for(let X=0;X<16;++X)W[q+X]=K[X];return W}return unsafeStringify(K)}function ownKeys(F,W){var q=_Object$keys(F);if(_Object$getOwnPropertySymbols){var K=_Object$getOwnPropertySymbols(F);W&&(K=_filterInstanceProperty(K).call(K,function(X){return _Object$getOwnPropertyDescriptor(F,X).enumerable})),q.push.apply(q,K)}return q}function _objectSpread(F){for(var W=1;W1&&arguments[1]!==void 0?arguments[1]:{start:"Date",end:"Date"},ut=F._idProp,yn=new DataSet({fieldId:ut}),uo=_mapInstanceProperty(W=createNewDataPipeFrom(F)).call(W,function(po){var mo;return _reduceInstanceProperty(mo=_Object$keys(po)).call(mo,function(wo,lf){return wo[lf]=convert(po[lf],ot[lf]),wo},{})}).to(yn);return uo.all().start(),{add:function(){var mo;return(mo=F.getDataSet()).add.apply(mo,arguments)},remove:function(){var mo;return(mo=F.getDataSet()).remove.apply(mo,arguments)},update:function(){var mo;return(mo=F.getDataSet()).update.apply(mo,arguments)},updateOnly:function(){var mo;return(mo=F.getDataSet()).updateOnly.apply(mo,arguments)},clear:function(){var mo;return(mo=F.getDataSet()).clear.apply(mo,arguments)},forEach:_bindInstanceProperty(q=_forEachInstanceProperty(yn)).call(q,yn),get:_bindInstanceProperty(K=yn.get).call(K,yn),getIds:_bindInstanceProperty(X=yn.getIds).call(X,yn),off:_bindInstanceProperty(tt=yn.off).call(tt,yn),on:_bindInstanceProperty(rt=yn.on).call(rt,yn),get length(){return yn.length},idProp:ut,type:ot,rawDS:F,coercedDS:yn,dispose:function(){return uo.stop()}}}var setupXSSCleaner=function F(W){var q=new xssFilter.FilterXSS(W);return function(K){return q.process(K)}},setupNoOpCleaner=function F(W){return W},configuredXSSProtection=setupXSSCleaner(),setupXSSProtection=function F(W){W&&(W.disabled===!0?(configuredXSSProtection=setupNoOpCleaner,console.warn("You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!")):W.filterOptions&&(configuredXSSProtection=setupXSSCleaner(W.filterOptions)))},availableUtils=_objectSpread(_objectSpread({},util$2),{},{convert,setupXSSProtection});_Object$defineProperty(availableUtils,"xss",{get:function F(){return configuredXSSProtection}});var global$2=global$l,fails$5=fails$v,uncurryThis$2=functionUncurryThis,toString$2=toString$b,trim=stringTrim.trim,whitespaces=whitespaces$3,charAt=uncurryThis$2("".charAt),$parseFloat$1=global$2.parseFloat,Symbol$1=global$2.Symbol,ITERATOR=Symbol$1&&Symbol$1.iterator,FORCED$1=1/$parseFloat$1(whitespaces+"-0")!==-1/0||ITERATOR&&!fails$5(function(){$parseFloat$1(Object(ITERATOR))}),numberParseFloat=FORCED$1?function F(W){var q=trim(toString$2(W)),K=$parseFloat$1(q);return K===0&&charAt(q,0)==="-"?-0:K}:$parseFloat$1,$$8=_export,$parseFloat=numberParseFloat;$$8({global:!0,forced:parseFloat!==$parseFloat},{parseFloat:$parseFloat});var path$2=path$s,_parseFloat$3=path$2.parseFloat,parent$7=_parseFloat$3,_parseFloat$2=parent$7,_parseFloat=_parseFloat$2,_parseFloat$1=getDefaultExportFromCjs(_parseFloat),Component=function(){function F(W,q){_classCallCheck(this,F),this.options=null,this.props=null}return _createClass(F,[{key:"setOptions",value:function(q){q&&availableUtils.extend(this.options,q)}},{key:"redraw",value:function(){return!1}},{key:"destroy",value:function(){}},{key:"_isResized",value:function(){var q=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,q}}]),F}(),toIntegerOrInfinity=toIntegerOrInfinity$5,toString$1=toString$b,requireObjectCoercible=requireObjectCoercible$6,$RangeError=RangeError,stringRepeat=function F(W){var q=toString$1(requireObjectCoercible(this)),K="",X=toIntegerOrInfinity(W);if(X<0||X===1/0)throw new $RangeError("Wrong number of repetitions");for(;X>0;(X>>>=1)&&(q+=q))X&1&&(K+=q);return K},$$7=_export,repeat$4=stringRepeat;$$7({target:"String",proto:!0},{repeat:repeat$4});var entryVirtual$5=entryVirtual$k,repeat$3=entryVirtual$5("String").repeat,isPrototypeOf$7=objectIsPrototypeOf,method$5=repeat$3,StringPrototype=String.prototype,repeat$2=function(F){var W=F.repeat;return typeof F=="string"||F===StringPrototype||isPrototypeOf$7(StringPrototype,F)&&W===StringPrototype.repeat?method$5:W},parent$6=repeat$2,repeat$1=parent$6,repeat=repeat$1,_repeatInstanceProperty=getDefaultExportFromCjs(repeat),arraySlice=arraySliceSimple,floor=Math.floor,mergeSort=function(F,W){var q=F.length,K=floor(q/2);return q<8?insertionSort(F,W):merge(F,mergeSort(arraySlice(F,0,K),W),mergeSort(arraySlice(F,K),W),W)},insertionSort=function(F,W){for(var q=F.length,K=1,X,tt;K0;)F[tt]=F[--tt];tt!==K++&&(F[tt]=X)}return F},merge=function(F,W,q,K){for(var X=W.length,tt=q.length,rt=0,ot=0;rt3)){if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<603;var F="",W,q,K,X;for(W=65;W<76;W++){switch(q=String.fromCharCode(W),W){case 66:case 69:case 70:case 72:K=3;break;case 68:case 71:K=4;break;default:K=2}for(X=0;X<47;X++)test.push({k:q+X,v:K})}for(test.sort(function(tt,rt){return rt.v-tt.v}),X=0;XtoString(q)?1:-1}};$$6({target:"Array",proto:!0,forced:FORCED},{sort:function F(W){W!==void 0&&aCallable(W);var q=toObject(this);if(STABLE_SORT)return W===void 0?nativeSort(q):nativeSort(q,W);var K=[],X=lengthOfArrayLike$1(q),tt,rt;for(rt=0;rt=4*rt){var po=0,mo=X.clone();switch(_repeatInstanceProperty(q[ot])){case"daily":ut.day()!=yn.day()&&(po=1),ut.dayOfYear(K.dayOfYear()),ut.year(K.year()),ut.subtract(7,"days"),yn.dayOfYear(K.dayOfYear()),yn.year(K.year()),yn.subtract(7-po,"days"),mo.add(1,"weeks");break;case"weekly":{var wo=yn.diff(ut,"days"),lf=ut.day();ut.date(K.date()),ut.month(K.month()),ut.year(K.year()),yn=ut.clone(),ut.day(lf),yn.day(lf),yn.add(wo,"days"),ut.subtract(1,"weeks"),yn.subtract(1,"weeks"),mo.add(1,"weeks");break}case"monthly":ut.month()!=yn.month()&&(po=1),ut.month(K.month()),ut.year(K.year()),ut.subtract(1,"months"),yn.month(K.month()),yn.year(K.year()),yn.subtract(1,"months"),yn.add(po,"months"),mo.add(1,"months");break;case"yearly":ut.year()!=yn.year()&&(po=1),ut.year(K.year()),ut.subtract(1,"years"),yn.year(K.year()),yn.subtract(1,"years"),yn.add(po,"years"),mo.add(1,"years");break;default:console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",_repeatInstanceProperty(q[ot]));return}for(;ut=q[X].start&&q[tt].end<=q[X].end?q[tt].remove=!0:q[tt].start>=q[X].start&&q[tt].start<=q[X].end?(q[X].end=q[tt].end,q[tt].remove=!0):q[tt].end>=q[X].start&&q[tt].end<=q[X].end&&(q[X].start=q[tt].start,q[tt].remove=!0));for(X=0;X=rt&&XF.range.end){var ot={start:F.range.start,end:W};return W=correctTimeForHidden(F.options.moment,F.body.hiddenDates,ot,W),K=F.range.conversion(q,tt),(W.valueOf()-K.offset)*K.scale}else return W=correctTimeForHidden(F.options.moment,F.body.hiddenDates,F.range,W),K=F.range.conversion(q,tt),(W.valueOf()-K.offset)*K.scale}function toTime(F,W,q){if(F.body.hiddenDates.length==0){var K=F.range.conversion(q);return new Date(W/K.scale+K.offset)}else{var X=getHiddenDurationBetween(F.body.hiddenDates,F.range.start,F.range.end),tt=F.range.end-F.range.start-X,rt=tt*W/q,ot=getAccumulatedHiddenDuration(F.body.hiddenDates,F.range,rt);return new Date(ot+rt+F.range.start)}}function getHiddenDurationBetween(F,W,q){for(var K=0,X=0;X=W&&rt=W&&rt<=q&&(K+=rt-tt)}return K}function correctTimeForHidden(F,W,q,K){return K=F(K).toDate().valueOf(),K-=getHiddenDurationBefore(F,W,q,K),K}function getHiddenDurationBefore(F,W,q,K){var X=0;K=F(K).toDate().valueOf();for(var tt=0;tt=q.start&&ot=ot&&(X+=ot-rt)}return X}function getAccumulatedHiddenDuration(F,W,q){for(var K=0,X=0,tt=W.start,rt=0;rt=W.start&&ut=q)break;K+=ut-ot}}return K}function snapAwayFromHidden(F,W,q,K){var X=getIsHidden(W,F);return X.hidden==!0?q<0?K==!0?X.startDate-(X.endDate-W)-1:X.startDate-1:K==!0?X.endDate+(W-X.startDate)+1:X.endDate+1:W}function getIsHidden(F,W){for(var q=0;q=K&&F"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var Range=function(F){_inherits(q,F);var W=_createSuper$c(q);function q(K,X){var tt,rt,ot,ut,yn,uo,po,mo;_classCallCheck(this,q),mo=W.call(this);var wo=moment$3().hours(0).minutes(0).seconds(0).milliseconds(0),lf=wo.clone().add(-3,"days").valueOf(),yf=wo.clone().add(3,"days").valueOf();return mo.millisecondsPerPixelCache=void 0,X===void 0?(mo.start=lf,mo.end=yf):(mo.start=X.start||lf,mo.end=X.end||yf),mo.rolling=!1,mo.body=K,mo.deltaDifference=0,mo.scaleOffset=0,mo.startToFront=!1,mo.endToFront=!0,mo.defaultOptions={rtl:!1,start:null,end:null,moment:moment$3,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:1e3*60*60*24*365*1e4,rollingMode:{follow:!1,offset:.5}},mo.options=availableUtils.extend({},mo.defaultOptions),mo.props={touch:{}},mo.animationTimer=null,mo.body.emitter.on("panstart",_bindInstanceProperty(tt=mo._onDragStart).call(tt,_assertThisInitialized$1(mo))),mo.body.emitter.on("panmove",_bindInstanceProperty(rt=mo._onDrag).call(rt,_assertThisInitialized$1(mo))),mo.body.emitter.on("panend",_bindInstanceProperty(ot=mo._onDragEnd).call(ot,_assertThisInitialized$1(mo))),mo.body.emitter.on("mousewheel",_bindInstanceProperty(ut=mo._onMouseWheel).call(ut,_assertThisInitialized$1(mo))),mo.body.emitter.on("touch",_bindInstanceProperty(yn=mo._onTouch).call(yn,_assertThisInitialized$1(mo))),mo.body.emitter.on("pinch",_bindInstanceProperty(uo=mo._onPinch).call(uo,_assertThisInitialized$1(mo))),mo.body.dom.rollingModeBtn.addEventListener("click",_bindInstanceProperty(po=mo.startRolling).call(po,_assertThisInitialized$1(mo))),mo.setOptions(X),mo}return _createClass(q,[{key:"setOptions",value:function(X){if(X){var tt=["animation","direction","min","max","zoomMin","zoomMax","moveable","zoomable","moment","activate","hiddenDates","zoomKey","zoomFriction","rtl","showCurrentTime","rollingMode","horizontalScroll"];availableUtils.selectiveExtend(tt,this.options,X),X.rollingMode&&X.rollingMode.follow&&this.startRolling(),("start"in X||"end"in X)&&this.setRange(X.start,X.end)}}},{key:"startRolling",value:function(){var X=this;function tt(){X.stopRolling(),X.rolling=!0;var rt=X.end-X.start,ot=availableUtils.convert(new Date,"Date").valueOf(),ut=X.options.rollingMode&&X.options.rollingMode.offset||.5,yn=ot-rt*ut,uo=ot+rt*(1-ut),po={animation:!1};X.setRange(yn,uo,po);var mo=X.conversion(X.body.domProps.center.width).scale;rt=1/mo/10,rt<30&&(rt=30),rt>1e3&&(rt=1e3),X.body.dom.rollingModeBtn.style.visibility="hidden",X.currentTimeTimer=_setTimeout(tt,rt)}tt()}},{key:"stopRolling",value:function(){this.currentTimeTimer!==void 0&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")}},{key:"setRange",value:function(X,tt,rt,ot,ut){rt||(rt={}),rt.byUser!==!0&&(rt.byUser=!1);var yn=this,uo=X!=null?availableUtils.convert(X,"Date").valueOf():null,po=tt!=null?availableUtils.convert(tt,"Date").valueOf():null;if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,rt.animation){var mo=this.start,wo=this.end,lf=_typeof(rt.animation)==="object"&&"duration"in rt.animation?rt.animation.duration:500,yf=_typeof(rt.animation)==="object"&&"easingFunction"in rt.animation?rt.animation.easingFunction:"easeInOutQuad",cf=availableUtils.easingFunctions[yf];if(!cf){var vf;throw new Error(_concatInstanceProperty(vf="Unknown easing function ".concat(_JSON$stringify(yf),". Choose from: ")).call(vf,_Object$keys(availableUtils.easingFunctions).join(", ")))}var _f=_Date$now(),$f=!1,xf=function Pf(){if(!yn.props.touch.dragging){var Bf=_Date$now(),Hf=Bf-_f,Df=cf(Hf/lf),Lf=Hf>lf,kf=Lf||uo===null?uo:mo+(uo-mo)*Df,Nf=Lf||po===null?po:wo+(po-wo)*Df;Af=yn._applyRange(kf,Nf),updateHiddenDates(yn.options.moment,yn.body,yn.options.hiddenDates),$f=$f||Af;var Yf={start:new Date(yn.start),end:new Date(yn.end),byUser:rt.byUser,event:rt.event};if(ut&&ut(Df,Af,Lf),Af&&yn.body.emitter.emit("rangechange",Yf),Lf){if($f&&(yn.body.emitter.emit("rangechanged",Yf),ot))return ot()}else yn.animationTimer=_setTimeout(Pf,20)}};return xf()}else{var Af=this._applyRange(uo,po);if(updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),Af){var Cf={start:new Date(this.start),end:new Date(this.end),byUser:rt.byUser,event:rt.event};if(this.body.emitter.emit("rangechange",Cf),clearTimeout(yn.timeoutID),yn.timeoutID=_setTimeout(function(){yn.body.emitter.emit("rangechanged",Cf)},200),ot)return ot()}}}},{key:"getMillisecondsPerPixel",value:function(){return this.millisecondsPerPixelCache===void 0&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache}},{key:"_cancelAnimation",value:function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)}},{key:"_applyRange",value:function(X,tt){var rt=X!=null?availableUtils.convert(X,"Date").valueOf():this.start,ot=tt!=null?availableUtils.convert(tt,"Date").valueOf():this.end,ut=this.options.max!=null?availableUtils.convert(this.options.max,"Date").valueOf():null,yn=this.options.min!=null?availableUtils.convert(this.options.min,"Date").valueOf():null,uo;if(isNaN(rt)||rt===null)throw new Error('Invalid start "'.concat(X,'"'));if(isNaN(ot)||ot===null)throw new Error('Invalid end "'.concat(tt,'"'));if(otut&&(ot=ut)),ut!==null&&ot>ut&&(uo=ot-ut,rt-=uo,ot-=uo,yn!=null&&rt=this.start-mo&&ot<=this.end?(rt=this.start,ot=this.end):(uo=po-(ot-rt),rt-=uo/2,ot+=uo/2)}}if(this.options.zoomMax!==null){var wo=_parseFloat$1(this.options.zoomMax);wo<0&&(wo=0),ot-rt>wo&&(this.end-this.start===wo&&rtthis.end?(rt=this.start,ot=this.end):(uo=ot-rt-wo,rt+=uo/2,ot-=uo/2))}var lf=this.start!=rt||this.end!=ot;return!(rt>=this.start&&rt<=this.end||ot>=this.start&&ot<=this.end)&&!(this.start>=rt&&this.start<=ot||this.end>=rt&&this.end<=ot)&&this.body.emitter.emit("checkRangedItems"),this.start=rt,this.end=ot,lf}},{key:"getRange",value:function(){return{start:this.start,end:this.end}}},{key:"conversion",value:function(X,tt){return q.conversion(this.start,this.end,X,tt)}},{key:"_onDragStart",value:function(X){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(X)&&this.props.touch.allowDragging&&(this.stopRolling(),this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))}},{key:"_onDrag",value:function(X){if(X&&this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var tt=this.options.direction;validateDirection(tt);var rt=tt=="horizontal"?X.deltaX:X.deltaY;rt-=this.deltaDifference;var ot=this.props.touch.end-this.props.touch.start,ut=getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);ot-=ut;var yn=tt=="horizontal"?this.body.domProps.center.width:this.body.domProps.center.height,uo;this.options.rtl?uo=rt/yn*ot:uo=-rt/yn*ot;var po=this.props.touch.start+uo,mo=this.props.touch.end+uo,wo=snapAwayFromHidden(this.body.hiddenDates,po,this.previousDelta-rt,!0),lf=snapAwayFromHidden(this.body.hiddenDates,mo,this.previousDelta-rt,!0);if(wo!=po||lf!=mo){this.deltaDifference+=rt,this.props.touch.start=wo,this.props.touch.end=lf,this._onDrag(X);return}this.previousDelta=rt,this._applyRange(po,mo);var yf=new Date(this.start),cf=new Date(this.end);this.body.emitter.emit("rangechange",{start:yf,end:cf,byUser:!0,event:X}),this.body.emitter.emit("panmove")}}},{key:"_onDragEnd",value:function(X){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:X}))}},{key:"_onMouseWheel",value:function(X){var tt=0;if(X.wheelDelta?tt=X.wheelDelta/120:X.detail?tt=-X.detail/3:X.deltaY&&(tt=-X.deltaY/3),!(this.options.zoomKey&&!X[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(X)&&tt){var rt=this.options.zoomFriction||5,ot;tt<0?ot=1-tt/rt:ot=1/(1+tt/rt);var ut;if(this.rolling){var yn=this.options.rollingMode&&this.options.rollingMode.offset||.5;ut=this.start+(this.end-this.start)*yn}else{var uo=this.getPointer({x:X.clientX,y:X.clientY},this.body.dom.center);ut=this._pointerToDate(uo)}this.zoom(ot,ut,tt,X),X.preventDefault()}}},{key:"_onTouch",value:function(X){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.props.touch.centerDate=null,this.scaleOffset=0,this.deltaDifference=0,availableUtils.preventDefault(X)}},{key:"_onPinch",value:function(X){if(this.options.zoomable&&this.options.moveable){availableUtils.preventDefault(X),this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(X.center,this.body.dom.center),this.props.touch.centerDate=this._pointerToDate(this.props.touch.center)),this.stopRolling();var tt=1/(X.scale+this.scaleOffset),rt=this.props.touch.centerDate,ot=getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),ut=getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,rt),yn=ot-ut,uo=rt-ut+(this.props.touch.start-(rt-ut))*tt,po=rt+yn+(this.props.touch.end-(rt+yn))*tt;this.startToFront=1-tt<=0,this.endToFront=tt-1<=0;var mo=snapAwayFromHidden(this.body.hiddenDates,uo,1-tt,!0),wo=snapAwayFromHidden(this.body.hiddenDates,po,tt-1,!0);(mo!=uo||wo!=po)&&(this.props.touch.start=mo,this.props.touch.end=wo,this.scaleOffset=1-X.scale,uo=mo,po=wo);var lf={animation:!1,byUser:!0,event:X};this.setRange(uo,po,lf),this.startToFront=!1,this.endToFront=!0}}},{key:"_isInsideRange",value:function(X){var tt=X.center?X.center.x:X.clientX,rt=this.body.dom.centerContainer.getBoundingClientRect(),ot=this.options.rtl?tt-rt.left:rt.right-tt,ut=this.body.util.toTime(ot);return ut>=this.start&&ut<=this.end}},{key:"_pointerToDate",value:function(X){var tt,rt=this.options.direction;if(validateDirection(rt),rt=="horizontal")return this.body.util.toTime(X.x).valueOf();var ot=this.body.domProps.center.height;return tt=this.conversion(ot),X.y/tt.scale+tt.offset}},{key:"getPointer",value:function(X,tt){var rt=tt.getBoundingClientRect();return this.options.rtl?{x:rt.right-X.x,y:X.y-rt.top}:{x:X.x-rt.left,y:X.y-rt.top}}},{key:"zoom",value:function(X,tt,rt,ot){tt==null&&(tt=(this.start+this.end)/2);var ut=getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),yn=getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,tt),uo=ut-yn,po=tt-yn+(this.start-(tt-yn))*X,mo=tt+uo+(this.end-(tt+uo))*X;this.startToFront=!(rt>0),this.endToFront=!(-rt>0);var wo=snapAwayFromHidden(this.body.hiddenDates,po,rt,!0),lf=snapAwayFromHidden(this.body.hiddenDates,mo,-rt,!0);(wo!=po||lf!=mo)&&(po=wo,mo=lf);var yf={animation:!1,byUser:!0,event:ot};this.setRange(po,mo,yf),this.startToFront=!1,this.endToFront=!0}},{key:"move",value:function(X){var tt=this.end-this.start,rt=this.start+tt*X,ot=this.end+tt*X;this.start=rt,this.end=ot}},{key:"moveTo",value:function(X){var tt=(this.start+this.end)/2,rt=tt-X,ot=this.start-rt,ut=this.end-rt,yn={animation:!1,byUser:!0,event:null};this.setRange(ot,ut,yn)}},{key:"destroy",value:function(){this.stopRolling()}}],[{key:"conversion",value:function(X,tt,rt,ot){return ot===void 0&&(ot=0),rt!=0&&tt-X!=0?{offset:X,scale:rt/(tt-X-ot)}:{offset:0,scale:1}}}]),q}(Component);function validateDirection(F){if(F!="horizontal"&&F!="vertical")throw new TypeError('Unknown direction "'.concat(F,'". Choose "horizontal" or "vertical".'))}var $$5=_export,$some=arrayIteration.some,arrayMethodIsStrict$1=arrayMethodIsStrict$6,STRICT_METHOD$1=arrayMethodIsStrict$1("some");$$5({target:"Array",proto:!0,forced:!STRICT_METHOD$1},{some:function F(W){return $some(this,W,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$3=entryVirtual$k,some$3=entryVirtual$3("Array").some,isPrototypeOf$5=objectIsPrototypeOf,method$3=some$3,ArrayPrototype$3=Array.prototype,some$2=function(F){var W=F.some;return F===ArrayPrototype$3||isPrototypeOf$5(ArrayPrototype$3,F)&&W===ArrayPrototype$3.some?method$3:W},parent$4=some$2,some$1=parent$4,some=some$1,_someInstanceProperty=getDefaultExportFromCjs(some),path$1=path$s,setInterval$1=path$1.setInterval,setInterval$3=setInterval$1,_setInterval=getDefaultExportFromCjs(setInterval$3),_firstTarget=null;function propagating(F,W){var q=W||{preventDefault:!1};if(F.Manager){var K=F,X=function(yn,uo){var po=Object.create(q);return uo&&K.assign(po,uo),propagating(new K(yn,po),po)};return K.assign(X,K),X.Manager=function(yn,uo){var po=Object.create(q);return uo&&K.assign(po,uo),propagating(new K.Manager(yn,po),po)},X}var tt=Object.create(F),rt=F.element;rt.hammer||(rt.hammer=[]),rt.hammer.push(tt),F.on("hammer.input",function(yn){(q.preventDefault===!0||q.preventDefault===yn.pointerType)&&yn.preventDefault(),yn.isFirst&&(_firstTarget=yn.target)}),tt._handlers={},tt.on=function(yn,uo){return ot(yn).forEach(function(po){var mo=tt._handlers[po];mo||(tt._handlers[po]=mo=[],F.on(po,ut)),mo.push(uo)}),tt},tt.off=function(yn,uo){return ot(yn).forEach(function(po){var mo=tt._handlers[po];mo&&(mo=uo?mo.filter(function(wo){return wo!==uo}):[],mo.length>0?tt._handlers[po]=mo:(F.off(po,ut),delete tt._handlers[po]))}),tt},tt.emit=function(yn,uo){_firstTarget=uo.target,F.emit(yn,uo)},tt.destroy=function(){var yn=F.element.hammer,uo=yn.indexOf(tt);uo!==-1&&yn.splice(uo,1),yn.length||delete F.element.hammer,tt._handlers={},F.destroy()};function ot(yn){return yn.match(/[^ ]+/g)}function ut(yn){if(yn.type!=="hammer.input"){if(yn.srcEvent._handled||(yn.srcEvent._handled={}),yn.srcEvent._handled[yn.type])return;yn.srcEvent._handled[yn.type]=!0}var uo=!1;yn.stopPropagation=function(){uo=!0};var po=yn.srcEvent.stopPropagation.bind(yn.srcEvent);typeof po=="function"&&(yn.srcEvent.stopPropagation=function(){po(),yn.stopPropagation()}),yn.firstTarget=_firstTarget;for(var mo=_firstTarget;mo&&!uo;){var wo=mo.hammer;if(wo){for(var lf,yf=0;yf0&&this.current.milliseconds()0&&this.current.seconds()0&&this.current.minutes()0&&this.current.hours()0?q.step:1,this.autoScale=!1)}},{key:"setAutoScale",value:function(q){this.autoScale=q}},{key:"setMinimumStep",value:function(q){if(q!=null){var K=1e3*60*60*24*30*12,X=1e3*60*60*24*30,tt=1e3*60*60*24,rt=1e3*60*60,ot=1e3*60,ut=1e3,yn=1;K*1e3>q&&(this.scale="year",this.step=1e3),K*500>q&&(this.scale="year",this.step=500),K*100>q&&(this.scale="year",this.step=100),K*50>q&&(this.scale="year",this.step=50),K*10>q&&(this.scale="year",this.step=10),K*5>q&&(this.scale="year",this.step=5),K>q&&(this.scale="year",this.step=1),X*3>q&&(this.scale="month",this.step=3),X>q&&(this.scale="month",this.step=1),tt*7>q&&this.options.showWeekScale&&(this.scale="week",this.step=1),tt*2>q&&(this.scale="day",this.step=2),tt>q&&(this.scale="day",this.step=1),tt/2>q&&(this.scale="weekday",this.step=1),rt*4>q&&(this.scale="hour",this.step=4),rt>q&&(this.scale="hour",this.step=1),ot*15>q&&(this.scale="minute",this.step=15),ot*10>q&&(this.scale="minute",this.step=10),ot*5>q&&(this.scale="minute",this.step=5),ot>q&&(this.scale="minute",this.step=1),ut*15>q&&(this.scale="second",this.step=15),ut*10>q&&(this.scale="second",this.step=10),ut*5>q&&(this.scale="second",this.step=5),ut>q&&(this.scale="second",this.step=1),yn*200>q&&(this.scale="millisecond",this.step=200),yn*100>q&&(this.scale="millisecond",this.step=100),yn*50>q&&(this.scale="millisecond",this.step=50),yn*10>q&&(this.scale="millisecond",this.step=10),yn*5>q&&(this.scale="millisecond",this.step=5),yn>q&&(this.scale="millisecond",this.step=1)}}},{key:"isMajor",value:function(){if(this.switchedYear==!0)switch(this.scale){case"year":case"month":case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(this.switchedMonth==!0)switch(this.scale){case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(this.switchedDay==!0)switch(this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var q=this.moment(this.current);switch(this.scale){case"millisecond":return q.milliseconds()==0;case"second":return q.seconds()==0;case"minute":return q.hours()==0&&q.minutes()==0;case"hour":return q.hours()==0;case"weekday":case"day":return this.options.showWeekScale?q.isoWeekday()==1:q.date()==1;case"week":return q.date()==1;case"month":return q.month()==0;case"year":return!1;default:return!1}}},{key:"getLabelMinor",value:function(q){if(q==null&&(q=this.current),q instanceof Date&&(q=this.moment(q)),typeof this.format.minorLabels=="function")return this.format.minorLabels(q,this.scale,this.step);var K=this.format.minorLabels[this.scale];switch(this.scale){case"week":if(q.date()===1&&q.weekday()!==0)return"";default:return K&&K.length>0?this.moment(q).format(K):""}}},{key:"getLabelMajor",value:function(q){if(q==null&&(q=this.current),q instanceof Date&&(q=this.moment(q)),typeof this.format.majorLabels=="function")return this.format.majorLabels(q,this.scale,this.step);var K=this.format.majorLabels[this.scale];return K&&K.length>0?this.moment(q).format(K):""}},{key:"getClassName",value:function(){var q,K=this.moment,X=this.moment(this.current),tt=X.locale?X.locale("en"):X.lang("en"),rt=this.step,ot=[];function ut(wo){return wo/rt%2==0?" vis-even":" vis-odd"}function yn(wo){return wo.isSame(_Date$now(),"day")?" vis-today":wo.isSame(K().add(1,"day"),"day")?" vis-tomorrow":wo.isSame(K().add(-1,"day"),"day")?" vis-yesterday":""}function uo(wo){return wo.isSame(_Date$now(),"week")?" vis-current-week":""}function po(wo){return wo.isSame(_Date$now(),"month")?" vis-current-month":""}function mo(wo){return wo.isSame(_Date$now(),"year")?" vis-current-year":""}switch(this.scale){case"millisecond":ot.push(yn(tt)),ot.push(ut(tt.milliseconds()));break;case"second":ot.push(yn(tt)),ot.push(ut(tt.seconds()));break;case"minute":ot.push(yn(tt)),ot.push(ut(tt.minutes()));break;case"hour":ot.push(_concatInstanceProperty(q="vis-h".concat(tt.hours())).call(q,this.step==4?"-h"+(tt.hours()+4):"")),ot.push(yn(tt)),ot.push(ut(tt.hours()));break;case"weekday":ot.push("vis-".concat(tt.format("dddd").toLowerCase())),ot.push(yn(tt)),ot.push(uo(tt)),ot.push(ut(tt.date()));break;case"day":ot.push("vis-day".concat(tt.date())),ot.push("vis-".concat(tt.format("MMMM").toLowerCase())),ot.push(yn(tt)),ot.push(po(tt)),ot.push(this.step<=2?yn(tt):""),ot.push(this.step<=2?"vis-".concat(tt.format("dddd").toLowerCase()):""),ot.push(ut(tt.date()-1));break;case"week":ot.push("vis-week".concat(tt.format("w"))),ot.push(uo(tt)),ot.push(ut(tt.week()));break;case"month":ot.push("vis-".concat(tt.format("MMMM").toLowerCase())),ot.push(po(tt)),ot.push(ut(tt.month()));break;case"year":ot.push("vis-year".concat(tt.year())),ot.push(mo(tt)),ot.push(ut(tt.year()));break}return _filterInstanceProperty(ot).call(ot,String).join(" ")}}],[{key:"snap",value:function(q,K,X){var tt=moment$3(q);if(K=="year"){var rt=tt.year()+Math.round(tt.month()/12);tt.year(Math.round(rt/X)*X),tt.month(0),tt.date(0),tt.hours(0),tt.minutes(0),tt.seconds(0),tt.milliseconds(0)}else if(K=="month")tt.date()>15?(tt.date(1),tt.add(1,"month")):tt.date(1),tt.hours(0),tt.minutes(0),tt.seconds(0),tt.milliseconds(0);else if(K=="week")tt.weekday()>2?(tt.weekday(0),tt.add(1,"week")):tt.weekday(0),tt.hours(0),tt.minutes(0),tt.seconds(0),tt.milliseconds(0);else if(K=="day"){switch(X){case 5:case 2:tt.hours(Math.round(tt.hours()/24)*24);break;default:tt.hours(Math.round(tt.hours()/12)*12);break}tt.minutes(0),tt.seconds(0),tt.milliseconds(0)}else if(K=="weekday"){switch(X){case 5:case 2:tt.hours(Math.round(tt.hours()/12)*12);break;default:tt.hours(Math.round(tt.hours()/6)*6);break}tt.minutes(0),tt.seconds(0),tt.milliseconds(0)}else if(K=="hour"){switch(X){case 4:tt.minutes(Math.round(tt.minutes()/60)*60);break;default:tt.minutes(Math.round(tt.minutes()/30)*30);break}tt.seconds(0),tt.milliseconds(0)}else if(K=="minute"){switch(X){case 15:case 10:tt.minutes(Math.round(tt.minutes()/5)*5),tt.seconds(0);break;case 5:tt.seconds(Math.round(tt.seconds()/60)*60);break;default:tt.seconds(Math.round(tt.seconds()/30)*30);break}tt.milliseconds(0)}else if(K=="second")switch(X){case 15:case 10:tt.seconds(Math.round(tt.seconds()/5)*5),tt.milliseconds(0);break;case 5:tt.milliseconds(Math.round(tt.milliseconds()/1e3)*1e3);break;default:tt.milliseconds(Math.round(tt.milliseconds()/500)*500);break}else if(K=="millisecond"){var ot=X>5?X/2:1;tt.milliseconds(Math.round(tt.milliseconds()/ot)*ot)}return tt}}]),F}();TimeStep.FORMAT={minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}};function _createSuper$b(F){var W=_isNativeReflectConstruct$b();return function(){var K=_getPrototypeOf(F),X;if(W){var tt=_getPrototypeOf(this).constructor;X=_Reflect$construct(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn(this,X)}}function _isNativeReflectConstruct$b(){if(typeof Reflect>"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var TimeAxis=function(F){_inherits(q,F);var W=_createSuper$b(q);function q(K,X){var tt;return _classCallCheck(this,q),tt=W.call(this),tt.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},tt.props={range:{start:0,end:0,minimumStep:0},lineTop:0},tt.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,maxMinorChars:7,format:availableUtils.extend({},TimeStep.FORMAT),moment:moment$3,timeAxis:null},tt.options=availableUtils.extend({},tt.defaultOptions),tt.body=K,tt._create(),tt.setOptions(X),tt}return _createClass(q,[{key:"setOptions",value:function(X){X&&(availableUtils.selectiveExtend(["showMinorLabels","showMajorLabels","showWeekScale","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,X),availableUtils.selectiveDeepExtend(["format"],this.options,X),"orientation"in X&&(typeof X.orientation=="string"?this.options.orientation.axis=X.orientation:_typeof(X.orientation)==="object"&&"axis"in X.orientation&&(this.options.orientation.axis=X.orientation.axis)),"locale"in X&&(typeof moment$3.locale=="function"?moment$3.locale(X.locale):moment$3.lang(X.locale)))}},{key:"_create",value:function(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"}},{key:"destroy",value:function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null}},{key:"redraw",value:function(){var X=this.props,tt=this.dom.foreground,rt=this.dom.background,ot=this.options.orientation.axis=="top"?this.body.dom.top:this.body.dom.bottom,ut=tt.parentNode!==ot;this._calculateCharSize();var yn=this.options.showMinorLabels&&this.options.orientation.axis!=="none",uo=this.options.showMajorLabels&&this.options.orientation.axis!=="none";X.minorLabelHeight=yn?X.minorCharHeight:0,X.majorLabelHeight=uo?X.majorCharHeight:0,X.height=X.minorLabelHeight+X.majorLabelHeight,X.width=tt.offsetWidth,X.minorLineHeight=this.body.domProps.root.height-X.majorLabelHeight-(this.options.orientation.axis=="top"?this.body.domProps.bottom.height:this.body.domProps.top.height),X.minorLineWidth=1,X.majorLineHeight=X.minorLineHeight+X.majorLabelHeight,X.majorLineWidth=1;var po=tt.nextSibling,mo=rt.nextSibling;return tt.parentNode&&tt.parentNode.removeChild(tt),rt.parentNode&&rt.parentNode.removeChild(rt),tt.style.height="".concat(this.props.height,"px"),this._repaintLabels(),po?ot.insertBefore(tt,po):ot.appendChild(tt),mo?this.body.dom.backgroundVertical.insertBefore(rt,mo):this.body.dom.backgroundVertical.appendChild(rt),this._isResized()||ut}},{key:"_repaintLabels",value:function(){var X=this.options.orientation.axis,tt=availableUtils.convert(this.body.range.start,"Number"),rt=availableUtils.convert(this.body.range.end,"Number"),ot=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),ut=ot-getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this.body.range,ot);ut-=this.body.util.toTime(0).valueOf();var yn=new TimeStep(new Date(tt),new Date(rt),ut,this.body.hiddenDates,this.options);yn.setMoment(this.options.moment),this.options.format&&yn.setFormat(this.options.format),this.options.timeAxis&&yn.setScale(this.options.timeAxis),this.step=yn;var uo=this.dom;uo.redundant.lines=uo.lines,uo.redundant.majorTexts=uo.majorTexts,uo.redundant.minorTexts=uo.minorTexts,uo.lines=[],uo.majorTexts=[],uo.minorTexts=[];var po,mo,wo,lf,yf,cf,vf=0,_f,$f,xf=void 0,Af=0,Cf=1e3,Pf;for(yn.start(),mo=yn.getCurrent(),lf=this.body.util.toScreen(mo);yn.hasNext()&&Af=_f*.4;break}if(this.options.showMinorLabels&&cf){var Bf=this._repaintMinorText(wo,yn.getLabelMinor(po),X,Pf);Bf.style.width="".concat(vf,"px")}yf&&this.options.showMajorLabels?(wo>0&&(xf==null&&(xf=wo),Bf=this._repaintMajorText(wo,yn.getLabelMajor(po),X,Pf)),$f=this._repaintMajorLine(wo,vf,X,Pf)):cf?$f=this._repaintMinorLine(wo,vf,X,Pf):$f&&($f.style.width="".concat(_parseInt$1($f.style.width)+vf,"px"))}if(Af===Cf&&!warnedForOverflow&&(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to ".concat(Cf," lines.")),warnedForOverflow=!0),this.options.showMajorLabels){var Hf=this.body.util.toTime(0),Df=yn.getLabelMajor(Hf),Lf=Df.length*(this.props.majorCharWidth||10)+10;(xf==null||Lf"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var CustomTime=function(F){_inherits(q,F);var W=_createSuper$a(q);function q(K,X){var tt,rt;_classCallCheck(this,q),rt=W.call(this),rt.body=K,rt.defaultOptions={moment:moment$3,locales,locale:"en",id:void 0,title:void 0},rt.options=availableUtils.extend({},rt.defaultOptions),rt.setOptions(X),rt.options.locales=availableUtils.extend({},locales,rt.options.locales);var ot=rt.defaultOptions.locales[rt.defaultOptions.locale];return _forEachInstanceProperty(tt=_Object$keys(rt.options.locales)).call(tt,function(ut){rt.options.locales[ut]=availableUtils.extend({},ot,rt.options.locales[ut])}),X&&X.time!=null?rt.customTime=X.time:rt.customTime=new Date,rt.eventParams={},rt._create(),rt}return _createClass(q,[{key:"setOptions",value:function(X){X&&availableUtils.selectiveExtend(["moment","locale","locales","id","title","rtl","snap"],this.options,X)}},{key:"_create",value:function(){var X,tt,rt,ot=document.createElement("div");ot["custom-time"]=this,ot.className="vis-custom-time ".concat(this.options.id||""),ot.style.position="absolute",ot.style.top="0px",ot.style.height="100%",this.bar=ot;var ut=document.createElement("div");ut.style.position="relative",ut.style.top="0px",this.options.rtl?ut.style.right="-10px":ut.style.left="-10px",ut.style.height="100%",ut.style.width="20px";function yn(uo){this.body.range._onMouseWheel(uo)}ut.addEventListener?(ut.addEventListener("mousewheel",_bindInstanceProperty(yn).call(yn,this),!1),ut.addEventListener("DOMMouseScroll",_bindInstanceProperty(yn).call(yn,this),!1)):ut.attachEvent("onmousewheel",_bindInstanceProperty(yn).call(yn,this)),ot.appendChild(ut),this.hammer=new Hammer(ut),this.hammer.on("panstart",_bindInstanceProperty(X=this._onDragStart).call(X,this)),this.hammer.on("panmove",_bindInstanceProperty(tt=this._onDrag).call(tt,this)),this.hammer.on("panend",_bindInstanceProperty(rt=this._onDragEnd).call(rt,this)),this.hammer.get("pan").set({threshold:5,direction:Hammer.DIRECTION_ALL}),this.hammer.get("press").set({time:1e4})}},{key:"destroy",value:function(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null}},{key:"redraw",value:function(){var X=this.body.dom.backgroundVertical;this.bar.parentNode!=X&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),X.appendChild(this.bar));var tt=this.body.util.toScreen(this.customTime),rt=this.options.locales[this.options.locale];rt||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),rt=this.options.locales.en);var ot=this.options.title;if(ot===void 0){var ut;ot=_concatInstanceProperty(ut="".concat(rt.time,": ")).call(ut,this.options.moment(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss")),ot=ot.charAt(0).toUpperCase()+ot.substring(1)}else typeof ot=="function"&&(ot=ot.call(this,this.customTime));return this.options.rtl?this.bar.style.right="".concat(tt,"px"):this.bar.style.left="".concat(tt,"px"),this.bar.title=ot,!1}},{key:"hide",value:function(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}},{key:"setCustomTime",value:function(X){this.customTime=availableUtils.convert(X,"Date"),this.redraw()}},{key:"getCustomTime",value:function(){return new Date(this.customTime.valueOf())}},{key:"setCustomMarker",value:function(X,tt){if(this.marker&&this.bar.removeChild(this.marker),this.marker=document.createElement("div"),this.marker.className="vis-custom-time-marker",this.marker.innerHTML=availableUtils.xss(X),this.marker.style.position="absolute",tt){var rt,ot;this.marker.setAttribute("contenteditable","true"),this.marker.addEventListener("pointerdown",function(){this.marker.focus()}),this.marker.addEventListener("input",_bindInstanceProperty(rt=this._onMarkerChange).call(rt,this)),this.marker.title=X,this.marker.addEventListener("blur",_bindInstanceProperty(ot=function(yn){this.title!=yn.target.innerHTML&&(this._onMarkerChanged(yn),this.title=yn.target.innerHTML)}).call(ot,this))}this.bar.appendChild(this.marker)}},{key:"setCustomTitle",value:function(X){this.options.title=X}},{key:"_onDragStart",value:function(X){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,X.stopPropagation()}},{key:"_onDrag",value:function(X){if(this.eventParams.dragging){var tt=this.options.rtl?-1*X.deltaX:X.deltaX,rt=this.body.util.toScreen(this.eventParams.customTime)+tt,ot=this.body.util.toTime(rt),ut=this.body.util.getScale(),yn=this.body.util.getStep(),uo=this.options.snap,po=uo?uo(ot,ut,yn):ot;this.setCustomTime(po),this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:X}),X.stopPropagation()}}},{key:"_onDragEnd",value:function(X){this.eventParams.dragging&&(this.body.emitter.emit("timechanged",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:X}),X.stopPropagation())}},{key:"_onMarkerChange",value:function(X){this.body.emitter.emit("markerchange",{id:this.options.id,title:X.target.innerHTML,event:X}),X.stopPropagation()}},{key:"_onMarkerChanged",value:function(X){this.body.emitter.emit("markerchanged",{id:this.options.id,title:X.target.innerHTML,event:X}),X.stopPropagation()}}],[{key:"customTimeFromTarget",value:function(X){for(var tt=X.target;tt;){if(tt.hasOwnProperty("custom-time"))return tt["custom-time"];tt=tt.parentNode}return null}}]),q}(Component),Core=function(){function F(){_classCallCheck(this,F)}return _createClass(F,[{key:"_create",value:function(q){var K=this,X,tt,rt;this.dom={},this.dom.container=q,this.dom.container.style.position="relative",this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.rollingModeBtn=document.createElement("div"),this.dom.loadingScreen=document.createElement("div"),this.dom.root.className="vis-timeline",this.dom.background.className="vis-panel vis-background",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical",this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal",this.dom.centerContainer.className="vis-panel vis-center",this.dom.leftContainer.className="vis-panel vis-left",this.dom.rightContainer.className="vis-panel vis-right",this.dom.top.className="vis-panel vis-top",this.dom.bottom.className="vis-panel vis-bottom",this.dom.left.className="vis-content",this.dom.center.className="vis-content",this.dom.right.className="vis-content",this.dom.shadowTop.className="vis-shadow vis-top",this.dom.shadowBottom.className="vis-shadow vis-bottom",this.dom.shadowTopLeft.className="vis-shadow vis-top",this.dom.shadowBottomLeft.className="vis-shadow vis-bottom",this.dom.shadowTopRight.className="vis-shadow vis-top",this.dom.shadowBottomRight.className="vis-shadow vis-bottom",this.dom.rollingModeBtn.className="vis-rolling-mode-btn",this.dom.loadingScreen.className="vis-loading-screen",this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.rollingModeBtn),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.on("rangechange",function(){K.initialDrawDone===!0&&K._redraw()}),this.on("rangechanged",function(){K.initialRangeChangeDone||(K.initialRangeChangeDone=!0)}),this.on("touch",_bindInstanceProperty(X=this._onTouch).call(X,this)),this.on("panmove",_bindInstanceProperty(tt=this._onDrag).call(tt,this));var ot=this;this._origRedraw=_bindInstanceProperty(rt=this._redraw).call(rt,this),this._redraw=availableUtils.throttle(this._origRedraw),this.on("_change",function(cf){ot.itemSet&&ot.itemSet.initialItemSetDrawn&&cf&&cf.queue==!0?ot._redraw():ot._origRedraw()}),this.hammer=new Hammer(this.dom.root);var ut=this.hammer.get("pinch").set({enable:!0});ut&&disablePreventDefaultVertically(ut),this.hammer.get("pan").set({threshold:5,direction:Hammer.DIRECTION_ALL}),this.timelineListeners={};var yn=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];_forEachInstanceProperty(yn).call(yn,function(cf){var vf=function($f){ot.isActive()&&ot.emit(cf,$f)};ot.hammer.on(cf,vf),ot.timelineListeners[cf]=vf}),onTouch(this.hammer,function(cf){ot.emit("touch",cf)}),onRelease(this.hammer,function(cf){ot.emit("release",cf)});function uo(cf){var vf=40,_f=800;this.isActive()&&this.emit("mousewheel",cf);var $f=0,xf=0;if("detail"in cf&&(xf=cf.detail*-1),"wheelDelta"in cf&&(xf=cf.wheelDelta),"wheelDeltaY"in cf&&(xf=cf.wheelDeltaY),"wheelDeltaX"in cf&&($f=cf.wheelDeltaX*-1),"axis"in cf&&cf.axis===cf.HORIZONTAL_AXIS&&($f=xf*-1,xf=0),"deltaY"in cf&&(xf=cf.deltaY*-1),"deltaX"in cf&&($f=cf.deltaX),cf.deltaMode&&(cf.deltaMode===1?($f*=vf,xf*=vf):($f*=vf,xf*=_f)),this.options.preferZoom){if(!this.options.zoomKey||cf[this.options.zoomKey])return}else if(this.options.zoomKey&&cf[this.options.zoomKey])return;if(!(!this.options.verticalScroll&&!this.options.horizontalScroll)){if(this.options.verticalScroll&&Math.abs(xf)>=Math.abs($f)){var Af=this.props.scrollTop,Cf=Af+xf;if(this.isActive()){var Pf=this._setScrollTop(Cf);Pf!==Af&&(this._redraw(),this.emit("scroll",cf),cf.preventDefault())}}else if(this.options.horizontalScroll){var Bf=Math.abs($f)>=Math.abs(xf)?$f:xf,Hf=Bf/120*(this.range.end-this.range.start)/20,Df=this.range.start+Hf,Lf=this.range.end+Hf,kf={animation:!1,byUser:!0,event:cf};this.range.setRange(Df,Lf,kf),cf.preventDefault()}}}var po="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":this.dom.centerContainer.addEventListener?"DOMMouseScroll":"onmousewheel";this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(po,_bindInstanceProperty(uo).call(uo,this),!1),this.dom.top.addEventListener(po,_bindInstanceProperty(uo).call(uo,this),!1),this.dom.bottom.addEventListener(po,_bindInstanceProperty(uo).call(uo,this),!1);function mo(cf){if(ot.options.verticalScroll&&(cf.preventDefault(),ot.isActive())){var vf=-cf.target.scrollTop;ot._setScrollTop(vf),ot._redraw(),ot.emit("scrollSide",cf)}}this.dom.left.parentNode.addEventListener("scroll",_bindInstanceProperty(mo).call(mo,this)),this.dom.right.parentNode.addEventListener("scroll",_bindInstanceProperty(mo).call(mo,this));var wo=!1;function lf(cf){var vf;if(cf.preventDefault&&(ot.emit("dragover",ot.getEventProperties(cf)),cf.preventDefault()),_indexOfInstanceProperty(vf=cf.target.className).call(vf,"timeline")>-1&&!wo)return cf.dataTransfer.dropEffect="move",wo=!0,!1}function yf(cf){cf.preventDefault&&cf.preventDefault(),cf.stopPropagation&&cf.stopPropagation();try{var vf=JSON.parse(cf.dataTransfer.getData("text"));if(!vf||!vf.content)return}catch{return!1}return wo=!1,cf.center={x:cf.clientX,y:cf.clientY},vf.target!=="item"?ot.itemSet._onAddItem(cf):ot.itemSet._onDropObjectOnItem(cf),ot.emit("drop",ot.getEventProperties(cf)),!1}if(this.dom.center.addEventListener("dragover",_bindInstanceProperty(lf).call(lf,this),!1),this.dom.center.addEventListener("drop",_bindInstanceProperty(yf).call(yf,this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!q)throw new Error("No container provided");q.appendChild(this.dom.root),q.appendChild(this.dom.loadingScreen)}},{key:"setOptions",value:function(q){var K;if(q){var X=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","preferZoom","rtl","zoomKey","horizontalScroll","verticalScroll","longSelectPressTime","snap"];if(availableUtils.selectiveExtend(X,this.options,q),this.dom.rollingModeBtn.style.visibility="hidden",this.options.rtl&&(this.dom.container.style.direction="rtl",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical-rtl"),this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className="vis-panel vis-right vis-vertical-scroll":this.dom.leftContainer.className="vis-panel vis-left vis-vertical-scroll"),_typeof(this.options.orientation)!=="object"&&(this.options.orientation={item:void 0,axis:void 0}),"orientation"in q&&(typeof q.orientation=="string"?this.options.orientation={item:q.orientation,axis:q.orientation}:_typeof(q.orientation)==="object"&&("item"in q.orientation&&(this.options.orientation.item=q.orientation.item),"axis"in q.orientation&&(this.options.orientation.axis=q.orientation.axis))),this.options.orientation.axis==="both"){if(!this.timeAxis2){var tt=this.timeAxis2=new TimeAxis(this.body,this.options);tt.setOptions=function(po){var mo=po?availableUtils.extend({},po):{};mo.orientation="top",TimeAxis.prototype.setOptions.call(tt,mo)},this.components.push(tt)}}else if(this.timeAxis2){var rt,ot=_indexOfInstanceProperty(rt=this.components).call(rt,this.timeAxis2);if(ot!==-1){var ut;_spliceInstanceProperty(ut=this.components).call(ut,ot,1)}this.timeAxis2.destroy(),this.timeAxis2=null}typeof q.drawPoints=="function"&&(q.drawPoints={onRender:q.drawPoints}),"hiddenDates"in this.options&&convertHiddenOptions(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in q&&(q.clickToUse?this.activator||(this.activator=new Activator(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(_forEachInstanceProperty(K=this.components).call(K,function(po){return po.setOptions(q)}),"configure"in q){var yn;this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(q.configure);var uo=availableUtils.deepExtend({},this.options);_forEachInstanceProperty(yn=this.components).call(yn,function(po){availableUtils.deepExtend(uo,po.options)}),this.configurator.setModuleOptions({global:uo})}this._redraw()}},{key:"isActive",value:function(){return!this.activator||this.activator.active}},{key:"destroy",value:function(){var q;this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(var K in this.timelineListeners)this.timelineListeners.hasOwnProperty(K)&&delete this.timelineListeners[K];this.timelineListeners=null,this.hammer&&this.hammer.destroy(),this.hammer=null,_forEachInstanceProperty(q=this.components).call(q,function(X){return X.destroy()}),this.body=null}},{key:"setCustomTime",value:function(q,K){var X,tt=_filterInstanceProperty(X=this.customTimes).call(X,function(rt){return K===rt.options.id});if(tt.length===0)throw new Error("No custom time bar found with id ".concat(_JSON$stringify(K)));tt.length>0&&tt[0].setCustomTime(q)}},{key:"getCustomTime",value:function(q){var K,X=_filterInstanceProperty(K=this.customTimes).call(K,function(tt){return tt.options.id===q});if(X.length===0)throw new Error("No custom time bar found with id ".concat(_JSON$stringify(q)));return X[0].getCustomTime()}},{key:"setCustomTimeMarker",value:function(q,K,X){var tt,rt=_filterInstanceProperty(tt=this.customTimes).call(tt,function(ot){return ot.options.id===K});if(rt.length===0)throw new Error("No custom time bar found with id ".concat(_JSON$stringify(K)));rt.length>0&&rt[0].setCustomMarker(q,X)}},{key:"setCustomTimeTitle",value:function(q,K){var X,tt=_filterInstanceProperty(X=this.customTimes).call(X,function(rt){return rt.options.id===K});if(tt.length===0)throw new Error("No custom time bar found with id ".concat(_JSON$stringify(K)));if(tt.length>0)return tt[0].setCustomTitle(q)}},{key:"getEventProperties",value:function(q){return{event:q}}},{key:"addCustomTime",value:function(q,K){var X,tt=q!==void 0?availableUtils.convert(q,"Date"):new Date,rt=_someInstanceProperty(X=this.customTimes).call(X,function(ut){return ut.options.id===K});if(rt)throw new Error("A custom time with id ".concat(_JSON$stringify(K)," already exists"));var ot=new CustomTime(this.body,availableUtils.extend({},this.options,{time:tt,id:K,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(ot),this.components.push(ot),this._redraw(),K}},{key:"removeCustomTime",value:function(q){var K,X=this,tt=_filterInstanceProperty(K=this.customTimes).call(K,function(rt){return rt.options.id===q});if(tt.length===0)throw new Error("No custom time bar found with id ".concat(_JSON$stringify(q)));_forEachInstanceProperty(tt).call(tt,function(rt){var ot,ut,yn,uo;_spliceInstanceProperty(ot=X.customTimes).call(ot,_indexOfInstanceProperty(ut=X.customTimes).call(ut,rt),1),_spliceInstanceProperty(yn=X.components).call(yn,_indexOfInstanceProperty(uo=X.components).call(uo,rt),1),rt.destroy()})}},{key:"getVisibleItems",value:function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}},{key:"getItemsAtCurrentTime",value:function(q){return this.time=q,this.itemSet&&this.itemSet.getItemsAtCurrentTime(this.time)||[]}},{key:"getVisibleGroups",value:function(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}},{key:"fit",value:function(q,K){var X=this.getDataRange();if(!(X.min===null&&X.max===null)){var tt=X.max-X.min,rt=new Date(X.min.valueOf()-tt*.01),ot=new Date(X.max.valueOf()+tt*.01),ut=q&&q.animation!==void 0?q.animation:!0;this.range.setRange(rt,ot,{animation:ut},K)}}},{key:"getDataRange",value:function(){throw new Error("Cannot invoke abstract method getDataRange")}},{key:"setWindow",value:function(q,K,X,tt){typeof arguments[2]=="function"&&(tt=arguments[2],X={});var rt,ot;arguments.length==1?(ot=arguments[0],rt=ot.animation!==void 0?ot.animation:!0,this.range.setRange(ot.start,ot.end,{animation:rt})):arguments.length==2&&typeof arguments[1]=="function"?(ot=arguments[0],tt=arguments[1],rt=ot.animation!==void 0?ot.animation:!0,this.range.setRange(ot.start,ot.end,{animation:rt},tt)):(rt=X&&X.animation!==void 0?X.animation:!0,this.range.setRange(q,K,{animation:rt},tt))}},{key:"moveTo",value:function(q,K,X){typeof arguments[1]=="function"&&(X=arguments[1],K={});var tt=this.range.end-this.range.start,rt=availableUtils.convert(q,"Date").valueOf(),ot=rt-tt/2,ut=rt+tt/2,yn=K&&K.animation!==void 0?K.animation:!0;this.range.setRange(ot,ut,{animation:yn},X)}},{key:"getWindow",value:function(){var q=this.range.getRange();return{start:new Date(q.start),end:new Date(q.end)}}},{key:"zoomIn",value:function(q,K,X){if(!(!q||q<0||q>1)){typeof arguments[1]=="function"&&(X=arguments[1],K={});var tt=this.getWindow(),rt=tt.start.valueOf(),ot=tt.end.valueOf(),ut=ot-rt,yn=ut/(1+q),uo=(ut-yn)/2,po=rt+uo,mo=ot-uo;this.setWindow(po,mo,K,X)}}},{key:"zoomOut",value:function(q,K,X){if(!(!q||q<0||q>1)){typeof arguments[1]=="function"&&(X=arguments[1],K={});var tt=this.getWindow(),rt=tt.start.valueOf(),ot=tt.end.valueOf(),ut=ot-rt,yn=rt-ut*q/2,uo=ot+ut*q/2;this.setWindow(yn,uo,K,X)}}},{key:"redraw",value:function(){this._redraw()}},{key:"_redraw",value:function(){var q;this.redrawCount++;var K=this.dom;if(!(!K||!K.container||K.root.offsetWidth==0)){var X=!1,tt=this.options,rt=this.props;updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),tt.orientation=="top"?(availableUtils.addClassName(K.root,"vis-top"),availableUtils.removeClassName(K.root,"vis-bottom")):(availableUtils.removeClassName(K.root,"vis-top"),availableUtils.addClassName(K.root,"vis-bottom")),tt.rtl?(availableUtils.addClassName(K.root,"vis-rtl"),availableUtils.removeClassName(K.root,"vis-ltr")):(availableUtils.addClassName(K.root,"vis-ltr"),availableUtils.removeClassName(K.root,"vis-rtl")),K.root.style.maxHeight=availableUtils.option.asSize(tt.maxHeight,""),K.root.style.minHeight=availableUtils.option.asSize(tt.minHeight,""),K.root.style.width=availableUtils.option.asSize(tt.width,"");var ot=K.root.offsetWidth;rt.border.left=1,rt.border.right=1,rt.border.top=1,rt.border.bottom=1,rt.center.height=K.center.offsetHeight,rt.left.height=K.left.offsetHeight,rt.right.height=K.right.offsetHeight,rt.top.height=K.top.clientHeight||-rt.border.top,rt.bottom.height=Math.round(K.bottom.getBoundingClientRect().height)||K.bottom.clientHeight||-rt.border.bottom;var ut=Math.max(rt.left.height,rt.center.height,rt.right.height),yn=rt.top.height+ut+rt.bottom.height+rt.border.top+rt.border.bottom;K.root.style.height=availableUtils.option.asSize(tt.height,"".concat(yn,"px")),rt.root.height=K.root.offsetHeight,rt.background.height=rt.root.height;var uo=rt.root.height-rt.top.height-rt.bottom.height;rt.centerContainer.height=uo,rt.leftContainer.height=uo,rt.rightContainer.height=rt.leftContainer.height,rt.root.width=ot,rt.background.width=rt.root.width,this.initialDrawDone||(rt.scrollbarWidth=availableUtils.getScrollBarWidth());var po=K.leftContainer.clientWidth,mo=K.rightContainer.clientWidth;tt.verticalScroll?tt.rtl?(rt.left.width=po||-rt.border.left,rt.right.width=mo+rt.scrollbarWidth||-rt.border.right):(rt.left.width=po+rt.scrollbarWidth||-rt.border.left,rt.right.width=mo||-rt.border.right):(rt.left.width=po||-rt.border.left,rt.right.width=mo||-rt.border.right),this._setDOM();var wo=this._updateScrollTop();tt.orientation.item!="top"&&(wo+=Math.max(rt.centerContainer.height-rt.center.height-rt.border.top-rt.border.bottom,0)),K.center.style.transform="translateY(".concat(wo,"px)");var lf=rt.scrollTop==0?"hidden":"",yf=rt.scrollTop==rt.scrollTopMin?"hidden":"";K.shadowTop.style.visibility=lf,K.shadowBottom.style.visibility=yf,K.shadowTopLeft.style.visibility=lf,K.shadowBottomLeft.style.visibility=yf,K.shadowTopRight.style.visibility=lf,K.shadowBottomRight.style.visibility=yf,tt.verticalScroll&&(K.rightContainer.className="vis-panel vis-right vis-vertical-scroll",K.leftContainer.className="vis-panel vis-left vis-vertical-scroll",K.shadowTopRight.style.visibility="hidden",K.shadowBottomRight.style.visibility="hidden",K.shadowTopLeft.style.visibility="hidden",K.shadowBottomLeft.style.visibility="hidden",K.left.style.top="0px",K.right.style.top="0px"),(!tt.verticalScroll||rt.center.heightrt.centerContainer.height;this.hammer.get("pan").set({direction:cf?Hammer.DIRECTION_ALL:Hammer.DIRECTION_HORIZONTAL}),this.hammer.get("press").set({time:this.options.longSelectPressTime}),_forEachInstanceProperty(q=this.components).call(q,function(_f){X=_f.redraw()||X});var vf=5;if(X)if(this.redrawCount0&&(this.props.scrollTop=0),this.props.scrollTop"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var CurrentTime=function(F){_inherits(q,F);var W=_createSuper$9(q);function q(K,X){var tt,rt;_classCallCheck(this,q),rt=W.call(this),rt.body=K,rt.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:moment$3,locales,locale:"en"},rt.options=availableUtils.extend({},rt.defaultOptions),rt.setOptions(X),rt.options.locales=availableUtils.extend({},locales,rt.options.locales);var ot=rt.defaultOptions.locales[rt.defaultOptions.locale];return _forEachInstanceProperty(tt=_Object$keys(rt.options.locales)).call(tt,function(ut){rt.options.locales[ut]=availableUtils.extend({},ot,rt.options.locales[ut])}),rt.offset=0,rt._create(),rt}return _createClass(q,[{key:"_create",value:function(){var X=document.createElement("div");X.className="vis-current-time",X.style.position="absolute",X.style.top="0px",X.style.height="100%",this.bar=X}},{key:"destroy",value:function(){this.options.showCurrentTime=!1,this.redraw(),this.body=null}},{key:"setOptions",value:function(X){X&&availableUtils.selectiveExtend(["rtl","showCurrentTime","alignCurrentTime","moment","locale","locales"],this.options,X)}},{key:"redraw",value:function(){if(this.options.showCurrentTime){var X,tt,rt=this.body.dom.backgroundVertical;this.bar.parentNode!=rt&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),rt.appendChild(this.bar),this.start());var ot=this.options.moment(_Date$now()+this.offset);this.options.alignCurrentTime&&(ot=ot.startOf(this.options.alignCurrentTime));var ut=this.body.util.toScreen(ot),yn=this.options.locales[this.options.locale];yn||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),yn=this.options.locales.en);var uo=_concatInstanceProperty(X=_concatInstanceProperty(tt="".concat(yn.current," ")).call(tt,yn.time,": ")).call(X,ot.format("dddd, MMMM Do YYYY, H:mm:ss"));uo=uo.charAt(0).toUpperCase()+uo.substring(1),this.options.rtl?this.bar.style.transform="translateX(".concat(ut*-1,"px)"):this.bar.style.transform="translateX(".concat(ut,"px)"),this.bar.title=uo}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1}},{key:"start",value:function(){var X=this;function tt(){X.stop();var rt=X.body.range.conversion(X.body.domProps.center.width).scale,ot=1/rt/10;ot<30&&(ot=30),ot>1e3&&(ot=1e3),X.redraw(),X.body.emitter.emit("currentTimeTick"),X.currentTimeTimer=_setTimeout(tt,ot)}tt()}},{key:"stop",value:function(){this.currentTimeTimer!==void 0&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}},{key:"setCurrentTime",value:function(X){var tt=availableUtils.convert(X,"Date").valueOf(),rt=_Date$now();this.offset=tt-rt,this.redraw()}},{key:"getCurrentTime",value:function(){return new Date(_Date$now()+this.offset)}}]),q}(Component),$$4=_export,$find=arrayIteration.find,FIND="find",SKIPS_HOLES$1=!0;FIND in[]&&Array(1)[FIND](function(){SKIPS_HOLES$1=!1});$$4({target:"Array",proto:!0,forced:SKIPS_HOLES$1},{find:function F(W){return $find(this,W,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$2=entryVirtual$k,find$3=entryVirtual$2("Array").find,isPrototypeOf$4=objectIsPrototypeOf,method$2=find$3,ArrayPrototype$2=Array.prototype,find$2=function(F){var W=F.find;return F===ArrayPrototype$2||isPrototypeOf$4(ArrayPrototype$2,F)&&W===ArrayPrototype$2.find?method$2:W},parent$3=find$2,find$1=parent$3,find=find$1,_findInstanceProperty=getDefaultExportFromCjs(find),internalMetadata={exports:{}},fails$3=fails$v,arrayBufferNonExtensible=fails$3(function(){if(typeof ArrayBuffer=="function"){var F=new ArrayBuffer(8);Object.isExtensible(F)&&Object.defineProperty(F,"a",{value:8})}}),fails$2=fails$v,isObject$2=isObject$g,classof=classofRaw$2,ARRAY_BUFFER_NON_EXTENSIBLE=arrayBufferNonExtensible,$isExtensible=Object.isExtensible,FAILS_ON_PRIMITIVES=fails$2(function(){$isExtensible(1)}),objectIsExtensible=FAILS_ON_PRIMITIVES||ARRAY_BUFFER_NON_EXTENSIBLE?function F(W){return!isObject$2(W)||ARRAY_BUFFER_NON_EXTENSIBLE&&classof(W)==="ArrayBuffer"?!1:$isExtensible?$isExtensible(W):!0}:$isExtensible,fails$1=fails$v,freezing=!fails$1(function(){return Object.isExtensible(Object.preventExtensions({}))}),$$3=_export,uncurryThis=functionUncurryThis,hiddenKeys=hiddenKeys$6,isObject$1=isObject$g,hasOwn=hasOwnProperty_1,defineProperty$1=objectDefineProperty.f,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertyNamesExternalModule=objectGetOwnPropertyNamesExternal,isExtensible=objectIsExtensible,uid=uid$4,FREEZING=freezing,REQUIRED=!1,METADATA=uid("meta"),id=0,setMetadata=function(F){defineProperty$1(F,METADATA,{value:{objectID:"O"+id++,weakData:{}}})},fastKey$1=function(F,W){if(!isObject$1(F))return typeof F=="symbol"?F:(typeof F=="string"?"S":"P")+F;if(!hasOwn(F,METADATA)){if(!isExtensible(F))return"F";if(!W)return"E";setMetadata(F)}return F[METADATA].objectID},getWeakData=function(F,W){if(!hasOwn(F,METADATA)){if(!isExtensible(F))return!0;if(!W)return!1;setMetadata(F)}return F[METADATA].weakData},onFreeze=function(F){return FREEZING&&REQUIRED&&isExtensible(F)&&!hasOwn(F,METADATA)&&setMetadata(F),F},enable=function(){meta.enable=function(){},REQUIRED=!0;var F=getOwnPropertyNamesModule.f,W=uncurryThis([].splice),q={};q[METADATA]=1,F(q).length&&(getOwnPropertyNamesModule.f=function(K){for(var X=F(K),tt=0,rt=X.length;ttpo;po++)if(wo=vf(F[po]),wo&&isPrototypeOf$3(ResultPrototype,wo))return wo;return new Result(!1)}yn=getIterator(F,uo)}for(lf=tt?F.next:yn.next;!(yf=call(lf,yn)).done;){try{wo=vf(yf.value)}catch(_f){iteratorClose(yn,"throw",_f)}if(typeof wo=="object"&&wo&&isPrototypeOf$3(ResultPrototype,wo))return wo}return new Result(!1)},isPrototypeOf$2=objectIsPrototypeOf,$TypeError=TypeError,anInstance$2=function(F,W){if(isPrototypeOf$2(W,F))return F;throw new $TypeError("Incorrect invocation")},$$2=_export,global$1=global$l,InternalMetadataModule=internalMetadataExports,fails=fails$v,createNonEnumerableProperty=createNonEnumerableProperty$6,iterate$1=iterate$2,anInstance$1=anInstance$2,isCallable=isCallable$i,isObject=isObject$g,isNullOrUndefined$1=isNullOrUndefined$5,setToStringTag=setToStringTag$6,defineProperty=objectDefineProperty.f,forEach=arrayIteration.forEach,DESCRIPTORS$2=descriptors,InternalStateModule$1=internalState,setInternalState$1=InternalStateModule$1.set,internalStateGetterFor$1=InternalStateModule$1.getterFor,collection$1=function(F,W,q){var K=F.indexOf("Map")!==-1,X=F.indexOf("Weak")!==-1,tt=K?"set":"add",rt=global$1[F],ot=rt&&rt.prototype,ut={},yn;if(!DESCRIPTORS$2||!isCallable(rt)||!(X||ot.forEach&&!fails(function(){new rt().entries().next()})))yn=q.getConstructor(W,F,K,tt),InternalMetadataModule.enable();else{yn=W(function(mo,wo){setInternalState$1(anInstance$1(mo,uo),{type:F,collection:new rt}),isNullOrUndefined$1(wo)||iterate$1(wo,mo[tt],{that:mo,AS_ENTRIES:K})});var uo=yn.prototype,po=internalStateGetterFor$1(F);forEach(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(mo){var wo=mo==="add"||mo==="set";mo in ot&&!(X&&mo==="clear")&&createNonEnumerableProperty(uo,mo,function(lf,yf){var cf=po(this).collection;if(!wo&&X&&!isObject(lf))return mo==="get"?void 0:!1;var vf=cf[mo](lf===0?0:lf,yf);return wo?this:vf})}),X||defineProperty(uo,"size",{configurable:!0,get:function(){return po(this).collection.size}})}return setToStringTag(yn,F,!1,!0),ut[F]=yn,$$2({global:!0,forced:!0},ut),X||q.setStrong(yn,F,K),yn},defineBuiltIn=defineBuiltIn$5,defineBuiltIns$1=function(F,W,q){for(var K in W)q&&q.unsafe&&F[K]?F[K]=W[K]:defineBuiltIn(F,K,W[K],q);return F},getBuiltIn=getBuiltIn$c,defineBuiltInAccessor$1=defineBuiltInAccessor$3,wellKnownSymbol=wellKnownSymbol$m,DESCRIPTORS$1=descriptors,SPECIES=wellKnownSymbol("species"),setSpecies$1=function(F){var W=getBuiltIn(F);DESCRIPTORS$1&&W&&!W[SPECIES]&&defineBuiltInAccessor$1(W,SPECIES,{configurable:!0,get:function(){return this}})},create=objectCreate,defineBuiltInAccessor=defineBuiltInAccessor$3,defineBuiltIns=defineBuiltIns$1,bind=functionBindContext,anInstance=anInstance$2,isNullOrUndefined=isNullOrUndefined$5,iterate=iterate$2,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$3,setSpecies=setSpecies$1,DESCRIPTORS=descriptors,fastKey=internalMetadataExports.fastKey,InternalStateModule=internalState,setInternalState=InternalStateModule.set,internalStateGetterFor=InternalStateModule.getterFor,collectionStrong$1={getConstructor:function(F,W,q,K){var X=F(function(yn,uo){anInstance(yn,tt),setInternalState(yn,{type:W,index:create(null),first:void 0,last:void 0,size:0}),DESCRIPTORS||(yn.size=0),isNullOrUndefined(uo)||iterate(uo,yn[K],{that:yn,AS_ENTRIES:q})}),tt=X.prototype,rt=internalStateGetterFor(W),ot=function(yn,uo,po){var mo=rt(yn),wo=ut(yn,uo),lf,yf;return wo?wo.value=po:(mo.last=wo={index:yf=fastKey(uo,!0),key:uo,value:po,previous:lf=mo.last,next:void 0,removed:!1},mo.first||(mo.first=wo),lf&&(lf.next=wo),DESCRIPTORS?mo.size++:yn.size++,yf!=="F"&&(mo.index[yf]=wo)),yn},ut=function(yn,uo){var po=rt(yn),mo=fastKey(uo),wo;if(mo!=="F")return po.index[mo];for(wo=po.first;wo;wo=wo.next)if(wo.key===uo)return wo};return defineBuiltIns(tt,{clear:function(){for(var uo=this,po=rt(uo),mo=po.index,wo=po.first;wo;)wo.removed=!0,wo.previous&&(wo.previous=wo.previous.next=void 0),delete mo[wo.index],wo=wo.next;po.first=po.last=void 0,DESCRIPTORS?po.size=0:uo.size=0},delete:function(yn){var uo=this,po=rt(uo),mo=ut(uo,yn);if(mo){var wo=mo.next,lf=mo.previous;delete po.index[mo.index],mo.removed=!0,lf&&(lf.next=wo),wo&&(wo.previous=lf),po.first===mo&&(po.first=wo),po.last===mo&&(po.last=lf),DESCRIPTORS?po.size--:uo.size--}return!!mo},forEach:function(uo){for(var po=rt(this),mo=bind(uo,arguments.length>1?arguments[1]:void 0),wo;wo=wo?wo.next:po.first;)for(mo(wo.value,wo.key,this);wo&&wo.removed;)wo=wo.previous},has:function(uo){return!!ut(this,uo)}}),defineBuiltIns(tt,q?{get:function(uo){var po=ut(this,uo);return po&&po.value},set:function(uo,po){return ot(this,uo===0?0:uo,po)}}:{add:function(uo){return ot(this,uo=uo===0?0:uo,uo)}}),DESCRIPTORS&&defineBuiltInAccessor(tt,"size",{configurable:!0,get:function(){return rt(this).size}}),X},setStrong:function(F,W,q){var K=W+" Iterator",X=internalStateGetterFor(W),tt=internalStateGetterFor(K);defineIterator(F,W,function(rt,ot){setInternalState(this,{type:K,target:rt,state:X(rt),kind:ot,last:void 0})},function(){for(var rt=tt(this),ot=rt.kind,ut=rt.last;ut&&ut.removed;)ut=ut.previous;return!rt.target||!(rt.last=ut=ut?ut.next:rt.state.first)?(rt.target=void 0,createIterResultObject(void 0,!0)):createIterResultObject(ot==="keys"?ut.key:ot==="values"?ut.value:[ut.key,ut.value],!1)},q?"entries":"values",!q,!0),setSpecies(W)}},collection=collection$1,collectionStrong=collectionStrong$1;collection("Set",function(F){return function(){return F(this,arguments.length?arguments[0]:void 0)}},collectionStrong);var path=path$s,set$2=path.Set,parent$2=set$2,set$1=parent$2,set=set$1,_Set=getDefaultExportFromCjs(set),$$1=_export,$findIndex=arrayIteration.findIndex,FIND_INDEX="findIndex",SKIPS_HOLES=!0;FIND_INDEX in[]&&Array(1)[FIND_INDEX](function(){SKIPS_HOLES=!1});$$1({target:"Array",proto:!0,forced:SKIPS_HOLES},{findIndex:function F(W){return $findIndex(this,W,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$1=entryVirtual$k,findIndex$3=entryVirtual$1("Array").findIndex,isPrototypeOf$1=objectIsPrototypeOf,method$1=findIndex$3,ArrayPrototype$1=Array.prototype,findIndex$2=function(F){var W=F.findIndex;return F===ArrayPrototype$1||isPrototypeOf$1(ArrayPrototype$1,F)&&W===ArrayPrototype$1.findIndex?method$1:W},parent$1=findIndex$2,findIndex$1=parent$1,findIndex=findIndex$1,_findIndexInstanceProperty=getDefaultExportFromCjs(findIndex);function _createForOfIteratorHelper$5(F,W){var q=typeof _Symbol<"u"&&_getIteratorMethod(F)||F["@@iterator"];if(!q){if(_Array$isArray$1(F)||(q=_unsupportedIterableToArray$5(F))||W&&F&&typeof F.length=="number"){q&&(F=q);var K=0,X=function(){};return{s:X,n:function(){return K>=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$5(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$5(F,W);var K=_sliceInstanceProperty(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$5(F,W)}}function _arrayLikeToArray$5(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);qrt.index?1:tt.indexq[ot].index&&(q[tt].top+=q[ot].height);for(var ut=F[tt],yn=0;ynHf},wo),_spliceInstanceProperty(po).call(po,wo,0,Bf),wo++}};for(lf.s();!(yf=lf.n()).done;)cf()}catch(Pf){lf.e(Pf)}finally{lf.f()}mo=null;var vf=null;wo=0;for(var _f=0,$f=0,xf=0,Af=function(){var Bf,Hf,Df=uo.shift();Df.top=tt(Df);var Lf=ot(Df),kf=ut(Df);mo!==null&&Lfkf&&($f=findLastIndexBetween(po,function(ip){return kf+EPSILON>=ot(ip)},_f,$f)+1);for(var Nf=_sortInstanceProperty(Bf=_filterInstanceProperty(Hf=_sliceInstanceProperty(po).call(po,_f,$f)).call(Hf,function(ip){return Lfot(ip)})).call(Bf,function(ip,ap){return ip.top-ap.top}),Yf=0;YfLf},wo),_spliceInstanceProperty(po).call(po,wo,0,Df),wo++);var rp=Df.top+Df.height;if(rp>xf&&(xf=rp),rt&&rt())return{v:null}},Cf;uo.length>0;)if(Cf=Af(),Cf)return Cf.v;return xf}function checkVerticalSpatialCollision(F,W,q){return F.top-q.vertical+EPSILONW.top}function findIndexFrom(F,W,q){var K;q||(q=0);var X=_findIndexInstanceProperty(K=_sliceInstanceProperty(F).call(F,q)).call(K,W);return X===-1?F.length:X+q}function findLastIndexBetween(F,W,q,K){for(q||(q=0),K||(K=F.length),i=K-1;i>=q;i--)if(W(F[i]))return i;return q-1}var UNGROUPED$3="__ungrouped__",BACKGROUND$2="__background__",ReservedGroupIds$1={UNGROUPED:UNGROUPED$3,BACKGROUND:BACKGROUND$2},Group=function(){function F(W,q,K){var X=this;if(_classCallCheck(this,F),this.groupId=W,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.subgroupVisibility={},this.doInnerStack=!1,this.shouldBailStackItems=!1,this.subgroupIndex=0,this.subgroupOrderer=q&&q.subgroupOrder,this.itemSet=K,this.isVisible=null,this.stackDirty=!0,this._disposeCallbacks=[],q&&q.nestedGroups&&(this.nestedGroups=q.nestedGroups,q.showNested==!1?this.showNested=!1:this.showNested=!0),q&&q.subgroupStack)if(typeof q.subgroupStack=="boolean")this.doInnerStack=q.subgroupStack,this.subgroupStackAll=q.subgroupStack;else for(var tt in q.subgroupStack)this.subgroupStack[tt]=q.subgroupStack[tt],this.doInnerStack=this.doInnerStack||q.subgroupStack[tt];q&&q.heightMode?this.heightMode=q.heightMode:this.heightMode=K.options.groupHeightMode,this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var rt=function(){X.checkRangedItems=!0};this.itemSet.body.emitter.on("checkRangedItems",rt),this._disposeCallbacks.push(function(){X.itemSet.body.emitter.off("checkRangedItems",rt)}),this._create(),this.setData(q)}return _createClass(F,[{key:"_create",value:function(){var q=document.createElement("div");this.itemSet.options.groupEditable.order?q.className="vis-label draggable":q.className="vis-label",this.dom.label=q;var K=document.createElement("div");K.className="vis-inner",q.appendChild(K),this.dom.inner=K;var X=document.createElement("div");X.className="vis-group",X["vis-group"]=this,this.dom.foreground=X,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.style.position="absolute",this.dom.marker.innerHTML="",this.dom.background.appendChild(this.dom.marker)}},{key:"setData",value:function(q){if(!this.itemSet.groupTouchParams.isDragging){var K,X;if(q&&q.subgroupVisibility)for(var tt in q.subgroupVisibility)this.subgroupVisibility[tt]=q.subgroupVisibility[tt];if(this.itemSet.options&&this.itemSet.options.groupTemplate){var rt;X=_bindInstanceProperty(rt=this.itemSet.options.groupTemplate).call(rt,this),K=X(q,this.dom.inner)}else K=q&&q.content;if(K instanceof Element){for(;this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(K)}else K instanceof Object&&K.isReactComponent||(K instanceof Object?X(q,this.dom.inner):K!=null?this.dom.inner.innerHTML=availableUtils.xss(K):this.dom.inner.innerHTML=availableUtils.xss(this.groupId||""));this.dom.label.title=q&&q.title||"",this.dom.inner.firstChild?availableUtils.removeClassName(this.dom.inner,"vis-hidden"):availableUtils.addClassName(this.dom.inner,"vis-hidden"),q&&q.nestedGroups?((!this.nestedGroups||this.nestedGroups!=q.nestedGroups)&&(this.nestedGroups=q.nestedGroups),(q.showNested!==void 0||this.showNested===void 0)&&(q.showNested==!1?this.showNested=!1:this.showNested=!0),availableUtils.addClassName(this.dom.label,"vis-nesting-group"),this.showNested?(availableUtils.removeClassName(this.dom.label,"collapsed"),availableUtils.addClassName(this.dom.label,"expanded")):(availableUtils.removeClassName(this.dom.label,"expanded"),availableUtils.addClassName(this.dom.label,"collapsed"))):this.nestedGroups&&(this.nestedGroups=null,availableUtils.removeClassName(this.dom.label,"collapsed"),availableUtils.removeClassName(this.dom.label,"expanded"),availableUtils.removeClassName(this.dom.label,"vis-nesting-group")),q&&(q.treeLevel||q.nestedInGroup)?(availableUtils.addClassName(this.dom.label,"vis-nested-group"),q.treeLevel?availableUtils.addClassName(this.dom.label,"vis-group-level-"+q.treeLevel):availableUtils.addClassName(this.dom.label,"vis-group-level-unknown-but-gte1")):availableUtils.addClassName(this.dom.label,"vis-group-level-0");var ot=q&&q.className||null;ot!=this.className&&(this.className&&(availableUtils.removeClassName(this.dom.label,this.className),availableUtils.removeClassName(this.dom.foreground,this.className),availableUtils.removeClassName(this.dom.background,this.className),availableUtils.removeClassName(this.dom.axis,this.className)),availableUtils.addClassName(this.dom.label,ot),availableUtils.addClassName(this.dom.foreground,ot),availableUtils.addClassName(this.dom.background,ot),availableUtils.addClassName(this.dom.axis,ot),this.className=ot),this.style&&(availableUtils.removeCssText(this.dom.label,this.style),this.style=null),q&&q.style&&(availableUtils.addCssText(this.dom.label,q.style),this.style=q.style)}}},{key:"getLabelWidth",value:function(){return this.props.label.width}},{key:"_didMarkerHeightChange",value:function(){var q=this.dom.marker.clientHeight;if(q!=this.lastMarkerHeight){this.lastMarkerHeight=q;var K={},X=0;_forEachInstanceProperty(availableUtils).call(availableUtils,this.items,function(ut,yn){if(ut.dirty=!0,ut.displayed){var uo=!0;K[yn]=ut.redraw(uo),X=K[yn].length}});var tt=X>0;if(tt)for(var rt=function(yn){_forEachInstanceProperty(availableUtils).call(availableUtils,K,function(uo){uo[yn]()})},ot=0;otX.bailTimeMs&&(X.userBailFunction&&this.itemSet.userContinueNotBail==null?X.userBailFunction(function(rt){q.itemSet.userContinueNotBail=rt,tt=!rt}):q.itemSet.userContinueNotBail==!1?tt=!0:tt=!1)}return tt}},{key:"_redrawItems",value:function(q,K,X,tt){var rt=this,ot=q||this.stackDirty||this.isVisible&&!K;if(ot){var ut,yn,uo,po,mo,wo,lf={byEnd:_filterInstanceProperty(ut=this.orderedItems.byEnd).call(ut,function(kf){return!kf.isCluster}),byStart:_filterInstanceProperty(yn=this.orderedItems.byStart).call(yn,function(kf){return!kf.isCluster})},yf={byEnd:_toConsumableArray(new _Set(_filterInstanceProperty(uo=_mapInstanceProperty(po=this.orderedItems.byEnd).call(po,function(kf){return kf.cluster})).call(uo,function(kf){return!!kf}))),byStart:_toConsumableArray(new _Set(_filterInstanceProperty(mo=_mapInstanceProperty(wo=this.orderedItems.byStart).call(wo,function(kf){return kf.cluster})).call(mo,function(kf){return!!kf})))},cf=function(){var Nf,Yf,Gf,rp=rt._updateItemsInRange(lf,_filterInstanceProperty(Nf=rt.visibleItems).call(Nf,function(ap){return!ap.isCluster}),tt),ip=rt._updateClustersInRange(yf,_filterInstanceProperty(Yf=rt.visibleItems).call(Yf,function(ap){return ap.isCluster}),tt);return _concatInstanceProperty(Gf=[]).call(Gf,_toConsumableArray(rp),_toConsumableArray(ip))},vf=function(Nf){var Yf={},Gf=function(ap){var yp,vp=_filterInstanceProperty(yp=rt.visibleItems).call(yp,function(Np){return Np.data.subgroup===ap});Yf[ap]=Nf?_sortInstanceProperty(vp).call(vp,function(Np,jp){return Nf(Np.data,jp.data)}):vp};for(var rp in rt.subgroups)Gf(rp);return Yf};if(typeof this.itemSet.options.order=="function"){var _f=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups){var $f=vf(this.itemSet.options.order);stackSubgroupsWithInnerStack($f,X,this.subgroups),this.visibleItems=cf(),this._updateSubGroupHeights(X)}else{var xf,Af,Cf,Pf;this.visibleItems=cf(),this._updateSubGroupHeights(X);var Bf=_sortInstanceProperty(xf=_filterInstanceProperty(Af=_sliceInstanceProperty(Cf=this.visibleItems).call(Cf)).call(Af,function(kf){return kf.isCluster||!kf.isCluster&&!kf.cluster})).call(xf,function(kf,Nf){return _f.itemSet.options.order(kf.data,Nf.data)});this.shouldBailStackItems=stack(Bf,X,!0,_bindInstanceProperty(Pf=this._shouldBailItemsRedraw).call(Pf,this))}}else if(this.visibleItems=cf(),this._updateSubGroupHeights(X),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups){var Hf=vf();stackSubgroupsWithInnerStack(Hf,X,this.subgroups)}else{var Df;this.shouldBailStackItems=stack(this.visibleItems,X,!0,_bindInstanceProperty(Df=this._shouldBailItemsRedraw).call(Df,this))}else nostack(this.visibleItems,X,this.subgroups,this.itemSet.options.stackSubgroups);for(var Lf=0;Lf0){var X=this;this._resetSubgroups(),_forEachInstanceProperty(availableUtils).call(availableUtils,this.visibleItems,function(tt){tt.data.subgroup!==void 0&&(X.subgroups[tt.data.subgroup].height=Math.max(X.subgroups[tt.data.subgroup].height,tt.height+q.item.vertical),X.subgroups[tt.data.subgroup].visible=typeof K.subgroupVisibility[tt.data.subgroup]>"u"?!0:!!K.subgroupVisibility[tt.data.subgroup])})}}},{key:"_isGroupVisible",value:function(q,K){return this.top<=q.body.domProps.centerContainer.height-q.body.domProps.scrollTop+K.axis&&this.top+this.height+K.axis>=-q.body.domProps.scrollTop}},{key:"_calculateHeight",value:function(q){var K,X;if(this.heightMode==="fixed"?X=availableUtils.toArray(this.items):X=this.visibleItems,X.length>0){var tt=X[0].top,rt=X[0].top+X[0].height;if(_forEachInstanceProperty(availableUtils).call(availableUtils,X,function(ut){tt=Math.min(tt,ut.top),rt=Math.max(rt,ut.top+ut.height)}),tt>q.axis){var ot=tt-q.axis;rt-=ot,_forEachInstanceProperty(availableUtils).call(availableUtils,X,function(ut){ut.top-=ot})}K=Math.ceil(rt+q.item.vertical/2),this.heightMode!=="fitItems"&&(K=Math.max(K,this.props.label.height))}else K=this.props.label.height;return K}},{key:"show",value:function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)}},{key:"hide",value:function(){var q=this.dom.label;q.parentNode&&q.parentNode.removeChild(q);var K=this.dom.foreground;K.parentNode&&K.parentNode.removeChild(K);var X=this.dom.background;X.parentNode&&X.parentNode.removeChild(X);var tt=this.dom.axis;tt.parentNode&&tt.parentNode.removeChild(tt)}},{key:"add",value:function(q){var K;if(this.items[q.id]=q,q.setParent(this),this.stackDirty=!0,q.data.subgroup!==void 0&&(this._addToSubgroup(q),this.orderSubgroups()),!_includesInstanceProperty(K=this.visibleItems).call(K,q)){var X=this.itemSet.body.range;this._checkIfVisible(q,this.visibleItems,X)}}},{key:"_addToSubgroup",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q.data.subgroup;K!=null&&this.subgroups[K]===void 0&&(this.subgroups[K]={height:0,top:0,start:q.data.start,end:q.data.end||q.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[K]||!1},this.subgroupIndex++),new Date(q.data.start)new Date(this.subgroups[K].end)&&(this.subgroups[K].end=X),this.subgroups[K].items.push(q)}},{key:"_updateSubgroupsSizes",value:function(){var q=this;if(q.subgroups){var K=function(){var rt,ot=q.subgroups[X].items[0].data.end||q.subgroups[X].items[0].data.start,ut=q.subgroups[X].items[0].data.start,yn=ot-1;_forEachInstanceProperty(rt=q.subgroups[X].items).call(rt,function(uo){new Date(uo.data.start)new Date(yn)&&(yn=po)}),q.subgroups[X].start=ut,q.subgroups[X].end=new Date(yn-1)};for(var X in q.subgroups)K()}}},{key:"orderSubgroups",value:function(){if(this.subgroupOrderer!==void 0){var q=[];if(typeof this.subgroupOrderer=="string"){for(var K in this.subgroups)q.push({subgroup:K,sortField:this.subgroups[K].items[0].data[this.subgroupOrderer]});_sortInstanceProperty(q).call(q,function(rt,ot){return rt.sortField-ot.sortField})}else if(typeof this.subgroupOrderer=="function"){for(var X in this.subgroups)q.push(this.subgroups[X].items[0].data);_sortInstanceProperty(q).call(q,this.subgroupOrderer)}if(q.length>0)for(var tt=0;tt1&&arguments[1]!==void 0?arguments[1]:q.data.subgroup;if(K!=null){var X=this.subgroups[K];if(X){var tt,rt=_indexOfInstanceProperty(tt=X.items).call(tt,q);if(rt>=0){var ot;_spliceInstanceProperty(ot=X.items).call(ot,rt,1),X.items.length?this._updateSubgroupsSizes():delete this.subgroups[K]}}}}},{key:"removeFromDataSet",value:function(q){this.itemSet.removeItem(q.id)}},{key:"order",value:function(){for(var q=availableUtils.toArray(this.items),K=[],X=[],tt=0;tt0)for(var lf=0;lfpo}),this.checkRangedItems==!0){this.checkRangedItems=!1;for(var cf=0;cfpo})}for(var _f={},$f=0,xf=0;xf0;if(Pf)for(var Bf=function(kf){_forEachInstanceProperty(availableUtils).call(availableUtils,_f,function(Nf){Nf[kf]()})},Hf=0;Hf<$f;Hf++)Bf(Hf);for(var Df=0;Df=0;ot--){var ut=K[ot];if(rt(ut))break;!(ut.isCluster&&!ut.hasItems())&&!ut.cluster&&tt[ut.id]===void 0&&(tt[ut.id]=!0,X.push(ut))}for(var yn=q+1;yn0)for(var ot=0;ot0;if(yf)for(var cf=0;cf"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var BackgroundGroup=function(F){_inherits(q,F);var W=_createSuper$8(q);function q(K,X,tt){var rt;return _classCallCheck(this,q),rt=W.call(this,K,X,tt),rt.width=0,rt.height=0,rt.top=0,rt.left=0,rt}return _createClass(q,[{key:"redraw",value:function(X,tt,rt){var ot=!1;this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,X),this.width=this.dom.background.offsetWidth,this.dom.background.style.height="0";for(var ut=0,yn=this.visibleItems.length;ut=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$4(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$4(F,W);var K=_sliceInstanceProperty(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$4(F,W)}}function _arrayLikeToArray$4(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q"u"?!0:!!q.selectable)}},{key:"setParent",value:function(q){this.displayed?(this.hide(),this.parent=q,this.parent&&this.show()):this.parent=q}},{key:"isVisible",value:function(q){return!1}},{key:"show",value:function(){return!1}},{key:"hide",value:function(){return!1}},{key:"redraw",value:function(){}},{key:"repositionX",value:function(){}},{key:"repositionY",value:function(){}},{key:"_repaintDragCenter",value:function(){if(this.selected&&this.editable.updateTime&&!this.dom.dragCenter){var q,K,X=this,tt=document.createElement("div");tt.className="vis-drag-center",tt.dragCenterItem=this,this.hammerDragCenter=new Hammer(tt),this.hammerDragCenter.on("tap",function(rt){X.parent.itemSet.body.emitter.emit("click",{event:rt,item:X.id})}),this.hammerDragCenter.on("doubletap",function(rt){rt.stopPropagation(),X.parent.itemSet._onUpdateItem(X),X.parent.itemSet.body.emitter.emit("doubleClick",{event:rt,item:X.id})}),this.hammerDragCenter.on("panstart",function(rt){rt.stopPropagation(),X.parent.itemSet._onDragStart(rt)}),this.hammerDragCenter.on("panmove",_bindInstanceProperty(q=X.parent.itemSet._onDrag).call(q,X.parent.itemSet)),this.hammerDragCenter.on("panend",_bindInstanceProperty(K=X.parent.itemSet._onDragEnd).call(K,X.parent.itemSet)),this.hammerDragCenter.get("press").set({time:1e4}),this.dom.box?this.dom.dragLeft?this.dom.box.insertBefore(tt,this.dom.dragLeft):this.dom.box.appendChild(tt):this.dom.point&&this.dom.point.appendChild(tt),this.dom.dragCenter=tt}else!this.selected&&this.dom.dragCenter&&(this.dom.dragCenter.parentNode&&this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter),this.dom.dragCenter=null,this.hammerDragCenter&&(this.hammerDragCenter.destroy(),this.hammerDragCenter=null))}},{key:"_repaintDeleteButton",value:function(q){var K=(this.options.editable.overrideItems||this.editable==null)&&this.options.editable.remove||!this.options.editable.overrideItems&&this.editable!=null&&this.editable.remove;if(this.selected&&K&&!this.dom.deleteButton){var X=this,tt=document.createElement("div");this.options.rtl?tt.className="vis-delete-rtl":tt.className="vis-delete";var rt=this.options.locales[this.options.locale];rt||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),rt=this.options.locales.en),tt.title=rt.deleteSelected,this.hammerDeleteButton=new Hammer(tt).on("tap",function(ot){ot.stopPropagation(),X.parent.removeFromDataSet(X)}),q.appendChild(tt),this.dom.deleteButton=tt}else(!this.selected||!K)&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null,this.hammerDeleteButton&&(this.hammerDeleteButton.destroy(),this.hammerDeleteButton=null))}},{key:"_repaintOnItemUpdateTimeTooltip",value:function(q){if(this.options.tooltipOnItemUpdateTime){var K=(this.options.editable.updateTime||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&K&&!this.dom.onItemUpdateTimeTooltip){var X=document.createElement("div");X.className="vis-onUpdateTime-tooltip",q.appendChild(X),this.dom.onItemUpdateTimeTooltip=X}else!this.selected&&this.dom.onItemUpdateTimeTooltip&&(this.dom.onItemUpdateTimeTooltip.parentNode&&this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip),this.dom.onItemUpdateTimeTooltip=null);if(this.dom.onItemUpdateTimeTooltip){this.dom.onItemUpdateTimeTooltip.style.visibility=this.parent.itemSet.touchParams.itemIsDragging?"visible":"hidden",this.dom.onItemUpdateTimeTooltip.style.transform="translateX(-50%)",this.dom.onItemUpdateTimeTooltip.style.left="50%";var tt=50,rt=this.parent.itemSet.body.domProps.scrollTop,ot;this.options.orientation.item=="top"?ot=this.top:ot=this.parent.height-this.top-this.height;var ut=ot+this.parent.top-tt<-rt;ut?(this.dom.onItemUpdateTimeTooltip.style.bottom="",this.dom.onItemUpdateTimeTooltip.style.top="".concat(this.height+2,"px")):(this.dom.onItemUpdateTimeTooltip.style.top="",this.dom.onItemUpdateTimeTooltip.style.bottom="".concat(this.height+2,"px"));var yn,uo;if(this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template){var po;uo=_bindInstanceProperty(po=this.options.tooltipOnItemUpdateTime.template).call(po,this),yn=uo(this.data)}else yn="start: ".concat(moment$3(this.data.start).format("MM/DD/YYYY hh:mm")),this.data.end&&(yn+="
end: ".concat(moment$3(this.data.end).format("MM/DD/YYYY hh:mm")));this.dom.onItemUpdateTimeTooltip.innerHTML=availableUtils.xss(yn)}}}},{key:"_getItemData",value:function(){return this.parent.itemSet.itemsData.get(this.id)}},{key:"_updateContents",value:function(q){var K,X,tt,rt,ot,ut=this._getItemData(),yn=this.dom.box||this.dom.point,uo=yn.getElementsByClassName("vis-item-visible-frame")[0];if(this.options.visibleFrameTemplate){var po;ot=_bindInstanceProperty(po=this.options.visibleFrameTemplate).call(po,this),rt=availableUtils.xss(ot(ut,uo))}else rt="";if(uo){if(rt instanceof Object&&!(rt instanceof Element))ot(ut,uo);else if(X=this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(rt),X){if(rt instanceof Element)uo.innerHTML="",uo.appendChild(rt);else if(rt!=null)uo.innerHTML=availableUtils.xss(rt);else if(!(this.data.type=="background"&&this.data.content===void 0))throw new Error('Property "content" missing in item '.concat(this.id));this.itemVisibleFrameContent=rt}}if(this.options.template){var mo;tt=_bindInstanceProperty(mo=this.options.template).call(mo,this),K=tt(ut,q,this.data)}else K=this.data.content;if(K instanceof Object&&!(K instanceof Element))tt(ut,q);else if(X=this._contentToString(this.content)!==this._contentToString(K),X){if(K instanceof Element)q.innerHTML="",q.appendChild(K);else if(K!=null)q.innerHTML=availableUtils.xss(K);else if(!(this.data.type=="background"&&this.data.content===void 0))throw new Error('Property "content" missing in item '.concat(this.id));this.content=K}}},{key:"_updateDataAttributes",value:function(q){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){var K=[];if(_Array$isArray$1(this.options.dataAttributes))K=this.options.dataAttributes;else if(this.options.dataAttributes=="all")K=_Object$keys(this.data);else return;var X=_createForOfIteratorHelper$4(K),tt;try{for(X.s();!(tt=X.n()).done;){var rt=tt.value,ot=this.data[rt];ot!=null?q.setAttribute("data-".concat(rt),ot):q.removeAttribute("data-".concat(rt))}}catch(ut){X.e(ut)}finally{X.f()}}}},{key:"_updateStyle",value:function(q){this.style&&(availableUtils.removeCssText(q,this.style),this.style=null),this.data.style&&(availableUtils.addCssText(q,this.data.style),this.style=this.data.style)}},{key:"_contentToString",value:function(q){return typeof q=="string"?q:q&&"outerHTML"in q?q.outerHTML:q}},{key:"_updateEditStatus",value:function(){this.options&&(typeof this.options.editable=="boolean"?this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable}:_typeof(this.options.editable)==="object"&&(this.editable={},availableUtils.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.options.editable))),(!this.options||!this.options.editable||this.options.editable.overrideItems!==!0)&&this.data&&(typeof this.data.editable=="boolean"?this.editable={updateTime:this.data.editable,updateGroup:this.data.editable,remove:this.data.editable}:_typeof(this.data.editable)==="object"&&(this.editable={},availableUtils.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.data.editable)))}},{key:"getWidthLeft",value:function(){return 0}},{key:"getWidthRight",value:function(){return 0}},{key:"getTitle",value:function(){if(this.options.tooltip&&this.options.tooltip.template){var q,K=_bindInstanceProperty(q=this.options.tooltip.template).call(q,this);return K(this._getItemData(),this.data)}return this.data.title}}]),F}();Item.prototype.stack=!0;function _createSuper$7(F){var W=_isNativeReflectConstruct$7();return function(){var K=_getPrototypeOf(F),X;if(W){var tt=_getPrototypeOf(this).constructor;X=_Reflect$construct(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn(this,X)}}function _isNativeReflectConstruct$7(){if(typeof Reflect>"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var BoxItem=function(F){_inherits(q,F);var W=_createSuper$7(q);function q(K,X,tt){var rt;if(_classCallCheck(this,q),rt=W.call(this,K,X,tt),rt.props={dot:{width:0,height:0},line:{width:0,height:0}},K&&K.start==null)throw new Error('Property "start" missing in item '.concat(K));return rt}return _createClass(q,[{key:"isVisible",value:function(X){if(this.cluster)return!1;var tt,rt=this.data.align||this.options.align,ot=this.width*X.getMillisecondsPerPixel();return rt=="right"?tt=this.data.start.getTime()>X.start&&this.data.start.getTime()-otX.start&&this.data.start.getTime()X.start&&this.data.start.getTime()-ot/23&&arguments[3]!==void 0?arguments[3]:!1;if(!(ut===void 0&&yn===void 0)){var mo=po?ut*-1:ut;if(yn===void 0){ot.style.transform="translateX(".concat(mo,"px)");return}if(ut===void 0){ot.style.transform="translateY(".concat(yn,"px)");return}ot.style.transform=_concatInstanceProperty(uo="translate(".concat(mo,"px, ")).call(uo,yn,"px)")}};tt(this.dom.box,this.boxX,this.boxY,X),tt(this.dom.dot,this.dotX,this.dotY,X),tt(this.dom.line,this.lineX,this.lineY,X)}},{key:"repositionX",value:function(){var X=this.conversion.toScreen(this.data.start),tt=this.data.align===void 0?this.options.align:this.data.align,rt=this.props.line.width,ot=this.props.dot.width;tt=="right"?(this.boxX=X-this.width,this.lineX=X-rt,this.dotX=X-rt/2-ot/2):tt=="left"?(this.boxX=X,this.lineX=X,this.dotX=X+rt/2-ot/2):(this.boxX=X-this.width/2,this.lineX=this.options.rtl?X-rt:X-rt/2,this.dotX=X-ot/2),this.options.rtl?this.right=this.boxX:this.left=this.boxX,this.repositionXY()}},{key:"repositionY",value:function(){var X=this.options.orientation.item,tt=this.dom.line.style;if(X=="top"){var rt=this.parent.top+this.top+1;this.boxY=this.top||0,tt.height="".concat(rt,"px"),tt.bottom="",tt.top="0"}else{var ot=this.parent.itemSet.props.height,ut=ot-this.parent.top-this.parent.height+this.top;this.boxY=this.parent.height-this.top-(this.height||0),tt.height="".concat(ut,"px"),tt.top="",tt.bottom="0"}this.dotY=-this.props.dot.height/2,this.repositionXY()}},{key:"getWidthLeft",value:function(){return this.width/2}},{key:"getWidthRight",value:function(){return this.width/2}}]),q}(Item);function _createSuper$6(F){var W=_isNativeReflectConstruct$6();return function(){var K=_getPrototypeOf(F),X;if(W){var tt=_getPrototypeOf(this).constructor;X=_Reflect$construct(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn(this,X)}}function _isNativeReflectConstruct$6(){if(typeof Reflect>"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var PointItem=function(F){_inherits(q,F);var W=_createSuper$6(q);function q(K,X,tt){var rt;if(_classCallCheck(this,q),rt=W.call(this,K,X,tt),rt.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0,marginRight:0}},K&&K.start==null)throw new Error('Property "start" missing in item '.concat(K));return rt}return _createClass(q,[{key:"isVisible",value:function(X){if(this.cluster)return!1;var tt=this.width*X.getMillisecondsPerPixel();return this.data.start.getTime()+tt>X.start&&this.data.start3&&arguments[3]!==void 0?arguments[3]:!1;if(!(ut===void 0&&yn===void 0)){var mo=po?ut*-1:ut;if(yn===void 0){ot.style.transform="translateX(".concat(mo,"px)");return}if(ut===void 0){ot.style.transform="translateY(".concat(yn,"px)");return}ot.style.transform=_concatInstanceProperty(uo="translate(".concat(mo,"px, ")).call(uo,yn,"px)")}};tt(this.dom.point,this.pointX,this.pointY,X)}},{key:"show",value:function(X){if(!this.displayed)return this.redraw(X)}},{key:"hide",value:function(){this.displayed&&(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),this.displayed=!1)}},{key:"repositionX",value:function(){var X=this.conversion.toScreen(this.data.start);this.pointX=X,this.options.rtl?this.right=X-this.props.dot.width:this.left=X-this.props.dot.width,this.repositionXY()}},{key:"repositionY",value:function(){var X=this.options.orientation.item;X=="top"?this.pointY=this.top:this.pointY=this.parent.height-this.top-this.height,this.repositionXY()}},{key:"getWidthLeft",value:function(){return this.props.dot.width}},{key:"getWidthRight",value:function(){return this.props.dot.width}}]),q}(Item);function _createSuper$5(F){var W=_isNativeReflectConstruct$5();return function(){var K=_getPrototypeOf(F),X;if(W){var tt=_getPrototypeOf(this).constructor;X=_Reflect$construct(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn(this,X)}}function _isNativeReflectConstruct$5(){if(typeof Reflect>"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var RangeItem=function(F){_inherits(q,F);var W=_createSuper$5(q);function q(K,X,tt){var rt;if(_classCallCheck(this,q),rt=W.call(this,K,X,tt),rt.props={content:{width:0}},rt.overflow=!1,K){if(K.start==null)throw new Error('Property "start" missing in item '.concat(K.id));if(K.end==null)throw new Error('Property "end" missing in item '.concat(K.id))}return rt}return _createClass(q,[{key:"isVisible",value:function(X){return this.cluster?!1:this.data.startX.start}},{key:"_createDomElement",value:function(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.visibleFrame=document.createElement("div"),this.dom.visibleFrame.className="vis-item-visible-frame",this.dom.box.appendChild(this.dom.visibleFrame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dom.box["vis-item"]=this,this.dirty=!0)}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var X=this.parent.dom.foreground;if(!X)throw new Error("Cannot redraw item: parent has no foreground container element");X.appendChild(this.dom.box)}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var X=this.editable.updateTime||this.editable.updateGroup,tt=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(X?" vis-editable":" vis-readonly");this.dom.box.className=this.baseClassName+tt,this.dom.content.style.maxWidth="none"}}},{key:"_getDomComponentsSizes",value:function(){return this.overflow=window.getComputedStyle(this.dom.frame).overflow!=="hidden",this.whiteSpace=window.getComputedStyle(this.dom.content).whiteSpace!=="nowrap",{content:{width:this.dom.content.offsetWidth},box:{height:this.dom.box.offsetHeight}}}},{key:"_updateDomComponentsSizes",value:function(X){this.props.content.width=X.content.width,this.height=X.box.height,this.dom.content.style.maxWidth="",this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDeleteButton(this.dom.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()}},{key:"redraw",value:function(X){var tt,rt,ot,ut=this,yn,uo,po=[_bindInstanceProperty(tt=this._createDomElement).call(tt,this),_bindInstanceProperty(rt=this._appendDomElement).call(rt,this),_bindInstanceProperty(ot=this._updateDirtyDomComponents).call(ot,this),function(){if(ut.dirty){var wo;uo=_bindInstanceProperty(wo=ut._getDomComponentsSizes).call(wo,ut)()}},function(){if(ut.dirty){var wo;_bindInstanceProperty(wo=ut._updateDomComponentsSizes).call(wo,ut)(uo)}},_bindInstanceProperty(yn=this._repaintDomAdditionals).call(yn,this)];if(X)return po;var mo;return _forEachInstanceProperty(po).call(po,function(wo){mo=wo()}),mo}},{key:"show",value:function(X){if(!this.displayed)return this.redraw(X)}},{key:"hide",value:function(){if(this.displayed){var X=this.dom.box;X.parentNode&&X.parentNode.removeChild(X),this.displayed=!1}}},{key:"repositionX",value:function(X){var tt=this.parent.width,rt=this.conversion.toScreen(this.data.start),ot=this.conversion.toScreen(this.data.end),ut=this.data.align===void 0?this.options.align:this.data.align,yn,uo;this.data.limitSize!==!1&&(X===void 0||X===!0)&&(rt<-tt&&(rt=-tt),ot>2*tt&&(ot=2*tt));var po=Math.max(Math.round((ot-rt)*1e3)/1e3,1);switch(this.overflow?(this.options.rtl?this.right=rt:this.left=rt,this.width=po+this.props.content.width,uo=this.props.content.width):(this.options.rtl?this.right=rt:this.left=rt,this.width=po,uo=Math.min(ot-rt,this.props.content.width)),this.options.rtl?this.dom.box.style.transform="translateX(".concat(this.right*-1,"px)"):this.dom.box.style.transform="translateX(".concat(this.left,"px)"),this.dom.box.style.width="".concat(po,"px"),this.whiteSpace&&(this.height=this.dom.box.offsetHeight),ut){case"left":this.dom.content.style.transform="translateX(0)";break;case"right":if(this.options.rtl){var mo=Math.max(po-uo,0)*-1;this.dom.content.style.transform="translateX(".concat(mo,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max(po-uo,0),"px)");break;case"center":if(this.options.rtl){var wo=Math.max((po-uo)/2,0)*-1;this.dom.content.style.transform="translateX(".concat(wo,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max((po-uo)/2,0),"px)");break;default:if(this.overflow?ot>0?yn=Math.max(-rt,0):yn=-uo:rt<0?yn=-rt:yn=0,this.options.rtl){var lf=yn*-1;this.dom.content.style.transform="translateX(".concat(lf,"px)")}else this.dom.content.style.transform="translateX(".concat(yn,"px)")}}},{key:"repositionY",value:function(){var X=this.options.orientation.item,tt=this.dom.box;X=="top"?tt.style.top="".concat(this.top,"px"):tt.style.top="".concat(this.parent.height-this.top-this.height,"px")}},{key:"_repaintDragLeft",value:function(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragLeft){var X=document.createElement("div");X.className="vis-drag-left",X.dragLeftItem=this,this.dom.box.appendChild(X),this.dom.dragLeft=X}else!this.selected&&!this.options.itemsAlwaysDraggable.range&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)}},{key:"_repaintDragRight",value:function(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragRight){var X=document.createElement("div");X.className="vis-drag-right",X.dragRightItem=this,this.dom.box.appendChild(X),this.dom.dragRight=X}else!this.selected&&!this.options.itemsAlwaysDraggable.range&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)}}]),q}(Item);RangeItem.prototype.baseClassName="vis-item vis-range";function _createSuper$4(F){var W=_isNativeReflectConstruct$4();return function(){var K=_getPrototypeOf(F),X;if(W){var tt=_getPrototypeOf(this).constructor;X=_Reflect$construct(K,arguments,tt)}else X=K.apply(this,arguments);return _possibleConstructorReturn(this,X)}}function _isNativeReflectConstruct$4(){if(typeof Reflect>"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var BackgroundItem=function(F){_inherits(q,F);var W=_createSuper$4(q);function q(K,X,tt){var rt;if(_classCallCheck(this,q),rt=W.call(this,K,X,tt),rt.props={content:{width:0}},rt.overflow=!1,K){if(K.start==null)throw new Error('Property "start" missing in item '.concat(K.id));if(K.end==null)throw new Error('Property "end" missing in item '.concat(K.id))}return rt}return _createClass(q,[{key:"isVisible",value:function(X){return this.data.startX.start}},{key:"_createDomElement",value:function(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dirty=!0)}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var X=this.parent.dom.background;if(!X)throw new Error("Cannot redraw item: parent has no background container element");X.appendChild(this.dom.box)}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var X=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");this.dom.box.className=this.baseClassName+X}}},{key:"_getDomComponentsSizes",value:function(){return this.overflow=window.getComputedStyle(this.dom.content).overflow!=="hidden",{content:{width:this.dom.content.offsetWidth}}}},{key:"_updateDomComponentsSizes",value:function(X){this.props.content.width=X.content.width,this.height=0,this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){}},{key:"redraw",value:function(X){var tt,rt,ot,ut=this,yn,uo,po=[_bindInstanceProperty(tt=this._createDomElement).call(tt,this),_bindInstanceProperty(rt=this._appendDomElement).call(rt,this),_bindInstanceProperty(ot=this._updateDirtyDomComponents).call(ot,this),function(){if(ut.dirty){var wo;uo=_bindInstanceProperty(wo=ut._getDomComponentsSizes).call(wo,ut)()}},function(){if(ut.dirty){var wo;_bindInstanceProperty(wo=ut._updateDomComponentsSizes).call(wo,ut)(uo)}},_bindInstanceProperty(yn=this._repaintDomAdditionals).call(yn,this)];if(X)return po;var mo;return _forEachInstanceProperty(po).call(po,function(wo){mo=wo()}),mo}},{key:"repositionY",value:function(X){var tt,rt=this.options.orientation.item;if(this.data.subgroup!==void 0){var ot=this.data.subgroup;this.dom.box.style.height="".concat(this.parent.subgroups[ot].height,"px"),rt=="top"?this.dom.box.style.top="".concat(this.parent.top+this.parent.subgroups[ot].top,"px"):this.dom.box.style.top="".concat(this.parent.top+this.parent.height-this.parent.subgroups[ot].top-this.parent.subgroups[ot].height,"px"),this.dom.box.style.bottom=""}else this.parent instanceof BackgroundGroup?(tt=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.bottom=rt=="bottom"?"0":"",this.dom.box.style.top=rt=="top"?"0":""):(tt=this.parent.height,this.dom.box.style.top="".concat(this.parent.top,"px"),this.dom.box.style.bottom="");this.dom.box.style.height="".concat(tt,"px")}}]),q}(Item);BackgroundItem.prototype.baseClassName="vis-item vis-background";BackgroundItem.prototype.stack=!1;BackgroundItem.prototype.show=RangeItem.prototype.show;BackgroundItem.prototype.hide=RangeItem.prototype.hide;BackgroundItem.prototype.repositionX=RangeItem.prototype.repositionX;var Popup=function(){function F(W,q){_classCallCheck(this,F),this.container=W,this.overflowMethod=q||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}return _createClass(F,[{key:"setPosition",value:function(q,K){this.x=_parseInt$1(q),this.y=_parseInt$1(K)}},{key:"setText",value:function(q){q instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(q)):this.frame.innerHTML=availableUtils.xss(q)}},{key:"show",value:function(q){if(q===void 0&&(q=!0),q===!0){var K=this.frame.clientHeight,X=this.frame.clientWidth,tt=this.frame.parentNode.clientHeight,rt=this.frame.parentNode.clientWidth,ot=0,ut=0;if(this.overflowMethod=="flip"||this.overflowMethod=="none"){var yn=!1,uo=!0;this.overflowMethod=="flip"&&(this.y-Krt-this.padding&&(yn=!0)),yn?ot=this.x-X:ot=this.x,uo?ut=this.y-K:ut=this.y}else ut=this.y-K,ut+K+this.padding>tt&&(ut=tt-K-this.padding),utrt&&(ot=rt-X-this.padding),ot1?arguments[1]:void 0)}});var entryVirtual=entryVirtual$k,every$3=entryVirtual("Array").every,isPrototypeOf=objectIsPrototypeOf,method=every$3,ArrayPrototype=Array.prototype,every$2=function(F){var W=F.every;return F===ArrayPrototype||isPrototypeOf(ArrayPrototype,F)&&W===ArrayPrototype.every?method:W},parent$16=every$2,every$1=parent$16,every=every$1,_everyInstanceProperty=getDefaultExportFromCjs(every);function _createForOfIteratorHelper$3(F,W){var q=typeof _Symbol<"u"&&_getIteratorMethod(F)||F["@@iterator"];if(!q){if(_Array$isArray$1(F)||(q=_unsupportedIterableToArray$3(F))||W&&F&&typeof F.length=="number"){q&&(F=q);var K=0,X=function(){};return{s:X,n:function(){return K>=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$3(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$3(F,W);var K=_sliceInstanceProperty(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$3(F,W)}}function _arrayLikeToArray$3(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var ClusterItem=function(F){_inherits(q,F);var W=_createSuper$3(q);function q(K,X,tt){var rt;_classCallCheck(this,q);var ot=_Object$assign({},{fitOnDoubleClick:!0},tt,{editable:!1});if(rt=W.call(this,K,X,ot),rt.props={content:{width:0,height:0}},!K||K.uiItems==null)throw new Error('Property "uiItems" missing in item '+K.id);return rt.id=v4(),rt.group=K.group,rt._setupRange(),rt.emitter=rt.data.eventEmitter,rt.range=rt.data.range,rt.attached=!1,rt.isCluster=!0,rt.data.isCluster=!0,rt}return _createClass(q,[{key:"hasItems",value:function(){return this.data.uiItems&&this.data.uiItems.length&&this.attached}},{key:"setUiItems",value:function(X){this.detach(),this.data.uiItems=X,this._setupRange(),this.attach()}},{key:"isVisible",value:function(X){var tt=this.data.end?this.data.end-this.data.start:0,rt=this.width*X.getMillisecondsPerPixel(),ot=Math.max(this.data.start.getTime()+tt,this.data.start.getTime()+rt);return this.data.startX.start&&this.hasItems()}},{key:"getData",value:function(){return{isCluster:!0,id:this.id,items:this.data.items||[],data:this.data}}},{key:"redraw",value:function(X){var tt,rt,ot,ut,yn,uo,po,mo=[_bindInstanceProperty(tt=this._createDomElement).call(tt,this),_bindInstanceProperty(rt=this._appendDomElement).call(rt,this),_bindInstanceProperty(ot=this._updateDirtyDomComponents).call(ot,this),_bindInstanceProperty(ut=function(){this.dirty&&(po=this._getDomComponentsSizes())}).call(ut,this),_bindInstanceProperty(yn=function(){if(this.dirty){var yf;_bindInstanceProperty(yf=this._updateDomComponentsSizes).call(yf,this)(po)}}).call(yn,this),_bindInstanceProperty(uo=this._repaintDomAdditionals).call(uo,this)];if(X)return mo;var wo;return _forEachInstanceProperty(mo).call(mo,function(lf){wo=lf()}),wo}},{key:"show",value:function(){this.displayed||this.redraw()}},{key:"hide",value:function(){if(this.displayed){var X=this.dom;X.box.parentNode&&X.box.parentNode.removeChild(X.box),this.options.showStipes&&(X.line.parentNode&&X.line.parentNode.removeChild(X.line),X.dot.parentNode&&X.dot.parentNode.removeChild(X.dot)),this.displayed=!1}}},{key:"repositionX",value:function(){var X=this.conversion.toScreen(this.data.start),tt=this.data.end?this.conversion.toScreen(this.data.end):0;if(tt)this.repositionXWithRanges(X,tt);else{var rt=this.data.align===void 0?this.options.align:this.data.align;this.repositionXWithoutRanges(X,rt)}this.options.showStipes&&(this.dom.line.style.display=this._isStipeVisible()?"block":"none",this.dom.dot.style.display=this._isStipeVisible()?"block":"none",this._isStipeVisible()&&this.repositionStype(X,tt))}},{key:"repositionStype",value:function(X,tt){this.dom.line.style.display="block",this.dom.dot.style.display="block";var rt=this.dom.line.offsetWidth,ot=this.dom.dot.offsetWidth;if(tt){var ut=rt+X+(tt-X)/2,yn=ut-ot/2,uo=this.options.rtl?ut*-1:ut,po=this.options.rtl?yn*-1:yn;this.dom.line.style.transform="translateX(".concat(uo,"px)"),this.dom.dot.style.transform="translateX(".concat(po,"px)")}else{var mo=this.options.rtl?X*-1:X,wo=this.options.rtl?(X-ot/2)*-1:X-ot/2;this.dom.line.style.transform="translateX(".concat(mo,"px)"),this.dom.dot.style.transform="translateX(".concat(wo,"px)")}}},{key:"repositionXWithoutRanges",value:function(X,tt){tt=="right"?this.options.rtl?(this.right=X-this.width,this.dom.box.style.right=this.right+"px"):(this.left=X-this.width,this.dom.box.style.left=this.left+"px"):tt=="left"?this.options.rtl?(this.right=X,this.dom.box.style.right=this.right+"px"):(this.left=X,this.dom.box.style.left=this.left+"px"):this.options.rtl?(this.right=X-this.width/2,this.dom.box.style.right=this.right+"px"):(this.left=X-this.width/2,this.dom.box.style.left=this.left+"px")}},{key:"repositionXWithRanges",value:function(X,tt){var rt=Math.round(Math.max(tt-X+.5,1));this.options.rtl?this.right=X:this.left=X,this.width=Math.max(rt,this.minWidth||0),this.options.rtl?this.dom.box.style.right=this.right+"px":this.dom.box.style.left=this.left+"px",this.dom.box.style.width=rt+"px"}},{key:"repositionY",value:function(){var X=this.options.orientation.item,tt=this.dom.box;if(X=="top"?tt.style.top=(this.top||0)+"px":tt.style.top=(this.parent.height-this.top-this.height||0)+"px",this.options.showStipes){if(X=="top")this.dom.line.style.top="0",this.dom.line.style.height=this.parent.top+this.top+1+"px",this.dom.line.style.bottom="";else{var rt=this.parent.itemSet.props.height,ot=rt-this.parent.top-this.parent.height+this.top;this.dom.line.style.top=rt-ot+"px",this.dom.line.style.bottom="0"}this.dom.dot.style.top=-this.dom.dot.offsetHeight/2+"px"}}},{key:"getWidthLeft",value:function(){return this.width/2}},{key:"getWidthRight",value:function(){return this.width/2}},{key:"move",value:function(){this.repositionX(),this.repositionY()}},{key:"attach",value:function(){var X,tt=_createForOfIteratorHelper$3(this.data.uiItems),rt;try{for(tt.s();!(rt=tt.n()).done;){var ot=rt.value;ot.cluster=this}}catch(ut){tt.e(ut)}finally{tt.f()}this.data.items=_mapInstanceProperty(X=this.data.uiItems).call(X,function(ut){return ut.data}),this.attached=!0,this.dirty=!0}},{key:"detach",value:function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.hasItems()){var tt=_createForOfIteratorHelper$3(this.data.uiItems),rt;try{for(tt.s();!(rt=tt.n()).done;){var ot=rt.value;delete ot.cluster}}catch(ut){tt.e(ut)}finally{tt.f()}this.attached=!1,X&&this.group&&(this.group.remove(this),this.group=null),this.data.items=[],this.dirty=!0}}},{key:"_onDoubleClick",value:function(){this._fit()}},{key:"_setupRange",value:function(){var X,tt,rt,ot=_mapInstanceProperty(X=this.data.uiItems).call(X,function(uo){return{start:uo.data.start.valueOf(),end:uo.data.end?uo.data.end.valueOf():uo.data.start.valueOf()}});this.data.min=Math.min.apply(Math,_toConsumableArray(_mapInstanceProperty(ot).call(ot,function(uo){return Math.min(uo.start,uo.end||uo.start)}))),this.data.max=Math.max.apply(Math,_toConsumableArray(_mapInstanceProperty(ot).call(ot,function(uo){return Math.max(uo.start,uo.end||uo.start)})));var ut=_mapInstanceProperty(tt=this.data.uiItems).call(tt,function(uo){return uo.center}),yn=_reduceInstanceProperty(ut).call(ut,function(uo,po){return uo+po},0)/this.data.uiItems.length;_someInstanceProperty(rt=this.data.uiItems).call(rt,function(uo){return uo.data.end})?(this.data.start=new Date(this.data.min),this.data.end=new Date(this.data.max)):(this.data.start=new Date(yn),this.data.end=null)}},{key:"_getUiItems",value:function(){var X=this;if(this.data.uiItems&&this.data.uiItems.length){var tt;return _filterInstanceProperty(tt=this.data.uiItems).call(tt,function(rt){return rt.cluster===X})}return[]}},{key:"_createDomElement",value:function(){if(!this.dom){if(this.dom={},this.dom.box=document.createElement("DIV"),this.dom.content=document.createElement("DIV"),this.dom.content.className="vis-item-content",this.dom.box.appendChild(this.dom.content),this.options.showStipes&&(this.dom.line=document.createElement("DIV"),this.dom.line.className="vis-cluster-line",this.dom.line.style.display="none",this.dom.dot=document.createElement("DIV"),this.dom.dot.className="vis-cluster-dot",this.dom.dot.style.display="none"),this.options.fitOnDoubleClick){var X;this.dom.box.ondblclick=_bindInstanceProperty(X=q.prototype._onDoubleClick).call(X,this)}this.dom.box["vis-item"]=this,this.dirty=!0}}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var X=this.parent.dom.foreground;if(!X)throw new Error("Cannot redraw item: parent has no foreground container element");X.appendChild(this.dom.box)}var tt=this.parent.dom.background;if(this.options.showStipes){if(!this.dom.line.parentNode){if(!tt)throw new Error("Cannot redraw item: parent has no background container element");tt.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var rt=this.parent.dom.axis;if(!tt)throw new Error("Cannot redraw item: parent has no axis container element");rt.appendChild(this.dom.dot)}}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var X=this.baseClassName+" "+(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+" vis-readonly";this.dom.box.className="vis-item "+X,this.options.showStipes&&(this.dom.line.className="vis-item vis-cluster-line "+(this.selected?" vis-selected":""),this.dom.dot.className="vis-item vis-cluster-dot "+(this.selected?" vis-selected":"")),this.data.end&&(this.dom.content.style.maxWidth="none")}}},{key:"_getDomComponentsSizes",value:function(){var X={previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}};return this.options.showStipes&&(X.dot={height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},X.line={width:this.dom.line.offsetWidth}),X}},{key:"_updateDomComponentsSizes",value:function(X){this.options.rtl?this.dom.box.style.right="0px":this.dom.box.style.left="0px",this.data.end?this.minWidth=X.box.width:this.width=X.box.width,this.height=X.box.height,this.options.rtl?this.dom.box.style.right=X.previous.right:this.dom.box.style.left=X.previous.left,this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){this._repaintOnItemUpdateTimeTooltip(this.dom.box)}},{key:"_isStipeVisible",value:function(){return this.minWidth>=this.width||!this.data.end}},{key:"_getFitRange",value:function(){var X=.05*(this.data.max-this.data.min)/2;return{fitStart:this.data.min-X,fitEnd:this.data.max+X}}},{key:"_fit",value:function(){if(this.emitter){var X=this._getFitRange(),tt=X.fitStart,rt=X.fitEnd,ot={start:new Date(tt),end:new Date(rt),animation:!0};this.emitter.emit("fit",ot)}}},{key:"_getItemData",value:function(){return this.data}}]),q}(Item);ClusterItem.prototype.baseClassName="vis-item vis-range vis-cluster";function _createForOfIteratorHelper$2(F,W){var q=typeof _Symbol<"u"&&_getIteratorMethod(F)||F["@@iterator"];if(!q){if(_Array$isArray$1(F)||(q=_unsupportedIterableToArray$2(F))||W&&F&&typeof F.length=="number"){q&&(F=q);var K=0,X=function(){};return{s:X,n:function(){return K>=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$2(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$2(F,W);var K=_sliceInstanceProperty(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$2(F,W)}}function _arrayLikeToArray$2(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q0){if(K>=1)return[];ut=Math.abs(Math.round(Math.log(100/K)/Math.log(yn))),uo=Math.abs(Math.pow(yn,ut))}if(this.dataChanged){var po=ut!=this.cacheLevel,mo=this.applyOnChangedLevel?po:!0;mo&&(this._dropLevelsCache(),this._filterData())}this.cacheLevel=ut;var wo=this.cache[ut];if(!wo){wo=[];for(var lf in this.groups)if(this.groups.hasOwnProperty(lf))for(var yf=this.groups[lf],cf=yf.length,vf=0;vf=0&&_f.center-yf[wf].center=0&&_f.center-wo[Cf].centerrt){for(var Af=$f-rt+1,Bf=[],Hf=vf;Bf.length'+q.length+"",cf=_Object$assign({},tt,this.itemSet.options),vf={content:yf,title:lf,group:K,uiItems:q,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return ut=this.createClusterItem(vf,wo,cf),K&&(K.add(ut),ut.group=K),ut.attach(),ut}},{key:"_dropLevelsCache",value:function(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}}]),F}();function _createForOfIteratorHelper$1(F,W){var q=typeof _Symbol<"u"&&_getIteratorMethod(F)||F["@@iterator"];if(!q){if(_Array$isArray$1(F)||(q=_unsupportedIterableToArray$1(F))||W&&F&&typeof F.length=="number"){q&&(F=q);var K=0,X=function(){};return{s:X,n:function(){return K>=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$1(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$1(F,W);var K=_sliceInstanceProperty(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$1(F,W)}}function _arrayLikeToArray$1(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var UNGROUPED$1="__ungrouped__",BACKGROUND="__background__",ItemSet=function(F){_inherits(q,F);var W=_createSuper$2(q);function q(K,X){var tt;_classCallCheck(this,q),tt=W.call(this),tt.body=K,tt.defaultOptions={type:null,orientation:{item:"bottom"},align:"auto",stack:!0,stackSubgroups:!0,groupOrderSwap:function(ut,yn,uo){var po=yn.order;yn.order=ut.order,ut.order=po},groupOrder:"order",selectable:!0,multiselect:!1,longSelectPressTime:251,itemsAlwaysDraggable:{item:!1,range:!1},editable:{updateTime:!1,updateGroup:!1,add:!1,remove:!1,overrideItems:!1},groupEditable:{order:!1,add:!1,remove:!1},snap:TimeStep.snap,onDropObjectOnItem:function(ut,yn,uo){uo(yn)},onAdd:function(ut,yn){yn(ut)},onUpdate:function(ut,yn){yn(ut)},onMove:function(ut,yn){yn(ut)},onRemove:function(ut,yn){yn(ut)},onMoving:function(ut,yn){yn(ut)},onAddGroup:function(ut,yn){yn(ut)},onMoveGroup:function(ut,yn){yn(ut)},onRemoveGroup:function(ut,yn){yn(ut)},margin:{item:{horizontal:10,vertical:10},axis:20},showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:500},tooltipOnItemUpdateTime:!1},tt.options=availableUtils.extend({},tt.defaultOptions),tt.options.rtl=X.rtl,tt.options.onTimeout=X.onTimeout,tt.conversion={toScreen:K.util.toScreen,toTime:K.util.toTime},tt.dom={},tt.props={},tt.hammer=null;var rt=_assertThisInitialized$1(tt);return tt.itemsData=null,tt.groupsData=null,tt.itemsSettingTime=null,tt.initialItemSetDrawn=!1,tt.userContinueNotBail=null,tt.sequentialSelection=!1,tt.itemListeners={add:function(ut,yn,uo){rt._onAdd(yn.items),rt.options.cluster&&rt.clusterGenerator.setItems(rt.items,{applyOnChangedLevel:!1}),rt.redraw()},update:function(ut,yn,uo){rt._onUpdate(yn.items),rt.options.cluster&&rt.clusterGenerator.setItems(rt.items,{applyOnChangedLevel:!1}),rt.redraw()},remove:function(ut,yn,uo){rt._onRemove(yn.items),rt.options.cluster&&rt.clusterGenerator.setItems(rt.items,{applyOnChangedLevel:!1}),rt.redraw()}},tt.groupListeners={add:function(ut,yn,uo){if(rt._onAddGroups(yn.items),rt.groupsData&&rt.groupsData.length>0){var po,mo=rt.groupsData.getDataSet();_forEachInstanceProperty(po=mo.get()).call(po,function(wo){if(wo.nestedGroups){var lf;wo.showNested!=!1&&(wo.showNested=!0);var yf=[];_forEachInstanceProperty(lf=wo.nestedGroups).call(lf,function(cf){var vf=mo.get(cf);vf&&(vf.nestedInGroup=wo.id,wo.showNested==!1&&(vf.visible=!1),yf=_concatInstanceProperty(yf).call(yf,vf))}),mo.update(yf,uo)}})}},update:function(ut,yn,uo){rt._onUpdateGroups(yn.items)},remove:function(ut,yn,uo){rt._onRemoveGroups(yn.items)}},tt.items={},tt.groups={},tt.groupIds=[],tt.selection=[],tt.popup=null,tt.popupTimer=null,tt.touchParams={},tt.groupTouchParams={group:null,isDragging:!1},tt._create(),tt.setOptions(X),tt.clusters=[],tt}return _createClass(q,[{key:"_create",value:function(){var X=this,tt,rt,ot,ut,yn,uo,po,mo,wo,lf,yf,cf,vf,_f,$f,wf=document.createElement("div");wf.className="vis-itemset",wf["vis-itemset"]=this,this.dom.frame=wf;var Pf=document.createElement("div");Pf.className="vis-background",wf.appendChild(Pf),this.dom.background=Pf;var Cf=document.createElement("div");Cf.className="vis-foreground",wf.appendChild(Cf),this.dom.foreground=Cf;var Af=document.createElement("div");Af.className="vis-axis",this.dom.axis=Af;var Bf=document.createElement("div");Bf.className="vis-labelset",this.dom.labelSet=Bf,this._updateUngrouped();var Hf=new BackgroundGroup(BACKGROUND,null,this);Hf.show(),this.groups[BACKGROUND]=Hf,this.hammer=new Hammer(this.body.dom.centerContainer),this.hammer.on("hammer.input",function(Df){Df.isFirst&&X._onTouch(Df)}),this.hammer.on("panstart",_bindInstanceProperty(tt=this._onDragStart).call(tt,this)),this.hammer.on("panmove",_bindInstanceProperty(rt=this._onDrag).call(rt,this)),this.hammer.on("panend",_bindInstanceProperty(ot=this._onDragEnd).call(ot,this)),this.hammer.get("pan").set({threshold:5,direction:Hammer.ALL}),this.hammer.get("press").set({time:1e4}),this.hammer.on("tap",_bindInstanceProperty(ut=this._onSelectItem).call(ut,this)),this.hammer.on("press",_bindInstanceProperty(yn=this._onMultiSelectItem).call(yn,this)),this.hammer.get("press").set({time:1e4}),this.hammer.on("doubletap",_bindInstanceProperty(uo=this._onAddItem).call(uo,this)),this.options.rtl?this.groupHammer=new Hammer(this.body.dom.rightContainer):this.groupHammer=new Hammer(this.body.dom.leftContainer),this.groupHammer.on("tap",_bindInstanceProperty(po=this._onGroupClick).call(po,this)),this.groupHammer.on("panstart",_bindInstanceProperty(mo=this._onGroupDragStart).call(mo,this)),this.groupHammer.on("panmove",_bindInstanceProperty(wo=this._onGroupDrag).call(wo,this)),this.groupHammer.on("panend",_bindInstanceProperty(lf=this._onGroupDragEnd).call(lf,this)),this.groupHammer.get("pan").set({threshold:5,direction:Hammer.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",_bindInstanceProperty(yf=this._onMouseOver).call(yf,this)),this.body.dom.centerContainer.addEventListener("mouseout",_bindInstanceProperty(cf=this._onMouseOut).call(cf,this)),this.body.dom.centerContainer.addEventListener("mousemove",_bindInstanceProperty(vf=this._onMouseMove).call(vf,this)),this.body.dom.centerContainer.addEventListener("contextmenu",_bindInstanceProperty(_f=this._onDragEnd).call(_f,this)),this.body.dom.centerContainer.addEventListener("mousewheel",_bindInstanceProperty($f=this._onMouseWheel).call($f,this)),this.show()}},{key:"setOptions",value:function(X){var tt=this;if(X){var rt,ot,ut=["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","sequentialSelection","multiselectPerGroup","longSelectPressTime","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","showTooltips","tooltip","tooltipOnItemUpdateTime","groupHeightMode","onTimeout"];availableUtils.selectiveExtend(ut,this.options,X),"itemsAlwaysDraggable"in X&&(typeof X.itemsAlwaysDraggable=="boolean"?(this.options.itemsAlwaysDraggable.item=X.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):_typeof(X.itemsAlwaysDraggable)==="object"&&(availableUtils.selectiveExtend(["item","range"],this.options.itemsAlwaysDraggable,X.itemsAlwaysDraggable),this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1))),"sequentialSelection"in X&&typeof X.sequentialSelection=="boolean"&&(this.options.sequentialSelection=X.sequentialSelection),"orientation"in X&&(typeof X.orientation=="string"?this.options.orientation.item=X.orientation==="top"?"top":"bottom":_typeof(X.orientation)==="object"&&"item"in X.orientation&&(this.options.orientation.item=X.orientation.item)),"margin"in X&&(typeof X.margin=="number"?(this.options.margin.axis=X.margin,this.options.margin.item.horizontal=X.margin,this.options.margin.item.vertical=X.margin):_typeof(X.margin)==="object"&&(availableUtils.selectiveExtend(["axis"],this.options.margin,X.margin),"item"in X.margin&&(typeof X.margin.item=="number"?(this.options.margin.item.horizontal=X.margin.item,this.options.margin.item.vertical=X.margin.item):_typeof(X.margin.item)==="object"&&availableUtils.selectiveExtend(["horizontal","vertical"],this.options.margin.item,X.margin.item)))),_forEachInstanceProperty(rt=["locale","locales"]).call(rt,function(uo){uo in X&&(tt.options[uo]=X[uo])}),"editable"in X&&(typeof X.editable=="boolean"?(this.options.editable.updateTime=X.editable,this.options.editable.updateGroup=X.editable,this.options.editable.add=X.editable,this.options.editable.remove=X.editable,this.options.editable.overrideItems=!1):_typeof(X.editable)==="object"&&availableUtils.selectiveExtend(["updateTime","updateGroup","add","remove","overrideItems"],this.options.editable,X.editable)),"groupEditable"in X&&(typeof X.groupEditable=="boolean"?(this.options.groupEditable.order=X.groupEditable,this.options.groupEditable.add=X.groupEditable,this.options.groupEditable.remove=X.groupEditable):_typeof(X.groupEditable)==="object"&&availableUtils.selectiveExtend(["order","add","remove"],this.options.groupEditable,X.groupEditable));var yn=function(po){var mo=X[po];if(mo){if(typeof mo!="function"){var wo;throw new Error(_concatInstanceProperty(wo="option ".concat(po," must be a function ")).call(wo,po,"(item, callback)"))}tt.options[po]=mo}};_forEachInstanceProperty(ot=["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"]).call(ot,yn),X.cluster?(_Object$assign(this.options,{cluster:X.cluster}),this.clusterGenerator||(this.clusterGenerator=new ClusterGenerator(this)),this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.clusterGenerator?(this._detachAllClusters(),this.clusters=[],this.clusterGenerator=null,this.options.cluster=void 0,this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.markDirty()}}},{key:"markDirty",value:function(X){this.groupIds=[],X&&(X.refreshItems&&_forEachInstanceProperty(availableUtils).call(availableUtils,this.items,function(tt){tt.dirty=!0,tt.displayed&&tt.redraw()}),X.restackGroups&&_forEachInstanceProperty(availableUtils).call(availableUtils,this.groups,function(tt,rt){rt!==BACKGROUND&&(tt.stackDirty=!0)}))}},{key:"destroy",value:function(){this.clearPopupTimer(),this.hide(),this.setItems(null),this.setGroups(null),this.hammer&&this.hammer.destroy(),this.groupHammer&&this.groupHammer.destroy(),this.hammer=null,this.body=null,this.conversion=null}},{key:"hide",value:function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis),this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)}},{key:"show",value:function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame),this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis),this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right.appendChild(this.dom.labelSet):this.body.dom.left.appendChild(this.dom.labelSet))}},{key:"setPopupTimer",value:function(X){if(this.clearPopupTimer(),X){var tt=this.options.tooltip.delay||typeof this.options.tooltip.delay=="number"?this.options.tooltip.delay:500;this.popupTimer=_setTimeout(function(){X.show()},tt)}}},{key:"clearPopupTimer",value:function(){this.popupTimer!=null&&(clearTimeout(this.popupTimer),this.popupTimer=null)}},{key:"setSelection",value:function(X){var tt;X==null&&(X=[]),_Array$isArray$1(X)||(X=[X]);var rt=_filterInstanceProperty(tt=this.selection).call(tt,function(yf){return _indexOfInstanceProperty(X).call(X,yf)===-1}),ot=_createForOfIteratorHelper$1(rt),ut;try{for(ot.s();!(ut=ot.n()).done;){var yn=ut.value,uo=this.getItemById(yn);uo&&uo.unselect()}}catch(yf){ot.e(yf)}finally{ot.f()}this.selection=_toConsumableArray(X);var po=_createForOfIteratorHelper$1(X),mo;try{for(po.s();!(mo=po.n()).done;){var wo=mo.value,lf=this.getItemById(wo);lf&&lf.select()}}catch(yf){po.e(yf)}finally{po.f()}}},{key:"getSelection",value:function(){var X;return _concatInstanceProperty(X=this.selection).call(X,[])}},{key:"getVisibleItems",value:function(){var X=this.body.range.getRange(),tt,rt;this.options.rtl?(tt=this.body.util.toScreen(X.start),rt=this.body.util.toScreen(X.end)):(rt=this.body.util.toScreen(X.start),tt=this.body.util.toScreen(X.end));var ot=[];for(var ut in this.groups)if(this.groups.hasOwnProperty(ut)){var yn=this.groups[ut],uo=yn.isVisible?yn.visibleItems:[],po=_createForOfIteratorHelper$1(uo),mo;try{for(po.s();!(mo=po.n()).done;){var wo=mo.value;this.options.rtl?wo.righttt&&ot.push(wo.id):wo.leftrt&&ot.push(wo.id)}}catch(lf){po.e(lf)}finally{po.f()}}return ot}},{key:"getItemsAtCurrentTime",value:function(X){var tt,rt;this.options.rtl?(tt=this.body.util.toScreen(X),rt=this.body.util.toScreen(X)):(rt=this.body.util.toScreen(X),tt=this.body.util.toScreen(X));var ot=[];for(var ut in this.groups)if(this.groups.hasOwnProperty(ut)){var yn=this.groups[ut],uo=yn.isVisible?yn.visibleItems:[],po=_createForOfIteratorHelper$1(uo),mo;try{for(po.s();!(mo=po.n()).done;){var wo=mo.value;this.options.rtl?wo.righttt&&ot.push(wo.id):wo.leftrt&&ot.push(wo.id)}}catch(lf){po.e(lf)}finally{po.f()}}return ot}},{key:"getVisibleGroups",value:function(){var X=[];for(var tt in this.groups)if(this.groups.hasOwnProperty(tt)){var rt=this.groups[tt];rt.isVisible&&X.push(tt)}return X}},{key:"getItemById",value:function(X){var tt;return this.items[X]||_findInstanceProperty(tt=this.clusters).call(tt,function(rt){return rt.id===X})}},{key:"_deselect",value:function(X){for(var tt=this.selection,rt=0,ot=tt.length;rt0;if(Bf){for(var Hf={},Df=function(Nf){_forEachInstanceProperty(availableUtils).call(availableUtils,Cf,function(Yf,Gf){Hf[Gf]=Yf[Nf]()})},Lf=0;Lf1&&arguments[1]!==void 0?arguments[1]:void 0;if(!(!X||!X.nestedGroups)){var rt=this.groupsData.getDataSet();tt!=null?X.showNested=!!tt:X.showNested=!X.showNested;var ot=rt.get(X.groupId);ot.showNested=X.showNested;for(var ut=X.nestedGroups,yn=ut;yn.length>0;){var uo=yn;yn=[];for(var po=0;po0&&(ut=_concatInstanceProperty(ut).call(ut,yn))}var wo;if(ot.showNested){for(var lf=rt.get(ot.nestedGroups),yf=0;yf0&&(cf.showNested==null||cf.showNested==!0)&&lf.push.apply(lf,_toConsumableArray(rt.get(cf.nestedGroups)))}wo=_mapInstanceProperty(lf).call(lf,function(_f){return _f.visible==null&&(_f.visible=!0),_f.visible=!!ot.showNested,_f})}else{var vf;wo=_mapInstanceProperty(vf=rt.get(ut)).call(vf,function(_f){return _f.visible==null&&(_f.visible=!0),_f.visible=!!ot.showNested,_f})}rt.update(_concatInstanceProperty(wo).call(wo,ot)),ot.showNested?(availableUtils.removeClassName(X.dom.label,"collapsed"),availableUtils.addClassName(X.dom.label,"expanded")):(availableUtils.removeClassName(X.dom.label,"expanded"),availableUtils.addClassName(X.dom.label,"collapsed"))}}},{key:"toggleGroupDragClassName",value:function(X){X.dom.label.classList.toggle("vis-group-is-dragging"),X.dom.foreground.classList.toggle("vis-group-is-dragging")}},{key:"_onGroupDragStart",value:function(X){this.groupTouchParams.isDragging||this.options.groupEditable.order&&(this.groupTouchParams.group=this.groupFromTarget(X),this.groupTouchParams.group&&(X.stopPropagation(),this.groupTouchParams.isDragging=!0,this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.originalOrder=this.groupsData.getIds({order:this.options.groupOrder})))}},{key:"_onGroupDrag",value:function(X){if(this.options.groupEditable.order&&this.groupTouchParams.group){X.stopPropagation();var tt=this.groupsData.getDataSet(),rt=this.groupFromTarget(X);if(rt&&rt.height!=this.groupTouchParams.group.height){var ot=rt.toput)return}}if(rt&&rt!=this.groupTouchParams.group){var mo=tt.get(rt.groupId),wo=tt.get(this.groupTouchParams.group.groupId);wo&&mo&&(this.options.groupOrderSwap(wo,mo,tt),tt.update(wo),tt.update(mo));var lf=tt.getIds({order:this.options.groupOrder});if(!availableUtils.equalArray(lf,this.groupTouchParams.originalOrder))for(var yf=this.groupTouchParams.originalOrder,cf=this.groupTouchParams.group.groupId,vf=Math.min(yf.length,lf.length),_f=0,$f=0,wf=0;_f=vf)break;if(lf[_f+$f]==cf)$f=1;else if(yf[_f+wf]==cf)wf=1;else{var Pf=_indexOfInstanceProperty(lf).call(lf,yf[_f+wf]),Cf=tt.get(lf[_f+$f]),Af=tt.get(yf[_f+wf]);this.options.groupOrderSwap(Cf,Af,tt),tt.update(Cf),tt.update(Af);var Bf=lf[_f+$f];lf[_f+$f]=yf[_f+wf],lf[Pf]=Bf,_f++}}}}}},{key:"_onGroupDragEnd",value:function(X){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){X.stopPropagation();var tt=this,rt=tt.groupTouchParams.group.groupId,ot=tt.groupsData.getDataSet(),ut=availableUtils.extend({},ot.get(rt));tt.options.onMoveGroup(ut,function(yn){if(yn)yn[ot._idProp]=rt,ot.update(yn);else{var uo=ot.getIds({order:tt.options.groupOrder});if(!availableUtils.equalArray(uo,tt.groupTouchParams.originalOrder))for(var po=tt.groupTouchParams.originalOrder,mo=Math.min(po.length,uo.length),wo=0;wo=mo)break;var lf=_indexOfInstanceProperty(uo).call(uo,po[wo]),yf=ot.get(uo[wo]),cf=ot.get(po[wo]);tt.options.groupOrderSwap(yf,cf,ot),ot.update(yf),ot.update(cf);var vf=uo[wo];uo[wo]=po[wo],uo[lf]=vf,wo++}}}),tt.body.emitter.emit("groupDragged",{groupId:rt}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}},{key:"_onSelectItem",value:function(X){if(this.options.selectable){var tt=X.srcEvent&&(X.srcEvent.ctrlKey||X.srcEvent.metaKey),rt=X.srcEvent&&X.srcEvent.shiftKey;if(tt||rt){this._onMultiSelectItem(X);return}var ot=this.getSelection(),ut=this.itemFromTarget(X),yn=ut&&ut.selectable?[ut.id]:[];this.setSelection(yn);var uo=this.getSelection();(uo.length>0||ot.length>0)&&this.body.emitter.emit("select",{items:uo,event:X})}}},{key:"_onMouseOver",value:function(X){var tt=this.itemFromTarget(X);if(tt){var rt=this.itemFromRelatedTarget(X);if(tt!==rt){var ot=tt.getTitle();if(this.options.showTooltips&&ot){this.popup==null&&(this.popup=new Popup(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(ot);var ut=this.body.dom.centerContainer,yn=ut.getBoundingClientRect();this.popup.setPosition(X.clientX-yn.left+ut.offsetLeft,X.clientY-yn.top+ut.offsetTop),this.setPopupTimer(this.popup)}else this.clearPopupTimer(),this.popup!=null&&this.popup.hide();this.body.emitter.emit("itemover",{item:tt.id,event:X})}}}},{key:"_onMouseOut",value:function(X){var tt=this.itemFromTarget(X);if(tt){var rt=this.itemFromRelatedTarget(X);tt!==rt&&(this.clearPopupTimer(),this.popup!=null&&this.popup.hide(),this.body.emitter.emit("itemout",{item:tt.id,event:X}))}}},{key:"_onMouseMove",value:function(X){var tt=this.itemFromTarget(X);if(tt&&(this.popupTimer!=null&&this.setPopupTimer(this.popup),this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden)){var rt=this.body.dom.centerContainer,ot=rt.getBoundingClientRect();this.popup.setPosition(X.clientX-ot.left+rt.offsetLeft,X.clientY-ot.top+rt.offsetTop),this.popup.show()}}},{key:"_onMouseWheel",value:function(X){this.touchParams.itemIsDragging&&this._onDragEnd(X)}},{key:"_onUpdateItem",value:function(X){if(this.options.selectable&&!(!this.options.editable.updateTime&&!this.options.editable.updateGroup)){var tt=this;if(X){var rt=tt.itemsData.get(X.id);this.options.onUpdate(rt,function(ot){ot&&tt.itemsData.update(ot)})}}}},{key:"_onDropObjectOnItem",value:function(X){var tt=this.itemFromTarget(X),rt=JSON.parse(X.dataTransfer.getData("text"));this.options.onDropObjectOnItem(rt,tt)}},{key:"_onAddItem",value:function(X){if(this.options.selectable&&this.options.editable.add){var tt=this,rt=this.options.snap||null,ot=this.dom.frame.getBoundingClientRect(),ut=this.options.rtl?ot.right-X.center.x:X.center.x-ot.left,yn=this.body.util.toTime(ut),uo=this.body.util.getScale(),po=this.body.util.getStep(),mo,wo;X.type=="drop"?(wo=JSON.parse(X.dataTransfer.getData("text")),wo.content=wo.content?wo.content:"new item",wo.start=wo.start?wo.start:rt?rt(yn,uo,po):yn,wo.type=wo.type||"box",wo[this.itemsData.idProp]=wo.id||v4(),wo.type=="range"&&!wo.end&&(mo=this.body.util.toTime(ut+this.props.width/5),wo.end=rt?rt(mo,uo,po):mo)):(wo={start:rt?rt(yn,uo,po):yn,content:"new item"},wo[this.itemsData.idProp]=v4(),this.options.type==="range"&&(mo=this.body.util.toTime(ut+this.props.width/5),wo.end=rt?rt(mo,uo,po):mo));var lf=this.groupFromTarget(X);lf&&(wo.group=lf.groupId),wo=this._cloneItemData(wo),this.options.onAdd(wo,function(yf){yf&&(tt.itemsData.add(yf),X.type=="drop"&&tt.setSelection([yf.id]))})}}},{key:"_onMultiSelectItem",value:function(X){var tt=this;if(this.options.selectable){var rt=this.itemFromTarget(X);if(rt){var ot=this.options.multiselect?this.getSelection():[],ut=X.srcEvent&&X.srcEvent.shiftKey||!1;if((ut||this.options.sequentialSelection)&&this.options.multiselect){var yn=this.itemsData.get(rt.id).group,uo=void 0;this.options.multiselectPerGroup&&ot.length>0&&(uo=this.itemsData.get(ot[0]).group),(!this.options.multiselectPerGroup||uo==null||uo==yn)&&ot.push(rt.id);var po=q._getItemRange(this.itemsData.get(ot));if(!this.options.multiselectPerGroup||uo==yn){ot=[];for(var mo in this.items)if(this.items.hasOwnProperty(mo)){var wo=this.items[mo],lf=wo.data.start,yf=wo.data.end!==void 0?wo.data.end:lf;lf>=po.min&&yf<=po.max&&(!this.options.multiselectPerGroup||uo==this.itemsData.get(wo.id).group)&&!(wo instanceof BackgroundItem)&&ot.push(wo.id)}}}else{var cf=_indexOfInstanceProperty(ot).call(ot,rt.id);cf==-1?ot.push(rt.id):_spliceInstanceProperty(ot).call(ot,cf,1)}var vf=_filterInstanceProperty(ot).call(ot,function(_f){return tt.getItemById(_f).selectable});this.setSelection(vf),this.body.emitter.emit("select",{items:this.getSelection(),event:X})}}}},{key:"itemFromElement",value:function(X){for(var tt=X;tt;){if(tt.hasOwnProperty("vis-item"))return tt["vis-item"];tt=tt.parentNode}return null}},{key:"itemFromTarget",value:function(X){return this.itemFromElement(X.target)}},{key:"itemFromRelatedTarget",value:function(X){return this.itemFromElement(X.relatedTarget)}},{key:"groupFromTarget",value:function(X){var tt=X.center?X.center.y:X.clientY,rt=this.groupIds;rt.length<=0&&this.groupsData&&(rt=this.groupsData.getIds({order:this.options.groupOrder}));for(var ot=0;ot=po.top&&ttpo.top)return yn}else if(ot===0&&tttt)&&(tt=ot.end):(tt==null||ot.start>tt)&&(tt=ot.start)}),{min:rt,max:tt}}},{key:"itemSetFromTarget",value:function(X){for(var tt=X.target;tt;){if(tt.hasOwnProperty("vis-itemset"))return tt["vis-itemset"];tt=tt.parentNode}return null}}]),q}(Component);ItemSet.types={background:BackgroundItem,box:BoxItem,range:RangeItem,point:PointItem};ItemSet.prototype._onAdd=ItemSet.prototype._onUpdate;var errorFound=!1,allOptions$2,printStyle="background: #FFeeee; color: #dd0000",Validator=function(){function F(){_classCallCheck(this,F)}return _createClass(F,null,[{key:"validate",value:function(q,K,X){errorFound=!1,allOptions$2=K;var tt=K;return X!==void 0&&(tt=K[X]),F.parse(q,tt,[]),errorFound}},{key:"parse",value:function(q,K,X){for(var tt in q)q.hasOwnProperty(tt)&&F.check(tt,q,K,X)}},{key:"check",value:function(q,K,X,tt){if(X[q]===void 0&&X.__any__===void 0){F.getSuggestion(q,X,tt);return}var rt=q,ot=!0;X[q]===void 0&&X.__any__!==void 0&&(rt="__any__",ot=F.getType(K[q])==="object");var ut=X[rt];ot&&ut.__type__!==void 0&&(ut=ut.__type__),F.checkFields(q,K,X,rt,ut,tt)}},{key:"checkFields",value:function(q,K,X,tt,rt,ot){var ut=function(mo){console.log("%c"+mo+F.printLocation(ot,q),printStyle)},yn=F.getType(K[q]),uo=rt[yn];uo!==void 0?F.getType(uo)==="array"&&_indexOfInstanceProperty(uo).call(uo,K[q])===-1?(ut('Invalid option detected in "'+q+'". Allowed values are:'+F.print(uo)+' not "'+K[q]+'". '),errorFound=!0):yn==="object"&&tt!=="__any__"&&(ot=availableUtils.copyAndExtendArray(ot,q),F.parse(K[q],X[tt],ot)):rt.any===void 0&&(ut('Invalid type received for "'+q+'". Expected: '+F.print(_Object$keys(rt))+". Received ["+yn+'] "'+K[q]+'"'),errorFound=!0)}},{key:"getType",value:function(q){var K=_typeof(q);return K==="object"?q===null?"null":q instanceof Boolean?"boolean":q instanceof Number?"number":q instanceof String?"string":_Array$isArray$1(q)?"array":q instanceof Date?"date":q.nodeType!==void 0?"dom":q._isAMomentObject===!0?"moment":"object":K==="number"?"number":K==="boolean"?"boolean":K==="string"?"string":K===void 0?"undefined":K}},{key:"getSuggestion",value:function(q,K,X){var tt=F.findInOptions(q,K,X,!1),rt=F.findInOptions(q,allOptions$2,[],!0),ot=8,ut=4,yn;tt.indexMatch!==void 0?yn=" in "+F.printLocation(tt.path,q,"")+'Perhaps it was incomplete? Did you mean: "'+tt.indexMatch+`"? +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$2(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$2(F,W);var K=_sliceInstanceProperty(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$2(F,W)}}function _arrayLikeToArray$2(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q0){if(K>=1)return[];ut=Math.abs(Math.round(Math.log(100/K)/Math.log(yn))),uo=Math.abs(Math.pow(yn,ut))}if(this.dataChanged){var po=ut!=this.cacheLevel,mo=this.applyOnChangedLevel?po:!0;mo&&(this._dropLevelsCache(),this._filterData())}this.cacheLevel=ut;var wo=this.cache[ut];if(!wo){wo=[];for(var lf in this.groups)if(this.groups.hasOwnProperty(lf))for(var yf=this.groups[lf],cf=yf.length,vf=0;vf=0&&_f.center-yf[xf].center=0&&_f.center-wo[Cf].centerrt){for(var Pf=$f-rt+1,Bf=[],Hf=vf;Bf.length'+q.length+"",cf=_Object$assign({},tt,this.itemSet.options),vf={content:yf,title:lf,group:K,uiItems:q,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return ut=this.createClusterItem(vf,wo,cf),K&&(K.add(ut),ut.group=K),ut.attach(),ut}},{key:"_dropLevelsCache",value:function(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}}]),F}();function _createForOfIteratorHelper$1(F,W){var q=typeof _Symbol<"u"&&_getIteratorMethod(F)||F["@@iterator"];if(!q){if(_Array$isArray$1(F)||(q=_unsupportedIterableToArray$1(F))||W&&F&&typeof F.length=="number"){q&&(F=q);var K=0,X=function(){};return{s:X,n:function(){return K>=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray$1(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray$1(F,W);var K=_sliceInstanceProperty(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray$1(F,W)}}function _arrayLikeToArray$1(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var UNGROUPED$1="__ungrouped__",BACKGROUND="__background__",ItemSet=function(F){_inherits(q,F);var W=_createSuper$2(q);function q(K,X){var tt;_classCallCheck(this,q),tt=W.call(this),tt.body=K,tt.defaultOptions={type:null,orientation:{item:"bottom"},align:"auto",stack:!0,stackSubgroups:!0,groupOrderSwap:function(ut,yn,uo){var po=yn.order;yn.order=ut.order,ut.order=po},groupOrder:"order",selectable:!0,multiselect:!1,longSelectPressTime:251,itemsAlwaysDraggable:{item:!1,range:!1},editable:{updateTime:!1,updateGroup:!1,add:!1,remove:!1,overrideItems:!1},groupEditable:{order:!1,add:!1,remove:!1},snap:TimeStep.snap,onDropObjectOnItem:function(ut,yn,uo){uo(yn)},onAdd:function(ut,yn){yn(ut)},onUpdate:function(ut,yn){yn(ut)},onMove:function(ut,yn){yn(ut)},onRemove:function(ut,yn){yn(ut)},onMoving:function(ut,yn){yn(ut)},onAddGroup:function(ut,yn){yn(ut)},onMoveGroup:function(ut,yn){yn(ut)},onRemoveGroup:function(ut,yn){yn(ut)},margin:{item:{horizontal:10,vertical:10},axis:20},showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:500},tooltipOnItemUpdateTime:!1},tt.options=availableUtils.extend({},tt.defaultOptions),tt.options.rtl=X.rtl,tt.options.onTimeout=X.onTimeout,tt.conversion={toScreen:K.util.toScreen,toTime:K.util.toTime},tt.dom={},tt.props={},tt.hammer=null;var rt=_assertThisInitialized$1(tt);return tt.itemsData=null,tt.groupsData=null,tt.itemsSettingTime=null,tt.initialItemSetDrawn=!1,tt.userContinueNotBail=null,tt.sequentialSelection=!1,tt.itemListeners={add:function(ut,yn,uo){rt._onAdd(yn.items),rt.options.cluster&&rt.clusterGenerator.setItems(rt.items,{applyOnChangedLevel:!1}),rt.redraw()},update:function(ut,yn,uo){rt._onUpdate(yn.items),rt.options.cluster&&rt.clusterGenerator.setItems(rt.items,{applyOnChangedLevel:!1}),rt.redraw()},remove:function(ut,yn,uo){rt._onRemove(yn.items),rt.options.cluster&&rt.clusterGenerator.setItems(rt.items,{applyOnChangedLevel:!1}),rt.redraw()}},tt.groupListeners={add:function(ut,yn,uo){if(rt._onAddGroups(yn.items),rt.groupsData&&rt.groupsData.length>0){var po,mo=rt.groupsData.getDataSet();_forEachInstanceProperty(po=mo.get()).call(po,function(wo){if(wo.nestedGroups){var lf;wo.showNested!=!1&&(wo.showNested=!0);var yf=[];_forEachInstanceProperty(lf=wo.nestedGroups).call(lf,function(cf){var vf=mo.get(cf);vf&&(vf.nestedInGroup=wo.id,wo.showNested==!1&&(vf.visible=!1),yf=_concatInstanceProperty(yf).call(yf,vf))}),mo.update(yf,uo)}})}},update:function(ut,yn,uo){rt._onUpdateGroups(yn.items)},remove:function(ut,yn,uo){rt._onRemoveGroups(yn.items)}},tt.items={},tt.groups={},tt.groupIds=[],tt.selection=[],tt.popup=null,tt.popupTimer=null,tt.touchParams={},tt.groupTouchParams={group:null,isDragging:!1},tt._create(),tt.setOptions(X),tt.clusters=[],tt}return _createClass(q,[{key:"_create",value:function(){var X=this,tt,rt,ot,ut,yn,uo,po,mo,wo,lf,yf,cf,vf,_f,$f,xf=document.createElement("div");xf.className="vis-itemset",xf["vis-itemset"]=this,this.dom.frame=xf;var Af=document.createElement("div");Af.className="vis-background",xf.appendChild(Af),this.dom.background=Af;var Cf=document.createElement("div");Cf.className="vis-foreground",xf.appendChild(Cf),this.dom.foreground=Cf;var Pf=document.createElement("div");Pf.className="vis-axis",this.dom.axis=Pf;var Bf=document.createElement("div");Bf.className="vis-labelset",this.dom.labelSet=Bf,this._updateUngrouped();var Hf=new BackgroundGroup(BACKGROUND,null,this);Hf.show(),this.groups[BACKGROUND]=Hf,this.hammer=new Hammer(this.body.dom.centerContainer),this.hammer.on("hammer.input",function(Df){Df.isFirst&&X._onTouch(Df)}),this.hammer.on("panstart",_bindInstanceProperty(tt=this._onDragStart).call(tt,this)),this.hammer.on("panmove",_bindInstanceProperty(rt=this._onDrag).call(rt,this)),this.hammer.on("panend",_bindInstanceProperty(ot=this._onDragEnd).call(ot,this)),this.hammer.get("pan").set({threshold:5,direction:Hammer.ALL}),this.hammer.get("press").set({time:1e4}),this.hammer.on("tap",_bindInstanceProperty(ut=this._onSelectItem).call(ut,this)),this.hammer.on("press",_bindInstanceProperty(yn=this._onMultiSelectItem).call(yn,this)),this.hammer.get("press").set({time:1e4}),this.hammer.on("doubletap",_bindInstanceProperty(uo=this._onAddItem).call(uo,this)),this.options.rtl?this.groupHammer=new Hammer(this.body.dom.rightContainer):this.groupHammer=new Hammer(this.body.dom.leftContainer),this.groupHammer.on("tap",_bindInstanceProperty(po=this._onGroupClick).call(po,this)),this.groupHammer.on("panstart",_bindInstanceProperty(mo=this._onGroupDragStart).call(mo,this)),this.groupHammer.on("panmove",_bindInstanceProperty(wo=this._onGroupDrag).call(wo,this)),this.groupHammer.on("panend",_bindInstanceProperty(lf=this._onGroupDragEnd).call(lf,this)),this.groupHammer.get("pan").set({threshold:5,direction:Hammer.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",_bindInstanceProperty(yf=this._onMouseOver).call(yf,this)),this.body.dom.centerContainer.addEventListener("mouseout",_bindInstanceProperty(cf=this._onMouseOut).call(cf,this)),this.body.dom.centerContainer.addEventListener("mousemove",_bindInstanceProperty(vf=this._onMouseMove).call(vf,this)),this.body.dom.centerContainer.addEventListener("contextmenu",_bindInstanceProperty(_f=this._onDragEnd).call(_f,this)),this.body.dom.centerContainer.addEventListener("mousewheel",_bindInstanceProperty($f=this._onMouseWheel).call($f,this)),this.show()}},{key:"setOptions",value:function(X){var tt=this;if(X){var rt,ot,ut=["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","sequentialSelection","multiselectPerGroup","longSelectPressTime","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","showTooltips","tooltip","tooltipOnItemUpdateTime","groupHeightMode","onTimeout"];availableUtils.selectiveExtend(ut,this.options,X),"itemsAlwaysDraggable"in X&&(typeof X.itemsAlwaysDraggable=="boolean"?(this.options.itemsAlwaysDraggable.item=X.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):_typeof(X.itemsAlwaysDraggable)==="object"&&(availableUtils.selectiveExtend(["item","range"],this.options.itemsAlwaysDraggable,X.itemsAlwaysDraggable),this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1))),"sequentialSelection"in X&&typeof X.sequentialSelection=="boolean"&&(this.options.sequentialSelection=X.sequentialSelection),"orientation"in X&&(typeof X.orientation=="string"?this.options.orientation.item=X.orientation==="top"?"top":"bottom":_typeof(X.orientation)==="object"&&"item"in X.orientation&&(this.options.orientation.item=X.orientation.item)),"margin"in X&&(typeof X.margin=="number"?(this.options.margin.axis=X.margin,this.options.margin.item.horizontal=X.margin,this.options.margin.item.vertical=X.margin):_typeof(X.margin)==="object"&&(availableUtils.selectiveExtend(["axis"],this.options.margin,X.margin),"item"in X.margin&&(typeof X.margin.item=="number"?(this.options.margin.item.horizontal=X.margin.item,this.options.margin.item.vertical=X.margin.item):_typeof(X.margin.item)==="object"&&availableUtils.selectiveExtend(["horizontal","vertical"],this.options.margin.item,X.margin.item)))),_forEachInstanceProperty(rt=["locale","locales"]).call(rt,function(uo){uo in X&&(tt.options[uo]=X[uo])}),"editable"in X&&(typeof X.editable=="boolean"?(this.options.editable.updateTime=X.editable,this.options.editable.updateGroup=X.editable,this.options.editable.add=X.editable,this.options.editable.remove=X.editable,this.options.editable.overrideItems=!1):_typeof(X.editable)==="object"&&availableUtils.selectiveExtend(["updateTime","updateGroup","add","remove","overrideItems"],this.options.editable,X.editable)),"groupEditable"in X&&(typeof X.groupEditable=="boolean"?(this.options.groupEditable.order=X.groupEditable,this.options.groupEditable.add=X.groupEditable,this.options.groupEditable.remove=X.groupEditable):_typeof(X.groupEditable)==="object"&&availableUtils.selectiveExtend(["order","add","remove"],this.options.groupEditable,X.groupEditable));var yn=function(po){var mo=X[po];if(mo){if(typeof mo!="function"){var wo;throw new Error(_concatInstanceProperty(wo="option ".concat(po," must be a function ")).call(wo,po,"(item, callback)"))}tt.options[po]=mo}};_forEachInstanceProperty(ot=["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"]).call(ot,yn),X.cluster?(_Object$assign(this.options,{cluster:X.cluster}),this.clusterGenerator||(this.clusterGenerator=new ClusterGenerator(this)),this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.clusterGenerator?(this._detachAllClusters(),this.clusters=[],this.clusterGenerator=null,this.options.cluster=void 0,this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.markDirty()}}},{key:"markDirty",value:function(X){this.groupIds=[],X&&(X.refreshItems&&_forEachInstanceProperty(availableUtils).call(availableUtils,this.items,function(tt){tt.dirty=!0,tt.displayed&&tt.redraw()}),X.restackGroups&&_forEachInstanceProperty(availableUtils).call(availableUtils,this.groups,function(tt,rt){rt!==BACKGROUND&&(tt.stackDirty=!0)}))}},{key:"destroy",value:function(){this.clearPopupTimer(),this.hide(),this.setItems(null),this.setGroups(null),this.hammer&&this.hammer.destroy(),this.groupHammer&&this.groupHammer.destroy(),this.hammer=null,this.body=null,this.conversion=null}},{key:"hide",value:function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis),this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)}},{key:"show",value:function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame),this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis),this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right.appendChild(this.dom.labelSet):this.body.dom.left.appendChild(this.dom.labelSet))}},{key:"setPopupTimer",value:function(X){if(this.clearPopupTimer(),X){var tt=this.options.tooltip.delay||typeof this.options.tooltip.delay=="number"?this.options.tooltip.delay:500;this.popupTimer=_setTimeout(function(){X.show()},tt)}}},{key:"clearPopupTimer",value:function(){this.popupTimer!=null&&(clearTimeout(this.popupTimer),this.popupTimer=null)}},{key:"setSelection",value:function(X){var tt;X==null&&(X=[]),_Array$isArray$1(X)||(X=[X]);var rt=_filterInstanceProperty(tt=this.selection).call(tt,function(yf){return _indexOfInstanceProperty(X).call(X,yf)===-1}),ot=_createForOfIteratorHelper$1(rt),ut;try{for(ot.s();!(ut=ot.n()).done;){var yn=ut.value,uo=this.getItemById(yn);uo&&uo.unselect()}}catch(yf){ot.e(yf)}finally{ot.f()}this.selection=_toConsumableArray(X);var po=_createForOfIteratorHelper$1(X),mo;try{for(po.s();!(mo=po.n()).done;){var wo=mo.value,lf=this.getItemById(wo);lf&&lf.select()}}catch(yf){po.e(yf)}finally{po.f()}}},{key:"getSelection",value:function(){var X;return _concatInstanceProperty(X=this.selection).call(X,[])}},{key:"getVisibleItems",value:function(){var X=this.body.range.getRange(),tt,rt;this.options.rtl?(tt=this.body.util.toScreen(X.start),rt=this.body.util.toScreen(X.end)):(rt=this.body.util.toScreen(X.start),tt=this.body.util.toScreen(X.end));var ot=[];for(var ut in this.groups)if(this.groups.hasOwnProperty(ut)){var yn=this.groups[ut],uo=yn.isVisible?yn.visibleItems:[],po=_createForOfIteratorHelper$1(uo),mo;try{for(po.s();!(mo=po.n()).done;){var wo=mo.value;this.options.rtl?wo.righttt&&ot.push(wo.id):wo.leftrt&&ot.push(wo.id)}}catch(lf){po.e(lf)}finally{po.f()}}return ot}},{key:"getItemsAtCurrentTime",value:function(X){var tt,rt;this.options.rtl?(tt=this.body.util.toScreen(X),rt=this.body.util.toScreen(X)):(rt=this.body.util.toScreen(X),tt=this.body.util.toScreen(X));var ot=[];for(var ut in this.groups)if(this.groups.hasOwnProperty(ut)){var yn=this.groups[ut],uo=yn.isVisible?yn.visibleItems:[],po=_createForOfIteratorHelper$1(uo),mo;try{for(po.s();!(mo=po.n()).done;){var wo=mo.value;this.options.rtl?wo.righttt&&ot.push(wo.id):wo.leftrt&&ot.push(wo.id)}}catch(lf){po.e(lf)}finally{po.f()}}return ot}},{key:"getVisibleGroups",value:function(){var X=[];for(var tt in this.groups)if(this.groups.hasOwnProperty(tt)){var rt=this.groups[tt];rt.isVisible&&X.push(tt)}return X}},{key:"getItemById",value:function(X){var tt;return this.items[X]||_findInstanceProperty(tt=this.clusters).call(tt,function(rt){return rt.id===X})}},{key:"_deselect",value:function(X){for(var tt=this.selection,rt=0,ot=tt.length;rt0;if(Bf){for(var Hf={},Df=function(Nf){_forEachInstanceProperty(availableUtils).call(availableUtils,Cf,function(Yf,Gf){Hf[Gf]=Yf[Nf]()})},Lf=0;Lf1&&arguments[1]!==void 0?arguments[1]:void 0;if(!(!X||!X.nestedGroups)){var rt=this.groupsData.getDataSet();tt!=null?X.showNested=!!tt:X.showNested=!X.showNested;var ot=rt.get(X.groupId);ot.showNested=X.showNested;for(var ut=X.nestedGroups,yn=ut;yn.length>0;){var uo=yn;yn=[];for(var po=0;po0&&(ut=_concatInstanceProperty(ut).call(ut,yn))}var wo;if(ot.showNested){for(var lf=rt.get(ot.nestedGroups),yf=0;yf0&&(cf.showNested==null||cf.showNested==!0)&&lf.push.apply(lf,_toConsumableArray(rt.get(cf.nestedGroups)))}wo=_mapInstanceProperty(lf).call(lf,function(_f){return _f.visible==null&&(_f.visible=!0),_f.visible=!!ot.showNested,_f})}else{var vf;wo=_mapInstanceProperty(vf=rt.get(ut)).call(vf,function(_f){return _f.visible==null&&(_f.visible=!0),_f.visible=!!ot.showNested,_f})}rt.update(_concatInstanceProperty(wo).call(wo,ot)),ot.showNested?(availableUtils.removeClassName(X.dom.label,"collapsed"),availableUtils.addClassName(X.dom.label,"expanded")):(availableUtils.removeClassName(X.dom.label,"expanded"),availableUtils.addClassName(X.dom.label,"collapsed"))}}},{key:"toggleGroupDragClassName",value:function(X){X.dom.label.classList.toggle("vis-group-is-dragging"),X.dom.foreground.classList.toggle("vis-group-is-dragging")}},{key:"_onGroupDragStart",value:function(X){this.groupTouchParams.isDragging||this.options.groupEditable.order&&(this.groupTouchParams.group=this.groupFromTarget(X),this.groupTouchParams.group&&(X.stopPropagation(),this.groupTouchParams.isDragging=!0,this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.originalOrder=this.groupsData.getIds({order:this.options.groupOrder})))}},{key:"_onGroupDrag",value:function(X){if(this.options.groupEditable.order&&this.groupTouchParams.group){X.stopPropagation();var tt=this.groupsData.getDataSet(),rt=this.groupFromTarget(X);if(rt&&rt.height!=this.groupTouchParams.group.height){var ot=rt.toput)return}}if(rt&&rt!=this.groupTouchParams.group){var mo=tt.get(rt.groupId),wo=tt.get(this.groupTouchParams.group.groupId);wo&&mo&&(this.options.groupOrderSwap(wo,mo,tt),tt.update(wo),tt.update(mo));var lf=tt.getIds({order:this.options.groupOrder});if(!availableUtils.equalArray(lf,this.groupTouchParams.originalOrder))for(var yf=this.groupTouchParams.originalOrder,cf=this.groupTouchParams.group.groupId,vf=Math.min(yf.length,lf.length),_f=0,$f=0,xf=0;_f=vf)break;if(lf[_f+$f]==cf)$f=1;else if(yf[_f+xf]==cf)xf=1;else{var Af=_indexOfInstanceProperty(lf).call(lf,yf[_f+xf]),Cf=tt.get(lf[_f+$f]),Pf=tt.get(yf[_f+xf]);this.options.groupOrderSwap(Cf,Pf,tt),tt.update(Cf),tt.update(Pf);var Bf=lf[_f+$f];lf[_f+$f]=yf[_f+xf],lf[Af]=Bf,_f++}}}}}},{key:"_onGroupDragEnd",value:function(X){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){X.stopPropagation();var tt=this,rt=tt.groupTouchParams.group.groupId,ot=tt.groupsData.getDataSet(),ut=availableUtils.extend({},ot.get(rt));tt.options.onMoveGroup(ut,function(yn){if(yn)yn[ot._idProp]=rt,ot.update(yn);else{var uo=ot.getIds({order:tt.options.groupOrder});if(!availableUtils.equalArray(uo,tt.groupTouchParams.originalOrder))for(var po=tt.groupTouchParams.originalOrder,mo=Math.min(po.length,uo.length),wo=0;wo=mo)break;var lf=_indexOfInstanceProperty(uo).call(uo,po[wo]),yf=ot.get(uo[wo]),cf=ot.get(po[wo]);tt.options.groupOrderSwap(yf,cf,ot),ot.update(yf),ot.update(cf);var vf=uo[wo];uo[wo]=po[wo],uo[lf]=vf,wo++}}}),tt.body.emitter.emit("groupDragged",{groupId:rt}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}},{key:"_onSelectItem",value:function(X){if(this.options.selectable){var tt=X.srcEvent&&(X.srcEvent.ctrlKey||X.srcEvent.metaKey),rt=X.srcEvent&&X.srcEvent.shiftKey;if(tt||rt){this._onMultiSelectItem(X);return}var ot=this.getSelection(),ut=this.itemFromTarget(X),yn=ut&&ut.selectable?[ut.id]:[];this.setSelection(yn);var uo=this.getSelection();(uo.length>0||ot.length>0)&&this.body.emitter.emit("select",{items:uo,event:X})}}},{key:"_onMouseOver",value:function(X){var tt=this.itemFromTarget(X);if(tt){var rt=this.itemFromRelatedTarget(X);if(tt!==rt){var ot=tt.getTitle();if(this.options.showTooltips&&ot){this.popup==null&&(this.popup=new Popup(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(ot);var ut=this.body.dom.centerContainer,yn=ut.getBoundingClientRect();this.popup.setPosition(X.clientX-yn.left+ut.offsetLeft,X.clientY-yn.top+ut.offsetTop),this.setPopupTimer(this.popup)}else this.clearPopupTimer(),this.popup!=null&&this.popup.hide();this.body.emitter.emit("itemover",{item:tt.id,event:X})}}}},{key:"_onMouseOut",value:function(X){var tt=this.itemFromTarget(X);if(tt){var rt=this.itemFromRelatedTarget(X);tt!==rt&&(this.clearPopupTimer(),this.popup!=null&&this.popup.hide(),this.body.emitter.emit("itemout",{item:tt.id,event:X}))}}},{key:"_onMouseMove",value:function(X){var tt=this.itemFromTarget(X);if(tt&&(this.popupTimer!=null&&this.setPopupTimer(this.popup),this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden)){var rt=this.body.dom.centerContainer,ot=rt.getBoundingClientRect();this.popup.setPosition(X.clientX-ot.left+rt.offsetLeft,X.clientY-ot.top+rt.offsetTop),this.popup.show()}}},{key:"_onMouseWheel",value:function(X){this.touchParams.itemIsDragging&&this._onDragEnd(X)}},{key:"_onUpdateItem",value:function(X){if(this.options.selectable&&!(!this.options.editable.updateTime&&!this.options.editable.updateGroup)){var tt=this;if(X){var rt=tt.itemsData.get(X.id);this.options.onUpdate(rt,function(ot){ot&&tt.itemsData.update(ot)})}}}},{key:"_onDropObjectOnItem",value:function(X){var tt=this.itemFromTarget(X),rt=JSON.parse(X.dataTransfer.getData("text"));this.options.onDropObjectOnItem(rt,tt)}},{key:"_onAddItem",value:function(X){if(this.options.selectable&&this.options.editable.add){var tt=this,rt=this.options.snap||null,ot=this.dom.frame.getBoundingClientRect(),ut=this.options.rtl?ot.right-X.center.x:X.center.x-ot.left,yn=this.body.util.toTime(ut),uo=this.body.util.getScale(),po=this.body.util.getStep(),mo,wo;X.type=="drop"?(wo=JSON.parse(X.dataTransfer.getData("text")),wo.content=wo.content?wo.content:"new item",wo.start=wo.start?wo.start:rt?rt(yn,uo,po):yn,wo.type=wo.type||"box",wo[this.itemsData.idProp]=wo.id||v4(),wo.type=="range"&&!wo.end&&(mo=this.body.util.toTime(ut+this.props.width/5),wo.end=rt?rt(mo,uo,po):mo)):(wo={start:rt?rt(yn,uo,po):yn,content:"new item"},wo[this.itemsData.idProp]=v4(),this.options.type==="range"&&(mo=this.body.util.toTime(ut+this.props.width/5),wo.end=rt?rt(mo,uo,po):mo));var lf=this.groupFromTarget(X);lf&&(wo.group=lf.groupId),wo=this._cloneItemData(wo),this.options.onAdd(wo,function(yf){yf&&(tt.itemsData.add(yf),X.type=="drop"&&tt.setSelection([yf.id]))})}}},{key:"_onMultiSelectItem",value:function(X){var tt=this;if(this.options.selectable){var rt=this.itemFromTarget(X);if(rt){var ot=this.options.multiselect?this.getSelection():[],ut=X.srcEvent&&X.srcEvent.shiftKey||!1;if((ut||this.options.sequentialSelection)&&this.options.multiselect){var yn=this.itemsData.get(rt.id).group,uo=void 0;this.options.multiselectPerGroup&&ot.length>0&&(uo=this.itemsData.get(ot[0]).group),(!this.options.multiselectPerGroup||uo==null||uo==yn)&&ot.push(rt.id);var po=q._getItemRange(this.itemsData.get(ot));if(!this.options.multiselectPerGroup||uo==yn){ot=[];for(var mo in this.items)if(this.items.hasOwnProperty(mo)){var wo=this.items[mo],lf=wo.data.start,yf=wo.data.end!==void 0?wo.data.end:lf;lf>=po.min&&yf<=po.max&&(!this.options.multiselectPerGroup||uo==this.itemsData.get(wo.id).group)&&!(wo instanceof BackgroundItem)&&ot.push(wo.id)}}}else{var cf=_indexOfInstanceProperty(ot).call(ot,rt.id);cf==-1?ot.push(rt.id):_spliceInstanceProperty(ot).call(ot,cf,1)}var vf=_filterInstanceProperty(ot).call(ot,function(_f){return tt.getItemById(_f).selectable});this.setSelection(vf),this.body.emitter.emit("select",{items:this.getSelection(),event:X})}}}},{key:"itemFromElement",value:function(X){for(var tt=X;tt;){if(tt.hasOwnProperty("vis-item"))return tt["vis-item"];tt=tt.parentNode}return null}},{key:"itemFromTarget",value:function(X){return this.itemFromElement(X.target)}},{key:"itemFromRelatedTarget",value:function(X){return this.itemFromElement(X.relatedTarget)}},{key:"groupFromTarget",value:function(X){var tt=X.center?X.center.y:X.clientY,rt=this.groupIds;rt.length<=0&&this.groupsData&&(rt=this.groupsData.getIds({order:this.options.groupOrder}));for(var ot=0;ot=po.top&&ttpo.top)return yn}else if(ot===0&&tttt)&&(tt=ot.end):(tt==null||ot.start>tt)&&(tt=ot.start)}),{min:rt,max:tt}}},{key:"itemSetFromTarget",value:function(X){for(var tt=X.target;tt;){if(tt.hasOwnProperty("vis-itemset"))return tt["vis-itemset"];tt=tt.parentNode}return null}}]),q}(Component);ItemSet.types={background:BackgroundItem,box:BoxItem,range:RangeItem,point:PointItem};ItemSet.prototype._onAdd=ItemSet.prototype._onUpdate;var errorFound=!1,allOptions$2,printStyle="background: #FFeeee; color: #dd0000",Validator=function(){function F(){_classCallCheck(this,F)}return _createClass(F,null,[{key:"validate",value:function(q,K,X){errorFound=!1,allOptions$2=K;var tt=K;return X!==void 0&&(tt=K[X]),F.parse(q,tt,[]),errorFound}},{key:"parse",value:function(q,K,X){for(var tt in q)q.hasOwnProperty(tt)&&F.check(tt,q,K,X)}},{key:"check",value:function(q,K,X,tt){if(X[q]===void 0&&X.__any__===void 0){F.getSuggestion(q,X,tt);return}var rt=q,ot=!0;X[q]===void 0&&X.__any__!==void 0&&(rt="__any__",ot=F.getType(K[q])==="object");var ut=X[rt];ot&&ut.__type__!==void 0&&(ut=ut.__type__),F.checkFields(q,K,X,rt,ut,tt)}},{key:"checkFields",value:function(q,K,X,tt,rt,ot){var ut=function(mo){console.log("%c"+mo+F.printLocation(ot,q),printStyle)},yn=F.getType(K[q]),uo=rt[yn];uo!==void 0?F.getType(uo)==="array"&&_indexOfInstanceProperty(uo).call(uo,K[q])===-1?(ut('Invalid option detected in "'+q+'". Allowed values are:'+F.print(uo)+' not "'+K[q]+'". '),errorFound=!0):yn==="object"&&tt!=="__any__"&&(ot=availableUtils.copyAndExtendArray(ot,q),F.parse(K[q],X[tt],ot)):rt.any===void 0&&(ut('Invalid type received for "'+q+'". Expected: '+F.print(_Object$keys(rt))+". Received ["+yn+'] "'+K[q]+'"'),errorFound=!0)}},{key:"getType",value:function(q){var K=_typeof(q);return K==="object"?q===null?"null":q instanceof Boolean?"boolean":q instanceof Number?"number":q instanceof String?"string":_Array$isArray$1(q)?"array":q instanceof Date?"date":q.nodeType!==void 0?"dom":q._isAMomentObject===!0?"moment":"object":K==="number"?"number":K==="boolean"?"boolean":K==="string"?"string":K===void 0?"undefined":K}},{key:"getSuggestion",value:function(q,K,X){var tt=F.findInOptions(q,K,X,!1),rt=F.findInOptions(q,allOptions$2,[],!0),ot=8,ut=4,yn;tt.indexMatch!==void 0?yn=" in "+F.printLocation(tt.path,q,"")+'Perhaps it was incomplete? Did you mean: "'+tt.indexMatch+`"? `:rt.distance<=ut&&tt.distance>rt.distance?yn=" in "+F.printLocation(tt.path,q,"")+"Perhaps it was misplaced? Matching option found at: "+F.printLocation(rt.path,rt.closestMatch,""):tt.distance<=ot?yn='. Did you mean "'+tt.closestMatch+'"?'+F.printLocation(tt.path,q):yn=". Did you mean one of these: "+F.print(_Object$keys(K))+F.printLocation(X,q),console.log('%cUnknown option detected: "'+q+'"'+yn,printStyle),errorFound=!0}},{key:"findInOptions",value:function(q,K,X){var tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,rt=1e9,ot="",ut=[],yn=q.toLowerCase(),uo=void 0;for(var po in K){var mo=void 0;if(K[po].__type__!==void 0&&tt===!0){var wo=F.findInOptions(q,K[po],availableUtils.copyAndExtendArray(X,po));rt>wo.distance&&(ot=wo.closestMatch,ut=wo.path,rt=wo.distance,uo=wo.indexMatch)}else{var lf;_indexOfInstanceProperty(lf=po.toLowerCase()).call(lf,yn)!==-1&&(uo=po),mo=F.levenshteinDistance(q,po),rt>mo&&(ot=po,ut=availableUtils.copyArray(X),rt=mo)}}return{closestMatch:ot,path:ut,distance:rt,indexMatch:uo}}},{key:"printLocation",value:function(q,K){for(var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at: `,tt=` @@ -4133,7 +4133,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `;for(var yn=0;yn0&&arguments[0]!==void 0?arguments[0]:1;_classCallCheck(this,F),this.pixelRatio=W,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return _createClass(F,[{key:"insertTo",value:function(q){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=q,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(q){if(typeof q=="function")this.updateCallback=q;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}},{key:"setCloseCallback",value:function(q){if(typeof q=="function")this.closeCallback=q;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}},{key:"_isColorString",value:function(q){if(typeof q=="string")return htmlColors[q]}},{key:"setColor",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(q!=="none"){var X,tt=this._isColorString(q);if(tt!==void 0&&(q=tt),availableUtils.isString(q)===!0){if(availableUtils.isValidRGB(q)===!0){var rt=q.substr(4).substr(0,q.length-5).split(",");X={r:rt[0],g:rt[1],b:rt[2],a:1}}else if(availableUtils.isValidRGBA(q)===!0){var ot=q.substr(5).substr(0,q.length-6).split(",");X={r:ot[0],g:ot[1],b:ot[2],a:ot[3]}}else if(availableUtils.isValidHex(q)===!0){var ut=availableUtils.hexToRGB(q);X={r:ut.r,g:ut.g,b:ut.b,a:1}}}else if(q instanceof Object&&q.r!==void 0&&q.g!==void 0&&q.b!==void 0){var yn=q.a!==void 0?q.a:"1.0";X={r:q.r,g:q.g,b:q.b,a:yn}}if(X===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+_JSON$stringify(q));this._setColor(X,K)}}},{key:"show",value:function(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var q=this,K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;K===!0&&(this.previousColor=availableUtils.extend({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",_setTimeout(function(){q.closeCallback!==void 0&&(q.closeCallback(),q.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;K===!0&&(this.initialColor=availableUtils.extend({},q)),this.color=q;var X=availableUtils.RGBToHSV(q.r,q.g,q.b),tt=2*Math.PI,rt=this.r*X.s,ot=this.centerCoordinates.x+rt*Math.sin(tt*X.h),ut=this.centerCoordinates.y+rt*Math.cos(tt*X.h);this.colorPickerSelector.style.left=ot-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=ut-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(q)}},{key:"_setOpacity",value:function(q){this.color.a=q/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(q){var K=availableUtils.RGBToHSV(this.color.r,this.color.g,this.color.b);K.v=q/100;var X=availableUtils.HSVToRGB(K.h,K.s,K.v);X.a=this.color.a,this.color=X,this._updatePicker()}},{key:"_updatePicker",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,K=availableUtils.RGBToHSV(q.r,q.g,q.b),X=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(X.webkitBackingStorePixelRatio||X.mozBackingStorePixelRatio||X.msBackingStorePixelRatio||X.oBackingStorePixelRatio||X.backingStorePixelRatio||1)),X.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var tt=this.colorPickerCanvas.clientWidth,rt=this.colorPickerCanvas.clientHeight;X.clearRect(0,0,tt,rt),X.putImageData(this.hueCircle,0,0),X.fillStyle="rgba(0,0,0,"+(1-K.v)+")",X.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),_fillInstanceProperty(X).call(X),this.brightnessRange.value=100*K.v,this.opacityRange.value=100*q.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var q,K,X,tt;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var ot=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(ot.webkitBackingStorePixelRatio||ot.mozBackingStorePixelRatio||ot.msBackingStorePixelRatio||ot.oBackingStorePixelRatio||ot.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var rt=document.createElement("DIV");rt.style.color="red",rt.style.fontWeight="bold",rt.style.padding="10px",rt.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(rt)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var ut=this;this.opacityRange.onchange=function(){ut._setOpacity(this.value)},this.opacityRange.oninput=function(){ut._setOpacity(this.value)},this.brightnessRange.onchange=function(){ut._setBrightness(this.value)},this.brightnessRange.oninput=function(){ut._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=_bindInstanceProperty(q=this._hide).call(q,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=_bindInstanceProperty(K=this._apply).call(K,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=_bindInstanceProperty(X=this._save).call(X,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=_bindInstanceProperty(tt=this._loadLast).call(tt,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var q=this;this.drag={},this.pinch={},this.hammer=new Hammer(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),onTouch(this.hammer,function(K){q._moveSelector(K)}),this.hammer.on("tap",function(K){q._moveSelector(K)}),this.hammer.on("panstart",function(K){q._moveSelector(K)}),this.hammer.on("panmove",function(K){q._moveSelector(K)}),this.hammer.on("panend",function(K){q._moveSelector(K)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var q=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(q.webkitBackingStorePixelRatio||q.mozBackingStorePixelRatio||q.msBackingStorePixelRatio||q.oBackingStorePixelRatio||q.backingStorePixelRatio||1)),q.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var K=this.colorPickerCanvas.clientWidth,X=this.colorPickerCanvas.clientHeight;q.clearRect(0,0,K,X);var tt,rt,ot,ut;this.centerCoordinates={x:K*.5,y:X*.5},this.r=.49*K;var yn=2*Math.PI/360,uo=1/360,po=1/this.r,mo;for(ot=0;ot<360;ot++)for(ut=0;ut3&&arguments[3]!==void 0?arguments[3]:1;_classCallCheck(this,F),this.parent=W,this.changedOptions=[],this.container=q,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},availableUtils.extend(this.options,this.defaultOptions),this.configureOptions=K,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new ColorPicker(X),this.wrapper=void 0}return _createClass(F,[{key:"setOptions",value:function(q){if(q!==void 0){this.popupHistory={},this._removePopup();var K=!0;if(typeof q=="string")this.options.filter=q;else if(_Array$isArray$1(q))this.options.filter=q.join();else if(_typeof(q)==="object"){if(q==null)throw new TypeError("options cannot be null");q.container!==void 0&&(this.options.container=q.container),_filterInstanceProperty(q)!==void 0&&(this.options.filter=_filterInstanceProperty(q)),q.showButton!==void 0&&(this.options.showButton=q.showButton),q.enabled!==void 0&&(K=q.enabled)}else typeof q=="boolean"?(this.options.filter=!0,K=q):typeof q=="function"&&(this.options.filter=q,K=!0);_filterInstanceProperty(this.options)===!1&&(K=!1),this.options.enabled=K}this._clean()}},{key:"setModuleOptions",value:function(q){this.moduleOptions=q,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var q=_filterInstanceProperty(this.options),K=0,X=!1;for(var tt in this.configureOptions)this.configureOptions.hasOwnProperty(tt)&&(this.allowCreation=!1,X=!1,typeof q=="function"?(X=q(tt,[]),X=X||this._handleObject(this.configureOptions[tt],[tt],!0)):(q===!0||_indexOfInstanceProperty(q).call(q,tt)!==-1)&&(X=!0),X!==!1&&(this.allowCreation=!0,K>0&&this._makeItem([]),this._makeHeader(tt),this._handleObject(this.configureOptions[tt],[tt])),K++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var q=0;q1?X-1:0),rt=1;rt2&&arguments[2]!==void 0?arguments[2]:!1,tt=document.createElement("div");return tt.className="vis-configuration vis-config-label vis-config-s"+K.length,X===!0?tt.innerHTML=availableUtils.xss(""+q+":"):tt.innerHTML=availableUtils.xss(q+":"),tt}},{key:"_makeDropdown",value:function(q,K,X){var tt=document.createElement("select");tt.className="vis-configuration vis-config-select";var rt=0;K!==void 0&&_indexOfInstanceProperty(q).call(q,K)!==-1&&(rt=_indexOfInstanceProperty(q).call(q,K));for(var ot=0;otot&&ot!==1&&(yn.max=Math.ceil(K*mo),po=yn.max,uo="range increased"),yn.value=K}else yn.value=tt;var wo=document.createElement("input");wo.className="vis-configuration vis-config-rangeinput",wo.value=Number(yn.value);var lf=this;yn.onchange=function(){wo.value=this.value,lf._update(Number(this.value),X)},yn.oninput=function(){wo.value=this.value};var yf=this._makeLabel(X[X.length-1],X),cf=this._makeItem(X,yf,yn,wo);uo!==""&&this.popupHistory[cf]!==po&&(this.popupHistory[cf]=po,this._setupPopup(uo,cf))}},{key:"_makeButton",value:function(){var q=this;if(this.options.showButton===!0){var K=document.createElement("div");K.className="vis-configuration vis-config-button",K.innerHTML="generate options",K.onclick=function(){q._printOptions()},K.onmouseover=function(){K.className="vis-configuration vis-config-button hover"},K.onmouseout=function(){K.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(K)}}},{key:"_setupPopup",value:function(q,K){var X=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter1&&arguments[1]!==void 0?arguments[1]:[],X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,tt=!1,rt=_filterInstanceProperty(this.options),ot=!1;for(var ut in q)if(q.hasOwnProperty(ut)){tt=!0;var yn=q[ut],uo=availableUtils.copyAndExtendArray(K,ut);if(typeof rt=="function"&&(tt=rt(ut,K),tt===!1&&!_Array$isArray$1(yn)&&typeof yn!="string"&&typeof yn!="boolean"&&yn instanceof Object&&(this.allowCreation=!1,tt=this._handleObject(yn,uo,!0),this.allowCreation=X===!1)),tt!==!1){ot=!0;var po=this._getValue(uo);if(_Array$isArray$1(yn))this._handleArray(yn,po,uo);else if(typeof yn=="string")this._makeTextInput(yn,po,uo);else if(typeof yn=="boolean")this._makeCheckbox(yn,po,uo);else if(yn instanceof Object){var mo=!0;if(_indexOfInstanceProperty(K).call(K,"physics")!==-1&&this.moduleOptions.physics.solver!==ut&&(mo=!1),mo===!0)if(yn.enabled!==void 0){var wo=availableUtils.copyAndExtendArray(uo,"enabled"),lf=this._getValue(wo);if(lf===!0){var yf=this._makeLabel(ut,uo,!0);this._makeItem(uo,yf),ot=this._handleObject(yn,uo)||ot}else this._makeCheckbox(yn,lf,uo)}else{var cf=this._makeLabel(ut,uo,!0);this._makeItem(uo,cf),ot=this._handleObject(yn,uo)||ot}}else console.error("dont know how to handle",yn,ut,uo)}}return ot}},{key:"_handleArray",value:function(q,K,X){typeof q[0]=="string"&&q[0]==="color"?(this._makeColorField(q,K,X),q[1]!==K&&this.changedOptions.push({path:X,value:K})):typeof q[0]=="string"?(this._makeDropdown(q,K,X),q[0]!==K&&this.changedOptions.push({path:X,value:K})):typeof q[0]=="number"&&(this._makeRange(q,K,X),q[0]!==K&&this.changedOptions.push({path:X,value:Number(K)}))}},{key:"_update",value:function(q,K){var X=this._constructOptions(q,K);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",X),this.initialized=!0,this.parent.setOptions(X)}},{key:"_constructOptions",value:function(q,K){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},tt=X;q=q==="true"?!0:q,q=q==="false"?!1:q;for(var rt=0;rtvar options = "+_JSON$stringify(q,null,2)+""}},{key:"getOptions",value:function(){for(var q={},K=0;K"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var Timeline=function(F){_inherits(q,F);var W=_createSuper$1(q);function q(K,X,tt,rt){var ot,ut,yn,uo,po,mo,wo,lf;if(_classCallCheck(this,q),lf=W.call(this),lf.initTime=new Date,lf.itemsDone=!1,!(_assertThisInitialized$1(lf)instanceof q))throw new SyntaxError("Constructor must be called with the new operator");if(!(_Array$isArray$1(tt)||isDataViewLike(tt))&&tt instanceof Object){var yf=rt;rt=tt,tt=yf}rt&&rt.throttleRedraw&&console.warn('Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var cf=_assertThisInitialized$1(lf);if(lf.defaultOptions={autoResize:!0,longSelectPressTime:251,orientation:{axis:"bottom",item:"bottom"},moment:moment$3},lf.options=availableUtils.deepExtend({},lf.defaultOptions),rt&&availableUtils.setupXSSProtection(rt.xss),lf._create(K),!rt||rt&&typeof rt.rtl>"u"){lf.dom.root.style.visibility="hidden";for(var vf,_f=lf.dom.root;!vf&&_f;)vf=window.getComputedStyle(_f,null).direction,_f=_f.parentElement;lf.options.rtl=vf&&vf.toLowerCase()=="rtl"}else lf.options.rtl=rt.rtl;rt&&(rt.rollingMode&&(lf.options.rollingMode=rt.rollingMode),rt.onInitialDrawComplete&&(lf.options.onInitialDrawComplete=rt.onInitialDrawComplete),rt.onTimeout&&(lf.options.onTimeout=rt.onTimeout),rt.loadingScreenTemplate&&(lf.options.loadingScreenTemplate=rt.loadingScreenTemplate));var $f=document.createElement("div");if(lf.options.loadingScreenTemplate){var wf,Pf=_bindInstanceProperty(wf=lf.options.loadingScreenTemplate).call(wf,_assertThisInitialized$1(lf)),Cf=Pf(lf.dom.loadingScreen);Cf instanceof Object&&!(Cf instanceof Element)?Pf($f):Cf instanceof Element?($f.innerHTML="",$f.appendChild(Cf)):Cf!=null&&($f.innerHTML=availableUtils.xss(Cf))}lf.dom.loadingScreen.appendChild($f),lf.components=[],lf.body={dom:lf.dom,domProps:lf.props,emitter:{on:_bindInstanceProperty(ot=lf.on).call(ot,_assertThisInitialized$1(lf)),off:_bindInstanceProperty(ut=lf.off).call(ut,_assertThisInitialized$1(lf)),emit:_bindInstanceProperty(yn=lf.emit).call(yn,_assertThisInitialized$1(lf))},hiddenDates:[],util:{getScale:function(){return cf.timeAxis.step.scale},getStep:function(){return cf.timeAxis.step.step},toScreen:_bindInstanceProperty(uo=cf._toScreen).call(uo,cf),toGlobalScreen:_bindInstanceProperty(po=cf._toGlobalScreen).call(po,cf),toTime:_bindInstanceProperty(mo=cf._toTime).call(mo,cf),toGlobalTime:_bindInstanceProperty(wo=cf._toGlobalTime).call(wo,cf)}},lf.range=new Range(lf.body,lf.options),lf.components.push(lf.range),lf.body.range=lf.range,lf.timeAxis=new TimeAxis(lf.body,lf.options),lf.timeAxis2=null,lf.components.push(lf.timeAxis),lf.currentTime=new CurrentTime(lf.body,lf.options),lf.components.push(lf.currentTime),lf.itemSet=new ItemSet(lf.body,lf.options),lf.components.push(lf.itemSet),lf.itemsData=null,lf.groupsData=null;function Af(Bf,Hf){cf.hasListeners(Bf)&&cf.emit(Bf,cf.getEventProperties(Hf))}return lf.dom.root.onclick=function(Bf){Af("click",Bf)},lf.dom.root.ondblclick=function(Bf){Af("doubleClick",Bf)},lf.dom.root.oncontextmenu=function(Bf){Af("contextmenu",Bf)},lf.dom.root.onmouseover=function(Bf){Af("mouseOver",Bf)},window.PointerEvent?(lf.dom.root.onpointerdown=function(Bf){Af("mouseDown",Bf)},lf.dom.root.onpointermove=function(Bf){Af("mouseMove",Bf)},lf.dom.root.onpointerup=function(Bf){Af("mouseUp",Bf)}):(lf.dom.root.onmousemove=function(Bf){Af("mouseMove",Bf)},lf.dom.root.onmousedown=function(Bf){Af("mouseDown",Bf)},lf.dom.root.onmouseup=function(Bf){Af("mouseUp",Bf)}),lf.initialFitDone=!1,lf.on("changed",function(){if(cf.itemsData!=null){if(!cf.initialFitDone&&!cf.options.rollingMode)if(cf.initialFitDone=!0,cf.options.start!=null||cf.options.end!=null){if(cf.options.start==null||cf.options.end==null)var Bf=cf.getItemRange();var Hf=cf.options.start!=null?cf.options.start:Bf.min,Df=cf.options.end!=null?cf.options.end:Bf.max;cf.setWindow(Hf,Df,{animation:!1})}else cf.fit({animation:!1});!cf.initialDrawDone&&(cf.initialRangeChangeDone||!cf.options.start&&!cf.options.end||cf.options.rollingMode)&&(cf.initialDrawDone=!0,cf.itemSet.initialDrawDone=!0,cf.dom.root.style.visibility="visible",cf.dom.loadingScreen.parentNode.removeChild(cf.dom.loadingScreen),cf.options.onInitialDrawComplete&&_setTimeout(function(){return cf.options.onInitialDrawComplete()},0))}}),lf.on("destroyTimeline",function(){cf.destroy()}),rt&&lf.setOptions(rt),lf.body.emitter.on("fit",function(Bf){lf._onFit(Bf),lf.redraw()}),tt&&lf.setGroups(tt),X&&lf.setItems(X),lf._redraw(),lf}return _createClass(q,[{key:"_createConfigurator",value:function(){return new Configurator(this,this.dom.container,configureOptions$1)}},{key:"redraw",value:function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}},{key:"setOptions",value:function(X){var tt=Validator.validate(X,allOptions$1);if(tt===!0&&console.log("%cErrors have been found in the supplied options object.",printStyle),Core.prototype.setOptions.call(this,X),"type"in X&&X.type!==this.options.type){this.options.type=X.type;var rt=this.itemsData;if(rt){var ot=this.getSelection();this.setItems(null),this.setItems(rt.rawDS),this.setSelection(ot)}}}},{key:"setItems",value:function(X){this.itemsDone=!1;var tt;X?isDataViewLike(X)?tt=typeCoerceDataSet(X):tt=typeCoerceDataSet(new DataSet(X)):tt=null,this.itemsData&&this.itemsData.dispose(),this.itemsData=tt,this.itemSet&&this.itemSet.setItems(tt!=null?tt.rawDS:null)}},{key:"setGroups",value:function(X){var tt,rt=function(ut){return ut.visible!==!1};X?(_Array$isArray$1(X)&&(X=new DataSet(X)),tt=new DataView$1(X,{filter:rt})):tt=null,this.groupsData!=null&&typeof this.groupsData.setData=="function"&&this.groupsData.setData(null),this.groupsData=tt,this.itemSet.setGroups(tt)}},{key:"setData",value:function(X){X&&X.groups&&this.setGroups(X.groups),X&&X.items&&this.setItems(X.items)}},{key:"setSelection",value:function(X,tt){this.itemSet&&this.itemSet.setSelection(X),tt&&tt.focus&&this.focus(X,tt)}},{key:"getSelection",value:function(){return this.itemSet&&this.itemSet.getSelection()||[]}},{key:"focus",value:function(X,tt){if(!(!this.itemsData||X==null)){var rt=_Array$isArray$1(X)?X:[X],ot=this.itemsData.get(rt),ut=null,yn=null;if(_forEachInstanceProperty(ot).call(ot,function(Pf){var Cf=Pf.start.valueOf(),Af="end"in Pf?Pf.end.valueOf():Pf.start.valueOf();(ut===null||Cfyn)&&(yn=Af)}),ut!==null&&yn!==null){var uo=this,po=this.itemSet.items[rt[0]],mo=this._getScrollTop()*-1,wo=null,lf=function(Cf,Af,Bf){var Hf=getItemVerticalScroll(uo,po);if(Hf!==!1&&(wo||(wo=Hf),!(wo.itemTop==Hf.itemTop&&!wo.shouldScroll))){wo.itemTop!=Hf.itemTop&&Hf.shouldScroll&&(wo=Hf,mo=uo._getScrollTop()*-1);var Df=mo,Lf=wo.scrollOffset,kf=Bf?Lf:Df+(Lf-Df)*Cf;uo._setScrollTop(-kf),Af||uo._redraw()}},yf=function(){var Cf=getItemVerticalScroll(uo,po);Cf.shouldScroll&&Cf.itemTop!=wo.itemTop&&(uo._setScrollTop(-Cf.scrollOffset),uo._redraw())},cf=function(){yf(),_setTimeout(yf,100)},vf=tt&&tt.zoom!==void 0?tt.zoom:!0,_f=(ut+yn)/2,$f=vf?(yn-ut)*1.1:Math.max(this.range.end-this.range.start,(yn-ut)*1.1),wf=tt&&tt.animation!==void 0?tt.animation:!0;wf||(wo={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.setRange(_f-$f/2,_f+$f/2,{animation:wf},cf,lf)}}}},{key:"fit",value:function(X,tt){var rt=X&&X.animation!==void 0?X.animation:!0,ot;this.itemsData.length===1&&this.itemsData.get()[0].end===void 0?(ot=this.getDataRange(),this.moveTo(ot.min.valueOf(),{animation:rt},tt)):(ot=this.getItemRange(),this.range.setRange(ot.min,ot.max,{animation:rt},tt))}},{key:"getItemRange",value:function(){var X=this,tt=this.getDataRange(),rt=tt.min!==null?tt.min.valueOf():null,ot=tt.max!==null?tt.max.valueOf():null,ut=null,yn=null;if(rt!=null&&ot!=null){var uo=ot-rt;uo<=0&&(uo=10);var po=uo/this.props.center.width,mo={},wo=0;_forEachInstanceProperty(availableUtils).call(availableUtils,this.itemSet.items,function(wf,Pf){if(wf.groupShowing){var Cf=!0;mo[Pf]=wf.redraw(Cf),wo=mo[Pf].length}});var lf=wo>0;if(lf)for(var yf=function(Pf){_forEachInstanceProperty(availableUtils).call(availableUtils,mo,function(Cf){Cf[Pf]()})},cf=0;cfot&&(ot=Bf,yn=wf)}),ut&&yn){var vf=ut.getWidthLeft()+10,_f=yn.getWidthRight()+10,$f=this.props.center.width-vf-_f;$f>0&&(this.options.rtl?(rt=getStart(ut)-_f*uo/$f,ot=getEnd(yn)+vf*uo/$f):(rt=getStart(ut)-vf*uo/$f,ot=getEnd(yn)+_f*uo/$f))}}return{min:rt!=null?new Date(rt):null,max:ot!=null?new Date(ot):null}}},{key:"getDataRange",value:function(){var X=null,tt=null;if(this.itemsData){var rt;_forEachInstanceProperty(rt=this.itemsData).call(rt,function(ot){var ut=availableUtils.convert(ot.start,"Date").valueOf(),yn=availableUtils.convert(ot.end!=null?ot.end:ot.start,"Date").valueOf();(X===null||uttt)&&(tt=yn)})}return{min:X!=null?new Date(X):null,max:tt!=null?new Date(tt):null}}},{key:"getEventProperties",value:function(X){var tt=X.center?X.center.x:X.clientX,rt=X.center?X.center.y:X.clientY,ot=this.dom.centerContainer.getBoundingClientRect(),ut=this.options.rtl?ot.right-tt:tt-ot.left,yn=rt-ot.top,uo=this.itemSet.itemFromTarget(X),po=this.itemSet.groupFromTarget(X),mo=CustomTime.customTimeFromTarget(X),wo=this.itemSet.options.snap||null,lf=this.body.util.getScale(),yf=this.body.util.getStep(),cf=this._toTime(ut),vf=wo?wo(cf,lf,yf):cf,_f=availableUtils.getTarget(X),$f=null;return uo!=null?$f="item":mo!=null?$f="custom-time":availableUtils.hasParent(_f,this.timeAxis.dom.foreground)||this.timeAxis2&&availableUtils.hasParent(_f,this.timeAxis2.dom.foreground)?$f="axis":availableUtils.hasParent(_f,this.itemSet.dom.labelSet)?$f="group-label":availableUtils.hasParent(_f,this.currentTime.bar)?$f="current-time":availableUtils.hasParent(_f,this.dom.center)&&($f="background"),{event:X,item:uo?uo.id:null,isCluster:uo?!!uo.isCluster:!1,items:uo?uo.items||[]:null,group:po?po.groupId:null,customTime:mo?mo.options.id:null,what:$f,pageX:X.srcEvent?X.srcEvent.pageX:X.pageX,pageY:X.srcEvent?X.srcEvent.pageY:X.pageY,x:ut,y:yn,time:cf,snappedTime:vf}}},{key:"toggleRollingMode",value:function(){this.range.rolling?this.range.stopRolling():(this.options.rollingMode==null&&this.setOptions(this.options),this.range.startRolling())}},{key:"_redraw",value:function(){Core.prototype._redraw.call(this)}},{key:"_onFit",value:function(X){var tt=X.start,rt=X.end,ot=X.animation;rt?this.range.setRange(tt,rt,{animation:ot}):this.moveTo(tt.valueOf(),{animation:ot})}}]),q}(Core);function getStart(F){return availableUtils.convert(F.data.start,"Date").valueOf()}function getEnd(F){var W=F.data.end!=null?F.data.end:F.data.start;return availableUtils.convert(W,"Date").valueOf()}function getItemVerticalScroll(F,W){if(!W.parent)return!1;var q=F.options.rtl?F.props.rightContainer.height:F.props.leftContainer.height,K=F.props.center.height,X=W.parent,tt=X.top,rt=!0,ot=F.timeAxis.options.orientation.axis,ut=function(){return ot=="bottom"?X.height-W.top-W.height:W.top},yn=F._getScrollTop()*-1,uo=tt+ut(),po=W.height;return uoyn+q?tt+=ut()+po-q+F.itemSet.options.margin.item.vertical:rt=!1,tt=Math.min(tt,K-q),{shouldScroll:rt,scrollOffset:tt,itemTop:uo}}function prepareElements(F){for(var W in F)F.hasOwnProperty(W)&&(F[W].redundant=F[W].used,F[W].used=[])}function cleanupElements(F){for(var W in F)if(F.hasOwnProperty(W)&&F[W].redundant){for(var q=0;q0?(K=W[F].redundant[0],W[F].redundant.shift()):(K=document.createElementNS("http://www.w3.org/2000/svg",F),q.appendChild(K)):(K=document.createElementNS("http://www.w3.org/2000/svg",F),W[F]={used:[],redundant:[]},q.appendChild(K)),W[F].used.push(K),K}function getDOMElement(F,W,q,K){var X;return W.hasOwnProperty(F)?W[F].redundant.length>0?(X=W[F].redundant[0],W[F].redundant.shift()):(X=document.createElement(F),K!==void 0?q.insertBefore(X,K):q.appendChild(X)):(X=document.createElement(F),W[F]={used:[],redundant:[]},K!==void 0?q.insertBefore(X,K):q.appendChild(X)),W[F].used.push(X),X}function drawPoint(F,W,q,K,X,tt){var rt;if(q.style=="circle"?(rt=getSVGElement("circle",K,X),rt.setAttributeNS(null,"cx",F),rt.setAttributeNS(null,"cy",W),rt.setAttributeNS(null,"r",.5*q.size)):(rt=getSVGElement("rect",K,X),rt.setAttributeNS(null,"x",F-.5*q.size),rt.setAttributeNS(null,"y",W-.5*q.size),rt.setAttributeNS(null,"width",q.size),rt.setAttributeNS(null,"height",q.size)),q.styles!==void 0&&rt.setAttributeNS(null,"style",q.styles),rt.setAttributeNS(null,"class",q.className+" vis-point"),tt){var ot=getSVGElement("text",K,X);tt.xOffset&&(F=F+tt.xOffset),tt.yOffset&&(W=W+tt.yOffset),tt.content&&(ot.textContent=tt.content),tt.className&&ot.setAttributeNS(null,"class",tt.className+" vis-label"),ot.setAttributeNS(null,"x",F),ot.setAttributeNS(null,"y",W)}return rt}function drawBar(F,W,q,K,X,tt,rt,ot){if(K!=0){K<0&&(K*=-1,W-=K);var ut=getSVGElement("rect",tt,rt);ut.setAttributeNS(null,"x",F-.5*q),ut.setAttributeNS(null,"y",W),ut.setAttributeNS(null,"width",q),ut.setAttributeNS(null,"height",K),ut.setAttributeNS(null,"class",X),ot&&ut.setAttributeNS(null,"style",ot)}}function getNavigatorLanguage(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||"en":"en"}catch{return"en"}}var DataScale=function(){function F(W,q,K,X,tt,rt){var ot=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1,ut=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;if(_classCallCheck(this,F),this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=tt,this.majorCharHeight=rt,this._start=W,this._end=q,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=ot,this.autoScaleStart=K,this.autoScaleEnd=X,this.formattingFunction=ut,K||X){var yn=this,uo=function(mo){var wo=mo-mo%(yn.magnitudefactor*yn.minorSteps[yn.minorStepIdx]);return mo%(yn.magnitudefactor*yn.minorSteps[yn.minorStepIdx])>.5*(yn.magnitudefactor*yn.minorSteps[yn.minorStepIdx])?wo+yn.magnitudefactor*yn.minorSteps[yn.minorStepIdx]:wo};K&&(this._start-=this.magnitudefactor*2*this.minorSteps[this.minorStepIdx],this._start=uo(this._start)),X&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=uo(this._end)),this.determineScale()}}return _createClass(F,[{key:"setCharHeight",value:function(q){this.majorCharHeight=q}},{key:"setHeight",value:function(q){this.containerHeight=q}},{key:"determineScale",value:function(){var q=this._end-this._start;this.scale=this.containerHeight/q;var K=this.majorCharHeight/this.scale,X=q>0?Math.round(Math.log(q)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,X);var tt=0;X<0&&(tt=X);for(var rt=!1,ot=tt;Math.abs(ot)<=Math.abs(X);ot++){this.magnitudefactor=Math.pow(10,ot);for(var ut=0;ut=K){rt=!0,this.minorStepIdx=ut;break}}if(rt===!0)break}}},{key:"is_major",value:function(q){return q%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0}},{key:"getStep",value:function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}},{key:"getFirstMajor",value:function(){var q=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(q-this._start%q)%q)}},{key:"formatValue",value:function(q){var K=q.toPrecision(5);return typeof this.formattingFunction=="function"&&(K=this.formattingFunction(q)),typeof K=="number"?"".concat(K):typeof K=="string"?K:q.toPrecision(5)}},{key:"getLines",value:function(){for(var q=[],K=this.getStep(),X=(K-this._start%K)%K,tt=this._start+X;this._end-tt>1e-5;tt+=K)tt!=this._start&&q.push({major:this.is_major(tt),y:this.convertValue(tt),val:this.formatValue(tt)});return q}},{key:"followScale",value:function(q){var K=this.minorStepIdx,X=this._start,tt=this._end,rt=this,ot=function(){rt.magnitudefactor*=2},ut=function(){rt.magnitudefactor/=2};q.minorStepIdx<=1&&this.minorStepIdx<=1||q.minorStepIdx>1&&this.minorStepIdx>1||(q.minorStepIdxtt+1e-5){ut(),po=!1;continue}if(!this.autoScaleStart&&this._start=0)console.warn("Can't adhere to given 'min' range, due to zeroalign");else{ut(),po=!1;continue}if(this.autoScaleStart&&this.autoScaleEnd&&wo=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray(F,W);var K=_sliceInstanceProperty(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray(F,W)}}function _arrayLikeToArray(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var DataAxis=function(F){_inherits(q,F);var W=_createSuper(q);function q(K,X,tt,rt){var ot;_classCallCheck(this,q),ot=W.call(this),ot.id=v4(),ot.body=K,ot.defaultOptions={orientation:"left",showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,majorLinesOffset:7,minorLinesOffset:4,labelOffsetX:10,labelOffsetY:2,iconWidth:20,width:"40px",visible:!0,alignZeros:!0,left:{range:{min:void 0,max:void 0},format:function(uo){return"".concat(_parseFloat$1(uo.toPrecision(3)))},title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:function(uo){return"".concat(_parseFloat$1(uo.toPrecision(3)))},title:{text:void 0,style:void 0}}},ot.linegraphOptions=rt,ot.linegraphSVG=tt,ot.props={},ot.DOMelements={lines:{},labels:{},title:{}},ot.dom={},ot.scale=void 0,ot.range={start:0,end:0},ot.options=availableUtils.extend({},ot.defaultOptions),ot.conversionFactor=1,ot.setOptions(X),ot.width=Number("".concat(ot.options.width).replace("px","")),ot.minWidth=ot.width,ot.height=ot.linegraphSVG.getBoundingClientRect().height,ot.hidden=!1,ot.stepPixels=25,ot.zeroCrossing=-1,ot.amountOfSteps=-1,ot.lineOffset=0,ot.master=!0,ot.masterAxis=null,ot.svgElements={},ot.iconsRemoved=!1,ot.groups={},ot.amountOfGroups=0,ot._create(),ot.scale==null&&ot._redrawLabels(),ot.framework={svg:ot.svg,svgElements:ot.svgElements,options:ot.options,groups:ot.groups};var ut=_assertThisInitialized$1(ot);return ot.body.emitter.on("verticalDrag",function(){ut.dom.lineContainer.style.top="".concat(ut.body.domProps.scrollTop,"px")}),ot}return _createClass(q,[{key:"addGroup",value:function(X,tt){this.groups.hasOwnProperty(X)||(this.groups[X]=tt),this.amountOfGroups+=1}},{key:"updateGroup",value:function(X,tt){this.groups.hasOwnProperty(X)||(this.amountOfGroups+=1),this.groups[X]=tt}},{key:"removeGroup",value:function(X){this.groups.hasOwnProperty(X)&&(delete this.groups[X],this.amountOfGroups-=1)}},{key:"setOptions",value:function(X){if(X){var tt=!1;this.options.orientation!=X.orientation&&X.orientation!==void 0&&(tt=!0);var rt=["orientation","showMinorLabels","showMajorLabels","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","width","visible","left","right","alignZeros"];availableUtils.selectiveDeepExtend(rt,this.options,X),this.minWidth=Number("".concat(this.options.width).replace("px","")),tt===!0&&this.dom.frame&&(this.hide(),this.show())}}},{key:"_create",value:function(){this.dom.frame=document.createElement("div"),this.dom.frame.style.width=this.options.width,this.dom.frame.style.height=this.height,this.dom.lineContainer=document.createElement("div"),this.dom.lineContainer.style.width="100%",this.dom.lineContainer.style.height=this.height,this.dom.lineContainer.style.position="relative",this.dom.lineContainer.style.visibility="visible",this.dom.lineContainer.style.display="block",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.height="100%",this.svg.style.width="100%",this.svg.style.display="block",this.dom.frame.appendChild(this.svg)}},{key:"_redrawGroupIcons",value:function(){prepareElements(this.svgElements);var X,tt=this.options.iconWidth,rt=15,ot=4,ut=ot+.5*rt;this.options.orientation==="left"?X=ot:X=this.width-tt-ot;var yn=_Object$keys(this.groups);_sortInstanceProperty(yn).call(yn,function(wo,lf){return wo=0&&X._redrawLabel(lf-2,wo.val,rt,"vis-y-axis vis-major",X.props.majorCharHeight),X.master===!0&&(yf?X._redrawLine(lf,rt,"vis-grid vis-horizontal vis-major",X.options.majorLinesOffset,X.props.majorLineWidth):X._redrawLine(lf,rt,"vis-grid vis-horizontal vis-minor",X.options.minorLinesOffset,X.props.minorLineWidth))});var po=0;this.options[rt].title!==void 0&&this.options[rt].title.text!==void 0&&(po=this.props.titleCharHeight);var mo=this.options.icons===!0?Math.max(this.options.iconWidth,po)+this.options.labelOffsetX+15:po+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-mo&&this.options.visible===!0?(this.width=this.maxLabelSize+mo,this.options.width="".concat(this.width,"px"),cleanupElements(this.DOMelements.lines),cleanupElements(this.DOMelements.labels),this.redraw(),tt=!0):this.maxLabelSizethis.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+mo),this.options.width="".concat(this.width,"px"),cleanupElements(this.DOMelements.lines),cleanupElements(this.DOMelements.labels),this.redraw(),tt=!0):(cleanupElements(this.DOMelements.lines),cleanupElements(this.DOMelements.labels),tt=!1),tt}},{key:"convertValue",value:function(X){return this.scale.convertValue(X)}},{key:"screenToValue",value:function(X){return this.scale.screenToValue(X)}},{key:"_redrawLabel",value:function(X,tt,rt,ot,ut){var yn=getDOMElement("div",this.DOMelements.labels,this.dom.frame);yn.className=ot,yn.innerHTML=availableUtils.xss(tt),rt==="left"?(yn.style.left="-".concat(this.options.labelOffsetX,"px"),yn.style.textAlign="right"):(yn.style.right="-".concat(this.options.labelOffsetX,"px"),yn.style.textAlign="left"),yn.style.top="".concat(X-.5*ut+this.options.labelOffsetY,"px"),tt+="";var uo=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize"u"?{}:W,{style:W.style||F.options.drawPoints.style,styles:W.styles||F.options.drawPoints.styles,size:W.size||F.options.drawPoints.size,className:W.className||F.className}}function getCallback(F,W){var q=void 0;return F.options&&F.options.drawPoints&&F.options.drawPoints.onRender&&typeof F.options.drawPoints.onRender=="function"&&(q=F.options.drawPoints.onRender),W.group.options&&W.group.options.drawPoints&&W.group.options.drawPoints.onRender&&typeof W.group.options.drawPoints.onRender=="function"&&(q=W.group.options.drawPoints.onRender),q}function Bargraph(F,W){}Bargraph.drawIcon=function(F,W,q,K,X,tt){var rt=X*.5,ot=getSVGElement("rect",tt.svgElements,tt.svg);ot.setAttributeNS(null,"x",W),ot.setAttributeNS(null,"y",q-rt),ot.setAttributeNS(null,"width",K),ot.setAttributeNS(null,"height",2*rt),ot.setAttributeNS(null,"class","vis-outline");var ut=Math.round(.3*K),yn=F.options.barChart.width,uo=yn/ut,po=Math.round(.4*X),mo=Math.round(.75*X),wo=Math.round((K-2*ut)/3);if(drawBar(W+.5*ut+wo,q+rt-po-1,ut,po,F.className+" vis-bar",tt.svgElements,tt.svg,F.style),drawBar(W+1.5*ut+wo+2,q+rt-mo-1,ut,mo,F.className+" vis-bar",tt.svgElements,tt.svg,F.style),F.options.drawPoints.enabled==!0){var lf={style:F.options.drawPoints.style,styles:F.options.drawPoints.styles,size:F.options.drawPoints.size/uo,className:F.className};drawPoint(W+.5*ut+wo,q+rt-po-1,lf,tt.svgElements,tt.svg),drawPoint(W+1.5*ut+wo+2,q+rt-mo-1,lf,tt.svgElements,tt.svg)}};Bargraph.draw=function(F,W,q){var K=[],X={},tt,rt,ot,ut,yn,uo,po=0;for(yn=0;yn0&&(q=Math.min(q,Math.abs(W[K-1].screen_x-W[K].screen_x))),q===0&&(F[W[K].screen_x]===void 0&&(F[W[K].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),F[W[K].screen_x].amount+=1)};Bargraph._getSafeDrawData=function(F,W,q){var K,X;return F0?(K=F0){_sortInstanceProperty(F).call(F,function(rt,ot){return rt.screen_x===ot.screen_x?rt.groupIdW[tt].screen_y?W[tt].screen_y:K,X=XF[rt].accumulatedNegative?F[rt].accumulatedNegative:K,K=K>F[rt].accumulatedPositive?F[rt].accumulatedPositive:K,X=X0){var q=[];return W.options.interpolation.enabled==!0?q=Line._catmullRom(F,W):q=Line._linear(F),q}};Line.drawIcon=function(F,W,q,K,X,tt){var rt=X*.5,ot,ut,yn=getSVGElement("rect",tt.svgElements,tt.svg);if(yn.setAttributeNS(null,"x",W),yn.setAttributeNS(null,"y",q-rt),yn.setAttributeNS(null,"width",K),yn.setAttributeNS(null,"height",2*rt),yn.setAttributeNS(null,"class","vis-outline"),ot=getSVGElement("path",tt.svgElements,tt.svg),ot.setAttributeNS(null,"class",F.className),F.style!==void 0&&ot.setAttributeNS(null,"style",F.style),ot.setAttributeNS(null,"d","M"+W+","+q+" L"+(W+K)+","+q),F.options.shaded.enabled==!0&&(ut=getSVGElement("path",tt.svgElements,tt.svg),F.options.shaded.orientation=="top"?ut.setAttributeNS(null,"d","M"+W+", "+(q-rt)+"L"+W+","+q+" L"+(W+K)+","+q+" L"+(W+K)+","+(q-rt)):ut.setAttributeNS(null,"d","M"+W+","+q+" L"+W+","+(q+rt)+" L"+(W+K)+","+(q+rt)+"L"+(W+K)+","+q),ut.setAttributeNS(null,"class",F.className+" vis-icon-fill"),F.options.shaded.style!==void 0&&F.options.shaded.style!==""&&ut.setAttributeNS(null,"style",F.options.shaded.style)),F.options.drawPoints.enabled==!0){var uo={style:F.options.drawPoints.style,styles:F.options.drawPoints.styles,size:F.options.drawPoints.size,className:F.className};drawPoint(W+.5*K,q,uo,tt.svgElements,tt.svg)}};Line.drawShading=function(F,W,q,K){if(W.options.shaded.enabled==!0){var X=Number(K.svg.style.height.replace("px","")),tt=getSVGElement("path",K.svgElements,K.svg),rt="L";W.options.interpolation.enabled==!0&&(rt="C");var ot,ut=0;W.options.shaded.orientation=="top"?ut=0:W.options.shaded.orientation=="bottom"?ut=X:ut=Math.min(Math.max(0,W.zeroPosition),X),W.options.shaded.orientation=="group"&&q!=null&&q!=null?ot="M"+F[0][0]+","+F[0][1]+" "+this.serializePath(F,rt,!1)+" L"+q[q.length-1][0]+","+q[q.length-1][1]+" "+this.serializePath(q,rt,!0)+q[0][0]+","+q[0][1]+" Z":ot="M"+F[0][0]+","+F[0][1]+" "+this.serializePath(F,rt,!1)+" V"+ut+" H"+F[0][0]+" Z",tt.setAttributeNS(null,"class",W.className+" vis-fill"),W.options.shaded.style!==void 0&&tt.setAttributeNS(null,"style",W.options.shaded.style),tt.setAttributeNS(null,"d",ot)}};Line.draw=function(F,W,q){if(F!=null&&F!=null){var K=getSVGElement("path",q.svgElements,q.svg);K.setAttributeNS(null,"class",W.className),W.style!==void 0&&K.setAttributeNS(null,"style",W.style);var X="L";W.options.interpolation.enabled==!0&&(X="C"),K.setAttributeNS(null,"d","M"+F[0][0]+","+F[0][1]+" "+this.serializePath(F,X,!1))}};Line.serializePath=function(F,W,q){if(F.length<2)return"";var K=W,X;if(q)for(X=F.length-2;X>0;X--)K+=F[X][0]+","+F[X][1]+" ";else for(X=1;X0&&(lf=1/lf),yf=3*cf*(cf+vf),yf>0&&(yf=1/yf),ot={screen_x:(-$f*K.screen_x+mo*X.screen_x+wf*tt.screen_x)*lf,screen_y:(-$f*K.screen_y+mo*X.screen_y+wf*tt.screen_y)*lf},ut={screen_x:(_f*X.screen_x+wo*tt.screen_x-$f*rt.screen_x)*yf,screen_y:(_f*X.screen_y+wo*tt.screen_y-$f*rt.screen_y)*yf},ot.screen_x==0&&ot.screen_y==0&&(ot=X),ut.screen_x==0&&ut.screen_y==0&&(ut=tt),Cf.push([ot.screen_x,ot.screen_y]),Cf.push([ut.screen_x,ut.screen_y]),Cf.push([tt.screen_x,tt.screen_y]);return Cf};Line._linear=function(F){for(var W=[],q=0;qq.x?1:-1})):this.itemsData=[]};GraphGroup.prototype.getItems=function(){return this.itemsData};GraphGroup.prototype.setZeroPosition=function(F){this.zeroPosition=F};GraphGroup.prototype.setOptions=function(F){if(F!==void 0){var W=["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"];availableUtils.selectiveDeepExtend(W,this.options,F),typeof F.drawPoints=="function"&&(F.drawPoints={onRender:F.drawPoints}),availableUtils.mergeOptions(this.options,F,"interpolation"),availableUtils.mergeOptions(this.options,F,"drawPoints"),availableUtils.mergeOptions(this.options,F,"shaded"),F.interpolation&&_typeof(F.interpolation)=="object"&&F.interpolation.parametrization&&(F.interpolation.parametrization=="uniform"?this.options.interpolation.alpha=0:F.interpolation.parametrization=="chordal"?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}};GraphGroup.prototype.update=function(F){this.group=F,this.content=F.content||"graph",this.className=F.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=F.visible===void 0?!0:F.visible,this.style=F.style,this.setOptions(F.options)};GraphGroup.prototype.getLegend=function(F,W,q,K,X){if(q==null||q==null){var tt=document.createElementNS("http://www.w3.org/2000/svg","svg");q={svg:tt,svgElements:{},options:this.options,groups:[this]}}switch((K==null||K==null)&&(K=0),(X==null||X==null)&&(X=.5*W),this.options.style){case"line":Line.drawIcon(this,K,X,F,W,q);break;case"points":case"point":Points.drawIcon(this,K,X,F,W,q);break;case"bar":Bargraph.drawIcon(this,K,X,F,W,q);break}return{icon:q.svg,label:this.content,orientation:this.options.yAxisOrientation}};GraphGroup.prototype.getYRange=function(F){for(var W=F[0].y,q=F[0].y,K=0;KF[K].y?F[K].y:W,q=q");this.dom.textArea.innerHTML=availableUtils.xss(tt),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}};Legend.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var F=_Object$keys(this.groups);_sortInstanceProperty(F).call(F,function(yn,uo){return yn0){var ot={};for(this._getRelevantData(rt,ot,X,tt),this._applySampling(rt,ot),W=0;W0)switch(F.options.style){case"line":yn.hasOwnProperty(rt[W])||(yn[rt[W]]=Line.calcPath(ot[rt[W]],F)),Line.draw(yn[rt[W]],F,this.framework);case"point":case"points":(F.options.style=="point"||F.options.style=="points"||F.options.drawPoints.enabled==!0)&&Points.draw(ot[rt[W]],F,this.framework);break}}}return cleanupElements(this.svgElements),!1};LineGraph.prototype._stack=function(F,W){var q,K,X,tt,rt;q=0;for(var ot=0;otF[ot].x){rt=W[ut],ut==0?tt=rt:tt=W[ut-1],q=ut;break}rt===void 0&&(tt=W[W.length-1],rt=W[W.length-1]),K=rt.x-tt.x,X=rt.y-tt.y,K==0?F[ot].y=F[ot].orginalY+rt.y:F[ot].y=F[ot].orginalY+X/K*(F[ot].x-tt.x)+tt.y}};LineGraph.prototype._getRelevantData=function(F,W,q,K){var X,tt,rt,ot;if(F.length>0)for(tt=0;tt0){for(var K=0;K0){var tt=1,rt=X.length,ot=this.body.util.toGlobalScreen(X[X.length-1].x)-this.body.util.toGlobalScreen(X[0].x),ut=rt/ot;tt=Math.min(Math.ceil(.2*rt),Math.max(1,Math.round(ut)));for(var yn=new Array(rt),uo=0;uo0){for(tt=0;tt0&&(X=this.groups[F[tt]],ut.stack===!0&&ut.style==="bar"?ut.yAxisOrientation==="left"?rt=_concatInstanceProperty(rt).call(rt,K):ot=_concatInstanceProperty(ot).call(ot,K):q[F[tt]]=X.getYRange(K,F[tt]));Bargraph.getStackedYRange(rt,q,F,"__barStackLeft","left"),Bargraph.getStackedYRange(ot,q,F,"__barStackRight","right")}};LineGraph.prototype._updateYAxis=function(F,W){var q=!1,K=!1,X=!1,tt=1e9,rt=1e9,ot=-1e9,ut=-1e9,yn,uo;if(F.length>0){for(var po=0;poyn?yn:tt,ot=otyn?yn:rt,ut=uttt?tt:F,W=W==null||W0&&yn.push(uo.screenToValue(X)),!po.hidden&&this.itemsData.length>0&&yn.push(po.screenToValue(X)),{event:F,customTime:rt?rt.options.id:null,what:ut,pageX:F.srcEvent?F.srcEvent.pageX:F.pageX,pageY:F.srcEvent?F.srcEvent.pageY:F.pageY,x:K,y:X,time:tt,value:yn}};Graph2d.prototype._createConfigurator=function(){return new Configurator(this,this.dom.container,configureOptions)};var defaultLanguage=getNavigatorLanguage();hooks.locale(defaultLanguage);const _sfc_main=defineComponent({__name:"VisJS.ce",props:{base:{type:String},caption:{type:String},height:{type:Number},timeline:{type:String},edges:{type:String},nodes:{type:String},url:{type:String},hierarchical:{type:Boolean,default:!1}},setup(F){const W=F;watch$1(W,()=>{vf()});const q=ref(null),K=computed(()=>{var $f,wf;return(wf=($f=q.value)==null?void 0:$f.getRootNode())==null?void 0:wf.host}),X=ref(null),tt=ref(null),rt=self.window,ot=ref(rt.config||{}),ut=computed(()=>{var $f;if(($f=ot.value.source)!=null&&$f.owner)return ot.value.source;if(W.base){let[wf,Pf,Cf,...Af]=W.base.split("/");return{owner:wf,repository:Pf,branch:Cf,dir:Af?`/${Af.join("/")}/`:"/"}}return null}),yn=computed(()=>W.caption);function uo($f){let wf=document.getElementById($f)||K.value.parentElement.querySelector(`#${$f}`),Pf=Array.from((wf==null?void 0:wf.querySelectorAll("th"))||[]).map(Cf=>{var Af;return(Af=Cf.textContent)==null?void 0:Af.trim()});return Array.from((wf==null?void 0:wf.querySelectorAll("tbody > tr"))||[]).map(Cf=>Object.fromEntries(Array.from(Cf.children).map((Af,Bf)=>{var Hf;return[Pf[Bf],(Hf=Af.textContent)==null?void 0:Hf.trim()]}).filter(([Af,Bf])=>Af&&Bf))).filter(Cf=>Object.keys(Cf).length>0)}function po($f,wf=" "){const Pf=[],Cf=$f.split(` -`).filter(Af=>Af.trim()!=="");if(Cf.length>1){const Af=Cf[0].split(wf).map(Df=>Df.trim());Cf.slice(1).forEach(Df=>{let Lf={};Df.split(wf).map(kf=>kf.trim()).forEach((kf,Nf)=>{let Yf=Af[Nf].split("."),Gf=Yf[0],rp=Yf.length===2?Yf[1]:"id";Lf[Gf]||(Lf[Gf]={}),(kf||rp==="id")&&(Lf[Gf][rp]=kf)}),Pf.push(Lf)});let Bf=0,Hf={};Pf.forEach(Df=>{Object.values(Df).forEach(Lf=>{Lf.id===""&&Lf.label&&(Hf[Lf.label]||(Hf[Lf.label]=++Bf),Lf.id=Hf[Lf.label])})})}return Pf}const mo=ref(),wo=ref(),lf=ref(),yf=computed(()=>({nodes:mo.value,edges:wo.value}));watch$1(yf,$f=>nextTick(()=>new Network(X.value,$f,{layout:{hierarchical:W.hierarchical}})));const cf=computed(()=>lf.value);watch$1(cf,$f=>{new Timeline(X.value,$f,{})});function vf(){var wf,Pf;let $f=(W.height||((wf=q.value)==null?void 0:wf.clientHeight)||0)-6;X.value&&(X.value.style.height=`${$f-(((Pf=tt.value)==null?void 0:Pf.clientHeight)||40)}px`),q.value&&(q.value.style.height=`${$f}px`)}function _f($f){$f.indexOf("http")!==0&&($f=`https://raw.githubusercontent.com/${ut.value.owner}/${ut.value.repository}/${ut.value.branch}${ut.value.dir}${$f}`),fetch($f).then(wf=>wf.text()).then(wf=>{let Pf=po(wf),Cf={};Pf.forEach(Af=>{Cf[Af.source.id]||(Cf[Af.source.id]={id:Af.source.id,label:Af.source.label}),Cf[Af.target.id]||(Cf[Af.target.id]={id:Af.target.id,label:Af.target.label})}),mo.value=new DataSet(Object.values(Cf)),wo.value=new DataSet(Pf.map(Af=>({from:Af.source.id,to:Af.target.id})))})}return watch$1(X,$f=>{$f&&(vf(),W.timeline&&(lf.value=new DataSet(uo(W.timeline))),W.edges&&(wo.value=new DataSet(uo(W.edges))),W.nodes&&(mo.value=new DataSet(uo(W.nodes))),W.url&&_f(W.url))}),($f,wf)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:q,class:"content"},[createBaseVNode("div",{ref_key:"diagramEl",ref:X,class:"diagram"},null,512),yn.value?(openBlock(),createElementBlock("div",{key:0,ref_key:"captionEl",ref:tt,class:"caption"},toDisplayString(yn.value),513)):createCommentVNode("",!0)],512))}}),_style_0=`.vis [class*=span]{min-height:0;width:auto}.vis-current-time{background-color:#ff7f6e;width:2px;z-index:1;pointer-events:none}.vis-rolling-mode-btn{height:40px;width:40px;position:absolute;top:7px;right:20px;border-radius:50%;font-size:28px;cursor:pointer;opacity:.8;color:#fff;font-weight:700;text-align:center;background:#3876c2}.vis-rolling-mode-btn:before{content:"⛶"}.vis-rolling-mode-btn:hover{opacity:1}.vis-timeline{position:relative;border:1px solid #bfbfbf;overflow:hidden;padding:0;margin:0;box-sizing:border-box}.vis-loading-screen{width:100%;height:100%;position:absolute;top:0;left:0}.vis-panel{position:absolute;padding:0;margin:0;box-sizing:border-box}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right,.vis-panel.vis-top{border:1px #bfbfbf}.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right{border-top-style:solid;border-bottom-style:solid;overflow:hidden}.vis-left.vis-panel.vis-vertical-scroll,.vis-right.vis-panel.vis-vertical-scroll{height:100%;overflow-x:hidden;overflow-y:scroll}.vis-left.vis-panel.vis-vertical-scroll{direction:rtl}.vis-left.vis-panel.vis-vertical-scroll .vis-content,.vis-right.vis-panel.vis-vertical-scroll{direction:ltr}.vis-right.vis-panel.vis-vertical-scroll .vis-content{direction:rtl}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-top{border-left-style:solid;border-right-style:solid}.vis-background{overflow:hidden}.vis-panel>.vis-content{position:relative}.vis-panel .vis-shadow{position:absolute;width:100%;height:1px;box-shadow:0 0 10px #000c}.vis-panel .vis-shadow.vis-top{top:-1px;left:0}.vis-panel .vis-shadow.vis-bottom{bottom:-1px;left:0}.vis-graph-group0{fill:#4f81bd;fill-opacity:0;stroke-width:2px;stroke:#4f81bd}.vis-graph-group1{fill:#f79646;fill-opacity:0;stroke-width:2px;stroke:#f79646}.vis-graph-group2{fill:#8c51cf;fill-opacity:0;stroke-width:2px;stroke:#8c51cf}.vis-graph-group3{fill:#75c841;fill-opacity:0;stroke-width:2px;stroke:#75c841}.vis-graph-group4{fill:#ff0100;fill-opacity:0;stroke-width:2px;stroke:#ff0100}.vis-graph-group5{fill:#37d8e6;fill-opacity:0;stroke-width:2px;stroke:#37d8e6}.vis-graph-group6{fill:#042662;fill-opacity:0;stroke-width:2px;stroke:#042662}.vis-graph-group7{fill:#00ff26;fill-opacity:0;stroke-width:2px;stroke:#00ff26}.vis-graph-group8{fill:#f0f;fill-opacity:0;stroke-width:2px;stroke:#f0f}.vis-graph-group9{fill:#8f3938;fill-opacity:0;stroke-width:2px;stroke:#8f3938}.vis-timeline .vis-fill{fill-opacity:.1;stroke:none}.vis-timeline .vis-bar{fill-opacity:.5;stroke-width:1px}.vis-timeline .vis-point{stroke-width:2px;fill-opacity:1}.vis-timeline .vis-legend-background{stroke-width:1px;fill-opacity:.9;fill:#fff;stroke:#c2c2c2}.vis-timeline .vis-outline{stroke-width:1px;fill-opacity:1;fill:#fff;stroke:#e5e5e5}.vis-timeline .vis-icon-fill{fill-opacity:.3;stroke:none}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal{position:absolute;width:100%;height:0;border-bottom:1px solid}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor{border-color:#e5e5e5}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-major{border-color:#bfbfbf}.vis-data-axis .vis-y-axis.vis-major{width:100%;position:absolute;color:#4d4d4d;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-major.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-minor{position:absolute;width:100%;color:#bebebe;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-minor.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title{position:absolute;color:#4d4d4d;white-space:nowrap;bottom:20px;text-align:center}.vis-data-axis .vis-y-axis.vis-title.vis-measure{padding:0;margin:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title.vis-left{bottom:0;transform-origin:left bottom;transform:rotate(-90deg)}.vis-data-axis .vis-y-axis.vis-title.vis-right{bottom:0;transform-origin:right bottom;transform:rotate(90deg)}.vis-legend{background-color:#f7fcffa6;padding:5px;border:1px solid #b3b3b3;box-shadow:2px 2px 10px #9a9a9a8c}.vis-legend-text{white-space:nowrap;display:inline-block}.vis-itemset{position:relative;padding:0;margin:0;box-sizing:border-box}.vis-itemset .vis-background,.vis-itemset .vis-foreground{position:absolute;width:100%;height:100%;overflow:visible}.vis-axis{position:absolute;width:100%;height:0;left:0;z-index:1}.vis-foreground .vis-group{position:relative;box-sizing:border-box;border-bottom:1px solid #bfbfbf}.vis-foreground .vis-group:last-child{border-bottom:none}.vis-nesting-group{cursor:pointer}.vis-label.vis-nested-group.vis-group-level-unknown-but-gte1{background:#f5f5f5}.vis-label.vis-nested-group.vis-group-level-0{background-color:#fff}.vis-ltr .vis-label.vis-nested-group.vis-group-level-0 .vis-inner{padding-left:0}.vis-rtl .vis-label.vis-nested-group.vis-group-level-0 .vis-inner{padding-right:0}.vis-label.vis-nested-group.vis-group-level-1{background-color:#0000000d}.vis-ltr .vis-label.vis-nested-group.vis-group-level-1 .vis-inner{padding-left:15px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-1 .vis-inner{padding-right:15px}.vis-label.vis-nested-group.vis-group-level-2{background-color:#0000001a}.vis-ltr .vis-label.vis-nested-group.vis-group-level-2 .vis-inner{padding-left:30px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-2 .vis-inner{padding-right:30px}.vis-label.vis-nested-group.vis-group-level-3{background-color:#00000026}.vis-ltr .vis-label.vis-nested-group.vis-group-level-3 .vis-inner{padding-left:45px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-3 .vis-inner{padding-right:45px}.vis-label.vis-nested-group.vis-group-level-4{background-color:#0003}.vis-ltr .vis-label.vis-nested-group.vis-group-level-4 .vis-inner{padding-left:60px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-4 .vis-inner{padding-right:60px}.vis-label.vis-nested-group.vis-group-level-5{background-color:#00000040}.vis-ltr .vis-label.vis-nested-group.vis-group-level-5 .vis-inner{padding-left:75px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-5 .vis-inner{padding-right:75px}.vis-label.vis-nested-group.vis-group-level-6{background-color:#0000004d}.vis-ltr .vis-label.vis-nested-group.vis-group-level-6 .vis-inner{padding-left:90px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-6 .vis-inner{padding-right:90px}.vis-label.vis-nested-group.vis-group-level-7{background-color:#00000059}.vis-ltr .vis-label.vis-nested-group.vis-group-level-7 .vis-inner{padding-left:105px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-7 .vis-inner{padding-right:105px}.vis-label.vis-nested-group.vis-group-level-8{background-color:#0006}.vis-ltr .vis-label.vis-nested-group.vis-group-level-8 .vis-inner{padding-left:120px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-8 .vis-inner{padding-right:120px}.vis-label.vis-nested-group.vis-group-level-9{background-color:#00000073}.vis-ltr .vis-label.vis-nested-group.vis-group-level-9 .vis-inner{padding-left:135px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-9 .vis-inner{padding-right:135px}.vis-label.vis-nested-group{background-color:#00000080}.vis-ltr .vis-label.vis-nested-group .vis-inner{padding-left:150px}.vis-rtl .vis-label.vis-nested-group .vis-inner{padding-right:150px}.vis-group-level-unknown-but-gte1{border:1px solid red}.vis-label.vis-nesting-group:before{display:inline-block;width:15px}.vis-label.vis-nesting-group.expanded:before{content:"▼"}.vis-label.vis-nesting-group.collapsed:before{content:"▶"}.vis-rtl .vis-label.vis-nesting-group.collapsed:before{content:"◀"}.vis-ltr .vis-label:not(.vis-nesting-group):not(.vis-group-level-0){padding-left:15px}.vis-rtl .vis-label:not(.vis-nesting-group):not(.vis-group-level-0){padding-right:15px}.vis-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-labelset{position:relative;overflow:hidden;box-sizing:border-box}.vis-labelset .vis-label{position:relative;left:0;top:0;width:100%;color:#4d4d4d;box-sizing:border-box;border-bottom:1px solid #bfbfbf}.vis-labelset .vis-label.draggable{cursor:pointer}.vis-group-is-dragging{background:rgba(0,0,0,.1)}.vis-labelset .vis-label:last-child{border-bottom:none}.vis-labelset .vis-label .vis-inner{display:inline-block;padding:5px}.vis-labelset .vis-label .vis-inner.vis-hidden{padding:0}.vis-time-axis{position:relative;overflow:hidden}.vis-time-axis.vis-foreground{top:0;left:0;width:100%}.vis-time-axis.vis-background{position:absolute;top:0;left:0;width:100%;height:100%}.vis-time-axis .vis-text{position:absolute;color:#4d4d4d;padding:3px;overflow:hidden;box-sizing:border-box;white-space:nowrap}.vis-time-axis .vis-text.vis-measure{position:absolute;padding-left:0;padding-right:0;margin-left:0;margin-right:0;visibility:hidden}.vis-time-axis .vis-grid.vis-vertical{position:absolute;border-left:1px solid}.vis-time-axis .vis-grid.vis-vertical-rtl{position:absolute;border-right:1px solid}.vis-time-axis .vis-grid.vis-minor{border-color:#e5e5e5}.vis-time-axis .vis-grid.vis-major{border-color:#bfbfbf}.vis-custom-time{background-color:#6e94ff;width:2px;cursor:move;z-index:1}.vis-custom-time>.vis-custom-time-marker{background-color:inherit;color:#fff;font-size:12px;white-space:nowrap;padding:3px 5px;top:0;cursor:initial;z-index:inherit}.vis-item{position:absolute;color:#1a1a1a;border-color:#97b0f8;border-width:1px;background-color:#d5ddf6;display:inline-block;z-index:1}.vis-item.vis-selected{border-color:#ffc200;background-color:#fff785;z-index:2}.vis-editable.vis-selected{cursor:move}.vis-item.vis-point.vis-selected{background-color:#fff785}.vis-item.vis-box{text-align:center;border-style:solid;border-radius:2px}.vis-item.vis-point{background:0 0}.vis-item.vis-dot{position:absolute;padding:0;border-width:4px;border-style:solid;border-radius:4px}.vis-item.vis-range{border-style:solid;border-radius:2px;box-sizing:border-box}.vis-item.vis-background{border:none;background-color:#d5ddf666;box-sizing:border-box;padding:0;margin:0}.vis-item .vis-item-overflow{position:relative;width:100%;height:100%;padding:0;margin:0;overflow:hidden}.vis-item-visible-frame{white-space:nowrap}.vis-item.vis-range .vis-item-content{position:relative;display:inline-block}.vis-item.vis-background .vis-item-content{position:absolute;display:inline-block}.vis-item.vis-line{padding:0;position:absolute;width:0;border-left-width:1px;border-left-style:solid}.vis-item .vis-item-content{white-space:nowrap;box-sizing:border-box;padding:5px}.vis-item .vis-onUpdateTime-tooltip{position:absolute;background:#4f81bd;color:#fff;width:200px;text-align:center;white-space:nowrap;padding:5px;border-radius:1px;transition:.4s;-o-transition:.4s;-moz-transition:.4s;-webkit-transition:.4s}.vis-item .vis-delete,.vis-item .vis-delete-rtl{position:absolute;top:0;width:24px;height:24px;box-sizing:border-box;padding:0 5px;cursor:pointer;transition:background .2s linear}.vis-item .vis-delete{right:-24px}.vis-item .vis-delete-rtl{left:-24px}.vis-item .vis-delete-rtl:after,.vis-item .vis-delete:after{content:"×";color:red;font-family:arial,sans-serif;font-size:22px;font-weight:700;transition:color .2s linear}.vis-item .vis-delete-rtl:hover,.vis-item .vis-delete:hover{background:red}.vis-item .vis-delete-rtl:hover:after,.vis-item .vis-delete:hover:after{color:#fff}.vis-item .vis-drag-center{position:absolute;width:100%;height:100%;top:0;left:0;cursor:move}.vis-item.vis-range .vis-drag-left{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0;left:-4px;cursor:w-resize}.vis-item.vis-range .vis-drag-right{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0;right:-4px;cursor:e-resize}.vis-range.vis-item.vis-readonly .vis-drag-left,.vis-range.vis-item.vis-readonly .vis-drag-right{cursor:auto}.vis-item.vis-cluster{vertical-align:center;text-align:center;border-style:solid;border-radius:2px}.vis-item.vis-cluster-line{padding:0;position:absolute;width:0;border-left-width:1px;border-left-style:solid}.vis-item.vis-cluster-dot{position:absolute;padding:0;border-width:4px;border-style:solid;border-radius:4px}.vis .overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}div.vis-configuration{position:relative;display:block;float:left;font-size:12px}div.vis-configuration-wrapper{display:block;width:700px}div.vis-configuration-wrapper:after{clear:both;content:"";display:block}div.vis-configuration.vis-config-option-container{display:block;width:495px;background-color:#fff;border:2px solid #f7f8fa;border-radius:4px;margin-top:20px;left:10px;padding-left:5px}div.vis-configuration.vis-config-button{display:block;width:495px;height:25px;vertical-align:middle;line-height:25px;background-color:#f7f8fa;border:2px solid #ceced0;border-radius:4px;margin-top:20px;left:10px;padding-left:5px;cursor:pointer;margin-bottom:30px}div.vis-configuration.vis-config-button.hover{background-color:#4588e6;border:2px solid #214373;color:#fff}div.vis-configuration.vis-config-item{display:block;float:left;width:495px;height:25px;vertical-align:middle;line-height:25px}div.vis-configuration.vis-config-item.vis-config-s2{left:10px;background-color:#f7f8fa;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s3{left:20px;background-color:#e4e9f0;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s4{left:30px;background-color:#cfd8e6;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-header{font-size:18px;font-weight:700}div.vis-configuration.vis-config-label{width:120px;height:25px;line-height:25px}div.vis-configuration.vis-config-label.vis-config-s3{width:110px}div.vis-configuration.vis-config-label.vis-config-s4{width:100px}div.vis-configuration.vis-config-colorBlock{top:1px;width:30px;height:19px;border:1px solid #444;border-radius:2px;padding:0;margin:0;cursor:pointer}input.vis-configuration.vis-config-checkbox{left:-5px}input.vis-configuration.vis-config-rangeinput{position:relative;top:-5px;width:60px;padding:1px;margin:0;pointer-events:none}input.vis-configuration.vis-config-range{-webkit-appearance:none;border:0 solid #fff;background-color:#0000;width:300px;height:20px}input.vis-configuration.vis-config-range::-webkit-slider-runnable-track{width:300px;height:5px;background:#dedede;background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);border:1px solid #999;box-shadow:#aaa 0 0 3px;border-radius:3px}input.vis-configuration.vis-config-range::-webkit-slider-thumb{-webkit-appearance:none;border:1px solid #14334b;height:17px;width:17px;border-radius:50%;background:#3876c2;background:linear-gradient(to bottom,#3876c2 0,#385380 100%);box-shadow:#111927 0 0 1px;margin-top:-7px}input.vis-configuration.vis-config-range:focus{outline:0}input.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track{background:#9d9d9d;background:linear-gradient(to bottom,#9d9d9d 0,#c8c8c8 99%)}input.vis-configuration.vis-config-range::-moz-range-track{width:300px;height:10px;background:#dedede;background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);border:1px solid #999;box-shadow:#aaa 0 0 3px;border-radius:3px}input.vis-configuration.vis-config-range::-moz-range-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:-moz-focusring{outline:1px solid #fff;outline-offset:-1px}input.vis-configuration.vis-config-range::-ms-track{width:300px;height:5px;background:0 0;border-color:transparent;border-width:6px 0;color:transparent}input.vis-configuration.vis-config-range::-ms-fill-lower{background:#777;border-radius:10px}input.vis-configuration.vis-config-range::-ms-fill-upper{background:#ddd;border-radius:10px}input.vis-configuration.vis-config-range::-ms-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:focus::-ms-fill-lower{background:#888}input.vis-configuration.vis-config-range:focus::-ms-fill-upper{background:#ccc}.vis-configuration-popup{position:absolute;background:rgba(57,76,89,.85);border:2px solid #f2faff;line-height:30px;height:30px;width:150px;text-align:center;color:#fff;font-size:14px;border-radius:4px;transition:opacity .3s ease-in-out}.vis-configuration-popup:after,.vis-configuration-popup:before{left:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.vis-configuration-popup:after{border-color:#88b7d500;border-left-color:#394c59d9;border-width:8px;margin-top:-8px}.vis-configuration-popup:before{border-color:#c2e1f500;border-left-color:#f2faff;border-width:12px;margin-top:-12px}div.vis-tooltip{position:absolute;visibility:hidden;padding:5px;white-space:nowrap;font-family:verdana;font-size:14px;color:#000;background-color:#f5f4ed;border-radius:3px;border:1px solid #808074;box-shadow:3px 3px 10px #0003;pointer-events:none;z-index:5}*{box-sizing:border-box}.content{display:flex;flex-direction:column;justify-content:center;align-content:center;box-shadow:0 2px 4px #00000080!important;background-color:#fff;width:100%}.diagram{display:block;flex:1}.caption{text-align:start;padding:6px 12px;font-size:1em;line-height:1.1;border:1px solid #ddd;background-color:#fff} +`}},{key:"print",value:function(q){return _JSON$stringify(q).replace(/(\")|(\[)|(\])|(,"__type__")/g,"").replace(/(\,)/g,", ")}},{key:"levenshteinDistance",value:function(q,K){if(q.length===0)return K.length;if(K.length===0)return q.length;var X=[],tt;for(tt=0;tt<=K.length;tt++)X[tt]=[tt];var rt;for(rt=0;rt<=q.length;rt++)X[0][rt]=rt;for(tt=1;tt<=K.length;tt++)for(rt=1;rt<=q.length;rt++)K.charAt(tt-1)==q.charAt(rt-1)?X[tt][rt]=X[tt-1][rt-1]:X[tt][rt]=Math.min(X[tt-1][rt-1]+1,Math.min(X[tt][rt-1]+1,X[tt-1][rt]+1));return X[K.length][q.length]}}]),F}(),string$1="string",bool$1="boolean",number$1="number",array$1="array",date$1="date",object$1="object",dom$1="dom",moment$1="moment",any$1="any",allOptions$1={configure:{enabled:{boolean:bool$1},filter:{boolean:bool$1,function:"function"},container:{dom:dom$1},__type__:{object:object$1,boolean:bool$1,function:"function"}},align:{string:string$1},alignCurrentTime:{string:string$1,undefined:"undefined"},rtl:{boolean:bool$1,undefined:"undefined"},rollingMode:{follow:{boolean:bool$1},offset:{number:number$1,undefined:"undefined"},__type__:{object:object$1}},onTimeout:{timeoutMs:{number:number$1},callback:{function:"function"},__type__:{object:object$1}},verticalScroll:{boolean:bool$1,undefined:"undefined"},horizontalScroll:{boolean:bool$1,undefined:"undefined"},autoResize:{boolean:bool$1},throttleRedraw:{number:number$1},clickToUse:{boolean:bool$1},dataAttributes:{string:string$1,array:array$1},editable:{add:{boolean:bool$1,undefined:"undefined"},remove:{boolean:bool$1,undefined:"undefined"},updateGroup:{boolean:bool$1,undefined:"undefined"},updateTime:{boolean:bool$1,undefined:"undefined"},overrideItems:{boolean:bool$1,undefined:"undefined"},__type__:{boolean:bool$1,object:object$1}},end:{number:number$1,date:date$1,string:string$1,moment:moment$1},format:{minorLabels:{millisecond:{string:string$1,undefined:"undefined"},second:{string:string$1,undefined:"undefined"},minute:{string:string$1,undefined:"undefined"},hour:{string:string$1,undefined:"undefined"},weekday:{string:string$1,undefined:"undefined"},day:{string:string$1,undefined:"undefined"},week:{string:string$1,undefined:"undefined"},month:{string:string$1,undefined:"undefined"},year:{string:string$1,undefined:"undefined"},__type__:{object:object$1,function:"function"}},majorLabels:{millisecond:{string:string$1,undefined:"undefined"},second:{string:string$1,undefined:"undefined"},minute:{string:string$1,undefined:"undefined"},hour:{string:string$1,undefined:"undefined"},weekday:{string:string$1,undefined:"undefined"},day:{string:string$1,undefined:"undefined"},week:{string:string$1,undefined:"undefined"},month:{string:string$1,undefined:"undefined"},year:{string:string$1,undefined:"undefined"},__type__:{object:object$1,function:"function"}},__type__:{object:object$1}},moment:{function:"function"},groupHeightMode:{string:string$1},groupOrder:{string:string$1,function:"function"},groupEditable:{add:{boolean:bool$1,undefined:"undefined"},remove:{boolean:bool$1,undefined:"undefined"},order:{boolean:bool$1,undefined:"undefined"},__type__:{boolean:bool$1,object:object$1}},groupOrderSwap:{function:"function"},height:{string:string$1,number:number$1},hiddenDates:{start:{date:date$1,number:number$1,string:string$1,moment:moment$1},end:{date:date$1,number:number$1,string:string$1,moment:moment$1},repeat:{string:string$1},__type__:{object:object$1,array:array$1}},itemsAlwaysDraggable:{item:{boolean:bool$1,undefined:"undefined"},range:{boolean:bool$1,undefined:"undefined"},__type__:{boolean:bool$1,object:object$1}},limitSize:{boolean:bool$1},locale:{string:string$1},locales:{__any__:{any:any$1},__type__:{object:object$1}},longSelectPressTime:{number:number$1},margin:{axis:{number:number$1},item:{horizontal:{number:number$1,undefined:"undefined"},vertical:{number:number$1,undefined:"undefined"},__type__:{object:object$1,number:number$1}},__type__:{object:object$1,number:number$1}},max:{date:date$1,number:number$1,string:string$1,moment:moment$1},maxHeight:{number:number$1,string:string$1},maxMinorChars:{number:number$1},min:{date:date$1,number:number$1,string:string$1,moment:moment$1},minHeight:{number:number$1,string:string$1},moveable:{boolean:bool$1},multiselect:{boolean:bool$1},multiselectPerGroup:{boolean:bool$1},onAdd:{function:"function"},onDropObjectOnItem:{function:"function"},onUpdate:{function:"function"},onMove:{function:"function"},onMoving:{function:"function"},onRemove:{function:"function"},onAddGroup:{function:"function"},onMoveGroup:{function:"function"},onRemoveGroup:{function:"function"},onInitialDrawComplete:{function:"function"},order:{function:"function"},orientation:{axis:{string:string$1,undefined:"undefined"},item:{string:string$1,undefined:"undefined"},__type__:{string:string$1,object:object$1}},selectable:{boolean:bool$1},sequentialSelection:{boolean:bool$1},showCurrentTime:{boolean:bool$1},showMajorLabels:{boolean:bool$1},showMinorLabels:{boolean:bool$1},showWeekScale:{boolean:bool$1},stack:{boolean:bool$1},stackSubgroups:{boolean:bool$1},cluster:{maxItems:{number:number$1,undefined:"undefined"},titleTemplate:{string:string$1,undefined:"undefined"},clusterCriteria:{function:"function",undefined:"undefined"},showStipes:{boolean:bool$1,undefined:"undefined"},fitOnDoubleClick:{boolean:bool$1,undefined:"undefined"},__type__:{boolean:bool$1,object:object$1}},snap:{function:"function",null:"null"},start:{date:date$1,number:number$1,string:string$1,moment:moment$1},template:{function:"function"},loadingScreenTemplate:{function:"function"},groupTemplate:{function:"function"},visibleFrameTemplate:{string:string$1,function:"function"},showTooltips:{boolean:bool$1},tooltip:{followMouse:{boolean:bool$1},overflowMethod:{string:["cap","flip","none"]},delay:{number:number$1},template:{function:"function"},__type__:{object:object$1}},tooltipOnItemUpdateTime:{template:{function:"function"},__type__:{boolean:bool$1,object:object$1}},timeAxis:{scale:{string:string$1,undefined:"undefined"},step:{number:number$1,undefined:"undefined"},__type__:{object:object$1}},type:{string:string$1},width:{string:string$1,number:number$1},preferZoom:{boolean:bool$1},zoomable:{boolean:bool$1},zoomKey:{string:["ctrlKey","altKey","shiftKey","metaKey",""]},zoomFriction:{number:number$1},zoomMax:{number:number$1},zoomMin:{number:number$1},xss:{disabled:{boolean:bool$1},filterOptions:{__any__:{any:any$1},__type__:{object:object$1}},__type__:{object:object$1}},__type__:{object:object$1}},configureOptions$1={global:{align:["center","left","right"],alignCurrentTime:["none","year","month","quarter","week","isoWeek","day","date","hour","minute","second"],direction:!1,autoResize:!0,clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}},groupHeightMode:["auto","fixed","fitItems"],groupsDraggable:!1,height:"",locale:"",longSelectPressTime:251,margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:["both","bottom","top"],item:["bottom","top"]},preferZoom:!1,selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,stackSubgroups:!0,cluster:!1,start:"",showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:[500,0,99999,100]},tooltipOnItemUpdateTime:!1,type:["box","point","range","background"],width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","shiftKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],xss:{disabled:!1}}},htmlColors={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"},ColorPicker=function(){function F(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;_classCallCheck(this,F),this.pixelRatio=W,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return _createClass(F,[{key:"insertTo",value:function(q){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=q,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(q){if(typeof q=="function")this.updateCallback=q;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}},{key:"setCloseCallback",value:function(q){if(typeof q=="function")this.closeCallback=q;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}},{key:"_isColorString",value:function(q){if(typeof q=="string")return htmlColors[q]}},{key:"setColor",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(q!=="none"){var X,tt=this._isColorString(q);if(tt!==void 0&&(q=tt),availableUtils.isString(q)===!0){if(availableUtils.isValidRGB(q)===!0){var rt=q.substr(4).substr(0,q.length-5).split(",");X={r:rt[0],g:rt[1],b:rt[2],a:1}}else if(availableUtils.isValidRGBA(q)===!0){var ot=q.substr(5).substr(0,q.length-6).split(",");X={r:ot[0],g:ot[1],b:ot[2],a:ot[3]}}else if(availableUtils.isValidHex(q)===!0){var ut=availableUtils.hexToRGB(q);X={r:ut.r,g:ut.g,b:ut.b,a:1}}}else if(q instanceof Object&&q.r!==void 0&&q.g!==void 0&&q.b!==void 0){var yn=q.a!==void 0?q.a:"1.0";X={r:q.r,g:q.g,b:q.b,a:yn}}if(X===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+_JSON$stringify(q));this._setColor(X,K)}}},{key:"show",value:function(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var q=this,K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;K===!0&&(this.previousColor=availableUtils.extend({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",_setTimeout(function(){q.closeCallback!==void 0&&(q.closeCallback(),q.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(q){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;K===!0&&(this.initialColor=availableUtils.extend({},q)),this.color=q;var X=availableUtils.RGBToHSV(q.r,q.g,q.b),tt=2*Math.PI,rt=this.r*X.s,ot=this.centerCoordinates.x+rt*Math.sin(tt*X.h),ut=this.centerCoordinates.y+rt*Math.cos(tt*X.h);this.colorPickerSelector.style.left=ot-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=ut-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(q)}},{key:"_setOpacity",value:function(q){this.color.a=q/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(q){var K=availableUtils.RGBToHSV(this.color.r,this.color.g,this.color.b);K.v=q/100;var X=availableUtils.HSVToRGB(K.h,K.s,K.v);X.a=this.color.a,this.color=X,this._updatePicker()}},{key:"_updatePicker",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,K=availableUtils.RGBToHSV(q.r,q.g,q.b),X=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(X.webkitBackingStorePixelRatio||X.mozBackingStorePixelRatio||X.msBackingStorePixelRatio||X.oBackingStorePixelRatio||X.backingStorePixelRatio||1)),X.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var tt=this.colorPickerCanvas.clientWidth,rt=this.colorPickerCanvas.clientHeight;X.clearRect(0,0,tt,rt),X.putImageData(this.hueCircle,0,0),X.fillStyle="rgba(0,0,0,"+(1-K.v)+")",X.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),_fillInstanceProperty(X).call(X),this.brightnessRange.value=100*K.v,this.opacityRange.value=100*q.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var q,K,X,tt;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var ot=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(ot.webkitBackingStorePixelRatio||ot.mozBackingStorePixelRatio||ot.msBackingStorePixelRatio||ot.oBackingStorePixelRatio||ot.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var rt=document.createElement("DIV");rt.style.color="red",rt.style.fontWeight="bold",rt.style.padding="10px",rt.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(rt)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var ut=this;this.opacityRange.onchange=function(){ut._setOpacity(this.value)},this.opacityRange.oninput=function(){ut._setOpacity(this.value)},this.brightnessRange.onchange=function(){ut._setBrightness(this.value)},this.brightnessRange.oninput=function(){ut._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=_bindInstanceProperty(q=this._hide).call(q,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=_bindInstanceProperty(K=this._apply).call(K,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=_bindInstanceProperty(X=this._save).call(X,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=_bindInstanceProperty(tt=this._loadLast).call(tt,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var q=this;this.drag={},this.pinch={},this.hammer=new Hammer(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),onTouch(this.hammer,function(K){q._moveSelector(K)}),this.hammer.on("tap",function(K){q._moveSelector(K)}),this.hammer.on("panstart",function(K){q._moveSelector(K)}),this.hammer.on("panmove",function(K){q._moveSelector(K)}),this.hammer.on("panend",function(K){q._moveSelector(K)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var q=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(q.webkitBackingStorePixelRatio||q.mozBackingStorePixelRatio||q.msBackingStorePixelRatio||q.oBackingStorePixelRatio||q.backingStorePixelRatio||1)),q.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var K=this.colorPickerCanvas.clientWidth,X=this.colorPickerCanvas.clientHeight;q.clearRect(0,0,K,X);var tt,rt,ot,ut;this.centerCoordinates={x:K*.5,y:X*.5},this.r=.49*K;var yn=2*Math.PI/360,uo=1/360,po=1/this.r,mo;for(ot=0;ot<360;ot++)for(ut=0;ut3&&arguments[3]!==void 0?arguments[3]:1;_classCallCheck(this,F),this.parent=W,this.changedOptions=[],this.container=q,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},availableUtils.extend(this.options,this.defaultOptions),this.configureOptions=K,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new ColorPicker(X),this.wrapper=void 0}return _createClass(F,[{key:"setOptions",value:function(q){if(q!==void 0){this.popupHistory={},this._removePopup();var K=!0;if(typeof q=="string")this.options.filter=q;else if(_Array$isArray$1(q))this.options.filter=q.join();else if(_typeof(q)==="object"){if(q==null)throw new TypeError("options cannot be null");q.container!==void 0&&(this.options.container=q.container),_filterInstanceProperty(q)!==void 0&&(this.options.filter=_filterInstanceProperty(q)),q.showButton!==void 0&&(this.options.showButton=q.showButton),q.enabled!==void 0&&(K=q.enabled)}else typeof q=="boolean"?(this.options.filter=!0,K=q):typeof q=="function"&&(this.options.filter=q,K=!0);_filterInstanceProperty(this.options)===!1&&(K=!1),this.options.enabled=K}this._clean()}},{key:"setModuleOptions",value:function(q){this.moduleOptions=q,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var q=_filterInstanceProperty(this.options),K=0,X=!1;for(var tt in this.configureOptions)this.configureOptions.hasOwnProperty(tt)&&(this.allowCreation=!1,X=!1,typeof q=="function"?(X=q(tt,[]),X=X||this._handleObject(this.configureOptions[tt],[tt],!0)):(q===!0||_indexOfInstanceProperty(q).call(q,tt)!==-1)&&(X=!0),X!==!1&&(this.allowCreation=!0,K>0&&this._makeItem([]),this._makeHeader(tt),this._handleObject(this.configureOptions[tt],[tt])),K++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var q=0;q1?X-1:0),rt=1;rt2&&arguments[2]!==void 0?arguments[2]:!1,tt=document.createElement("div");return tt.className="vis-configuration vis-config-label vis-config-s"+K.length,X===!0?tt.innerHTML=availableUtils.xss(""+q+":"):tt.innerHTML=availableUtils.xss(q+":"),tt}},{key:"_makeDropdown",value:function(q,K,X){var tt=document.createElement("select");tt.className="vis-configuration vis-config-select";var rt=0;K!==void 0&&_indexOfInstanceProperty(q).call(q,K)!==-1&&(rt=_indexOfInstanceProperty(q).call(q,K));for(var ot=0;otot&&ot!==1&&(yn.max=Math.ceil(K*mo),po=yn.max,uo="range increased"),yn.value=K}else yn.value=tt;var wo=document.createElement("input");wo.className="vis-configuration vis-config-rangeinput",wo.value=Number(yn.value);var lf=this;yn.onchange=function(){wo.value=this.value,lf._update(Number(this.value),X)},yn.oninput=function(){wo.value=this.value};var yf=this._makeLabel(X[X.length-1],X),cf=this._makeItem(X,yf,yn,wo);uo!==""&&this.popupHistory[cf]!==po&&(this.popupHistory[cf]=po,this._setupPopup(uo,cf))}},{key:"_makeButton",value:function(){var q=this;if(this.options.showButton===!0){var K=document.createElement("div");K.className="vis-configuration vis-config-button",K.innerHTML="generate options",K.onclick=function(){q._printOptions()},K.onmouseover=function(){K.className="vis-configuration vis-config-button hover"},K.onmouseout=function(){K.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(K)}}},{key:"_setupPopup",value:function(q,K){var X=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter1&&arguments[1]!==void 0?arguments[1]:[],X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,tt=!1,rt=_filterInstanceProperty(this.options),ot=!1;for(var ut in q)if(q.hasOwnProperty(ut)){tt=!0;var yn=q[ut],uo=availableUtils.copyAndExtendArray(K,ut);if(typeof rt=="function"&&(tt=rt(ut,K),tt===!1&&!_Array$isArray$1(yn)&&typeof yn!="string"&&typeof yn!="boolean"&&yn instanceof Object&&(this.allowCreation=!1,tt=this._handleObject(yn,uo,!0),this.allowCreation=X===!1)),tt!==!1){ot=!0;var po=this._getValue(uo);if(_Array$isArray$1(yn))this._handleArray(yn,po,uo);else if(typeof yn=="string")this._makeTextInput(yn,po,uo);else if(typeof yn=="boolean")this._makeCheckbox(yn,po,uo);else if(yn instanceof Object){var mo=!0;if(_indexOfInstanceProperty(K).call(K,"physics")!==-1&&this.moduleOptions.physics.solver!==ut&&(mo=!1),mo===!0)if(yn.enabled!==void 0){var wo=availableUtils.copyAndExtendArray(uo,"enabled"),lf=this._getValue(wo);if(lf===!0){var yf=this._makeLabel(ut,uo,!0);this._makeItem(uo,yf),ot=this._handleObject(yn,uo)||ot}else this._makeCheckbox(yn,lf,uo)}else{var cf=this._makeLabel(ut,uo,!0);this._makeItem(uo,cf),ot=this._handleObject(yn,uo)||ot}}else console.error("dont know how to handle",yn,ut,uo)}}return ot}},{key:"_handleArray",value:function(q,K,X){typeof q[0]=="string"&&q[0]==="color"?(this._makeColorField(q,K,X),q[1]!==K&&this.changedOptions.push({path:X,value:K})):typeof q[0]=="string"?(this._makeDropdown(q,K,X),q[0]!==K&&this.changedOptions.push({path:X,value:K})):typeof q[0]=="number"&&(this._makeRange(q,K,X),q[0]!==K&&this.changedOptions.push({path:X,value:Number(K)}))}},{key:"_update",value:function(q,K){var X=this._constructOptions(q,K);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",X),this.initialized=!0,this.parent.setOptions(X)}},{key:"_constructOptions",value:function(q,K){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},tt=X;q=q==="true"?!0:q,q=q==="false"?!1:q;for(var rt=0;rtvar options = "+_JSON$stringify(q,null,2)+""}},{key:"getOptions",value:function(){for(var q={},K=0;K"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var Timeline=function(F){_inherits(q,F);var W=_createSuper$1(q);function q(K,X,tt,rt){var ot,ut,yn,uo,po,mo,wo,lf;if(_classCallCheck(this,q),lf=W.call(this),lf.initTime=new Date,lf.itemsDone=!1,!(_assertThisInitialized$1(lf)instanceof q))throw new SyntaxError("Constructor must be called with the new operator");if(!(_Array$isArray$1(tt)||isDataViewLike(tt))&&tt instanceof Object){var yf=rt;rt=tt,tt=yf}rt&&rt.throttleRedraw&&console.warn('Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var cf=_assertThisInitialized$1(lf);if(lf.defaultOptions={autoResize:!0,longSelectPressTime:251,orientation:{axis:"bottom",item:"bottom"},moment:moment$3},lf.options=availableUtils.deepExtend({},lf.defaultOptions),rt&&availableUtils.setupXSSProtection(rt.xss),lf._create(K),!rt||rt&&typeof rt.rtl>"u"){lf.dom.root.style.visibility="hidden";for(var vf,_f=lf.dom.root;!vf&&_f;)vf=window.getComputedStyle(_f,null).direction,_f=_f.parentElement;lf.options.rtl=vf&&vf.toLowerCase()=="rtl"}else lf.options.rtl=rt.rtl;rt&&(rt.rollingMode&&(lf.options.rollingMode=rt.rollingMode),rt.onInitialDrawComplete&&(lf.options.onInitialDrawComplete=rt.onInitialDrawComplete),rt.onTimeout&&(lf.options.onTimeout=rt.onTimeout),rt.loadingScreenTemplate&&(lf.options.loadingScreenTemplate=rt.loadingScreenTemplate));var $f=document.createElement("div");if(lf.options.loadingScreenTemplate){var xf,Af=_bindInstanceProperty(xf=lf.options.loadingScreenTemplate).call(xf,_assertThisInitialized$1(lf)),Cf=Af(lf.dom.loadingScreen);Cf instanceof Object&&!(Cf instanceof Element)?Af($f):Cf instanceof Element?($f.innerHTML="",$f.appendChild(Cf)):Cf!=null&&($f.innerHTML=availableUtils.xss(Cf))}lf.dom.loadingScreen.appendChild($f),lf.components=[],lf.body={dom:lf.dom,domProps:lf.props,emitter:{on:_bindInstanceProperty(ot=lf.on).call(ot,_assertThisInitialized$1(lf)),off:_bindInstanceProperty(ut=lf.off).call(ut,_assertThisInitialized$1(lf)),emit:_bindInstanceProperty(yn=lf.emit).call(yn,_assertThisInitialized$1(lf))},hiddenDates:[],util:{getScale:function(){return cf.timeAxis.step.scale},getStep:function(){return cf.timeAxis.step.step},toScreen:_bindInstanceProperty(uo=cf._toScreen).call(uo,cf),toGlobalScreen:_bindInstanceProperty(po=cf._toGlobalScreen).call(po,cf),toTime:_bindInstanceProperty(mo=cf._toTime).call(mo,cf),toGlobalTime:_bindInstanceProperty(wo=cf._toGlobalTime).call(wo,cf)}},lf.range=new Range(lf.body,lf.options),lf.components.push(lf.range),lf.body.range=lf.range,lf.timeAxis=new TimeAxis(lf.body,lf.options),lf.timeAxis2=null,lf.components.push(lf.timeAxis),lf.currentTime=new CurrentTime(lf.body,lf.options),lf.components.push(lf.currentTime),lf.itemSet=new ItemSet(lf.body,lf.options),lf.components.push(lf.itemSet),lf.itemsData=null,lf.groupsData=null;function Pf(Bf,Hf){cf.hasListeners(Bf)&&cf.emit(Bf,cf.getEventProperties(Hf))}return lf.dom.root.onclick=function(Bf){Pf("click",Bf)},lf.dom.root.ondblclick=function(Bf){Pf("doubleClick",Bf)},lf.dom.root.oncontextmenu=function(Bf){Pf("contextmenu",Bf)},lf.dom.root.onmouseover=function(Bf){Pf("mouseOver",Bf)},window.PointerEvent?(lf.dom.root.onpointerdown=function(Bf){Pf("mouseDown",Bf)},lf.dom.root.onpointermove=function(Bf){Pf("mouseMove",Bf)},lf.dom.root.onpointerup=function(Bf){Pf("mouseUp",Bf)}):(lf.dom.root.onmousemove=function(Bf){Pf("mouseMove",Bf)},lf.dom.root.onmousedown=function(Bf){Pf("mouseDown",Bf)},lf.dom.root.onmouseup=function(Bf){Pf("mouseUp",Bf)}),lf.initialFitDone=!1,lf.on("changed",function(){if(cf.itemsData!=null){if(!cf.initialFitDone&&!cf.options.rollingMode)if(cf.initialFitDone=!0,cf.options.start!=null||cf.options.end!=null){if(cf.options.start==null||cf.options.end==null)var Bf=cf.getItemRange();var Hf=cf.options.start!=null?cf.options.start:Bf.min,Df=cf.options.end!=null?cf.options.end:Bf.max;cf.setWindow(Hf,Df,{animation:!1})}else cf.fit({animation:!1});!cf.initialDrawDone&&(cf.initialRangeChangeDone||!cf.options.start&&!cf.options.end||cf.options.rollingMode)&&(cf.initialDrawDone=!0,cf.itemSet.initialDrawDone=!0,cf.dom.root.style.visibility="visible",cf.dom.loadingScreen.parentNode.removeChild(cf.dom.loadingScreen),cf.options.onInitialDrawComplete&&_setTimeout(function(){return cf.options.onInitialDrawComplete()},0))}}),lf.on("destroyTimeline",function(){cf.destroy()}),rt&&lf.setOptions(rt),lf.body.emitter.on("fit",function(Bf){lf._onFit(Bf),lf.redraw()}),tt&&lf.setGroups(tt),X&&lf.setItems(X),lf._redraw(),lf}return _createClass(q,[{key:"_createConfigurator",value:function(){return new Configurator(this,this.dom.container,configureOptions$1)}},{key:"redraw",value:function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}},{key:"setOptions",value:function(X){var tt=Validator.validate(X,allOptions$1);if(tt===!0&&console.log("%cErrors have been found in the supplied options object.",printStyle),Core.prototype.setOptions.call(this,X),"type"in X&&X.type!==this.options.type){this.options.type=X.type;var rt=this.itemsData;if(rt){var ot=this.getSelection();this.setItems(null),this.setItems(rt.rawDS),this.setSelection(ot)}}}},{key:"setItems",value:function(X){this.itemsDone=!1;var tt;X?isDataViewLike(X)?tt=typeCoerceDataSet(X):tt=typeCoerceDataSet(new DataSet(X)):tt=null,this.itemsData&&this.itemsData.dispose(),this.itemsData=tt,this.itemSet&&this.itemSet.setItems(tt!=null?tt.rawDS:null)}},{key:"setGroups",value:function(X){var tt,rt=function(ut){return ut.visible!==!1};X?(_Array$isArray$1(X)&&(X=new DataSet(X)),tt=new DataView$1(X,{filter:rt})):tt=null,this.groupsData!=null&&typeof this.groupsData.setData=="function"&&this.groupsData.setData(null),this.groupsData=tt,this.itemSet.setGroups(tt)}},{key:"setData",value:function(X){X&&X.groups&&this.setGroups(X.groups),X&&X.items&&this.setItems(X.items)}},{key:"setSelection",value:function(X,tt){this.itemSet&&this.itemSet.setSelection(X),tt&&tt.focus&&this.focus(X,tt)}},{key:"getSelection",value:function(){return this.itemSet&&this.itemSet.getSelection()||[]}},{key:"focus",value:function(X,tt){if(!(!this.itemsData||X==null)){var rt=_Array$isArray$1(X)?X:[X],ot=this.itemsData.get(rt),ut=null,yn=null;if(_forEachInstanceProperty(ot).call(ot,function(Af){var Cf=Af.start.valueOf(),Pf="end"in Af?Af.end.valueOf():Af.start.valueOf();(ut===null||Cfyn)&&(yn=Pf)}),ut!==null&&yn!==null){var uo=this,po=this.itemSet.items[rt[0]],mo=this._getScrollTop()*-1,wo=null,lf=function(Cf,Pf,Bf){var Hf=getItemVerticalScroll(uo,po);if(Hf!==!1&&(wo||(wo=Hf),!(wo.itemTop==Hf.itemTop&&!wo.shouldScroll))){wo.itemTop!=Hf.itemTop&&Hf.shouldScroll&&(wo=Hf,mo=uo._getScrollTop()*-1);var Df=mo,Lf=wo.scrollOffset,kf=Bf?Lf:Df+(Lf-Df)*Cf;uo._setScrollTop(-kf),Pf||uo._redraw()}},yf=function(){var Cf=getItemVerticalScroll(uo,po);Cf.shouldScroll&&Cf.itemTop!=wo.itemTop&&(uo._setScrollTop(-Cf.scrollOffset),uo._redraw())},cf=function(){yf(),_setTimeout(yf,100)},vf=tt&&tt.zoom!==void 0?tt.zoom:!0,_f=(ut+yn)/2,$f=vf?(yn-ut)*1.1:Math.max(this.range.end-this.range.start,(yn-ut)*1.1),xf=tt&&tt.animation!==void 0?tt.animation:!0;xf||(wo={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.setRange(_f-$f/2,_f+$f/2,{animation:xf},cf,lf)}}}},{key:"fit",value:function(X,tt){var rt=X&&X.animation!==void 0?X.animation:!0,ot;this.itemsData.length===1&&this.itemsData.get()[0].end===void 0?(ot=this.getDataRange(),this.moveTo(ot.min.valueOf(),{animation:rt},tt)):(ot=this.getItemRange(),this.range.setRange(ot.min,ot.max,{animation:rt},tt))}},{key:"getItemRange",value:function(){var X=this,tt=this.getDataRange(),rt=tt.min!==null?tt.min.valueOf():null,ot=tt.max!==null?tt.max.valueOf():null,ut=null,yn=null;if(rt!=null&&ot!=null){var uo=ot-rt;uo<=0&&(uo=10);var po=uo/this.props.center.width,mo={},wo=0;_forEachInstanceProperty(availableUtils).call(availableUtils,this.itemSet.items,function(xf,Af){if(xf.groupShowing){var Cf=!0;mo[Af]=xf.redraw(Cf),wo=mo[Af].length}});var lf=wo>0;if(lf)for(var yf=function(Af){_forEachInstanceProperty(availableUtils).call(availableUtils,mo,function(Cf){Cf[Af]()})},cf=0;cfot&&(ot=Bf,yn=xf)}),ut&&yn){var vf=ut.getWidthLeft()+10,_f=yn.getWidthRight()+10,$f=this.props.center.width-vf-_f;$f>0&&(this.options.rtl?(rt=getStart(ut)-_f*uo/$f,ot=getEnd(yn)+vf*uo/$f):(rt=getStart(ut)-vf*uo/$f,ot=getEnd(yn)+_f*uo/$f))}}return{min:rt!=null?new Date(rt):null,max:ot!=null?new Date(ot):null}}},{key:"getDataRange",value:function(){var X=null,tt=null;if(this.itemsData){var rt;_forEachInstanceProperty(rt=this.itemsData).call(rt,function(ot){var ut=availableUtils.convert(ot.start,"Date").valueOf(),yn=availableUtils.convert(ot.end!=null?ot.end:ot.start,"Date").valueOf();(X===null||uttt)&&(tt=yn)})}return{min:X!=null?new Date(X):null,max:tt!=null?new Date(tt):null}}},{key:"getEventProperties",value:function(X){var tt=X.center?X.center.x:X.clientX,rt=X.center?X.center.y:X.clientY,ot=this.dom.centerContainer.getBoundingClientRect(),ut=this.options.rtl?ot.right-tt:tt-ot.left,yn=rt-ot.top,uo=this.itemSet.itemFromTarget(X),po=this.itemSet.groupFromTarget(X),mo=CustomTime.customTimeFromTarget(X),wo=this.itemSet.options.snap||null,lf=this.body.util.getScale(),yf=this.body.util.getStep(),cf=this._toTime(ut),vf=wo?wo(cf,lf,yf):cf,_f=availableUtils.getTarget(X),$f=null;return uo!=null?$f="item":mo!=null?$f="custom-time":availableUtils.hasParent(_f,this.timeAxis.dom.foreground)||this.timeAxis2&&availableUtils.hasParent(_f,this.timeAxis2.dom.foreground)?$f="axis":availableUtils.hasParent(_f,this.itemSet.dom.labelSet)?$f="group-label":availableUtils.hasParent(_f,this.currentTime.bar)?$f="current-time":availableUtils.hasParent(_f,this.dom.center)&&($f="background"),{event:X,item:uo?uo.id:null,isCluster:uo?!!uo.isCluster:!1,items:uo?uo.items||[]:null,group:po?po.groupId:null,customTime:mo?mo.options.id:null,what:$f,pageX:X.srcEvent?X.srcEvent.pageX:X.pageX,pageY:X.srcEvent?X.srcEvent.pageY:X.pageY,x:ut,y:yn,time:cf,snappedTime:vf}}},{key:"toggleRollingMode",value:function(){this.range.rolling?this.range.stopRolling():(this.options.rollingMode==null&&this.setOptions(this.options),this.range.startRolling())}},{key:"_redraw",value:function(){Core.prototype._redraw.call(this)}},{key:"_onFit",value:function(X){var tt=X.start,rt=X.end,ot=X.animation;rt?this.range.setRange(tt,rt,{animation:ot}):this.moveTo(tt.valueOf(),{animation:ot})}}]),q}(Core);function getStart(F){return availableUtils.convert(F.data.start,"Date").valueOf()}function getEnd(F){var W=F.data.end!=null?F.data.end:F.data.start;return availableUtils.convert(W,"Date").valueOf()}function getItemVerticalScroll(F,W){if(!W.parent)return!1;var q=F.options.rtl?F.props.rightContainer.height:F.props.leftContainer.height,K=F.props.center.height,X=W.parent,tt=X.top,rt=!0,ot=F.timeAxis.options.orientation.axis,ut=function(){return ot=="bottom"?X.height-W.top-W.height:W.top},yn=F._getScrollTop()*-1,uo=tt+ut(),po=W.height;return uoyn+q?tt+=ut()+po-q+F.itemSet.options.margin.item.vertical:rt=!1,tt=Math.min(tt,K-q),{shouldScroll:rt,scrollOffset:tt,itemTop:uo}}function prepareElements(F){for(var W in F)F.hasOwnProperty(W)&&(F[W].redundant=F[W].used,F[W].used=[])}function cleanupElements(F){for(var W in F)if(F.hasOwnProperty(W)&&F[W].redundant){for(var q=0;q0?(K=W[F].redundant[0],W[F].redundant.shift()):(K=document.createElementNS("http://www.w3.org/2000/svg",F),q.appendChild(K)):(K=document.createElementNS("http://www.w3.org/2000/svg",F),W[F]={used:[],redundant:[]},q.appendChild(K)),W[F].used.push(K),K}function getDOMElement(F,W,q,K){var X;return W.hasOwnProperty(F)?W[F].redundant.length>0?(X=W[F].redundant[0],W[F].redundant.shift()):(X=document.createElement(F),K!==void 0?q.insertBefore(X,K):q.appendChild(X)):(X=document.createElement(F),W[F]={used:[],redundant:[]},K!==void 0?q.insertBefore(X,K):q.appendChild(X)),W[F].used.push(X),X}function drawPoint(F,W,q,K,X,tt){var rt;if(q.style=="circle"?(rt=getSVGElement("circle",K,X),rt.setAttributeNS(null,"cx",F),rt.setAttributeNS(null,"cy",W),rt.setAttributeNS(null,"r",.5*q.size)):(rt=getSVGElement("rect",K,X),rt.setAttributeNS(null,"x",F-.5*q.size),rt.setAttributeNS(null,"y",W-.5*q.size),rt.setAttributeNS(null,"width",q.size),rt.setAttributeNS(null,"height",q.size)),q.styles!==void 0&&rt.setAttributeNS(null,"style",q.styles),rt.setAttributeNS(null,"class",q.className+" vis-point"),tt){var ot=getSVGElement("text",K,X);tt.xOffset&&(F=F+tt.xOffset),tt.yOffset&&(W=W+tt.yOffset),tt.content&&(ot.textContent=tt.content),tt.className&&ot.setAttributeNS(null,"class",tt.className+" vis-label"),ot.setAttributeNS(null,"x",F),ot.setAttributeNS(null,"y",W)}return rt}function drawBar(F,W,q,K,X,tt,rt,ot){if(K!=0){K<0&&(K*=-1,W-=K);var ut=getSVGElement("rect",tt,rt);ut.setAttributeNS(null,"x",F-.5*q),ut.setAttributeNS(null,"y",W),ut.setAttributeNS(null,"width",q),ut.setAttributeNS(null,"height",K),ut.setAttributeNS(null,"class",X),ot&&ut.setAttributeNS(null,"style",ot)}}function getNavigatorLanguage(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||"en":"en"}catch{return"en"}}var DataScale=function(){function F(W,q,K,X,tt,rt){var ot=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1,ut=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;if(_classCallCheck(this,F),this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=tt,this.majorCharHeight=rt,this._start=W,this._end=q,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=ot,this.autoScaleStart=K,this.autoScaleEnd=X,this.formattingFunction=ut,K||X){var yn=this,uo=function(mo){var wo=mo-mo%(yn.magnitudefactor*yn.minorSteps[yn.minorStepIdx]);return mo%(yn.magnitudefactor*yn.minorSteps[yn.minorStepIdx])>.5*(yn.magnitudefactor*yn.minorSteps[yn.minorStepIdx])?wo+yn.magnitudefactor*yn.minorSteps[yn.minorStepIdx]:wo};K&&(this._start-=this.magnitudefactor*2*this.minorSteps[this.minorStepIdx],this._start=uo(this._start)),X&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=uo(this._end)),this.determineScale()}}return _createClass(F,[{key:"setCharHeight",value:function(q){this.majorCharHeight=q}},{key:"setHeight",value:function(q){this.containerHeight=q}},{key:"determineScale",value:function(){var q=this._end-this._start;this.scale=this.containerHeight/q;var K=this.majorCharHeight/this.scale,X=q>0?Math.round(Math.log(q)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,X);var tt=0;X<0&&(tt=X);for(var rt=!1,ot=tt;Math.abs(ot)<=Math.abs(X);ot++){this.magnitudefactor=Math.pow(10,ot);for(var ut=0;ut=K){rt=!0,this.minorStepIdx=ut;break}}if(rt===!0)break}}},{key:"is_major",value:function(q){return q%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0}},{key:"getStep",value:function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}},{key:"getFirstMajor",value:function(){var q=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(q-this._start%q)%q)}},{key:"formatValue",value:function(q){var K=q.toPrecision(5);return typeof this.formattingFunction=="function"&&(K=this.formattingFunction(q)),typeof K=="number"?"".concat(K):typeof K=="string"?K:q.toPrecision(5)}},{key:"getLines",value:function(){for(var q=[],K=this.getStep(),X=(K-this._start%K)%K,tt=this._start+X;this._end-tt>1e-5;tt+=K)tt!=this._start&&q.push({major:this.is_major(tt),y:this.convertValue(tt),val:this.formatValue(tt)});return q}},{key:"followScale",value:function(q){var K=this.minorStepIdx,X=this._start,tt=this._end,rt=this,ot=function(){rt.magnitudefactor*=2},ut=function(){rt.magnitudefactor/=2};q.minorStepIdx<=1&&this.minorStepIdx<=1||q.minorStepIdx>1&&this.minorStepIdx>1||(q.minorStepIdxtt+1e-5){ut(),po=!1;continue}if(!this.autoScaleStart&&this._start=0)console.warn("Can't adhere to given 'min' range, due to zeroalign");else{ut(),po=!1;continue}if(this.autoScaleStart&&this.autoScaleEnd&&wo=F.length?{done:!0}:{done:!1,value:F[K++]}},e:function(yn){throw yn},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tt=!0,rt=!1,ot;return{s:function(){q=q.call(F)},n:function(){var yn=q.next();return tt=yn.done,yn},e:function(yn){rt=!0,ot=yn},f:function(){try{!tt&&q.return!=null&&q.return()}finally{if(rt)throw ot}}}}function _unsupportedIterableToArray(F,W){var q;if(F){if(typeof F=="string")return _arrayLikeToArray(F,W);var K=_sliceInstanceProperty(q=Object.prototype.toString.call(F)).call(q,8,-1);if(K==="Object"&&F.constructor&&(K=F.constructor.name),K==="Map"||K==="Set")return _Array$from$1(F);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return _arrayLikeToArray(F,W)}}function _arrayLikeToArray(F,W){(W==null||W>F.length)&&(W=F.length);for(var q=0,K=new Array(W);q"u"||!_Reflect$construct||_Reflect$construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],function(){})),!0}catch{return!1}}var DataAxis=function(F){_inherits(q,F);var W=_createSuper(q);function q(K,X,tt,rt){var ot;_classCallCheck(this,q),ot=W.call(this),ot.id=v4(),ot.body=K,ot.defaultOptions={orientation:"left",showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,majorLinesOffset:7,minorLinesOffset:4,labelOffsetX:10,labelOffsetY:2,iconWidth:20,width:"40px",visible:!0,alignZeros:!0,left:{range:{min:void 0,max:void 0},format:function(uo){return"".concat(_parseFloat$1(uo.toPrecision(3)))},title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:function(uo){return"".concat(_parseFloat$1(uo.toPrecision(3)))},title:{text:void 0,style:void 0}}},ot.linegraphOptions=rt,ot.linegraphSVG=tt,ot.props={},ot.DOMelements={lines:{},labels:{},title:{}},ot.dom={},ot.scale=void 0,ot.range={start:0,end:0},ot.options=availableUtils.extend({},ot.defaultOptions),ot.conversionFactor=1,ot.setOptions(X),ot.width=Number("".concat(ot.options.width).replace("px","")),ot.minWidth=ot.width,ot.height=ot.linegraphSVG.getBoundingClientRect().height,ot.hidden=!1,ot.stepPixels=25,ot.zeroCrossing=-1,ot.amountOfSteps=-1,ot.lineOffset=0,ot.master=!0,ot.masterAxis=null,ot.svgElements={},ot.iconsRemoved=!1,ot.groups={},ot.amountOfGroups=0,ot._create(),ot.scale==null&&ot._redrawLabels(),ot.framework={svg:ot.svg,svgElements:ot.svgElements,options:ot.options,groups:ot.groups};var ut=_assertThisInitialized$1(ot);return ot.body.emitter.on("verticalDrag",function(){ut.dom.lineContainer.style.top="".concat(ut.body.domProps.scrollTop,"px")}),ot}return _createClass(q,[{key:"addGroup",value:function(X,tt){this.groups.hasOwnProperty(X)||(this.groups[X]=tt),this.amountOfGroups+=1}},{key:"updateGroup",value:function(X,tt){this.groups.hasOwnProperty(X)||(this.amountOfGroups+=1),this.groups[X]=tt}},{key:"removeGroup",value:function(X){this.groups.hasOwnProperty(X)&&(delete this.groups[X],this.amountOfGroups-=1)}},{key:"setOptions",value:function(X){if(X){var tt=!1;this.options.orientation!=X.orientation&&X.orientation!==void 0&&(tt=!0);var rt=["orientation","showMinorLabels","showMajorLabels","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","width","visible","left","right","alignZeros"];availableUtils.selectiveDeepExtend(rt,this.options,X),this.minWidth=Number("".concat(this.options.width).replace("px","")),tt===!0&&this.dom.frame&&(this.hide(),this.show())}}},{key:"_create",value:function(){this.dom.frame=document.createElement("div"),this.dom.frame.style.width=this.options.width,this.dom.frame.style.height=this.height,this.dom.lineContainer=document.createElement("div"),this.dom.lineContainer.style.width="100%",this.dom.lineContainer.style.height=this.height,this.dom.lineContainer.style.position="relative",this.dom.lineContainer.style.visibility="visible",this.dom.lineContainer.style.display="block",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.height="100%",this.svg.style.width="100%",this.svg.style.display="block",this.dom.frame.appendChild(this.svg)}},{key:"_redrawGroupIcons",value:function(){prepareElements(this.svgElements);var X,tt=this.options.iconWidth,rt=15,ot=4,ut=ot+.5*rt;this.options.orientation==="left"?X=ot:X=this.width-tt-ot;var yn=_Object$keys(this.groups);_sortInstanceProperty(yn).call(yn,function(wo,lf){return wo=0&&X._redrawLabel(lf-2,wo.val,rt,"vis-y-axis vis-major",X.props.majorCharHeight),X.master===!0&&(yf?X._redrawLine(lf,rt,"vis-grid vis-horizontal vis-major",X.options.majorLinesOffset,X.props.majorLineWidth):X._redrawLine(lf,rt,"vis-grid vis-horizontal vis-minor",X.options.minorLinesOffset,X.props.minorLineWidth))});var po=0;this.options[rt].title!==void 0&&this.options[rt].title.text!==void 0&&(po=this.props.titleCharHeight);var mo=this.options.icons===!0?Math.max(this.options.iconWidth,po)+this.options.labelOffsetX+15:po+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-mo&&this.options.visible===!0?(this.width=this.maxLabelSize+mo,this.options.width="".concat(this.width,"px"),cleanupElements(this.DOMelements.lines),cleanupElements(this.DOMelements.labels),this.redraw(),tt=!0):this.maxLabelSizethis.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+mo),this.options.width="".concat(this.width,"px"),cleanupElements(this.DOMelements.lines),cleanupElements(this.DOMelements.labels),this.redraw(),tt=!0):(cleanupElements(this.DOMelements.lines),cleanupElements(this.DOMelements.labels),tt=!1),tt}},{key:"convertValue",value:function(X){return this.scale.convertValue(X)}},{key:"screenToValue",value:function(X){return this.scale.screenToValue(X)}},{key:"_redrawLabel",value:function(X,tt,rt,ot,ut){var yn=getDOMElement("div",this.DOMelements.labels,this.dom.frame);yn.className=ot,yn.innerHTML=availableUtils.xss(tt),rt==="left"?(yn.style.left="-".concat(this.options.labelOffsetX,"px"),yn.style.textAlign="right"):(yn.style.right="-".concat(this.options.labelOffsetX,"px"),yn.style.textAlign="left"),yn.style.top="".concat(X-.5*ut+this.options.labelOffsetY,"px"),tt+="";var uo=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize"u"?{}:W,{style:W.style||F.options.drawPoints.style,styles:W.styles||F.options.drawPoints.styles,size:W.size||F.options.drawPoints.size,className:W.className||F.className}}function getCallback(F,W){var q=void 0;return F.options&&F.options.drawPoints&&F.options.drawPoints.onRender&&typeof F.options.drawPoints.onRender=="function"&&(q=F.options.drawPoints.onRender),W.group.options&&W.group.options.drawPoints&&W.group.options.drawPoints.onRender&&typeof W.group.options.drawPoints.onRender=="function"&&(q=W.group.options.drawPoints.onRender),q}function Bargraph(F,W){}Bargraph.drawIcon=function(F,W,q,K,X,tt){var rt=X*.5,ot=getSVGElement("rect",tt.svgElements,tt.svg);ot.setAttributeNS(null,"x",W),ot.setAttributeNS(null,"y",q-rt),ot.setAttributeNS(null,"width",K),ot.setAttributeNS(null,"height",2*rt),ot.setAttributeNS(null,"class","vis-outline");var ut=Math.round(.3*K),yn=F.options.barChart.width,uo=yn/ut,po=Math.round(.4*X),mo=Math.round(.75*X),wo=Math.round((K-2*ut)/3);if(drawBar(W+.5*ut+wo,q+rt-po-1,ut,po,F.className+" vis-bar",tt.svgElements,tt.svg,F.style),drawBar(W+1.5*ut+wo+2,q+rt-mo-1,ut,mo,F.className+" vis-bar",tt.svgElements,tt.svg,F.style),F.options.drawPoints.enabled==!0){var lf={style:F.options.drawPoints.style,styles:F.options.drawPoints.styles,size:F.options.drawPoints.size/uo,className:F.className};drawPoint(W+.5*ut+wo,q+rt-po-1,lf,tt.svgElements,tt.svg),drawPoint(W+1.5*ut+wo+2,q+rt-mo-1,lf,tt.svgElements,tt.svg)}};Bargraph.draw=function(F,W,q){var K=[],X={},tt,rt,ot,ut,yn,uo,po=0;for(yn=0;yn0&&(q=Math.min(q,Math.abs(W[K-1].screen_x-W[K].screen_x))),q===0&&(F[W[K].screen_x]===void 0&&(F[W[K].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),F[W[K].screen_x].amount+=1)};Bargraph._getSafeDrawData=function(F,W,q){var K,X;return F0?(K=F0){_sortInstanceProperty(F).call(F,function(rt,ot){return rt.screen_x===ot.screen_x?rt.groupIdW[tt].screen_y?W[tt].screen_y:K,X=XF[rt].accumulatedNegative?F[rt].accumulatedNegative:K,K=K>F[rt].accumulatedPositive?F[rt].accumulatedPositive:K,X=X0){var q=[];return W.options.interpolation.enabled==!0?q=Line._catmullRom(F,W):q=Line._linear(F),q}};Line.drawIcon=function(F,W,q,K,X,tt){var rt=X*.5,ot,ut,yn=getSVGElement("rect",tt.svgElements,tt.svg);if(yn.setAttributeNS(null,"x",W),yn.setAttributeNS(null,"y",q-rt),yn.setAttributeNS(null,"width",K),yn.setAttributeNS(null,"height",2*rt),yn.setAttributeNS(null,"class","vis-outline"),ot=getSVGElement("path",tt.svgElements,tt.svg),ot.setAttributeNS(null,"class",F.className),F.style!==void 0&&ot.setAttributeNS(null,"style",F.style),ot.setAttributeNS(null,"d","M"+W+","+q+" L"+(W+K)+","+q),F.options.shaded.enabled==!0&&(ut=getSVGElement("path",tt.svgElements,tt.svg),F.options.shaded.orientation=="top"?ut.setAttributeNS(null,"d","M"+W+", "+(q-rt)+"L"+W+","+q+" L"+(W+K)+","+q+" L"+(W+K)+","+(q-rt)):ut.setAttributeNS(null,"d","M"+W+","+q+" L"+W+","+(q+rt)+" L"+(W+K)+","+(q+rt)+"L"+(W+K)+","+q),ut.setAttributeNS(null,"class",F.className+" vis-icon-fill"),F.options.shaded.style!==void 0&&F.options.shaded.style!==""&&ut.setAttributeNS(null,"style",F.options.shaded.style)),F.options.drawPoints.enabled==!0){var uo={style:F.options.drawPoints.style,styles:F.options.drawPoints.styles,size:F.options.drawPoints.size,className:F.className};drawPoint(W+.5*K,q,uo,tt.svgElements,tt.svg)}};Line.drawShading=function(F,W,q,K){if(W.options.shaded.enabled==!0){var X=Number(K.svg.style.height.replace("px","")),tt=getSVGElement("path",K.svgElements,K.svg),rt="L";W.options.interpolation.enabled==!0&&(rt="C");var ot,ut=0;W.options.shaded.orientation=="top"?ut=0:W.options.shaded.orientation=="bottom"?ut=X:ut=Math.min(Math.max(0,W.zeroPosition),X),W.options.shaded.orientation=="group"&&q!=null&&q!=null?ot="M"+F[0][0]+","+F[0][1]+" "+this.serializePath(F,rt,!1)+" L"+q[q.length-1][0]+","+q[q.length-1][1]+" "+this.serializePath(q,rt,!0)+q[0][0]+","+q[0][1]+" Z":ot="M"+F[0][0]+","+F[0][1]+" "+this.serializePath(F,rt,!1)+" V"+ut+" H"+F[0][0]+" Z",tt.setAttributeNS(null,"class",W.className+" vis-fill"),W.options.shaded.style!==void 0&&tt.setAttributeNS(null,"style",W.options.shaded.style),tt.setAttributeNS(null,"d",ot)}};Line.draw=function(F,W,q){if(F!=null&&F!=null){var K=getSVGElement("path",q.svgElements,q.svg);K.setAttributeNS(null,"class",W.className),W.style!==void 0&&K.setAttributeNS(null,"style",W.style);var X="L";W.options.interpolation.enabled==!0&&(X="C"),K.setAttributeNS(null,"d","M"+F[0][0]+","+F[0][1]+" "+this.serializePath(F,X,!1))}};Line.serializePath=function(F,W,q){if(F.length<2)return"";var K=W,X;if(q)for(X=F.length-2;X>0;X--)K+=F[X][0]+","+F[X][1]+" ";else for(X=1;X0&&(lf=1/lf),yf=3*cf*(cf+vf),yf>0&&(yf=1/yf),ot={screen_x:(-$f*K.screen_x+mo*X.screen_x+xf*tt.screen_x)*lf,screen_y:(-$f*K.screen_y+mo*X.screen_y+xf*tt.screen_y)*lf},ut={screen_x:(_f*X.screen_x+wo*tt.screen_x-$f*rt.screen_x)*yf,screen_y:(_f*X.screen_y+wo*tt.screen_y-$f*rt.screen_y)*yf},ot.screen_x==0&&ot.screen_y==0&&(ot=X),ut.screen_x==0&&ut.screen_y==0&&(ut=tt),Cf.push([ot.screen_x,ot.screen_y]),Cf.push([ut.screen_x,ut.screen_y]),Cf.push([tt.screen_x,tt.screen_y]);return Cf};Line._linear=function(F){for(var W=[],q=0;qq.x?1:-1})):this.itemsData=[]};GraphGroup.prototype.getItems=function(){return this.itemsData};GraphGroup.prototype.setZeroPosition=function(F){this.zeroPosition=F};GraphGroup.prototype.setOptions=function(F){if(F!==void 0){var W=["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"];availableUtils.selectiveDeepExtend(W,this.options,F),typeof F.drawPoints=="function"&&(F.drawPoints={onRender:F.drawPoints}),availableUtils.mergeOptions(this.options,F,"interpolation"),availableUtils.mergeOptions(this.options,F,"drawPoints"),availableUtils.mergeOptions(this.options,F,"shaded"),F.interpolation&&_typeof(F.interpolation)=="object"&&F.interpolation.parametrization&&(F.interpolation.parametrization=="uniform"?this.options.interpolation.alpha=0:F.interpolation.parametrization=="chordal"?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}};GraphGroup.prototype.update=function(F){this.group=F,this.content=F.content||"graph",this.className=F.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=F.visible===void 0?!0:F.visible,this.style=F.style,this.setOptions(F.options)};GraphGroup.prototype.getLegend=function(F,W,q,K,X){if(q==null||q==null){var tt=document.createElementNS("http://www.w3.org/2000/svg","svg");q={svg:tt,svgElements:{},options:this.options,groups:[this]}}switch((K==null||K==null)&&(K=0),(X==null||X==null)&&(X=.5*W),this.options.style){case"line":Line.drawIcon(this,K,X,F,W,q);break;case"points":case"point":Points.drawIcon(this,K,X,F,W,q);break;case"bar":Bargraph.drawIcon(this,K,X,F,W,q);break}return{icon:q.svg,label:this.content,orientation:this.options.yAxisOrientation}};GraphGroup.prototype.getYRange=function(F){for(var W=F[0].y,q=F[0].y,K=0;KF[K].y?F[K].y:W,q=q");this.dom.textArea.innerHTML=availableUtils.xss(tt),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}};Legend.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var F=_Object$keys(this.groups);_sortInstanceProperty(F).call(F,function(yn,uo){return yn0){var ot={};for(this._getRelevantData(rt,ot,X,tt),this._applySampling(rt,ot),W=0;W0)switch(F.options.style){case"line":yn.hasOwnProperty(rt[W])||(yn[rt[W]]=Line.calcPath(ot[rt[W]],F)),Line.draw(yn[rt[W]],F,this.framework);case"point":case"points":(F.options.style=="point"||F.options.style=="points"||F.options.drawPoints.enabled==!0)&&Points.draw(ot[rt[W]],F,this.framework);break}}}return cleanupElements(this.svgElements),!1};LineGraph.prototype._stack=function(F,W){var q,K,X,tt,rt;q=0;for(var ot=0;otF[ot].x){rt=W[ut],ut==0?tt=rt:tt=W[ut-1],q=ut;break}rt===void 0&&(tt=W[W.length-1],rt=W[W.length-1]),K=rt.x-tt.x,X=rt.y-tt.y,K==0?F[ot].y=F[ot].orginalY+rt.y:F[ot].y=F[ot].orginalY+X/K*(F[ot].x-tt.x)+tt.y}};LineGraph.prototype._getRelevantData=function(F,W,q,K){var X,tt,rt,ot;if(F.length>0)for(tt=0;tt0){for(var K=0;K0){var tt=1,rt=X.length,ot=this.body.util.toGlobalScreen(X[X.length-1].x)-this.body.util.toGlobalScreen(X[0].x),ut=rt/ot;tt=Math.min(Math.ceil(.2*rt),Math.max(1,Math.round(ut)));for(var yn=new Array(rt),uo=0;uo0){for(tt=0;tt0&&(X=this.groups[F[tt]],ut.stack===!0&&ut.style==="bar"?ut.yAxisOrientation==="left"?rt=_concatInstanceProperty(rt).call(rt,K):ot=_concatInstanceProperty(ot).call(ot,K):q[F[tt]]=X.getYRange(K,F[tt]));Bargraph.getStackedYRange(rt,q,F,"__barStackLeft","left"),Bargraph.getStackedYRange(ot,q,F,"__barStackRight","right")}};LineGraph.prototype._updateYAxis=function(F,W){var q=!1,K=!1,X=!1,tt=1e9,rt=1e9,ot=-1e9,ut=-1e9,yn,uo;if(F.length>0){for(var po=0;poyn?yn:tt,ot=otyn?yn:rt,ut=uttt?tt:F,W=W==null||W0&&yn.push(uo.screenToValue(X)),!po.hidden&&this.itemsData.length>0&&yn.push(po.screenToValue(X)),{event:F,customTime:rt?rt.options.id:null,what:ut,pageX:F.srcEvent?F.srcEvent.pageX:F.pageX,pageY:F.srcEvent?F.srcEvent.pageY:F.pageY,x:K,y:X,time:tt,value:yn}};Graph2d.prototype._createConfigurator=function(){return new Configurator(this,this.dom.container,configureOptions)};var defaultLanguage=getNavigatorLanguage();hooks.locale(defaultLanguage);const _sfc_main=defineComponent({__name:"VisJS.ce",props:{base:{type:String},caption:{type:String},height:{type:Number},timeline:{type:String},edges:{type:String},nodes:{type:String},url:{type:String},hierarchical:{type:Boolean,default:!1}},setup(F){const W=F;watch$1(W,()=>{vf()});const q=ref(null),K=computed(()=>{var $f,xf;return(xf=($f=q.value)==null?void 0:$f.getRootNode())==null?void 0:xf.host}),X=ref(null),tt=ref(null),rt=self.window,ot=ref(rt.config||{}),ut=computed(()=>{var $f;if(($f=ot.value.source)!=null&&$f.owner)return ot.value.source;if(W.base){let[xf,Af,Cf,...Pf]=W.base.split("/");return{owner:xf,repository:Af,branch:Cf,dir:Pf?`/${Pf.join("/")}/`:"/"}}return null}),yn=computed(()=>W.caption);function uo($f){let xf=document.getElementById($f)||K.value.parentElement.querySelector(`#${$f}`),Af=Array.from((xf==null?void 0:xf.querySelectorAll("th"))||[]).map(Cf=>{var Pf;return(Pf=Cf.textContent)==null?void 0:Pf.trim()});return Array.from((xf==null?void 0:xf.querySelectorAll("tbody > tr"))||[]).map(Cf=>Object.fromEntries(Array.from(Cf.children).map((Pf,Bf)=>{var Hf;return[Af[Bf],(Hf=Pf.textContent)==null?void 0:Hf.trim()]}).filter(([Pf,Bf])=>Pf&&Bf))).filter(Cf=>Object.keys(Cf).length>0)}function po($f,xf=" "){const Af=[],Cf=$f.split(` +`).filter(Pf=>Pf.trim()!=="");if(Cf.length>1){const Pf=Cf[0].split(xf).map(Df=>Df.trim());Cf.slice(1).forEach(Df=>{let Lf={};Df.split(xf).map(kf=>kf.trim()).forEach((kf,Nf)=>{let Yf=Pf[Nf].split("."),Gf=Yf[0],rp=Yf.length===2?Yf[1]:"id";Lf[Gf]||(Lf[Gf]={}),(kf||rp==="id")&&(Lf[Gf][rp]=kf)}),Af.push(Lf)});let Bf=0,Hf={};Af.forEach(Df=>{Object.values(Df).forEach(Lf=>{Lf.id===""&&Lf.label&&(Hf[Lf.label]||(Hf[Lf.label]=++Bf),Lf.id=Hf[Lf.label])})})}return Af}const mo=ref(),wo=ref(),lf=ref(),yf=computed(()=>({nodes:mo.value,edges:wo.value}));watch$1(yf,$f=>nextTick(()=>new Network(X.value,$f,{layout:{hierarchical:W.hierarchical}})));const cf=computed(()=>lf.value);watch$1(cf,$f=>{new Timeline(X.value,$f,{})});function vf(){var xf,Af;let $f=(W.height||((xf=q.value)==null?void 0:xf.clientHeight)||0)-6;X.value&&(X.value.style.height=`${$f-(((Af=tt.value)==null?void 0:Af.clientHeight)||40)}px`),q.value&&(q.value.style.height=`${$f}px`)}function _f($f){$f.indexOf("http")!==0&&($f=`https://raw.githubusercontent.com/${ut.value.owner}/${ut.value.repository}/${ut.value.branch}${ut.value.dir}${$f}`),fetch($f).then(xf=>xf.text()).then(xf=>{let Af=po(xf),Cf={};Af.forEach(Pf=>{Cf[Pf.source.id]||(Cf[Pf.source.id]={id:Pf.source.id,label:Pf.source.label}),Cf[Pf.target.id]||(Cf[Pf.target.id]={id:Pf.target.id,label:Pf.target.label})}),mo.value=new DataSet(Object.values(Cf)),wo.value=new DataSet(Af.map(Pf=>({from:Pf.source.id,to:Pf.target.id})))})}return watch$1(X,$f=>{$f&&(vf(),W.timeline&&(lf.value=new DataSet(uo(W.timeline))),W.edges&&(wo.value=new DataSet(uo(W.edges))),W.nodes&&(mo.value=new DataSet(uo(W.nodes))),W.url&&_f(W.url))}),($f,xf)=>(openBlock(),createElementBlock("div",{ref_key:"root",ref:q,class:"content"},[createBaseVNode("div",{ref_key:"diagramEl",ref:X,class:"diagram"},null,512),yn.value?(openBlock(),createElementBlock("div",{key:0,ref_key:"captionEl",ref:tt,class:"caption"},toDisplayString(yn.value),513)):createCommentVNode("",!0)],512))}}),_style_0=`.vis [class*=span]{min-height:0;width:auto}.vis-current-time{background-color:#ff7f6e;width:2px;z-index:1;pointer-events:none}.vis-rolling-mode-btn{height:40px;width:40px;position:absolute;top:7px;right:20px;border-radius:50%;font-size:28px;cursor:pointer;opacity:.8;color:#fff;font-weight:700;text-align:center;background:#3876c2}.vis-rolling-mode-btn:before{content:"⛶"}.vis-rolling-mode-btn:hover{opacity:1}.vis-timeline{position:relative;border:1px solid #bfbfbf;overflow:hidden;padding:0;margin:0;box-sizing:border-box}.vis-loading-screen{width:100%;height:100%;position:absolute;top:0;left:0}.vis-panel{position:absolute;padding:0;margin:0;box-sizing:border-box}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right,.vis-panel.vis-top{border:1px #bfbfbf}.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right{border-top-style:solid;border-bottom-style:solid;overflow:hidden}.vis-left.vis-panel.vis-vertical-scroll,.vis-right.vis-panel.vis-vertical-scroll{height:100%;overflow-x:hidden;overflow-y:scroll}.vis-left.vis-panel.vis-vertical-scroll{direction:rtl}.vis-left.vis-panel.vis-vertical-scroll .vis-content,.vis-right.vis-panel.vis-vertical-scroll{direction:ltr}.vis-right.vis-panel.vis-vertical-scroll .vis-content{direction:rtl}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-top{border-left-style:solid;border-right-style:solid}.vis-background{overflow:hidden}.vis-panel>.vis-content{position:relative}.vis-panel .vis-shadow{position:absolute;width:100%;height:1px;box-shadow:0 0 10px #000c}.vis-panel .vis-shadow.vis-top{top:-1px;left:0}.vis-panel .vis-shadow.vis-bottom{bottom:-1px;left:0}.vis-graph-group0{fill:#4f81bd;fill-opacity:0;stroke-width:2px;stroke:#4f81bd}.vis-graph-group1{fill:#f79646;fill-opacity:0;stroke-width:2px;stroke:#f79646}.vis-graph-group2{fill:#8c51cf;fill-opacity:0;stroke-width:2px;stroke:#8c51cf}.vis-graph-group3{fill:#75c841;fill-opacity:0;stroke-width:2px;stroke:#75c841}.vis-graph-group4{fill:#ff0100;fill-opacity:0;stroke-width:2px;stroke:#ff0100}.vis-graph-group5{fill:#37d8e6;fill-opacity:0;stroke-width:2px;stroke:#37d8e6}.vis-graph-group6{fill:#042662;fill-opacity:0;stroke-width:2px;stroke:#042662}.vis-graph-group7{fill:#00ff26;fill-opacity:0;stroke-width:2px;stroke:#00ff26}.vis-graph-group8{fill:#f0f;fill-opacity:0;stroke-width:2px;stroke:#f0f}.vis-graph-group9{fill:#8f3938;fill-opacity:0;stroke-width:2px;stroke:#8f3938}.vis-timeline .vis-fill{fill-opacity:.1;stroke:none}.vis-timeline .vis-bar{fill-opacity:.5;stroke-width:1px}.vis-timeline .vis-point{stroke-width:2px;fill-opacity:1}.vis-timeline .vis-legend-background{stroke-width:1px;fill-opacity:.9;fill:#fff;stroke:#c2c2c2}.vis-timeline .vis-outline{stroke-width:1px;fill-opacity:1;fill:#fff;stroke:#e5e5e5}.vis-timeline .vis-icon-fill{fill-opacity:.3;stroke:none}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal{position:absolute;width:100%;height:0;border-bottom:1px solid}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor{border-color:#e5e5e5}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-major{border-color:#bfbfbf}.vis-data-axis .vis-y-axis.vis-major{width:100%;position:absolute;color:#4d4d4d;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-major.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-minor{position:absolute;width:100%;color:#bebebe;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-minor.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title{position:absolute;color:#4d4d4d;white-space:nowrap;bottom:20px;text-align:center}.vis-data-axis .vis-y-axis.vis-title.vis-measure{padding:0;margin:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title.vis-left{bottom:0;transform-origin:left bottom;transform:rotate(-90deg)}.vis-data-axis .vis-y-axis.vis-title.vis-right{bottom:0;transform-origin:right bottom;transform:rotate(90deg)}.vis-legend{background-color:#f7fcffa6;padding:5px;border:1px solid #b3b3b3;box-shadow:2px 2px 10px #9a9a9a8c}.vis-legend-text{white-space:nowrap;display:inline-block}.vis-itemset{position:relative;padding:0;margin:0;box-sizing:border-box}.vis-itemset .vis-background,.vis-itemset .vis-foreground{position:absolute;width:100%;height:100%;overflow:visible}.vis-axis{position:absolute;width:100%;height:0;left:0;z-index:1}.vis-foreground .vis-group{position:relative;box-sizing:border-box;border-bottom:1px solid #bfbfbf}.vis-foreground .vis-group:last-child{border-bottom:none}.vis-nesting-group{cursor:pointer}.vis-label.vis-nested-group.vis-group-level-unknown-but-gte1{background:#f5f5f5}.vis-label.vis-nested-group.vis-group-level-0{background-color:#fff}.vis-ltr .vis-label.vis-nested-group.vis-group-level-0 .vis-inner{padding-left:0}.vis-rtl .vis-label.vis-nested-group.vis-group-level-0 .vis-inner{padding-right:0}.vis-label.vis-nested-group.vis-group-level-1{background-color:#0000000d}.vis-ltr .vis-label.vis-nested-group.vis-group-level-1 .vis-inner{padding-left:15px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-1 .vis-inner{padding-right:15px}.vis-label.vis-nested-group.vis-group-level-2{background-color:#0000001a}.vis-ltr .vis-label.vis-nested-group.vis-group-level-2 .vis-inner{padding-left:30px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-2 .vis-inner{padding-right:30px}.vis-label.vis-nested-group.vis-group-level-3{background-color:#00000026}.vis-ltr .vis-label.vis-nested-group.vis-group-level-3 .vis-inner{padding-left:45px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-3 .vis-inner{padding-right:45px}.vis-label.vis-nested-group.vis-group-level-4{background-color:#0003}.vis-ltr .vis-label.vis-nested-group.vis-group-level-4 .vis-inner{padding-left:60px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-4 .vis-inner{padding-right:60px}.vis-label.vis-nested-group.vis-group-level-5{background-color:#00000040}.vis-ltr .vis-label.vis-nested-group.vis-group-level-5 .vis-inner{padding-left:75px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-5 .vis-inner{padding-right:75px}.vis-label.vis-nested-group.vis-group-level-6{background-color:#0000004d}.vis-ltr .vis-label.vis-nested-group.vis-group-level-6 .vis-inner{padding-left:90px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-6 .vis-inner{padding-right:90px}.vis-label.vis-nested-group.vis-group-level-7{background-color:#00000059}.vis-ltr .vis-label.vis-nested-group.vis-group-level-7 .vis-inner{padding-left:105px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-7 .vis-inner{padding-right:105px}.vis-label.vis-nested-group.vis-group-level-8{background-color:#0006}.vis-ltr .vis-label.vis-nested-group.vis-group-level-8 .vis-inner{padding-left:120px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-8 .vis-inner{padding-right:120px}.vis-label.vis-nested-group.vis-group-level-9{background-color:#00000073}.vis-ltr .vis-label.vis-nested-group.vis-group-level-9 .vis-inner{padding-left:135px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-9 .vis-inner{padding-right:135px}.vis-label.vis-nested-group{background-color:#00000080}.vis-ltr .vis-label.vis-nested-group .vis-inner{padding-left:150px}.vis-rtl .vis-label.vis-nested-group .vis-inner{padding-right:150px}.vis-group-level-unknown-but-gte1{border:1px solid red}.vis-label.vis-nesting-group:before{display:inline-block;width:15px}.vis-label.vis-nesting-group.expanded:before{content:"▼"}.vis-label.vis-nesting-group.collapsed:before{content:"▶"}.vis-rtl .vis-label.vis-nesting-group.collapsed:before{content:"◀"}.vis-ltr .vis-label:not(.vis-nesting-group):not(.vis-group-level-0){padding-left:15px}.vis-rtl .vis-label:not(.vis-nesting-group):not(.vis-group-level-0){padding-right:15px}.vis-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-labelset{position:relative;overflow:hidden;box-sizing:border-box}.vis-labelset .vis-label{position:relative;left:0;top:0;width:100%;color:#4d4d4d;box-sizing:border-box;border-bottom:1px solid #bfbfbf}.vis-labelset .vis-label.draggable{cursor:pointer}.vis-group-is-dragging{background:rgba(0,0,0,.1)}.vis-labelset .vis-label:last-child{border-bottom:none}.vis-labelset .vis-label .vis-inner{display:inline-block;padding:5px}.vis-labelset .vis-label .vis-inner.vis-hidden{padding:0}.vis-time-axis{position:relative;overflow:hidden}.vis-time-axis.vis-foreground{top:0;left:0;width:100%}.vis-time-axis.vis-background{position:absolute;top:0;left:0;width:100%;height:100%}.vis-time-axis .vis-text{position:absolute;color:#4d4d4d;padding:3px;overflow:hidden;box-sizing:border-box;white-space:nowrap}.vis-time-axis .vis-text.vis-measure{position:absolute;padding-left:0;padding-right:0;margin-left:0;margin-right:0;visibility:hidden}.vis-time-axis .vis-grid.vis-vertical{position:absolute;border-left:1px solid}.vis-time-axis .vis-grid.vis-vertical-rtl{position:absolute;border-right:1px solid}.vis-time-axis .vis-grid.vis-minor{border-color:#e5e5e5}.vis-time-axis .vis-grid.vis-major{border-color:#bfbfbf}.vis-custom-time{background-color:#6e94ff;width:2px;cursor:move;z-index:1}.vis-custom-time>.vis-custom-time-marker{background-color:inherit;color:#fff;font-size:12px;white-space:nowrap;padding:3px 5px;top:0;cursor:initial;z-index:inherit}.vis-item{position:absolute;color:#1a1a1a;border-color:#97b0f8;border-width:1px;background-color:#d5ddf6;display:inline-block;z-index:1}.vis-item.vis-selected{border-color:#ffc200;background-color:#fff785;z-index:2}.vis-editable.vis-selected{cursor:move}.vis-item.vis-point.vis-selected{background-color:#fff785}.vis-item.vis-box{text-align:center;border-style:solid;border-radius:2px}.vis-item.vis-point{background:0 0}.vis-item.vis-dot{position:absolute;padding:0;border-width:4px;border-style:solid;border-radius:4px}.vis-item.vis-range{border-style:solid;border-radius:2px;box-sizing:border-box}.vis-item.vis-background{border:none;background-color:#d5ddf666;box-sizing:border-box;padding:0;margin:0}.vis-item .vis-item-overflow{position:relative;width:100%;height:100%;padding:0;margin:0;overflow:hidden}.vis-item-visible-frame{white-space:nowrap}.vis-item.vis-range .vis-item-content{position:relative;display:inline-block}.vis-item.vis-background .vis-item-content{position:absolute;display:inline-block}.vis-item.vis-line{padding:0;position:absolute;width:0;border-left-width:1px;border-left-style:solid}.vis-item .vis-item-content{white-space:nowrap;box-sizing:border-box;padding:5px}.vis-item .vis-onUpdateTime-tooltip{position:absolute;background:#4f81bd;color:#fff;width:200px;text-align:center;white-space:nowrap;padding:5px;border-radius:1px;transition:.4s;-o-transition:.4s;-moz-transition:.4s;-webkit-transition:.4s}.vis-item .vis-delete,.vis-item .vis-delete-rtl{position:absolute;top:0;width:24px;height:24px;box-sizing:border-box;padding:0 5px;cursor:pointer;transition:background .2s linear}.vis-item .vis-delete{right:-24px}.vis-item .vis-delete-rtl{left:-24px}.vis-item .vis-delete-rtl:after,.vis-item .vis-delete:after{content:"×";color:red;font-family:arial,sans-serif;font-size:22px;font-weight:700;transition:color .2s linear}.vis-item .vis-delete-rtl:hover,.vis-item .vis-delete:hover{background:red}.vis-item .vis-delete-rtl:hover:after,.vis-item .vis-delete:hover:after{color:#fff}.vis-item .vis-drag-center{position:absolute;width:100%;height:100%;top:0;left:0;cursor:move}.vis-item.vis-range .vis-drag-left{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0;left:-4px;cursor:w-resize}.vis-item.vis-range .vis-drag-right{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0;right:-4px;cursor:e-resize}.vis-range.vis-item.vis-readonly .vis-drag-left,.vis-range.vis-item.vis-readonly .vis-drag-right{cursor:auto}.vis-item.vis-cluster{vertical-align:center;text-align:center;border-style:solid;border-radius:2px}.vis-item.vis-cluster-line{padding:0;position:absolute;width:0;border-left-width:1px;border-left-style:solid}.vis-item.vis-cluster-dot{position:absolute;padding:0;border-width:4px;border-style:solid;border-radius:4px}.vis .overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}div.vis-configuration{position:relative;display:block;float:left;font-size:12px}div.vis-configuration-wrapper{display:block;width:700px}div.vis-configuration-wrapper:after{clear:both;content:"";display:block}div.vis-configuration.vis-config-option-container{display:block;width:495px;background-color:#fff;border:2px solid #f7f8fa;border-radius:4px;margin-top:20px;left:10px;padding-left:5px}div.vis-configuration.vis-config-button{display:block;width:495px;height:25px;vertical-align:middle;line-height:25px;background-color:#f7f8fa;border:2px solid #ceced0;border-radius:4px;margin-top:20px;left:10px;padding-left:5px;cursor:pointer;margin-bottom:30px}div.vis-configuration.vis-config-button.hover{background-color:#4588e6;border:2px solid #214373;color:#fff}div.vis-configuration.vis-config-item{display:block;float:left;width:495px;height:25px;vertical-align:middle;line-height:25px}div.vis-configuration.vis-config-item.vis-config-s2{left:10px;background-color:#f7f8fa;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s3{left:20px;background-color:#e4e9f0;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s4{left:30px;background-color:#cfd8e6;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-header{font-size:18px;font-weight:700}div.vis-configuration.vis-config-label{width:120px;height:25px;line-height:25px}div.vis-configuration.vis-config-label.vis-config-s3{width:110px}div.vis-configuration.vis-config-label.vis-config-s4{width:100px}div.vis-configuration.vis-config-colorBlock{top:1px;width:30px;height:19px;border:1px solid #444;border-radius:2px;padding:0;margin:0;cursor:pointer}input.vis-configuration.vis-config-checkbox{left:-5px}input.vis-configuration.vis-config-rangeinput{position:relative;top:-5px;width:60px;padding:1px;margin:0;pointer-events:none}input.vis-configuration.vis-config-range{-webkit-appearance:none;border:0 solid #fff;background-color:#0000;width:300px;height:20px}input.vis-configuration.vis-config-range::-webkit-slider-runnable-track{width:300px;height:5px;background:#dedede;background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);border:1px solid #999;box-shadow:#aaa 0 0 3px;border-radius:3px}input.vis-configuration.vis-config-range::-webkit-slider-thumb{-webkit-appearance:none;border:1px solid #14334b;height:17px;width:17px;border-radius:50%;background:#3876c2;background:linear-gradient(to bottom,#3876c2 0,#385380 100%);box-shadow:#111927 0 0 1px;margin-top:-7px}input.vis-configuration.vis-config-range:focus{outline:0}input.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track{background:#9d9d9d;background:linear-gradient(to bottom,#9d9d9d 0,#c8c8c8 99%)}input.vis-configuration.vis-config-range::-moz-range-track{width:300px;height:10px;background:#dedede;background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);border:1px solid #999;box-shadow:#aaa 0 0 3px;border-radius:3px}input.vis-configuration.vis-config-range::-moz-range-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:-moz-focusring{outline:1px solid #fff;outline-offset:-1px}input.vis-configuration.vis-config-range::-ms-track{width:300px;height:5px;background:0 0;border-color:transparent;border-width:6px 0;color:transparent}input.vis-configuration.vis-config-range::-ms-fill-lower{background:#777;border-radius:10px}input.vis-configuration.vis-config-range::-ms-fill-upper{background:#ddd;border-radius:10px}input.vis-configuration.vis-config-range::-ms-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:focus::-ms-fill-lower{background:#888}input.vis-configuration.vis-config-range:focus::-ms-fill-upper{background:#ccc}.vis-configuration-popup{position:absolute;background:rgba(57,76,89,.85);border:2px solid #f2faff;line-height:30px;height:30px;width:150px;text-align:center;color:#fff;font-size:14px;border-radius:4px;transition:opacity .3s ease-in-out}.vis-configuration-popup:after,.vis-configuration-popup:before{left:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.vis-configuration-popup:after{border-color:#88b7d500;border-left-color:#394c59d9;border-width:8px;margin-top:-8px}.vis-configuration-popup:before{border-color:#c2e1f500;border-left-color:#f2faff;border-width:12px;margin-top:-12px}div.vis-tooltip{position:absolute;visibility:hidden;padding:5px;white-space:nowrap;font-family:verdana;font-size:14px;color:#000;background-color:#f5f4ed;border-radius:3px;border:1px solid #808074;box-shadow:3px 3px 10px #0003;pointer-events:none;z-index:5}*{box-sizing:border-box}.content{display:flex;flex-direction:column;justify-content:center;align-content:center;box-shadow:0 2px 4px #00000080!important;background-color:#fff;width:100%}.diagram{display:block;flex:1}.caption{text-align:start;padding:6px 12px;font-size:1em;line-height:1.1;border:1px solid #ddd;background-color:#fff} `,VisJS=_export_sfc(_sfc_main,[["styles",[_style_0]]]);__vitePreload(()=>import("./preline-7d6f83a6.js").then(F=>F.p),[]);function defineCustomElements(){customElements.define("ve-animated-image",defineCustomElement(AnimatedImage)),customElements.define("ve-annotate",defineCustomElement(_sfc_main$w)),customElements.define("ve-article",defineCustomElement(Article)),customElements.define("ve-audio",defineCustomElement(Audio)),customElements.define("ve-breadcrumbs",defineCustomElement(Breadcrumbs)),customElements.define("ve-compare",defineCustomElement(Compare)),customElements.define("ve-content-selector",defineCustomElement(ContentSelector)),customElements.define("ve-entities",defineCustomElement(Entities)),customElements.define("ve-entity-card",defineCustomElement(EntityCard)),customElements.define("ve-entity-infobox",defineCustomElement(EntityInfobox)),customElements.define("ve-footer",defineCustomElement(Footer)),customElements.define("ve-gallery",defineCustomElement(Gallery)),customElements.define("ve-gh-file-selector",defineCustomElement(GhFileSelector)),customElements.define("ve-header",defineCustomElement(Header)),customElements.define("ve-iframe",defineCustomElement(IFrame)),customElements.define("ve-image",defineCustomElement(Image$3)),customElements.define("ve-caption",defineCustomElement(Caption)),customElements.define("ve-info-card",defineCustomElement(InfoCard)),customElements.define("ve-j1-viewers",defineCustomElement(Juncture1Viewers)),customElements.define("ve-j1-viewers-slots",defineCustomElement(Juncture1ViewersSlots)),customElements.define("ve-knightlab-timeline",defineCustomElement(KnightlabTimeline)),customElements.define("ve-manifest",defineCustomElement(Manifest)),customElements.define("ve-manifest-popup",defineCustomElement(ManifestPopup)),customElements.define("ve-map",defineCustomElement(Map$3)),customElements.define("ve-menu",defineCustomElement(Menu)),customElements.define("ve-mermaid",defineCustomElement(Mermaid)),customElements.define("ve-meta",defineCustomElement(_sfc_main$7)),customElements.define("ve-modal",defineCustomElement(Modal)),customElements.define("ve-plant-specimen",defineCustomElement(_sfc_main$5)),customElements.define("ve-site-search",defineCustomElement(SiteSearch)),customElements.define("ve-snippet",defineCustomElement(Snippet)),customElements.define("ve-source-viewer",defineCustomElement(SourceViewer)),customElements.define("ve-video",defineCustomElement(Video)),customElements.define("ve-visjs",defineCustomElement(VisJS))}console.log("juncture: version=3.1.0");defineCustomElements();export{constant$1 as $,isFunction$1 as A,utils as B,rgba$1 as C,setDiagramTitle as D,getDiagramTitle as E,clear$1 as F,curveBasis as G,parseGenericTypes as H,setupGraphViewbox as I,random as J,define$1 as K,extend$6 as L,Color$2 as M,rgbConvert as N,nogamma as O,hue as P,commonjsGlobal$3 as Q,Rgb as R,Selection$1 as S,dayjs as T,selectSvgElement as U,tau as V,defaultConfig$2 as W,cleanAndMerge as X,parseFontSize as Y,getThemeVariables$2 as Z,getConfig$1 as _,getAccTitle as a,Stack as a$,interpolateNumber as a0,color as a1,interpolateRgb as a2,interpolateString as a3,hasKatex as a4,calculateMathMLDimensions as a5,ZERO_WIDTH_SPACE as a6,generateId as a7,isObject$n as a8,setToString$1 as a9,epsilon as aA,sqrt$1 as aB,min$6 as aC,abs$5 as aD,atan2 as aE,asin as aF,acos as aG,max$7 as aH,_$4 as aI,Color$1 as aJ,isObjectLike as aK,baseGetTag as aL,Symbol$7 as aM,arrayLikeKeys as aN,baseKeys as aO,memoize as aP,isArguments$1 as aQ,copyObject as aR,getPrototype$1 as aS,cloneArrayBuffer as aT,cloneTypedArray as aU,getTag$1 as aV,nodeUtil$1 as aW,copyArray$2 as aX,isBuffer$1 as aY,cloneBuffer as aZ,initCloneObject as a_,overRest as aa,root$1 as ab,baseRest as ac,isIterateeCall as ad,keysIn as ae,eq as af,isArrayLike as ag,isArray$i as ah,baseFor$1 as ai,baseAssignValue as aj,identity as ak,isIndex as al,assignValue as am,baseUnary as an,constant as ao,merge$7 as ap,lineBreakRegex as aq,defaultConfig as ar,commonDb as as,isDark$1 as at,lighten$1 as au,darken$1 as av,pi as aw,cos as ax,sin as ay,halfPi as az,getAccDescription as b,MapCache as b0,Uint8Array$2 as b1,isTypedArray$1 as b2,isLength as b3,Set$2 as b4,isArrayLikeObject as b5,isEmpty as b6,decodeEntities as b7,dedent as b8,setAccDescription as c,getConfig as d,sanitizeText$2 as e,assignWithDepth$1 as f,getDefaultExportFromCjs$3 as g,calculateTextWidth as h,select as i,configureSvgSize as j,common$1 as k,log$1 as l,calculateTextHeight as m,dist$2 as n,curveLinear as o,getStylesFromArray as p,evaluate as q,renderKatex as r,setAccTitle as s,interpolateToCurve as t,setupGraphViewbox$1 as u,setConfig as v,wrapLabel as w,root$2 as x,array$3 as y,isPlainObject as z}; diff --git a/wc/dist/package.json b/wc/dist/package.json index 38389db..e23da1d 100644 --- a/wc/dist/package.json +++ b/wc/dist/package.json @@ -9,7 +9,7 @@ "build-only": "vite build --base=https://cdn.jsdelivr.net/npm/juncture-digital/", "type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false", "tailwind": "tailwindcss -i input.css -o tailwind.css --watch", - "postbuild": "cp package.json ../dist; cp ../../ghp.js ../dist/js/ghp.js" + "postbuild": "cp package.json ../dist; cp ../../ghp-lib.js ../dist/js/ghp-lib.js; cp ../../ghp.js ../dist/js/ghp.js" }, "dependencies": { "@allmaps/leaflet": "^1.0.0-beta.25", diff --git a/wc/src/components/Article.ce.vue b/wc/src/components/Article.ce.vue index a80414c..d07a92c 100644 --- a/wc/src/components/Article.ce.vue +++ b/wc/src/components/Article.ce.vue @@ -8,7 +8,7 @@ import { computed, nextTick, onMounted, ref, toRaw, watch } from 'vue' - import { observeVisible } from '../../../ghp.js' + import { observeVisible } from '../../../ghp-lib.js' const props = defineProps({ base: { type: String }, diff --git a/wc/src/components/Snippet.ce.vue b/wc/src/components/Snippet.ce.vue index feb3dcf..1c87914 100644 --- a/wc/src/components/Snippet.ce.vue +++ b/wc/src/components/Snippet.ce.vue @@ -84,7 +84,7 @@ import { computed, onMounted, nextTick, ref, toRaw, watch, h } from 'vue' - import { elFromHtml, structureContent, markdownToHtml } from '../../../ghp.js' + import { elFromHtml, structureContent, markdownToHtml } from '../../../ghp-lib.js' import type SlTab from '@shoelace-style/shoelace/dist/components/tab/tab.js' diff --git a/wc/src/package.json b/wc/src/package.json index 38389db..e23da1d 100644 --- a/wc/src/package.json +++ b/wc/src/package.json @@ -9,7 +9,7 @@ "build-only": "vite build --base=https://cdn.jsdelivr.net/npm/juncture-digital/", "type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false", "tailwind": "tailwindcss -i input.css -o tailwind.css --watch", - "postbuild": "cp package.json ../dist; cp ../../ghp.js ../dist/js/ghp.js" + "postbuild": "cp package.json ../dist; cp ../../ghp-lib.js ../dist/js/ghp-lib.js; cp ../../ghp.js ../dist/js/ghp.js" }, "dependencies": { "@allmaps/leaflet": "^1.0.0-beta.25",